From 7d434636248d66c51a43a7ec8ade7062aea5817c Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 19 Sep 2023 08:36:44 -0700 Subject: [PATCH 1/2] Minor documentation tidying. --- c-scape/README.md | 2 +- example-crates/eyra-example/README.md | 7 +++++-- example-crates/eyra-libc-example/README.md | 11 +++++++++-- eyra/README.md | 18 +++++++++--------- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/c-scape/README.md b/c-scape/README.md index 61c5f7d..79679a2 100644 --- a/c-scape/README.md +++ b/c-scape/README.md @@ -22,5 +22,5 @@ Similar to c-gull, c-scape has "take-charge" and "coexist-with-libc" modes. "take-charge" mode requires some additional setup; see the [c-scape-example] example crate for more details. -[c-gull]: https://crates.io/crates/c-gull +[c-gull]: https://github.com/sunfishcode/c-ward/tree/main/c-gull [c-scape-example]: https://github.com/sunfishcode/c-ward/blob/main/example-crates/c-scape-example diff --git a/example-crates/eyra-example/README.md b/example-crates/eyra-example/README.md index 73a6365..3405583 100644 --- a/example-crates/eyra-example/README.md +++ b/example-crates/eyra-example/README.md @@ -1,3 +1,6 @@ -This crate demonstrates the use of eyra. +This crate demonstrates the use of Eyra. -This version uses `extern crate libc;` to ensure that eyra is linked in. +See the [detiled walkthrough] for a list of how this hello world +example crate works. + +[detiled walkthrough]: https://github.com/sunfishcode/c-ward/tree/main/eyra#in-detail diff --git a/example-crates/eyra-libc-example/README.md b/example-crates/eyra-libc-example/README.md index dac5ad1..dbbf9e7 100644 --- a/example-crates/eyra-libc-example/README.md +++ b/example-crates/eyra-libc-example/README.md @@ -1,3 +1,10 @@ -This crate demonstrates the use of eyra. +This crate demonstrates the use of Eyra. -This version uses a reference to `libc` to ensure that eyra is linked in. +This is similar to [eyra-example], but additionally demonstrates the +use of `libc` APIs by saying "Hello, world!" using the libc `printf` +interface. + +The `printf` implementation is provided by [c-gull]. + +[eyra-example]: https://github.com/sunfishcode/c-ward/tree/main/example-crates/eyra-example/ +[c-gull]: https://github.com/sunfishcode/c-ward/tree/main/c-gull diff --git a/eyra/README.md b/eyra/README.md index d5eb2b9..bda5a73 100644 --- a/eyra/README.md +++ b/eyra/README.md @@ -1,5 +1,5 @@
-

eyra

+

Eyra

Rust programs written entirely in Rust @@ -13,7 +13,7 @@

-eyra is a package that supports building Rust programs implemented entirely +Eyra is a package that supports building Rust programs implemented entirely in Rust. ## Quick start @@ -46,11 +46,11 @@ fn main() { } ``` -This tells Rust that eyra is actually used and the libraries should -actually be linked in. +This tells Rust that Eyra is actually used and the libraries should actually +be linked in. And finally, a build.rs file to add `-nostartfiles` to the link flags to -disable the host startup code, so that eyra can provide its own. build.rs: +disable the host startup code, so that Eyra can provide its own. build.rs: ```rust fn main() { @@ -65,15 +65,15 @@ implemented in Rust. ## Background -This is similar to [mustang] and uses the same underlying code, but instead -of using a custom target and -Z build-std, it just by needs users to add +Eyra is similar to [Mustang] and uses the same underlying code, but instead +of using a custom target and -Z build-std, Eyra just by needs users to add `-nostartfiles` to their link line, such as via build.rs in the example. -Like mustang, eyra currently runs on Rust Nightly on Linux on x86-64, x86, +Like Mustang, Eyra currently runs on Rust Nightly on Linux on x86-64, x86, aarch64, and riscv64. It aims to support all Linux versions [supported by Rust], though at this time it's only tested on relatively recent versions. -[mustang]: https://github.com/sunfishcode/mustang +[Mustang]: https://github.com/sunfishcode/mustang [origin]: https://github.com/sunfishcode/origin [c-ward]: https://github.com/sunfishcode/c-ward [rustix]: https://github.com/sunfishcode/rustix From 7b21a51e4f81cc317deec1d1a8f83f8cf4aa3864 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 19 Sep 2023 11:16:49 -0700 Subject: [PATCH 2/2] Update eyra/README.md Co-authored-by: Tshepang Mbambo --- eyra/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eyra/README.md b/eyra/README.md index bda5a73..d07acc7 100644 --- a/eyra/README.md +++ b/eyra/README.md @@ -66,7 +66,7 @@ implemented in Rust. ## Background Eyra is similar to [Mustang] and uses the same underlying code, but instead -of using a custom target and -Z build-std, Eyra just by needs users to add +of using a custom target and -Z build-std, Eyra just needs users to add `-nostartfiles` to their link line, such as via build.rs in the example. Like Mustang, Eyra currently runs on Rust Nightly on Linux on x86-64, x86,