{"id":44610420,"url":"https://github.com/ftk/quickjspp","last_synced_at":"2026-02-26T22:01:19.613Z","repository":{"id":37861678,"uuid":"196833043","full_name":"ftk/quickjspp","owner":"ftk","description":"QuickJS C++ wrapper","archived":false,"fork":false,"pushed_at":"2025-07-04T19:29:01.000Z","size":2783,"stargazers_count":435,"open_issues_count":27,"forks_count":92,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-07-04T20:32:11.158Z","etag":null,"topics":["cpp17","javascript-engine","quickjs","wrapper"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ftk.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-07-14T12:19:55.000Z","updated_at":"2025-07-04T19:29:05.000Z","dependencies_parsed_at":"2025-07-04T20:34:37.653Z","dependency_job_id":null,"html_url":"https://github.com/ftk/quickjspp","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ftk/quickjspp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftk%2Fquickjspp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftk%2Fquickjspp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftk%2Fquickjspp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftk%2Fquickjspp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ftk","download_url":"https://codeload.github.com/ftk/quickjspp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ftk%2Fquickjspp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29874453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T21:05:00.265Z","status":"ssl_error","status_checked_at":"2026-02-26T20:57:13.669Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cpp17","javascript-engine","quickjs","wrapper"],"created_at":"2026-02-14T12:00:22.735Z","updated_at":"2026-02-26T22:01:19.603Z","avatar_url":"https://github.com/ftk.png","language":"C","readme":"QuickJSPP is QuickJS wrapper for C++. It allows you to easily embed Javascript engine into your program.\n\nQuickJS is a small and embeddable Javascript engine. It supports the ES2020 specification including modules, asynchronous generators and proxies. More info: \u003chttps://bellard.org/quickjs/\u003e\n\n# Example\n```cpp\n#include \"quickjspp.hpp\"\n#include \u003ciostream\u003e\n\nclass MyClass\n{\npublic:\n    MyClass() {}\n    MyClass(std::vector\u003cint\u003e) {}\n\n    double member_variable = 5.5;\n    std::string member_function(const std::string\u0026 s) { return \"Hello, \" + s; }\n};\n\nvoid println(qjs::rest\u003cstd::string\u003e args) {\n    for (auto const \u0026 arg : args) std::cout \u003c\u003c arg \u003c\u003c \" \";\n    std::cout \u003c\u003c \"\\n\";\n}\n\nint main()\n{\n    qjs::Runtime runtime;\n    qjs::Context context(runtime);\n    try\n    {\n        // export classes as a module\n        auto\u0026 module = context.addModule(\"MyModule\");\n        module.function\u003c\u0026println\u003e(\"println\");\n        module.class_\u003cMyClass\u003e(\"MyClass\")\n                .constructor\u003c\u003e()\n                .constructor\u003cstd::vector\u003cint\u003e\u003e(\"MyClassA\")\n                .fun\u003c\u0026MyClass::member_variable\u003e(\"member_variable\")\n                .fun\u003c\u0026MyClass::member_function\u003e(\"member_function\");\n        // import module\n        context.eval(R\"xxx(\n            import * as my from 'MyModule';\n            globalThis.my = my;\n        )xxx\", \"\u003cimport\u003e\", JS_EVAL_TYPE_MODULE);\n        // evaluate js code\n        context.eval(R\"xxx(\n            let v1 = new my.MyClass();\n            v1.member_variable = 1;\n            let v2 = new my.MyClassA([1,2,3]);\n            function my_callback(str) {\n              my.println(\"at callback:\", v2.member_function(str));\n            }\n        )xxx\");\n\n        // callback\n        auto cb = (std::function\u003cvoid(const std::string\u0026)\u003e) context.eval(\"my_callback\");\n        cb(\"world\");\n    }\n    catch(qjs::exception)\n    {\n        auto exc = context.getException();\n        std::cerr \u003c\u003c (std::string) exc \u003c\u003c std::endl;\n        if((bool) exc[\"stack\"])\n            std::cerr \u003c\u003c (std::string) exc[\"stack\"] \u003c\u003c std::endl;\n        return 1;\n    }\n}\n```\n\n# Installation\nQuickJSPP is header-only - put quickjspp.hpp into your include search path.\nCompiler that supports C++17 or later is required.\nThe program needs to be linked against QuickJS.\nSample CMake project files are provided.\n\n# License\nQuickJSPP is licensed under [CC0](https://creativecommons.org/publicdomain/zero/1.0/). QuickJS is licensed under [MIT](https://opensource.org/licenses/MIT).\n","funding_links":[],"categories":["C"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftk%2Fquickjspp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fftk%2Fquickjspp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fftk%2Fquickjspp/lists"}