subprojects: add probe crate

The probe crate (https://crates.io/crates/probe) provides a probe!()
macro that defines SystemTap SDT probes on Linux hosts or does nothing
on other host OSes.

This crate will be used to implement DTrace support for Rust.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Link: https://lore.kernel.org/r/20251119205200.173170-4-stefanha@redhat.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Stefan Hajnoczi
2025-11-19 15:51:59 -05:00
committed by Paolo Bonzini
parent 4536693a72
commit cd9fe9265c
6 changed files with 34 additions and 1 deletions

View File

@@ -4,6 +4,7 @@ subproject('bilge-impl-0.2-rs', required: true)
subproject('foreign-0.3-rs', required: true)
subproject('glib-sys-0.21-rs', required: true)
subproject('libc-0.2-rs', required: true)
subproject('probe-0.5-rs', required: true)
anyhow_rs = dependency('anyhow-1-rs')
bilge_rs = dependency('bilge-0.2-rs')
@@ -11,6 +12,7 @@ bilge_impl_rs = dependency('bilge-impl-0.2-rs')
foreign_rs = dependency('foreign-0.3-rs')
glib_sys_rs = dependency('glib-sys-0.21-rs')
libc_rs = dependency('libc-0.2-rs')
probe_rs = dependency('probe-0.5-rs')
subproject('proc-macro2-1-rs', required: true)
subproject('quote-1-rs', required: true)

View File

@@ -41,6 +41,7 @@ subprojects=(
keycodemapdb
libc-0.2-rs
libvfio-user
probe-0.5-rs
proc-macro-error-1-rs
proc-macro-error-attr-1-rs
proc-macro2-1-rs

View File

@@ -42,7 +42,7 @@ fi
SUBPROJECTS="libvfio-user keycodemapdb berkeley-softfloat-3
berkeley-testfloat-3 anyhow-1-rs arbitrary-int-1-rs attrs-0.2-rs bilge-0.2-rs
bilge-impl-0.2-rs either-1-rs foreign-0.3-rs itertools-0.11-rs
libc-0.2-rs proc-macro2-1-rs
libc-0.2-rs probe-0.5-rs proc-macro2-1-rs
proc-macro-error-1-rs proc-macro-error-attr-1-rs quote-1-rs
syn-2-rs unicode-ident-1-rs"

View File

@@ -16,6 +16,7 @@
/glib-sys-*
/itertools-*
/libc-*
/probe-*
/proc-macro-error-*
/proc-macro-error-attr-*
/proc-macro*

View File

@@ -0,0 +1,22 @@
project('probe-0.5-rs', 'rust',
meson_version: '>=1.5.0',
version: '0.5.2',
license: 'Apache-2.0 OR MIT',
default_options: [])
_probe_rs = static_library(
'probe',
files('src/lib.rs'),
gnu_symbol_visibility: 'hidden',
override_options: ['rust_std=2021', 'build.rust_std=2021'],
rust_abi: 'rust',
rust_args: [
'--cap-lints', 'allow',
],
)
probe_deps = declare_dependency(
link_with: _probe_rs,
)
meson.override_dependency('probe-0.5-rs', probe_deps)

View File

@@ -0,0 +1,7 @@
[wrap-file]
directory = probe-0.5.2
source_url = https://crates.io/api/v1/crates/probe/0.5.2/download
source_filename = probe-0.5.2.tar.gz
source_hash = 136558b6e1ebaecc92755d0ffaf9421f519531bed30cc2ad23b22cb00965cc5e
#method = cargo
patch_directory = probe-0.5-rs