OctaneWeb/Octane
Acerca de
An experimental web server modeled after express in Rust.
Sistemas e infraestructuraCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
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.
Explorar proyectos relacionados
Cargando…