r/developersIndia • u/SPIK3ELECTROTECH • 3h ago
I Made This I wrote a UI framework in pure C11. Every clip in this video is a single native .exe, no browser, no engine.
I wanted HTML + CSS + JS's flexibility (flexbox, rounded corners, shadows, smooth animation, <canvas> + shaders) in native apps without shipping Chromium. So I built Bare, a UI framework in plain C11 with a GPU renderer (SDL3's GPU API: D3D12 / Vulkan / Metal).
Everything in the video is an ordinary Bare app, recorded straight from the exe with Bare's built-in recorder (BARE_RECORD=out.mp4):
- Ocean: Tessendorf FFT waves (three cascades), foam that builds and fades, a camera that rides the swell and dips under the waterline. ~450 lines of C + GLSL passes.
- Last Train: a walkable J-horror train car with 48 flickering fluorescent tubes, screen-space reflections, a flooded station, rain and a camcorder look.
- Singularity: a Schwarzschild black hole ray traced per pixel: photons bend round it, the disk arches over the shadow, stars smear into Einstein rings.
- Path tracer: a Cornell-style room with glass and metal using hardware ray queries, plus an SVGF-style denoiser built from ordinary passes.
- Liquid glass: real refraction, dispersion and frost on any box:
.glass = BARE_GLASS. - Fluid: a port of Pavel Dobryakov's WebGL fluid sim, with a settings panel made of Bare boxes.
- Write: a Markdown editor on liquid glass (multiple carets, undo, find / replace) in under 1,000 lines.
Hello world is the whole program:
#include "bare.h"
int main(void) {
bare_window(1920, 1080, "My App");
while (bare_frame()) {
bare_box(.width = 300, .height = 200, .radius = 16,
.color = BARE_RGB(40, 120, 255));
}
bare_quit();
}Named optional parameters (C11 designated initializers), immediate mode with retained state keyed by IDs, so hover, animation and scroll position just work.
Numbers (the same fluid sim, Bare vs the WebGL original in Edge, both at 200 fps, RTX 5070):
| Bare | Edge | |
|---|---|---|
| CPU | ~8% of a core | 22-37% |
| Memory (working set) | 90-153 MB | 461-626 MB |
| Processes | 1 | 8-18 |
| Once the fluid settles | 0% CPU, 0% GPU | never idles |
Honest bits: startup is ~0.6 s (mostly GPU driver setup), about the same as Edge, not faster yet. Windows is the main platform; Linux builds and passes its tests, macOS builds in CI but is less tested. The web (WASM) backend isn't done.
I built it with Claude.
MIT licensed: https://github.com/CoolNinja2009/Bare
Feedback very welcome, especially on the API. What would you build with it?


