Skip to content

AreteA4/arete

Repository files navigation

Arete

Real-time streaming data pipelines for Solana - transform on-chain events into typed state projections.

CI License

Packages

Package Language Registry Description
arete Rust crates.io Umbrella crate re-exporting all components
arete-interpreter Rust crates.io AST transformation runtime and VM
arete-macros Rust crates.io Proc-macros for stream definitions
arete-server Rust crates.io WebSocket server and projection handlers
arete-sdk Rust crates.io Rust client SDK
a4-cli Rust crates.io CLI tool for SDK generation
arete-idl Rust crates.io IDL parsing and type system
@usearete/sdk TypeScript npm Pure TypeScript SDK (framework-agnostic)
@usearete/react TypeScript npm React SDK with hooks
arete-sdk Python PyPI Python client SDK (work in progress - not yet published)

Quick Start

Rust

Add to your Cargo.toml:

[dependencies]
arete = "0.5"

TypeScript (Core)

npm install @usearete/sdk

TypeScript / React

npm install @usearete/react

Python

Note: The Python SDK is a work in progress and has not yet been published to PyPI.

# Coming soon
pip install arete-sdk

Repository Structure

  • arete/: Main umbrella crate
  • interpreter/: AST transformation runtime and VM
  • arete-macros/: Proc-macros for stream definitions
  • arete-idl/: IDL parsing and type system
  • rust/arete-server/: WebSocket server and projection handlers
  • rust/arete-a4-sdk/: Rust client SDK
  • cli/: CLI tool for SDK generation
  • typescript/core/: Pure TypeScript SDK
  • typescript/react/: React SDK with hooks
  • python/arete-sdk/: Python client SDK
  • stacks/: Stack implementations and local SDK generation config
  • packages/: Additional packages
  • examples/: Example projects

Releasing

This repo uses release-please for automated releases.

How it works

  1. Make commits using conventional commit format:

    • feat: add new feature - triggers minor version bump
    • fix: resolve bug - triggers patch version bump
    • feat!: breaking change - triggers major version bump
    • chore:, docs:, refactor: - no version bump
  2. Push to main - release-please automatically creates/updates a Release PR

  3. Merge the Release PR - this:

    • Updates CHANGELOG.md in affected packages
    • Bumps versions in Cargo.toml, package.json, pyproject.toml
    • Creates a GitHub Release with a unified version tag
    • Triggers publish workflows to crates.io, npm, and PyPI

Configuration

File Purpose
release-please-config.json Package definitions and release settings
.release-please-manifest.json Tracks current version of each package

Synchronized Versions

All packages (Rust and TypeScript) are kept at the same version number using the linked-versions plugin. When any package receives a version bump, all packages are updated to the highest version in the group. This ensures compatibility when using packages individually.

Note: arete-idl is currently versioned independently.

Tag format

Tags follow the pattern v{version} (e.g., v0.5.10). Since all packages are version-synchronized, a single tag represents all packages in the release.

Development

Prerequisites

  • Rust: 1.70+ (install via rustup)
  • Node.js: 16+ (for TypeScript SDK)
  • Python: 3.9+ (for Python SDK)

Building from Source

# Clone the repository
git clone https://github.com/AreteA4/arete.git
cd arete

# Build all Rust packages
cargo build --workspace

# Build TypeScript SDKs
cd typescript/core && npm install && npm run build
cd ../react && npm install && npm run build

# Install Python SDK in development mode
cd python/arete-sdk && pip install -e .

Running Tests

# Rust tests
cargo test --workspace

# Rust linting
cargo clippy --workspace -- -D warnings

# TypeScript tests
cd typescript/core && npm test
cd ../react && npm test

# Python tests
cd python/arete-sdk && pytest

Project Structure

arete/
├── arete/          # Rust umbrella crate
├── interpreter/         # AST transformation runtime and VM
├── arete-macros/   # Proc-macros for stream definitions
├── arete-idl/      # IDL parsing and type system
├── cli/                 # CLI tool (a4-cli)
├── rust/
│   ├── arete-sdk/      # Rust client SDK
│   └── arete-server/   # WebSocket server
├── typescript/
│   ├── core/            # Pure TypeScript SDK (@usearete/sdk)
│   └── react/           # React SDK (@usearete/react)
├── python/arete-sdk/   # Python client SDK
├── stacks/              # Stack implementations and SDKs
├── packages/            # Additional packages
├── examples/            # Example projects
└── docs/                # Documentation (MDX)

Documentation

Contributing

We welcome contributions! Here's how to get started:

Development Workflow

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/my-feature)
  3. Make your changes
  4. Run tests (cargo test --workspace)
  5. Commit using conventional commits format
  6. Open a pull request

Commit Message Format

We use conventional commits for automated releases:

Prefix Purpose Version Bump
feat: New feature Minor
fix: Bug fix Patch
feat!: or fix!: Breaking change Major
docs: Documentation only None
chore: Maintenance None
refactor: Code refactoring None

Code Style

  • Rust: Follow rustfmt defaults, pass clippy with no warnings
  • TypeScript: Follow ESLint configuration in typescript/
  • Python: Follow PEP 8

License

This project uses a dual license approach:

  • Rust infrastructure (arete, interpreter, arete-macros, server, cli): Apache-2.0
  • Client SDKs (TypeScript, Python, Rust SDK): MIT