Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
2 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,3 @@ | ||
This is a small (under-300-line) stub that you can import into your Rust | ||
projects to create almost completely freestanding Rust programs. The only | ||
dependencies are the following libc functions: `malloc`, `free`, `abort`, | ||
`memcpy`, and `memcmp`. See `hello.rs` for an example of usage. | ||
|
||
With a small modification, you could implement syscalls (via inline assembly) | ||
and an allocator yourself to avoid the dependencies on these functions. This | ||
was not done in the interests of simplicity. | ||
|
||
Unfortunately, a couple of runtime functions still have to be around, although | ||
they are never called in the resulting programs. They could be stubbed out. | ||
This should be considered a Rust bug. | ||
|
||
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). | ||
|
||
As with the rest of Rust, this should not be considered production-ready. | ||
This is *deprecated* and is no longer maintained. It is no longer necessary to use this to achieve | ||
runtime-less operation; just use `#[start]` and/or `#[no_std]` and avoid the runtime. | ||
|