| Crates.io | emscripten_rs_sys | 
| lib.rs | emscripten_rs_sys | 
| version | 0.1.3 | 
| created_at | 2025-09-13 14:24:51.835506+00 | 
| updated_at | 2025-09-15 20:14:05.183793+00 | 
| description | Bindgen-generated bindings to all public emscripten functions | 
| homepage | https://github.com/sutajo/emscripten-rs-sys | 
| repository | |
| max_upload_size | |
| id | 1837724 | 
| size | 203,519 | 
Low-level Rust FFI bindings to the Emscripten C API, generated using bindgen.
This crate provides raw, unsafe bindings to the C API of Emscripten, allowing Rust code to interface directly with the Emscripten runtime.
⚠️ The only supported target is wasm32-unknown-emscripten.
You must have the Emscripten SDK (emsdk) installed and activated on your system before building.
Follow the official installation instructions here: Emscripten SDK Installation Guide
After installing, ensure the emcc tool is on your PATH, because the create relies on it to locate the SDK.
Some APIs of Emscripten only work at runtime if they are explicitly enabled at link time.
See the settings Reference for all -s options.
Ways to set linker settings:
RUSTFLAGS='-C link-args=-sALLOW_MEMORY_GROWTH=1'println!("cargo:rustc-link-arg=-sALLOW_MEMORY_GROWTH=1");.cargo/config.toml with the rustflags field.EM_JS support for inline JS functions.js! {
    fn compute_sum(n: c_int) -> c_int,
    {
        let sum = 0;
        for(let i=1; i<n; i++)
        {
            sum += i;
        }
        return sum;
    }
}
fn test_sum() {
    assert_eq!(unsafe { compute_sum(100) }, 4950)
}