[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-105326":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":17,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":35,"readmeContent":36,"aiSummary":10,"trendingCount":16,"starSnapshotCount":16,"syncStatus":37,"lastSyncTime":38,"discoverSource":39},105326,"viva","vivaui\u002Fviva","vivaui","A Go-first, GPU-native desktop framework. No WebView, no bundled runtime.","https:\u002F\u002Fvivaui.dev\u002F",null,"Go",123,14,64,6,0,27,81,75.54,"Apache License 2.0",false,"main",true,[25,26,27,28,29,30,31,32,33,34],"desktop","direct3d","framework","golang","gpu","gui","metal","native","ui","vulkan","2026-11-01 00:14:18","\u003Ch1 align=\"center\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"website\u002Fsrc\u002Fassets\u002Fviva-lockup-dark.svg\">\n    \u003Cimg src=\"website\u002Fsrc\u002Fassets\u002Fviva-lockup.svg\" alt=\"Viva\" width=\"240\">\n  \u003C\u002Fpicture>\n\u003C\u002Fh1>\n\n\u003Cp align=\"center\">English | \u003Ca href=\"README.zh-CN.md\">简体中文\u003C\u002Fa>\u003C\u002Fp>\n\nViva is a Go-first, GPU-native desktop framework. Applications draw through\nthe platform's own window and GPU APIs — Cocoa and Metal, Win32 and Direct3D 11,\nXCB and Vulkan — with no WebView, no browser engine, and no bundled runtime. It\nis aimed at small binaries, low idle resource usage, and direct access to native\nplatform capabilities.\n\nThe status list below is what runs today.\n\n## Quick start\n\nViva is a Go module, `github.com\u002Fvivaui\u002Fviva`. The `viva` command builds,\npackages and live-reloads applications; nothing in it is linked into the program\nyou ship.\n\n```sh\nbrew install vivaui\u002Ftap\u002Fviva        # macOS, Linux\nscoop bucket add vivaui https:\u002F\u002Fgithub.com\u002Fvivaui\u002Fhomebrew-tap && scoop install viva   # Windows\nviva doctor                         # is this machine ready?\nviva init hello\ncd hello\nviva dev .        # hot reload: save a file, the window updates and keeps its state\n```\n\nPrebuilt archives (with `SHA256SUMS`) are on each release from `v0.1.3` on; with Go\nalready installed, `go install github.com\u002Fvivaui\u002Fviva\u002Fcmd\u002Fviva@latest` works too.\nYou do not need Go first: `viva build`, `viva dev` and `viva init` download the\nofficial toolchain once into your user cache when there is none (checked against\ngo.dev's SHA-256; `VIVA_GO_DOWNLOAD=0` turns it off). A project made by `viva init`\npins the command with a `tool` line in `go.mod`, so `go tool viva` runs the version\nthat project builds against. See the Build and package guide.\n\n`viva init` writes a runnable project: a window, a test that drives it without\nopening one, `viva.toml`, and an `AGENTS.md` describing the programming model.\n`viva build` writes a release program to `build\u002F`, and `viva package` writes the\nplatform's own bundle.\n\nRequirements: Go 1.26 or newer (viva fetches it when missing). On macOS the Xcode command-line tools, because\nViva reaches Cocoa and Metal through cgo; on Linux, X11 with the system XCB and\nVulkan loaders; on Windows, Win32 with Direct3D 11 and DirectWrite. Viva loads\nthe system libraries at runtime and bundles none of them.\n\nThe current release is `v0.2.1`; name it explicitly (`@v0.2.1`) to pin it. Guides,\nthe API reference, and a component catalog with live previews live in\n[`website\u002F`](website\u002F); run it with `npm run dev` there, or read them on\n[vivaui.dev](https:\u002F\u002Fvivaui.dev\u002Fen\u002F), which is also available in\n[Chinese](https:\u002F\u002Fvivaui.dev\u002Fzh\u002F).\n\nEverything below describes this repository: its measurements, its own programs,\nand how to work on the framework rather than with it.\n\n## Scope\n\nViva targets native desktop applications on macOS, Windows, and Linux. A\nWebAssembly\u002FWebGPU backend is optional and must not add cost to native builds.\niOS, iPadOS, Android, mobile packaging, and a touch-first mobile runtime are\nexplicitly out of scope. Desktop performance and native integration will not be\nweakened to preserve hypothetical future mobile compatibility.\n\nAll three backends use direct operating-system window and GPU APIs with no\nWebView and no bundled rendering runtime.\n\n## Current Status\n\n- Native macOS window and event loop.\n- Direct Metal clear and present.\n- Flat generational retained scene with stable node identities.\n- Coalesced O(1) localized rectangle updates with zero hot-path allocations.\n- Precompiled Metal shader and instanced rectangle rendering.\n- Event-driven C-to-Go pointer dispatch and 32-byte partial Metal uploads.\n- Paint-order hover and press interaction state with click activation;\n  moving the pointer inside one region performs no renderer work.\n- Keyboard focus with Tab traversal, Enter and Space activation, and focus\n  rings; one key event repaints at most once and publishes accessibility\n  updates only when focus actually changed.\n- Event-driven scrolling with per-primitive clipping: a 1000-row list\n  virtualizes to its visible window, one scroll gesture repaints exactly once\n  with one partial GPU upload, and clipped content never reaches the\n  renderer.\n- Three native window modes: standard titled, frameless (no traffic lights),\n  and custom titlebar (transparent title bar, full-height content, the window\n  moves from the regions the page declares). Window close can be intercepted\n  by the application.\n- Explicit multi-window applications through `app.RunApplication`: every\n  window owns independent retained paint, focus, input, text, invalidation, and\n  close state, and the native loop exits after the final window closes.\n- Status-area icons and popup panels: `Application.AddStatusItem` puts an icon\n  in the macOS menu bar, the Windows notification area, or a Linux\n  StatusNotifier host; `StatusItemConfig.Menu` makes it open the system's own\n  menu (NSMenu, a Win32 popup menu, `com.canonical.dbusmenu`); `WindowPanel` is\n  the borderless popup that opens beside it and closes when it loses focus;\n  `Window.Hide`\u002F`Show` keep an application running without a visible window.\n- `Application.SetDockBadge` puts a label in the red badge macOS draws at the\n  corner of the application's Dock tile, and an empty label removes it.\n- `app.StoreSecret`\u002F`LoadSecret`\u002F`DeleteSecret` keep a small secret in the\n  system's own store (Keychain, Credential Manager, Secret Service).\n- `ui.MonoFamily` draws fixed-pitch text in any installed family and\n  `app.MonospaceFamilies` lists them.\n- `Config.OnFileDrop` receives files dragged from the file manager, with the hit\n  under the pointer.\n- A separate retained semantic accessibility tree mirrored into native\n  NSAccessibility elements, Windows UI Automation providers (Invoke, Toggle,\n  Value, RangeValue, SelectionItem, ExpandCollapse and Text patterns, with\n  events) and Linux AT-SPI objects, and into ARIA in the browser build. A\n  screen reader's press, focus and set-value requests reach the application\n  through `platform.AccessibilityHandler`. See\n  [docs\u002Faccessibility.md](docs\u002Faccessibility.md).\n- Event-driven window-resize repainting with exactly one GPU submission per\n  resize and zero work while the size is unchanged.\n- `Config.OnFrameChange`, `Config.OnMinimize` and `Window.Minimized` report\n  where a window is and whether the window manager minimized it.\n- Retained Row\u002FColumn\u002FStack\u002FFlex layout with O(1) unchanged-layout checks.\n- Paint-order pointer routing, stable keyboard focus, and Tab traversal.\n- Native macOS `NSTextInputClient` integration with real Chinese IME candidate\n  composition, grapheme-aware editing, and UTF-16 mapping.\n- Focus-driven dynamic native text editors on macOS, Windows, and Linux, with\n  explicit enable\u002Freplace\u002Fdisable frame updates. macOS and Windows caret timers\n  exist only while an editable field is focused. Linux composes through the IBus\n  protocol (IBus and Fcitx5's IBus frontend); XIM is still open.\n- A separate retained semantic accessibility tree.\n- Direct CoreText shaping, system-font fallback, GPU-composited text textures,\n  and a bounded measurement cache.\n- Experimental Windows shell with Win32 events, D3D11 retained rendering,\n  embedded DXBC shaders, DirectWrite measurement, and bounded GDI label\n  textures; native builds do not load a shader compiler.\n- Experimental Linux\u002FX11 shell with dynamically loaded system XCB, Vulkan,\n  Pango, and Cairo; retained rounded rectangles and triangles, layered\n  GPU-composited system text, pointer and keyboard input, custom titlebar drag,\n  and a blocking event loop with no idle redraw.\n- Event-driven rendering with no idle frame loop.\n- Theme tokens and a statically typed, source-owned translation of the pinned\n  shadcn component catalog, including forms, overlays, menus, calendars,\n  scrolling recipes, feedback surfaces, and area, line and bar charts drawn\n  from typed slices without a browser runtime, reflection, or a runtime style\n  parser.\n- A shared native\u002FWASM component browser: a catalog of every component grouped\n  by category, and a page per component that runs all of its examples side by\n  side, each live (clicks, hover, keyboard, drag, wheel and native text\n  editing), with a draggable page scrollbar and hot-reload state preservation.\n  The examples are the ones in `internal\u002Fcomponentdemo`, embedded into the page\n  with `ui.Canvas.Embed`, so the gallery holds no copy of any component.\n- Clean event-loop return on window close or application termination.\n- Reproducible binary, startup, CPU, memory, and GPU-submission measurement.\n\nThe Windows backend cross-builds for amd64 and arm64 and passes its platform\ntests plus Gallery startup, pointer, and keyboard smoke tests under Wine\u002FDXVK.\nPlatform tests, the conformance scenarios and the input, drop and device-loss\npaths run on a Windows 11 virtual machine (WARP) and a Debian KDE\u002FX11 machine\n(lavapipe); `docs\u002Fconformance.md` records the scenarios that need real hardware.\nUI Automation is checked against a real Windows 11 machine from an external\nclient (see docs\u002Faccessibility.md), and AT-SPI against libatspi on KDE\u002FX11. The\nLinux backend passes Ubuntu arm64 Xvfb\u002Fllvmpipe M0 and Debian amd64\nX11\u002FLavapipe retained-scene smokes, including mixed Chinese\u002FLatin text and\nlocalized scene updates. The macOS runtime tests and benchmarks run on arm64.\n\nNative label renderers draw single-line labels. The browser preview runs on the\nCanvas2D backend.\n\n## Run the repository\n\nThese commands build and drive the framework's own programs from this checkout.\n\n```sh\ngo run .\u002Fcmd\u002Fshowcase        # the native component showcase\ngo run .\u002Fcmd\u002Fcomponent-preview -component button -example variants   # one example, natively\ntools\u002Fbuild_web.sh           # viva build --target web, then serves http:\u002F\u002F127.0.0.1:8090\ngo run .\u002Ftools\u002Fdocs -check   # the API and component data the website generates from\n```\n\nThe browser gallery paints the same Go components through the Canvas2D\nWebAssembly backend; its visual direction and measured costs are recorded in\n`docs\u002Fbenchmarks\u002Fm3-gallery-style-darwin-arm64.md`.\n\n## Documentation website\n\n[vivaui.dev](https:\u002F\u002Fvivaui.dev\u002Fen\u002F) is the public site, in English and Chinese:\nguides whose code blocks are files under `examples\u002Fguides\u002F` that `go test` builds\nand drives headlessly, an API reference generated from the Go source, and a page\nper component with a live Go\u002FWASM preview. The Astro + Svelte source is in\n[`website\u002F`](website\u002F); it is not part of the native UI or the release runtime.\n\n```sh\ncd website\nnpm ci\nnpm run dev          # http:\u002F\u002F127.0.0.1:4321\u002Fzh\u002F and \u002Fen\u002F\nnpm test && npm run build\n```\n\nSee [website\u002FREADME.md](website\u002FREADME.md) for the preview pipeline, the\ngenerated data and `test:site`.\n\n## Build and ship an application\n\n`viva build` makes a release program for `--target darwin`, `windows`, `linux`\nor `web` (`-trimpath`, stripped, a fixed build ID, so the same sources give the\nsame bytes) and reports its size apart from anything around it. `viva package`\nadds the platform's own installer. Both read an optional `viva.toml` next to\n`go.mod`:\n\n```toml\n[app]\nname = \"Viva Gallery\"       # shown in the menu bar; names the .app\nid = \"dev.viva.gallery\"     # bundle identifier\npackage = \".\u002Fcmd\u002Fshowcase\"  # the main package to build\n\n[mac]\nmin_system = \"12.0\"         # the macOS the program is compiled for; floor 12.0\n```\n\n```sh\ngo run .\u002Fcmd\u002Fviva build --target windows --arch amd64\ngo run .\u002Fcmd\u002Fviva package --zip\ngo run .\u002Fcmd\u002Fviva help package     # every command and flag\n```\n\n`viva.toml` is decoded strictly: an unknown table or key, a duplicate or a value\nof the wrong type is an error that names the line. A macOS program is compiled\nfor `min_system`, not for the macOS of the machine building it, and `package`\nrefuses a bundle that claims an older system than its program needs. Signing and\nnotarization are opt-in through `--sign-identity` or `APPLE_SIGNING_IDENTITY`\nplus notarytool credentials; `--no-sign` turns both off. `--arch amd64` builds\nthe other Darwin architecture from either host: the build keeps cgo and the\nObjective-C\u002FMetal bridge and lets clang emit the other Mach-O slice. The\n[Build and package guide](https:\u002F\u002Fvivaui.dev\u002Fen\u002Fdocs\u002Fbuild-and-package\u002F) covers\nevery target, installer format and flag.\n\nThe release link is measured, not assumed. `go-toml\u002Fv2` is used only by the\n`viva` command and `purego` only by the Linux backend, so neither is in a macOS\nor Windows program. The development reload protocol, single-instance sockets,\nPNG icon decoding and the Go test runtime stay out of release programs (reload,\nsingle instance and PNG are opt-in packages; the test runtime is absent), and\nleak counters remain because they cost two atomics per window or driver.\n\nA static canvas can be presented through the public API:\n\n```go\ntheme := ui.DarkTheme()\nvar canvas ui.Canvas\ncomponents.Card(&canvas, theme, ui.Rect{X: 24, Y: 24, Width: 320, Height: 180})\nif err := app.RunCanvas(app.Config{Title: \"My App\"}, &canvas); err != nil {\n    log.Fatal(err)\n}\n```\n\n## Engineering Rules\n\nThe performance budgets, dependency policy, architecture boundaries, and\ndefinition of done are enforced by the checked-in benchmarks and tests.\nMeasurements are evidence; terms such as\n“native speed,” “zero idle work,” and “lightweight” are not used as unverified\nmarketing claims.\n\n## Contributing\n\nBug reports, platform findings, and documentation fixes are always welcome — see\n[CONTRIBUTING.md](CONTRIBUTING.md) for the gate a change has to pass and for\nwhere the line between framework and application behaviour sits. Security\nproblems go through [SECURITY.md](SECURITY.md), never a public issue.\n\n## Contributors\n\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fvivaui\u002Fviva\u002Fgraphs\u002Fcontributors\">\n  \u003Cimg src=\"https:\u002F\u002Fcontrib.rocks\u002Fimage?repo=vivaui\u002Fviva&max=300&columns=15\" alt=\"Contributors\" \u002F>\n\u003C\u002Fa>\n\n## Community\n\n\u003Ca href=\"https:\u002F\u002Flinux.do\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLINUX%20DO-Community-blue\" alt=\"LINUX DO\" \u002F>\u003C\u002Fa>\n\n## License\n\nViva is licensed under the Apache License 2.0. See [LICENSE](LICENSE) and\n[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).\n",2,"2026-10-31 04:26:27","CREATED_QUERY"]