{"guid":"1611cc30-729c-4a8a-88ac-b0529b2255b5","title":"garn: A Faster, Friendlier Nix in TypeScript","subtitle":null,"slug":"nixcon2025-56378-garn-a-faster-friendlie","link":"https://talks.nixcon.org/nixcon-2025/talk/RJSMCA/","description":"Nix is a powerful tool, but it also comes with some well-known problems: a steep learning curve, bad error messages, and slow evaluation. What if we could solve these three problems in one stroke?\n\ngarn is an experiment in doing just that. With garn, you define derivations with TypeScript instead of in the Nix language. TypeScript is familiar to most developers, well-documented, and supported by rich editor tooling - thus lowering the learning barrier. And instead of stack traces, you mostly get (much nicer) type errors.\n\ngarn also rethinks the CLI, clarifying the core user-facing concepts in Nix, and how they relate to one another. What exactly is a devshell? A check? A NixOS configuration? What operations make sense with them? By thinking of these as first-class objects instead of \"just derivations\", garn makes the UX more approachable, and more powerful.\n\nThe currently-released version of garn generates Nix code, which means we still incur the cost of (often slow) Nix evaluation. But we are working on a second version which ditches Nix evaluation altogether, and uses Nix only to build .drv files. This opens the door to substantial speed improvements, with techniques such as pre-evaluating Nix (FFI) code, caching evaluation in a finer-grained way, async IFD, and even using WASM as an alternative to IFD.\n\nThis talk will show how garn works both above and under the hood. It's aimed at anyone interested in making Nix faster and more accessible.","original_language":"eng","persons":["Julian Kirsten Arni"],"tags":["56378","2025","nixcon2025","Aula","nixcon2025-eng"],"view_count":107,"promoted":false,"date":"2025-09-06T16:25:00.000+02:00","release_date":"2025-09-18T00:00:00.000+02:00","updated_at":"2026-03-29T15:30:09.384+02:00","length":1506,"duration":1506,"thumb_url":"https://static.media.ccc.de/media/events/nixcon/2025/56378-1611cc30-729c-4a8a-88ac-b0529b2255b5.jpg","poster_url":"https://static.media.ccc.de/media/events/nixcon/2025/56378-1611cc30-729c-4a8a-88ac-b0529b2255b5_preview.jpg","timeline_url":"https://static.media.ccc.de/media/events/nixcon/2025/56378-1611cc30-729c-4a8a-88ac-b0529b2255b5.timeline.jpg","thumbnails_url":"https://static.media.ccc.de/media/events/nixcon/2025/56378-1611cc30-729c-4a8a-88ac-b0529b2255b5.thumbnails.vtt","frontend_link":"https://media.ccc.de/v/nixcon2025-56378-garn-a-faster-friendlie","url":"https://api.media.ccc.de/public/events/1611cc30-729c-4a8a-88ac-b0529b2255b5","conference_title":"NixCon 2025","conference_url":"https://api.media.ccc.de/public/conferences/nixcon2025","related":[],"recordings":[{"size":16,"length":1506,"mime_type":"audio/opus","language":"eng","filename":"import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_opus.opus","state":"new","folder":"opus","high_quality":false,"width":0,"height":0,"updated_at":"2025-09-18T06:53:24.316+02:00","recording_url":"https://cdn.media.ccc.de/events/nixcon/2025/opus/import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_opus.opus","url":"https://api.media.ccc.de/public/recordings/91177","event_url":"https://api.media.ccc.de/public/events/1611cc30-729c-4a8a-88ac-b0529b2255b5","conference_url":"https://api.media.ccc.de/public/conferences/nixcon2025"},{"size":22,"length":1506,"mime_type":"audio/mpeg","language":"eng","filename":"import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_mp3.mp3","state":"new","folder":"mp3","high_quality":false,"width":0,"height":0,"updated_at":"2025-09-18T06:53:20.719+02:00","recording_url":"https://cdn.media.ccc.de/events/nixcon/2025/mp3/import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_mp3.mp3","url":"https://api.media.ccc.de/public/recordings/91176","event_url":"https://api.media.ccc.de/public/events/1611cc30-729c-4a8a-88ac-b0529b2255b5","conference_url":"https://api.media.ccc.de/public/conferences/nixcon2025"},{"size":139,"length":1506,"mime_type":"video/webm","language":"eng","filename":"import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_webm-hd.webm","state":"new","folder":"webm-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2025-09-18T07:35:04.880+02:00","recording_url":"https://cdn.media.ccc.de/events/nixcon/2025/webm-hd/import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_webm-hd.webm","url":"https://api.media.ccc.de/public/recordings/91186","event_url":"https://api.media.ccc.de/public/events/1611cc30-729c-4a8a-88ac-b0529b2255b5","conference_url":"https://api.media.ccc.de/public/conferences/nixcon2025"},{"size":61,"length":1506,"mime_type":"video/webm","language":"eng","filename":"import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_webm-sd.webm","state":"new","folder":"webm-sd","high_quality":false,"width":720,"height":576,"updated_at":"2025-09-18T07:29:03.399+02:00","recording_url":"https://cdn.media.ccc.de/events/nixcon/2025/webm-sd/import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_webm-sd.webm","url":"https://api.media.ccc.de/public/recordings/91185","event_url":"https://api.media.ccc.de/public/events/1611cc30-729c-4a8a-88ac-b0529b2255b5","conference_url":"https://api.media.ccc.de/public/conferences/nixcon2025"},{"size":47,"length":1506,"mime_type":"video/mp4","language":"eng","filename":"import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_sd.mp4","state":"new","folder":"h264-sd","high_quality":false,"width":720,"height":576,"updated_at":"2025-09-18T06:53:14.975+02:00","recording_url":"https://cdn.media.ccc.de/events/nixcon/2025/h264-sd/import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_sd.mp4","url":"https://api.media.ccc.de/public/recordings/91175","event_url":"https://api.media.ccc.de/public/events/1611cc30-729c-4a8a-88ac-b0529b2255b5","conference_url":"https://api.media.ccc.de/public/conferences/nixcon2025"},{"size":117,"length":1506,"mime_type":"video/mp4","language":"eng","filename":"import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_hd.mp4","state":"new","folder":"h264-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2025-09-18T06:40:07.762+02:00","recording_url":"https://cdn.media.ccc.de/events/nixcon/2025/h264-hd/import-56378-eng-garn_A_Faster_Friendlier_Nix_in_TypeScript_hd.mp4","url":"https://api.media.ccc.de/public/recordings/91162","event_url":"https://api.media.ccc.de/public/events/1611cc30-729c-4a8a-88ac-b0529b2255b5","conference_url":"https://api.media.ccc.de/public/conferences/nixcon2025"}]}