Info

  • If you're using Octocat for Cloudflare Workers, click here.
  • If aren't, click here.

Note

Octocat currently relies on some nightly features (namely associated type defaults) to build. Set the toolchain override in the project directory to nightly. You can do this via:

  • The rustup command, or
rustup override set nightly
  • The rust-toolchain.toml file (recommended):
[toolchain]
channel = "nightly"

Getting Started (native)

  • Create the project
cargo new octocat-app --bin
cd octocat-app
  • Add octocat, tokio, and async-trait to your dependencies in Cargo.toml
[dependencies]
octocat-rs = { git = "https://github.com/octocat-rs/octocat-rs" }
tokio = { version = "1", features = ["full"] }
async-trait = "0.1.52"

Getting Started (Workers)

Octocat has support for WebAssembly with Cloudflare workers. See the cloudflare example in the project repository for more information.