{"id":51918021,"url":"https://github.com/zfl9/wolfssl-zig","last_synced_at":"2026-07-27T14:00:56.016Z","repository":{"id":367796070,"uuid":"1281117675","full_name":"zfl9/wolfssl-zig","owner":"zfl9","description":"A Zig package for wolfSSL","archived":false,"fork":false,"pushed_at":"2026-07-19T13:22:35.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-07-19T15:22:54.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zfl9.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-06-26T08:34:07.000Z","updated_at":"2026-07-19T13:22:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zfl9/wolfssl-zig","commit_stats":null,"previous_names":["zfl9/wolfssl-zig"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zfl9/wolfssl-zig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfl9%2Fwolfssl-zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfl9%2Fwolfssl-zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfl9%2Fwolfssl-zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfl9%2Fwolfssl-zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zfl9","download_url":"https://codeload.github.com/zfl9/wolfssl-zig/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfl9%2Fwolfssl-zig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35953520,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-27T02:00:06.776Z","response_time":101,"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":[],"created_at":"2026-07-27T14:00:55.207Z","updated_at":"2026-07-27T14:00:55.954Z","avatar_url":"https://github.com/zfl9.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wolfssl-zig\n\n[wolfSSL](https://github.com/wolfSSL/wolfssl) 的 Zig 包，用于将 wolfSSL 库集成至你的 C/C++/Zig 项目。\n\n## 环境要求\n\n- Zig 0.15.2+\n- make、autoconf、automake、libtool\n- bear（可选，使用 `-Dcdb` 时需要）\n\n## 使用方法\n\n\u003e 具体版本见 [Tags](https://github.com/zfl9/wolfssl-zig/tags) 页面。\n\n```bash\nzig fetch --save=wolfssl https://github.com/zfl9/wolfssl-zig/archive/refs/tags/v5.9.2.tar.gz\n```\n\n在 `build.zig` 的 `build()` 函数中，添加如下代码：\n\n```zig\nconst wolfssl = b.dependency(\"wolfssl\", .{\n    .target = target,\n    .optimize = optimize, // silently ignored (always ReleaseFast)\n    .lto = lto,\n    .single_threaded = single_threaded,\n    .nproc = nproc,\n});\nconst include_dir = wolfssl.namedLazyPath(\"include\");\nconst lib_file = wolfssl.namedLazyPath(\"libwolfssl.a\");\n\n// 在构建可执行文件时：\n// const exe = b.addExecutable(.{ .name = \"my-app\", .root_source_file = .{ .path = \"src/main.zig\" } });\n// exe.root_module.addIncludePath(include_dir);\n// exe.root_module.addObjectFile(lib_file);\n```\n\n## 构建选项\n\n支持 Zig 标准的 target、optimize 选项，此外还有：\n\n| 选项 | 类型 | 默认值 | 描述 |\n|---|---|---|---|\n| `-Dlto` | `enum` | `none` | LTO 模式（`none` / `full` / `thin`） |\n| `-Dsingle_threaded` | `bool` | `false` | 取消 wolfSSL 的线程安全支持，适用于单线程程序 |\n| `-Dnproc=\u003cn\u003e` | `usize` | CPU 核心数 | make 并行任务数 |\n| `-Dcdb` | `bool` | `false` | 生成 `compile_commands.json`（需安装 bear） |\n| `-Dworkspace` | `bool` | `false` | 暴露构建目录（方便查看源码/中间文件） |\n| `-Dworkspace_name=\u003cname\u003e` | `string` | `\"wolfssl\"` | workspace 名称，指定后自动启用 workspace |\n\n## 导出资产\n\n以下资产通过 `dependency.namedLazyPath(\"name\")` 获取：\n\n| 名称 | 说明 |\n|---|---|\n| `include` | wolfSSL 头文件目录 |\n| `lib` | wolfSSL 库文件目录（含 `libwolfssl.a`） |\n| `libwolfssl.a` | wolfSSL 静态库文件 |\n| `compile_commands.json` | `compile_commands.json` 文件 |\n\n## 本地构建\n\n```bash\nzig build\n```\n\n产物输出到 `zig-out/`：\n- `zig-out/include/` — wolfSSL 头文件\n- `zig-out/lib/libwolfssl.a` — 静态库\n\n## 版本约定\n\n`.zon` 中的 `version` 与 wolfSSL 上游版本号保持一致，便于直观对照。\\\n本包自身的更新（构建逻辑调整、内部依赖升级等）通过 Git tag 后缀区分：\n\n- `v5.9.2` — 初始版本\n- `v5.9.2-rev\u003cN\u003e` — 后续修订\n\n使用者通过 `zig fetch --save=wolfssl \u003ctag URL\u003e` 选择具体版本。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfl9%2Fwolfssl-zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzfl9%2Fwolfssl-zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfl9%2Fwolfssl-zig/lists"}