Skip to content

Instantly share code, notes, and snippets.

@SaicharanKandukuri
Created February 20, 2023 06:48
Show Gist options
  • Save SaicharanKandukuri/d399d15b9640f3193f11ce35f2f6b1a2 to your computer and use it in GitHub Desktop.
Save SaicharanKandukuri/d399d15b9640f3193f11ce35f2f6b1a2 to your computer and use it in GitHub Desktop.

Our zig journey so far

as part of our OSD Internship, we started learning zig language ( a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.) a c-like language with inbuilt cross-platform & cross-compile building support.

here are my notes on basics https://gist.github.com/SaicharanKandukuri/33c0fef784f59af4b31732914bab39c6

Zig introduces some special language features like: special controls in loops types special allocation for libs support for cabi and clibs

and last week we started working on the notes app with a UI framework capy (made with zig ) Capy ( like flutter ) is a wrapper of different platform ui libraries written for zig.

we tried to study and implement a notes app last week.

Day - 1 | we found that capy is easy in many ways and tried to implement some basic ui elements

Day - 2 | with a design sample of a notes app tried to implement it, but capy lacked so many implementations which makes our task kinda hard to make.

Day - 3 | tried to dig deep into capy UI backend and found zig had issues deep inside in language and to even get data from a Text feild we need to perform low level hacks like pointer casting and alignment casting to get through ui architecture and get the element and its data

https://github.com/SaicharanKandukuri/zig-notes/blob/6dc16f72faa18aa92d718cdce3a2dd37c874cde1/src/main.zig#L36

Day - 4 | tried to add improvements to capy backend code but realized its just too much work to satisfy capy motives and to create a new component

so capy and zig are not yet developer friendly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment