Expand description
Step 6: turn a gated port into packages end users install, the way maturin and
@napi-rs/cli lay them out. Writes files only: it never builds for other platforms (the
generated GitHub Actions workflow does) and never publishes.
- PyO3: a self-contained maturin project (abi3 wheel, importable under the original’s module name) and a workflow that builds wheels for macOS, Linux (manylinux) and Windows.
- napi-rs: a main npm package whose loader picks
<name>-<platform>from itsoptionalDependenciesand falls back to the original JS, one package per platform holding one.node, and a workflow that builds and packs them. - wasm-bindgen: one npm package with the built
pkg/, the same on every platform. - A CLI front door (
rust/app) of an npm CLI: a main package whose command runs this platform’s front door binary, with the original pinned as a dependency for every case the port does not cover, and one package per platform holding the binary (cli.rs).
Structs§
- Options
- Outcome
- Platform
- A platform a napi port ships a binary for: the npm key napi-rs uses, the Rust target, and the runner that builds it.
Enums§
- Layout
- What a package folder holds.
Constants§
- PLATFORMS
- STAMP
- Written into the output folder; lists what the last run wrote, so a rerun replaces only that.
Functions§
- host_
key - The napi key of the machine running rust-anything, if a package is built for it.
- original_
version - The version of the package the unit belongs to: the nearest
package.jsonfor JS, thepyproject.toml(orsetup.cfg, or__version__) for Python. - package
- python_
module - The dotted module the original unit is imported as:
src/textkit/istextkit,src/textkit/words.pyistextkit.words. Folders above count while they are packages (hold__init__.py); without the sources, a leadingsrc/orlib/is dropped.