Hacker News new | ask | show | jobs
by kqr2 4682 days ago
Since this builds on zero.rs, there are some limitations.

https://github.com/pcwalton/zero.rs

  Garbage collection, tasks, and failure will not work. All 
  the other language features, including unique pointers, 
  references, and closures do work, so programs such as 
  sprocketnes that do not use garbage collection should be
  fine.

  The Rust standard library cannot be used in this mode,
  but splitting out the Rust standard library into a 
  portion that can be used in freestanding mode would be an
  interesting and valuable project (IMO).
2 comments

Does anybody knows, would it be possible to use reference counting(and thus build hard real time systems), maybe by splitting the library?
You can use the `Rc` or `RcMut` types in the standard library. They're just smart pointers, like C++ `shared_ptr`.
Is it possible to use them in zero ? because ksr2's comments tells otherwise.
Nowadays you can just use libstd in no-runtime apps; you can choose whether to start the runtime and if you're running on bare metal, just don't start it.
But one can implement those, they are language items.