Menu

Development Guide

Relevant source files

This guide covers the development workflow, build processes, testing, documentation system, and release procedures for OpenDAL contributors. It provides essential information for setting up a development environment and understanding the project's infrastructure.

For information about using OpenDAL as a library, see Getting Started. For architecture details, see Core Architecture. For specific language binding development, see Language Bindings.

Development Environment Setup

OpenDAL requires a Rust development environment with additional tools for multi-language bindings and documentation generation. The project uses GitHub Actions for automated setup through reusable actions.

The primary development setup is defined in the .github/actions/setup/action.yaml which configures:

  • Rust toolchain with specific environment variables
  • System dependencies (libgflags-dev, libsnappy-dev, zlib1g-dev, libbz2-dev, liblz4-dev, libzstd-dev)
  • Optional components like RocksDB, FoundationDB, Protoc, and cargo tools

Environment Configuration:

  • RUSTFLAGS="-C force-frame-pointers=yes -C debuginfo=1" for optimized CI builds
  • RUST_BACKTRACE=1 and RUST_LOG=opendal=trace for debugging
  • CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse for faster dependency resolution

Sources: .github/actions/setup/action.yaml38-52

Documentation System

OpenDAL uses a sophisticated documentation system that generates API documentation for multiple languages and maintains a central website built with Docusaurus.

Documentation Architecture

The documentation build process is orchestrated by the docs.yml workflow which:

  1. Builds language-specific documentation in parallel jobs
  2. Generates integration documentation for ecosystem crates
  3. Assembles the website using Docusaurus with all documentation artifacts
  4. Deploys to multiple targets including GitHub Pages and staging environments

Key Documentation Tools:

  • Rust: cargo doc with nightly toolchain for advanced features
  • Java: Maven Javadoc plugin
  • NodeJS: TypeDoc via pnpm run docs
  • Python: MkDocs with material theme
  • C/C++: Doxygen for API documentation

Sources: .github/workflows/docs.yml47-516 website/docusaurus.config.js88-116

Website Configuration

The Docusaurus website supports multiple deployment modes through environment variables:

VariablePurpose
OPENDAL_WEBSITE_BASE_URLBase URL for deployment
OPENDAL_WEBSITE_NOT_LATESTShows banner for historical releases
OPENDAL_WEBSITE_STAGINGEnables staging mode for RC releases

The website includes custom plugins for enhanced functionality:

  • Image SSR Plugin: Downloads external images locally for improved performance
  • Client Redirects: Handles URL redirections
  • Lunr Search: Provides full-text search capabilities

Sources: website/docusaurus.config.js30-38 website/plugins/image-ssr-plugin.js27-233

CI/CD Pipeline

OpenDAL's continuous integration system uses GitHub Actions with a comprehensive workflow structure for building, testing, and deploying the project.

Documentation Deployment Pipeline

Deployment Logic:

  • GitHub Pages: Deployed on main branch pushes and non-RC tags
  • Staging: RC releases deploy to site/*-staging branches
  • Nightlies: Tagged releases deploy to external nightlies server with version-specific paths

The pipeline uses artifact uploading/downloading to pass documentation between jobs, with each language binding and integration building independently for optimal parallelization.

Sources: .github/workflows/docs.yml499-719

Build Tools and Dependencies

Website Development

The website uses modern JavaScript tooling:

Development Commands:

  • pnpm start: Local development server
  • pnpm build: Production build
  • pnpm serve: Serve built site locally

Sources: website/package.json5-14 website/README.md6-34

Language-Specific Build Requirements

Each language binding has specific build requirements managed through the CI setup:

LanguageBuild ToolRequirements
RustcargoNightly toolchain for docs
JavaMavenJava 17, Javadoc plugin
NodeJSpnpmNode.js 18, TypeDoc
PythonuvPython 3.11, MkDocs
RubybundlerRuby with yard
C/C++cmake/makeDoxygen, ninja
HaskellcabalGHC 9.2.8, Haddock
OCamlduneOCaml with odoc

Sources: .github/workflows/docs.yml64-354

Apache Software Foundation Integration

OpenDAL is an Apache Software Foundation project with specific configuration requirements defined in .asf.yaml:

Repository Configuration:

  • Branch Protection: Main branch requires 1 approving review
  • Merge Strategy: Squash-only merging enabled
  • Notifications: Routed to commits@opendal.apache.org and dev@opendal.apache.org
  • Staging: Automatic staging for site/* branches

Labels and Metadata:

Sources: .asf.yaml20-61

Development Workflow

Local Development Setup

  1. Clone and setup Rust environment
  2. Install language-specific tools for bindings you plan to work on
  3. Use the setup action locally or replicate its environment configuration
  4. Run tests with nextest when available

Documentation Development

  1. Local website development:

  2. Build language-specific docs:

    • For Rust: cargo doc --all-features
    • For each binding: Follow language-specific build instructions
  3. Test documentation build:

Contributing Guidelines

  • Pull Requests: Must target main branch and pass CI checks
  • Documentation: Auto-generated from source code comments and markdown files
  • Dependencies: Use npx license-checker for website dependency tracking
  • Search: Test search functionality with built site, not development server

Sources: website/README.md32-34