All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/rust-bindgen: new host package
@ 2023-06-08  8:50 Sebastian Weyer
  2023-07-03 20:41 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian Weyer @ 2023-06-08  8:50 UTC (permalink / raw)
  To: buildroot; +Cc: Romain Naour, Sebastian Weyer

From: Romain Naour <romain.naour@smile.fr>

host-rust-bindgen will be required to build several different rust-based
packages, includign a Linux kernel with rust modules and mesa3d's
rusticl which is the rust-based implementation of OpenCL.

The Cargo.toml file at the project root is a "virtual manifest". Since
we only want to install rust-bindgen, we can specify RUST_BINDGEN_SUBDIR
= bindgen-cli to use the Cargo.toml from this directory.

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Sebastian Weyer <sebastian.weyer@smile.fr>
---
 package/rust-bindgen/rust-bindgen.hash |  3 +++
 package/rust-bindgen/rust-bindgen.mk   | 21 +++++++++++++++++++++
 2 files changed, 24 insertions(+)
 create mode 100644 package/rust-bindgen/rust-bindgen.hash
 create mode 100644 package/rust-bindgen/rust-bindgen.mk

diff --git a/package/rust-bindgen/rust-bindgen.hash b/package/rust-bindgen/rust-bindgen.hash
new file mode 100644
index 0000000000..fe94bbc096
--- /dev/null
+++ b/package/rust-bindgen/rust-bindgen.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  e1cdbaa8e0ed96f647e49807aecfc44d9239d438c2b1c084edb9a3cca0b1f68f  rust-bindgen-0.65.1.tar.gz
+sha256  c23953d9deb0a3312dbeaf6c128a657f3591acee45067612fa68405eaa4525db  LICENSE
diff --git a/package/rust-bindgen/rust-bindgen.mk b/package/rust-bindgen/rust-bindgen.mk
new file mode 100644
index 0000000000..b9c7647716
--- /dev/null
+++ b/package/rust-bindgen/rust-bindgen.mk
@@ -0,0 +1,21 @@
+################################################################################
+#
+# rust-bindgen
+#
+################################################################################
+
+#When updating to a version >0.63.0, pay attention to the command line
+#arguments --blacklist* and --whitelist* which are deprecated from 0.63.0
+#onwards but are still used when compiling the Linux Kernel as of the time
+#of this comment
+RUST_BINDGEN_VERSION = 0.65.1
+RUST_BINDGEN_SITE = $(call github,rust-lang,rust-bindgen,v$(RUST_BINDGEN_VERSION))
+RUST_BINDGEN_LICENSE = BSD-3-clause
+RUST_BINDGEN_LICENSE_FILES = LICENSE
+
+# The Cargo.toml at the root directory is an "virtual manifest".
+# Since we only want to build and install bindgen use the Cargo.toml
+# from the bindgen-cli subdirectory.
+RUST_BINDGEN_SUBDIR = bindgen-cli
+
+$(eval $(host-cargo-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/rust-bindgen: new host package
  2023-06-08  8:50 [Buildroot] [PATCH 1/1] package/rust-bindgen: new host package Sebastian Weyer
@ 2023-07-03 20:41 ` Thomas Petazzoni via buildroot
  2023-07-04 10:50   ` Sebastian WEYER
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-03 20:41 UTC (permalink / raw)
  To: Sebastian Weyer; +Cc: Romain Naour, buildroot

Hello Sebastian, Hello Romain,

On Thu,  8 Jun 2023 10:50:15 +0200
Sebastian Weyer <sebastian.weyer@smile.fr> wrote:

> +#When updating to a version >0.63.0, pay attention to the command line
> +#arguments --blacklist* and --whitelist* which are deprecated from 0.63.0
> +#onwards but are still used when compiling the Linux Kernel as of the time
> +#of this comment
> +RUST_BINDGEN_VERSION = 0.65.1

The comment above this version variable is confusing: it says to be
careful when updating to a version >0.63.0, but the patch already
includes a version greater than 0.63.0. So?

Also: space after # sign in comments.

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/rust-bindgen: new host package
  2023-07-03 20:41 ` Thomas Petazzoni via buildroot
@ 2023-07-04 10:50   ` Sebastian WEYER
  2023-07-04 13:33     ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 7+ messages in thread
From: Sebastian WEYER @ 2023-07-04 10:50 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Romain Naour, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1725 bytes --]

Hello Thomas,

Thank you for your feedback.
It was an oversight to leave the comment as is, as initially the package
was added with a version <0.63.0.
Do you think a comment explaining the command line options being deprecated
should stay? Also considering that the Kernel still uses these options for
its Rust modules.

Best regards,
Sebastian

On Mon, Jul 3, 2023 at 10:42 PM Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Hello Sebastian, Hello Romain,
>
> On Thu,  8 Jun 2023 10:50:15 +0200
> Sebastian Weyer <sebastian.weyer@smile.fr> wrote:
>
> > +#When updating to a version >0.63.0, pay attention to the command line
> > +#arguments --blacklist* and --whitelist* which are deprecated from
> 0.63.0
> > +#onwards but are still used when compiling the Linux Kernel as of the
> time
> > +#of this comment
> > +RUST_BINDGEN_VERSION = 0.65.1
>
> The comment above this version variable is confusing: it says to be
> careful when updating to a version >0.63.0, but the patch already
> includes a version greater than 0.63.0. So?
>
> Also: space after # sign in comments.
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>


-- 
[image: eco] Pour la planète, n'imprimez ce mail que si c'est nécessaire
[image: SMILE] <http://www.smile.eu/>

10-12 Rue Nicolas Appert
44100 NANTES
*Sebastian WEYER*
Stagiaire production

[image: email] sebastian.weyer@smile.fr
[image: url] http://www.smile.eu

[image: Twitter] <https://twitter.com/GroupeSmile> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>

[-- Attachment #1.2: Type: text/html, Size: 4914 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/rust-bindgen: new host package
  2023-07-04 10:50   ` Sebastian WEYER
@ 2023-07-04 13:33     ` Thomas Petazzoni via buildroot
  2023-07-04 14:24       ` Sebastian WEYER
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-04 13:33 UTC (permalink / raw)
  To: Sebastian WEYER; +Cc: Romain Naour, buildroot

Hello Sebastian,

On Tue, 4 Jul 2023 12:50:16 +0200
Sebastian WEYER <sebastian.weyer@smile.fr> wrote:

> Thank you for your feedback.
> It was an oversight to leave the comment as is, as initially the package
> was added with a version <0.63.0.
> Do you think a comment explaining the command line options being deprecated
> should stay? Also considering that the Kernel still uses these options for
> its Rust modules.

Ah, so the proposed version of rust-bindgen would not work to support
the in-kernel Rust support? This is a bit unfortunate.

Regarding the comment, I'm not sure they make sense. If we start
documenting all what's no longer supported by a given package,
Buildroot would be full of comments related to obsolete features :-)

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/rust-bindgen: new host package
  2023-07-04 13:33     ` Thomas Petazzoni via buildroot
@ 2023-07-04 14:24       ` Sebastian WEYER
  2023-07-04 20:30         ` Sebastian WEYER
  2023-07-04 20:36         ` Arnout Vandecappelle via buildroot
  0 siblings, 2 replies; 7+ messages in thread
From: Sebastian WEYER @ 2023-07-04 14:24 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Romain Naour, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1861 bytes --]

Hello Thomas,

Yes, the kernel only supports bindgen in version 0.56.0 (released in
November 2020!).
Since the support for Rust in the kernel for now is only very rudimentary
and this is not the only difficulty (lack of minimum version of rustc for
example and lack of architecture support) I think for now it is not that
big of a deal.

Best regards,
Sebastian


On Tue, Jul 4, 2023 at 3:33 PM Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Hello Sebastian,
>
> On Tue, 4 Jul 2023 12:50:16 +0200
> Sebastian WEYER <sebastian.weyer@smile.fr> wrote:
>
> > Thank you for your feedback.
> > It was an oversight to leave the comment as is, as initially the package
> > was added with a version <0.63.0.
> > Do you think a comment explaining the command line options being
> deprecated
> > should stay? Also considering that the Kernel still uses these options
> for
> > its Rust modules.
>
> Ah, so the proposed version of rust-bindgen would not work to support
> the in-kernel Rust support? This is a bit unfortunate.
>
> Regarding the comment, I'm not sure they make sense. If we start
> documenting all what's no longer supported by a given package,
> Buildroot would be full of comments related to obsolete features :-)
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering and training
> https://bootlin.com
>


-- 
[image: eco] Pour la planète, n'imprimez ce mail que si c'est nécessaire
[image: SMILE] <http://www.smile.eu/>

10-12 Rue Nicolas Appert
44100 NANTES
*Sebastian WEYER*
Stagiaire production

[image: email] sebastian.weyer@smile.fr
[image: url] http://www.smile.eu

[image: Twitter] <https://twitter.com/GroupeSmile> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>

[-- Attachment #1.2: Type: text/html, Size: 5058 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/rust-bindgen: new host package
  2023-07-04 14:24       ` Sebastian WEYER
@ 2023-07-04 20:30         ` Sebastian WEYER
  2023-07-04 20:36         ` Arnout Vandecappelle via buildroot
  1 sibling, 0 replies; 7+ messages in thread
From: Sebastian WEYER @ 2023-07-04 20:30 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Romain Naour, buildroot


[-- Attachment #1.1: Type: text/plain, Size: 3081 bytes --]

Hello again,

After this discussion I did some more digging again and it seems there has
been quite a lot of work done on the rust-for-linux project since the last
time I had a look into it.
On their development branch, they already updated the bindgen version to
0.65.1:
https://github.com/Rust-for-Linux/linux/commit/53dd54f5ff9930e410db3c1c0419adbc1c3fa00c
This would suggest to me that they'll soon try to integrate it into the
next merge window along with the update to rustc v1.70.0.
Therefore I think it should be fine to add the package in this version.

Best regards,
Sebastian

On Tue, Jul 4, 2023 at 4:24 PM Sebastian WEYER <sebastian.weyer@smile.fr>
wrote:

> Hello Thomas,
>
> Yes, the kernel only supports bindgen in version 0.56.0 (released in
> November 2020!).
> Since the support for Rust in the kernel for now is only very rudimentary
> and this is not the only difficulty (lack of minimum version of rustc for
> example and lack of architecture support) I think for now it is not that
> big of a deal.
>
> Best regards,
> Sebastian
>
>
> On Tue, Jul 4, 2023 at 3:33 PM Thomas Petazzoni <
> thomas.petazzoni@bootlin.com> wrote:
>
>> Hello Sebastian,
>>
>> On Tue, 4 Jul 2023 12:50:16 +0200
>> Sebastian WEYER <sebastian.weyer@smile.fr> wrote:
>>
>> > Thank you for your feedback.
>> > It was an oversight to leave the comment as is, as initially the package
>> > was added with a version <0.63.0.
>> > Do you think a comment explaining the command line options being
>> deprecated
>> > should stay? Also considering that the Kernel still uses these options
>> for
>> > its Rust modules.
>>
>> Ah, so the proposed version of rust-bindgen would not work to support
>> the in-kernel Rust support? This is a bit unfortunate.
>>
>> Regarding the comment, I'm not sure they make sense. If we start
>> documenting all what's no longer supported by a given package,
>> Buildroot would be full of comments related to obsolete features :-)
>>
>> Thomas
>> --
>> Thomas Petazzoni, co-owner and CEO, Bootlin
>> Embedded Linux and Kernel engineering and training
>> https://bootlin.com
>>
>
>
> --
> [image: eco] Pour la planète, n'imprimez ce mail que si c'est nécessaire
> [image: SMILE] <http://www.smile.eu/>
>
> 10-12 Rue Nicolas Appert
> 44100 NANTES
> *Sebastian WEYER*
> Stagiaire production
>
> [image: email] sebastian.weyer@smile.fr
> [image: url] http://www.smile.eu
>
> [image: Twitter] <https://twitter.com/GroupeSmile> [image: LinkedIn]
> <https://www.linkedin.com/company/smile> [image: Github]
> <https://github.com/Smile-SA>
>


-- 
[image: eco] Pour la planète, n'imprimez ce mail que si c'est nécessaire
[image: SMILE] <http://www.smile.eu/>

10-12 Rue Nicolas Appert
44100 NANTES
*Sebastian WEYER*
Stagiaire production

[image: email] sebastian.weyer@smile.fr
[image: url] http://www.smile.eu

[image: Twitter] <https://twitter.com/GroupeSmile> [image: LinkedIn]
<https://www.linkedin.com/company/smile> [image: Github]
<https://github.com/Smile-SA>

[-- Attachment #1.2: Type: text/html, Size: 9296 bytes --]

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/rust-bindgen: new host package
  2023-07-04 14:24       ` Sebastian WEYER
  2023-07-04 20:30         ` Sebastian WEYER
@ 2023-07-04 20:36         ` Arnout Vandecappelle via buildroot
  1 sibling, 0 replies; 7+ messages in thread
From: Arnout Vandecappelle via buildroot @ 2023-07-04 20:36 UTC (permalink / raw)
  To: Sebastian WEYER, Thomas Petazzoni; +Cc: Romain Naour, buildroot

  [Sebastien, please don't top-post, but reply inline like I do below. Note that 
this requires configuring your mailer to quote replies properly.]


On 04/07/2023 16:24, Sebastian WEYER wrote:
> Hello Thomas,
> 
> Yes, the kernel only supports bindgen in version 0.56.0 (released in November 
> 2020!).
> Since the support for Rust in the kernel for now is only very rudimentary and 
> this is not the only difficulty (lack of minimum version of rustc for example 
> and lack of architecture support) I think for now it is not that big of a deal.

  I believe at this point the kernel rust support requires a very specific rust 
installation (not just for bindgen), so indeed I don't think we should take that 
into account. If we want to be able to build the kernel rust support I think 
we'll need version-pinned duplicates of a bunch of packages. And for the time 
being it's very hard to do that because the required rust version will probably 
depend on the kernel version.

  Regards,
  Arnout

> 
> Best regards,
> Sebastian
> 
> 
> On Tue, Jul 4, 2023 at 3:33 PM Thomas Petazzoni <thomas.petazzoni@bootlin.com 
> <mailto:thomas.petazzoni@bootlin.com>> wrote:
> 
>     Hello Sebastian,
> 
>     On Tue, 4 Jul 2023 12:50:16 +0200
>     Sebastian WEYER <sebastian.weyer@smile.fr <mailto:sebastian.weyer@smile.fr>>
>     wrote:
> 
>      > Thank you for your feedback.
>      > It was an oversight to leave the comment as is, as initially the package
>      > was added with a version <0.63.0.
>      > Do you think a comment explaining the command line options being deprecated
>      > should stay? Also considering that the Kernel still uses these options for
>      > its Rust modules.
> 
>     Ah, so the proposed version of rust-bindgen would not work to support
>     the in-kernel Rust support? This is a bit unfortunate.
> 
>     Regarding the comment, I'm not sure they make sense. If we start
>     documenting all what's no longer supported by a given package,
>     Buildroot would be full of comments related to obsolete features :-)
> 
>     Thomas
>     -- 
>     Thomas Petazzoni, co-owner and CEO, Bootlin
>     Embedded Linux and Kernel engineering and training
>     https://bootlin.com <https://bootlin.com>
> 
> 
> 
> -- 
> eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
> SMILE <http://www.smile.eu/>
> 
> 10-12 Rue Nicolas Appert
> 44100 NANTES
> 
> 	
> *Sebastian WEYER*
> Stagiaire production
> 
> email sebastian.weyer@smile.fr <mailto:sebastian.weyer@smile.fr>
> url http://www.smile.eu <http://www.smile.eu>
> 
> Twitter <https://twitter.com/GroupeSmile> LinkedIn 
> <https://www.linkedin.com/company/smile> Github <https://github.com/Smile-SA>
> 
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-07-04 20:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08  8:50 [Buildroot] [PATCH 1/1] package/rust-bindgen: new host package Sebastian Weyer
2023-07-03 20:41 ` Thomas Petazzoni via buildroot
2023-07-04 10:50   ` Sebastian WEYER
2023-07-04 13:33     ` Thomas Petazzoni via buildroot
2023-07-04 14:24       ` Sebastian WEYER
2023-07-04 20:30         ` Sebastian WEYER
2023-07-04 20:36         ` Arnout Vandecappelle via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.