Docker image (and wrappers) for reproducible contract builds (Rust). See docs.multiversx.com.
docker build --network host . -t sdk-rust-contract-builder:next -f ./Dockerfile
Maintainers can publish the image as follows:
docker build --network host . -t multiversx/sdk-rust-contract-builder:next -f ./Dockerfile
docker push multiversx/sdk-rust-contract-builder:next
If you are using a Mac with ARM64, we recommend setting the following variable beforehand (contract builds will be slower, but this eliminates the risk of not being able to reproduce the build on Linux):
export DOCKER_DEFAULT_PLATFORM=linux/amd64
Building from a project folder:
python3 ./build_with_docker.py --image=sdk-rust-contract-builder:next \
--project=~/contracts/example \
--output=~/contracts/output-from-docker
Building from a packaged source code:
python3 ./build_with_docker.py --image=sdk-rust-contract-builder:next \
--packaged-src=~/contracts/example-0.0.0.source.json \
--output=~/contracts/output-from-docker
pytest .
python3 ./integration_tests/test_previous_builds_are_reproducible.py --selected-builds "a.1" [...]
python3 ./integration_tests/test_project_folder_and_packaged_src_are_equivalent.py