OctaneWeb/Octane
소개
An experimental web server modeled after express in Rust.
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original
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.
관련 프로젝트 살펴보기
불러오는 중…