A cross-platform framework based on Rust, supporting biz dev via Lua & JS.
π The modern C++ counterpart: DynXX.
| Module | Core | C ABI | Unit tests | Compared with DynXX |
|---|---|---|---|---|
| Crypto | βοΈ | βοΈ | βοΈ |
|
| Network | βοΈ | βοΈ | βοΈ |
|
| SQLite | βοΈ | βοΈ | βοΈ | |
| Key-Value | βοΈ | βοΈ | βοΈ |
|
| Zip | βοΈ | βοΈ | βοΈ |
|
| Lua | βοΈ | βοΈ | βοΈ | addTimer / pollTimers / removeTimer are a DynRS addition, DynXX has no timer API |
| JS (QuickJS) | βοΈ | βοΈ | βοΈ | same three timer functions as the Lua bridge |
| Platform bridges (JNI / ArkTS / β¦) | Not started |
- βοΈ : Done;
- β : To do;
Unfixed advisory: RSA decryption is not constant time, the
rsacrate has no patch for the Marvin timing sidechannel (RUSTSEC-2023-0071). That advisory does not cover the OpenSSL RSA DynXX uses.
Every exported function returns a status, writes its results through out-parameters, and catches
panics at the boundary β an escaping panic would abort the host, so it is reported as Panicked.
| Status | Meaning |
|---|---|
Ok (0) |
The call did what it says. |
Empty (1) |
Nothing to report, and not an error β no value for this key, no current row, no body. Kept apart from Ok so a zero is never read as data. |
InvalidArgument (2) |
The input was rejected: a null string, non-UTF-8 text, an empty key. |
InvalidHandle (3) |
The handle is null or cannot answer yet, e.g. a result set before ngenrs_db_next_row. |
Failed (4) |
The operation failed: network, store, script engine. |
Panicked (5) |
The body panicked. |
Out-parameters are untouched when a call is refused. Read them only after the status you expect.
Where the status alone is not enough β a load error, an unreadable body β the reason goes to an
err_out C string.
The release function follows the out-parameter the result arrived in:
| Result arrived as | Release with |
|---|---|
A byte buffer plus a length (out / len_out) |
ngenrs_free_bytes(ptr) |
A *mut c_char (out, err_out, header entries) |
ngenrs_free_cstr(ptr) |
A key list from ngenrs_kv_all_keys |
ngenrs_kv_free_keys(keys) |
A handle from ngenrs_*_open / _init / _query |
the matching ngenrs_*_close / _release / _free_* |
| An HTTP response | ngenrs_http_release_rsp(rsp) |
Data β script returns, text columns, HTTP bodies, store keys β crosses as a buffer plus its length.
Such a value may contain a NUL, which a C string cannot carry: it would arrive truncated to nothing,
indistinguishable from "no value". An empty value is a real allocation of length zero; Empty is
the answer with no buffer at all.
Only strings this library writes itself β error messages, PEM text, header names and values β come back as C strings.
- Rust 1.90+ (edition 2024). The floor is set by the dependency graph, not by the edition.
libclangforbindgen(vialibquickjs-ng-sys); setLIBCLANG_PATHwhen it is not onPATH.- A C toolchain for the vendored QuickJS, Lua and SQLite.
cargo build # the static library, plus the qjsc tool
cargo test
cargo fmt --all --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo xtask build --target wasm --release # also: android, ohos, ios (each needs its SDK)src/core/*β behaviour of the portable layer, mirroring DynXX's gtest coverage.src/c/*β ABI contract tests only: null arguments, empty results, ownership.