Skip to content
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

  1. Nov 12Merge pull request #2 from ManasDasri/feat/create-short-links3276776
  2. Nov 12day 2 commit sesh16f9d8a
  3. Nov 10Merge pull request #1 from ManasDasri/feat/create-short-links6ddc15a
  4. Nov 10Merge branch 'main' of https://github.com/ManasDasri/linklab82e7516
  5. Nov 10Implemented a simple POST callfor URL'sc79aeb2
  6. Nov 10Implemented a simple POST callfor URL'se8d0ef0
  7. Nov 10Update README.mdb1093df
  8. Nov 10Remove current status section from README123d022
  9. Nov 10Revise project aims and phases in READMEbf4e8d8
  10. Nov 10Remove 'Follow along' section from README7598dac
All activity for LinkLab on GitHub
next projectClause Risk Review

AI mode · the site as an agent reads it · /llms.txt

Loading…

say hello!

Email dasarimanas049@gmail.comBook a call 15 min, cal.comGitHubXLinkedInLeetCodeReddit