Introduction
The Cowboy project is organized as a monorepo containing the core protocol implementation, SDK, documentation, and tooling. This guide helps you navigate the codebase.Repository Structure
Core Components
1. Rust Implementation (crates/cowboy-core/)
The heart of Cowboy, written in Rust for performance and safety.
- Runtime
- Consensus
- Off-Chain Runner
Path:
crates/cowboy-core/src/runtime/Contents:pvm.rs- Python VM implementationexecutor.rs- VM execution drivercontext.rs- Execution context and I/Omod.rs- Module declarations
2. Python SDK (sdk/python/)
Developer-facing SDK for building actors.
- Core SDK
- Examples
- Tests
Path:
sdk/python/cowboy_sdk/3. Documentation (docs/)
This documentation site, built with Mintlify.
Key Files
Configuration Files
| File | Purpose |
|---|---|
Cargo.toml | Rust workspace configuration |
package.json | Node.js dependencies |
docs/docs.json | Documentation structure |
Important READMEs
| File | Description |
|---|---|
/README.md | Project overview and quick start |
/sdk/python/README.md | SDK installation and usage |
/docs/README.md | Documentation contribution guide |
Contributing Areas
Core Protocol
Language: RustAreas:
- VM implementation
- Consensus algorithms
- Scheduler optimization
- Security improvements
crates/cowboy-core/Python SDK
Language: PythonAreas:
- SDK features
- Developer tools
- Testing utilities
- Example actors
sdk/python/Documentation
Language: Markdown (MDX)Areas:
- Technical guides
- Tutorials
- API reference
- Diagrams
docs/Tooling
Language: VariousAreas:
- CLI tools
- Explorer UI
- Development scripts
- CI/CD
Finding Your Way Around
Looking for…
VM implementation
VM implementation
Path:
crates/cowboy-core/src/runtime/pvm.rsCore Python VM bytecode interpreter.Gas metering logic
Gas metering logic
Path:
crates/cowboy-core/src/metering.rsCycle and Cell calculation implementation.Off-chain runner
Off-chain runner
Path:
crates/cowboy-core/src/runner/Off-chain task execution logic (CIP-2).Actor base class
Actor base class
Path:
sdk/python/cowboy_sdk/actor.pyPython Actor base class that developers inherit from.Example actors
Example actors
Path:
sdk/python/examples/Ready-to-use actor templates.Protocol specs
Protocol specs
Path:
docs/cips/Formal CIP (Cowboy Improvement Proposal) specifications.
