chkpt
v0.1.2
Published
Filesystem checkpoint engine - save, restore, and manage workspace snapshots
Readme
chkpt-napi
Node.js N-API bindings for the filesystem checkpoint engine.
Build
Current platform only
pnpm buildBuilds a .node binary for the host platform only.
Cross-compile all targets
pnpm build:allBuilds N-API modules and CLI binaries for all 5 platforms. To build a specific platform:
bash scripts/build-all.sh darwin-arm64
bash scripts/build-all.sh win32-x64-msvcCross-compilation prerequisites
The following tools are required to run the full cross-build (build:all).
1. Rust targets
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
rustup target add aarch64-unknown-linux-gnu
rustup target add x86_64-unknown-linux-gnu
rustup target add x86_64-pc-windows-msvc2. Linux — cross (Docker-based)
cargo install crossRequires Docker to be installed and running.
3. Windows MSVC — cargo-xwin
# Install cargo-xwin
cargo install cargo-xwin
# Install LLVM (provides clang-cl)
# macOS
brew install llvm
# Ubuntu/Debian
sudo apt install llvm clang lldOn the first build, cargo-xwin automatically downloads the MSVC CRT headers and Windows SDK libraries.
Summary
| Target | Build tool | Dependencies |
|--------|-----------|--------------|
| aarch64-apple-darwin | cargo | (native) |
| x86_64-apple-darwin | cargo | (native) |
| aarch64-unknown-linux-gnu | cross | Docker |
| x86_64-unknown-linux-gnu | cross | Docker |
| x86_64-pc-windows-msvc | cargo xwin | LLVM (clang-cl) |
Test
pnpm testPublish
# dry-run
bash scripts/publish.sh --dry-run
# publish
bash scripts/publish.shPublishes platform-specific npm packages first, then the main package.
