rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] docs: rust: quick-start: add Ubuntu
@ 2024-08-16 18:15 Miguel Ojeda
  2024-08-22 17:46 ` Kees Cook
  2024-09-25 13:06 ` Miguel Ojeda
  0 siblings, 2 replies; 3+ messages in thread
From: Miguel Ojeda @ 2024-08-16 18:15 UTC (permalink / raw)
  To: Miguel Ojeda, Alex Gaynor, Wedson Almeida Filho
  Cc: Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, rust-for-linux, linux-kernel,
	patches, Zixing Liu, William Grant, Kees Cook

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
for the other distributions.

Cc: Zixing Liu <zixing.liu@canonical.com>
Cc: William Grant <wgrant@ubuntu.com>
Cc: Kees Cook <kees@kernel.org>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
---
This is a potential patch for the future -- Ubuntu Oracular (future
release) works today, but the Rust versioned releases are not backported
(yet?). If Ubuntu ends up deciding to backport them, which would be
amazing, or at least when they start to appear in an actual release,
then we can apply this. Thanks William & Zixing!

 Documentation/rust/quick-start.rst | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Documentation/rust/quick-start.rst b/Documentation/rust/quick-start.rst
index d06a36106cd4..af39c8e13558 100644
--- a/Documentation/rust/quick-start.rst
+++ b/Documentation/rust/quick-start.rst
@@ -87,6 +87,19 @@ 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
+
+
 Requirements: Building
 ----------------------


base-commit: 7c626ce4bae1ac14f60076d00eafe71af30450ba
--
2.46.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH] docs: rust: quick-start: add Ubuntu
  2024-08-16 18:15 [RFC PATCH] docs: rust: quick-start: add Ubuntu Miguel Ojeda
@ 2024-08-22 17:46 ` Kees Cook
  2024-09-25 13:06 ` Miguel Ojeda
  1 sibling, 0 replies; 3+ messages in thread
From: Kees Cook @ 2024-08-22 17:46 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Alex Gaynor, Wedson Almeida Filho, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	rust-for-linux, linux-kernel, patches, Zixing Liu, William Grant

On Fri, Aug 16, 2024 at 08:15:45PM +0200, Miguel Ojeda 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
> for the other distributions.
> 
> Cc: Zixing Liu <zixing.liu@canonical.com>
> Cc: William Grant <wgrant@ubuntu.com>
> Cc: Kees Cook <kees@kernel.org>
> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

Looks good to me!

Reviewed-by: Kees Cook <kees@kernel.org>

-- 
Kees Cook

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC PATCH] docs: rust: quick-start: add Ubuntu
  2024-08-16 18:15 [RFC PATCH] docs: rust: quick-start: add Ubuntu Miguel Ojeda
  2024-08-22 17:46 ` Kees Cook
@ 2024-09-25 13:06 ` Miguel Ojeda
  1 sibling, 0 replies; 3+ messages in thread
From: Miguel Ojeda @ 2024-09-25 13:06 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Alex Gaynor, Wedson Almeida Filho, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	rust-for-linux, linux-kernel, patches, Zixing Liu, William Grant,
	Kees Cook

On Fri, Aug 16, 2024 at 8:16 PM Miguel Ojeda <ojeda@kernel.org> wrote:
>
> This is a potential patch for the future -- Ubuntu Oracular (future
> release) works today, but the Rust versioned releases are not backported
> (yet?). If Ubuntu ends up deciding to backport them, which would be
> amazing, or at least when they start to appear in an actual release,
> then we can apply this. Thanks William & Zixing!

An update on this: 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 users need to build `bindgen` manually in 20.04 LTS and
22.04 LTS. For 24.04 LTS and 24.10, it works with the package. I will
add a sentence about that and send the non-RFC patch.

Link: https://packages.ubuntu.com/search?keywords=rustc-1
Link: https://packages.ubuntu.com/search?keywords=bindgen-0

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-25 13:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-16 18:15 [RFC PATCH] docs: rust: quick-start: add Ubuntu Miguel Ojeda
2024-08-22 17:46 ` Kees Cook
2024-09-25 13:06 ` 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).