-
-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add way to build project with -fno-emit-bin
flag set for error reporting
#870
Comments
@sin-ack was talking about this in the Zig Discord and I think it's a great idea, there are just a few performance things we need to consider. This is probably something that should be implemented with threads + request cancellation/continuation. |
If you use an event loop + posix_spawn and then disable the filesystem locking for zig cache (which prevents multiple instances to run), it should work well enough. posix_spawn is faster when the process uses lots of memory. The event loop should monitor file descriptor readiness so you can call |
With that benchmark in mind this actually makes sense to do, I'll try my hand at hacking away at it :) |
If you want some sample code which does the posix spawn waitpid stuff (note that this is platform-specific code for Linux and macOS)
|
I think I'll just get something simple and platform independent working first and then I might look at optimizing it if it's really outrageously slow or something :P |
So I implemented this in its hacky asynchronous entirety (on Windows at least) and sadly some concerns I had turned out to be true: it is straight up unusable. I'm testing this on a fresh oof.mp4Sadly, I think this makes this feature wholly useless for most people :( |
This would fix #869 and #868 in a maintainable way and bring the Zig developer experience closer to what mature programming languages like Rust or Go have.
The text was updated successfully, but these errors were encountered: