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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The GitHub Copilot SDK exposes the same engine behind Copilot CLI: a production-
| **Python** | [`cookbook/python/`](./cookbook/python/README.md) | `pip install github-copilot-sdk` |
| **Go** | [`cookbook/go/`](./cookbook/go/README.md) | `go get github.com/github/copilot-sdk/go` |
| **.NET** | [`cookbook/dotnet/`](./cookbook/dotnet/README.md) | `dotnet add package GitHub.Copilot.SDK` |
| **Rust** | [`rust/`](./rust/README.md) | `cargo add github-copilot-sdk` |

See the individual SDK READMEs for installation, usage examples, and API reference.

Expand Down
22 changes: 19 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ default:
@just --list

# Format all code across all languages
format: format-go format-python format-nodejs format-dotnet
format: format-go format-python format-nodejs format-dotnet format-rust

# Lint all code across all languages
lint: lint-go lint-python lint-nodejs lint-dotnet
lint: lint-go lint-python lint-nodejs lint-dotnet lint-rust

# Run tests for all languages
test: test-go test-python test-nodejs test-dotnet
test: test-go test-python test-nodejs test-dotnet test-rust

# Format Go code
format-go:
Expand Down Expand Up @@ -71,13 +71,29 @@ test-dotnet:
@echo "=== Testing .NET code ==="
@cd dotnet && dotnet test test/GitHub.Copilot.SDK.Test.csproj

# Format Rust code
format-rust:
@echo "=== Formatting Rust code ==="
@cd rust && cargo fmt

# Lint Rust code
lint-rust:
@echo "=== Linting Rust code ==="
@cd rust && cargo clippy --all-targets -- -D warnings

# Test Rust code
test-rust:
@echo "=== Testing Rust code ==="
@cd rust && cargo test

# Install all dependencies
install:
@echo "=== Installing dependencies ==="
@cd nodejs && npm ci
@cd python && uv pip install -e ".[dev]"
@cd go && go mod download
@cd dotnet && dotnet restore
@cd rust && cargo fetch
@echo "✅ All dependencies installed"

# Run interactive SDK playground
Expand Down
16 changes: 16 additions & 0 deletions rust/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Rust
/target
Cargo.lock
**/*.rs.bk
*.pdb

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db
45 changes: 45 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[package]
name = "github-copilot-sdk"
version = "0.1.0"
edition = "2021"
authors = ["GitHub <opensource+copilot-sdk@github.com>"]
description = "GitHub Copilot SDK for Rust - Embed Copilot's agentic workflows in your application"
license = "MIT"
repository = "https://github.com/github/copilot-sdk"
homepage = "https://github.com/github/copilot-sdk"
documentation = "https://docs.rs/github-copilot-sdk"
readme = "README.md"
keywords = ["github", "copilot", "ai", "agent", "sdk"]
categories = ["api-bindings", "development-tools"]
Comment on lines +1 to +13

Copilot AI Jan 23, 2026

Copy link

Choose a reason for hiding this comment

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

The Cargo.toml should specify a minimum supported Rust version (MSRV) using the rust-version field. The README claims "Rust: 1.70 or higher" but this is not enforced in the package manifest. Add rust-version = "1.70" to the [package] section to ensure compatibility.

Copilot uses AI. Check for mistakes.

[dependencies]
tokio = { version = "1.41", features = ["full"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
uuid = { version = "1.11", features = ["v4", "serde"] }
thiserror = "2.0"
async-trait = "0.1"

[dev-dependencies]
tokio-test = "0.4"
chrono = "0.4"

[lib]
name = "github_copilot_sdk"
path = "src/lib.rs"

[[example]]
name = "hello"
path = "examples/hello.rs"

[[example]]
name = "tools"
path = "examples/tools.rs"

[[example]]
name = "permissions"
path = "examples/permissions.rs"

[[example]]
name = "mcp"
path = "examples/mcp.rs"
Loading
Loading