Cppscript
A simple experiment on using C++ as a scripting language in a C++ host app.
Install / Use
/learn @sgorsten/CppscriptREADME
cppscript
This is an experiment in using C++ as a scripting language for a C++ host app. The idea is very simple. You have two classes, script::Function<Sig> and script::Library.
script::Function is a strongly typed function object, callable with the given signature.
script::Library provides mechanisms to generate the aforementioned Function instances from snippets of C++ source code. Specifically, any code snippet which can be inserted after "[]" to form a valid stateless lambda expression can be used. Mechanisms are in place to compile a *.dll at runtime containing the requested functions, as well as to reload a *.dll previously produced by this process. Multiple libraries can be managed and loaded at once, and each can have a separate "preamble", code available to all functions in the library.
This system currently relies on having Visual Studio 2013 installed, and is Windows-specific. However, it is less than 200 lines of code, and should be fairly easy to port to other platforms and toolchains.
Related Skills
node-connect
339.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.9kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.9kCommit, push, and open a PR
