News for hackers. Stuff that matters.
Re:Announcing Rust 1.0 by krzysz00 on Friday May 15, 2015 @06:25PM (#9554066)
My current approach to the heap problem (I'm working on a toy Rust kernel) is to compile the allocator portions of the standard library (liballoc) with a configuration flag that makes them use a particular set of external functions as the low-level heap allocation machinery. Then, my kernel provides these functions, and all the nice stuff (Box, Vec, etc.) "just works".

IF you're curious, the relevant code is at https://github.com/krzysz00/rust-kernel/blob/master/kernel/m... . The functions that start with "rust_" are the allocator interface

Re:Announcing Rust 1.0 by FreeFull on Saturday May 16, 2015 @08:25AM (#9555842)
Couldn't help but notice,

    F' as u8
is equivalent to

    b'F'
, and

    ['F' as u8, 'R' as u8, 'E' as u8, 'E' as u8]
is equivalent to

    *b"FREE"
which definitely is a lot more concise :). These are called byte string literals.

Edit: The dereference is necessary because b"FREE" on its own has the type &[u8; 4].

Re:Announcing Rust 1.0 by mastax on Friday May 15, 2015 @11:07PM (#9554899)
That's much easier than I thought it was! I'll have to start working on my kernel again.
Re:Announcing Rust 1.0 by krzysz00 on Friday May 15, 2015 @11:22PM (#9554932)
You can find some more {complex, idiomatic, not terribly hacked together} Rust kernels at https://github.com/thepowersgang/ .
Re:Announcing Rust 1.0 by bliti on Friday May 15, 2015 @10:39PM (#9554826)
Very interesting. Thank you for sharing. Would it be too much to ask for more?
Re:Announcing Rust 1.0 by krzysz00 on Friday May 15, 2015 @10:54PM (#9554864)
I'm not sure what you're getting at. More of what?
Re:Announcing Rust 1.0 by bliti on Saturday May 16, 2015 @10:22AM (#9556176)
Share more of experience with Rust. :)