-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to bundler target for wasm-pack for manifest v3
- Loading branch information
Showing
7 changed files
with
40 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import init, { NodeClient } from "lumina-node-wasm" | ||
import { NodeClient } from "lumina-node-wasm" | ||
|
||
/** | ||
* Spawn a worker running lumina node and get the `NodeClient` connected to it. | ||
*/ | ||
export async function spawnNode() { | ||
await init(); | ||
let worker = new Worker(new URL("worker.js", import.meta.url)); | ||
let client = await new NodeClient(worker); | ||
return client; | ||
} | ||
|
||
export * from "lumina-node-wasm"; | ||
export default init; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
import init, { NodeWorker, NodeClient } from "lumina-node-wasm" | ||
import { NodeWorker, NodeClient } from "lumina-node-wasm" | ||
|
||
Error.stackTraceLimit = 99; | ||
|
||
init().then(async () => { | ||
let worker = new NodeWorker(self); | ||
console.log("starting worker: ", worker); | ||
let worker = new NodeWorker(self); | ||
console.log("starting worker: ", worker); | ||
|
||
await worker.run(); | ||
}); | ||
worker.run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters