Sapper, a lightweight web framework, written in Rust.
Sapper focuses on easy of use. It is alpha now and only compiled with rust nightly.
Sapper alternatives and similar packages
Based on the "Web programming" category.
Alternatively, view Sapper alternatives based on common mentions on social networks and blogs.
yew9.9 7.9 Sapper VS yewRust / Wasm framework for building client web apps
Rocket9.8 6.3 Sapper VS RocketA web framework for Rust.
actix-web9.8 7.4 Sapper VS actix-webActix Web is a powerful, pragmatic, and extremely fast web framework for Rust.
hyper9.7 9.2 Sapper VS hyperAn HTTP library for Rust
gutenberg9.6 9.4 Sapper VS gutenbergA fast static site generator in a single binary with everything built-in. https://www.getzola.org
reqwest9.4 5.1 Sapper VS reqwestAn easy and powerful Rust HTTP Client
Iron9.3 0.0 Sapper VS IronAn Extensible, Concurrent Web Framework for Rust
Tide9.1 4.3 Sapper VS TideFast and friendly HTTP server framework for async Rust
stdweb8.7 0.0 Sapper VS stdwebA standard library for the client-side Web
Seed8.7 5.0 Sapper VS SeedA Rust framework for creating web apps
Nickel8.6 0.0 Sapper VS NickelAn expressjs inspired web framework for Rust
burn8.1 9.3 Sapper VS burnBurn - A Flexible and Comprehensive Deep Learning Framework in Rust
Gotham8.1 2.7 Sapper VS GothamA flexible web framework that promotes stability, safety, security and speed.
Percy8.1 4.7 Sapper VS PercyBuild frontend browser apps with Rust + WebAssembly. Supports server side rendering.
License7.8 10.0 Sapper VS LicenseTiny, no-nonsense, self-contained, Tensorflow and ONNX inference [Moved to: https://github.com/sonos/tract]
ws-rs7.6 0.0 Sapper VS ws-rsLightweight, event-driven WebSockets for Rust.
rust-musl-builder7.5 0.0 Sapper VS rust-musl-builderDocker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.
tungstenite-rs7.5 5.2 Sapper VS tungstenite-rsLightweight stream-based WebSocket implementation for Rust.
ureq7.2 5.1 Sapper VS ureqA simple, safe HTTP client
curl-rust7.1 3.8 Sapper VS curl-rustRust bindings to libcurl
cargo-web7.0 0.0 Sapper VS cargo-webA Cargo subcommand for the client-side Web
Rouille, Rust web server middlewareWeb framework in Rust
tiny-http6.7 1.3 Sapper VS tiny-httpLow level HTTP server library in Rust
rustful6.6 0.0 Sapper VS rustful[OUTDATED] A light HTTP framework for Rust
heroku-buildpack-rust6.3 0.0 Sapper VS heroku-buildpack-rustA buildpack for Rust applications on Heroku, with full support for Rustup, cargo and build caching.
OBSOLETION NOTICE6.0 10.0 Sapper VS OBSOLETION NOTICECompletely OBSOLETE Rust HTTP library (server and client)
Rustless6.0 0.0 Sapper VS RustlessREST-like API micro-framework for Rust. Works with Iron.
Teepee5.7 10.0 Sapper VS TeepeeTeepee, the Rust HTTP toolkit
jsonschema5.3 3.2 Sapper VS jsonschemaJSON Schema validation library
frank_jwt4.7 2.7 Sapper VS frank_jwtJSON Web Token implementation in Rust.
kubernetes-rust4.5 0.0 Sapper VS kubernetes-rustRust client for Kubernetes
cargonauts4.0 0.0 Sapper VS cargonautsA Rust web framework
css-inline3.5 5.6 Sapper VS css-inlineInline CSS into style attributes
handlebars-iron3.4 0.0 Sapper VS handlebars-ironHandlebars middleware for Iron web framework
sockjs3.0 0.0 Sapper VS sockjsSockJS server for Rust
url-crawler2.6 0.0 Sapper VS url-crawlerRust crate for configurable parallel web crawling, designed to crawl for content
rust-app-engine2.1 0.0 Sapper VS rust-app-engineApp Engine Rust boilerplate
zap2.1 0.0 Sapper VS zapA lightning fast http framework for Rust
urlshortener-rs1.8 0.0 Sapper VS urlshortener-rsA very-very simple url shortener (client) for Rust.
rust-websocket1.1 0.0 Sapper VS rust-websocketA WebSocket (RFC6455) library written in Rust
The FastCGI Rust implementation.Native Rust library for FastCGI
curl-rs0.4 0.0 Sapper VS curl-rsA curl(libcurl) mod for rust.
Static code analysis for 29 languages.
Do you think we are missing an alternative of Sapper or a related project?
Sapper, a lightweight web framework, written in Rust.
Sapper focuses on ergonomic usage and rapid development. It can work with stable Rust.
Sapper now is based on hyper 0.10.13.
Look into json demo, you can learn how to parse http parameters, and return json;
Look into mvc diesel demo, you can learn how to use database, how to render template, and how to redirect.
[dependencies] sapper = "0.1"
Now, you can boot the example server with:
cd examples/basic/ cargo build cargo run
and open the browser, visit
or any other url to test it.
- query params
- body params
- template rendering
- simple logger
- response json
[email protected]:~/works2/wrk$ uname -a Linux mike-Vostro-3653 4.10.0-21-generic #23-Ubuntu SMP Fri Apr 28 16:14:22 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux [email protected]:~/works2/wrk$ cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 94 model name : Intel(R) Core(TM) i3-6100 CPU @ 3.70GHz cpu MHz : 832.183 cache size : 3072 KB bogomips : 7392.00 ... [email protected]:~/works2/sapper/examples/tiny$ cargo run --release Finished release [optimized] target(s) in 36.27 secs Running `target/release/tiny` Listening on http://127.0.0.1:1337 output: hello, world! [email protected]:~/works2/wrk$ ./wrk -t2 -c100 -d30s http://127.0.0.1:1337 Running 30s test @ http://127.0.0.1:1337 2 threads and 100 connections Thread Stats Avg Stdev Max +/- Stdev Latency 21.73us 139.92us 16.02ms 99.87% Req/Sec 235.94k 26.75k 259.73k 76.33% 7045973 requests in 30.04s, 598.04MB read Requests/sec: 234536.10 Transfer/sec: 19.91MB
- Sapper supplies only basic framework;
- Three level granularity (global, module, function handler) middleware controller and unified middleware presentation;
- Typesafe abstraction, keep the same spirit with hyper;
- For easy using, will supply some convenient macros to help write business logics;
- Global object cross requests;
Typed, hierarchical control, and middlewares.
In Sapper, nearly every important thing is a
Type. They are:
- Each module is a type, different modules are different types;
- Every middleware supplies some (0 to n) types for handler getting values;
- Inherited from hyper's typed spirit, all headers, mime and so on should use types for manipulation.
- Sapper forces you to put router in each module (in main.rs, you can not write it, no space left for you to write);
- Sapper forces you to seperate the router binding and the handler realization;
- Sapper's plugin processor can be used in app level wrapper, module level wrapper, and each handler. These three level hierarchical controls make it flexible to construct your business.
Sapper's core contains only router system, request and response definitions, middleware system, and some other basic facilities. Nearly all practical features, such as query parameter, body parameter, cookie, session, json, xml, orm..., are supplied by the corresponding middlewares.
Sapper's middleware is very easy to write. One rust module realized a function on the prototype of
fn (&mut Request) -> Result<()>; // before plugin fn (&Request, &mut Response) -> Result<()>; // after plugin
can be thought as Sapper's middleware. Sample middleware: sapper_query.
- [X] QueryParams (x-www-form-urlencoded);
- [X] BodyParams (x-www-form-urlencoded);
- [X] BodyJsonParams;
- [X] Basic static file serving for dev;
- [X] Global object shared cross requests;
- [X] Macros;
- [ ] Multipart;
- sapper_query parsing query string for req;
- sapper_body parsing body parameters for req, including url form encoded, json type, json to struct macro;
- sapper_logger record request and caculate its time;
- sapper_session a cookie plugin, and else supply a helper set_cookie function;
- sapper_tmpl use tera to render template;
Thanks to these projects below:
- hyper Sapper is based on hyper mio branch;
- iron Sapper learns many designs from iron;
- router Sapper steals router about code from it;
- recognizer Sapper uses this route recognizer;
*Note that all licence references and agreements mentioned in the Sapper README section above are relevant to that project's source code only.