Web Assembly(WASM)+Conda:在浏览器中革新科学计算

  • QuantStack / prefix.dev collaboration: Revamped emscripten-forge, a custom WebAssembly package distribution.

    • The Big Picture: Aim is to run complex scientific comps or data anlys directly in web browser without server-side processing.
    • What is WASM & Emscripten: WASM is a fast, secure, portable bytecode format for web browsers. Emscripten compiles C/C++ to WASM.
    • The Emscripten-Forge Project: Focus on foundational libraries like compression, XML parsers, graphics, and interpreters.
    • Why Not Just Use Pyodide: Differentiates by being language agnostic and integrating with conda-forge.
  • Recent Upgrades: Streamlined processes for building, setting up compilation environment, and using WASM packages.

    • Building WASM Packages: Moved to rattler-build in Rust, which natively supports emscripten-wasm32 and wasi-wasm32, distinguishes build and run deps, and uses a cleaner recipe format.
    • Setting Up the WASM Compilation Environment: Adopted pixi and pixi tasks for easy setup, simplified compilation, and efficient caching.
    • Using the WASM Packages: Created JupyterLite instances with pre-bundled WASM packages, using pixi.toml to define environments.
    • Deploy on Github pages: Prepared an example for deploying JupyterLite instance.
  • The Road Ahead: Shows potential in computer science education and aims to collaborate with other ecosystems.
  • Get Involved: Welcome contributions in porting libraries, improving build processes, and creating examples.
  • Resources and Further Reading: Links to relevant Github repos, websites, documentation, etc. for emscripten-forge, pixi, and rattler-build.
阅读 14
0 条评论