Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(rust): update readme for compatibility #32

Merged
merged 1 commit into from
Nov 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions packages/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@

A Nx plugin that adds support for Cargo and Rust in your Nx workspace.

## Compatibility Chart
|@monodon/rust|nx|
|---|---
|<=1.2.1|<=17.1.0|
|>=1.3.0|>=17.1.0|


## Getting Started

### Prerequisites
### Prerequisites
The following tools need to be installed on your system to take full advantage of `@monodon/rust`
* Node (LTS)
* Rust / Cargo via [https://rustup.rs](https://rustup.rs)
Expand All @@ -31,23 +38,23 @@ npm install -D @monodon/rust
pnpm add -D @monodon/rust
```

#### Initialization
#### Initialization

After installing, you can run any of the project generators (binary, library) to have @monodon/rust set up Cargo in your workspace.

## Generators
Use Nx Console to see the full list of options for each generator.
Use Nx Console to see the full list of options for each generator.

### `@monodon/rust:binary`
Creates a Rust binary application to be run independently.

> Create a new binary:
> ```shell
> nx generate @monodon/rust:binary my-rust-app
> nx generate @monodon/rust:binary my-rust-app
> ```

### `@monodon/rust:library`
Creates a Rust library that can be used in binaries, or compiled to be used for napi.
Creates a Rust library that can be used in binaries, or compiled to be used for napi.

> Create a new library:
> ```shell
Expand All @@ -64,13 +71,13 @@ Generating a library with the `--napi` flag will set up the project to be built

## Executors
All the executors support these additional properties:
* toolchain: (e.g. `--toolchain='stable' | 'beta' | 'nightly'`);
* toolchain: (e.g. `--toolchain='stable' | 'beta' | 'nightly'`);
* Uses `stable` by default
* target (e.g. `--target=aarch64-apple-darwin`);
* profile (e.g. `--profile=dev`)
* target (e.g. `--target=aarch64-apple-darwin`);
* profile (e.g. `--profile=dev`)
* [Cargo profiles](https://doc.rust-lang.org/cargo/reference/profiles.html)
* release
* target-dir
* target-dir
* features (e.g. `--features=bmp`)
* [Cargo features](https://doc.rust-lang.org/cargo/reference/features.html)
* all-features
Expand All @@ -88,7 +95,6 @@ Runs the napi cli to build the project
### `@monodon/rust:run`
Runs `cargo run` for the project
> Not supported with napi

### `@monodon/rust:test`
Runs `cargo test` for the project

Loading