napi-rs
Installation
SKILL.md
napi-rs (Rust-JavaScript Bindings)
Scope
- Module setup with
#[napi]macros. - Async task execution and Tokio integration.
- ThreadsafeFunction (TSFN) for callbacks from Rust threads.
- Buffer and typed array handling.
- Error mapping and custom error types.
- Bun compatibility and Node-API versioning.
- deno_core embedding for V8/TypeScript execution.
Module Setup
Cargo.toml
[lib]
crate-type = ["cdylib"]