Octoapp

A Rust library for building GitHub Apps with simple interfaces for handling webhook events and interacting with the GitHub API.

Rust Rust GitHub GitHub Apps Webhooks API
Octoapp

Octoapp

Octoapp is a Rust library for building GitHub Apps. It provides a simple interface for creating GitHub Apps and handling webhook events with built-in support for popular Rust web frameworks.

Features

  • Simple & Easy to Use: Focus on simplicity and developer experience
  • Webhook Support: Built-in handling for GitHub webhook events
  • Framework Agnostic: Works with Rocket, Hyper, and other frameworks
  • Type-Safe: Leverages Rust’s type system for compile-time safety
  • Powered by Octocrab: Uses the battle-tested Octocrab library for GitHub API interactions
  • Well Documented: Comprehensive documentation and examples

Supported Frameworks

Rocket

Full support for the Rocket web framework:

cargo add octoapp -F rocket

Hyper

Native support for Hyper HTTP server:

cargo add octoapp -F hyper

Getting Started

use anyhow::Result;
use octoapp::prelude::*;

#[tokio::main]
async fn main() -> Result<()> {
    // Load configuration from environment
    let config = OctoAppConfig::init()
        .app_name("My App")
        .app_id(12345)
        .client_id("client_id")
        .client_secret("client_secret")
        .webhook_secret("webhook_secret")
        .build()?;

    // Create Octocrab instance
    let octocrab = config.octocrab()?;

    // Interact with GitHub API
    let repos = octocrab
        .issues("42ByteLabs", "octoapp")
        .list()
        .creator("GeekMasher")
        .send()
        .await?;

    Ok(())
}

Why Octoapp?

  • Developer First: Ergonomic API that feels natural to use
  • Production Ready: Used in real-world GitHub Apps
  • Type Safety: Catch errors at compile time, not runtime
  • Minimal Overhead: Lightweight with zero runtime cost
  • Community Driven: Open source and welcoming contributions

Use Cases

  • Building custom GitHub Apps in Rust
  • Creating reusable GitHub App components
  • Automating GitHub workflows with type safety
  • Handling webhook events reliably
  • Integrating GitHub into your Rust applications