summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorMiguel Ojeda <ojeda@kernel.org>2024-09-25 16:06:00 +0200
committerMiguel Ojeda <ojeda@kernel.org>2024-10-07 10:49:15 +0200
commit38f022b0787b22feb9e34fce19a1f6cea1f951ed (patch)
tree9096bc8636168b755a7392b0e69209aa15471314 /Documentation
parent8cf0b93919e13d1e8d4466eb4080a4c4d9d66d7b (diff)
docs: rust: quick-start: add Ubuntu
Ubuntu has changed their maintenance model for Rust toolchains and is now providing recent Rust releases in their releases, including both LTS and non-LTS (interim) releases. Therefore, add instructions to the Quick Start guide for Ubuntu, like it is done for the other distributions. Link: https://packages.ubuntu.com/search?keywords=rustc-1 Link: https://packages.ubuntu.com/search?keywords=bindgen-0 Cc: Zixing Liu <zixing.liu@canonical.com> Cc: William Grant <wgrant@ubuntu.com> Reviewed-by: Kees Cook <kees@kernel.org> Link: https://lore.kernel.org/r/20240925140600.275429-1-ojeda@kernel.org Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/rust/quick-start.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/rust/quick-start.rst b/Documentation/rust/quick-start.rst
index 2d107982c87b..4aa50e5fcb8c 100644
--- a/Documentation/rust/quick-start.rst
+++ b/Documentation/rust/quick-start.rst
@@ -87,6 +87,23 @@ they should generally work out of the box, e.g.::
zypper install rust rust1.79-src rust-bindgen clang
+Ubuntu
+******
+
+Ubuntu LTS and non-LTS (interim) releases provide recent Rust releases and thus
+they should generally work out of the box, e.g.::
+
+ apt install rustc-1.80 rust-1.80-src bindgen-0.65 rustfmt-1.80 rust-1.80-clippy
+
+``RUST_LIB_SRC`` needs to be set when using the versioned packages, e.g.::
+
+ RUST_LIB_SRC=/usr/src/rustc-$(rustc-1.80 --version | cut -d' ' -f2)/library
+
+In addition, ``bindgen-0.65`` is available in newer releases (24.04 LTS and
+24.10), but it may not be available in older ones (20.04 LTS and 22.04 LTS),
+thus ``bindgen`` may need to be built manually (please see below).
+
+
Requirements: Building
----------------------