Crates.io | contract-build |
lib.rs | contract-build |
version | |
source | src |
created_at | 2022-12-01 13:26:03.747891 |
updated_at | 2024-11-06 09:21:10.840944 |
description | Library for building ink! smart contracts |
homepage | https://www.substrate.io/ |
repository | https://github.com/paritytech/cargo-contract |
max_upload_size | |
id | 727622 |
Cargo.toml error: | TOML parse error at line 27, column 1 | 27 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A crate for building ink!
smart contracts. Used by
cargo-contract
.
use contract_build::{
ManifestPath,
Verbosity,
BuildArtifacts,
BuildMode,
Features,
Network,
OptimizationPasses,
OutputType,
UnstableFlags,
Target,
ImageVariant,
};
let manifest_path = ManifestPath::new("my-contract/Cargo.toml").unwrap();
let args = contract_build::ExecuteArgs {
manifest_path,
verbosity: Verbosity::Default,
build_mode: BuildMode::Release,
features: Features::default(),
network: Network::Online,
build_artifact: BuildArtifacts::All,
unstable_flags: UnstableFlags::default(),
optimization_passes: Some(OptimizationPasses::default()),
keep_debug_symbols: false,
extra_lints: false,
output_type: OutputType::Json,
skip_wasm_validation: false,
target: Target::Wasm,
max_memory_pages: 16,
image: ImageVariant::Default,
};
contract_build::execute(args);