{}const=>[]async()letfn</>var
Development

🔍 What are Windows, Linux, and macOS written on?

The operating systems we use every day work thanks to programming languages. Let's analyze what Windows, Linux, and macOS are written in.

К

Kodik

Author

3 min read

Why do you need to know OS languages at all? 💡

Language is not a "fad". It determines how close the system is to the hardware, how it manages memory, and at what cost it achieves speed. Therefore, the choice for operating systems has remained conservative for decades: control, predictability and portability are needed.

🔥 100,000+ students already with us

Tired of reading theory?
Time to code!

Kodik — an app where you learn to code through practice. AI mentor, interactive lessons, real projects.

🤖 AI 24/7
🎓 Certificates
💰 Free
🚀 Start learning
Joined today

Windows: C at the core, C++ around

Windows Kernel (NT) historically written in C with point inserts on the assembler for critically low-level operations. As the platform grew, the API layer, subsystems, graphics, and many services were actively used C++. At the application level, Microsoft promotes C#, but this is already "above" the system.

Trend: local experiments with Rust to reduce memory bugs (use-after-free, etc.).

Linux: C classic and pragmatism

Linux kernel since 1991 — almost "clean" C plus a little assembler. The reason is simple: memory control and portability between CPU architectures. The community carefully maintains the bar of quality and performance.

Trend: official support Rust for writing individual drivers — a focus on safety without losing speed.

macOS: XNU is a hybrid with roots in C

macOS is based on the core XNU (Mach + BSD hybrid). Base layers, drivers, and many system components are C with an assembler where necessary. Custom frameworks have long evolved on Objective‑C (and partially C++), and in recent years Apple has been actively promoting Swift in the user space — but the core remains true to C.

Let's compare the key points 📊

OS

Core

System components

User space

Modern shifts

Windows

C + ASM (point)

C/C++

C++, C#, .NET

Rust Pilot Zones (Memory Safety)

Linux

C + ASM

C

Choice of: C/C++/Rust/Go/…

Rust for drivers (optional)

macOS

C + ASM (XNU kernel)

C, C++, Objective‑C

Objective‑C / Swift

The growing role of Swift "from above"

Why does C win everywhere? 🧠

  • Memory control: manual control — fewer abstractions, more predictability.

  • Tolerance: It is relatively easy to drag to different CPU architectures.

  • Mature ecosystem: compilers, toolchains, driver SDKs — everything has been honed over the years.

Don't confuse "old" with "outdated": predictability is more important than syntax novelty at the system level.

And what does Rust and Swift have to do with it? 🚀

Rust It goes where memory and security are critical: drivers, individual kernel modules, system utilities. It does not "rewrite everything", but carefully reduces the error class. Swift in the world of Apple, it is first and foremost the convenience and security of user applications and frameworks, while the "bottom" remains on C.

In Codice we make programming training fun and easy to understand: we have interesting courses with tasks that help you improve your skills step by step.

And we also have an active Telegram channel, where we discuss cool ideas, share experiences and analyze tasks together — learning becomes not only useful, but also fun.

If you were rewriting a single OS module for security reasons, what would you choose: stay on C or take a chance with Rust — and why?

🎯Stop procrastinating

Liked the article?
Time to practice!

In Kodik, you don't just read — you write code immediately. Theory + practice = real skills.

Instant practice
🧠AI explains code
🏆Certificate

No registration • No card