Skip to content

Commit

Permalink
review: addresses #134 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yf0μl committed Jun 17, 2024
1 parent 538acf0 commit 48b8181
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 48b8181

Please sign in to comment.