Skip to content

Standard Operating Procedures

Fresh 🌱

Step-by-step procedures for the most common Neon tasks. Each one is a checklist you can follow top to bottom. Start here if you are setting up a new module.

The procedures

#ProcedureWhat you get at the end
1Install ToolchainNode.js and Rust installed and verified, ready to build Neon modules.
2Hello, World!A working index.node you can require() from Node, built from a real Rust crate dependency.
3Export Functions to JavaScriptRust functions callable from JS, using both the classic export_function and the #[neon::export] macro.
4Build, Test & Publish to npmA debug/release build loop and the path to shipping a prebuilt package.
flowchart LR
    A[Install Toolchain] --> B[Hello, World!]
    B --> C[Export Functions]
    C --> D[Build, Test & Publish]
    style A fill:#10b981,color:#fff
    style B fill:#10b981,color:#fff
    style C fill:#6366f1,color:#fff
    style D fill:#f59e0b,color:#fff

A Neon project is two things at once

Every Neon project is both a Node package and a Rust crate. You will see a package.json and a Cargo.toml side by side. Node tooling manages the JS side; Cargo manages the Rust side. The build glue ties them into a single index.node binary.