Skip to content

Conversation

tupini07
Copy link
Contributor

@tupini07 tupini07 commented Sep 8, 2023

The previous Zig build and tic80.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.

@tupini07 tupini07 marked this pull request as ready for review September 8, 2023 17:42
lib.export_symbol_names = &[_][]const u8{ "TIC", "OVR", "BDR", "SCR", "BOOT" };
lib.install();

lib.export_symbol_names = &[_][]const u8{ "TIC", "OVR", "BDR", "BOOT" };
Copy link
Collaborator

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...

Copy link
Owner

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.

Comment on lines +180 to +182
export fn BDR() void {}

export fn OVR() void {}
Copy link
Collaborator

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?

Copy link
Contributor Author

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" };
Copy link
Owner

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.

@nesbox nesbox merged commit 113dc07 into nesbox:main Sep 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants