3 ms·
They have a different runtime model (and therefore present a different concurrency/parallelism API). Rust (usually) compiles to a single standalone binary, tha
by rkangel 6y ago
They have a different runtime model (and therefore present a different concurrency/parallelism API).
Rust (usually) compiles to a single standalone binary, that includes any runtime needed. Concurrency is now usually provided via sync with something like Tokio underneath. You can absolutely do actor programming (see Riker and Actix), but it's not the primary way Rust is intended to be used, and it doesn't offer the same set of management capabilities that the BEAM does
Erlang/Elixir/Gleam run on the BEAM. This is a standalone runtime (VM) that then executes code. Deployment involves a lot more pieces, but once done you get a lot more tooling built in (e.g. the observer to see what actors are running). It is designed from the ground up for actor model concurrency, and concepts like supervisor trees have been proven to be best-in-class for managing code running over long periods of time and handling errors in a self-healing way. Plus the separate VM means you can do things like zero-downtime update ("hot code loading").