diff --git a/README.md b/README.md index 53ab8dc1..4c82a333 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,15 @@ cargo near build Builds a NEAR smart contract along with its [ABI](https://github.com/near/abi) (while in the directory containing contract's Cargo.toml). -You can also make this command NOT embed ABI into your WASM artifact by adding `--no-embed-abi` parameter. +By default, this runs a reproducible build in a [Docker](https://docs.docker.com/) container, which: + +- runs against source code version, committed to git, ignoring any uncommitted changes +- requires that `Cargo.lock` of project is created (e.g. via `cargo update`) and added to git +- will use configuration in `[package.metadata.near.reproducible_build]` section of contract's `Cargo.toml` + +`--no-docker` flag can be used to perform a regular build with rust toolchain installed onto host, running the `cargo-near` cli. *NO*-Docker builds run against actual state of code in filesystem and not against a version, committed to source control. + +`--no-locked` flag is allowed in *NO*-Docker builds, e.g. to generate a `Cargo.lock` *and* simultaneously build the contract. --- @@ -115,6 +123,13 @@ cargo near deploy Builds the smart contract (equivalent to `cargo near build`) and guides you to deploy it to the blockchain. +By default, this runs a reproducible build in a Docker container. + +`deploy` command from Docker build requires that contract's source code has been pushed to remote repository, +doesn't have any modified tracked files, any staged changes or any untracked content. + +`--no-docker` flag can be used to perform a regular *NO*-Docker build *and* deploy. Similar to `build` command, +in this case none of the git-related concerns and restrictions apply. ## Contribution