From 3dbe0861476d863502831f43889268e8b839d934 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 2 Mar 2026 22:11:56 +0900 Subject: [PATCH 01/13] fix: correct workspace member and dependency paths in root Cargo.toml --- Cargo.toml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9ffb1b1..abec5d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,14 +2,14 @@ members = [ "examples/rust/cycle-benchmark", "examples/rust/mini-adas", - "feo", - "feo-com", - "feo-cpp-build", - "feo-cpp-macros", - "feo-time", - "feo-tracer", - "feo-tracing", - "perfetto-model", + "src/feo", + "src/feo-com", + "src/feo-cpp-build", + "src/feo-cpp-macros", + "src/feo-time", + "src/feo-tracer", + "src/feo-tracing", + "src/perfetto-model", "tests/rust/feo_tests/test_agent", "tests/rust/feo_tests", ] @@ -28,12 +28,12 @@ cc = "1.2.34" console = "0.16.0" clap = { version = "4.5.50", features = ["derive"] } env_logger = "0.11.8" -feo = { path = "feo", default-features = false } -feo-com = { path = "feo-com" } -feo-cpp-build = { path = "feo-cpp-build" } -feo-cpp-macros = { path = "feo-cpp-macros" } -feo-time = { path = "feo-time" } -feo-tracing = { path = "feo-tracing" } +feo = { path = "src/feo", default-features = false } +feo-com = { path = "src/feo-com" } +feo-cpp-build = { path = "src/feo-cpp-build" } +feo-cpp-macros = { path = "src/feo-cpp-macros" } +feo-time = { path = "src/feo-time" } +feo-tracing = { path = "src/feo-tracing" } ctrlc = { version = "3.4.4", features = ["termination"] } futures = "0.3.31" human_bytes = "0.4.3" @@ -44,7 +44,7 @@ libc = "1.0.0-alpha.1" log = { version = "0.4.27" } mio = { version = "1.0.4", features = ["net", "os-poll"] } nix = { version = "0.30.1", features = ["fs", "mman", "signal"] } -perfetto-model = { path = "perfetto-model" } +perfetto-model = { path = "src/perfetto-model" } postcard = "1.1.3" prost = "0.14.1" prost-build = "0.14.1" From 4b3d951dea4b30fd612de591c85518720923303f Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 2 Mar 2026 22:11:56 +0900 Subject: [PATCH 02/13] fix(perfetto-model): support dual-build and unify proto access --- src/perfetto-model/build.rs | 2 ++ src/perfetto-model/src/lib.rs | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/perfetto-model/build.rs b/src/perfetto-model/build.rs index f436844..a8fe7ad 100644 --- a/src/perfetto-model/build.rs +++ b/src/perfetto-model/build.rs @@ -12,5 +12,7 @@ // ******************************************************************************* fn main() -> std::io::Result<()> { + println!("cargo:rustc-check-cfg=cfg(cargo_build)"); + println!("cargo:rustc-cfg=cargo_build"); prost_build::compile_protos(&["protos/perfetto_trace.proto"], &["protos"]).map(drop) } diff --git a/src/perfetto-model/src/lib.rs b/src/perfetto-model/src/lib.rs index 338dbb9..8427c73 100644 --- a/src/perfetto-model/src/lib.rs +++ b/src/perfetto-model/src/lib.rs @@ -10,4 +10,18 @@ // // SPDX-License-Identifier: Apache-2.0 // ******************************************************************************* + +#[cfg(cargo_build)] +mod perfetto_proto { + pub mod perfetto { + pub mod protos { + include!(concat!(env!("OUT_DIR"), "/perfetto.protos.rs")); + } + } +} + +#[cfg(not(cargo_build))] +pub use perfetto_proto::perfetto::protos::*; + +#[cfg(cargo_build)] pub use perfetto_proto::perfetto::protos::*; From d23a6a2a9f0e841bd20c67888a9f7b19d8ad97ec Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 2 Mar 2026 22:11:56 +0900 Subject: [PATCH 03/13] fix(test_agent): enable default com_linux_shm feature for cargo build --- tests/rust/feo_tests/test_agent/Cargo.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/rust/feo_tests/test_agent/Cargo.toml b/tests/rust/feo_tests/test_agent/Cargo.toml index 4210695..ff6b085 100644 --- a/tests/rust/feo_tests/test_agent/Cargo.toml +++ b/tests/rust/feo_tests/test_agent/Cargo.toml @@ -4,8 +4,9 @@ version = "0.1.0" edition = "2024" [features] -com_iox2 = [] -com_linux_shm = [] +default = ["com_linux_shm"] +com_iox2 = ["feo-com/ipc_iceoryx2"] +com_linux_shm = ["feo-com/ipc_linux_shm"] [dependencies] feo = { workspace = true } From f07f76a75f1bb662ea5e519f921487bc905933b6 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 3 Mar 2026 00:38:22 +0900 Subject: [PATCH 04/13] fix: support cargo build/test and align with bazel --- .gitignore | 1 + Cargo.lock | 176 +++++++++++++----- Cargo.toml | 68 +++---- examples/rust/cycle-benchmark/Cargo.toml | 1 + .../cycle-benchmark/src/bin/cycle_bench.rs | 2 +- examples/rust/mini-adas/Cargo.toml | 4 +- src/feo-com/Cargo.toml | 1 + src/feo-com/src/iox2/mod.rs | 2 +- src/feo-time/Cargo.toml | 8 + src/feo-time/src/lib.rs | 5 +- src/feo-tracer/Cargo.toml | 4 +- src/feo-tracing/Cargo.toml | 1 + src/feo/Cargo.toml | 1 + src/feo/src/recording/recorder.rs | 3 +- src/feo/src/recording/registry.rs | 14 +- src/feo/src/scheduler.rs | 2 +- src/feo/src/timestamp.rs | 2 +- tests/rust/feo_tests/Cargo.toml | 1 + tests/rust/feo_tests/src/lib.rs | 22 ++- tests/rust/feo_tests/test_agent/Cargo.toml | 2 + 20 files changed, 212 insertions(+), 108 deletions(-) diff --git a/.gitignore b/.gitignore index 1065de2..ee7af05 100644 --- a/.gitignore +++ b/.gitignore @@ -56,3 +56,4 @@ __pycache__/ /.coverage target +.clwb/ diff --git a/Cargo.lock b/Cargo.lock index b645ab2..a492669 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -227,7 +227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", - "libc 0.2.177", + "libc", "libloading", ] @@ -288,15 +288,15 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "console" -version = "0.16.1" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b430743a6eb14e9764d4260d4c0d8123087d504eeb9c48f2b2a5e810dd369df4" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" dependencies = [ "encode_unicode", - "libc 0.2.177", + "libc", "once_cell", "unicode-width", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -339,6 +339,7 @@ dependencies = [ "feo-time", "feo-tracing", "postcard", + "score_log", "serde", "serde_json", "tracing", @@ -351,7 +352,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", - "serde_core", ] [[package]] @@ -362,7 +362,7 @@ checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ "bitflags", "block2", - "libc 0.2.177", + "libc", "objc2", ] @@ -433,7 +433,7 @@ version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ - "libc 0.2.177", + "libc", "windows-sys 0.61.2", ] @@ -451,9 +451,10 @@ dependencies = [ "feo-com", "feo-time", "feo-tracing", - "libc 1.0.0-alpha.1", + "libc", "mio", "postcard", + "score_log", "serde", ] @@ -463,7 +464,8 @@ version = "0.1.0" dependencies = [ "iceoryx2", "nix", - "rand", + "rand 0.8.5", + "score_log", ] [[package]] @@ -481,7 +483,9 @@ version = "0.1.0" name = "feo-time" version = "0.1.0" dependencies = [ + "score_log", "serde", + "stdout_logger", "time", ] @@ -498,7 +502,9 @@ dependencies = [ "perfetto-model", "postcard", "prost", - "rand", + "rand 0.8.5", + "score_log", + "stdout_logger", "tokio", ] @@ -506,8 +512,9 @@ dependencies = [ name = "feo-tracing" version = "0.1.0" dependencies = [ - "libc 1.0.0-alpha.1", + "libc", "postcard", + "score_log", "serde", "tracing", "tracing-subscriber", @@ -620,6 +627,17 @@ dependencies = [ "slab", ] +[[package]] +name = "getrandom" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + [[package]] name = "getrandom" version = "0.3.4" @@ -627,7 +645,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "libc 0.2.177", + "libc", "r-efi", "wasip2", ] @@ -884,14 +902,14 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.18.3" +version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9375e112e4b463ec1b1c6c011953545c65a30164fbab5b581df32b3abf0dcb88" +checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" dependencies = [ "console", + "number_prefix", "portable-atomic", "unicode-width", - "unit-prefix", "web-time", ] @@ -904,6 +922,7 @@ dependencies = [ "ipc-channel", "log", "nix", + "score_log", "serde", ] @@ -916,9 +935,9 @@ dependencies = [ "bincode", "crossbeam-channel", "fnv", - "libc 0.2.177", + "libc", "mio", - "rand", + "rand 0.9.2", "serde", "tempfile", "uuid", @@ -1007,12 +1026,6 @@ version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" -[[package]] -name = "libc" -version = "1.0.0-alpha.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7222002e5385b4d9327755661e3847c970e8fbf9dea6da8c57f16e8cfbff53a8" - [[package]] name = "libloading" version = "0.8.9" @@ -1067,7 +1080,9 @@ dependencies = [ "feo-time", "feo-tracing", "postcard", + "score_log", "serde", + "stdout_logger", "tracing", ] @@ -1083,7 +1098,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" dependencies = [ - "libc 0.2.177", + "libc", "log", "wasi", "windows-sys 0.61.2", @@ -1104,7 +1119,7 @@ dependencies = [ "bitflags", "cfg-if", "cfg_aliases", - "libc 0.2.177", + "libc", ] [[package]] @@ -1123,6 +1138,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + [[package]] name = "objc2" version = "0.6.3" @@ -1356,14 +1377,35 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + [[package]] name = "rand" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ - "rand_chacha", - "rand_core", + "rand_chacha 0.9.0", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", ] [[package]] @@ -1373,7 +1415,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.9.3", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.17", ] [[package]] @@ -1382,7 +1433,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom", + "getrandom 0.3.4", ] [[package]] @@ -1443,7 +1494,7 @@ checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ "bitflags", "errno", - "libc 0.2.177", + "libc", "linux-raw-sys 0.4.15", "windows-sys 0.59.0", ] @@ -1456,7 +1507,7 @@ checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ "bitflags", "errno", - "libc 0.2.177", + "libc", "linux-raw-sys 0.11.0", "windows-sys 0.61.2", ] @@ -1479,6 +1530,31 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "score_log" +version = "0.0.1" +source = "git+https://github.com/eclipse-score/baselibs_rust.git?rev=1b9f2786cd746ae9745dd2e81bf9073b4185a5e2#1b9f2786cd746ae9745dd2e81bf9073b4185a5e2" +dependencies = [ + "score_log_fmt", + "score_log_fmt_macro", +] + +[[package]] +name = "score_log_fmt" +version = "0.0.1" +source = "git+https://github.com/eclipse-score/baselibs_rust.git?rev=1b9f2786cd746ae9745dd2e81bf9073b4185a5e2#1b9f2786cd746ae9745dd2e81bf9073b4185a5e2" + +[[package]] +name = "score_log_fmt_macro" +version = "0.0.1" +source = "git+https://github.com/eclipse-score/baselibs_rust.git?rev=1b9f2786cd746ae9745dd2e81bf9073b4185a5e2#1b9f2786cd746ae9745dd2e81bf9073b4185a5e2" +dependencies = [ + "proc-macro2", + "quote", + "score_log_fmt", + "syn", +] + [[package]] name = "semver" version = "1.0.27" @@ -1551,11 +1627,12 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.6" +version = "1.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ - "libc 0.2.177", + "errno", + "libc", ] [[package]] @@ -1570,7 +1647,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" dependencies = [ - "libc 0.2.177", + "libc", "windows-sys 0.60.2", ] @@ -1595,6 +1672,14 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "stdout_logger" +version = "0.0.1" +source = "git+https://github.com/eclipse-score/baselibs_rust.git?rev=1b9f2786cd746ae9745dd2e81bf9073b4185a5e2#1b9f2786cd746ae9745dd2e81bf9073b4185a5e2" +dependencies = [ + "score_log", +] + [[package]] name = "strsim" version = "0.11.1" @@ -1619,7 +1704,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", - "getrandom", + "getrandom 0.3.4", "once_cell", "rustix 1.1.2", "windows-sys 0.61.2", @@ -1631,7 +1716,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f11ff5c25c172608d5b85e2fb43ee9a6d683a7f4ab7f96ae07b3d8b590368fd" dependencies = [ - "libc 0.2.177", + "libc", "winapi", ] @@ -1646,8 +1731,10 @@ dependencies = [ "feo-time", "feo-tracing", "ipc-channel", - "libc 1.0.0-alpha.1", + "libc", + "score_log", "serde", + "stdout_logger", "tracing", ] @@ -1714,7 +1801,8 @@ version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "libc 0.2.177", + "bytes", + "libc", "mio", "pin-project-lite", "signal-hook-registry", @@ -1824,12 +1912,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" -[[package]] -name = "unit-prefix" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "323402cff2dd658f39ca17c789b502021b3f18707c91cdf22e3838e1b4023817" - [[package]] name = "utf8parse" version = "0.2.2" @@ -1842,7 +1924,7 @@ version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ - "getrandom", + "getrandom 0.3.4", "js-sys", "wasm-bindgen", ] diff --git a/Cargo.toml b/Cargo.toml index abec5d6..ac772ab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,67 +7,51 @@ members = [ "src/feo-cpp-build", "src/feo-cpp-macros", "src/feo-time", - "src/feo-tracer", "src/feo-tracing", "src/perfetto-model", - "tests/rust/feo_tests/test_agent", + "src/feo-tracer", "tests/rust/feo_tests", + "tests/rust/feo_tests/test_agent", ] resolver = "2" -[workspace.package] -version = "0.1.0" -edition = "2024" - [workspace.dependencies] -anyhow = "1.0.99" -argh = "0.1.13" -async-stream = "0.3.6" -bytes = "1.11.1" -cc = "1.2.34" -console = "0.16.0" -clap = { version = "4.5.50", features = ["derive"] } -env_logger = "0.11.8" -feo = { path = "src/feo", default-features = false } +feo = { path = "src/feo" } feo-com = { path = "src/feo-com" } feo-cpp-build = { path = "src/feo-cpp-build" } feo-cpp-macros = { path = "src/feo-cpp-macros" } feo-time = { path = "src/feo-time" } feo-tracing = { path = "src/feo-tracing" } -ctrlc = { version = "3.4.4", features = ["termination"] } +perfetto-model = { path = "src/perfetto-model" } +anyhow = "1.0.100" +argh = "0.1.13" +cc = "1.2.10" +bindgen = "0.69.5" +clap = { version = "4.5.31", features = ["derive"] } futures = "0.3.31" +env_logger = "0.11.6" +log = "0.4.22" human_bytes = "0.4.3" -iceoryx2 = "0.5.0" -indicatif = "0.18.0" -indicatif-log-bridge = "0.2.3" -libc = "1.0.0-alpha.1" -log = { version = "0.4.27" } -mio = { version = "1.0.4", features = ["net", "os-poll"] } -nix = { version = "0.30.1", features = ["fs", "mman", "signal"] } -perfetto-model = { path = "src/perfetto-model" } +indicatif = "0.17.11" +iceoryx2 = { version = "0.5.0", default-features = false } +libc = "0.2.177" +mio = { version = "1.1.0", features = ["os-poll", "net"] } +nix = { version = "0.30.1", features = ["mman", "fs"] } postcard = "1.1.3" prost = "0.14.1" prost-build = "0.14.1" -rand = "0.9.2" -serde = "1.0.219" -serde_json = "1.0.143" -socket2 = "0.6.0" -time = { version = "0.3.47", features = ["formatting", "macros", "serde"] } -tokio = { version = "1.47.1", features = [ - "rt", - "macros", - "sync", - "net", - "time", - "signal", -] } -tokio-seqpacket = "0.8.0" -tokio-util = { version = "0.7.16", features = ["codec", "net"] } -tracing = { version = "0.1.41", features = [ - "attributes", -], default-features = false } +rand = "0.8.5" +serde = { version = "1.0.228", features = ["derive"] } +serde_json = "1.0.145" +time = { version = "0.3.37", features = ["std", "formatting", "macros"] } +tokio = { version = "1.48.0", features = ["rt-multi-thread", "net", "sync", "macros", "io-util", "time", "signal"] } +ctrlc = { version = "3.5.1", features = ["termination"] } +tracing = { version = "0.1.41", features = ["attributes"], default-features = false } tracing-subscriber = { version = "0.3.20", default-features = false } ipc-channel = "0.20.2" +score_log = { git = "https://github.com/eclipse-score/baselibs_rust.git", rev = "1b9f2786cd746ae9745dd2e81bf9073b4185a5e2" } +stdout_logger = { git = "https://github.com/eclipse-score/baselibs_rust.git", rev = "1b9f2786cd746ae9745dd2e81bf9073b4185a5e2" } + [profile.profiling] inherits = "release" debug = true diff --git a/examples/rust/cycle-benchmark/Cargo.toml b/examples/rust/cycle-benchmark/Cargo.toml index e640476..b42a6bc 100644 --- a/examples/rust/cycle-benchmark/Cargo.toml +++ b/examples/rust/cycle-benchmark/Cargo.toml @@ -16,6 +16,7 @@ tracing = { workspace = true } postcard = { workspace = true, features = ["experimental-derive"] } serde = { workspace = true } serde_json = { workspace = true } +score_log = { workspace = true } [build-dependencies] diff --git a/examples/rust/cycle-benchmark/src/bin/cycle_bench.rs b/examples/rust/cycle-benchmark/src/bin/cycle_bench.rs index 843f2e6..85d2050 100644 --- a/examples/rust/cycle-benchmark/src/bin/cycle_bench.rs +++ b/examples/rust/cycle-benchmark/src/bin/cycle_bench.rs @@ -21,7 +21,7 @@ const DEFAULT_FEO_CYCLE_TIME: Duration = Duration::from_millis(5); fn main() { // Uncomment one or both of the following lines for benchmarking with logging/tracing - // feo_logger::init(feo_log::LevelFilter::Debug, true, true); + // feo_logger::init(score_log::LevelFilter::Debug, true, true); // feo_tracing::init(feo_tracing::LevelFilter::TRACE); let params = Params::from_args(); diff --git a/examples/rust/mini-adas/Cargo.toml b/examples/rust/mini-adas/Cargo.toml index 1fffed0..4b90158 100644 --- a/examples/rust/mini-adas/Cargo.toml +++ b/examples/rust/mini-adas/Cargo.toml @@ -21,6 +21,8 @@ feo-time = { workspace = true } feo-tracing = { workspace = true } postcard = { workspace = true, features = ["experimental-derive"] } serde = { workspace = true, optional = true } +score_log = { workspace = true } +stdout_logger = { workspace = true } tracing = { workspace = true } [build-dependencies] @@ -29,7 +31,7 @@ feo-cpp-build = { workspace = true } [features] com_iox2 = ["feo-com/ipc_iceoryx2"] com_linux_shm = ["feo-com/ipc_linux_shm"] -default = ["com_iox2", "signalling_relayed_tcp"] +default = ["com_linux_shm", "signalling_relayed_tcp"] signalling_direct_mpsc = [] signalling_direct_tcp = [] signalling_direct_unix = [] diff --git a/src/feo-com/Cargo.toml b/src/feo-com/Cargo.toml index d6e27bb..9add7d6 100644 --- a/src/feo-com/Cargo.toml +++ b/src/feo-com/Cargo.toml @@ -7,6 +7,7 @@ edition = "2024" iceoryx2 = { workspace = true, optional = true } nix = { workspace = true, optional = true } rand = { workspace = true, optional = true } +score_log = { workspace = true } [features] default = ["ipc_linux_shm"] diff --git a/src/feo-com/src/iox2/mod.rs b/src/feo-com/src/iox2/mod.rs index e940315..414f1a5 100644 --- a/src/feo-com/src/iox2/mod.rs +++ b/src/feo-com/src/iox2/mod.rs @@ -22,7 +22,6 @@ use alloc::format; use core::fmt; use core::mem::MaybeUninit; use core::ops::{Deref, DerefMut}; -use feo_log::{error, info}; use iceoryx2::config::Config; use iceoryx2::node::{Node, NodeBuilder, NodeState}; use iceoryx2::port::publisher::Publisher; @@ -32,6 +31,7 @@ use iceoryx2::sample::Sample; use iceoryx2::sample_mut::SampleMut; use iceoryx2::sample_mut_uninit::SampleMutUninit; use iceoryx2::service::ipc; +use score_log::{error, info}; use std::process; /// Initialize topic with the given number of writers (publishers) and readers (subscribers). diff --git a/src/feo-time/Cargo.toml b/src/feo-time/Cargo.toml index 3808946..c9cf0fe 100644 --- a/src/feo-time/Cargo.toml +++ b/src/feo-time/Cargo.toml @@ -6,3 +6,11 @@ edition = "2024" [dependencies] time = { workspace = true } serde = { workspace = true } +score_log = { workspace = true } + +[dev-dependencies] +stdout_logger = { workspace = true } + +[features] +default = ["std"] +std = ["serde/std"] diff --git a/src/feo-time/src/lib.rs b/src/feo-time/src/lib.rs index 194d28c..e0c117b 100644 --- a/src/feo-time/src/lib.rs +++ b/src/feo-time/src/lib.rs @@ -73,6 +73,7 @@ pub struct Duration(pub core::time::Duration); impl Duration { pub const ZERO: Duration = Duration(core::time::Duration::ZERO); + pub const MAX: Duration = Duration(core::time::Duration::MAX); pub fn as_secs(&self) -> u64 { self.0.as_secs() @@ -590,7 +591,7 @@ impl Add for SystemTime { /// This function may panic if the resulting point in time cannot be represented by the /// underlying data structure. See [`SystemTime::checked_add`] for a version without panic. fn add(self, dur: Duration) -> SystemTime { - SystemTime(self.0.add(dur.into())) + SystemTime(self.0.add(dur.0)) } } @@ -604,7 +605,7 @@ impl Sub for SystemTime { type Output = SystemTime; fn sub(self, dur: Duration) -> SystemTime { - SystemTime(self.0.sub(dur.into())) + SystemTime(self.0.sub(dur.0)) } } diff --git a/src/feo-tracer/Cargo.toml b/src/feo-tracer/Cargo.toml index 876dc18..625dbcf 100644 --- a/src/feo-tracer/Cargo.toml +++ b/src/feo-tracer/Cargo.toml @@ -14,4 +14,6 @@ perfetto-model = { workspace = true } postcard = { workspace = true } prost = { workspace = true } rand = { workspace = true } -tokio = { workspace = true, features = ["rt-multi-thread"] } +score_log = { workspace = true } +stdout_logger = { workspace = true } +tokio = { workspace = true } diff --git a/src/feo-tracing/Cargo.toml b/src/feo-tracing/Cargo.toml index 027d2d7..7c40126 100644 --- a/src/feo-tracing/Cargo.toml +++ b/src/feo-tracing/Cargo.toml @@ -9,3 +9,4 @@ postcard = { workspace = true } serde = { workspace = true } tracing = { workspace = true } tracing-subscriber = { workspace = true } +score_log = { workspace = true } diff --git a/src/feo/Cargo.toml b/src/feo/Cargo.toml index b988704..f8cf20f 100644 --- a/src/feo/Cargo.toml +++ b/src/feo/Cargo.toml @@ -7,6 +7,7 @@ edition = "2024" feo-com = { workspace = true } feo-time = { workspace = true } feo-tracing = { workspace = true } +score_log = { workspace = true } libc = { workspace = true } mio = { workspace = true } postcard = { workspace = true, features = [ diff --git a/src/feo/src/recording/recorder.rs b/src/feo/src/recording/recorder.rs index bd3ec4a..0462230 100644 --- a/src/feo/src/recording/recorder.rs +++ b/src/feo/src/recording/recorder.rs @@ -291,13 +291,12 @@ impl MaxSize for DataDescriptionRecord<'_> { mod test { use super::*; use alloc::string::String; - use core::time::Duration; #[test] fn test_max_size_for_data_description_record() { let s = String::from_utf8(vec![b'a'; TOPIC_TYPENAME_MAX_SIZE]).expect("valid string"); let record = DataDescriptionRecord { - timestamp: Timestamp(Duration::MAX), + timestamp: Timestamp(feo_time::Duration::MAX), data_size: usize::MAX, type_name: &s, topic: &s, diff --git a/src/feo/src/recording/registry.rs b/src/feo/src/recording/registry.rs index 2ace242..ea53a07 100644 --- a/src/feo/src/recording/registry.rs +++ b/src/feo/src/recording/registry.rs @@ -16,7 +16,7 @@ use crate::recording::transcoder::{ComRecTranscoderBuilder, RecordingTranscoder} use alloc::borrow::ToOwned as _; use alloc::boxed::Box; use feo_com::interface::ActivityInput; -use score_log::fmt::ScoreDebug; +use score_log::ScoreDebug; use serde::Serialize; use std::collections::HashMap; @@ -52,7 +52,9 @@ impl TypeRegistry { /// This method will panic if /// - a type with identical type id (i.e. the same type) has already been registered /// - the explicitly or implicitly provided type name is not unique - pub fn add( + pub fn add< + T: Serialize + postcard::experimental::max_size::MaxSize + core::fmt::Debug + score_log::fmt::ScoreDebug + 'static, + >( &mut self, type_name: Option<&'static str>, input_builder: impl Fn(&str) -> Box> + Clone + Send + 'static, @@ -148,19 +150,19 @@ fn test_type_registry() { // Dummy input implementation for the test struct DummyInput; - impl ActivityInput for DummyInput { + impl ActivityInput for DummyInput { fn read(&self) -> Result, feo_com::interface::Error> { todo!() } } - #[derive(Debug, serde::Serialize, postcard::experimental::max_size::MaxSize)] + #[derive(Debug, serde::Serialize, postcard::experimental::max_size::MaxSize, ScoreDebug)] struct TestType1 {} - #[derive(Debug, serde::Serialize, postcard::experimental::max_size::MaxSize)] + #[derive(Debug, serde::Serialize, postcard::experimental::max_size::MaxSize, ScoreDebug)] struct TestType2 {} - #[derive(Debug, serde::Serialize, postcard::experimental::max_size::MaxSize)] + #[derive(Debug, serde::Serialize, postcard::experimental::max_size::MaxSize, ScoreDebug)] struct TestType3 {} let mut registry = TypeRegistry::default(); diff --git a/src/feo/src/scheduler.rs b/src/feo/src/scheduler.rs index 0fd4ffd..e15f3e0 100644 --- a/src/feo/src/scheduler.rs +++ b/src/feo/src/scheduler.rs @@ -515,7 +515,7 @@ mod loop_duration_meter { impl LoopDurationMeter { pub fn track(&mut self, duration: &feo_time::Duration) { - self.duration_micros += duration.subsec_micros() as usize + 1000000 * duration.as_secs() as usize; + self.duration_micros += duration.0.subsec_micros() as usize + 1000000 * duration.as_secs() as usize; self.num_steps += 1; if self.num_steps == NUM_STEPS { diff --git a/src/feo/src/timestamp.rs b/src/feo/src/timestamp.rs index 4e08a87..a541195 100644 --- a/src/feo/src/timestamp.rs +++ b/src/feo/src/timestamp.rs @@ -64,7 +64,7 @@ pub fn initialize_from(sync_info: SyncInfo) { let time_info_now = time_info_now(); // Calculate the startup time of the primary agent - let startup_time = std::time::SystemTime::UNIX_EPOCH + sync_info.since_epoch.into(); + let startup_time = std::time::SystemTime::UNIX_EPOCH + sync_info.since_epoch.0; // Calculate the time elapsed since the startup of the primary agent; // assumption is that system clocks are synchronized (but monotonic clocks can be unsynchronized). diff --git a/tests/rust/feo_tests/Cargo.toml b/tests/rust/feo_tests/Cargo.toml index 451f519..4f9928d 100644 --- a/tests/rust/feo_tests/Cargo.toml +++ b/tests/rust/feo_tests/Cargo.toml @@ -9,4 +9,5 @@ ipc-channel = { workspace = true } serde = { workspace = true } nix = { workspace = true } log = { workspace = true } +score_log = { workspace = true } env_logger = { workspace = true } diff --git a/tests/rust/feo_tests/src/lib.rs b/tests/rust/feo_tests/src/lib.rs index dde6f02..90ee026 100644 --- a/tests/rust/feo_tests/src/lib.rs +++ b/tests/rust/feo_tests/src/lib.rs @@ -31,7 +31,10 @@ mod monitor; fn aquire_lock() -> MutexGuard<'static, ()> { static MUTEX: Mutex<()> = Mutex::new(()); let _ = env_logger::try_init(); - MUTEX.lock().unwrap() + match MUTEX.lock() { + Ok(guard) => guard, + Err(poisoned) => poisoned.into_inner(), + } } #[derive(Parser)] @@ -253,9 +256,22 @@ pub const TEST_AGENT_PATH: &str = "./tests/rust/feo_tests/test_agent/test_agent" impl Default for Cli { fn default() -> Self { - Self { - test_agent: PathBuf::from(TEST_AGENT_PATH), + let mut test_agent = PathBuf::from(TEST_AGENT_PATH); + if !test_agent.exists() { + // Fallback for cargo. Find the workspace root. + let mut current = std::env::current_dir().unwrap(); + loop { + let candidate = current.join("target/debug/test_agent"); + if candidate.exists() { + test_agent = candidate; + break; + } + if !current.pop() { + break; + } + } } + Self { test_agent } } } diff --git a/tests/rust/feo_tests/test_agent/Cargo.toml b/tests/rust/feo_tests/test_agent/Cargo.toml index ff6b085..8f7a31f 100644 --- a/tests/rust/feo_tests/test_agent/Cargo.toml +++ b/tests/rust/feo_tests/test_agent/Cargo.toml @@ -19,3 +19,5 @@ libc = { workspace = true } clap = { workspace = true } ipc-channel = { workspace = true } serde = { workspace = true } +score_log = { workspace = true } +stdout_logger = { workspace = true } From dd4eae1c3bc5453666184fd477c1c65eae02ba7e Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 3 Mar 2026 01:13:02 +0900 Subject: [PATCH 05/13] ci: fix protobuf-compiler installation by updating apt index --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22edab2..3e144cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,9 @@ jobs: - uses: actions/checkout@v4 - name: Install protobuf-compiler - run: sudo apt-get install protobuf-compiler + run: | + sudo apt-get update + sudo apt-get install protobuf-compiler - uses: bazelbuild/setup-bazelisk@v3 From 3e696aa14e7164e7d693fc52a84af7ff2f87543a Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 3 Mar 2026 01:57:29 +0900 Subject: [PATCH 06/13] build: align bazel module versions to fix nix features in CI --- MODULE.bazel | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MODULE.bazel b/MODULE.bazel index 7aed7aa..076d404 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -42,7 +42,7 @@ bazel_dep(name = "protobuf", version = "30.2", repo_name = "com_google_protobuf" bazel_dep(name = "rules_proto", version = "7.1.0") # Tooling -bazel_dep(name = "aspect_rules_lint", version = "1.5.3") +bazel_dep(name = "aspect_rules_lint", version = "2.0.0") bazel_dep(name = "buildifier_prebuilt", version = "8.2.0.2") bazel_dep(name = "googletest", version = "1.17.0") bazel_dep(name = "score_docs_as_code", version = "3.0.0") @@ -82,7 +82,7 @@ bazel_dep(name = "score_rust_policies", version = "0.0.5", dev_dependency = True register_toolchains("//toolchain/prost:prost_toolchain") # Python toolchain -bazel_dep(name = "rules_python", version = "1.4.1") +bazel_dep(name = "rules_python", version = "1.8.3") PYTHON_VERSION = "3.12" From cd40b7b177de649b3e907442eeb9e735b6dba1c3 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 3 Mar 2026 02:13:02 +0900 Subject: [PATCH 07/13] fix: enable missing nix features required by feo_tests --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ac772ab..7d0ebd0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ indicatif = "0.17.11" iceoryx2 = { version = "0.5.0", default-features = false } libc = "0.2.177" mio = { version = "1.1.0", features = ["os-poll", "net"] } -nix = { version = "0.30.1", features = ["mman", "fs"] } +nix = { version = "0.30.1", features = ["mman", "fs", "signal", "process"] } postcard = "1.1.3" prost = "0.14.1" prost-build = "0.14.1" From 48464d3341e7c1d16bf975b81e22e81e41f81308 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 3 Mar 2026 11:06:16 +0900 Subject: [PATCH 08/13] fix(bazel): enable nix signal+process features for feo_tests --- MODULE.bazel | 16 ++++++++++++++++ tests/rust/feo_tests/BUILD | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/MODULE.bazel b/MODULE.bazel index 076d404..d57f7dc 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -33,6 +33,22 @@ git_override( bazel_dep(name = "rules_rust", version = "0.67.0") bazel_dep(name = "rules_rust_prost", version = "0.67.0") +# score_crates 0.0.6 only enables ["fs", "mman"] for nix, but feo_tests also needs +# ["signal", "process"]. Define a local crate repository with the full feature set. +crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate") +crate.spec( + features = [ + "fs", + "mman", + "process", + "signal", + ], + package = "nix", + version = "0.30.1", +) +crate.from_specs(name = "feo_crates") +use_repo(crate, "feo_crates") + # Protobuf # Repo_name override is needed here for compatibility with WORKSPACE (e.g.for rules_rust_prost) # Newer protobuf versions generate warnings during compilation which will cause the build failure due diff --git a/tests/rust/feo_tests/BUILD b/tests/rust/feo_tests/BUILD index 191fb1f..77509b8 100644 --- a/tests/rust/feo_tests/BUILD +++ b/tests/rust/feo_tests/BUILD @@ -27,7 +27,7 @@ rust_test( "@score_crates//:env_logger", "@score_crates//:ipc_channel", "@score_crates//:log", - "@score_crates//:nix", + "@feo_crates//:nix", "@score_crates//:serde", ], ) From 44eecbf06a56c0dac98f4e93b26358b98e7b8b76 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 3 Mar 2026 11:13:01 +0900 Subject: [PATCH 09/13] style: sort BUILD deps alphabetically --- tests/rust/feo_tests/BUILD | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/rust/feo_tests/BUILD b/tests/rust/feo_tests/BUILD index 77509b8..cd05add 100644 --- a/tests/rust/feo_tests/BUILD +++ b/tests/rust/feo_tests/BUILD @@ -23,11 +23,11 @@ rust_test( data = ["//tests/rust/feo_tests/test_agent"], edition = "2024", deps = [ + "@feo_crates//:nix", "@score_crates//:clap", "@score_crates//:env_logger", "@score_crates//:ipc_channel", "@score_crates//:log", - "@feo_crates//:nix", "@score_crates//:serde", ], ) From da0ccf82f5533f1fa61c347eb35e011d2ca969e2 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 3 Mar 2026 15:18:18 +0900 Subject: [PATCH 10/13] fix: move ScoreDebug import into test scope --- src/feo/src/recording/registry.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/feo/src/recording/registry.rs b/src/feo/src/recording/registry.rs index ea53a07..27761b5 100644 --- a/src/feo/src/recording/registry.rs +++ b/src/feo/src/recording/registry.rs @@ -16,7 +16,6 @@ use crate::recording::transcoder::{ComRecTranscoderBuilder, RecordingTranscoder} use alloc::borrow::ToOwned as _; use alloc::boxed::Box; use feo_com::interface::ActivityInput; -use score_log::ScoreDebug; use serde::Serialize; use std::collections::HashMap; @@ -146,6 +145,8 @@ macro_rules! register_types { #[test] fn test_type_registry() { + use score_log::ScoreDebug; + #[derive(Debug)] // Dummy input implementation for the test struct DummyInput; From b5d296a061bc3659532b700cb6f0ef1d847a5af0 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 3 Mar 2026 22:06:26 +0900 Subject: [PATCH 11/13] refactor: add feo_time::Duration::subsec_micros for encapsulation --- src/feo-time/src/lib.rs | 4 ++++ src/feo/src/scheduler.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/feo-time/src/lib.rs b/src/feo-time/src/lib.rs index e0c117b..ddc00e0 100644 --- a/src/feo-time/src/lib.rs +++ b/src/feo-time/src/lib.rs @@ -83,6 +83,10 @@ impl Duration { self.0.subsec_nanos() } + pub fn subsec_micros(&self) -> u32 { + self.0.subsec_micros() + } + #[allow(dead_code)] pub const fn from_secs(secs: u64) -> Self { Self(core::time::Duration::from_secs(secs)) diff --git a/src/feo/src/scheduler.rs b/src/feo/src/scheduler.rs index e15f3e0..0fd4ffd 100644 --- a/src/feo/src/scheduler.rs +++ b/src/feo/src/scheduler.rs @@ -515,7 +515,7 @@ mod loop_duration_meter { impl LoopDurationMeter { pub fn track(&mut self, duration: &feo_time::Duration) { - self.duration_micros += duration.0.subsec_micros() as usize + 1000000 * duration.as_secs() as usize; + self.duration_micros += duration.subsec_micros() as usize + 1000000 * duration.as_secs() as usize; self.num_steps += 1; if self.num_steps == NUM_STEPS { From 9548ccd28c386bc5afabadae34dad9847c4b88ee Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 3 Mar 2026 22:22:38 +0900 Subject: [PATCH 12/13] refactor: use explicit duration conversion in timestamp.rs --- src/feo/src/timestamp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/feo/src/timestamp.rs b/src/feo/src/timestamp.rs index a541195..9858fbc 100644 --- a/src/feo/src/timestamp.rs +++ b/src/feo/src/timestamp.rs @@ -64,7 +64,7 @@ pub fn initialize_from(sync_info: SyncInfo) { let time_info_now = time_info_now(); // Calculate the startup time of the primary agent - let startup_time = std::time::SystemTime::UNIX_EPOCH + sync_info.since_epoch.0; + let startup_time = std::time::SystemTime::UNIX_EPOCH + core::time::Duration::from(sync_info.since_epoch); // Calculate the time elapsed since the startup of the primary agent; // assumption is that system clocks are synchronized (but monotonic clocks can be unsynchronized). From 92e4231fb12ef4d5373cd78d1d84685c1e38d9bc Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 3 Mar 2026 22:46:39 +0900 Subject: [PATCH 13/13] fix: restore dependency versions and enable missing tokio features --- Cargo.lock | 129 +++++++++++++++++++---------------------------------- Cargo.toml | 57 +++++++++++++++-------- 2 files changed, 86 insertions(+), 100 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a492669..a681164 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -227,7 +227,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", - "libc", + "libc 0.2.177", "libloading", ] @@ -288,15 +288,15 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "console" -version = "0.15.11" +version = "0.16.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +checksum = "03e45a4a8926227e4197636ba97a9fc9b00477e9f4bd711395687c5f0734bec4" dependencies = [ "encode_unicode", - "libc", + "libc 0.2.177", "once_cell", "unicode-width", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -352,6 +352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", + "serde_core", ] [[package]] @@ -362,7 +363,7 @@ checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec" dependencies = [ "bitflags", "block2", - "libc", + "libc 0.2.177", "objc2", ] @@ -433,7 +434,7 @@ version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ - "libc", + "libc 0.2.177", "windows-sys 0.61.2", ] @@ -451,7 +452,7 @@ dependencies = [ "feo-com", "feo-time", "feo-tracing", - "libc", + "libc 1.0.0-alpha.3", "mio", "postcard", "score_log", @@ -464,7 +465,7 @@ version = "0.1.0" dependencies = [ "iceoryx2", "nix", - "rand 0.8.5", + "rand", "score_log", ] @@ -502,7 +503,7 @@ dependencies = [ "perfetto-model", "postcard", "prost", - "rand 0.8.5", + "rand", "score_log", "stdout_logger", "tokio", @@ -512,7 +513,7 @@ dependencies = [ name = "feo-tracing" version = "0.1.0" dependencies = [ - "libc", + "libc 1.0.0-alpha.3", "postcard", "score_log", "serde", @@ -627,17 +628,6 @@ dependencies = [ "slab", ] -[[package]] -name = "getrandom" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - [[package]] name = "getrandom" version = "0.3.4" @@ -645,7 +635,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", - "libc", + "libc 0.2.177", "r-efi", "wasip2", ] @@ -902,14 +892,14 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.17.11" +version = "0.18.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" +checksum = "25470f23803092da7d239834776d653104d551bc4d7eacaf31e6837854b8e9eb" dependencies = [ "console", - "number_prefix", "portable-atomic", "unicode-width", + "unit-prefix", "web-time", ] @@ -935,9 +925,9 @@ dependencies = [ "bincode", "crossbeam-channel", "fnv", - "libc", + "libc 0.2.177", "mio", - "rand 0.9.2", + "rand", "serde", "tempfile", "uuid", @@ -1026,6 +1016,12 @@ version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" +[[package]] +name = "libc" +version = "1.0.0-alpha.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e136bfa874086c78f34d6eba98c423fefe464ce57f38164d16893ba8ed358e70" + [[package]] name = "libloading" version = "0.8.9" @@ -1098,7 +1094,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" dependencies = [ - "libc", + "libc 0.2.177", "log", "wasi", "windows-sys 0.61.2", @@ -1119,7 +1115,7 @@ dependencies = [ "bitflags", "cfg-if", "cfg_aliases", - "libc", + "libc 0.2.177", ] [[package]] @@ -1138,12 +1134,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - [[package]] name = "objc2" version = "0.6.3" @@ -1227,9 +1217,9 @@ checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "portable-atomic" -version = "1.11.1" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" @@ -1377,35 +1367,14 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - [[package]] name = "rand" version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ - "rand_chacha 0.9.0", - "rand_core 0.9.3", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "rand_chacha", + "rand_core", ] [[package]] @@ -1415,16 +1384,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", - "rand_core 0.9.3", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.17", + "rand_core", ] [[package]] @@ -1433,7 +1393,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.4", + "getrandom", ] [[package]] @@ -1494,7 +1454,7 @@ checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ "bitflags", "errno", - "libc", + "libc 0.2.177", "linux-raw-sys 0.4.15", "windows-sys 0.59.0", ] @@ -1507,7 +1467,7 @@ checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ "bitflags", "errno", - "libc", + "libc 0.2.177", "linux-raw-sys 0.11.0", "windows-sys 0.61.2", ] @@ -1632,7 +1592,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" dependencies = [ "errno", - "libc", + "libc 0.2.177", ] [[package]] @@ -1647,7 +1607,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" dependencies = [ - "libc", + "libc 0.2.177", "windows-sys 0.60.2", ] @@ -1704,7 +1664,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom", "once_cell", "rustix 1.1.2", "windows-sys 0.61.2", @@ -1716,7 +1676,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f11ff5c25c172608d5b85e2fb43ee9a6d683a7f4ab7f96ae07b3d8b590368fd" dependencies = [ - "libc", + "libc 0.2.177", "winapi", ] @@ -1731,7 +1691,7 @@ dependencies = [ "feo-time", "feo-tracing", "ipc-channel", - "libc", + "libc 1.0.0-alpha.3", "score_log", "serde", "stdout_logger", @@ -1801,8 +1761,7 @@ version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff360e02eab121e0bc37a2d3b4d4dc622e6eda3a8e5253d5435ecf5bd4c68408" dependencies = [ - "bytes", - "libc", + "libc 0.2.177", "mio", "pin-project-lite", "signal-hook-registry", @@ -1912,6 +1871,12 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" +[[package]] +name = "unit-prefix" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81e544489bf3d8ef66c953931f56617f423cd4b5494be343d9b9d3dda037b9a3" + [[package]] name = "utf8parse" version = "0.2.2" @@ -1924,7 +1889,7 @@ version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" dependencies = [ - "getrandom 0.3.4", + "getrandom", "js-sys", "wasm-bindgen", ] diff --git a/Cargo.toml b/Cargo.toml index 7d0ebd0..01a25a6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,10 @@ members = [ ] resolver = "2" +[workspace.package] +version = "0.1.0" +edition = "2024" + [workspace.dependencies] feo = { path = "src/feo" } feo-com = { path = "src/feo-com" } @@ -23,30 +27,47 @@ feo-cpp-macros = { path = "src/feo-cpp-macros" } feo-time = { path = "src/feo-time" } feo-tracing = { path = "src/feo-tracing" } perfetto-model = { path = "src/perfetto-model" } -anyhow = "1.0.100" + +anyhow = "1.0.99" argh = "0.1.13" -cc = "1.2.10" -bindgen = "0.69.5" -clap = { version = "4.5.31", features = ["derive"] } +async-stream = "0.3.6" +bytes = "1.11.1" +cc = "1.2.34" +console = "0.16.0" +clap = { version = "4.5.50", features = ["derive"] } +env_logger = "0.11.8" +ctrlc = { version = "3.4.4", features = ["termination"] } futures = "0.3.31" -env_logger = "0.11.6" -log = "0.4.22" human_bytes = "0.4.3" -indicatif = "0.17.11" -iceoryx2 = { version = "0.5.0", default-features = false } -libc = "0.2.177" -mio = { version = "1.1.0", features = ["os-poll", "net"] } -nix = { version = "0.30.1", features = ["mman", "fs", "signal", "process"] } +iceoryx2 = "0.5.0" +indicatif = "0.18.0" +indicatif-log-bridge = "0.2.3" +libc = "1.0.0-alpha.1" +log = { version = "0.4.27" } +mio = { version = "1.0.4", features = ["net", "os-poll"] } +nix = { version = "0.30.1", features = ["fs", "mman", "signal", "process"] } postcard = "1.1.3" prost = "0.14.1" prost-build = "0.14.1" -rand = "0.8.5" -serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.145" -time = { version = "0.3.37", features = ["std", "formatting", "macros"] } -tokio = { version = "1.48.0", features = ["rt-multi-thread", "net", "sync", "macros", "io-util", "time", "signal"] } -ctrlc = { version = "3.5.1", features = ["termination"] } -tracing = { version = "0.1.41", features = ["attributes"], default-features = false } +rand = "0.9.2" +serde = { version = "1.0.219", features = ["derive"] } +serde_json = "1.0.143" +socket2 = "0.6.0" +time = { version = "0.3.47", features = ["formatting", "macros", "serde"] } +tokio = { version = "1.47.1", features = [ + "rt", + "rt-multi-thread", + "macros", + "sync", + "net", + "time", + "signal", +] } +tokio-seqpacket = "0.8.0" +tokio-util = { version = "0.7.16", features = ["codec", "net"] } +tracing = { version = "0.1.41", features = [ + "attributes", +], default-features = false } tracing-subscriber = { version = "0.3.20", default-features = false } ipc-channel = "0.20.2" score_log = { git = "https://github.com/eclipse-score/baselibs_rust.git", rev = "1b9f2786cd746ae9745dd2e81bf9073b4185a5e2" }