This is an example of how the RTS programming language can be embedded as a module within another project.
Integrating RTS in this way is relatively straightforward — you can easily pass variables or expose methods between the host environment and RTS. This approach enables more flexible programming without the need to recompile the entire codebase.
Such flexibility is especially important for large-scale systems like game engines, simulation platforms, or complex software architectures where runtime scripting capabilities are essential.
Additionally, a brief comparison is provided between RTS and other programming languages, specifically in the context of embedding them as runtime modules (libraries) within host applications. The focus is on their technical suitability, integration complexity, and runtime characteristics when used as embedded interpreters or scripting engines.
For more information about RTS, please visit the official website.
Criterion | RTS | Lua | Python | JavaScript | WASM | Rust Modules |
---|---|---|---|---|---|---|
Embeddability | ✅ ~1MB lib | ✅ ~250KB | ✅ Cargo/use | |||
API Simplicity | ✅ Direct | ✅ Simple C | ✅ Simple | |||
Native Host Call | ✅ getNative | ✅ lua_pushc | ✅ Wrappers | ✅ JS ctx | ✅ Import/Exp | — Native |
Introspection | ✅ Built-in | ❌ None | ✅ Full static | |||
Extensibility | ✅ FDS | ✅ Classes | ✅ Objects | ✅ Rust traits | ||
Mutability Control | ✅ final/... | ❌ None | ❌ None | ✅ mut/&/&mut | ||
Code Clarity | ✅ Explicit | ✅ Explicit | ✅ Static | |||
Build & Distribution | ✅ .run() | ✅ .lua | ✅ Cargo | |||
Modularity | ✅ import() | ✅ Modules | ✅ ES/CJS | ✅ Cargo mods | ||
Resource Usage | ✅ Minimal | ✅ Very low | ❌ High | ❌ High | ✅ Minimal | |
Logic Type | ✅ Ternary | |||||
Runtime Errors | ✅ No exc. | ❌ exc. | ❌ exc. | ❌ Trap | ||
Impl. Language | ✅ Rust | ✅ Rust |