u/quag

🔥 Hot ▲ 59 r/Zig

0.15.1 -> 0.16.0 upgrade not as scary as I thought

I did have to change over a few things for my program:

  1. Change from @cImport to loading the c files through the build system

  2. the only Io changes needed were to switch from Timer to Timestamps

  3. Changing from the GeneralPurposeAllocator to the DebugAllocator (because I use enable_memory_limit)

  4. Dealing with vector indexes having to be known at comptime—so switching some vectors to arrays while they’re being built

The changelog was helpful for the cImport and comptime vector indexing changes. I had to hunt through the package docs to figure out how the memory allocator changed. For the Timer/Timestamps, I had to hunt through the zig std library source to find examples.

I was able to do the migration in one sitting and the program ran first time after it compiled.

reddit.com
u/quag — 2 days ago