D in the KDAB blog: using D as a glue language between C++ and Rust
Dukc
ajieskola at gmail.com
Fri Dec 8 09:21:33 UTC 2023
On Thursday, 7 December 2023 at 19:10:32 UTC, Chris J wrote:
> Today, I stumbled on a blog post where someone used D as a glue
> language between C++ and Rust, by using the C++ linkage
> functionality to call C++ code and the ability to manually
> override the name mangling using `pragma(mangle, "…")` to call
> Rust code.
>
> https://www.kdab.com/mixing-c-and-rust-for-fun-and-profit-part-1/
Wow, doesn't Rust have a name mangling override pragma to do this
in itself? Honestly I think any language would do well to ad that.
Of course, even if it'd have it D would still be superior in this
regard thanks to `extern(C++)` and ability to use CTFE for the
mangled names.
More information about the Digitalmars-d
mailing list