Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I sometimes hack on the C part (e.g. porting Mirage to ARM). The C code in Mirage is basically:

- malloc

- printk

- openlibm (standard maths functions)

- gmp (fast big ints for crypto stuff)

- garbage collector

- support code to make the above C code compile (assert, various standard header files, etc)

Once Rust has matured, and if reliable, well-optimised replacements for all these libraries become available, then it would be interesting to use it. But until then, there isn't much C code you can replace, because there is a minimal core you need to provide to compile C libraries like gmp, and we're pretty close to that already.

Rust's linear types / lifetime support is interesting, though. For example, when you pass a buffer to Xen for transmission on the network, it's important that you don't modify it again until it has been read (or you'll get a race). Rust's type system can express that statically, whereas OCaml's can't. On the other hand, OCaml has functors, is far more mature and has lots of libraries available.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: