Description
This is unofficial Rust bindings for Sciter
Disclaimer
This is a work in progress library and is not yet ready for production use.
Differencies from rust-sciter
- Never panics
- Uses bindgen instead of hand-written code.
- Utilizes Sciter's own functions for windows/application management.
- The primary goal is not to provide a complete Sciter API, but to simplify the interaction between the backend (in Rust) and the frontend (Sciter.JS UI).
Exporting xfunctions (e.g. functions available via window.xcall)
// mark the module, that's it!
JS side:
const sum = .;
For details, see this samples:
Sciter Object Model support
You can export entire backend module with a single #[rsciter::asset_ns] macro:
JS side:
const obj = ;
console.log;
// open result: "[asset Object], test.db, 4"
const updateRes = obj.;
console.log;
// [asset UpdateRes] function () {
// [native code]
// }
console.log;
// Update result: "Updating: `new data` for `test.db` with `4`"
SOM samples: