Skip to content
Snippets Groups Projects
Commit 9c36be18 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Use fixed relative paths. I believe this will work the way we load it, but if...

Use fixed relative paths. I believe this will work the way we load it, but if it does not we will leverage the global xxdk_base_path to set it explicitly
parent f8a1490e
No related branches found
No related tags found
1 merge request!141npm package config
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
// LICENSE file. // // LICENSE file. //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// NOTE: wasm_exec.js must always be in the same directory as this script.
importScripts('wasm_exec.js'); importScripts('wasm_exec.js');
// NOTE: This relative path must be preserved in distribution.
const binPath = '../wasm/xxdk-channelsIndexedDkWorker.wasm'
const isReady = new Promise((resolve) => { const isReady = new Promise((resolve) => {
self.onWasmInitialized = resolve; self.onWasmInitialized = resolve;
...@@ -16,7 +19,6 @@ go.argv = [ ...@@ -16,7 +19,6 @@ go.argv = [
'--logLevel=2', '--logLevel=2',
'--threadLogLevel=2', '--threadLogLevel=2',
] ]
const binPath = 'xxdk-channelsIndexedDkWorker.wasm'
WebAssembly.instantiateStreaming(fetch(binPath), go.importObject).then(async (result) => { WebAssembly.instantiateStreaming(fetch(binPath), go.importObject).then(async (result) => {
go.run(result.instance); go.run(result.instance);
await isReady; await isReady;
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
// LICENSE file. // // LICENSE file. //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// NOTE: wasm_exec.js must always be in the same directory as this script.
importScripts('wasm_exec.js'); importScripts('wasm_exec.js');
// NOTE: This relative path must be preserved in distribution.
const binPath = '../wasm/xxdk-dmIndexedDkWorker.wasm'
const isReady = new Promise((resolve) => { const isReady = new Promise((resolve) => {
self.onWasmInitialized = resolve; self.onWasmInitialized = resolve;
...@@ -16,7 +19,6 @@ go.argv = [ ...@@ -16,7 +19,6 @@ go.argv = [
'--logLevel=2', '--logLevel=2',
'--threadLogLevel=2', '--threadLogLevel=2',
] ]
const binPath = 'xxdk-dmIndexedDkWorker.wasm'
WebAssembly.instantiateStreaming(fetch(binPath), go.importObject).then(async (result) => { WebAssembly.instantiateStreaming(fetch(binPath), go.importObject).then(async (result) => {
go.run(result.instance); go.run(result.instance);
await isReady; await isReady;
......
...@@ -5,14 +5,16 @@ ...@@ -5,14 +5,16 @@
// LICENSE file. // // LICENSE file. //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// NOTE: wasm_exec.js must always be in the same directory as this script.
importScripts('wasm_exec.js'); importScripts('wasm_exec.js');
// NOTE: This relative path must be preserved in distribution.
const binPath = '../wasm/xxdk-logFileWorker.wasm'
const isReady = new Promise((resolve) => { const isReady = new Promise((resolve) => {
self.onWasmInitialized = resolve; self.onWasmInitialized = resolve;
}); });
const go = new Go(); const go = new Go();
const binPath = 'xxdk-logFileWorker.wasm'
WebAssembly.instantiateStreaming(fetch(binPath), go.importObject).then(async (result) => { WebAssembly.instantiateStreaming(fetch(binPath), go.importObject).then(async (result) => {
go.run(result.instance); go.run(result.instance);
await isReady; await isReady;
......
...@@ -5,7 +5,10 @@ ...@@ -5,7 +5,10 @@
// LICENSE file. // // LICENSE file. //
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// NOTE: wasm_exec.js must always be in the same directory as this script.
importScripts('wasm_exec.js'); importScripts('wasm_exec.js');
// NOTE: This relative path must be preserved in distribution.
const binPath = '../wasm/xxdk-stateIndexedDkWorker.wasm'
const isReady = new Promise((resolve) => { const isReady = new Promise((resolve) => {
self.onWasmInitialized = resolve; self.onWasmInitialized = resolve;
...@@ -16,7 +19,6 @@ go.argv = [ ...@@ -16,7 +19,6 @@ go.argv = [
'--logLevel=2', '--logLevel=2',
'--threadLogLevel=2', '--threadLogLevel=2',
] ]
const binPath = 'xxdk-stateIndexedDkWorker.wasm'
WebAssembly.instantiateStreaming(fetch(binPath), go.importObject).then(async (result) => { WebAssembly.instantiateStreaming(fetch(binPath), go.importObject).then(async (result) => {
go.run(result.instance); go.run(result.instance);
await isReady; await isReady;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment