🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@monodon/rust

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@monodon/rust

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

2.3.0
latest
Source
npm
Version published
Weekly downloads
18K
-4.75%
Maintainers
1
Weekly downloads
 
Created
Source

@monodon/rust

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

Compatibility Chart

@monodon/rustnx
<=1.2.1<=17.1.0
>=1.3.0>=17.1.0

Getting Started

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

Install with npx create-nx-workspace preset

To bootstrap a new workspace with @monodon/rust installed and ready, run:

npx create-nx-workspace --preset=@monodon/rust

Installation in already set up workspace

Use your favourite package manager to install in your project:

yarn add -D @monodon/rust
npm install -D @monodon/rust
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.

Generators

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:

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.

Create a new library:

nx generate @monodon/rust:library my-rust-lib

Create a new library with napi:

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.

Executors

All the executors support these additional properties:

  • toolchain: (e.g. --toolchain='stable' | 'beta' | 'nightly');
    • Uses stable by default
  • target (e.g. --target=aarch64-apple-darwin);
  • profile (e.g. --profile=dev)
  • release
  • target-dir
  • features (e.g. --features=bmp)
  • all-features
  • args

@monodon/rust:build

Runs cargo to build the project

Not supported with napi

@monodon/rust:lint

Runs cargo clippy to lint the project

@monodon/rust:napi

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

FAQs

Package last updated on 08 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts