public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Igor Korotin <igor.korotin@yahoo.com>
To: Miguel Ojeda <ojeda@kernel.org>
Cc: "Alex Gaynor" <alex.gaynor@gmail.com>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	rust-for-linux@vger.kernel.org,
	"Igor Korotin" <igor.korotin@yahoo.com>
Subject: [PATCH v2] docs: rust: quick-start: update Ubuntu instructions
Date: Wed,  2 Apr 2025 11:47:59 +0100	[thread overview]
Message-ID: <20250402104759.1764282-1-igor.korotin@yahoo.com> (raw)
In-Reply-To: 20250402104759.1764282-1-igor.korotin.ref@yahoo.com

Ubuntu’s rust-1.80 and bindgen-0.65 packages don't set their tools
as defaults. They should be defined explicitly.

Signed-off-by: Igor Korotin <igor.korotin@yahoo.com>
---

Changes since v1:
 - rewrote commit message to be more concise
 - reworked instruction's steps not to make global changes
 - added overall build command for Ubuntu.
 - https://lore.kernel.org/all/20250331170118.1376899-1-igor.korotin@yahoo.com/
 
 Documentation/rust/quick-start.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/Documentation/rust/quick-start.rst b/Documentation/rust/quick-start.rst
index 4aa50e5fcb8c..3651d726ede0 100644
--- a/Documentation/rust/quick-start.rst
+++ b/Documentation/rust/quick-start.rst
@@ -95,10 +95,25 @@ 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
 
+``PATH`` needs to be set when installing rust 1.80 with apt, e.g.::
+
+	PATH=/usr/lib/rust-1.80/bin:$PATH
+
+Deb package bindgen-0.65 does not set itself as a default, thus it should be set
+explicitly, e.g.::
+
+	BINDGEN=bindgen-0.65
+
 ``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
 
+The overall command should be the following::
+
+	make LLVM=1 PATH=/usr/lib/rust-1.80/bin:$PATH \
+		RUST_LIB_SRC=/usr/src/rustc-$(rustc-1.80 --version | cut -d' ' -f2)/library \
+		BINDGEN=bindgen-0.65 <target>
+
 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).
-- 
2.43.0


       reply	other threads:[~2025-04-02 10:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20250402104759.1764282-1-igor.korotin.ref@yahoo.com>
2025-04-02 10:47 ` Igor Korotin [this message]
2025-04-02 11:26   ` [PATCH v2] docs: rust: quick-start: update Ubuntu instructions Miguel Ojeda
2025-04-02 11:49     ` Igor Korotin
2025-04-02 16:06       ` Miguel Ojeda
2025-04-02 13:52     ` Igor Korotin
2025-04-02 16:06       ` Miguel Ojeda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250402104759.1764282-1-igor.korotin@yahoo.com \
    --to=igor.korotin@yahoo.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox