MultiversX: utility package for building Rust contracts (reproducible builds).
Project description
elrond-sdk-images-build-contract-rust
Docker image (and wrappers) for reproducible contract builds (Rust). See docs.elrond.com.
Build the Docker image
docker buildx build --no-cache . -t build-contract-rust:experimental -f ./Dockerfile
Build contract using the wrapper
Without providing cargo-target-dir
:
python3 ./build_with_docker.py --image=build-contract-rust:experimental \
--project=~/contracts/reproducible-contract-build-example \
--output=~/contracts/output-from-docker
With providing cargo-target-dir
:
python3 ./build_with_docker.py --image=build-contract-rust:experimental \
--project=~/contracts/reproducible-contract-build-example \
--output=~/contracts/output-from-docker \
--cargo-target-dir=~/cargo-target-dir-docker
Building from a packaged source code:
python3 ./build_with_docker.py --image=build-contract-rust:experimental \
--packaged-src=~/contracts/example-0.0.0.source.json \
--output=~/contracts/output-from-docker
Build contract using the Docker inner script
This is useful for useful for testing, debugging and reviewing the script.
export PROJECT=${HOME}/contracts/reproducible-contract-build-example
export OUTPUT=${HOME}/contracts/output
export CARGO_TARGET_DIR=${HOME}/cargo-target-dir
export PATH=${HOME}/elrondsdk/vendor-rust/bin:${HOME}/elrondsdk/wabt/latest/bin:${PATH}
export RUSTUP_HOME=${HOME}/elrondsdk/vendor-rust
export CARGO_HOME=${HOME}/elrondsdk/vendor-rust
Build a project:
python3 ./build_within_docker.py --project=${PROJECT} --output=${OUTPUT} \
--cargo-target-dir=${CARGO_TARGET_DIR}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for mx_sdk_build_contract_rs-4.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bb22e4db4579104afeea7bb590c45016b3f35616929e3de208e20d105c43559 |
|
MD5 | 14d3b41662b47524dbc752732bf2afbc |
|
BLAKE2b-256 | 53fa9adec1db7138409414a15ebfc5e069fc7823d39d891d1b45739e57e7c70a |
Close
Hashes for mx_sdk_build_contract_rs-4.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78862f708ea27cb72a091c18a6f27f8665c438320828aada9f7a148a2281ec44 |
|
MD5 | 58df87071228c5c2a091ad954789fd07 |
|
BLAKE2b-256 | d4295caee055cf55d791d0847a22d44c5a9a0b2e72825406c975463c15a7bf96 |