# Programming Languages Used in the AI Engineering from Scratch Repository: A Complete Guide

> Discover the programming languages used in the AI Engineering from Scratch repository. Learn Python, TypeScript, Rust, and Julia with Python as the core teaching language.

- Repository: [Rohit Ghumare/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch)
- Tags: getting-started
- Published: 2026-08-30

---

**The AI Engineering from Scratch repository uses four primary programming languages—Python, TypeScript, Rust, and Julia—with Python serving as the core teaching language for most lessons.**

The `rohitg00/ai-engineering-from-scratch` curriculum takes a **stdlib‑first** approach to teaching artificial intelligence engineering from first principles. While the educational framework remains deliberately language‑agnostic, the implementation strictly limits each lesson to a curated set of allowed languages defined in the repository’s governance documentation.

## Core Programming Languages in AI Engineering from Scratch

According to [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) in the repository root, the codebase adheres to a strict "stdlib‑first" policy that permits only four languages across all lesson implementations. This constraint ensures minimal dependencies while exposing learners to diverse programming paradigms relevant to modern AI engineering.

### Python: The Core Teaching Language

**Python dominates the curriculum** as the primary vehicle for AI engineering concepts. The repository organizes lessons into phase directories, with most containing `phases/*/code/main.py` entry points that demonstrate implementations ranging from basic agent models to production LLM applications.

Key Python files include:
- [`phases/19-capstone-projects/87-end-to-end-safety-gate/code/main.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/phases/19-capstone-projects/87-end-to-end-safety-gate/code/main.py) – A full‑lesson entry point demonstrating safety gate implementations
- [`phases/08-multi-agent-and-swarms/04-primitive-model/code/main.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/phases/08-multi-agent-and-swarms/04-primitive-model/code/main.py) – A foundational agent model built from scratch
- [`phases/11-llm-engineering/13-production-app/code/production_app.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/phases/11-llm-engineering/13-production-app/code/production_app.py) – A production‑grade LLM application

```python

# main.py – a simple entry point for a lesson

def main():
    print("Hello, AI Engineering from Scratch!")

if __name__ == "__main__":
    main()

```

### TypeScript: Web Tooling and Site Generation

**TypeScript powers the documentation infrastructure.** The repository uses TypeScript specifically for web‑side tooling, particularly in [`site/build.js`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/site/build.js), which compiles to JavaScript and generates the static site rendering the curriculum.

```typescript
// build.ts – a tiny TypeScript utility used by the site generator
function greet(): void {
  console.log("Building the AI Engineering curriculum site...");
}

greet();

```

### Rust: Systems‑Level Examples

**Rust appears in single‑file, `rustc --edition 2021` examples** designed for systems‑level lessons. The repository currently maintains minimal Rust scaffolding, allowing learners to explore memory safety and performance characteristics without external crates.

```rust
// main.rs – a tiny Rust program (std‑only)
fn main() {
    println!("Hello from Rust in AI Engineering!");
}

```

### Julia: Mathematical Computing

**Julia handles math‑heavy lessons** that rely heavily on numerical computing. When lessons require statistical operations or randomization without heavy dependencies, the codebase uses Julia’s standard library (`Random`, `Statistics`, etc.) to demonstrate mathematical foundations.

```julia

# hello.jl – a basic Julia script

println("Hello, Julia from AI Engineering!")

```

## Repository Structure and Language Implementation

The language constraints are enforced through documentation front‑matter and repository governance. Each lesson‑specific implementation adheres to the language listed in its associated metadata, ensuring consistency across the `phases/` directory structure.

The [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) file serves as the single source of truth for allowed languages, explicitly permitting only the four languages listed above. This policy prevents dependency creep and forces instructional code to remain comprehensible and portable.

## Summary

- The **AI Engineering from Scratch** repository uses **Python, TypeScript, Rust, and Julia** as its four supported languages.
- **Python** serves as the primary teaching vehicle, with lesson entry points typically named [`main.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.py) within `phases/*/code/` directories.
- **TypeScript** generates the static curriculum site via [`site/build.js`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/site/build.js).
- **Rust** appears in isolated, single‑file examples using `rustc --edition 2021` compilation.
- **Julia** supports mathematical lessons using only its standard library.
- Language eligibility is strictly defined in [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) at the repository root.

## Frequently Asked Questions

### Is Python the only language required to complete the AI Engineering from Scratch curriculum?

Python suffices for the majority of lessons, as most `phases/*/code/` directories contain Python entry points. However, specific modules on systems engineering or high‑performance computing may require reading or implementing Rust examples, while mathematical foundations sections use Julia.

### Why does the repository include Rust and Julia alongside Python?

The curriculum maintains Rust for systems‑level concepts requiring memory safety guarantees and bare‑metal performance, while Julia provides superior numerical computing capabilities for statistics and linear algebra lessons. Both languages support the **stdlib‑first** philosophy by functioning without external package dependencies.

### Where are the language requirements defined in the repository?

The [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) file at the repository root explicitly defines the four allowed languages and the "stdlib‑first" policy. This document governs all contributions and lesson implementations, ensuring no unauthorized languages or dependencies enter the codebase.

### Can I contribute lessons in other programming languages?

No. The repository strictly limits implementations to Python, TypeScript, Rust, and Julia as specified in [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md). This constraint maintains educational consistency and ensures all examples remain minimal and dependency‑free.