multiversx / mx-sdk-rust-contract-builder

Docker image (and wrappers) for reproducible contract builds (Rust).
MIT License
1 stars 2 forks source link

Redesign, split into files, sketch a proper package #13

Closed andreibancioiu closed 1 year ago

andreibancioiu commented 1 year ago

If one wants to trigger the build outside of the Docker setup (build reproducibility not guaranteed), then:

Reference package (requirements.txt):

git+https://git@github.com/ElrondNetwork/elrond-sdk-images-build-contract-rust@v4.0.0#egg=build_contract_rust

Code:

from build_contract_rust import builder

outcome = builder.build_project(
    project_path=Path("./testdata/input"),
    parent_output_directory=Path("./testdata/output"),
    specific_contract=None,
    cargo_target_dir=Path("/tmp/cargo-target-dir"),
    no_wasm_opt=False
)