mirror of
https://github.com/OpenRTX/OpenRTX
synced 2026-08-08 12:29:06 -04:00
Adds a browser build of the Linux emulator, compiled to WebAssembly with Emscripten. It reuses the full firmware core, UI and DSP unchanged; only the platform edges are adapted, all guarded by #ifdef __EMSCRIPTEN__. Approach (Option A): the emulator's POSIX-thread + mutex/condvar/chan concurrency model is mapped onto Emscripten pthreads (Web Workers + shared memory) with -sPROXY_TO_PTHREAD, which runs main() on a worker so the existing blocking loops keep working while the browser main thread stays free for the event loop and SDL2 rendering. - meson.build: new `wasm` target, gated on the emscripten cross file so native and embedded builds are untouched. Uses Emscripten's bundled SDL2 and pthreads instead of the system libraries. - cross_wasm.txt: emcc/em++ toolchain description. - emulator.c: compile out the GNU readline CLI thread (no terminal in a browser); export emulator_command() to JS as a bridge into the same process_line() command grammar. - nvmem_linux.c: no $HOME/XDG in the browser, so persist radio state at /persist/state.bin in the Emscripten virtual filesystem. - platform/targets/wasm/shell.html: canvas + command-box page shell. - scripts/serve_wasm.py: dev server that sets the COOP/COEP headers required for SharedArrayBuffer (pthreads). - platform/targets/wasm/README.md: build/run instructions and known limits. Verified: native `meson setup` + `ninja openrtx_linux` still build cleanly; the gated wasm block was syntax-validated by forcing the gate and confirming the target registers with the correct sources. Not compiled with emcc (SDK not present in this environment). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| openocd | ||
| add_dc_offset.cpp | ||
| bin2sgl.py | ||
| c2tool.c | ||
| clang_format.sh | ||
| coverage.sh | ||
| cs7000_wrap.py | ||
| dfu-convert.py | ||
| gd-77_firmware_loader.py | ||
| generate_symbols.py | ||
| get_demod_log.c | ||
| nightly_build.sh | ||
| plot_m17_demod_csv.py | ||
| plot_m17_demod_csv2.py | ||
| serve_wasm.py | ||
| uf2conv.py | ||
| uf2families.json | ||