Extending web applications with WebAssembly and Python

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • webassembly-language-runtimes

    Wasm Language Runtimes provides popular language runtimes (Ruby, Python, …) precompiled to WebAssembly that are tested for compatibility and kept up to date when new versions of upstream languages are released

  • The Python builds from the WebAssembly language runtimes [0] project target the WebAssembly System Interfaces (WASI) [1]. It allows the Python interpreter to interact with resources like the filesystem.

    Many server-side Wasm runtimes supports WASI out of the box. For the browser, you need to provide a polyfill to emulate these resources like the one provided by the WASI team [2].

    Regarding SQLite, these builds include libsqlite so you should be able to use it :)

    - [0] https://github.com/vmware-labs/webassembly-language-runtimes

    - [1] https://wasi.dev/

    - [2] https://wasi.dev/polyfill/

  • browser_wasi_shim

    A WASI shim for in the browser

  • The webassembly-language-runtimes is focused on providing WASI-based language interpreters, what would require a WASI polyfill at the browser level (https://wasi.dev/polyfill/) and (https://github.com/bjorn3/browser_wasi_shim).

    Pyodide is certainly another option, but is emscripten based, not based in webassembly-language-runtimes or WASI.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • wasi-libc

    WASI libc implementation for WebAssembly

  • The Python builds from the WebAssembly language runtimes [0] project target the WebAssembly System Interfaces (WASI) [1]. It allows the Python interpreter to interact with resources like the filesystem.

    Many server-side Wasm runtimes supports WASI out of the box. For the browser, you need to provide a polyfill to emulate these resources like the one provided by the WASI team [2].

    Regarding SQLite, these builds include libsqlite so you should be able to use it :)

    - [0] https://github.com/vmware-labs/webassembly-language-runtimes

    - [1] https://wasi.dev/

    - [2] https://wasi.dev/polyfill/

  • Nuitka

    Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.

  • > Your comment would make sense if Python code could be compiled into x86 or ARM assembly in the first place.

    It can actually be compiled (or transpiled) into C code [1] with few limitations, so I can't see why not.

    [1] https://github.com/Nuitka/Nuitka

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts