Re: [PATCH RFC 1/3] meson: add infrastructure to build internal Rust library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 04, 2025 at 09:16:03PM -0400, Eli Schwartz wrote:
> On 9/4/25 6:06 PM, brian m. carlson wrote:
> 
> >> +if meson.version().version_compare('>=1.9.0')
> > 
> > I think we need a different approach.  Debian 13, which was just
> > released, only supports meson 1.7.0, and you have to use testing or
> > unstable to get 1.9.0.  There are no versions of Ubuntu, released or
> > not, that support meson 1.9.0.
> > 
> > If we require this version, practically nobody is going to actually test
> > this case.
> > 
> > Our platform support policy implies that we should be requiring nothing
> > greater than meson 0.56.2, which is available in Debian 11 and has LTS
> > support until 2026-08-31.  Ubuntu 22.04 offers 0.61.2.
> 
> 
> Hmm. Patrick -- do you mind documenting why you decided to use this
> version guard at all? Off the top of my head I'm not sure why you'd need
> this.
> 
> In src/meson.build,
> 
> +libgit_rs = static_library('git_rs',
> +  sources: [
> +    'lib.rs',
> +  ],
> +  rust_abi: 'c',
> +)
> 
> 
> 
> rust_abi is new in meson 1.3.0, but it's just a rename for clarity of
> rust_crate_type, available since meson 0.42.0, so please use the
> backwards-compatible name...

Oh. I think I misunderstood the following sentence [1]:

    (Since 1.9.0) Rust supports mixed targets, but only supports using
    rustc as the linker for such targets. If you need to use a non-Rust
    linker, or support Meson < 1.9.0, see below.

I thought that only with Meson 1.9 you could link Rust libraries with C
libraries. But I guess this rather means that you can now have a single
target that has both '.c' and '.rs' sources?

In any way, thanks for the hint, will drop.

Patrick

[1]: https://mesonbuild.com/Rust.html#mixing-rust-and-nonrust-sources




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux