MENU

Fun & Interesting

Zig 0.13.0 - Overview and Updates

Zig Is Great 22,607 8 months ago
Video Not Working? Fix It Now

In this video, I'll be going over the new Zig 0.13.0 Release Notes! There are many interesting things to talk about today: CVE mitigations, environment variable drama, an incredible-looking CLI progress indicator, and more! Zig on GitHub: https://github.com/ziglang/zig Become a Zig sponsor: https://ziglang.org/zsf/ Theme: https://catppuccin.com/palette Join the ZIG CC Discord! https://discord.com/invite/jG3D3CesVU Please consider supporting the channel! • Patreon: https://patreon.com/ZigIsGreat • Ko-fi: https://ko-fi.com/zigisgreat Chapters: 0:00 Intro 0:30 Platform Support 0:40 Standard Library 4:33 Build System 5:57 Compiler 6:40 Bugs 7:00 Toolchain 7:19 Roadmap 7:54 Project Info References: 1. TuxCare BatBadBut article: https://tuxcare.com/blog/batbadbut-vulnerability-exposes-windows-systems-to-attacks/ 2. Rust Blog - CVE-2024-24576 security advisory: https://blog.rust-lang.org/2024/04/09/cve-2024-24576.html 3. PR for BatBadBut mitigation patch: https://github.com/ziglang/zig/pull/19698 4. Old CRC implementation: 1. Crc: https://github.com/ziglang/zig/blob/0.12.x/lib/std/hash/crc/impl.zig#L26 2. Polynomial: https://github.com/ziglang/zig/blob/0.12.x/lib/std/hash/crc/impl.zig#L110 3. Crc32WithPoly: https://github.com/ziglang/zig/blob/0.12.x/lib/std/hash/crc/impl.zig#L118 4. Crc32SmallWithPoly: https://github.com/ziglang/zig/blob/0.12.x/lib/std/hash/crc/impl.zig#L196 5. New CRC implementation: 1. Crc: https://github.com/ziglang/zig/blob/master/lib/std/hash/crc/impl.zig#L20 2. Compile errors: https://github.com/ziglang/zig/blob/master/lib/std/hash/crc/impl.zig#L104 6. Algorithm: https://github.com/ziglang/zig/blob/master/lib/std/hash/crc/impl.zig#L10 7. StaticStringMap: https://github.com/ziglang/zig/blob/master/lib/std/static_string_map.zig#L7 1. initComptime: https://github.com/ziglang/zig/blob/master/lib/std/static_string_map.zig#L71 2. keys() and values(): https://github.com/ziglang/zig/blob/master/lib/std/static_string_map.zig#L251 3. init(): https://github.com/ziglang/zig/blob/master/lib/std/static_string_map.zig#L106 4. deinit(): https://github.com/ziglang/zig/blob/master/lib/std/static_string_map.zig#L134 5. getLongestPrefix(): https://github.com/ziglang/zig/blob/master/lib/std/static_string_map.zig#L225 6. getLongestPrefixIndex(): https://github.com/ziglang/zig/blob/master/lib/std/static_string_map.zig#L236 7. performance benchmarks: https://github.com/travisstaloch/comptime-string-map-revised/issues/1 8. PriorityQueue: 1. Old len field: https://github.com/ziglang/zig/blob/0.12.x/lib/std/priority_queue.zig#L22 2. New cap field: https://github.com/ziglang/zig/blob/master/lib/std/priority_queue.zig#L22 3. ArrayList: https://github.com/ziglang/zig/blob/master/lib/std/array_list.zig#L14 4. New allocatedSlice() function: https://github.com/ziglang/zig/blob/master/lib/std/priority_queue.zig#L133 9. std.process.child: 1. createNullDelimitedEnvMap(): https://github.com/ziglang/zig/blob/f47824f24d1b20c276a797df8cf99066c08203b6/lib/std/process.zig#L1793 2. createWindowsEnvBlock(): https://github.com/ziglang/zig/blob/f47824f24d1b20c276a797df8cf99066c08203b6/lib/std/process.zig#L1844 10. CLI progress: 1. Simple example: https://asciinema.org/a/gDna9RnicwYjDRIDn4e07NFSc 2. Music player example: https://asciinema.org/a/661404 3. Andrew Kelley blog post: https://andrewkelley.me/post/zig-new-cli-progress-bar-explained.html 11. iovec: 1. before: https://github.com/ziglang/zig/blob/0.12.x/lib/std/posix.zig#L175 2. after: https://github.com/ziglang/zig/blob/master/lib/std/posix.zig#L175 12. std.zip: https://github.com/ziglang/zig/blob/master/lib/std/zip.zig 13. Step.Run global lock: 1. Comment referencing the lock: https://github.com/ziglang/zig/blob/master/lib/std/Build/Step/Run.zig#L31 2. New global lock functions: https://github.com/ziglang/zig/blame/master/lib/std/debug.zig#L80 3. Usage in Step.Run: https://github.com/ziglang/zig/blob/master/lib/std/Build/Step/Run.zig#L1251 14. Step.ObjCopy API change: 1. Old interface: https://github.com/ziglang/zig/blob/0.12.x/lib/std/Build/Step/ObjCopy.zig#L36 2. New interface: https://github.com/ziglang/zig/blob/master/lib/std/Build/Step/ObjCopy.zig#L36 15. Windows DLLs: 1. Related PR: https://github.com/ziglang/zig/pull/19743 2. New behavior example: https://ziglang.org/download/0.13.0/release-notes.html#Install-Windows-DLLs-to-codeltprefixgtbincode-by-default 3. CMake artifact kinds: https://cmake.org/cmake/help/latest/command/install.html#artifact-kind 16. CLI color environment variables: 1. Bixense: https://bixense.com/clicolors/ 2. BSD (2000) - ls: https://man.freebsd.org/cgi/man.cgi?query=ls&manpath=FreeBSD+4.1.1-RELEASE 17. loongaarch64 fails to build Hello World: https://github.com/llvm/llvm-project/issues/93894 18. Bug reports closed: https://github.com/ziglang/zig/issues?q=is%3Aclosed+is%3Aissue+label%3Abug+milestone%3A0.13.0

Comment