Skip to content

Commit

Permalink
chore(rust): update readme for compatibility (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cammisuli authored Nov 20, 2023
1 parent 13973c9 commit 8b85ca0
Showing 1 changed file with 17 additions and 11 deletions.
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

0 comments on commit 8b85ca0

Please sign in to comment.