Re:Supercharge Your Node.js with Rust
by gravypod on Sunday October 24, 2021 @01:58PM
(#28980353)
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
[ Parent
| on HN ]
That'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!