contract-build

Crates.iocontract-build
lib.rscontract-build
version
sourcesrc
created_at2022-12-01 13:26:03.747891
updated_at2024-11-06 09:21:10.840944
descriptionLibrary for building ink! smart contracts
homepagehttps://www.substrate.io/
repositoryhttps://github.com/paritytech/cargo-contract
max_upload_size
id727622
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`
size0
ink! Developers (github:use-ink:ink-developers)

documentation

https://docs.rs/contract-build

README

contract-build

A crate for building ink! smart contracts. Used by cargo-contract.

Usage

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);
Commit count: 1288

cargo fmt