Paolo Bonzini <pbonz...@redhat.com> writes: > On Thu, Nov 14, 2024 at 2:07 PM Alex Bennée <alex.ben...@linaro.org> wrote: >> > First, while it is currently possible to run cargo on the rust/ directory, >> > it has the issue that the bindings.rs must be placed by hand in >> > the build directory. Therefore, this series starts by allowing >> > cargo to "just work" when run in a "meson devenv" environment: >> > >> > meson devenv -w ../rust cargo clippy --tests >> > meson devenv -w ../rust cargo fmt >> >> Is this meant to be the rust source root, or the root of the rust >> builddir: >> >> $ meson devenv ../../rust > > rust/ in the source directory. You also need to run "meson devenv" > from the root of the build directory. > > In practice you can just use "make clippy" or similar.
make clippy certainly works >> ERROR: Build data file './meson-private/build.dat' references >> functions or classes that don't exist. This probably means that it >> was generated with an old version of meson. Try running from the >> source directory meson setup . --wipe >> 🕙13:05:22 alex@draig:qemu.git/builds/rust on review/rust-cargo-rfc [$!?] >> [🔴 ERROR] >> $ meson devenv rust > > Your meson-private/ directory is stale. Any "make" or "ninja" invocation will > fix it. ✗ make -j30 [1/53] Generating tests/include/QAPI test (include) with a custom command [2/21] Generating rust_arm_softmmu.rs with a custom command (wrapped by meson to capture output) [3/21] Generating rust_aarch64_softmmu.rs with a custom command (wrapped by meson to capture output) [4/21] Generating qemu-version.h with a custom command (wrapped by meson to capture output) 🕙15:18:58 alex@draig:qemu.git/builds/rust on review/rust-cargo-rfc [$!?] ➜ meson devenv ../../rust ERROR: Build data file './meson-private/build.dat' references functions or classes that don't exist. This probably means that it was generated with an old version of meson. Try running from the source directory meson setup . --wipe I also tried a wipe and re-configure but the same thing. ➜ ls -la meson-private/ total 24768 drwxr-xr-x 4 alex alex 4096 Nov 14 15:20 ./ drwxr-xr-x 77 alex alex 4096 Nov 14 15:21 ../ -rw-r--r-- 1 alex alex 7569 Nov 14 15:20 aarch64-softmmu-config-devices.mak.d -rw-r--r-- 1 alex alex 7084 Nov 14 15:20 arm-softmmu-config-devices.mak.d -rw-r--r-- 1 alex alex 1877658 Nov 14 15:20 build.dat -rw-r--r-- 1 alex alex 27208 Nov 14 15:20 cleantrees.dat drwxr-xr-x 3 alex alex 4096 Nov 14 15:20 __CMake_compiler_info__/ drwxr-xr-x 3 alex alex 4096 Nov 14 15:20 cmake_libcbor/ -rw-r--r-- 1 alex alex 162 Nov 14 15:20 cmd_line.txt -rw-r--r-- 1 alex alex 333651 Nov 14 15:20 coredata.dat -rw-r--r-- 1 alex alex 24920 Nov 14 15:20 install.dat -rw-r--r-- 1 alex alex 19049522 Nov 14 15:20 libsanity.a -rw-r--r-- 1 alex alex 1748 Nov 14 15:20 meson_benchmark_setup.dat -rw-r--r-- 1 alex alex 0 Nov 14 15:20 meson.lock -rw-r--r-- 1 alex alex 140166 Nov 14 15:20 meson_test_setup.dat -rwxr-xr-x 1 alex alex 3826912 Nov 14 15:20 rusttest* -rw-r--r-- 1 alex alex 46 Nov 14 15:20 sanitycheckc.c -rwxr-xr-x 1 alex alex 15840 Nov 14 15:20 sanitycheckc.exe* -rw-r--r-- 1 alex alex 30 Nov 14 15:20 sanity.rs 🕙15:21:27 alex@draig:qemu.git/builds/rust on review/rust-cargo-rfc [$!?] ➜ meson devenv ../../rust ERROR: Build data file './meson-private/build.dat' references functions or classes that don't exist. This probably means that it was generated with an old version of meson. Try running from the source directory meson setup . --wipe 🕙15:21:43 alex@draig:qemu.git/builds/rust on review/rust-cargo-rfc [$!?] [🔴 ERROR] ✗ > > Paolo -- Alex Bennée Virtualisation Tech Lead @ Linaro