21 releases (8 breaking)
| 0.9.0 | Sep 14, 2025 |
|---|---|
| 0.7.2 | Jul 8, 2025 |
| 0.4.5 | Mar 24, 2025 |
| 0.4.2 | Dec 19, 2024 |
| 0.3.2 | Nov 19, 2024 |
#25 in #basis
12,753 downloads per month
Used in 6 crates
(2 directly)
165KB
3.5K
SLoC
Crate features
- build_external -
Exports
crate::build_with_clifunction which builds contracts by running externalcargo-nearbinary withstd::process::Command - build_internal -
The whole functionality, needed for build and ABI generation, mostly for internal use by
cargo-nearCLI implementation - docker -
Adds
dockermodule for functionality of building in docker with WASM reproducibility. - test_code - Adds exports needed for integration tests.
Default features
build_external
Re-exports
caminois re-exported, because it is used inBuildOptsas type of some of fieldsnear_abiis re-exported (underbuild_internalfeature), because details of ABI generated depends on specific version ofnear-abidependency- [
bon] is re-exported for the convenience ofbon::vechelper macro
Sample usage:
Default:
let artifact = cargo_near_build::build_with_cli(Default::default()).expect("some error during build");
With some options set:
let build_opts = cargo_near_build::BuildOpts::builder().features("some_contract_feature_1").build();
let artifact = cargo_near_build::build_with_cli(build_opts).expect("some error during build");
Dependencies
~3–20MB
~274K SLoC