Skip to content
プロジェクト

概要

An experimental web server modeled after express in Rust.

システム・インフラ

この数値の測り方

計測したスター増加

24時間
0
7日間
0
15日間
0
1か月
履歴を収集中

期間ごとの純増数です。期間は重複しており、日別の値ではありません。未計測の値は空欄です。スター数は注目度の指標であり、品質の保証ではありません。

Octane 🚀

A high-powered web server aimed at minimizing dependencies while maintaining speed. Modeled after Express, a popular Javascript web framework, Octane combines the speed of Rust with the ease-of-use and flexibility of Express to create the optimal user experience.

  • Multithreaded 🚄
  • Asynchronous design 🐆
  • Easy to use, intuitive design 🌱
  • TLS enabled, rustls/openssl ready 🔒
  • Minimal dependencies (working to reduce them more!) 💕
  • no_std wasip3 support using fixed stack sizes! 💕

Road to production

The initial version of this web server was written by hand, both the parser and router 5 years ago during 2020. Since then there's various fuzzing implementations and tests to test the integrity of the server. The web server also had audits from OpenAI's daybreak models and Claude's capability scanning. Since the web server uses minimal dependencies, the attack vector is also reduced.

This web server is supposed to be a deterministic set of codes that people can use in production. A web server doesn't need huge dependencies, large binary sizes or build times. When developing for WASM targets, the binary size matters even if you are running the guest program on a server using wasmtime

Templating frameworks like topcoat should be supported on top of Octane, since Octane is an OS agnostic http implementation.

Basic Usage

Create an octane instance, and then you can register your methods on it using app.METHOD()

use octane::prelude::*;
use std::error::Error;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    let mut app = Octane::new();
    app.ssl(8001)
        .key("templates/key.pem")
        .cert("templates/cert.pem"); // Setup ssl

    app.get(
        "/",
        route!(|req, res| {
            res.send_file("templates/test.html").expect("File not found!");
            Flow::Next
        }),
    )?;

    app.add(Octane::static_dir("templates"))?;
    app.listen(8000, || println!("Server Started!")).await
}

Docs

Documentation will be available on docs.rs.

Roadmap to production

  • Http2
  • Stable SSL support
  • Efficient error handling (using enums instead of Box<dyn Error>)
  • Web socket library
  • Multipart/json form handling (being worked on)
  • Tracing
  • Topcoat/Dixous support
  • Much more....

Contribute

Checkout CONTRIBUTING.md for info on how to contribute to this project

License

OctaneWeb/Octane is licensed under the MIT License.

関連プロジェクトを探す

読み込み中…