cargo-near 0.14.2 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,27 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.16.0](https://github.com/near/cargo-near/compare/cargo-near-v0.15.0...cargo-near-v0.16.0) - 2025-05-19
11
+
12
+ ### Added
13
+
14
+ - `--variant <name>` flag ([#339](https://github.com/near/cargo-near/pull/339))
15
+ - add `Feature::TruncSat` and `Feature::BulkMemory` to `wasm_opt::OptimizationOptions` ([#338](https://github.com/near/cargo-near/pull/338))
16
+
17
+ ### Other
18
+
19
+ - Updated `near-cli` install in template workflows to 0.20.0; updated `sign-with-plaintext-private-key` cli flag -> argument usage ([#346](https://github.com/near/cargo-near/pull/346))
20
+ - update `cargo near new` template `image` and `image_digest` ([#345](https://github.com/near/cargo-near/pull/345))
21
+
22
+ ## [0.15.0](https://github.com/near/cargo-near/compare/cargo-near-v0.14.2...cargo-near-v0.15.0) - 2025-05-16
23
+
24
+ ### Other
25
+
26
+ - updates near-* dependencies to 0.30 release ([#341](https://github.com/near/cargo-near/pull/341))
27
+ - use 1.86.0 toolchain for contracts tests with live node ([#340](https://github.com/near/cargo-near/pull/340))
28
+ - `cargo-near-build` crate badge + install cli in integration tests (for `test_cargo_test_on_generated_project`) ([#337](https://github.com/near/cargo-near/pull/337))
29
+ - update `cargo near new` template `image` and `image_digest` ([#335](https://github.com/near/cargo-near/pull/335))
30
+
10
31
  ## [0.14.2](https://github.com/near/cargo-near/compare/cargo-near-v0.14.1...cargo-near-v0.14.2) - 2025-05-03
11
32
 
12
33
  ### Added
package/README.md CHANGED
@@ -12,6 +12,8 @@
12
12
  <a href="https://github.com/near/cargo-near/actions/workflows/test.yml?query=branch%3Amain"><img src="https://github.com/near/cargo-near/actions/workflows/test.yml/badge.svg" alt="Github CI Build" /></a>
13
13
  <a href="https://crates.io/crates/cargo-near"><img src="https://img.shields.io/crates/v/cargo-near.svg?style=flat-square" alt="Crates.io version" /></a>
14
14
  <a href="https://crates.io/crates/cargo-near"><img src="https://img.shields.io/crates/d/cargo-near.svg?style=flat-square" alt="Download" /></a>
15
+ <a href="https://crates.io/crates/cargo-near-build"><img src="https://img.shields.io/crates/v/cargo-near-build.svg?style=flat-square" alt="Crates.io version" /></a>
16
+
15
17
  </p>
16
18
 
17
19
  </div>
@@ -163,6 +165,45 @@ Additional flags for build configuration can be looked up if needed by:
163
165
  cargo near build reproducible-wasm -h # replace `-h` with `--help` for more details
164
166
  ```
165
167
 
168
+ #### Custom `reproducible-wasm` build using `--variant <name>` flag
169
+
170
+ Beyond your `[package.metadata.near.reproducible_build]` configuration, you can
171
+ define **named variants of build** in your `Cargo.toml` under:
172
+
173
+ ```yaml
174
+ [package.metadata.near.reproducible_build.variant.<name>]
175
+ ```
176
+
177
+ It supports all the same fields as `[package.metadata.near.reproducible_build]`:
178
+ `image`, `image_digest`, `passed_env`, and `container_build_command`.
179
+
180
+ **Note that every field is optional for variant build and will override
181
+ corresponding field in `reproducible_build`!**
182
+
183
+ For example, if you declare:
184
+
185
+ ```yaml
186
+ [package.metadata.near.reproducible_build.variant.testnet-features]
187
+ container_build_command = [
188
+ "cargo",
189
+ "near",
190
+ "build",
191
+ "non-reproducible-wasm",
192
+ "--locked",
193
+ "--features",
194
+ "testnet"
195
+ ]
196
+ ```
197
+
198
+ in `Cargo.toml`, and then:
199
+
200
+ ```bash
201
+ cargo near build reproducible-wasm --variant testnet-features
202
+ ```
203
+
204
+ will use `testnet-features` version of `container_build_command`,
205
+ instead of one defined in `[package.metadata.near.reproducible_build]`.
206
+
166
207
  ---
167
208
 
168
209
  ```console
@@ -23,7 +23,7 @@
23
23
  "hasInstallScript": true,
24
24
  "license": "MIT OR Apache-2.0",
25
25
  "name": "cargo-near",
26
- "version": "0.14.2"
26
+ "version": "0.16.0"
27
27
  },
28
28
  "node_modules/@isaacs/cliui": {
29
29
  "dependencies": {
@@ -713,5 +713,5 @@
713
713
  }
714
714
  },
715
715
  "requires": true,
716
- "version": "0.14.2"
716
+ "version": "0.16.0"
717
717
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "artifactDownloadUrl": "https://github.com/near/cargo-near/releases/download/cargo-near-v0.14.2",
2
+ "artifactDownloadUrl": "https://github.com/near/cargo-near/releases/download/cargo-near-v0.16.0",
3
3
  "author": "Near Inc <hello@nearprotocol.com>",
4
4
  "bin": {
5
5
  "cargo-near": "run-cargo-near.js"
@@ -94,7 +94,7 @@
94
94
  "zipExt": ".tar.gz"
95
95
  }
96
96
  },
97
- "version": "0.14.2",
97
+ "version": "0.16.0",
98
98
  "volta": {
99
99
  "node": "18.14.1",
100
100
  "npm": "9.5.0"