Skip to content
Snippets Groups Projects
Commit 0fc664d5 authored by Jake Taylor's avatar Jake Taylor :lips:
Browse files

added missing files for worker

parent a0f25407
No related branches found
No related tags found
1 merge request!115added states table for large client storage
......@@ -32,6 +32,7 @@ binary:
worker_binaries:
GOOS=js GOARCH=wasm go build -ldflags '-w -s' -trimpath -o xxdk-channelsIndexedDkWorker.wasm ./indexedDb/impl/channels/...
GOOS=js GOARCH=wasm go build -ldflags '-w -s' -trimpath -o xxdk-dmIndexedDkWorker.wasm ./indexedDb/impl/dm/...
GOOS=js GOARCH=wasm go build -ldflags '-w -s' -trimpath -o xxdk-stateIndexedDkWorker.wasm ./indexedDb/impl/state/...
GOOS=js GOARCH=wasm go build -ldflags '-w -s' -trimpath -o xxdk-logFileWorker.wasm ./logging/workerThread/...
binaries: binary worker_binaries
......
////////////////////////////////////////////////////////////////////////////////
// Copyright © 2022 xx foundation //
// //
// Use of this source code is governed by a license that can be found in the //
// LICENSE file. //
////////////////////////////////////////////////////////////////////////////////
importScripts('wasm_exec.js');
const isReady = new Promise((resolve) => {
self.onWasmInitialized = resolve;
});
const go = new Go();
const binPath = 'xxdk-stateIndexedDkWorker.wasm'
WebAssembly.instantiateStreaming(fetch(binPath), go.importObject).then(async (result) => {
go.run(result.instance);
await isReady;
}).catch((err) => {
console.error(err);
});
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment