Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Added ability to run settrace/ulab variants
  • Loading branch information
WebReflection committed Mar 3, 2026
commit 5324a9b77e7f18d2edf6c4e4b29dcfded8914fb8
2 changes: 1 addition & 1 deletion docs/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/index.js.map

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions esm/interpreter/micropython.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,19 @@ export default {
stderr: buffered(console.error),
stdout: buffered(console.log),
});

// ordered extra variants: settrace, settrace-ulab, ulab
const variants = [];
if (config.debug) variants.push('settrace');
if (config.packages?.includes('ulab')) {
config.packages.splice(config.packages.indexOf('ulab'), 1);
variants.push('ulab');
}

url = url.replace(/\.m?js$/, '.wasm');
for (const variant of variants)
url = url.replace(/\.wasm$/, `-${variant}.wasm`);

progress('Loading MicroPython');
const interpreter = await get(loadMicroPython({ linebuffer: false, stderr, stdout, url }));
globalThis[js_modules].set('-T-', this.transform.bind(this, interpreter));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,6 @@
"to-json-callback": "^0.1.1"
},
"worker": {
"blob": "sha256-wV2VvqA0udjI0o18pxqLaV8Msd4TO1+sLwVPI/cTD+s="
"blob": "sha256-LHTqIXWndhVNsTliZi+xurqDIM2W1he56dcQmAicAQc="
}
}