Skip to content

Commit

Permalink
add extra download link for the interpreter files
Browse files Browse the repository at this point in the history
  • Loading branch information
LyonSyonII committed Sep 7, 2024
1 parent a49b347 commit 5d8a0ff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/interpreter/interpreter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export async function initInterpreter(
"-Zmiri-disable-isolation",
"-Zmiri-panic-on-unsupported",
(color && "--color=always") || "--color=never",

];

console.timeEnd("init");
Expand Down Expand Up @@ -154,9 +155,10 @@ class Stdio extends Fd {
}
}

async function load_external_file(path: string) {
async function load_external_file(path: string, alternate_path: string) {
return new File(
await cached_or_fetch(path)
.catch(() => cached_or_fetch(alternate_path))
.then((b) => b.blob())
.then((b) => b.arrayBuffer()),
);
Expand Down Expand Up @@ -236,6 +238,7 @@ async function buildSysroot(): Promise<PreopenDirectory> {
file,
await load_external_file(
`/wasm-rustc/lib/rustlib/x86_64-unknown-linux-gnu/lib/${file}`,
`https://github.com/LyonSyonII/rubri/releases/download/1.78-dev/${file}.gz`
).finally(() => postMessage({ downloaded: file })),
);
});
Expand Down

0 comments on commit 5d8a0ff

Please sign in to comment.