News for hackers. Stuff that matters.
Re:The Piston image library is now pure Rust by bsaul on Sunday January 08, 2017 @10:08AM (#13349938)
My point is that i wished rust made the choice to favor actor style concurrency officially. Which means autonomous entities communicating by message passing, having a single "run loop" ( thread, coroutine whatever), and encapsulating a state.

I mentionned async io but i should have added "+ event loop", because they can be used for different things indeed.

Now maybe the rust team could officialy endorse one programming model for the server side, but keep the language itself agnostic, so that other people could try and do different things in the future. But i don't think leaving it all to the community to decide is good for the very beginning. You need everyone to go in the same direction because there isn't enough talented people to run multiple races at the same time ( but honestly i don't have that,much experience running communities, so it's just my feeling).

Re:The Piston image library is now pure Rust by ekidd on Sunday January 08, 2017 @10:23AM (#13350015)
> My point is that i wished rust made the choice to favor actor style concurrency officially.

I think you're asking Rust to be a high-level language like Erlang or Go, and not a near-the-metal systems programming language that may (someday) have an "official" story about using actors for people writing servers.

Rust's threads are raw OS-level threads, because using green threads by default (or as an option) imposed serious overhead elsewhere:

http://stackoverflow.com/questions/29428318/why-did-rust-rem... https://github.com/rust-lang/rfcs/blob/0806be4f282144cfcd55b... https://aturon.github.io/blog/2016/08/11/futures/

From the third link:

> The problem is that green threads were at odds with Rust’s ambitions to be a true C replacement, with no imposed runtime system or FFI costs: we were unable to find an implementation strategy that didn’t impose serious global costs.

Re:The Piston image library is now pure Rust by Manishearth on Sunday January 08, 2017 @02:10PM (#13351337)
tokio+mio is "async io + event loop". I think tokio-fiber tries to build coroutines on top of it.

This is (or, will be) the "officially endorsed" async model for the server side. All the libraries you'll be using *hyper, etc) are going to be integrated with it. It's not yet finished, but when it is it will be.

In the future if we get async/await that would be an even more ergonomic thing that can be used with futures (and hence, tokio), but most of the machinery is already planned for tokio itself.