On 7/10/17 5:29 AM, Nicholas Nethercote wrote:
- Interop with existing components can be difficult. IPDL codegen rust bindings could be a big help.
Rust's C++ interop story is absolutely atrocious. The FFI basically runs on C ABI, even though Rust and C++ have some similar concepts that could be exposed more cleanly (e.g., this parameters, even mapping &str or &[T] to appropriate semantics) without forcing such a step. Bindgen works a little, but really only for calling C++ from Rust, and only if the C++ code is simple enough--if the code includes headers of complexity doom (hi, std::string!), it really ends up being a game of "how can I force bindgen to ignore enough that I get access to what I need."
XPIDL and WebIDL express only a subset of functionality, so they're theoretically easier to support than "generic C++17." However, XPIDL is profoundly unnatural in C++ code (the array syntax is horrendous, particularly if you want to start passing string arrays), as well as being limited in some of its vocabulary. WebIDL is more generic, but the bindings produces source code, which means that the ABI isn't exactly standardized for easy cross-language calling.
-- Joshua Cranmer Thunderbird and DXR developer Source code archæologist _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform