Skip to main content

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

cowboy/
|-- crates/                                  # Rust implementation
|   \-- cowboy-core/
|       |-- src/
|       |   |-- actor_simulator.rs
|       |   |-- consensus.rs
|       |   |-- metering.rs
|       |   |-- lib.rs
|       |   |-- simulator.rs
|       |   |-- state.rs
|       |   |-- types.rs
|       |   |-- runtime/                     # Actor VM runtime
|       |   |-- runner/                      # Off-chain runner
|       |   \-- bin/                         # Executables
|       \-- Cargo.toml
|
|-- sdk/                                     # Language SDKs
|   \-- python/
|       |-- cowboy_sdk.egg-info/
|       |-- cowboy_sdk/
|       |-- examples/
|       |-- tests/
|       |-- README.md
|       |-- README_SDK.md
|       |-- SETUP.md
|       |-- pyproject.toml
|       |-- pytest.ini
|       |-- requirements.txt
|       \-- test_manual.py
|
|-- docs/                                    # Documentation
|   |-- architecture/
|   |-- assets/
|   |-- cips/
|   |-- contributing/
|   |-- developers/
|   |-- economics/
|   |-- getting-started/
|   |-- governance/
|   |-- images/
|   |-- introduction/
|   |-- overview/
|   |-- references/
|   |-- security/
|   |-- style/
|   |-- versioning/
|   |-- testing/
|   |-- LICENSE
|   |-- README.md
|   |-- docs.json            # Mintlify config
|   |-- docs.backup.json
|   |-- favicon.svg
|   |-- index.mdx
|   \-- quickstart.mdx
|
|-- dashboard/                               # Explorer UI
|   \-- index.html
|
|-- Cargo.toml                               # Rust workspace
|-- package.json                             # Node.js config
|-- package-lock.json
|-- README.md                                # Project overview
|-- README_TESTING.md
|-- cursor-extensions.txt
|-- .gitignore
\-- Cowboy Documentation Plan(v0.1) Milestone.md

Core Components

1. Rust Implementation (crates/cowboy-core/)

The heart of Cowboy, written in Rust for performance and safety.
Path: crates/cowboy-core/src/runtime/Contents:
  • pvm.rs - Python VM implementation
  • executor.rs - VM execution driver
  • context.rs - Execution context and I/O
  • mod.rs - Module declarations

2. Python SDK (sdk/python/)

Developer-facing SDK for building actors.
Path: sdk/python/cowboy_sdk/

3. Documentation (docs/)

This documentation site, built with Mintlify.
docs/
|-- architecture/
|-- assets/
|-- cips/
|-- contributing/
|-- developers/
|-- economics/
|-- getting-started/
|-- governance/
|-- images/
|-- introduction/
|-- overview/
|-- references/
|-- security/
|-- style/
|-- versioning/
|-- LICENSE
|-- README.md
|-- docs.json        # Mintlify config
|-- favicon.svg
|-- index.mdx
\-- quickstart.mdx

Key Files

Configuration Files

FilePurpose
Cargo.tomlRust workspace configuration
package.jsonNode.js dependencies
docs/docs.jsonDocumentation structure

Important READMEs

FileDescription
/README.mdProject overview and quick start
/sdk/python/README.mdSDK installation and usage
/docs/README.mdDocumentation contribution guide

Contributing Areas

Core Protocol

Language: RustAreas:
  • VM implementation
  • Consensus algorithms
  • Scheduler optimization
  • Security improvements
Path: crates/cowboy-core/

Python SDK

Language: PythonAreas:
  • SDK features
  • Developer tools
  • Testing utilities
  • Example actors
Path: sdk/python/

Documentation

Language: Markdown (MDX)Areas:
  • Technical guides
  • Tutorials
  • API reference
  • Diagrams
Path: docs/

Tooling

Language: VariousAreas:
  • CLI tools
  • Explorer UI
  • Development scripts
  • CI/CD
Path: Multiple

Finding Your Way Around

Looking for…

Path: crates/cowboy-core/src/runtime/pvm.rsCore Python VM bytecode interpreter.
Path: crates/cowboy-core/src/metering.rsCycle and Cell calculation implementation.
Path: crates/cowboy-core/src/runner/Off-chain task execution logic (CIP-2).
Path: sdk/python/cowboy_sdk/actor.pyPython Actor base class that developers inherit from.
Path: sdk/python/examples/Ready-to-use actor templates.
Path: docs/cips/Formal CIP (Cowboy Improvement Proposal) specifications.