top | item 46923825

We interfaced single-threaded C++ with multi-threaded Rust

107 points| lukastyrychtr | 24 days ago |antithesis.com

11 comments

order

pjmlp|18 days ago

It would be more interesting if it was on how to combine C++20 co-routines with Rust async-await models.

Combining single-threaded C++ with multi-threaded languages has been a thing for quite some time.

rockwotj|18 days ago

I have done this integrating wasmtime into a a C++ seastar.io application. I’ll have to write a post about it

foota|18 days ago

Wow, I wouldn't have thought that it would be possible to do this (at least, not ergonomically, although now that you mention it I guess I don't see why not). That would be amazing to see.

mchlgibs|18 days ago

I'm the author.

Thanks for the interest; I've never had a post on Hacker News before.

I'm happy to answer any questions.

chris_money202|18 days ago

Pretty sure I’ve done similar, combined a Rust multi-threaded emulator with single threaded SystemC simulation

yuryk|18 days ago

Seems like objc2 crate uses same approach (MainThreadMarker).