A Nx plugin that adds support for Cargo and Rust in your Nx workspace.
npm install @monodon/rustA Nx plugin that adds support for Cargo and Rust in your Nx workspace.
@monodon/rust@monodon/rust installed and ready, run:``shell`
npx create-nx-workspace --preset=@monodon/rust
`shell`
yarn add -D @monodon/rust
`shell`
npm install -D @monodon/rust
`shell`
pnpm add -D @monodon/rust
#### Initialization
After installing, you can run any of the project generators (binary, library) to have @monodon/rust set up Cargo in your workspace.
> Create a new binary:
> `shell`
> nx generate @monodon/rust:binary my-rust-app
>
> Create a new library:
> `shell`
> nx generate @monodon/rust:library my-rust-lib
>
> Create a new library with napi:
> `shell`
> nx generate @monodon/rust:library my-rust-node-lib --napi
>
#### Napi
Generating a library with the --napi flag will set up the project to be built with it.
);
* Uses stable by default
* target (e.g. --target=aarch64-apple-darwin);
* profile (e.g. --profile=dev)
* Cargo profiles
* release
* target-dir
* features (e.g. --features=bmp)
* Cargo features
* all-features
* args
* Arguments forwarding to the executor.$3
Runs cargo to build the project
> Not supported with napi$3
Runs cargo clippy to lint the project$3
Runs the napi cli to build the project$3
Runs cargo run for the project
> Not supported with napi$3
Runs cargo test` for the project