[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-wallet-webex] 01/05: load wasm manually from correct
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-wallet-webex] 01/05: load wasm manually from correct location |
Date: |
Fri, 16 Aug 2019 15:04:02 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository wallet-webex.
commit 0cab39f2b6e84a16467bf535150e1700a2fcf566
Author: Florian Dold <address@hidden>
AuthorDate: Thu Aug 15 23:59:42 2019 +0200
load wasm manually from correct location
---
package.json | 2 +-
src/crypto/synchronousWorker.ts | 11 ++++++++++-
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/package.json b/package.json
index d72316e7..4068c5ef 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "taler-wallet",
- "version": "0.0.2",
+ "version": "0.0.3",
"description": "",
"main": "dist/node/index.js",
"repository": {
diff --git a/src/crypto/synchronousWorker.ts b/src/crypto/synchronousWorker.ts
index d8a3d83c..4d1ff964 100644
--- a/src/crypto/synchronousWorker.ts
+++ b/src/crypto/synchronousWorker.ts
@@ -17,6 +17,8 @@
import { EmscEnvironment } from "./emscInterface";
import { CryptoImplementation } from "./cryptoImplementation";
+import fs = require("fs");
+
/**
* Worker implementation that uses node subprocesses.
*/
@@ -95,7 +97,12 @@ export class SynchronousCryptoWorker {
);
}
+ const binaryPath = __dirname +
"/../../../emscripten/taler-emscripten-lib.wasm";
+ console.log("reading from", binaryPath);
+ const wasmBinary = new Uint8Array(fs.readFileSync(binaryPath));
+
this.cachedEmscEnvironmentPromise = new Promise((resolve, reject) => {
+ lib.wasmBinary = wasmBinary;
lib.onRuntimeInitialized = () => {
this.cachedEmscEnvironmentPromise = undefined;
this.cachedEmscEnvironment = new EmscEnvironment(lib);
@@ -150,7 +157,9 @@ export class SynchronousCryptoWorker {
return;
}
- this.handleRequest(operation, id, args);
+ this.handleRequest(operation, id, args).catch((e) => {
+ console.error("Error while handling crypto request:", e);
+ });
}
/**
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [GNUnet-SVN] [taler-wallet-webex] branch master updated (ea2fb677 -> a1e0fc3b), gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 01/05: load wasm manually from correct location,
gnunet <=
- [GNUnet-SVN] [taler-wallet-webex] 04/05: load wasm binary for akono, gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 03/05: emscripten env consistency, gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 02/05: oops, actually pass arguments to emscripten, gnunet, 2019/08/16
- [GNUnet-SVN] [taler-wallet-webex] 05/05: crypto worker refactoring, gnunet, 2019/08/16