Rust target pack for Tsonic. This package owns Rust target analysis, ownership
and lifetime contracts, compiler-backed rustdoc providers, Rust AST planning
and syntax printing, canonical rustfmt formatting, generated Cargo artifacts,
and Cargo toolchain handoff.
Canonical product documentation lives in the Tsonic repository:
Install Node.js 22.18 or newer. Install Rust through rustup with Cargo,
rustc, rustdoc, rustfmt, and the rust-src component, then create, install,
and run a complete project:
npm create tsonic@latest hello-rust -- --target rust
cd hello-rust
npm startThe first Rust project guide contains a complete source file, project configuration, native build, and run.
| Export | Purpose |
|---|---|
@tsonic/target-rust |
Target plugin |
@tsonic/target-rust/provider |
Rust provider-authoring contract |
Runtime crates remain owned by @tsonic/rust-runtime,
@tsonic/rust-js, and installed capability packages such as
@tsonic/rust-nodejs.
The sibling Tsonic packages and Rust runtime repositories must be available
through the workspace dependencies. The selected Rust toolchain must include
rustfmt and rust-src; generated Rust is formatted before Tsonic publishes
it, and native imports use the selected standard library's source declarations.
npm install
npm run build
npm testnpm test runs every target and generated-Cargo proof under the repository's
bounded memory, task, timeout, and log guards.