2 ms·
Is there a way to generate automatic bindings for rust/js code from the AST of the language and a list of definitions to specify? I'm imaging how powerful a Baz
by gravypod 5y ago
Is there a way to generate automatic bindings for rust/js code from the AST of the language and a list of definitions to specify? I'm imaging how powerful a Bazel ruleset for this could be. Something like
js_rust_library(... defs = ["someFunction"] ...)
- dherman 5y agoThat's a cool idea! The closest thing today is probably neon-serde, a cool community library that lets you generate bindings from lightweight Rust annotations: https://docs.rs/neon-serde2/0.8.0/neon_serde2/ Another thing I'd love to explore is using TypeScript declarations (e.g. from a .d.ts file) to auto-generate bindings. If you're interested in playing with any of these ideas feel free to hop onto our community Slack and chat!