bmf icon indicating copy to clipboard operation
bmf copied to clipboard

feature: add web assembly support

Open ruiqurm opened this issue 4 months ago • 0 comments

Overview

In this pull request, I ported a limited bmf to web assembly, and successfully started it in the Chrome browser, although there are some share-memory issues with the register map. I finished this work

Toolchain selection: Emscripten was chosen as the primary toolchain to compile C/C++ code into WebAssembly. Emscripten offers a rich set of options, supporting the handling of complex dependency relationships and library linking issues.

Dependency handling: The BMF project relies on several external libraries, such as FFmpeg, x264, and x265. To resolve linking issues in the WASM environment, I adjusted the compilation options for these libraries, which are currently maintained in my personal repository.

Support modules: To support the features of the BMF module, I compiled libbuiltin_modules as a shared object (.so) and loaded it dynamically at runtime. Due to the mechanisms of WebAssembly, some shared memory issues have not yet been resolved.

Next steps

  • Fix the problem in supporting modules
  • Try to run an AI application, for example,stable diffusion.

ruiqurm avatar Sep 30 '24 09:09 ruiqurm