Closed izznatsir closed 1 year ago
Thanks for your support! I have yet to get to the part of the spec where I consider interoperability with external modules. You're definitely right in that there is massive value from being able to consume crates from Rust as there is a massive ecosystem there.
I will look into Node's native API and gain a better understanding of what that would look like syntactically. Leaning on a Rust crate might be a good way to introduce the first http server library to the project.
napi-rs
recently introduced the #[napi]
macro that automatically generates Rust bindings for JS.
I think this is the best approach for interop. If BS could interop with C-style libs, then its just a matter of building a Rust as a C shared lib.
This idea is really cool! Thanks for your work on it.
It will be great if TypescriptBC have some kind of rust interoperability through something like NodeJS native api. So, we could use the wide ecosystem of Rust libraries when we need to.
Maybe it also be possible to expose rust crate directly as TypscriptBC module but I imagine it will be really hard. So, something like NodeJS native api will suffice.