Code
How big NanumOS is, as the number of lines of code we wrote ourselves. One counter that anyone can run again recounts everything every day.
Sneak peek
For each language we write, a few real lines from one of our own files, the most used language first.
C 354,434 lines
How the Korean input method turns a consonant, a vowel and a final consonant into one syllable.
static uint32_t shown_cp(const struct ime *s) {
if (s->cho >= 0 && s->jung >= 0) return 0xac00u + (uint32_t)((s->cho * 21 + s->jung) * 28 + s->jong);
if (s->cho >= 0) return cho_compat[s->cho];
if (s->jung >= 0) return 0x314fu + (uint32_t)s->jung;
return 0;
}Python 220,105 lines
A piece of the counter behind this page: it skips blank lines and comment lines.
def strip_hash(text):
code = raw = 0
for line in text.split('\n'):
raw += 1
s = line.strip()
if s and not s.startswith('#'):
code += 1
return code, rawSwift 9,573 lines
Where the Mac app decides how big a new home disk is.
static func wantBytes(volumeOf path: String) -> UInt64 {
if let m = UInt64(ProcessInfo.processInfo.environment["ZEUSOS_HOME_MIB"] ?? ""), m >= 64 { return m << 20 }
let tib: UInt64 = 1 << 40
let url = URL(fileURLWithPath: (path as NSString).deletingLastPathComponent)
if let v = try? url.resourceValues(forKeys: [.volumeTotalCapacityKey]), let t = v.volumeTotalCapacity, t > 0 {
return min(tib, UInt64(t) / (1 << 30) * (1 << 30))
}
return tib
}
static func span(_ bytes: UInt64) -> UInt64 { (bytes / 512 - 16384) / 2 }
/// The Mac volume's free bytes (what the home can still really take).JavaScript 7,141 lines
The loop that turns country flag drawings into small images for the radio.
for (const c of codes) {
const f = path.join(nm, "flag-icons/flags/4x3", c.toLowerCase() + ".svg");
if (!fs.existsSync(f)) continue;
const r = new Resvg(fs.readFileSync(f), { fitTo: { mode: "width", value: +w } }).render();
if (r.width !== +w || r.height !== (+w * 3) / 4) throw new Error(c + " size " + r.width + "x" + r.height);
fs.writeFileSync(path.join(out, c + ".rgba"), r.pixels);
}Shell 5,562 lines
Three lines that register the GPU broker as a service and start it.
sudo -n systemctl daemon-reload
sudo -n systemctl enable zgpu-broker >/dev/null 2>&1
sudo -n systemctl restart zgpu-brokerAssembly 3,230 lines
A piece of the very first code to run when an ARM machine starts. It reads which privilege level it is in.
msr daifset, #15
mrs x1, CurrentEL
lsr x1, x1, #2
mov x20, x1 /* arm64_boot_el */
mov x21, xzr /* arm64_boot_vhe */
cmp x1, #2
b.ne 1fC++ 2,881 lines
Where the GPU broker writes its log. It never writes a prompt or an answer.
static void logf(const char *fmt, ...) { // the journal: connections, sizes, timings, refusals — never a prompt or an answer
va_list ap; va_start(ap, fmt);
char b[512]; vsnprintf(b, sizeof b, fmt, ap); va_end(ap);
fprintf(stderr, "zgpu: %s\n", b); fflush(stderr);
}Rust 338 lines
Small functions in the messenger's encryption part that take bytes from the C side safely.
struct W(Vec<u8>);
impl W {
fn u32(&mut self, v: u32) { self.0.extend_from_slice(&v.to_le_bytes()); }
fn u64(&mut self, v: u64) { self.0.extend_from_slice(&v.to_le_bytes()); }
fn bytes(&mut self, b: &[u8]) { self.u32(b.len() as u32); self.0.extend_from_slice(b); }Growth, day by day
our code open-source code included
The numbers behind the chart
| Day | Our code | Open-source | Tests |
|---|---|---|---|
| 2026-10-27 | 98 | 0 | 18 |
| 2026-10-28 | 1,622 | 0 | 759 |
| 2026-10-29 | 3,378 | 0 | 1,666 |
| 2026-10-30 | 6,835 | 0 | 3,843 |
| 2026-10-31 | 47,487 | 462,936 | 14,638 |
| 2026-11-01 | 83,373 | 642,324 | 22,203 |
| 2026-11-02 | 118,541 | 672,086 | 31,506 |
| 2026-11-03 | 160,634 | 672,184 | 46,194 |
| 2026-11-04 | 199,081 | 705,373 | 62,429 |
| 2026-11-05 | 208,517 | 705,373 | 68,879 |
| 2026-11-06 | 226,022 | 705,373 | 76,179 |
| 2026-11-07 | 199,328 | 705,373 | 62,278 |
| 2026-11-08 | 199,368 | 705,373 | 62,278 |
| 2026-11-09 | 251,508 | 1,037,203 | 88,943 |
| 2026-11-10 | 292,544 | 1,040,352 | 106,418 |
| 2026-11-11 | 308,501 | 1,040,352 | 114,660 |
| 2026-11-12 | 366,362 | 1,070,770 | 129,409 |
| 2026-11-13 | 378,127 | 1,077,023 | 131,968 |
| 2026-11-14 | 439,531 | 1,147,813 | 153,256 |
| 2026-11-15 | 449,152 | 1,147,813 | 161,312 |
Where the lines are
Tests are counted on their own, not inside the number for our code.
What we use from others
These are open-source projects included as they are, or nearly. Each one is listed with its licence, and none of them is counted in the number for our own code.
| Project | Licence | Lines |
|---|---|---|
| dav1d | BSD-2-Clause | 224,194 |
| SQLite | public domain | 203,624 |
| FreeType | FreeType License | 88,107 |
| musl libc | MIT | 71,846 |
| QuickJS | MIT | 67,935 |
| libvpx | BSD-3-Clause | 59,918 |
| MicroPython | MIT | 55,482 |
| Xiph audio decoder | BSD-3-Clause | 47,334 |
| PCRE2 | BSD-3-Clause with exception | 47,004 |
| BearSSL | MIT | 36,094 |
| OpenH264 (decoder) | BSD-2-Clause | 33,022 |
| PacketVideo AAC decoder | Apache-2.0 | 28,472 |
| CMU Pronouncing Dictionary (reading table, generated) | BSD-style | 23,786 |
| Lua | MIT | 20,296 |
| Berkeley SoftFloat | BSD-3-Clause | 18,229 |
| zlib | zlib | 17,681 |
| OpenBSD iwx (Intel Wi-Fi driver) | ISC | 15,055 |
| sbase | MIT | 13,713 |
| noVNC | MPL-2.0 / BSD / MIT | 11,759 |
| dr_flac | public domain or MIT-0 | 8,813 |
| lai (AML interpreter) | MIT-style | 7,662 |
| The One True Awk | Lucent permissive | 6,338 |
| stb_image | MIT or public domain | 5,833 |
| simplewebp | BSD-3-Clause | 4,532 |
| stb_vorbis | public domain or MIT | 4,046 |
| nanosvg | zlib | 3,812 |
| web-platform-tests | BSD-3-Clause | 3,501 |
| stb_truetype | MIT or public domain | 3,483 |
| rqrr / quirc (QR reader) | MIT or Apache-2.0, ISC | 3,149 |
| Monocypher | BSD-2-Clause or CC0 | 2,416 |
| LZ4 | BSD-2-Clause | 2,208 |
| minimp3 | CC0 | 1,709 |
| CoreMark | Apache-2.0 | 1,679 |
| stb_sprintf | public domain or MIT | 1,473 |
| TLSF allocator | BSD-3-Clause | 874 |
| GNU Unifont glyphs (generated table) | SIL OFL 1.1 | 758 |
| OpenSSH bcrypt_pbkdf and Blowfish | ISC / BSD-3-Clause | 719 |
| llama2.c | MIT | 671 |
| toybox bzcat | 0BSD | 384 |
| mbed TLS (md4.c, trimmed) | Apache-2.0 | 202 |
By language (our code)
| Language | Lines |
|---|---|
| C | 354,434 |
| Python | 220,105 |
| Swift | 9,573 |
| JavaScript | 7,141 |
| Shell | 5,562 |
| Make | 3,818 |
| Assembly | 3,230 |
| C++ | 2,881 |
| HTML | 1,788 |
| CSS | 1,208 |
| Go | 345 |
| Rust | 338 |
| Linker script | 169 |
How it was counted
Code we wrote: the lines of our source files, without blank lines and comment-only lines. It adds up the kernel and drivers, the desktop and apps, the commands, the server programs and the build tools; tests and documents are left out. Tables that a tool generates are counted apart and not included.
Code from others: decided file by file. A file inside a listed folder (whose licence file must really exist) is from others; a file with our name in its header is ours. A file whose origin cannot be told makes the check fail.
Test ratio: the lines of test code divided by the lines of code we wrote.
Documents: the lines of manuals and written records (Markdown), without blank lines.
Technical details
The counter is one file, tools/loc.py (standard library only); the list of included projects is tools/loc_imports.tsv. Run twice on the same checkout it gives the same numbers.
python3 tools/loc.py --check
python3 tools/loc.py --historyEach day is counted straight from git, from the first commit of that day (no checkout). Results are cached per file content, so a re-run only reads new files. Past days use today's list of included projects.
The numbers on this page come from docs/loc/latest.json and docs/loc/history.tsv, recounted whenever the site is built each day.
FAQ
Is it open source?
Not yet; it is being polished in private. When it is released, the core will be offered under AGPL-3.0 or a commercial licence, your choice, and the SDK for making apps will be MIT. DropViz, a tool we already published, is Apache-2.0.
Is it really one person? How?
Yes. One person uses AI models like many pairs of hands, and every change must pass the tests before it goes in. The factory that runs this is called Hephaestus (see Hephaestus).
Why C?
To build a small, fast operating system from scratch. New parts that read data from outside start in Rust, and everything is hammered continuously with fuzzing (feeding it random input).
Is it Linux-based?
No. The kernel is our own from the ground up. Some unmodified Linux programs run through a compatibility layer, and the browser runs in a small Linux virtual machine next to it.
Can I try it?
Yes, right in your browser (Try).
NanumOS 0.1.8349 · 2026-11-16