Small CLI utility for copying Rust compiler artifacts (binaries, cdylibs, dylibs) produced by cargo to a specified output file. Current stable version 0.1.9, released as part of the Neon bindings ecosystem. Parses cargo's JSON metadata output (via --message-format=json) to reliably locate artifacts regardless of build profile or target. Differentiators: works with npm script integration via --npm flag, supports multiple artifact mappings, and wraps arbitrary commands as a child process. Not actively maintained; last release in 2023.
npm install cargo-cp-artifactNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs cargo-cp-artifact globally and uses it to copy a Rust cdylib to a .node file after building with cargo.
Use -- before the wrapped command, e.g., cargo-cp-artifact -a cdylib my-crate lib/index.node -- cargo build --message-format=json-render-diagnostics
Use only 'bin', 'cdylib', or 'dylib' (or abbreviations 'b', 'c', 'd').
Use the exact Cargo.toml [package] name. For npm integration, ensure npm_package_name matches or use --npm flag with proper env variable.
Verify crate name in Cargo.toml and artifact kind (cdylib, bin, etc.). Use cargo build --release --message-format=json to see available artifacts.
Provide three values: artifact-kind crate-name output-file, e.g., --artifact cdylib my-crate lib/index.node
Use one of: bin, cdylib, dylib (or abbreviations b, c, d).
No dependency data recorded yet.