* [PATCH] docs: rust: quick-start: add Ubuntu
@ 2024-09-25 14:06 Miguel Ojeda
2024-10-01 22:58 ` Miguel Ojeda
0 siblings, 1 reply; 2+ messages in thread
From: Miguel Ojeda @ 2024-09-25 14:06 UTC (permalink / raw)
To: Miguel Ojeda, Alex Gaynor
Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
Andreas Hindborg, Alice Ryhl, Trevor Gross, Zixing Liu,
William Grant, Kees Cook, rust-for-linux, linux-kernel, patches
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>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
RFC: https://lore.kernel.org/rust-for-linux/20240816181545.45789-1-ojeda@kernel.org/
Compared to the RFC, Ubuntu now provides the versioned `rustc-*`
packages in older LTSs (the ones with standard support), which is great!
I can confirm I can build the latest kernel in 20.04 LTS (using a
newer LLVM), 22.04 LTS, 24.04 LTS and 24.10.
The `bindgen-*` versioned packages are not backported (yet?) to the
older LTSs, so I added a note about that compared to the RFC patch.
Documentation/rust/quick-start.rst | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/Documentation/rust/quick-start.rst b/Documentation/rust/quick-start.rst
index ed5af2b5339a..393b3e2f2a05 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
----------------------
base-commit: a2f11547052001bd448ccec81dd1e68409078fbb
--
2.46.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] docs: rust: quick-start: add Ubuntu
2024-09-25 14:06 [PATCH] docs: rust: quick-start: add Ubuntu Miguel Ojeda
@ 2024-10-01 22:58 ` Miguel Ojeda
0 siblings, 0 replies; 2+ messages in thread
From: Miguel Ojeda @ 2024-10-01 22:58 UTC (permalink / raw)
To: Miguel Ojeda
Cc: Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
Zixing Liu, William Grant, Kees Cook, rust-for-linux,
linux-kernel, patches
On Wed, Sep 25, 2024 at 4:06 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> 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>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Applied to `rust-next` -- thanks everyone!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-10-01 22:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-25 14:06 [PATCH] docs: rust: quick-start: add Ubuntu Miguel Ojeda
2024-10-01 22:58 ` Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).