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

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 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:


# 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, which compiles to JavaScript and generates the static site rendering the curriculum.

// 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.

// 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.


# 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 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 within phases/*/code/ directories.
  • TypeScript generates the static curriculum site via 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 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 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. This constraint maintains educational consistency and ensures all examples remain minimal and dependency‑free.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →