-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move wasm instantiation to a web worker (#15)
* feat: moved wasm instantiation to a web worker * feat: web worker is working
- Loading branch information
1 parent
739fe15
commit 2185071
Showing
14 changed files
with
625 additions
and
173 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@fedimint/core-web': patch | ||
--- | ||
|
||
Moved wasm instantiation off the main thread and onto a web worker |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@fedimint/core-web': patch | ||
--- | ||
|
||
Fixed types of new RPCs |
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
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,29 +1,40 @@ | ||
/** @type {import('rollup').RollupOptions} */ | ||
import typescript from '@rollup/plugin-typescript' | ||
import { wasm } from '@rollup/plugin-wasm' | ||
import { importMetaAssets } from '@web/rollup-plugin-import-meta-assets' | ||
import terser from '@rollup/plugin-terser' | ||
|
||
export default { | ||
input: { | ||
index: 'src/index.ts', | ||
export default [ | ||
{ | ||
input: { worker: 'src/wasm.worker.js' }, | ||
output: [ | ||
{ | ||
dir: 'dist', | ||
format: 'es', | ||
sourcemap: true, | ||
}, | ||
], | ||
plugins: [ | ||
wasm({ | ||
maxFileSize: 0, | ||
}), | ||
terser(), | ||
], | ||
}, | ||
output: [ | ||
{ | ||
dir: 'dist', | ||
format: 'esm', | ||
sourcemap: true, | ||
}, | ||
], | ||
plugins: [ | ||
typescript({ | ||
sourceMap: true, | ||
inlineSources: true, | ||
}), | ||
wasm({ | ||
maxFileSize: 0, | ||
}), | ||
importMetaAssets(), | ||
terser(), | ||
], | ||
} | ||
{ | ||
input: { index: 'src/index.ts' }, | ||
output: [ | ||
{ | ||
dir: 'dist', | ||
format: 'es', | ||
sourcemap: true, | ||
}, | ||
], | ||
plugins: [ | ||
typescript({ | ||
sourceMap: true, | ||
inlineSources: true, | ||
}), | ||
terser(), | ||
], | ||
}, | ||
] |
Oops, something went wrong.