Skip to content
raya-acPublic

About

a web server, written in zig.

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

layerline logo

layerline

a web server, written in zig.

website | configuration | roadmap

i wanted one server i could put in front of my sites. that's what i'm building layerline for.

it serves static files, talks to PHP-FPM and proxies apps over HTTP or HTTPS. TLS and HTTP/2 are built in. there's a config file per site and a web admin you can leave off.

HTTP/3 works for the homepage and health check. i'd still leave it off in production. this isn't a drop-in caddy/nginx replacement yet. see the roadmap for what i'd finish before telling someone to switch.

run it

you'll need zig 0.16.

git clone https://github.com/raya-ac/Layerline.git
cd Layerline
zig build run -- --config examples/local.conf

open localhost:8080. for a release binary:

zig build -Doptimize=ReleaseFast
./zig-out/bin/layerline --config examples/local.conf

config

keep the listener and process settings in server.conf, with a file per site in domains-enabled/. point domain_config_dir at that directory. cli flags override the config.

the config guide has the examples for static sites, php, proxies, tls and reloads. the deployment guide covers services and rollback.

admin

the web ui is off by default. turn it on to add sites, stage config edits and reload. the first account needs a local setup token. admin setup.

tests

zig build test
./scripts/verify-layerline.sh

the verifier starts temporary local servers. GitHub runs the unit and wire checks on Linux and macOS, but doesn't deploy. benchmarks are separate.

laina, layerline's mascot

About

a web server, written in zig.

Topics

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages