#emscripten #bindings #api-bindings #sys

emscripten-functions-sys

Bindgen-generated bindings to emscripten system functions

4 stable releases

4.1.67 Sep 26, 2024
3.3.63 Jul 15, 2024
3.2.46 Oct 2, 2023
3.1.44 Aug 26, 2023

#664 in WebAssembly

Download history 17/week @ 2024-09-14 179/week @ 2024-09-21 53/week @ 2024-09-28 7/week @ 2024-10-05 22/week @ 2024-10-12 19/week @ 2024-10-19 11/week @ 2024-10-26 12/week @ 2024-11-02 2/week @ 2024-11-09 13/week @ 2024-11-16 72/week @ 2024-11-23 145/week @ 2024-11-30

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

MIT license

3MB
4.5K 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

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 3.1.63).

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.rs 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