Skip to content
Merged
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
65 changes: 0 additions & 65 deletions .github/workflows/lint_fmt.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/rustfmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

bazel run @score_tooling//format_checker:rustfmt_with_policies
12 changes: 10 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,18 @@
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true,
"editor.rulers": [
150
]
},
"rust-analyzer.runnables.command": "cargo xtask",
"rust-analyzer.cargo.features": [
"qm"
],
"rust-analyzer.cargo.cfgs": [
"debug_assertions",
"!miri"
],
"rust-analyzer.check.command": "clippy",
"rust-analyzer.rustfmt.overrideCommand": [
"${workspaceFolder}/.vscode/rustfmt.sh"
]
}
17 changes: 11 additions & 6 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# *******************************************************************************
module(
name = "score_orchestrator",
version = "0.0.4",
version = "0.0.0",
compatibility_level = 0,
)

Expand All @@ -35,12 +35,17 @@ bazel_dep(name = "platforms", version = "1.0.0")

# S-CORE process rules
bazel_dep(name = "score_bazel_platforms", version = "0.0.4")
bazel_dep(name = "score_docs_as_code", version = "2.2.0")
bazel_dep(name = "score_tooling", version = "1.0.4")
bazel_dep(name = "score_docs_as_code", version = "3.0.0")
bazel_dep(name = "score_tooling", version = "1.1.0")

bazel_dep(name = "score_process", version = "1.4.0", dev_dependency = True)
bazel_dep(name = "score_platform", version = "0.4.2", dev_dependency = True) # This is main score repo
bazel_dep(name = "score_virtualization", version = "0.0.1", dev_dependency = True)
bazel_dep(name = "score_process", version = "1.4.3", dev_dependency = True)
bazel_dep(name = "score_platform", version = "0.5.2", dev_dependency = True) # This is main score repo
git_override(
module_name = "score_platform",
commit = "6ef2b8c740eb538d9b9b44fabd3dea5e0a888da6",
remote = "https://github.com/qorix-group/score.git",
)

# Toolchains and extensions
bazel_dep(name = "score_bazel_cpp_toolchains", version = "0.2.2", dev_dependency = True)
Expand Down Expand Up @@ -127,4 +132,4 @@ use_repo(pip, "pip_score_venv_test")

# Module deps
bazel_dep(name = "score_crates", version = "0.0.7")
bazel_dep(name = "score_kyron", version = "0.0.3")
bazel_dep(name = "score_kyron", version = "0.1.0")
10 changes: 4 additions & 6 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# rust formatter rules.
# check configuration fields here: https://rust-lang.github.io/rustfmt/?version=v1.6.0&search=


tab_spaces = 4
max_width = 150
# `rustfmt` should not be used with local configuration.
# Use Bazel target for formatting.
# E.g., `bazel run //:format.fix_Rust_with_rustfmt`
DO_NOT_USE_LOCAL_RUSTFMT_TOML = false
6 changes: 3 additions & 3 deletions src/orchestration/examples/basic.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2025 Contributors to the Eclipse Foundation
// *******************************************************************************
// Copyright (c) 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
Expand All @@ -9,7 +9,7 @@
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// SPDX-License-Identifier: Apache-2.0
//
// *******************************************************************************

use core::time::Duration;

Expand Down
9 changes: 5 additions & 4 deletions src/orchestration/examples/branching.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2025 Contributors to the Eclipse Foundation
// *******************************************************************************
// Copyright (c) 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
Expand All @@ -9,7 +9,7 @@
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// SPDX-License-Identifier: Apache-2.0
//
// *******************************************************************************

use kyron::runtime::*;
use kyron_foundation::prelude::*;
Expand Down Expand Up @@ -84,7 +84,8 @@ fn main() {
let mut program1 = program_manager.get_program("ExampleProgram1").unwrap();
let mut program2 = program_manager.get_program("ExampleProgram2").unwrap();

let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2));
let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new()
.with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2));
let mut runtime = builder.build().unwrap();
runtime.block_on(async move {
info!("Running program 1");
Expand Down
6 changes: 3 additions & 3 deletions src/orchestration/examples/camera_drv_object_det/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2025 Contributors to the Eclipse Foundation
// *******************************************************************************
// Copyright (c) 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
Expand All @@ -9,7 +9,7 @@
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// SPDX-License-Identifier: Apache-2.0
//
// *******************************************************************************

fn main() {
let orchestration_macro_include = "../../../orchestration_macros/cpp/include";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2025 Contributors to the Eclipse Foundation
// *******************************************************************************
// Copyright (c) 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
Expand All @@ -9,7 +9,7 @@
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// SPDX-License-Identifier: Apache-2.0
//
// *******************************************************************************

use kyron_foundation::prelude::*;
use orchestration::actions::invoke::InvokeResult;
Expand Down
23 changes: 15 additions & 8 deletions src/orchestration/examples/camera_drv_object_det/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2025 Contributors to the Eclipse Foundation
// *******************************************************************************
// Copyright (c) 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
Expand All @@ -9,7 +9,7 @@
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// SPDX-License-Identifier: Apache-2.0
//
// *******************************************************************************

pub mod camera_driver;
pub mod object_detection;
Expand Down Expand Up @@ -92,11 +92,16 @@ fn obj_det_design() -> Result<Design, CommonErrors> {
let mut design = Design::new("obj_det_design".into(), DesignConfig::default());

let obj_det = Arc::new(Mutex::new(ObjectDetection::new()));
let t1_tag = design.register_invoke_method("pre_processing".into(), obj_det.clone(), ObjectDetection::pre_processing)?;
let t1_tag = design.register_invoke_method(
"pre_processing".into(),
obj_det.clone(),
ObjectDetection::pre_processing,
)?;
let t2_tag = design.register_invoke_method("drive_q1".into(), obj_det.clone(), ObjectDetection::drive_q1)?;
let t3_tag = design.register_invoke_method("drive_q2".into(), obj_det.clone(), ObjectDetection::drive_q2)?;
let t4_tag = design.register_invoke_method("drive_q3".into(), obj_det.clone(), ObjectDetection::drive_q3)?;
let t5_tag = design.register_invoke_method("object_fusion".into(), obj_det.clone(), ObjectDetection::object_fusion)?;
let t5_tag =
design.register_invoke_method("object_fusion".into(), obj_det.clone(), ObjectDetection::object_fusion)?;

design.register_event("timer_event".into())?;
design.register_event("trigger_obj_det".into())?;
Expand Down Expand Up @@ -133,8 +138,8 @@ fn main() {
.expect("Failed to build tracing library");

// Create runtime
let (builder, _engine_id) =
kyron::runtime::RuntimeBuilder::new().with_engine(runtime::ExecutionEngineBuilder::new().task_queue_size(256).workers(3));
let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new()
.with_engine(runtime::ExecutionEngineBuilder::new().task_queue_size(256).workers(3));
let mut runtime = builder.build().unwrap();

// Build Orchestration
Expand All @@ -149,7 +154,9 @@ fn main() {
let mut deployment = orch.get_deployment_mut();

// Mark user events as local one.
deployment.bind_events_as_local(&["timer_event".into()]).expect("Failed to specify event");
deployment
.bind_events_as_local(&["timer_event".into()])
.expect("Failed to specify event");

deployment
.bind_events_as_local(&["trigger_obj_det".into()])
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2025 Contributors to the Eclipse Foundation
// *******************************************************************************
// Copyright (c) 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
Expand All @@ -9,7 +9,7 @@
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// SPDX-License-Identifier: Apache-2.0
//
// *******************************************************************************

use orchestration_macros::import_from_cpp;

Expand Down
14 changes: 9 additions & 5 deletions src/orchestration/examples/catch_error.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2025 Contributors to the Eclipse Foundation
// *******************************************************************************
// Copyright (c) 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
Expand All @@ -9,7 +9,7 @@
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// SPDX-License-Identifier: Apache-2.0
//
// *******************************************************************************
#![allow(unused_imports)]
use kyron::runtime::*;
use kyron_foundation::prelude::*;
Expand Down Expand Up @@ -54,7 +54,10 @@ fn catch_error_component_design() -> Result<Design, CommonErrors> {
)
.catch(|e| {
// Handle the error, e.g., log it or take some action
error!("Caught error: {:?}. This is not recoverable and we will stop execution", e);
error!(
"Caught error: {:?}. This is not recoverable and we will stop execution",
e
);
})
.build(design_instance),
)
Expand Down Expand Up @@ -89,7 +92,8 @@ fn main() {
.expect("Failed to build tracing library");

// Create runtime
let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new().with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2));
let (builder, _engine_id) = kyron::runtime::RuntimeBuilder::new()
.with_engine(ExecutionEngineBuilder::new().task_queue_size(256).workers(2));
let mut runtime = builder.build().unwrap();

// Build Orchestration
Expand Down
6 changes: 3 additions & 3 deletions src/orchestration/examples/common/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2025 Contributors to the Eclipse Foundation
// *******************************************************************************
// Copyright (c) 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
Expand All @@ -9,7 +9,7 @@
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// SPDX-License-Identifier: Apache-2.0
//
// *******************************************************************************
#![allow(dead_code)]

use core::sync::atomic::{AtomicU32, Ordering};
Expand Down
10 changes: 6 additions & 4 deletions src/orchestration/examples/common/signal_handler.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2025 Contributors to the Eclipse Foundation
// *******************************************************************************
// Copyright (c) 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
Expand All @@ -9,7 +9,7 @@
// <https://www.apache.org/licenses/LICENSE-2.0>
//
// SPDX-License-Identifier: Apache-2.0
//
// *******************************************************************************

#![allow(dead_code)]

Expand Down Expand Up @@ -63,7 +63,9 @@ impl SignalHandler {
}
}

static SIGNAL_HANDLER: SignalHandler = SignalHandler { signal: AtomicI32::new(0) };
static SIGNAL_HANDLER: SignalHandler = SignalHandler {
signal: AtomicI32::new(0),
};

extern "C" fn handler(sig: i32) {
SIGNAL_HANDLER.signal.store(sig, Ordering::SeqCst);
Expand Down
Loading
Loading