16 releases (5 breaking)
new 0.6.0 | May 3, 2025 |
---|---|
0.4.6 | Apr 8, 2025 |
0.4.5 | Mar 24, 2025 |
0.4.2 | Dec 19, 2024 |
0.3.2 | Nov 19, 2024 |
#29 in #near
7,413 downloads per month
Used in 6 crates
(2 directly)
150KB
3.5K
SLoC
Crate features
- build_external -
Exports
crate::build_with_cli
function which builds contracts by running externalcargo-near
binary withstd::process::Command
- build_internal -
The whole functionality, needed for build and ABI generation, mostly for internal use by
cargo-near
CLI implementation - docker -
Adds
docker
module for functionality of building in docker with WASM reproducibility. - test_code - Adds exports needed for integration tests.
Default features
build_external
Re-exports
camino
is re-exported, because it is used inBuildOpts
as type of some of fieldsnear_abi
is re-exported (underbuild_internal
feature), because details of ABI generated depends on specific version ofnear-abi
dependency- [
bon
] is re-exported for the convenience ofbon::vec
helper 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–17MB
~263K SLoC