Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions website/src/components/playground/vm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ export async function bootPlayground(
onProgress: (p: Progress) => void,
signal: AbortSignal,
): Promise<Booted> {
// Load the VM runtime first: it rejects with `unsupported-browser` where
// the VM can't run, before a couple hundred MB of downloads.
const { Arm64JS } = await import('arm64js');
await Arm64JS.mode();

// --- download, one asset at a time ---------------------------------------
const names = [release.binary, ...release.plugins.flatMap((p) => [p.manifest, p.lib])];
const total = names.reduce((n, name) => n + (release.sizes[name] ?? 0), 0);
Expand Down
Loading