I feel old, I know that any time is an opportunity to get distracted but 3 seconds doesn't strike me as a long compile time.
Or is that a typo for 30, which would make more sense, which is definitely long enough to be a frustration?
I feel old, I know that any time is an opportunity to get distracted but 3 seconds doesn't strike me as a long compile time.
Or is that a typo for 30, which would make more sense, which is definitely long enough to be a frustration?
$ time zig build-exe ./a.zig -O ReleaseSmall
real 0m1.728s
user 0m1.544s
sys 0m0.292s
Which is actually slower than running the entire solution in debug mode: $ time zig run a.zig -- input.txt
min 337 342641
min 470 93006301
real 0m1.138s
user 0m0.789s
sys 0m0.270s
Totally possible that it's much slower on the dev's machine, but if he's a VR developer it seems weird that he'd have a low-powered box.[1]: https://github.com/llimllib/personal_code/blob/master/misc/a...
Maybe this is a Windows issue? If I run "zig build" and then immediately run "zig build" again it still takes 3 seconds.
Speaking as somebody who mostly codes for *n?x but has some windows users of their libraries, I've run face first into "everything I know about build optimisation is inapplicable on windows" more than once.
('everything' is admittedly slightly hyperbolic but I'm sufficiently bad at windows tooling that it always feels that way)
Nuked zig-cache and zig-out, rebuild, no change in build times.
I use zig anyway.
I think that's why he would like a `zig check` command that would give him these errors and warnings faster.
Zig comptime is the part that takes a bit more time compiling for being an interpreted version of the language, and the more comptime you use, the more time it takes (for a bit, even comptime heavy code can gain just a few seconds out of it, of course can gain 30 minutes, but you would be making like, weird jumps and generating strings on comptime that gets used on runtime, or an expensive algorithm that will take a long time to execute)
(or if you care only for one file) zig ast-check =)
For compile errors I think zig build is the only way