r2n

Crates.ior2n
lib.rsr2n
version0.1.0
created_at2025-11-14 19:44:51.14542+00
updated_at2025-11-14 19:44:51.14542+00
descriptionA CLI tool for rapidly shipping Rust projects to npm
homepage
repositoryhttps://github.com/jpwesselink/r2n
max_upload_size
id1933342
size226,911
JP Wesselink (jpwesselink)

documentation

README

r2n

Ship Rust CLI tools to npm.

⚠️ EXPERIMENTAL: This package is experimental and should not be used in production. APIs and behavior may change without notice.

Install

cargo install r2n

Usage

Create a new project

r2n init my-tool
cd my-tool

Add to existing Rust project

cd my-rust-project
r2n add

Build

r2n build

This cross-compiles your Rust binary and creates an npm package ready to publish.

What it does

  1. Creates package.json with proper bin configuration
  2. Generates a Node.js wrapper script
  3. Cross-compiles your Rust binary for multiple platforms
  4. Outputs to dist/ ready for npm publish

License

MIT OR Apache-2.0

Commit count: 0

cargo fmt