What are the chances to bake actor model into compiler?

This has been a design goal of rust since pre-1.0!

Rust doesn't employ an actor-specific pattern, but as @cuviper stated, it does guarantee no data races. It uses Send and Sync marker traits to do this, and ensures all multithreaded rust programs, including actor-based ones and non-actor-based ones are free from data races.

See How Rust Achieves Thread Safety - In Pursuit of Laziness for more information on how this works, and Races - The Rustonomicon for the technical description (rust doesn't prevent race conditions, only data races).


Regardless of that, it seems like this could be applicable to actor systems implemented in rust (possibly manipulating generics with Send and Sync to implement entirely as a library). I haven't read through the whole paper, but I'm looking forward to doing that in time - thanks for linking it here!

2 Likes