Skip to main content

Crate js2rust_bridge

Crate js2rust_bridge 

Source

Modules§

native_regex
Host functions for RegExp support via fancy-regex.
sdk
Safe SDK for writing host functions.

Macros§

js2rust_bridge
Function-like proc-macro: js2rust_bridge!().

Structs§

HostConfig
Host function configuration.
HostFnToml
A single [[host_functions]] entry.
HostFunction
Host function description for FFI binding generation.
Js2rustConfig
Root structure of js2rust.toml.
ProjectSection
[project] section.

Enums§

HostType
Host function type for FFI binding generation.

Functions§

build
Build: transpile JS → Zig, compile Zig static library, and emit linker directives.
link
Fallback: scan .js2zig-cache/ and emit link directives without running transpilation or zig build. Used when the proc-macro already did the work.

Attribute Macros§

host_fn
#[host_fn] attribute macro — eliminates unsafe C ABI plumbing from host functions.