Upgrade to Pro — share decks privately, control downloads, hide ads and more …

High-Speed Linux Application Execution in the B...

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
Avatar for Masashi Yoshimura Masashi Yoshimura
February 01, 2026
67

High-Speed Linux Application Execution in the Browser with Binary Translation

The presentation of elfconv at FOSDEM'26

Avatar for Masashi Yoshimura

Masashi Yoshimura

February 01, 2026

More Decks by Masashi Yoshimura

Transcript

  1. © NTT, Inc. 2026 High-Speed Linux Application Execution in the

    Browser with Binary Translation Masashi Yoshimura / NTT, Inc January 31, 2026
  2. 1 © NTT, Inc. 2026 1. Modern browsers are becoming

    increasingly powerful › Increasingly powerful execution environments › Used for games, 3D rendering, video, and LLMs 2. Can any program run? › No, it’s very difficult. » To ensure security and portability » Direct access to OS or device resources is restricted The Browser as a Computing Platform web-llm
  3. 2 © NTT, Inc. 2026 1. Run powerful native applications

    directly in the browser › e.g., postgres-wasm, ffmpeg.wasm, Libreoffice in the browser What if we could run any native app in the browser? Native–browser convergence combines native performance with web-level portability and security.
  4. 3 © NTT, Inc. 2026 1. v86 : x86 PC

    emulator and x86-to-wasm JIT, in the browser › repo : https://github.com/copy/v86 › can run several 32 bit x86 Oses (Linux, FreeBSD, etc.) in the browser › performance that is tens of times slower 2. container2wasm : Container to WASM converter › repo : https://github.com/container2wasm/container2wasm › can run 64bit Linux and Linux containers in the browser › performance that is tens of times slower Existing Projects Porting a CPU emulator results in significant performance degradation.
  5. 4 © NTT, Inc. 2026 Machine Code → LLVM IR

    https://github.com/lifting-bits/remill • elfconv : AOT binary translator of Linux apps → WebAssembly › repo : https://github.com/yomaytk/elfconv › Linux/ELF/AArch64 → Wasm is supported now elfconv Linux app LLVM bitcode Architecture overview Runtime (C++) memory management system calls API, etc. with
  6. 5 © NTT, Inc. 2026 Demo Introduction (GNU Bash +

    BusyBox + CPython in the browser) link: https://yomaytk.github.io/elfconv-demo/
  7. 6 © NTT, Inc. 2026 Benchmark Test Benchmark source (C)

    Benchmark source (C) Linux app Benchmark source (C) Linux app 1. 2. 3.
  8. 7 © NTT, Inc. 2026 Benchmark Test 4.2 2.0 59.5

    98.6 56.4 Higher is better Test 1. Prime Nums Test 2. mnist-NN Test 3. LINPACK 100 100 100 1.2
  9. 8 © NTT, Inc. 2026 • Linux system calls emulation

    must have been implemented › CPU-emulator–based projects can use the Linux kernel as-is. › Most difficult parts of elfconv • Many system calls are sufficient to call the library function of emscripten › e.g., openat, read, write, unlinkat, truncate, ... • Some system calls implementation is not trivial. › e.g., fork, execve, socket, ... Linux system calls emulation
  10. 9 © NTT, Inc. 2026 • Linux system calls emulation

    must have been implemented › CPU-emulator–based projects can use the Linux kernel as-is. › Most difficult parts of elfconv • Many system calls are sufficient to call the library function of emscripten › e.g., openat, read, write, unlinkat, truncate, ... • Some system calls implementation is not trivial. › e.g., fork, execve, socket, ... Linux system calls emulation
  11. 10 © NTT, Inc. 2026 Multi processes appA.wasm worker A1

    (appA.wasm + appA.js) Worker pool ... Browser Linux Apps appA appB appA.js appB.wasm appB.js File System /usr/bin/appA /usr/bin/appB ... System calls emulation process management js-kernel
  12. 11 © NTT, Inc. 2026 Multi processes appA.wasm worker A1

    (appA.wasm + appA.js) Worker pool ... Browser Linux Apps appA appB appA.js appB.wasm appB.js File System /usr/bin/appA /usr/bin/appB ... System calls emulation process management js-kernel worker A2 (appA.wasm + appA.js) process state fork
  13. 12 © NTT, Inc. 2026 Multi processes appA.wasm worker A1

    (appA.wasm + appA.js) Worker pool ... Browser Linux Apps appA appB appA.js appB.wasm appB.js File System /usr/bin/appA /usr/bin/appB ... System calls emulation process management js-kernel execve worker B1 (appB.wasm + appB.js) worker A2 (appA.wasm + appA.js)
  14. 13 © NTT, Inc. 2026 Multi processes appA.wasm worker A1

    (appA.wasm + appA.js) Worker pool ... Browser Linux Apps appA appB appA.js appB.wasm appB.js File System /usr/bin/appA /usr/bin/appB ... System calls emulation process management js-kernel worker B1 (appB.wasm + appB.js) worker A2 (appA.wasm + appA.js)
  15. 14 © NTT, Inc. 2026 1. Overall feature enhancement ›

    additional Linux syscall emulation › convert the Linux shared objects (.so) » only statically linked ELF binary is supported now › additional machine code conversion (especially x86-64) 1. Porting more tools › enhance python environment, porting CRuby, ... › Do you have any ideas? 😀 Future Work Any issues or PRs are welcome! Repo: https://github.com/yomaytk/elfconv
  16. 16 © NTT, Inc. 2026 What LLVM IR is generated?

    NPWY Y CY BEEY Y Y NPW! WYMPBE4UBUFY TUPSFWY4UBUFY C! DBMMGVOD@Y  BEE! WYMPBE4UBUFY WYMPBE4UBUFY WYBEEWY WY TUPSF WY4UBUFY 0x400200 0x400204 0x400208 VMA $164UBUF Machine Code (ARM64) LLVM IR by Remill struct State { SIMD simd; // 512 bytes GPR gpr; // 518 bytes uint64_t NZCV; ... }; library of Machine Code → LLVM IR