I’ve been looking into this space recently while exploring ESP32 emulation.
I came across this repo: https://github.com/lcgamboa/qemu/
which is quite interesting, but it’s not really a JavaScript/browser-based simulation. It relies on QEMU and actual hardware emulation rather than running in a JS/WebAssembly environment.
From what I can tell, it handles the Xtensa architecture at a much lower level, which makes sense for accuracy, but also makes it harder to bring into the browser.
It made me wonder whether a higher-level approach (similar to how AVR emulators work in JS) could be viable for ESP32, or if the complexity of peripherals (WiFi, BLE, etc.) makes that impractical.
Curious if anyone has explored alternative approaches here.
Has anyone explored this or knows of existing approaches/tools?
noahnathan25•1h ago
The main issue is that ESP32 uses the Xtensa architecture, which is significantly more complex than something like an ATmega328
michael_pica•1h ago
Is there a reason for Javascript Specifically? My team has recently been using https://renode.io/ for this kind of task and it's working exceptionally well. Though they don't yet support ESP32, depending on your needs/goals working with them to get ESP32 support may be the most effective path.
dmonterocrespo•1h ago
Thanks, I didn’t know about Renode.I’ll definitely take a look.
The reason I’m specifically exploring JavaScript is because of a project I’m working on (velxio.dev), where everything runs in the browser, so having a JS/WASM-based approach would make integration much simpler
Right now I’m experimenting with a QEMU based setup and exposing it through WebSockets, but the performance isn’t great and the emulation tends to be unstable (I’ve been hitting crashes under certain workloads).
That’s partly why I’m looking into alternative approaches , either pushing more into the browser, or finding a more robust backend model.
dmonterocrespo•1h ago
I came across this repo: https://github.com/lcgamboa/qemu/ which is quite interesting, but it’s not really a JavaScript/browser-based simulation. It relies on QEMU and actual hardware emulation rather than running in a JS/WebAssembly environment.
From what I can tell, it handles the Xtensa architecture at a much lower level, which makes sense for accuracy, but also makes it harder to bring into the browser.
It made me wonder whether a higher-level approach (similar to how AVR emulators work in JS) could be viable for ESP32, or if the complexity of peripherals (WiFi, BLE, etc.) makes that impractical.
Curious if anyone has explored alternative approaches here.
Has anyone explored this or knows of existing approaches/tools?
noahnathan25•1h ago
michael_pica•1h ago
dmonterocrespo•1h ago
The reason I’m specifically exploring JavaScript is because of a project I’m working on (velxio.dev), where everything runs in the browser, so having a JS/WASM-based approach would make integration much simpler
Right now I’m experimenting with a QEMU based setup and exposing it through WebSockets, but the performance isn’t great and the emulation tends to be unstable (I’ve been hitting crashes under certain workloads).
That’s partly why I’m looking into alternative approaches , either pushing more into the browser, or finding a more robust backend model.
Appreciate the suggestion!