{"id":19396405,"url":"https://github.com/soheil-01/dmidecode","last_synced_at":"2026-06-13T02:03:34.500Z","repository":{"id":225812030,"uuid":"766927814","full_name":"soheil-01/dmidecode","owner":"soheil-01","description":"dmidecode parser in zig","archived":false,"fork":false,"pushed_at":"2024-03-04T12:46:26.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T10:24:53.209Z","etag":null,"topics":["dmidecode","zig"],"latest_commit_sha":null,"homepage":"","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/soheil-01.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}},"created_at":"2024-03-04T11:49:21.000Z","updated_at":"2024-03-04T12:47:30.000Z","dependencies_parsed_at":"2024-03-04T13:05:29.049Z","dependency_job_id":"6da894d3-4671-4567-bd97-7eff51de14c8","html_url":"https://github.com/soheil-01/dmidecode","commit_stats":null,"previous_names":["soheil-01/dmidecode"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soheil-01%2Fdmidecode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soheil-01%2Fdmidecode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soheil-01%2Fdmidecode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/soheil-01%2Fdmidecode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/soheil-01","download_url":"https://codeload.github.com/soheil-01/dmidecode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240564595,"owners_count":19821422,"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":["dmidecode","zig"],"created_at":"2024-11-10T10:34:59.789Z","updated_at":"2026-06-13T02:03:29.480Z","avatar_url":"https://github.com/soheil-01.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DMIDecode\n\nMy first project while learning Zig. This is a Zig implementation for parsing the output of the `dmidecode` command. This is a port of [dmidecode-nim](https://github.com/xmonader/nim-dmidecode).\n\n## Quick Start\n\n```zig\nconst std = @import(\"std\");\nconst DMIDecode = @import(\"dmidecode.zig\").DMIDecode;\n\npub fn main() !void {\n    var parser = DMIDecode.init(std.heap.page_allocator);\n    defer parser.deinit();\n\n    const sections = try parser.parse(\n        \\\\Handle 0x0036, DMI type 43, 31 bytes\n        \\\\TPM Device\n        \\\\\tVendor ID: INTC\n        \\\\\tSpecification Version: 2.0\n        \\\\\tFirmware Revision: 500.5\n        \\\\\tStrings:\n        \\\\          Insyde_ASF_001\n        \\\\          Insyde_ASF_002\n        \\\\\n    );\n\n    const section: DMIDecode.Section = sections.get(\"TPM Device\").?;\n    std.debug.print(\"Handle: {s}, Title: {s}\\n\", .{ section.handleLine, section.title });\n\n    const vendorID = section.props.get(\"Vendor ID\").?.val;\n    std.debug.print(\"Vendor ID: {s}\\n\", .{vendorID});\n\n    const strings = section.props.get(\"Strings\").?.items;\n    std.debug.print(\"Strings: {s}, {s}\\n\", .{ strings.items[0], strings.items[0] });\n}\n```\n\n## Installation\n\n1. Declare dmidecode as a project dependency with `zig fetch`:\n\n```bash\nzig fetch --save git+https://github.com/soheil-01/dmidecode.git#main\n```\n\n2. Expose dmidecode as a module in your project's `build.zig`:\n\n```zig\npub fn build(b: *std.Build) void {\n    const target = b.standardTargetOptions(.{});\n    const optimize = b.standardOptimizeOption(.{});\n\n    const opts = .{ .target = target, .optimize = optimize };      // 👈\n    const dmidecode_mod = b.dependency(\"dmidecode\", opts).module(\"dmidecode\"); // 👈\n\n    const exe = b.addExecutable(.{\n        .name = \"my-project\",\n        .root_source_file = .{ .path = \"src/main.zig\" },\n        .target = target,\n        .optimize = optimize,\n    });\n    exe.root_module.addImport(\"dmidecode\", dmidecode_mod); // 👈\n\n    // ...\n}\n```\n\n3. Import dmidecode into your code:\n\n```zig\nconst dmidecode = @import(\"dmidecode\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoheil-01%2Fdmidecode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoheil-01%2Fdmidecode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoheil-01%2Fdmidecode/lists"}