NJVERSE // BOOT
>NJVERSE OS v3.14 — BOOT SEQUENCE INITIATED
>loading kernel modules...
>mounting /sys/identity... OK
>applying user preferences...
>spawning interface threads...
>connecting BKK :: 13.7563°N, 100.5018°E
>SYSTEM READY
~/ / repos / carbide
Goactivev0.9.1Apache-2.0since 2022 // ★ 1,209 // ⑂ 88

carbide

minimal http framework

a tiny opinionated http framework for go that says no to middleware chains, magic context, and stack-of-decorators design. routes are functions. functions are routes. that's the whole concept.

01 / install
$ go get github.com/n7gj/carbide@latest
02 / usage
package main

import "github.com/n7gj/carbide"

func main() {
  r := carbide.New()
  r.GET("/", func(c *carbide.Ctx) error {
    return c.JSON(200, map[string]string{"ok": "yes"})
  })
  r.GET("/u/:id", func(c *carbide.Ctx) error {
    return c.String(200, "hello "+c.Param("id"))
  })
  r.Listen(":8080")
}
03 / features
  • routes in <40 lines of user code
  • trie-based router. O(path-length). no regex.
  • no middleware. wrap handlers yourself. you can do this.
  • graceful shutdown built in.
  • 0 dependencies. only stdlib.
04 / changelog
v0.9.12026.04fix race in graceful shutdown drain
v0.9.02026.021.0 candidate. api freeze. minor breaking.
v0.8.02025.11trie router replacing the old linear matcher
v0.5.02024.04context cancellation correctness pass
v0.1.02022.10born from a long flight + spite
← back to all repos