#emscripten #bindings #api-bindings #sys

emscripten-functions-sys

Bindgen-generated bindings to emscripten system functions

6 stable releases

5.0.401 Feb 1, 2025
4.1.401 Jan 25, 2025
4.1.67 Sep 26, 2024
3.3.63 Jul 15, 2024
3.1.44 Aug 26, 2023

#589 in WebAssembly

Download history 6/week @ 2024-11-13 34/week @ 2024-11-20 142/week @ 2024-11-27 64/week @ 2024-12-04 50/week @ 2024-12-11 15/week @ 2024-12-18 40/week @ 2024-12-25 25/week @ 2025-01-01 26/week @ 2025-01-08 3/week @ 2025-01-15 115/week @ 2025-01-22 143/week @ 2025-01-29 15/week @ 2025-02-05 31/week @ 2025-02-12 27/week @ 2025-02-19 14/week @ 2025-02-26

100 downloads per month
Used in 2 crates (via emscripten-functions)

MIT license

2.5MB
8K SLoC

emscripten-functions-sys

crates.io badge

This crate contains bindgen-generated bindings for the system emscripten functions, as presented in their API reference. The following headers have bindings available:

  • emscripten
  • html5
  • console
  • websocket

A little description of the files in this project

The bindings are based on the emscripten headers from a compiled emscripten release, like the ones at https://storage.googleapis.com/webassembly/emscripten-releases-builds/, that are downloaded by emsdk.

The emscripten folder contains the headers taken from the emscripten release (currently at version 4.0.1).

The build_bindings.rs file that can be run with e.g. rust-script creates declarations for the emscripten functions using bindgen.

The build_bindings.sh script does the same thing, and requires the bindgen CLI, obtainable e.g. using cargo install bindgen-cli.

The update_emscripten.sh script updates the headers in the emscripten folder to the latest version from the official docker image. Set the DOCKER variable when running this script to specify a path to your docker. Otherwise docker, then podman will be tried.

The src folder already contains the generated bindings.

No runtime deps