frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Ziex – A full-stack web framework for Zig

2•nurulhudaapon•1h ago
I’ve been building Ziex (https://ziex.dev), a framework that brings the "Next.js experience" to Zig.

I wanted to build web UIs using Zig, but I couldn't find many options that offered a declarative UI like JSX. Ziex is my attempt to bridge that gap, combining systems-level performance with great DX.

- JSX-like syntax: Write UI naturally inside Zig.

- Server-side rendering: Fast by default, with no garbage collector.

- File-system routing: Just like modern JS frameworks.

- Client-side rendering: For client side interactivity Ziex compile client component to wasm.

and many more...

To see it in action, I built a Hacker News clone with it that is deployed to cloudflare worker: https://hackernews.ziex.dev

It’s currently approaching its Alpha release. I’d love to hear feedback and ideas!

GitHub: https://github.com/ziex-dev/ziex

Docs: https://ziex.dev

Example Snippet:

pub fn Playground(allocator: zx.Allocator) zx.Component { const is_loading = true; var i: usize = 0;

    return (
        <main @allocator={allocator}>
            <h1>Hello, Ziex!</h1>

            {for (users) |user| (
                <Profile name={user.name} age={user.age} role={user.role} />
            )}

            {if (is_loading) (<p>Loading...</p>) else (<p>Loaded</p>)}

            {while (i < 5) : (i += 1) (<i>{i}</i>)}
        </main>
    );
}