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
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings

jobs:
formatting:
name: Formatting
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run Clippy
run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings

tests:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Run tests
run: cargo test --workspace --all-features --locked
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
159 changes: 159 additions & 0 deletions Cargo.lock

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

36 changes: 36 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[workspace]
members = [
"crates/roadrunner-cli",
"crates/roadrunner-core",
]
resolver = "3"

[workspace.package]
version = "0.1.0"
edition = "2024"
rust-version = "1.85"
publish = false

[workspace.dependencies]
serde = { version = "1", features = ["derive"] }
thiserror = "2"
tracing = "0.1"

[workspace.lints.rust]
missing_docs = "deny"
unsafe_code = "forbid"
unused_lifetimes = "deny"
unused_qualifications = "deny"

[workspace.lints.rustdoc]
broken_intra_doc_links = "deny"
private_intra_doc_links = "deny"

[workspace.lints.clippy]
all = { level = "deny", priority = -1 }
pedantic = { level = "deny", priority = -1 }
dbg_macro = "deny"
expect_used = "deny"
todo = "deny"
unimplemented = "deny"
unwrap_used = "deny"
18 changes: 18 additions & 0 deletions crates/roadrunner-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "roadrunner-cli"
description = "Command-line interface for Roadrunner"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
publish.workspace = true

[[bin]]
name = "roadrunner"
path = "src/main.rs"

[lints]
workspace = true

[dependencies]
roadrunner-core = { path = "../roadrunner-core" }
tracing.workspace = true
8 changes: 8 additions & 0 deletions crates/roadrunner-cli/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//! Command-line entry point for Roadrunner.

fn main() {
tracing::info!(
core_version = roadrunner_core::version(),
"Roadrunner CLI initialized"
);
}
15 changes: 15 additions & 0 deletions crates/roadrunner-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "roadrunner-core"
description = "Core domain and routing foundations for Roadrunner"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
publish.workspace = true

[lints]
workspace = true

[dependencies]
serde.workspace = true
thiserror.workspace = true
tracing.workspace = true
21 changes: 21 additions & 0 deletions crates/roadrunner-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//! Core domain and routing foundations for Roadrunner.
//!
//! Graph types and routing algorithms are intentionally introduced in their
//! dedicated implementation phases. This crate currently establishes the stable
//! library boundary shared by Roadrunner's adapters.

/// Returns the version of the Roadrunner core crate.
#[must_use]
pub const fn version() -> &'static str {
env!("CARGO_PKG_VERSION")
}

#[cfg(test)]
mod tests {
use super::version;

#[test]
fn reports_the_package_version() {
assert_eq!(version(), env!("CARGO_PKG_VERSION"));
}
}
4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "stable"
components = ["clippy", "rustfmt"]
profile = "minimal"
3 changes: 3 additions & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
edition = "2024"
max_width = 100
newline_style = "Unix"
Loading