{"id":25684798,"url":"https://github.com/sped0n/zv6","last_synced_at":"2025-07-18T08:05:29.724Z","repository":{"id":277942363,"uuid":"933302544","full_name":"Sped0n/zv6","owner":"Sped0n","description":"A complete reimplementation of xv6 (RISC-V) in Zig.","archived":false,"fork":false,"pushed_at":"2025-07-13T14:14:22.000Z","size":363,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-13T14:18:29.933Z","etag":null,"topics":["kernel","operating-system","riscv","xv6","xv6-riscv","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","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/Sped0n.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2025-02-15T16:29:34.000Z","updated_at":"2025-07-13T14:14:25.000Z","dependencies_parsed_at":"2025-02-17T06:19:51.147Z","dependency_job_id":"0c9439b0-b880-4003-9ab3-bdaebe01fa89","html_url":"https://github.com/Sped0n/zv6","commit_stats":null,"previous_names":["sped0n/zv6"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sped0n/zv6","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sped0n%2Fzv6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sped0n%2Fzv6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sped0n%2Fzv6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sped0n%2Fzv6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sped0n","download_url":"https://codeload.github.com/Sped0n/zv6/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sped0n%2Fzv6/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265724817,"owners_count":23817882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["kernel","operating-system","riscv","xv6","xv6-riscv","zig"],"created_at":"2025-02-24T17:38:57.142Z","updated_at":"2025-07-18T08:05:29.715Z","avatar_url":"https://github.com/Sped0n.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zv6\n\nA **_complete_** reimplementation of [xv6 (RISC-V)](https://github.com/mit-pdos/xv6-riscv) in Zig.\n\n![demo](https://raw.githubusercontent.com/Sped0n/zv6/main/misc/demo.gif)\n\n\u003e The above video is at 10× speed.\n\n## Features\n\n- Kernel written in pure Zig.\n- On par performance with the original C version, even slightly faster (~5s for usertests on my laptop).\n- One build system (`build.zig`) for everything (kernel, userland, tools).\n- Pass **_all_** userland test (`forktest`, `stressfs`, `grind` and `usertests`).\n\n## Usage\n\nAll commands assume you are in the project root.\n\n### Prerequisites\n\n- Zig 0.14\n- QEMU\n- Perl\n- LLDB (optional, for debugging)\n\n### Build\n\nBuild everything (mkfs, all user‐programs, fs.img, initcode, and the kernel):\n\n```\nzig build\n```\n\nTo see all of the available build steps:\n\n```\nzig build --help\n```\n\nTo rebuild the kernel (or any other single step) you can invoke it by name:\n\n```\nzig build mkfs       # compile the mkfs tool\nzig build user       # compile all user programs\nzig build image      # regenerate fs.img (depends on mkfs + user)\nzig build initcode   # generate the initcode binary\nzig build kernel     # compile the kernel\n```\n\nIf you just want to recompile the kernel \u0026 skip recreating your disk image:\n\n```\nzig build kernel -Dkeep-fsimg\n```\n\n### Run\n\nStart QEMU, boot the kernel, mount `fs.img` over virtio:\n\n```\nzig build qemu\n```\n\nYou should see the xv6-ish boot output and land in the shell.\n\n### Debug\n\nLaunch QEMU suspended with a GDB stub on TCP port 3333:\n\n```\nzig build qemu-gdb\n```\n\nIn another terminal, start your LLDB and connect:\n\n```\n$ lldb zig-out/kernel/kernel --local-lldbinit\n(lldb) gdb-remote localhost:3333\n(lldb) c\n```\n\n### Trace\n\nRun QEMU with instruction tracing enabled; output goes to `qemu_debug.log`:\n\n```\nzig build qemu-trace\n```\n\nYou can then inspect `qemu_debug.log` for guest errors, instruction dumps, etc.\n\n## Credits\n\n- https://github.com/mit-pdos/xv6-riscv\n- https://github.com/skyzh/core-os-riscv\n- https://xiayingp.gitbook.io/build_a_os\n- https://github.com/tzx/nOSering\n- https://github.com/saza-ku/xv6-zig\n- https://github.com/candrewlee14/xv6-riscv-zig\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsped0n%2Fzv6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsped0n%2Fzv6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsped0n%2Fzv6/lists"}