Rust fully supports this case with arenas.
> - implement a performant concurrency model. You essentially need some sort of scheduler to give various threads access to the shm via cas primitives.
And that's why the new scheduler is written in Rust.
Furthermore, manual memory management is helpful when you are implementing a browser that doesn't want a stop the world GC.
> You've exposed the lower-level rt/sync via libextra/sync.rs, but it's frankly not a big improvement over using raw pthreads.
It's just a wrapper around pthreads, for use internally by the scheduler and low-level primitives. It is not intended for safe Rust code to use. Of course it's not a big improvement over pthreads.
> The scheduler is a toy (rt/rust_scheduler.cpp)
That's why it's getting rewritten. You're looking at the old proof of concept/bootstrap scheduler. Please see the new scheduler in libstd/rt. It will probably be turned on in a week or two.
> and the memory allocator is horribly primitive (rt/memory_region.cpp; did I read correctly? are you using an array to keep track of the allocated regions)
There is a new GC that is basically written, just not turned on by default yet. Furthermore, manually-managed allocations no longer go through that list.
> Rust really has no way of accomplishing it, because you I don't get access to free().
Of course you do. `let _ = x;" is an easy way to free any value.
> The best you can do at this point is to use some sort of primitive reference counter (not much unlike cpython or shared-pointer in C++), because it's too late to implement a tracing garbage collector.
This is just nonsense, sorry. Graydon has a working tracing GC, it's just not turned on by default because of memory issues on 32 bit when bootstrapping. This is not too difficult to fix and is a blocker for 1.0.
Furthermore, did you not see the mailing list discussions where we're discussing what needs to happen to get incremental and generational GC?
> And you just threw performance out the window by guaranteeing that you will call free() everytime something goes out of scope, no matter how tiny the memory.
This is what move semantics are for. If you want to batch deallocations like a GC does (which has bad effects on cache behavior as Linus is fond of pointing out, but anyway), move the object into a list so it doesn't get eagerly freed and drop the list every once in a while.
> Lastly think about why people use C and C++. Primarily, it boils down to compiler strength. The rust runtime doesn't look like it's getting there; atleast not in its current shape.
The benchmarks of the new runtime are quite promising. TCP sending, for example, is faster than both node.js and Go 1.1 in some of our early benchmarks. And sequential performance is on par with C++ in many cases: http://pcwalton.github.io/blog/2013/04/18/performance-of-seq...