Expand description
§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-abidependencybonis 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");Re-exports§
Modules§
- env_
keys - module contains names of environment variables, exported during various operations of the library
- extended
- Set of examples how to do a factory build script with
crate::extended::build_with_cliapi is presented.
Structs§
- Build
Opts - argument of
build_with_clifunction - CliDescription
- used as field in
BuildOpts - SHA256
Checksum - convenience helper to compute resulting artifact hashsum if needed
Enums§
- Color
Preference - used as field in
BuildOpts
Functions§
- build_
with_ cli - Return value:
Result::Okis path to the wasm artifact obtained.