# How the AI Engineering From Scratch Curriculum Supports Python, Rust, and Julia

> Learn how the ai engineering from scratch curriculum supports Python Rust and Julia with its language agnostic lesson contract and parallel source files for seamless integration.

- Repository: [Rohit Ghumare/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch)
- Tags: deep-dive
- Published: 2026-06-09

---

**TLDR:** The `rohitg00/ai-engineering-from-scratch` curriculum uses a language-agnostic lesson contract enforced by [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md), where each lesson declares supported languages in its front matter and ships parallel source files—such as [`main.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.py), [`main.rs`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.rs), and `main.jl`—inside a `code/` directory, enabling learners to run the same algorithm across runtimes.

The `rohitg00/ai-engineering-from-scratch` repository teaches AI engineering fundamentals through a standardized, multi-language structure. By standardizing how lessons declare and organize code, the curriculum supports multiple programming languages without duplicating explanatory content. This approach lets students study identical algorithms in Python, Rust, and Julia while comparing each language's stdlib capabilities, performance traits, and syntax.

## The Language-Agnostic Lesson Contract

At the heart of the multi-language strategy is [`LESSON_TEMPLATE.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/LESSON_TEMPLATE.md), which defines the folder shape every lesson must follow. Inside each lesson directory, a `code/` folder holds runnable implementations, and the template explicitly reserves slots for [`main.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.py), [`main.ts`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.ts), [`main.rs`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.rs), and `main.jl` files. Because the scaffolding is fixed, a learner always knows exactly where to look for the Python, Rust, or Julia version of a given exercise.

## Enforced Language Declarations and Audit Rules

Consistency is guaranteed by the rules in [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md). Every lesson contains a [`docs/en.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/docs/en.md) file whose front matter includes a **Languages** declaration listing the runtimes that ship working code. According to the audit policy in [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) at lines 73-81, this declaration must match the actual `main.*` files present in the lesson's `code/` directory. If a lesson claims support for Python and Julia but only provides [`main.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.py), the repo's tooling flags the mismatch. This enforcement prevents stale or misleading language claims.

## Parallel Implementations in the Same Directory

When a concept is implemented in more than one language, the corresponding source files appear side-by-side under the same `code/` path. For example, the linear-algebra intuition lesson located at `phases/01-math-foundations/01-linear-algebra-intuition/code/` contains both [`vectors.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/vectors.py) and `vectors.jl`. The [`docs/en.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/docs/en.md) file for that lesson lists `Python, Julia` in its front matter, confirming that both runtimes are first-class citizens for that topic.

The two files express the same dot-product logic using each language's native idioms. The Python version in [`vectors.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/vectors.py) reads:

```python
def dot(a, b):
    """Return the dot product of two equal-length vectors."""
    return sum(x * y for x, y in zip(a, b))

print(dot([1, 2, 3], [4, 5, 6]))   # → 32

```

The Julia version in `vectors.jl` is kept in the same directory:

```julia
dot(a, b) = sum(x * y for (x, y) in zip(a, b))

println(dot([1, 2, 3], [4, 5, 6]))   # → 32

```

Because both files live under the same lesson tree, students can switch between Python, Rust, and Julia implementations without changing context.

## Cross-Runtime Dependency Policy

To keep comparisons fair and educational, [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) lines 56-61 impose a strict dependency rule: each language is limited to its standard library or a small whitelist of packages. Python, TypeScript, and Julia draw from a curated allow-list, while Rust stays stdlib-only. This restriction forces every implementation to build algorithms from first principles, ensuring that performance and ergonomics differences stem from the languages themselves rather than from disparate third-party ecosystems.

## Unified Developer Environment Setup

Supporting multiple runtimes only works if learners can install them. The dev-environment lesson at [`phases/00-setup-and-tooling/01-dev-environment/docs/en.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/phases/00-setup-and-tooling/01-dev-environment/docs/en.md) provides a single guide for installing Python 3.11+, Node 20+, Rust, and Julia. As noted in [`README.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/README.md) at lines 22-23 and 39-41, the curriculum expects every student to have these toolchains available, so no lesson is gated behind a specific OS or language preference.

## Summary

- The [`LESSON_TEMPLATE.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/LESSON_TEMPLATE.md) scaffold mandates a `code/` folder that hosts parallel source files such as [`main.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.py), [`main.rs`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.rs), and `main.jl`.
- [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) enforces an audit rule requiring the `Languages` front-matter field in [`docs/en.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/docs/en.md) to match the actual source files present in the lesson.
- Side-by-side examples—like [`vectors.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/vectors.py) and `vectors.jl` in the linear-algebra intuition lesson—let students compare syntax and performance directly.
- A stdlib-only dependency policy ensures that implementations are written from scratch and remain comparable across runtimes.
- The dev-environment lesson and [`README.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/README.md) provide one-stop installation instructions for Python, Rust, Julia, and Node.

## Frequently Asked Questions

### How does the curriculum prevent language support from becoming outdated?

The repository relies on an automated audit policy defined in [`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md). Each lesson's [`docs/en.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/docs/en.md) front matter must declare its supported languages, and those declarations are checked against the real `main.*` files inside the `code/` directory. If a [`main.rs`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.rs) or `main.jl` file is removed, the mismatch is caught immediately.

### Can a lesson support only one programming language?

Yes. The language-agnostic contract allows a lesson to ship a single [`main.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.py) or [`main.rs`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/main.rs) if the concept is best demonstrated in one runtime. The `Languages` field simply reflects whatever files are actually present, so the template scales down to single-language lessons and up to multi-language comparisons.

### Why does the curriculum restrict dependencies to the standard library?

[`AGENTS.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/AGENTS.md) limits each language to its stdlib or a tight whitelist so that every implementation rebuilds algorithms from first principles. This removes variability caused by external libraries and lets learners isolate differences in language semantics, memory models, and raw performance.

### Where should I start to set up Python, Rust, and Julia for this curriculum?

Start with the dev-environment lesson at [`phases/00-setup-and-tooling/01-dev-environment/docs/en.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/phases/00-setup-and-tooling/01-dev-environment/docs/en.md), which walks through installing Python 3.11+, Rust, and Julia. The root [`README.md`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/README.md) also summarizes the required runtimes and points to the same setup phase.