529dfc468e25e7d5cede39e2368c7734af04af84
Mark's webpage
This is the source code behind betalupi.com, featuring a very efficient mini web framework written from scratch in Rust. It uses...
- Axum as an http server
- Maud for html templates
- Grass to parse and compile sass
- markdown-it to convert md to html
Overview & Arch:
-
bin/webpage: Simple cli that startsservice-webpage -
lib/libservice: Provides theServicetrait. A service is a group of http routes with an optional utoipa schema.
This library decouples compiled binaries from the services they provide, and makes sure all services are self-contained. -
lib/page: ProvidesPageServer, which builds an axum router that provides a caching and headers for resources served through http.- Also provides
Servable, which is a trait for any resource that may be served. - the
Pageservable serves html generated by a closure. - the
StaticAssetservable serves static assets (css, images, misc files), and provides transformation parameters for image assets (viapixel-transform).
- Also provides
-
service/service-webpage: AServicethat runs aPageServerthat provides the content on betalupi.com
Description
Languages
Rust
95%
SCSS
4.4%
Dockerfile
0.4%
JavaScript
0.2%