Finally, automatic parsing of Cargo.toml is also possible for QEMU's own crates, not just for subprojects. This removes the need to list the dependencies and language editions in both Cargo.toml and meson.build files. Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
15 lines
406 B
Meson
15 lines
406 B
Meson
rust = import('rust')
|
|
|
|
lib_rs = configure_file(
|
|
input: 'src/lib.rs',
|
|
output: 'lib.rs',
|
|
configuration: {
|
|
'MESON_BUILD_ROOT': meson.project_build_root(),
|
|
})
|
|
|
|
_trace_rs = cargo_ws.package('trace').library(
|
|
structured_sources([lib_rs, trace_rs_targets]))
|
|
cargo_ws.package('trace').override_dependency(declare_dependency(link_with: _trace_rs))
|
|
|
|
trace_rs = declare_dependency(link_with: _trace_rs)
|