-
-
Notifications
You must be signed in to change notification settings - Fork 546
Update zig examples and template to latest Zig #2298
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
Conversation
lib.export_symbol_names = &[_][]const u8{ "TIC", "OVR", "BDR", "SCR", "BOOT" }; | ||
lib.install(); | ||
|
||
lib.export_symbol_names = &[_][]const u8{ "TIC", "OVR", "BDR", "BOOT" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Has SCR been entirely removed now or just deprecated? If the latter we many want to leave it here for backwards compatibility...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think someone used it, first of all, it was initially called SCN, and second, most langs don't support SCN (only Lua and JS). We can remove it without any doubts.
export fn BDR() void {} | ||
|
||
export fn OVR() void {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these necessary now to compile?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep, if these are not present then the Zig compiler will complain that it couldn't find the symbols we're telling it to export.
lib.export_symbol_names = &[_][]const u8{ "TIC", "OVR", "BDR", "SCR", "BOOT" }; | ||
lib.install(); | ||
|
||
lib.export_symbol_names = &[_][]const u8{ "TIC", "OVR", "BDR", "BOOT" }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think someone used it, first of all, it was initially called SCN, and second, most langs don't support SCN (only Lua and JS). We can remove it without any doubts.
The previous Zig
build
andtic80.zig
files built fine with Zig 0.10, but no longer build with the latest stable (0.11) nor the current development version (0.12).This PR updates the Zig examples so that they build with both 0.11 and 0.12 😄
I've also formatted the files in question with Zig's language server formatter.