@noir-lang/noir_wasm 0.26.0 → 0.27.0-0adeb08.nightly

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/README.md CHANGED
@@ -26,17 +26,3 @@ for (const path of files) {
26
26
  }
27
27
  const myCompiledCode = await compile(fm);
28
28
  ```
29
-
30
- ## Building from source
31
-
32
- Outside of the [noir repo](https://github.com/noir-lang/noir), this package can be built using the command below:
33
-
34
- ```bash
35
- nix build -L github:noir-lang/noir/master#noir_wasm
36
- ```
37
-
38
- If you are within the noir repo and would like to build local changes, you can use:
39
-
40
- ```bash
41
- nix build -L #noir_wasm
42
- ```
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "The Noir Team <team@noir-lang.org>"
5
5
  ],
6
- "version": "0.26.0",
6
+ "version": "0.27.0",
7
7
  "license": "MIT OR Apache-2.0",
8
8
  "files": [
9
9
  "index_bg.wasm",
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "The Noir Team <team@noir-lang.org>"
5
5
  ],
6
- "version": "0.26.0",
6
+ "version": "0.27.0",
7
7
  "license": "MIT OR Apache-2.0",
8
8
  "files": [
9
9
  "index_bg.wasm",
Binary file
package/dist/node/main.js CHANGED
@@ -191,22 +191,6 @@ function debugString(val) {
191
191
  // TODO we could test for more things here, like `Set`s and `Map`s.
192
192
  return className;
193
193
  }
194
- /**
195
- * @param {string} level
196
- */
197
- module.exports.init_log_level = function(level) {
198
- const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
199
- const len0 = WASM_VECTOR_LEN;
200
- wasm.init_log_level(ptr0, len0);
201
- };
202
-
203
- /**
204
- * @returns {any}
205
- */
206
- module.exports.build_info = function() {
207
- const ret = wasm.build_info();
208
- return takeObject(ret);
209
- };
210
194
 
211
195
  function _assertClass(instance, klass) {
212
196
  if (!(instance instanceof klass)) {
@@ -270,6 +254,23 @@ module.exports.compile_contract_ = function(entry_point, dependency_graph, file_
270
254
  }
271
255
  };
272
256
 
257
+ /**
258
+ * @param {string} level
259
+ */
260
+ module.exports.init_log_level = function(level) {
261
+ const ptr0 = passStringToWasm0(level, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
262
+ const len0 = WASM_VECTOR_LEN;
263
+ wasm.init_log_level(ptr0, len0);
264
+ };
265
+
266
+ /**
267
+ * @returns {any}
268
+ */
269
+ module.exports.build_info = function() {
270
+ const ret = wasm.build_info();
271
+ return takeObject(ret);
272
+ };
273
+
273
274
  /**
274
275
  * @param {string} entry_point
275
276
  * @param {DependencyGraph | undefined} dependency_graph
@@ -522,7 +523,7 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
522
523
  takeObject(arg0);
523
524
  };
524
525
 
525
- module.exports.__wbg_constructor_dc2096d1a846456a = function(arg0) {
526
+ module.exports.__wbg_constructor_d324422a76f57e97 = function(arg0) {
526
527
  const ret = new Error(takeObject(arg0));
527
528
  return addHeapObject(ret);
528
529
  };
@@ -532,7 +533,7 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
532
533
  return ret;
533
534
  };
534
535
 
535
- module.exports.__wbg_constructor_16652445ed5bfc27 = function() {
536
+ module.exports.__wbg_constructor_5ba06a405a88a2ec = function() {
536
537
  const ret = new Object();
537
538
  return addHeapObject(ret);
538
539
  };
@@ -608,6 +609,16 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) {
608
609
  getInt32Memory0()[arg0 / 4 + 0] = ptr1;
609
610
  };
610
611
 
612
+ module.exports.__wbg_getTime_40bd09e020e8bc8c = function(arg0) {
613
+ const ret = getObject(arg0).getTime();
614
+ return ret;
615
+ };
616
+
617
+ module.exports.__wbg_new0_494c19a27871d56f = function() {
618
+ const ret = new Date();
619
+ return addHeapObject(ret);
620
+ };
621
+
611
622
  module.exports.__wbg_parse_76a8a18ca3f8730b = function() { return handleError(function (arg0, arg1) {
612
623
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
613
624
  return addHeapObject(ret);
@@ -10860,9 +10871,11 @@ const package_1 = __webpack_require__(/*! ../package */ "./src/noir/package.ts")
10860
10871
  */
10861
10872
  class GithubDependencyResolver {
10862
10873
  #fm;
10874
+ #fetch;
10863
10875
  #log;
10864
- constructor(fm) {
10876
+ constructor(fm, fetcher) {
10865
10877
  this.#fm = fm;
10878
+ this.#fetch = fetcher;
10866
10879
  this.#log = (msg, _data) => {
10867
10880
  console.log(msg);
10868
10881
  };
@@ -10897,7 +10910,7 @@ class GithubDependencyResolver {
10897
10910
  this.#log('using cached archive', { url: url.href, path: localArchivePath });
10898
10911
  return localArchivePath;
10899
10912
  }
10900
- const response = await fetch(url, {
10913
+ const response = await this.#fetch(url, {
10901
10914
  method: 'GET',
10902
10915
  });
10903
10916
  if (!response.ok || !response.body) {
@@ -11238,7 +11251,8 @@ class NoirWasmCompiler {
11238
11251
  const noirPackage = await package_1.Package.open(projectPath, fileManager);
11239
11252
  const dependencyManager = new dependency_manager_1.DependencyManager([
11240
11253
  new local_dependency_resolver_1.LocalDependencyResolver(fileManager),
11241
- new github_dependency_resolver_1.GithubDependencyResolver(fileManager),
11254
+ // use node's global fetch
11255
+ new github_dependency_resolver_1.GithubDependencyResolver(fileManager, fetch),
11242
11256
  // TODO support actual Git repositories
11243
11257
  ], noirPackage);
11244
11258
  return new NoirWasmCompiler(noirPackage, dependencyManager, fileManager, wasmCompiler, sourceMap, opts);