{"id":15099853,"url":"https://github.com/ssttevee/zig-hailo","last_synced_at":"2026-02-16T04:31:27.076Z","repository":{"id":247462180,"uuid":"825553910","full_name":"ssttevee/zig-hailo","owner":"ssttevee","description":"zig reimplementation of some functions provided by https://github.com/hailo-ai/hailort","archived":false,"fork":false,"pushed_at":"2024-10-12T02:23:14.000Z","size":52,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-10-17T13:05:15.969Z","etag":null,"topics":["ai","artificial-intelligence","hailo","hailo-8","hailo-ai","hailo8","machine-learning","ml","neural-network","zig","ziglang"],"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/ssttevee.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}},"created_at":"2024-07-08T04:22:33.000Z","updated_at":"2024-10-22T14:39:05.000Z","dependencies_parsed_at":"2025-02-01T20:41:53.842Z","dependency_job_id":"38d39f03-d50c-46a5-9c7d-52abfbc06e5c","html_url":"https://github.com/ssttevee/zig-hailo","commit_stats":null,"previous_names":["ssttevee/zig-hailo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ssttevee/zig-hailo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssttevee%2Fzig-hailo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssttevee%2Fzig-hailo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssttevee%2Fzig-hailo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssttevee%2Fzig-hailo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssttevee","download_url":"https://codeload.github.com/ssttevee/zig-hailo/tar.gz/refs/heads/trunk","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssttevee%2Fzig-hailo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29500317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T03:57:51.541Z","status":"ssl_error","status_checked_at":"2026-02-16T03:55:59.854Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai","artificial-intelligence","hailo","hailo-8","hailo-ai","hailo8","machine-learning","ml","neural-network","zig","ziglang"],"created_at":"2024-09-25T17:28:19.379Z","updated_at":"2026-02-16T04:31:27.052Z","avatar_url":"https://github.com/ssttevee.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zig-hailo\n\nA reimplementation of [hailort](https://github.com/hailo-ai/hailort) in Zig. The goal was to learn about the low level interface of the hailo devices and not feature parity with the official library, so reimplemented surface area may be small.\n\nOnly PCIE devices on linux are currently supported.\n\n## hailostatus\n\nThis is a simple program that prints the status of your installed hailo devices. It is driver version independent unlike the official hailortcli tool.\n\nTested on hailort driver versions: [`4.17.1`](https://github.com/hailo-ai/hailort/tree/e2190aeda847ab22057d162d08b516c39ac36ab8) [`4.18.0`](https://github.com/hailo-ai/hailort/tree/01e4c7f5a7463cc61ef1b2d22c31dd80a3a07d95)\n\n### Usage\n\nYou can run the program with the zig build system:\n\n```sh\nzig build run-status\n```\n\nOr, you can build the program and run it:\n\n```sh\nzig build -Doptimize=ReleaseSafe\n./zig-out/bin/hailostatus\n```\n\nThe output looks like this:\n\n```\nDevice: /dev/hailo0 (0000:59:00.00)\nDriver Version: 4.17.1\nMax Page Size: 4096\nBoard Type: hailo8\nAllocation Mode: userspace\nDMA Type: pcie\nDMA Engines Count: 1\nIs Firmware Loaded: false\nControl Protocol Version: 2\nFirmware Version: 4.17.1 (release, app, extended context switch buffer)\nLogger Version: 0\nBoard Name: Hailo-8\nDevice Architecture: HAILO8\nSerial Number: 0000000000000000\nPart Number: 000000000000\nProduct Name: HAILO-8 AI ACC M.2 B+M KEY MODULE EXT TEMP\nCore Clock Rate: 400000000Hz\nSupported Features: ethernet           false\n                    mipi               false\n                    pcie               true\n                    current_monitoring true\n                    mdio               false\nBoot Source: pcie\nLCS: 3\nSOC ID: 0000000000000000000000000000000000000000000000000000000000000000\nEthernet MAC Address: 00:00:00:00:00:00\nULT ID: 000000000000000000000000\nPM Values: 000000000000000000000000000000000000000000000000\nPartial Clusters Layout Bitmap: unknown\nMeasured Power: overcurrent_protection: 0.58912134W\nTemperature: S0  41.05951C\n             S1  41.110096C\n             Avg 41.0848C\n```\n\nYou can also get json output with the `-json` flag:\n\n```sh\nzig build run-status -- -json\n# OR\n./zig-out/bin/hailostatus -json\n```\n\n```json\n[\n  {\n    \"device\": \"/dev/hailo0\",\n    \"bdf\": \"0000:59:00.00\",\n    \"driver_version\": \"4.17.1\",\n    \"device_properties\": {\n      \"desc_max_page_size\": 4096,\n      \"board_type\": \"hailo8\",\n      \"allocation_mode\": \"userspace\",\n      \"dma_type\": \"pcie\",\n      \"dma_engines_count\": 1,\n      \"is_fw_loaded\": true\n    },\n    \"device_identity\": {\n      \"protocol_version\": 2,\n      \"firmware_version\": {\n        \"version\": \"4.17.1\",\n        \"mode\": \"release\",\n        \"firmware_type\": \"app\",\n        \"extended_context_switch_buffer\": true\n      },\n      \"logger_version\": 0,\n      \"board_name\": \"Hailo-8\",\n      \"device_architecture\": \"HAILO8\",\n      \"serial_number\": \"0000000000000000\",\n      \"part_number\": \"000000000000\",\n      \"product_name\": \"HAILO-8 AI ACC M.2 B+M KEY MODULE EXT TEMP\"\n    },\n    \"device_information\": {\n      \"neural_network_core_clock_rate\": 400000000,\n      \"supported_features\": {\n        \"ethernet\": false,\n        \"mipi\": false,\n        \"pcie\": true,\n        \"current_monitoring\": true,\n        \"mdio\": false\n      },\n      \"boot_source\": \"pcie\",\n      \"lcs\": 3,\n      \"soc_id\": \"0000000000000000000000000000000000000000000000000000000000000000\",\n      \"eth_mac_address\": \"00:00:00:00:00:00\",\n      \"fuse_info\": \"000000000000000000000000\",\n      \"pd_info\": \"000000000000000000000000000000000000000000000000\",\n      \"partial_clusters_layout_bitmap\": \"unknown\"\n    },\n    \"power_measurements\": [\n      {\n        \"value\": 0.5891213417053223,\n        \"dvm\": \"overcurrent_protection\",\n        \"type\": \"power\"\n      }\n    ],\n    \"chip_temperature\": {\n      \"s0\": 41.21126937866211,\n      \"s1\": 41.26185607910156,\n      \"sample_count\": 10459\n    }\n  }\n]\n```\n\n## Importing into your own zig project\n\nRun this command from your project folder\n\n```sh\nzig fetch --save https://github.com/ssttevee/zig-hailo/archive/refs/heads/trunk.tar.gz\n```\n\nThen add this snippet to your build.zig file\n\n```zig\nconst adb = b.dependency(\"hailo\", .{\n    .optimize = optimize,\n    .target = target,\n});\n\nexe.root_module.addImport(\"hailo\", adb.module(\"hailo\"));\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssttevee%2Fzig-hailo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssttevee%2Fzig-hailo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssttevee%2Fzig-hailo/lists"}