Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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"] ...)


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!




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: