On Thu, 17 Apr 2025 15:39:44 +0800,
Ludovic Courtès wrote:
>
> Hello,
>
> Hilton Chain <hako@ultrarare.space> writes:
>
> >> Just realized cross-compilation support (rust-sysroot) is missing when 
> >> using
> >> other build systems.
> >
> > I think this issue can't be really solved without exposing interface for
> > target-inputs in all build systems.
> >
> > Luckily, all affected packages currently don't support cross-compilation on
> > master, so I think this can be left for the future with a bigger change :)
>
> If cross-compilation of Rust packages doesn’t work at all right now,
> it makes sense to leave it for later.
>
> If it does work, but only for a couple of well-identified packages,
> perhaps there are workarounds that could be found for this specific
> cases.
>
> Anyhow, my take as an outsider is that this shouldn’t be a blocker.

Some packages require mixed build systems, e.g. python + cargo, meson + cargo.

Previously they were using cargo-build-system and applying build phases from the
other build system.  With changes currently on rust-team, we can do the reverse
and apply build phases from cargo-build-system instead.  This can simplify
package definitions.

cargo-build-system itself supports cross-compilation but requires rust-sysroot
as a target input.  This is the problem, no interface is available for modifying
target-inputs.

Currently only a handful of packages have switched build system and on master
they don't support cross-compilation either, so the impact is low.  But for the
long term, this need to be addressed and mixing build systems should be made
easier.

Reply via email to