{
  "id": 17349127,
  "title": "If you're looking for what comes after wire, take a look at kanna-di",
  "url": "https://urgent.news/2026/10/31/if-youre-looking-for-what-comes-after-wire-take-a-look-at-kanna-di",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-31T05:58:56.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mickamy/if-youre-looking-for-what-comes-after-wire-take-a-look-at-kanna-di-a4i"
  },
  "original_language": "en",
  "account": "For a long time, compile-time Dependency Injection (DI) in Go meant the google/wire library. However, wire has ceased to accept new features, prompting the question of what alternative to use. This article introduces kanna-di, which fills that gap. Similar to wire, kanna-di generates code that is plain Go and does not import anything at runtime. The key difference lies in how providers are registered. In wire, you declare the injector's signature yourself, use wire.NewSet to collect providers, and pass it to wire.Build and wire.Bind for every interface and constructor. With kanna-di, you simply mark the struct that will serve as the container, and that's it. It examines each field's type, locates the constructor next to that type, follows the constructor's parameters recursively, and writes a constructor that calls everything in order.",
  "summary": "For a long time, compile-time DI in Go meant google/wire. But wire is no longer taking new features, and every so often the question comes up: what do you use instead? This post introduces kanna-di , which I wrote to sit in that spot. Like wire, the generated code is plain Go and imports nothing at run time. The difference is that you register no providers . What was tedious Think about what you…",
  "key_points": [
    "kanna-di offers alternative to google/wire for compile-time DI in Go",
    "kanna-di generates plain Go code without runtime imports",
    "kanna-di simplifies provider registration by marking container struct"
  ],
  "editors_take": "Replacing manual injector signatures with automated field examination simplifies the developer experience by reducing the boilerplate required to manage complex dependency graphs in Go applications.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}