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

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.

Key Files

Configuration Files

Important READMEs

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.