Zig Weekly #1
Hi all! This is the first issue of Zig Weekly, I'm hoping for this project to grow, I'll do my best to keep it up. Help welcome :) // Best Regards - Filip
Language & compiler
- Partial operator precedence - the compiler now rejects some mixed-operator expressions such as
x orelse y == zuntil you add parentheses, closing proposal #114 from 2016 (PR #30160). - Fields at the top (#37375) - accepted: fields of structs, enums and unions would have to come before all declarations. Discussion on whether
zig fmtor the compiler should enforce it is still going. - Remove
comptimefields (#32045) - accepted proposal. Commenters are worried about what it means for@callwith mixed comptime and runtime arguments, and discussion continues. - File-level namespace syntax (#37373) - accepted: a file could declare itself an
enum,union,opaqueorpacked structwith a line likestruct;at the top. - Replace
c_*types with an@Cbuiltin (#36082) - accepted proposal aims to express C ABI types without reserving words likec_intin the language. @alignOffor all types (#32080) - accepted:@alignOfwould work for every type, returning 1 for vacuous and comptime-only types.align(1)on wasm functions (#37302) - the core team agreed to allow it, and the fix landed in PR #37386.- Fewer inline switch instantiations (#36696) - accepted: an inline switch prong that does not capture the tag would be instantiated once per payload type.
- Lazy dependency fetching in the build system - the build now fetches pending lazy dependencies and retries when an artifact is not found, with a guard against infinite retry loops.
- Naked package metadata - dependencies that have no
build.zig.zonof their own can now declareversionandpathsnext to the URL, which gives them a readable package hash and filters out unwanted files.
ZLS
- ZLS 0.17.0 is released for Zig 0.17.
- Fix for a use-after-free when the build config is invalidated and better init function completion.
Community projects
Compiled from public posts. Want something removed or credited differently? Open an issue or pull request or email hello@zigweekly.com.
From the Ziggit thread What's everybody working on? (October edition):
- lukeflo is writing a TUI library with lists, text fields, borders and resizing.
- RadsammyT is building a TUI IRC client on termbox2.
- sashka added a formula editor to a spreadsheet app, powered by Zig comptime.
- Zandr0id is working on radCAD, a 2D geometry and constraint solver.
- listic is writing a Zig community mirror in Zig.
- morrijm4 started an Express.js-inspired HTTP/1.1 server.
Articles & videos
Compiled from public posts. Want something removed or credited differently? Open an issue or pull request or email hello@zigweekly.com.
- The glorious @xkcdRandom Zig builtin - a joke fork of the compiler that adds a builtin always returning 4 (after the xkcd comic), written as a tour of how the compiler is structured
- We have Traits at Home - techniques for abstraction in Zig using comptime
Call for participation
Add calls for participation, testing and good first issues by pull request.
Upcoming events
- Wednesday 28 October - Zig Maven online event "Zig: From Beginner to Slightly Less Beginner".
- Saturday 7 November - Zig Day Portland #5, Portland, OR.
- Sunday 8 November - Zig Day Seattle #4, Bellevue, WA.
- Saturday 21 November - Zig Day Bristol, Bristol, UK.
Jobs
- Add open Zig jobs by pull request.
Contribute
Send a pull request with one link per change. Thanks to everyone who contributed this week.