On Tue, 7 Sept 2021 at 13:41, <marcandre.lur...@redhat.com> wrote: > > From: Marc-André Lureau <marcandre.lur...@redhat.com> > > Add the build-sys infrastructure to optionally build Rust code. > Introduce a top-level workspace, so various sub-projects (libraries, > executables etc) can be developed together, sharing the dependencies and > output directory. > > If not Tier 1 (aarch64 and x86), all of the host architecture QEMU > supports should be Tier 2: > https://doc.rust-lang.org/nightly/rustc/platform-support.html
I don't think this is quite true -- for instance the riscv TCG backend supports 32-bit, but the riscv 32 bit linux rust port is down in Tier 3. But the major stuff seems to be in Tier 1 or 2. > +if with_rust > + rust_target_triple = get_option('with_rust_target') > + if meson.is_cross_build() > + # more default target mappings may be added over time > + if rust_target_triple == '' and targetos == 'windows' > + rust_target_triple = host_machine.cpu() + '-pc-windows-gnu' > + endif > + if rust_target_triple == '' > + error('cross-compiling, but no Rust target-triple defined.') > + endif > + endif > +endif Not a huge fan of this... I think we would be better to always require the user to specify the rust target triple explicitly. > diff --git a/.gitignore b/.gitignore > index eb2553026c..78715bc7c4 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -1,5 +1,6 @@ > /GNUmakefile > /build/ > +/target/ What's this for ? > *.pyc > .sdk > .stgit-* thanks -- PMM