Skip to main content

build

Function build 

Source
pub fn build()
Expand description

Build: transpile JS → Zig, compile Zig static library, and emit linker directives.

Reads configuration from js2rust.toml in the crate root. Call this from your build.rs with zero arguments:

ⓘ
fn main() {
    js2rust_bridge::build();
}

The project name is derived automatically from the file stem of the first entry in project.js_files. Build behavior (force_rebuild, run_zig_build) is read from the [build] section of js2rust.toml.