Skip to content

document NAPI-RS loader support - #25

Merged
biw merged 1 commit into
mainfrom
biw/napi-rs-support
Aug 11, 2026
Merged

document NAPI-RS loader support#25
biw merged 1 commit into
mainfrom
biw/napi-rs-support

Conversation

@biw

@biw biw commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

Documents existing native-loader support so consumers can identify compatible packages and supported Vite versions.

What This PR Does

  • Adds NAPI-RS platform-loader and companion-package support to the feature list
  • Calls out ESM, CommonJS, and createRequire() compatibility
  • Clarifies swift-node runtime-sidecar handling and Vite 3–8 support

What This Does Not Do

  • No runtime or packaging behavior changes

Important Context

  • NAPI-RS support already exists in the implementation and test suite

Code To Review Closely

README.md:11

Reviewers should verify that these advertised compatibility claims continue to match the supported loader patterns.

- **ESM and CommonJS compatible** - supports static imports, `require()`, and `createRequire()`
- **`node-gyp-build` support** - automatically detects and rewrites runtime selectors
- **`bindings` package support** - automatically handles `bindings('addon')` patterns
- **[`NAPI-RS`](https://napi.rs/) support** - automatically handles platform-specific loaders and companion packages
- **[`swift-node`](https://github.com/biw/swift-node) support** - automatically handles target-qualified addons and their runtime sidecars
- **Vite 3–8 compatible**

Gotchas, Risks, And Edge Cases

  • Documentation claims need updates when loader compatibility changes

Tests And Regression Coverage

Validation Run

  • pnpm test: 12 files and 205 tests passed

Coverage Assessment

Sufficient for this documentation-only change; the full suite covers the listed loader integrations and Vite compatibility.

Regressions These Tests Should Catch

  • NAPI-RS platform-specific local and companion-package loaders
  • node-gyp-build, bindings, swift-node, ESM, CommonJS, and Vite 7/8 behavior

Gaps And Recommended Follow-Up Tests

  • No additional tests needed for documentation-only changes

Follow-Up Work

  • None

@biw biw changed the title docs: document NAPI-RS loader support document NAPI-RS loader support Aug 11, 2026
@biw
biw merged commit 7223c1f into main Aug 11, 2026
2 checks passed
@biw
biw deleted the biw/napi-rs-support branch August 11, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant