Despite intellij-rust is reporting an error that something something has no body, the code does compile and does expose the properties well. However when you consider that local_addr function you can clearly see its limitation: there is no Result into support, nor does it works with async well. I don't think this is a trivial task, and hand-writing some of the bindings are fine to me, but this would be a huge improvement in quality of life and experience.
I'm trying to expose Tokio and some std stuff into QJS context. I did it like this:
Despite intellij-rust is reporting an error that something something has no body, the code does compile and does expose the properties well. However when you consider that
local_addr
function you can clearly see its limitation: there is no Result into support, nor does it works with async well. I don't think this is a trivial task, and hand-writing some of the bindings are fine to me, but this would be a huge improvement in quality of life and experience.Useful projects:
Kobzol/rust-delegate: Rust method delegation with less boilerplate (github.com)
upsuper/delegate-attr: Attribute proc-macro to delegate method to a field (github.com)
hobofan/ambassador: Delegation of trait implementations via procedural macros (github.com)