docs/README.mdEdit on GitHub
napi-go documentation
| Document | For |
|---|---|
| Getting started | creating, building, testing and publishing an addon |
| Writing addons | functions, conversions, errors, async functions, classes, calling JS from goroutines, Layer 1 |
| How it works | the layers, loading, the call path, threads, memory, signals, costs |
| Coming from napi-rs | napi-rs features and their napi-go counterparts |
| Platforms and limitations | supported systems and versions, known limits, troubleshooting |
| Benchmarks | napi-go against napi-rs and node-addon-api |
| Releasing napi-go | the release checklist (maintainers) |
Reference:
| Package | |
|---|---|
napi |
Layer 2 (framework) and Layer 1 (core): type mapping, wrappers, threading rules |
cmd/napi-go |
the CLI: configuration, targets, cross-compilation, publishing |
internal/codegen |
the //napi: annotations and the TypeScript mapping |
sys |
Layer 0: the raw Node-API bindings |
The API reference is on pkg.go.dev.