Skip to main contentCrate js2rust_bridge
Source - js2rust_bridge
- Function-like proc-macro:
js2rust_bridge!("js_src/main.js", host_fns...).
- BuildConfig
- Simplified build configuration for
build.rs.
Mirrors js2zig_core::ProjectConfig without exposing the full API. - HostConfig
- Host function configuration.
- HostFunction
- Host function description for FFI binding generation.
- HostType
- Host function type for FFI binding generation.
- build
- Transpile JS → Zig, build the Zig static library, and emit
cargo:rustc-link-*
directives for the linker. - link
- Fallback: scan
.js2zig-cache/ and emit link directives without running
transpilation or zig build. Used when the proc-macro already did the work.