Pragmatic AI Labs

Zig From Zero

Pragmatic AI Labs

Zig From Zero

Noah Gift

位教师:Noah Gift

包含在 Coursera Plus

深入了解一个主题并学习基础知识。
初级 等级

推荐体验

5 小时 完成
灵活的计划
自行安排学习进度
深入了解一个主题并学习基础知识。
初级 等级

推荐体验

5 小时 完成
灵活的计划
自行安排学习进度

您将学到什么

  • Read and write Zig — including the four standard-library allocators (GPA, Arena, FixedBuffer, page_allocator) — and map each idiom back onto Rust

  • Build a tiny statically-linked Zig binary and ship it inside a multi-stage Dockerfile that produces a kilobyte-sized container image

  • Make the language choice on a real team — pick Zig for footprint, fast cold start, and C interop; stay with Rust for long-running services

要了解的详细信息

可分享的证书

添加到您的领英档案

最近已更新!

April 2026

作业

3 项作业

授课语言:英语(English)

了解顶级公司的员工如何掌握热门技能

Petrobras, TATA, Danone, Capgemini, P&G 和 L'Oreal 的徽标

该课程共有7个模块

The four-card framing — memory, errors, generics, cleanup — and the four companion essays that walk each card against the Rust idiom it replaces. Allocator parameters travel through every function signature instead of lifetime annotations, !T plus try replaces Result plus the question-mark operator, comptime T type replaces trait bounds plus derive plus macro_rules, and defer plus errdefer replaces impl Drop with finer-grained lexically visible cleanup.

涵盖的内容

1个视频4篇阅读材料1个作业

Install Zig 0.13, build a hello-world with zig build-exe, read the four release modes — Debug, ReleaseSafe, ReleaseFast, ReleaseSmall — against the same source file, and cross-compile to a Linux musl target with one -target flag. The week's payoff is the moment a Linux binary falls out of a macOS host with no extra toolchain — the same primitive that drives every later Lambda and edge-runtime deployment.

涵盖的内容

1个视频3篇阅读材料

The optimization matrix on a 4096-by-4096 matrix multiply — Zig versus Rust versus Go on the same workload — measuring binary size, cold-start, and steady-state throughput across all four release modes. The week teaches the measurement loop that turns "is this faster?" into "by how much, on which dimension, against which baseline?" — the same loop that drives the Lambda and edge decisions in later weeks.

涵盖的内容

1个视频2篇阅读材料

Build the marcopolo command-line tool from std.process.argsAlloc with a GeneralPurposeAllocator and std.testing.allocator so a leak fails the test suite, then walk all four standard-library allocators side by side — GPA for application code with debug-mode leak detection, ArenaAllocator for parse-and-discard scopes that free everything in a single deinit, FixedBufferAllocator for stack-only buffers with no heap, and page_allocator for direct mmap-backed allocations.

涵盖的内容

2个视频4篇阅读材料1个作业

A 30-line HTTP server using std.net plus std.http, then the multi-stage Dockerfile that lands the final image at single-digit megabytes against a scratch base, then the use-case map for AWS Lambda, edge runtimes, and embedded targets where the binary footprint and cold-start budget dominate the workload's value over the borrow checker's compile-time payoff.

涵盖的内容

2个视频4篇阅读材料

Zig idioms a Rust developer trips on, when to reach for comptime versus a runtime branch, the Rust-or-Zig decision rule for a data-engineering team, the FFI patterns that let Zig call Rust and Rust call Zig over a C-ABI seam, and the path to Zig 1.0 that tells you which 0.13 features are stable to ship today versus which features need a feature-flag strategy.

涵盖的内容

1个视频2篇阅读材料

A culminating practice assignment that synthesizes every framework and pattern from Weeks 1 through 6 into one shippable production Zig component. Pick a Lambda or edge target, walk the four-card framing on the workload, build the Zig handler with a logic-versus-wiring split, ship the multi-stage Dockerfile against a scratch base, and add the named-contract assertInvariant helper that fires on container start before the binary fetches its first invocation. The reference implementation that grounds every deliverable lives at https://github.com/paiml/zig-from-zero — the workspace ships five demos (hello, marcopolo, http-server, sqlite-ws, lambda) that walk every standard-library allocator and every deployment target the course covers.

涵盖的内容

3篇阅读材料1个作业

位教师

Noah Gift
Pragmatic AI Labs
36 门课程2,532 名学生

提供方

Pragmatic AI Labs

人们为什么选择 Coursera 来帮助自己实现职业发展

Felipe M.

自 2018开始学习的学生
''能够按照自己的速度和节奏学习课程是一次很棒的经历。只要符合自己的时间表和心情,我就可以学习。'

Jennifer J.

自 2020开始学习的学生
''我直接将从课程中学到的概念和技能应用到一个令人兴奋的新工作项目中。'

Larry W.

自 2021开始学习的学生
''如果我的大学不提供我需要的主题课程,Coursera 便是最好的去处之一。'

Chaitanya A.

''学习不仅仅是在工作中做的更好:它远不止于此。Coursera 让我无限制地学习。'
Coursera Plus

通过 Coursera Plus 开启新生涯

无限制访问 10,000+ 世界一流的课程、实践项目和就业就绪证书课程 - 所有这些都包含在您的订阅中

通过在线学位推动您的职业生涯

获取世界一流大学的学位 - 100% 在线

加入超过 3400 家选择 Coursera for Business 的全球公司

提升员工的技能,使其在数字经济中脱颖而出

常见问题