Core Languages for the AI Engineering from Scratch Project: Python, TypeScript, Rust, and Julia

The AI Engineering from Scratch curriculum restricts all lessons to four core languages—Python, TypeScript, Rust, and Julia—enforcing a strict standard-library-first policy to teach fundamental algorithms without framework abstraction.

The rohitg00/ai-engineering-from-scratch repository provides a comprehensive curriculum designed to teach AI engineering fundamentals from the ground up. According to the project's AGENTS.md file, the core languages for the AI Engineering from Scratch project are deliberately limited to four specific runtimes to maintain pedagogical clarity. Each lesson requires a runnable main.<ext> file written in one of these languages, ensuring learners interact with raw mathematical implementations rather than high-level framework APIs.

The Four Core Languages of the Curriculum

The repository's AGENTS.md file explicitly defines the allowed runtimes in its Dependencies section. According to the source code, each language serves a distinct pedagogical purpose in the AI engineering pipeline.

Python for Numerical Computing

Python handles numerical work, linear algebra, and tensor operations using libraries such as numpy and torch. Lessons utilizing Python focus on the mathematical foundations of machine learning while maintaining visibility into the underlying tensor manipulations.

Example from phases/01-intro/code/main.py:


# AI Engineering from Scratch – Python example

# Source: phases/01-intro/docs/en.md

print("Hello, AI Engineering!")

TypeScript for Web-Focused Lessons

TypeScript powers the web-focused lessons and the site-generation pipeline using libraries like hono, zod, and ws. This language demonstrates how AI models interface with modern web technologies and deployment patterns.

Example from phases/01-intro/code/main.ts:

// AI Engineering from Scratch – TypeScript example
// Source: phases/01-intro/docs/en.md
console.log("Hello, AI Engineering!");

Rust for Low-Level Algorithmic Demos

Rust provides a pure standard library implementation for low-level algorithmic demos. This constraint ensures learners understand memory management and performance characteristics at the systems level without external crate dependencies.

Example from phases/01-intro/code/main.rs:

// AI Engineering from Scratch – Rust example
// Source: phases/01-intro/docs/en.md
fn main() {
    println!("Hello, AI Engineering!");
}

Julia for High-Performance Computing

Julia supplies a high-performance scientific-computing environment restricted to the standard library only. This language demonstrates how mathematical expressions translate directly to optimized machine code for AI workloads.

Example from phases/01-intro/code/main.jl:


# AI Engineering from Scratch – Julia example

# Source: phases/01-intro/docs/en.md

println("Hello, AI Engineering!")

Standard-Library-First Architecture

The project adheres to a standard-library-first philosophy explicitly documented in AGENTS.md. This constraint prevents "black-box framework magic" by requiring algorithmic implementations to use only built-in language features where specified.

The Dependencies table in AGENTS.md states:

"Dependencies … Python … TypeScript … Rust … Julia … Stdlib‑first."

This restriction ensures that every lesson contains visible mathematical operations rather than hidden framework calls. When learners examine the source code in phases/01-intro/code/ or subsequent lesson directories, they see the raw algorithmic steps required for AI engineering.

Lesson Structure and Testing

Every lesson in the curriculum contains a runnable main.<ext> file in one of the four core languages. These files follow a strict four-to-six line header comment convention referencing the source documentation path.

The file organization follows this pattern:

Each language uses its native test runner for validation:

  • Python: python -m unittest
  • TypeScript: npx tsx --test
  • Rust: cargo test
  • Julia: Built-in testing framework

This systematic approach ensures that implementations across the core languages for the AI Engineering from Scratch project remain consistent and testable without external dependencies.

Summary

  • The AI Engineering from Scratch project uses four core languages: Python, TypeScript, Rust, and Julia.
  • The AGENTS.md file authoritatively defines these languages in the Dependencies table.
  • A standard-library-first policy prevents framework abstraction, exposing raw algorithmic logic in lessons.
  • Every lesson includes a main.<ext> file following strict header comment conventions that cite the source documentation.
  • Native test runners validate implementations for each respective language.

Frequently Asked Questions

Does the project allow external frameworks like PyTorch or TensorFlow?

No. While Python lessons utilize numpy and torch for tensor operations as specified in the curriculum table, the overall architecture enforces a strict stdlib-first policy for core algorithmic demos. The focus remains on implementing mathematical foundations directly rather than importing high-level framework abstractions.

Why does the curriculum include TypeScript for AI engineering?

TypeScript powers the web-focused lessons and site-generation pipeline, demonstrating how AI models interface with web technologies. The repository uses hono, zod, and ws to teach deployment patterns while maintaining the stdlib-first constraint for fundamental algorithmic code.

How are the core languages tested in the repository?

Each language uses its native testing mechanism. Python implementations run with python -m unittest, TypeScript with npx tsx --test, Rust with cargo test, and Julia with its built-in testing framework. This ensures compatibility without requiring external test harnesses.

Where are the core languages defined in the source code?

The authoritative definition appears in AGENTS.md under the Dependencies table. While the repository contains a languages.json file, that resource tracks human languages for site translation rather than programming languages. Practical implementations reside in lesson directories like phases/01-intro/code/ where each main.* file demonstrates the required structure for its respective runtime.

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 →