From 7029d3eb37150e378c8f5e938595cd2efba1de99 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 3 Mar 2020 19:40:57 +0100 Subject: [PATCH 1/3] edit README --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cf30b99..c10974f 100644 --- a/README.md +++ b/README.md @@ -296,10 +296,13 @@ dependencies in the Xargo.toml file as you would do with Cargo.toml: [utest]: https://github.com/japaric/utest ``` toml +# First build some standard crates. [dependencies.alloc] [dependencies.panic_abort] [dependencies.panic_unwind] +# Then build our custom facade. This depends on the crates +# above, so we need to set the `stage`. [dependencies.std] git = "https://github.com/rust3ds/ctru-rs" stage = 1 @@ -318,7 +321,12 @@ do intrusive changes to every transitive dependency. path = "path/to/custom/libc" ``` -## Check-only sysroot build +Notice that you do should not list patched crates as `[dependencies]`! +`[dependencies]` determines which crates are built in the first place; `[patch]` +lets you replace some of their (transitive) dependencies with your own choice. +Having a crate listed in both will likely lead to crate duplication. + +### Check-only sysroot build Xargo supports performing a 'check build' of the syroot via the `xargo-check` command. This command is invoked exactly From 919a11302ab888c894a6c96dbc9a2998dcbd7cf8 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 3 Mar 2020 22:10:41 +0100 Subject: [PATCH 2/3] Fix typo Co-Authored-By: Robin Lambertz --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c10974f..93f570a 100644 --- a/README.md +++ b/README.md @@ -321,7 +321,7 @@ do intrusive changes to every transitive dependency. path = "path/to/custom/libc" ``` -Notice that you do should not list patched crates as `[dependencies]`! +Notice that you should not list patched crates as `[dependencies]`! `[dependencies]` determines which crates are built in the first place; `[patch]` lets you replace some of their (transitive) dependencies with your own choice. Having a crate listed in both will likely lead to crate duplication. From 26cf4642dee065f9928d6ce375089c18645a308f Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 3 Mar 2020 22:12:17 +0100 Subject: [PATCH 3/3] clarify the nature of std facade dependencies --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 93f570a..74076ff 100644 --- a/README.md +++ b/README.md @@ -301,8 +301,8 @@ dependencies in the Xargo.toml file as you would do with Cargo.toml: [dependencies.panic_abort] [dependencies.panic_unwind] -# Then build our custom facade. This depends on the crates -# above, so we need to set the `stage`. +# Then build our custom facade. It (implicitly) requires the crates above to +# already be in the sysroot, so we need to set the `stage`. [dependencies.std] git = "https://github.com/rust3ds/ctru-rs" stage = 1