WebAssembly and C++

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

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

    A proposal to introduce finer grained control of WebAssembly memory.

  • WASM is not designed to work around the shortcomings of C. The fact that nowadays the program crashes with a segmentation fault error after a null pointer dereference is only because modern operating systems are being nice to you.

    But a proper error handling can still be implemented into WASM. Maybe, the following proposal will add the option:

    https://github.com/WebAssembly/memory-control/blob/master/pr...

  • wajic

    WebAssembly JavaScript Interface Creator

  • There's now an interesting alternative to Emscripten called WaJIC:

    https://github.com/schellingb/wajic

    Enables most of the "Emscripten magic" (like embedding Javascript code into C/C++ files), but in a more bare bones package (apart from clang it essentially just uses the wasm-opt tool from Binaryen for post-processing).

    (to be clear, wajic has fewer out-of-the-box features than Emscripten, but it might be an alternative for very small projects which don't need all the compatibility shims which are coming with Emscripten, while still providing tools for calling between C/C++ and JS.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • asm-dom

    A minimal WebAssembly virtual DOM to build C++ SPA (Single page applications)

  • FWIW if you look around, C++ and Rust libraries for DOM manipulation exist (I haven't searched for other languages which compile to WASM):

    https://github.com/mbasso/asm-dom

    https://github.com/sycamore-rs/sycamore

    I think solving the problem of DOM access on the library level is exactly the right way to tackle this problem. The library user don't need to care about specific WASM features, and the library implementation can be simplified when those WASM features become available (and also implement per-browser fallback paths)

  • sycamore

    A library for creating reactive web apps in Rust and WebAssembly

  • FWIW if you look around, C++ and Rust libraries for DOM manipulation exist (I haven't searched for other languages which compile to WASM):

    https://github.com/mbasso/asm-dom

    https://github.com/sycamore-rs/sycamore

    I think solving the problem of DOM access on the library level is exactly the right way to tackle this problem. The library user don't need to care about specific WASM features, and the library implementation can be simplified when those WASM features become available (and also implement per-browser fallback paths)

  • multi-memory

    Multiple per-module memories for Wasm

  • It's not segmented, so no... or rather, not yet.

    The wasm spec already accommodates to some extent the notion of multiple "memories" (i.e. distinct flat heaps), although it only allows for one in practice:

    https://webassembly.github.io/spec/core/syntax/modules.html#...

    And there's an active proposal to allow for multiple memories:

    https://github.com/WebAssembly/multi-memory/blob/main/propos...

    In an environment like that, you'd need full-fledged pointers to carry both the memory index and the offset; and then you might want a non-fat "pointer to same memory" alternative for perf. Might as well call them far and near.

  • 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
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