r2n 0.1.0

A CLI tool for rapidly shipping Rust projects to npm
Documentation

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