Skip to main content

Crate lingxia_native_codegen

Crate lingxia_native_codegen 

Source
Expand description

TypeScript code generation for #[lingxia::native] host handlers.

Scans Rust source files for #[lingxia::native("route")] / #[native("route")] function attributes and pub struct definitions, then generates a .ts module with typed invoke / stream / channel bindings.

Intended as a build-dependency so build.rs can produce the types during cargo build, before the lxapp is assembled.

Functionsยง

generate
Scan rust_dir (recursively) for #[lingxia::native] / #[native] handlers and struct definitions, then write a native client to out_path.
generate_native_client_from_paths
Compatibility entry point used by native build scripts.