We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e371ec commit d7bda26Copy full SHA for d7bda26
packages/npm-packages/ruby-wasm-wasi/src/browser.script.ts
@@ -1,11 +1,10 @@
1
import { DefaultRubyVM } from "./browser";
2
3
export const main = async (pkg: { name: string; version: string }) => {
4
- const response = await fetch(
+ const response = fetch(
5
`https://cdn.jsdelivr.net/npm/${pkg.name}@${pkg.version}/dist/ruby+stdlib.wasm`,
6
);
7
- const buffer = await response.arrayBuffer();
8
- const module = await WebAssembly.compile(buffer);
+ const module = await WebAssembly.compileStreaming(response);
9
const { vm } = await DefaultRubyVM(module);
10
11
vm.printVersion();
0 commit comments