What is Zig? #ZigLang is a new-ish Programming Language that works well with C ... And has built-in Safety Checks at runtime
Our #PinePhone #ZigLang App will call the zgt GUI Library ... Which works with Linux (GTK), Windows and WebAssembly
#ZigLang Compiler is a simple download for #PinePhone
https://github.com/lupyuen/zig-pinephone-gui#install-zig-compiler
We also download the Zigmod Package Manager for #ZigLang on #PinePhone
Our #ZigLang App for #PinePhone has two Buttons and an Editable Text Area
Handling a Button Click in our #ZigLang App for #PinePhone
Here's how we build our #ZigLang App on #PinePhone
Creating the Widgets in our #ZigLang App for #PinePhone
https://lupyuen.github.io/articles/pinephone?2#set-the-widgets
Handling the Buttons in our #ZigLang App for #PinePhone
https://lupyuen.github.io/articles/pinephone?2#handle-the-buttons
Building our #PinePhone App in #ZigLang ... Here's what we gained
Our #ZigLang App for #PinePhone ... Works on #Pinebook Pro too! 🎉
Learning #ZigLang ... Some helpful resources
https://lupyuen.github.io/articles/pinephone?5#appendix-learning-zig
VSCode Remote works well for editing source files and running commands remotely on #PinePhone
https://lupyuen.github.io/articles/pinephone?6#appendix-vscode-remote
#ZigLang isn't Memory Safe ... But it tries to handle Bad Pointers
https://lupyuen.github.io/articles/pinephone?7#appendix-zig-handles-bad-pointers
#ZigLang Compiler builds Zig Projects ... By calling a tiny Zig Program
https://lupyuen.github.io/articles/pinephone?8#appendix-zig-build-system
Here's why #ZigLang works so well with GTK
https://lupyuen.github.io/articles/pinephone?9#appendix-gtk-backend-for-zgt
I hope this article inspires you to create #PinePhone Apps in #ZigLang! 👍
Can we use #ZigLang to code #PinePhone Apps? Maybe make them a little simpler and safer? Let's find out!
Inside our #ZigLang App for #PinePhone
https://lupyuen.github.io/articles/pinephone?2#inside-the-app