Skip to content

Commit b5d5cc7

Browse files
committed
Initial commit
1 parent 899f72e commit b5d5cc7

File tree

20 files changed

+1404
-0
lines changed

20 files changed

+1404
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Lint & Test
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- "crates/**"
8+
- ".github/workflows/rust.yml"
9+
- "tests/**"
10+
- "Cargo.toml"
11+
- ".cargo/**"
12+
pull_request:
13+
branches: [ "main" ]
14+
paths:
15+
- "rust-sdk/crates/**"
16+
- "rust-sdk/**/tests/**"
17+
- "rust-sdk/Cargo.toml"
18+
- "rust-sdk/.cargo/**"
19+
- ".github/workflows/rust-lint-test.yml"
20+
21+
defaults:
22+
run:
23+
working-directory: ./rust-sdk
24+
25+
jobs:
26+
build-and-test:
27+
strategy:
28+
fail-fast: false
29+
matrix:
30+
os: [ ubuntu-latest, macos-latest, windows-latest ]
31+
32+
name: Test multiple workspaces on ${{ matrix.os }}
33+
runs-on: ${{ matrix.os }}
34+
35+
env:
36+
CARGO_TERM_COLOR: always
37+
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
- uses: Swatinem/rust-cache@v2
42+
43+
- name: Build
44+
run: cargo build --verbose
45+
46+
- name: Check formatting
47+
run: cargo fmt -- --check
48+
49+
- name: Check clippy
50+
run: cargo clippy -- -D warnings
51+
52+
- name: Publish dry-run
53+
run: cargo publish -p ag-ui-core --dry-run
54+
55+
- name: Run tests
56+
run: cargo test --verbose

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
.vscode/
2+
3+
**/target

rust-sdk/Cargo.lock

Lines changed: 137 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust-sdk/Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[workspace]
2+
resolver = "3"
3+
members = ["crates/*"]
4+
5+
[workspace.dependencies]
6+
thiserror = "^2"
7+
serde = { version = "^1", features = ["derive"] }
8+
serde_json = "^1"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "ag-ui-cli"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
7+
ag-ui-core = { path = "../ag-ui-core"}
8+
thiserror = { workspace = true }
9+
serde = { workspace = true, features = ["derive"] }
10+
serde_json = { workspace = true }
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

rust-sdk/crates/ag-ui-client/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "ag-ui-client"
3+
version = "0.1.0"
4+
edition = "2024"
5+
6+
[dependencies]
7+
ag-ui-core = { path = "../ag-ui-core"}
8+
thiserror = { workspace = true }
9+
serde = { workspace = true, features = ["derive"] }
10+
serde_json = { workspace = true }
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pub fn add(left: u64, right: u64) -> u64 {
2+
left + right
3+
}
4+
5+
#[cfg(test)]
6+
mod tests {
7+
use super::*;
8+
9+
#[test]
10+
fn it_works() {
11+
let result = add(2, 2);
12+
assert_eq!(result, 4);
13+
}
14+
}

rust-sdk/crates/ag-ui-core/Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)