Origin is a crate that provides the basic infrastructure needed to write small and simple programs entirely in Rust.
Origin was previously in the mustang repo, and it has now moved to a new repo, where it can better focus on being usable on its own. And it's been refactored to make it easier to use:
Origin no longer requires a custom target, and it no longer uses target_vendor = "mustang" to magically decide what to do. All configuration is done via cargo features now.
origin-studio is a new library on top of origin that contains a very reduced alternate std implementation that supports println! and a std::thread-like API and a few other things, and also re-exports core and optionally alloc, so it makes it easy to write simple examples using origin.
Mustang continues to be a layer on top of origin
Mustang works by providing its own C-ABI-compatible libc implementation, using origin and rustix inside, which allows it to slot in underneath a lot of existing code, including standard library code.
Mustang supports many more features than origin-studio. At this time, it's complete enough to run ripgrep, coreutils, async-std, tokio, bat, cargo-watch, and more. Files, networking, threads, linking to C libraries, and lots of other things work.
The main downsides of mustang compared to origin-studio are that it uses a custom target which makes it awkward to use, there's some overhead incurred in providing C-ABI-compatible libc interfaces, compared to just calling the underlying Rust APIs directly, and it doesn't support LTO.
Origin now lives in its own repo
Origin is a crate that provides the basic infrastructure needed to write small and simple programs entirely in Rust.
Origin was previously in the mustang repo, and it has now moved to a new repo, where it can better focus on being usable on its own. And it's been refactored to make it easier to use:
Origin no longer requires a custom target, and it no longer uses
target_vendor = "mustang"
to magically decide what to do. All configuration is done via cargo features now.It now has fully static linking support.
It supports LTO.
It has several standalone example crates that show how to use origin, and api docs.
New sibling project: origin-studio
origin-studio is a new library on top of origin that contains a very reduced alternate std implementation that supports
println!
and astd::thread
-like API and a few other things, and also re-exportscore
and optionallyalloc
, so it makes it easy to write simple examples using origin.Mustang continues to be a layer on top of origin
Mustang works by providing its own C-ABI-compatible libc implementation, using origin and rustix inside, which allows it to slot in underneath a lot of existing code, including standard library code.
Mustang supports many more features than origin-studio. At this time, it's complete enough to run ripgrep, coreutils, async-std, tokio, bat, cargo-watch, and more. Files, networking, threads, linking to C libraries, and lots of other things work.
The main downsides of mustang compared to origin-studio are that it uses a custom target which makes it awkward to use, there's some overhead incurred in providing C-ABI-compatible libc interfaces, compared to just calling the underlying Rust APIs directly, and it doesn't support LTO.