shipping in phases
LinkLab
Short links and fast redirects, all Rust, written by hand.
A fast URL shortener, written entirely in Rust and built from scratch without AI. It ships in phases: read-only redirects, short-code lookups and a health endpoint work now (Axum on Tokio, links in a shared map behind an Arc); link creation, URL validation, persistent storage and benchmarks are next.
- the problem
- A long URL is clumsy to share, and I wanted to know how a fast web service works underneath by writing one in Rust myself, line by line, without AI.
- what I built
- An Axum service on Tokio that looks a short code up in a shared map and answers with a real 307 redirect, or a 404. It ships one phase at a time.
What it does
- Listens for HTTP requests on port 3000, with more than one route
- Pulls the short code out of the path with Axum’s Path extractor
- Keeps links in a HashMap shared across requests through State and an Arc
- Answers with a real HTTP redirect, or a 404 when the code is unknown
- A /health endpoint to check the server is up
- Next, phase by phase: creating links with URL validation, storage that survives restarts, then benchmarks and tuning
How it's built
each layer feeds the one below
Request
- GET /:code
- GET /health
Service
- Axum router on Tokio
- Path: the short code
- State: links in a HashMap behind an Arc
Response
- 307 redirect to the destination
- 404 for an unknown code
RustAxumTokio
Activity
- Nov 12Merge pull request #2 from ManasDasri/feat/create-short-links3276776
- Nov 12day 2 commit sesh16f9d8a
- Nov 10Merge pull request #1 from ManasDasri/feat/create-short-links6ddc15a
- Nov 10Merge branch 'main' of https://github.com/ManasDasri/linklab82e7516
- Nov 10Implemented a simple POST callfor URL'sc79aeb2
- Nov 10Implemented a simple POST callfor URL'se8d0ef0
- Nov 10Update README.mdb1093df
- Nov 10Remove current status section from README123d022
- Nov 10Revise project aims and phases in READMEbf4e8d8
- Nov 10Remove 'Follow along' section from README7598dac
