{"id":28363886,"url":"https://github.com/conero/zig-uyams","last_synced_at":"2025-07-26T22:39:58.717Z","repository":{"id":291537073,"uuid":"965022537","full_name":"conero/zig-uyams","owner":"conero","description":"zig 学习实践","archived":false,"fork":false,"pushed_at":"2025-06-15T10:52:09.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T11:49:14.409Z","etag":null,"topics":["cli","uymas","zig","zig-package"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mulanpsl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/conero.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-04-12T08:35:42.000Z","updated_at":"2025-06-15T10:57:18.000Z","dependencies_parsed_at":"2025-05-05T08:34:42.423Z","dependency_job_id":"4c28d196-d664-4b14-8b9a-d7453bd8e850","html_url":"https://github.com/conero/zig-uyams","commit_stats":null,"previous_names":["conero/zig-uyams"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/conero/zig-uyams","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conero%2Fzig-uyams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conero%2Fzig-uyams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conero%2Fzig-uyams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conero%2Fzig-uyams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/conero","download_url":"https://codeload.github.com/conero/zig-uyams/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/conero%2Fzig-uyams/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261343518,"owners_count":23144682,"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":["cli","uymas","zig","zig-package"],"created_at":"2025-05-28T19:39:53.739Z","updated_at":"2025-07-26T22:39:58.698Z","avatar_url":"https://github.com/conero.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Zig-Uymas\n\n\u003e Zig 版本 Uymas\n\u003e\n\u003e 2025年4月12日\n\u003e\n\u003e Joshua Conero\n\n\n\n\n\n基于 [zig](https://github.com/ziglang/zig) （版本v0.14.0） 的基础库，以加深对zig 的学习，官网地址：https://ziglang.org/ 。\n\n\n\n\n\n### 使用\n\n使用命令 zig fetch 引入包\n\n```shell\n# 安装指定的 commit\nzig fetch --save https://github.com/conero/zig-uyams/archive/{commit}.zip\n\n# 自定更新包到 zig.build.zon 中,如\n.dependencies = .{\n    .zig_uymas = .{\n        .url = \"https://bgithub.xyz/conero/zig-uyams/archive/fe46f8b6f44478e18290a4ff3a38a3a2a73c758e.zip\",\n        .hash = \"zig_uymas-0.0.0-qNy_KwIaAABwTg1cRaVGdrH7qq6kpnJE0q8GMvM5dp7D\",\n        // 是否开启懒加载\n        .lazy = true,\n    },\n},\n```\n\n\n\nbuild.zig 中加入依赖\n\n```zig\n// 加载依赖\nconst zig_uymas = b.dependency(\"zig_uymas\", .{});\n\n// 加入到 exe 中\nconst exe = b.addExecutable(.{});\n\n...\n// 使用依赖\nexe.root_module.addImport(\"uymas\", zig_uymas.module(\"uymas\"));\n```\n\n\n\nbuild.zig 中加入赖依赖\n\n```zig\n// 懒加载\nconst zig_uymas = b.lazyDependency(\"zig_uymas\", .{});\n\n// 加入到 exe 中\nconst exe = b.addExecutable(.{});\nif(zig_uymas) |uymas_mod|{\n\texe.root_module.addImport(\"uymas\", uymas_mod.module(\"uymas\"));\n}\n```\n\n\n\nmain.zig 中使用\n\n```zig\nconst uymas = @import(\"uymas\");\n\n...\n```\n\n\n\n### 注意\n\nwindows 中文乱码\n\n```shell\n# powershell\n[Console]::OutputEncoding = [System.Text.Encoding]::UTF8\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconero%2Fzig-uyams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconero%2Fzig-uyams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconero%2Fzig-uyams/lists"}