{"id":13419441,"url":"https://github.com/Rapptz/sol","last_synced_at":"2025-03-15T05:31:15.194Z","repository":{"id":12093731,"uuid":"14682087","full_name":"Rapptz/sol","owner":"Rapptz","description":"A C++11 Lua wrapper","archived":false,"fork":false,"pushed_at":"2016-02-12T03:36:08.000Z","size":1246,"stargazers_count":208,"open_issues_count":15,"forks_count":32,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-10-12T09:10:48.869Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rapptz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-25T09:59:34.000Z","updated_at":"2024-07-24T10:29:45.000Z","dependencies_parsed_at":"2022-09-14T00:12:23.336Z","dependency_job_id":null,"html_url":"https://github.com/Rapptz/sol","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapptz%2Fsol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapptz%2Fsol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapptz%2Fsol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rapptz%2Fsol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rapptz","download_url":"https://codeload.github.com/Rapptz/sol/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243690114,"owners_count":20331726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:16.052Z","updated_at":"2025-03-15T05:31:14.903Z","avatar_url":"https://github.com/Rapptz.png","language":"C++","funding_links":[],"categories":["TODO scan for Android support in followings"],"sub_categories":[],"readme":"## Sol\n\n[![Build Status](https://travis-ci.org/Rapptz/sol.svg?branch=master)](https://travis-ci.org/Rapptz/sol)\n\nSol is a C++ library binding to Lua. It currently supports Lua 5.2. Sol aims to be easy to use and easy to add to a project.\nAt this time, the library is header-only for easy integration with projects.\n\n## Sneak Peek\n\n```cpp\n#include \u003csol.hpp\u003e\n#include \u003ccassert\u003e\n\nint main() {\n    sol::state lua;\n    int x = 0;\n    lua.set_function(\"beep\", [\u0026x]{ ++x; });\n    lua.script(\"beep()\");\n    assert(x == 1);\n}\n```\n\n```cpp\n#include \u003csol.hpp\u003e\n#include \u003ccassert\u003e\n\nstruct vars {\n    int boop = 0;\n};\n\nint main() {\n    sol::state lua;\n    lua.new_userdata\u003cvars\u003e(\"vars\", \"boop\", \u0026vars::boop);\n    lua.script(\"beep = vars.new()\\n\"\n               \"beep.boop = 1\");\n    assert(lua.get\u003cvars\u003e(\"beep\").boop == 1);\n}\n```\n\nMore examples are given in the examples directory.\n\n## Features\n\n- Supports retrieval and setting of multiple types including `std::string`.\n- Lambda, function, and member function bindings are supported.\n- Intermediate type for checking if a variable exists.\n- Simple API that completely abstracts away the C stack API.\n- `operator[]`-style manipulation of tables is provided.\n- Support for tables.\n\n## Supported Compilers\n\nSol makes use of C++11 features. GCC 4.7 and Clang 3.3 or higher should be able to compile without problems. However, the\nofficially supported compilers are:\n\n- GCC 4.8.0\n- GCC 4.9.0\n- Clang 3.4\n\nVisual Studio 2013 with the November CTP could possibly compile it, despite not being explicitly supported. The last\nversion that Visual Studio 2013 was supported was on tag v1.1.0. Anything after that is wishful thinking. In order to\nretrieve that tagged version, just do `git checkout v1.1.0`.\n\n## Caveats\n\nDue to how this library is used compared to the C API, the Lua Stack is completely abstracted away. Not only that, but all\nLua errors are thrown as exceptions instead. This allows you to handle the errors gracefully without being forced to exit.\n\nIt should be noted that the library itself depends on `lua.hpp` to be found by your compiler. It uses angle brackets, e.g.\n`#include \u003clua.hpp\u003e`.\n\n## License\n\nSol is distributed with an MIT License. You can see LICENSE.txt for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRapptz%2Fsol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FRapptz%2Fsol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FRapptz%2Fsol/lists"}