takana

takana · de takay: golpear, martillartakana · from takay: to strike, to hammer

takana

Una distribución de Linux con dos pisos: abajo un laboratorio hermético que compila todo desde fuente y guarda cada artefacto por su hash; arriba un Linux clásico y mutable donde se pueden romper cosas y volver atrás. A Linux distribution with two floors: downstairs a hermetic laboratory that compiles everything from source and keeps every artefact by its hash; upstairs a classic, mutable Linux where you can break things and go back.

01 · los dos pisos01 · the two floors

Por qué dos pisos y no unoWhy two floors and not one

Una distribución inmutable da reproducibilidad y quita la máquina: no se puede tocar nada sin aprender antes un lenguaje declarativo. Una clásica deja tocar todo y no sabe decir de dónde salió un binario. takana pone las dos, en pisos separados. An immutable distribution gives you reproducibility and takes the machine away: you cannot touch anything without first learning a declarative language. A classic one lets you touch everything and cannot tell you where a binary came from. takana has both, on separate floors.

El laboratorio compila desde fuentes upstream con commits fijados, aislado (bubblewrap + zig cc + musl estático), y direcciona cada artefacto por su hash BLAKE3. El userland es un Linux normal, con /bin, /lib y /etc de verdad; los binarios se hidratan del almacén por enlaces duros. Se pueden pisar archivos en caliente y revertir cuando se quiera. The laboratory compiles from upstream sources at pinned commits, sandboxed (bubblewrap + zig cc + static musl), and addresses every artefact by its BLAKE3 hash. The userland is an ordinary Linux, with a real /bin, /lib and /etc; binaries are hydrated from the store by hard links. You can overwrite files live and revert whenever you want.

Las tres piezas del medioThe three pieces in between

  • Overlay de experimentación. Un cambio sobre el sistema real, con red: try, commit, discard.Experimentation overlay. A change on the real system, with a safety net: try, commit, discard.
  • Diario de mutaciones. Un demonio fanotify registra lo que se cambia a mano. Se vive de forma imperativa y el sistema calcula el delta contra la base limpia — el diario es la configuración.Mutation journal. A fanotify daemon records what you change by hand. You live imperatively and the system computes the delta against the clean base — the journal is the configuration.
  • Manifiesto .swm. Se comparte la receta de la mutación —parche de fuente, banderas, ediciones de config—, no el binario cocinado. Quien lo recibe lo reproduce y lo verifica..swm manifest. You share the recipe for the mutation — source patch, flags, config edits — not the cooked binary. Whoever receives it reproduces and verifies it.

02 · las decisiones02 · the decisions

Diez decisiones, y contra qué se tomaronTen decisions, and what they were taken against

La primera es la de arriba —los dos pisos— y de ella cuelga todo lo demás. Estas son las otras diez. De cada una: en qué se aparta de lo que hace una distro tradicional, qué implica por dentro y qué quiere decir sin jerga. Ninguna es gratis; todas se pagan en algún lado, y acá está dicho dónde. The first one is above — the two floors — and everything else hangs off it. These are the other ten. For each: how it departs from what a traditional distro does, what it involves under the hood and what it means without jargon. None is free; each is paid for somewhere, and that is said here.

01Todo se compila desde fuente, y la fuente está clavadaEverything is compiled from source, and the source is pinned

Frente a lo habitualCompared to the usual
Una distro normal te entrega un binario que compiló otra persona en otra máquina; lo que verificás es la firma de quien lo subió, no lo que hay adentro.A normal distro hands you a binary somebody else compiled on another machine; what you verify is the signature of whoever uploaded it, not what is inside.
TécnicamenteTechnically
Cada receta fija su fuente por commit de git o por sha256 — nunca contra una rama viva. El hash del artefacto se deriva de la receta entera: fuente, compilador, banderas, fases de build y los hashes de cada dependencia. takana hash lo calcula sin construir nada.Each recipe pins its source by git commit or sha256 — never against a live branch. The artefact hash is derived from the whole recipe: source, compiler, flags, build phases and the hash of every dependency. takana hash computes it without building anything.
En simpleIn plain words
Nadie te manda comida hecha: te manda la receta y la cocina tu máquina. Y la receta dice exactamente qué ingredientes, no «harina» a secas.Nobody sends you cooked food: they send the recipe and your machine cooks it. And the recipe names the exact ingredients, not just «flour».

02Reproducible bit a bit — y cuando no, se dice por quéBit-for-bit reproducible — and when it isn't, it says why

Frente a lo habitualCompared to the usual
Compilar el mismo paquete dos veces casi nunca da el mismo fichero, y en la práctica nadie lo comprueba: la diferencia se acepta como normal.Building the same package twice almost never yields the same file, and in practice nobody checks: the difference is accepted as normal.
TécnicamenteTechnically
El build corre aislado con bubblewrap, sin red y con la fecha fijada. Cuando dos artefactos difieren, why-differs desciende sólo por donde los hashes no coinciden y nombra la causa: un mtime dentro de un .gz, la cabecera ar de un .a, qué sección ELF cambió, una ruta del árbol de build filtrada al binario.Builds run sandboxed with bubblewrap, without network and with a fixed date. When two artefacts differ, why-differs descends only where the hashes disagree and names the cause: an mtime inside a .gz, the ar header of a .a, which ELF section changed, a build-tree path leaked into the binary.
En simpleIn plain words
Si dos personas hacen el mismo paquete, tiene que salir el mismo fichero. Y si sale distinto, el sistema te dice en qué — no te deja adivinando.If two people build the same package, the same file must come out. And if it doesn't, the system tells you where it differed — it doesn't leave you guessing.

03Un paquete es una receta, no un binarioA package is a recipe, not a binary

Frente a lo habitualCompared to the usual
El repositorio te manda el programa ya hecho, así que hay que confiar en el repositorio — y en cada espejo suyo.The repository sends you the finished program, so you have to trust the repository — and every one of its mirrors.
TécnicamenteTechnically
El índice va firmado con Ed25519 y ancla el digest de cada paquete. install resuelve el nombre, verifica la firma, reconstruye desde fuente y recién entonces hidrata. --repo acepta varios orígenes separados por comas y los prueba en orden.The index is Ed25519-signed and anchors each package's digest. install resolves the name, verifies the signature, rebuilds from source and only then hydrates. --repo takes several comma-separated origins and tries them in order.
En simpleIn plain words
El sitio del que bajás no necesita ser de fiar, porque no te da el resultado: te da las instrucciones, y se comprueba que sean las firmadas.The site you download from doesn't need to be trustworthy, because it doesn't give you the result: it gives you the instructions, and they are checked against the signed ones.

04Se reconstruye a sí misma, sin creerle a ningún binarioIt rebuilds itself, without trusting anybody's binary

Frente a lo habitualCompared to the usual
El compilador de tu distro salió de un binario que compiló otra máquina, que salió de otro, hacia atrás sin fondo. Ese primer eslabón se cree por fe.Your distro's compiler came from a binary built by another machine, which came from another, backwards without end. That first link is taken on faith.
TécnicamenteTechnically
Cadena de Rust pura de mrustc a rustc, kernel Linux compilado acá que arranca la máquina, y el toolchain reconstruyéndose a sí mismo dentro de una máquina virtual. Hecho dos veces: mismo resultado, bit por bit.A pure Rust chain from mrustc to rustc, a Linux kernel built here that boots the machine, and the toolchain rebuilding itself inside a virtual machine. Done twice: same result, bit for bit.
En simpleIn plain words
La distro se puede fabricar a sí misma casi desde cero. No queda un eslabón que haya que aceptar sin poder mirarlo.The distro can manufacture itself from near zero. No link is left that you must accept without being able to look at it.

05musl, estático, y zig cc de compiladormusl, static, and zig cc as the compiler

Frente a lo habitualCompared to the usual
Lo habitual es glibc y enlazado dinámico: actualizar una librería puede romper un programa que no tocaste, y descubrirlo al arrancarlo.The usual is glibc and dynamic linking: updating one library can break a program you never touched, and you find out when you launch it.
TécnicamenteTechnically
zig cc es el compilador por defecto del laboratorio —trae los headers y la libc de cada target, sin cross-toolchain a mano— y es reemplazable receta por receta. El rootfs del lab se ancla a una imagen pineada por sha256, no se resuelve con un gestor de paquetes.zig cc is the lab's default compiler — it brings each target's headers and libc, with no hand-built cross-toolchain — and is replaceable recipe by recipe. The lab rootfs is pinned to an image by sha256, not resolved by a package manager.
En simpleIn plain words
Cada programa se lleva sus piezas adentro, así que tocar uno no rompe a los demás. Y el código de la libc es lo bastante chico como para leerlo.Each program carries its pieces inside, so touching one doesn't break the others. And the libc's code is small enough to actually read.

06Sin systemd: el init es propio y el arranque es un grafoNo systemd: the init is our own and boot is a graph

Frente a lo habitualCompared to the usual
El arranque lo gobierna un binario grande con formato de unidades propio y un registro binario que hay que consultar con su propia herramienta.Boot is governed by a large binary with its own unit format and a binary log you must query with its own tool.
TécnicamenteTechnically
arje-zero es el proceso número uno, estático contra musl. Los servicios se declaran en Cards JSON, con supervisión y reintento con backoff, y hablan por un socket Unix con SO_PEERCRED. El menú de arranque es la navegación del grafo de estados del sistema.arje-zero is process number one, statically linked against musl. Services are declared in JSON Cards, with supervision and backoff restarts, and talk over a Unix socket with SO_PEERCRED. The boot menu is navigation of the system's state graph.
En simpleIn plain words
Lo que enciende tu máquina se puede leer con un editor de texto y contar de memoria. No hay una pieza central que decida por vos y te cueste inspeccionar.What starts your machine can be read in a text editor and held in your head. There is no central piece deciding for you that is hard to inspect.

07Romper a mano está permitido — y se puede volverBreaking things by hand is allowed — and you can come back

Frente a lo habitualCompared to the usual
Las inmutables no te dejan tocar sin aprender antes un lenguaje declarativo; las clásicas te dejan tocar y después el gestor de paquetes pierde el rastro de lo que hiciste.Immutable ones won't let you touch anything until you learn a declarative language; classic ones let you touch and then the package manager loses track of what you did.
TécnicamenteTechnically
try monta un overlay sobre el FHS real; commit lo promueve y discard lo tira. Un demonio fanotify registra cada cambio a mano y calcula el delta contra la base limpia; export lo convierte en un manifiesto compartible.try mounts an overlay over the real FHS; commit promotes it and discard throws it away. A fanotify daemon records every hand edit and computes the delta against the clean base; export turns it into a shareable manifest.
En simpleIn plain words
Probá lo que quieras: si sale mal se desmonta la capa y listo. Y lo que cambiaste a mano queda anotado solo — el registro es tu configuración, sin que hayas escrito ninguna.Try whatever you want: if it goes wrong the layer is unmounted and that's it. And what you changed by hand gets written down on its own — the log is your configuration, without you having written one.

08Wayland y nada más; el audio es PipeWireWayland and nothing else; audio is PipeWire

Frente a lo habitualCompared to the usual
Casi todas arrastran X11 y varios servidores de audio a la vez por compatibilidad, y mantienen los dos caminos para siempre.Almost all of them drag X11 and several audio servers along for compatibility, and maintain both paths forever.
TécnicamenteTechnically
Ninguna receta del catálogo publica libGL.so de escritorio ni GLX: las aplicaciones de gráficos van por EGL, y a las que no sabían hubo que portarlas. El audio es pipewire con wireplumber, como servicio de sesión, sin capa de compatibilidad permanente.No recipe in the catalogue ships a desktop libGL.so or GLX: graphics applications go through EGL, and the ones that didn't know how had to be ported. Audio is pipewire with wireplumber, as a session service, with no permanent compatibility layer.
En simpleIn plain words
Se eligió el camino nuevo y se borró el viejo, en vez de cargar los dos para siempre. Cuesta más al principio y se paga una sola vez.The new path was chosen and the old one deleted, instead of carrying both forever. It costs more up front and is paid only once.

09Lo ajeno corre enjaulado, y fuera del almacénForeign software runs caged, and outside the store

Frente a lo habitualCompared to the usual
O se mezclan binarios de terceros con los del sistema —y ya no se sabe de dónde salió cada cosa—, o directamente no hay forma de correrlos.Either third-party binaries get mixed in with the system's — and then you no longer know where anything came from — or there is simply no way to run them.
TécnicamenteTechnically
Un rootfs de otra distribución se trae pineado por digest y corre enjaulado con bubblewrap sobre el mismo kernel, sin compartir un solo .so con el anfitrión. No entra al store: no reproduce desde fuente, y meterlo ahí haría que el almacén mienta.Another distribution's rootfs is fetched pinned by digest and runs caged with bubblewrap on the same kernel, without sharing a single .so with the host. It does not enter the store: it does not reproduce from source, and putting it there would make the store lie.
En simpleIn plain words
Lo que no se puede cocinar acá igual se usa, pero en su propia caja y sin mezclarse. Así el catálogo no dice «esto es mío» de algo que no lo es.What cannot be cooked here is still used, but in its own box and unmixed. That way the catalogue never claims as its own something that isn't.

10Hecha para que una IA la opere, con el humano decidiendoBuilt for an AI to operate it, with the human deciding

Frente a lo habitualCompared to the usual
Están pensadas para manos humanas: la automatización termina simulando a una persona —parsear salidas, adivinar formatos— y el sistema esconde su estado en bases binarias.They are designed for human hands: automation ends up simulating a person — parsing output, guessing formats — and the system hides its state in binary databases.
TécnicamenteTechnically
Todo el estado del sistema es texto plano y binarios inspeccionables con readelf u objdump; nada de bases de configuración opacas. Hay un bus por socket Unix por el que un agente dispara compilaciones, escucha fallos y propone cambios — siempre contra un overlay, nunca contra el sistema vivo.All system state is plain text and binaries inspectable with readelf or objdump; no opaque configuration databases. There is a Unix-socket bus through which an agent triggers builds, listens for failures and proposes changes — always against an overlay, never against the live system.
En simpleIn plain words
Un asistente puede entender y cambiar el sistema entero sin adivinar nada, y cada cosa que hace es reversible y queda anotada. Propone; vos disponés.An assistant can understand and change the whole system without guessing, and everything it does is reversible and recorded. It proposes; you decide.

03 · el código03 · the code

Dónde vive el repositorioWhere the repository lives

Todo —el CLI, el laboratorio, el catálogo de recetas y el diseño completo— está en un solo repositorio, bajo licencia MIT. Everything — the CLI, the laboratory, the recipe catalogue and the full design — lives in a single repository, under the MIT licence.

repositorio de códigocode repository

https://git.gioser.net/sergio/takana
$ git clone https://git.gioser.net/sergio/takana.git
$ cd takana && cargo build --release
$ ./target/release/takana --help

El repositorio no trae binarios: trae recetas. Cada una fija la fuente upstream por commit o por sha256, y el hash del artefacto sale de la receta entera —fuente, compilador, banderas, fases y los hashes de sus dependencias—, así que se puede saber qué va a salir antes de compilar: The repository ships no binaries: it ships recipes. Each one pins the upstream source by commit or sha256, and the artefact hash is derived from the whole recipe — source, compiler, flags, phases and the hashes of its dependencies — so you can know what will come out before building it:

$ takana hash ripgrep          # el ArtifactHash vigente, sin construir
$ takana build ripgrep         # compila aislado y sella en el store
$ takana why-differs a/ b/     # si dos builds no coinciden, NOMBRA la causa

Cómo está repartidoHow it is laid out

  • crates/ — el CLI, el laboratorio de build, el demonio, el diario y el overlay.the CLI, the build lab, the daemon, the journal and the overlay.
  • recipes/ — el catálogo: una receta .toml por paquete.the catalogue: one .toml recipe per package.
  • docs/ — el diseño entero (SDD y ADR). Empieza por 00-vision.md.the entire design (SDDs and ADRs). Start at 00-vision.md.
  • scripts/ — la granja de compilación, la cosecha y los arneses de verificación.the build farm, the harvest and the verification harnesses.

04 · el estado, medido04 · the state, measured

Qué anda y qué noWhat works and what doesn't

PiezaPiece EstadoState Qué quiere decirWhat that means
Núcleo del laboratorioLaboratory core🟢Compila aislado y direcciona por hash BLAKE3.Sandboxed builds, BLAKE3 content addressing.
Auto-hospedajeSelf-hosting🟢El toolchain se reconstruye a sí mismo dentro de una máquina virtual, bit por bit igual.The toolchain rebuilds itself inside a VM, bit for bit identical.
Cadena Rust/LLVMRust/LLVM chain🟢De mrustc hasta rustc, sin binarios ajenos de confianza.From mrustc up to rustc, with no trusted foreign binaries.
Kernel propioOwn kernel🟢Linux compilado acá (6.16.12 y 7.1.2), que arranca la máquina y reproduce idéntico.Linux built here (6.16.12 and 7.1.2), boots the machine and reproduces identically.
CatálogoCatalogue941926 selladas, 15 en deuda. Una granja compila y promueve las que funcionan.926 sealed, 15 in debt. A farm builds and promotes the ones that work.
AlmacénStore1407Artefactos direccionados por contenido, cada uno con su hash.Content-addressed artefacts, each with its hash.
PaqueteríaPackaging🟢Empaquetar, repositorio firmado, instalar, desinstalar, dependencias y repo por red.Package, signed repository, install, uninstall, dependencies and network repo.
EscritoriosDesktops🟢Cuatro perfiles con su clausura sellada: KDE 418/420, GNOME 318/319, COSMIC 282/283, sway 269/270.Four profiles with their closure sealed: KDE 418/420, GNOME 318/319, COSMIC 282/283, sway 269/270.
Instalar en disco realInstall on a real disk🟡Las imágenes EFI/ISO arrancan en metal; el instalador desde el vivo está a medias.EFI/ISO images boot on bare metal; the installer from the live system is half done.
Distro redondaA rounded distro⚪Instalable por alguien que no la escribió. Todavía no.Installable by somebody who didn't write it. Not yet.

Lo más difícil ya está: no dependemos de binarios precocidos de nadie. Partiendo de un compilador mínimo, takana reconstruye su propio Rust, su propio kernel y sus propias herramientas — y al hacerlo dos veces da exactamente el mismo resultado. Se probó dentro de una máquina virtual, no en teoría. The hardest part is done: we depend on nobody's precooked binaries. Starting from a minimal compiler, takana rebuilds its own Rust, its own kernel and its own tools — and doing it twice gives exactly the same result. It was proved inside a virtual machine, not in theory.

Las cifras salen de docs/state/build-state.json y del almacén de la caja, medidas el 2026-09-21. No se estiman: se cuentan. The figures come from docs/state/build-state.json and the box's store, measured on 2026-09-21. They are not estimated: they are counted.

05 · los paquetes05 · the packages

El repositorio de paquetesThe package repository

El índice está firmado y cada paquete trae la receta de su contenido, no el binario cocinado: install resuelve el nombre, verifica la firma del índice y reconstruye desde fuente antes de hidratar. Un origen de descarga no necesita ser de confianza — lo que se verifica es el contenido. The index is signed and each package carries the recipe for its content, not the cooked binary: install resolves the name, verifies the index signature and rebuilds from source before hydrating. A download origin does not need to be trusted — what gets verified is the content.

repositorio de paquetespackage repository

https://takana-os.net/repo/
$ takana repo list   --repo https://takana-os.net/repo
$ takana repo verify --repo https://takana-os.net/repo --trust ./trust
$ takana install age --repo https://takana-os.net/repo --trust ./trust

Hoy publica la clausura del perfil servidor. El mismo repo se sirve también en repo.gioser.net; --repo acepta varios orígenes separados por coma y los prueba en orden. It currently publishes the closure of the servidor profile. The same repo is also served at repo.gioser.net; --repo takes several comma-separated origins and tries them in order.

06 · la frontera06 · the border

Qué tiene que ver con tawasuyuHow it relates to tawasuyu

takana es el suelo; tawasuyu es lo que se para encima. No son dos mundos sueltos: comparten el almacén direccionado por contenido (BLAKE3), un bus entre el init de tawasuyu y el demonio de takana con contrato por bytes, el grafo de arranque, y arje —el proceso número uno de tawasuyu— como init de las imágenes, estático contra musl. takana is the ground; tawasuyu is what stands on it. They are not two loose worlds: they share the content-addressed store (BLAKE3), a bus between tawasuyu's init and takana's daemon with a byte-level contract, the boot graph, and arje — tawasuyu's process number one — as the init of the images, statically linked against musl.

Lo que sigue abierto está escrito y priorizado, no supuesto: consenso de reconstrucción M-de-N, y explicar por qué difiere cuando dos compilaciones no dan el mismo hash. What is still open is written down and prioritised, not assumed: M-of-N rebuild consensus, and explaining why it differs when two builds don't produce the same hash.