summary refs log tree commit diff
path: root/doc/languages-frameworks/rust.section.md
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2022-08-22 14:37:41 -0700
committerAdam Joseph <adam@westernsemico.com>2022-08-22 14:37:41 -0700
commitaad7f1d6b36819115cdfa4ccaa9d39237bfa57c5 (patch)
treecedb460cf39697eb6532a9940ba24053310a8d64 /doc/languages-frameworks/rust.section.md
parent97d1ae99de3d753307ae55487ab3311aebbce129 (diff)
downloadnixpkgs-aad7f1d6b36819115cdfa4ccaa9d39237bfa57c5.tar
nixpkgs-aad7f1d6b36819115cdfa4ccaa9d39237bfa57c5.tar.gz
nixpkgs-aad7f1d6b36819115cdfa4ccaa9d39237bfa57c5.tar.bz2
nixpkgs-aad7f1d6b36819115cdfa4ccaa9d39237bfa57c5.tar.lz
nixpkgs-aad7f1d6b36819115cdfa4ccaa9d39237bfa57c5.tar.xz
nixpkgs-aad7f1d6b36819115cdfa4ccaa9d39237bfa57c5.tar.zst
nixpkgs-aad7f1d6b36819115cdfa4ccaa9d39237bfa57c5.zip
doc/../rust.section.md: prominently mention `buildRustXX` names
This was a source of massive confusion for me when I first learned my way around nixpkgs' rust machinery.  I seek to save others from that confusion.

* `buildRustPackage` should have been named `buildRustPackageUsingCargo`

* `buildRustCrate` should have been named `buildRustPackageUsingNix`

It is, unfortunately, too late to fix this.  Let's do the next best thing and make the names `buildRustPackage` and `buildRustCrate` very prominent in the documentation, so readers see immediately that they need to learn the following jargon:

* `buildRustPackage` means "build this Rust crate by calling `cargo` in one (or two) monolithic derivations"

* `buildRustCrate` means "build this Rust crate by calling `rustc` in one derivation for each crate"
Diffstat (limited to 'doc/languages-frameworks/rust.section.md')
-rw-r--r--doc/languages-frameworks/rust.section.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/languages-frameworks/rust.section.md b/doc/languages-frameworks/rust.section.md
index e19783e29e6..b499c630090 100644
--- a/doc/languages-frameworks/rust.section.md
+++ b/doc/languages-frameworks/rust.section.md
@@ -15,7 +15,7 @@ For other versions such as daily builds (beta and nightly),
 use either `rustup` from nixpkgs (which will manage the rust installation in your home directory),
 or use a community maintained [Rust overlay](#using-community-rust-overlays).
 
-## Compiling Rust applications with Cargo {#compiling-rust-applications-with-cargo}
+## `buildRustPackage`: Compiling Rust applications with Cargo {#compiling-rust-applications-with-cargo}
 
 Rust applications are packaged by using the `buildRustPackage` helper from `rustPlatform`:
 
@@ -596,7 +596,7 @@ buildPythonPackage rec {
 }
 ```
 
-## Compiling Rust crates using Nix instead of Cargo {#compiling-rust-crates-using-nix-instead-of-cargo}
+## `buildRustCrate`: Compiling Rust crates using Nix instead of Cargo {#compiling-rust-crates-using-nix-instead-of-cargo}
 
 ### Simple operation {#simple-operation}