sol2 is a C++ library binding to Lua. It currently supports all Lua versions 5.1+ (LuaJIT 2.0+ and MoonJIT included). sol2 aims to be easy to use and easy to add to a project. The library is header-only for easy integration with projects, and a single header can be used for drag-and-drop start up. sol2 makes use of C++17 features. GCC 7.x.x and Clang 3.9.x (with -std=c++1z and appropriate standard library) or higher should be able to compile without problems. sol2 is checked by-hand for other platforms as well, including Android-based builds with GCC and iOS-based builds out of XCode with Apple-clang. It should work on both of these platforms, so long as you have the proper standards flags. If something doesn't work or you need special options, you may need to look into the different ways to support the project to have it done for you!

Features

  • Fastest in the land (see: sol2 bar in graph)
  • Supports retrieval and setting of multiple types
  • Lambda, function, and member function bindings are supported
  • Intermediate type for checking if a variable exists
  • Simple API that completely abstracts away the C stack API, including protected_function with the ability to use an error-handling function
  • C++ type representations in Lua userdata as usertypes with guaranteed cleanup

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow sol2

sol2 Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of sol2!

Additional Project Details

Operating Systems

Apple iPhone

Programming Language

C++

Related Categories

C++ Software Development Software

Registered

2023-05-31