Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ __pycache__/
/.coverage

target
.clwb/
77 changes: 62 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 23 additions & 18 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
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",
"tests/rust/feo_tests/test_agent",
"src/feo",
"src/feo-com",
"src/feo-cpp-build",
"src/feo-cpp-macros",
"src/feo-time",
"src/feo-tracing",
"src/perfetto-model",
"src/feo-tracer",
"tests/rust/feo_tests",
"tests/rust/feo_tests/test_agent",
]
resolver = "2"

Expand All @@ -20,6 +20,14 @@ version = "0.1.0"
edition = "2024"

[workspace.dependencies]
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" }
perfetto-model = { path = "src/perfetto-model" }

anyhow = "1.0.99"
argh = "0.1.13"
async-stream = "0.3.6"
Expand All @@ -28,12 +36,6 @@ 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" }
ctrlc = { version = "3.4.4", features = ["termination"] }
futures = "0.3.31"
human_bytes = "0.4.3"
Expand All @@ -43,18 +45,18 @@ 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 = "perfetto-model" }
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.9.2"
serde = "1.0.219"
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",
Expand All @@ -68,6 +70,9 @@ tracing = { version = "0.1.41", features = [
], 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
20 changes: 18 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be handled in score_crates, not in feo

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
Expand All @@ -42,7 +58,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")
Expand Down Expand Up @@ -82,7 +98,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"

Expand Down
1 change: 1 addition & 0 deletions examples/rust/cycle-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
2 changes: 1 addition & 1 deletion examples/rust/cycle-benchmark/src/bin/cycle_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion examples/rust/mini-adas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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 = []
Expand Down
1 change: 1 addition & 0 deletions src/feo-com/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Loading
Loading