{"id":50404084,"url":"https://github.com/gkiely/zig-dom","last_synced_at":"2026-05-31T01:01:11.341Z","repository":{"id":355560073,"uuid":"1228213632","full_name":"gkiely/zig-dom","owner":"gkiely","description":"A Zig-backed DOM implementation for Bun","archived":false,"fork":false,"pushed_at":"2026-05-11T07:41:53.000Z","size":4087,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-11T09:34:17.745Z","etag":null,"topics":["bun","javascript","typescript","zig"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gkiely.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-03T18:38:19.000Z","updated_at":"2026-05-04T22:31:44.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gkiely/zig-dom","commit_stats":null,"previous_names":["gkiely/zig-dom"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gkiely/zig-dom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkiely%2Fzig-dom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkiely%2Fzig-dom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkiely%2Fzig-dom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkiely%2Fzig-dom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gkiely","download_url":"https://codeload.github.com/gkiely/zig-dom/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkiely%2Fzig-dom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33715211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bun","javascript","typescript","zig"],"created_at":"2026-05-31T01:01:10.469Z","updated_at":"2026-05-31T01:01:11.332Z","avatar_url":"https://github.com/gkiely.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zig-dom\n\nA Zig-backed DOM implementation.\n\n## Install\n\n### Bun\n\n```sh\nbun add zig-dom\n```\n\n### npm\n\n```sh\nnpm install zig-dom\n```\n\n## Test Setup\n\nCreate a Bun preload file:\n\n```ts\n// preload.ts\nimport { GlobalRegistrator } from \"zig-dom/global-registrator\";\n\nGlobalRegistrator.register();\n```\n\n### bunfig.toml\n\n```toml\n[test]\npreload = [\"./preload.ts\"]\n```\n\n### CLI\n\n```sh\nbun test --preload ./preload.ts\n```\n\n### Vanilla JS\n\n```ts\nimport { test, expect } from \"bun:test\";\n\ntest(\"updates the document\", () =\u003e {\n  document.body.innerHTML = \"\u003cbutton\u003eSave\u003c/button\u003e\";\n  expect(document.querySelector(\"button\")?.textContent).toBe(\"Save\");\n});\n```\n\n### React\n\n```tsx\nimport { render, screen } from \"@testing-library/react\";\nimport { test, expect } from \"bun:test\";\n\ntest(\"renders\", () =\u003e {\n  render(\u003cbutton\u003eSave\u003c/button\u003e);\n  expect(screen.getByRole(\"button\").textContent).toBe(\"Save\");\n});\n```\n\n## Benchmarks\n\nRun with:\n\n```sh\nbun run benchmark:dom\n```\n\nLatest local run: 2026-05-04 21:20:08 UTC on `darwin-arm64`.\n\n| Metric | zig-dom | happy-dom | jsdom | vs happy-dom |\n| --- | ---: | ---: | ---: | --- |\n| Append 10k children | 0.89 ms | 3.30 ms | 8.55 ms | zig-dom is 3.7x faster |\n| Create 10k elements | 2.35 ms | 3.38 ms | 7.30 ms | zig-dom is 1.4x faster |\n| Query `.class` across 10k nodes | 1.58 ms | 13.98 ms | 18.45 ms | zig-dom is 8.8x faster |\n| Query `[attr]` across 10k nodes | 1.32 ms | 7.01 ms | 15.06 ms | zig-dom is 5.3x faster |\n| Parse `innerHTML` | 0.44 ms | 11.54 ms | 25.03 ms | zig-dom is 26.0x faster |\n| Serialize `outerHTML` | 0.13 ms | 1.88 ms | 2.06 ms | zig-dom is 14.7x faster |\n| Mixed DOM workflow, 10k ops | 20.70 ms | 76.69 ms | 116.29 ms | zig-dom is 3.7x faster |\n| Mutation observer append, 10k nodes | 11.01 ms | 16.42 ms | 36.68 ms | zig-dom is 1.5x faster |\n| React render, 10k rows | 48.92 ms | 103.81 ms | 132.10 ms | zig-dom is 2.1x faster |\n| React update, 10k rows | 39.03 ms | 39.38 ms | 53.39 ms | zig-dom is 1.0x faster |\n| Import time | 29.94 ms | 68.86 ms | 491.57 ms | zig-dom is 2.3x faster |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkiely%2Fzig-dom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgkiely%2Fzig-dom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkiely%2Fzig-dom/lists"}