feat(init): scaffold cargo workspace and CI
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
37
.github/workflows/ci.yml
vendored
Normal file
37
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Check formatting
|
||||
run: cargo fmt --check --all
|
||||
|
||||
- name: Check
|
||||
run: cargo check --workspace
|
||||
|
||||
- name: Test
|
||||
run: cargo test --workspace
|
||||
|
||||
- name: Clippy
|
||||
run: cargo clippy --workspace -- -D warnings
|
||||
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/target/
|
||||
*.swp
|
||||
*.swo
|
||||
.idea/
|
||||
.vscode/
|
||||
5784
Cargo.lock
generated
Normal file
5784
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
24
Cargo.toml
Normal file
24
Cargo.toml
Normal file
@@ -0,0 +1,24 @@
|
||||
[workspace]
|
||||
resolver = "2"
|
||||
members = ["crates/core", "crates/gui", "crates/tui"]
|
||||
default-members = ["crates/core"]
|
||||
|
||||
[workspace.dependencies]
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
thiserror = "2"
|
||||
parking_lot = "0.12"
|
||||
crossbeam-channel = "0.5"
|
||||
notify = "8"
|
||||
regex = "1"
|
||||
memchr = "2"
|
||||
toml = "0.8"
|
||||
directories = "6"
|
||||
insta = "1"
|
||||
anyhow = "1"
|
||||
egui = "0.34"
|
||||
eframe = "0.34"
|
||||
ratatui = "0.30"
|
||||
crossterm = "0.29"
|
||||
clap = { version = "4", features = ["derive"] }
|
||||
log-viewer-core = { path = "crates/core" }
|
||||
19
crates/core/Cargo.toml
Normal file
19
crates/core/Cargo.toml
Normal file
@@ -0,0 +1,19 @@
|
||||
[package]
|
||||
name = "log-viewer-core"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
thiserror.workspace = true
|
||||
notify.workspace = true
|
||||
toml.workspace = true
|
||||
parking_lot.workspace = true
|
||||
crossbeam-channel.workspace = true
|
||||
regex.workspace = true
|
||||
memchr.workspace = true
|
||||
directories.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
insta.workspace = true
|
||||
1
crates/core/src/error.rs
Normal file
1
crates/core/src/error.rs
Normal file
@@ -0,0 +1 @@
|
||||
// Task 3 will implement error types
|
||||
10
crates/core/src/lib.rs
Normal file
10
crates/core/src/lib.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
pub mod error;
|
||||
pub mod types;
|
||||
// pub mod io; — Task 4
|
||||
// pub mod search; — Task 4
|
||||
// pub mod parser; — Task 4
|
||||
// pub mod watcher; — Task 4
|
||||
// pub mod filter; — Task 4
|
||||
// pub mod bookmark; — Task 4
|
||||
// pub mod config; — Task 4
|
||||
// pub mod session; — Task 4
|
||||
1
crates/core/src/types.rs
Normal file
1
crates/core/src/types.rs
Normal file
@@ -0,0 +1 @@
|
||||
// Task 2 will implement types
|
||||
9
crates/gui/Cargo.toml
Normal file
9
crates/gui/Cargo.toml
Normal file
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "log-viewer-gui"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
egui.workspace = true
|
||||
eframe.workspace = true
|
||||
log-viewer-core.workspace = true
|
||||
1
crates/gui/src/main.rs
Normal file
1
crates/gui/src/main.rs
Normal file
@@ -0,0 +1 @@
|
||||
fn main() {}
|
||||
11
crates/tui/Cargo.toml
Normal file
11
crates/tui/Cargo.toml
Normal file
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "log-viewer-tui"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
ratatui.workspace = true
|
||||
crossterm.workspace = true
|
||||
clap.workspace = true
|
||||
anyhow.workspace = true
|
||||
log-viewer-core.workspace = true
|
||||
1
crates/tui/src/main.rs
Normal file
1
crates/tui/src/main.rs
Normal file
@@ -0,0 +1 @@
|
||||
fn main() {}
|
||||
2
rust-toolchain.toml
Normal file
2
rust-toolchain.toml
Normal file
@@ -0,0 +1,2 @@
|
||||
[toolchain]
|
||||
channel = "1.92"
|
||||
Reference in New Issue
Block a user