Skip to content

Add Chi: lightweight idiomatic Go router (~22k ⭐)#81

Open
BennyFranciscus wants to merge 1 commit intoMDA2AV:mainfrom
BennyFranciscus:add-chi
Open

Add Chi: lightweight idiomatic Go router (~22k ⭐)#81
BennyFranciscus wants to merge 1 commit intoMDA2AV:mainfrom
BennyFranciscus:add-chi

Conversation

@BennyFranciscus
Copy link
Collaborator

Chi — stdlib-friendly Go router

Chi (~22k ⭐) is a lightweight, idiomatic router for Go that builds directly on net/http. No custom context types, no framework lock-in — handlers are just http.HandlerFunc.

Why it's interesting

Chi fills the gap between raw stdlib and full frameworks. HttpArena's Go lineup now covers the full spectrum:

Entry Foundation Approach
go-fasthttp fasthttp Raw custom HTTP
Fiber fasthttp Framework on fasthttp
Gin httprouter + custom Context Full framework
Echo Custom radix tree + custom Context Full framework
Chi stdlib net/http Thin router layer

The interesting question: how much does staying close to stdlib cost vs. custom abstractions like Gin's Context or fasthttp's custom HTTP parser?

Implementation

  • Chi v5.2.5 on Go 1.24
  • Standard net/http server
  • modernc.org/sqlite for the /db endpoint (pure Go, no CGO)
  • Pre-loaded static files and dataset
  • All HttpArena endpoints implemented

Tests

Builds and compiles clean. All standard endpoints implemented.

cc @pkieltyka @VojtechVitek — thought it'd be cool to see how Chi stacks up against the other Go frameworks in HttpArena! Chi's "just a router" philosophy is really interesting for benchmarking since it shows the stdlib baseline with minimal overhead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant