cargo-near 0.15.0 → 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,18 @@ 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
+
10
22
  ## [0.15.0](https://github.com/near/cargo-near/compare/cargo-near-v0.14.2...cargo-near-v0.15.0) - 2025-05-16
11
23
 
12
24
  ### Other
package/README.md CHANGED
@@ -165,6 +165,45 @@ Additional flags for build configuration can be looked up if needed by:
165
165
  cargo near build reproducible-wasm -h # replace `-h` with `--help` for more details
166
166
  ```
167
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
+
168
207
  ---
169
208
 
170
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.15.0"
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.15.0"
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.15.0",
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.15.0",
97
+ "version": "0.16.0",
98
98
  "volta": {
99
99
  "node": "18.14.1",
100
100
  "npm": "9.5.0"