Why Rust?

Why Systems Programming Languages Matter

Importance of Systems Languages:

  • Essential for building operating systems, databases, and infrastructure
  • Provide fine-grained control over system resources
  • Enable optimization for performance-critical applications
  • Foundation for higher-level languages and frameworks

Performance Advantages:

  • Generally compiled languages like Rust are needed to scale to large, efficient deployments
  • Can be 10x to 100x faster than equivalent Python code
  • Better memory management and resource utilization
  • Reduced runtime overhead compared to interpreted languages

Data Science and ML Libraries Written in Rust

  • Polars - data processing and analysis library
  • tiktoken - tokenization library for OpenAI models
  • uv - package manager for Python
  • Burn - A PyTorch like alterntive in Rust
  • Candle - A minimalist ML framework for Rust
  • ...

Memory Safety: A Critical Advantage

What is Memory Safety?

Memory safety prevents common programming errors that can lead to security vulnerabilities:

  • Buffer overflows
  • Use-after-free errors
  • Memory leaks
  • Null pointer dereferences

Industry Recognition:

Major technology companies and government agencies are actively moving to memory-safe languages:

  • Google, Microsoft, Meta have efforts underway to move infrastructure code from C/C++ to Rust
  • ...

White House Press Release

image.png Whitehouse Press Release

DARPA TRACTOR Program

image-2.png Darpa Program

CISA Recommendation

image-3.png CISA -- The case for memory safe roadmaps CISA -- Cybersecurity and Infrastructure Security Agency

Programming Paradigms: Interpreted vs. Compiled

Interpreted Languages (e.g., Python):

Advantages:

  • Interactive development environment
  • Quick iteration and testing
  • Rich ecosystem for data science (Jupyter, numpy, pandas)
  • Easy to learn and prototype with

Compiled Languages (e.g., Rust):

Advantages:

  • Superior performance and efficiency
  • Early error detection at compile time
  • Optimized machine code generation
  • Better for production systems

Development Process:

  1. Write a program
  2. Compile it (catch errors early)
  3. Run and debug optimized code
  4. Deploy efficient executables

Technical Coding Interviews

And finally...

If you are considering technical coding interviews, they sometimes ask you to solve problems in a language other than python.

Many of the in-class activities and early homework questions will be Leetcode/HackerRank style challenges.

This is good practice!