Skip to content

Instantly share code, notes, and snippets.

View Nathan-Franck's full-sized avatar
🏠
Working from home

Nathan Franck Nathan-Franck

🏠
Working from home
View GitHub Profile
@Nathan-Franck
Nathan-Franck / reactey-zig-concept.zig
Last active February 7, 2024 19:18
Theoretical framework for a UI library in Zig that mirrors a bit of what React does
// Theoretical framework for a UI library in Zig that mirrors a bit of what React does
const std = @import("std");
fn Store(T: type) type {
return struct {
value: T,
fn setValue(self: *@This(), value: T) void {
self.value = value;
// TODO: Call back to the framework to start re-rendering
@Nathan-Franck
Nathan-Franck / main.zig
Created August 24, 2023 22:58
Forcing language features into zig at comptime
const std = @import("std");
const sfy = @import("structify.zig");
pub fn main() !void {
// Object builders just like c# or typescript, easy peasy! Tooling could be better.
{
const Config = struct {
a: i32,
b: i16,