Ce cours n'est pas disponible en Français (France)

Nous sommes actuellement en train de le traduire dans plus de langues.
Pragmatic AI Labs

OO: Python to Rust

Noah Gift

Instructeur : Noah Gift

Inclus avec Coursera Plus

Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

6 heures à compléter
Planning flexible
Apprenez à votre propre rythme
Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

6 heures à compléter
Planning flexible
Apprenez à votre propre rythme

Ce que vous apprendrez

  • Apply a receipt-driven, three-mode workflow (Discover, Refactor, Translate) to move object-oriented Python code into idiomatic Rust.

  • Translate Python class hierarchies into Rust structs, traits, enums, and the type-state pattern using composition over inheritance.

  • Score Python-to-Rust translation pull requests using a breakeven analysis and complexity-claim review rubric.

Détails à connaître

Certificat partageable

Ajouter à votre profil LinkedIn

Récemment mis à jour !

mai 2026

Évaluations

1 devoir

Enseigné en Anglais

91%

of learners achieved a positive career outcome

Découvrez comment les employés des entreprises prestigieuses maîtrisent des compétences recherchées

 logos de Petrobras, TATA, Danone, Capgemini, P&G et L'Oreal

Élaborez votre expertise du sujet

Ce cours fait partie de la Spécialisation "Rust for Data Engineering"
Lorsque vous vous inscrivez à ce cours, vous êtes également inscrit(e) à cette Spécialisation.
  • Apprenez de nouveaux concepts auprès d'experts du secteur
  • Acquérez une compréhension de base d'un sujet ou d'un outil
  • Développez des compétences professionnelles avec des projets pratiques
  • Obtenez un certificat professionnel partageable

Il y a 5 modules dans ce cours

Every Big-O claim in this course ships with three independent receipts: an EMPIRICAL bench (criterion measures the curve), a STRUCTURAL guard (Rust types and proptest enforce it), and a FORMAL theorem (Lean 4 machine-checked, displayed as a [verified] stamp). Complexity is a CLAIM about how runtime or memory scales with input size. In this module you learn the c24 workflow: write the claim as a contract, bind it to your Rust pub item, then attach the three receipts. A CLAIM of O(N) survives only if the slope on a log-log plot stays linear from N=10 to N=1,000,000.

Inclus

3 vidéos7 lectures

In this module you will master Empirical Wins — the speedups you can measure with cargo bench. You will translate three Python patterns to Rust idioms that drop runtime and memory: list comprehensions become fused iterator chains (filter+map in one pass, O(1) memory vs O(N)); x in dict becomes HashMap::contains_key with hasher choice as a c24 receipt (FxHash, AHash, or default SipHash, each measured); and sorted() becomes sort_unstable for cases where stability is not required. Every claim ships with criterion HTML reports as the EMPIRICAL receipt, a STRUCTURAL guard from Rust's type system, and a [verified] stamp from a FORMAL theorem.

Inclus

3 vidéos6 lectures

Python Optional[T] becomes Rust Option<T> with proptest sweeping every combinator chain; Python try/except becomes Result<T, E> with @semantic: total promoting every fallible function — the structural receipt that makes silent failure impossible.

Inclus

3 vidéos6 lectures

Systems-level translation makes the runtime trade-off visible. Python generators allocate per-call frame state and pay GIL overhead; Rust Iterator is monomorphized into the caller's stack — the structural receipt is the criterion bench showing a ~50x tight-loop gap. subprocess.run with sh -c re-introduces CWE-78 shell injection; Command::new().arg() invokes execve directly and removes the attack surface entirely. threading on CPython is serialized by the GIL; rayon::par_iter() distributes work across all cores via a Send + Sync work-stealing scheduler whose data-race bugs are compile errors. Each translation in this module is a runtime claim with a measurable receipt.

Inclus

3 vidéos6 lectures

The capstone closes the loop with a five-step playbook — transpile, inspect, refine, bench, prove — that you can apply to any hot Python loop and ship a receipt-backed Rust translation. Every Pull Request lands four receipts: criterion HTML report, proptest run, contract pv check, and a Lean status: proved stamp. The second lesson is the inverse: when the receipt-driven math says keep Python. Breakeven analysis, BREAKEVEN.md, and a final graded quiz that synthesizes Modules 1–5.

Inclus

2 vidéos6 lectures1 devoir

Obtenez un certificat professionnel

Ajoutez ce titre à votre profil LinkedIn, à votre curriculum vitae ou à votre CV. Partagez-le sur les médias sociaux et dans votre évaluation des performances.

Instructeur

Noah Gift
Pragmatic AI Labs
58 Cours3 861 apprenants

Offert par

Pragmatic AI Labs

En savoir plus sur Software Development

Pour quelles raisons les étudiants sur Coursera nous choisissent-ils pour leur carrière ?

Felipe M.

Étudiant(e) depuis 2018
’Pouvoir suivre des cours à mon rythme à été une expérience extraordinaire. Je peux apprendre chaque fois que mon emploi du temps me le permet et en fonction de mon humeur.’

Jennifer J.

Étudiant(e) depuis 2020
’J'ai directement appliqué les concepts et les compétences que j'ai appris de mes cours à un nouveau projet passionnant au travail.’

Larry W.

Étudiant(e) depuis 2021
’Lorsque j'ai besoin de cours sur des sujets que mon université ne propose pas, Coursera est l'un des meilleurs endroits où se rendre.’

Chaitanya A.

’Apprendre, ce n'est pas seulement s'améliorer dans son travail : c'est bien plus que cela. Coursera me permet d'apprendre sans limites.’

Foire Aux Questions