{"id":15099808,"url":"https://github.com/noprd/example-zig","last_synced_at":"2026-01-07T06:07:58.269Z","repository":{"id":254426350,"uuid":"846491504","full_name":"noprd/example-zig","owner":"noprd","description":"A hello world example project in zig","archived":false,"fork":false,"pushed_at":"2024-08-25T18:25:29.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T18:15:00.651Z","etag":null,"topics":["hello-world","zig"],"latest_commit_sha":null,"homepage":"","language":"Just","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/noprd.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}},"created_at":"2024-08-23T10:20:51.000Z","updated_at":"2024-08-23T15:22:37.000Z","dependencies_parsed_at":"2024-08-25T19:39:53.143Z","dependency_job_id":null,"html_url":"https://github.com/noprd/example-zig","commit_stats":null,"previous_names":["noprd/example-zig"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noprd%2Fexample-zig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noprd%2Fexample-zig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noprd%2Fexample-zig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noprd%2Fexample-zig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noprd","download_url":"https://codeload.github.com/noprd/example-zig/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245858876,"owners_count":20684057,"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":["hello-world","zig"],"created_at":"2024-09-25T17:27:50.465Z","updated_at":"2026-01-07T06:07:58.263Z","avatar_url":"https://github.com/noprd.png","language":"Just","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Zig version: 0.14.0](https://img.shields.io/badge/zig%20version-0.14-gold)](https://ziglang.org)\n\n[![qa manual:main](https://github.com/noprd/example-zig/actions/workflows/manual.yaml/badge.svg?branch=main)](https://github.com/noprd/example-zig/actions/workflows/manual.yaml)\n[![qa manual:staging](https://github.com/noprd/example-zig/actions/workflows/manual.yaml/badge.svg?branch=staging)](https://github.com/noprd/example-zig/actions/workflows/manual.yaml)\n\n[![qa auto:staging](https://github.com/noprd/example-zig/actions/workflows/auto.yaml/badge.svg?branch=staging)](https://github.com/noprd/example-zig/actions/workflows/auto.yaml)\n[![qa auto:current](https://github.com/noprd/example-zig/actions/workflows/auto.yaml/badge.svg)](https://github.com/noprd/example-zig/actions/workflows/auto.yaml)\n\n# Example Zig #\n\nThis repository provides a simple Hello-World example for the [zig](https://ziglang.org) language,\nwhich in recent times has become quite a hot option\nas a simpler alternative to Rust and C++.\n\n## Installation of Zig ##\n\n- Unpack an appropriate distribution from \u003chttps://ziglang.org/download\u003e to an appropriate location on your machine.\n\n- Add the directory in which the zig-binary lies to your system `PATH`:\n\n    ```bash\n    touch ${HOME}/.bash_profile # ensures this exists\n    echo \"# path for zig\" \u003e\u003e ${HOME}/.bash_profile\n    echo \"export PATH=\\\"/path/to/your zig binaries:\\${PATH}\\\";\" \u003e\u003e ${HOME}/.bash_profile\n    ```\n\n    for linux.\n    Or edit the file directly, adding the lines\n\n    ```bash\n    ...\n    # path for zig\n    export PATH=\"/path/to/your zig binaries:${PATH}\";\n    ```\n\n    For windows, do this via the system environment variables (which requires admin access);\n    or just install [bash for windows](https://gitforwindows.org)\n    and simply perform the above.\n\n- Clone the **ZLS** (_zig langauge server_) repository \u003chttps://github.com/zigtools/zls\u003e and run\n\n    ```bash\n    zig build\n    ```\n\n   This will generate a folder **zig-out/bin**.\n   Copy just the binary from here to the same path where your zig-compiler binary is stored.\n   (Otherwise choose your own location and add this to `PATH`.)\n\n### Intellisense ###\n\nIf you are using VSCode, install the [Zig Language](https://marketplace.visualstudio.com/items?itemName=ziglang.vscode-zig) extension.\nFor this to work, it needs to detect your **ZLS** binary.\n\nOpen the _User Settings JSON_ (e.g. via command palette)\nand add the following attributes to the dictionary:\n\n```js\n{\n    ...\n    // NOTE: remove the .exe extension for windows\n    \"zig.path\": \"/path/to/your zig binaries/zig.exe\",\n    \"zig.zls.zigLibPath\": \"/path/to/your zig binaries/lib\",\n    \"zig.zls.path\": \"/path/to/your ZLS binaries/zls.exe\",\n    // optional\n    \"zig.zls.buildOnSaveStep\": \"\",\n    \"zig.checkForUpdate\": false,\n    \"zig.zls.checkForUpdate\": false,\n}\n```\n\n## Build and run ##\n\nInstall the [justfile](https://github.com/casey/just?tab=readme-ov-file#installation) tool.\nRun\n\n```bash\njust setup # only needed once - then adjust the created .env file\njust build # compiles the binary\njust run {args} # runs without the compiled binary\njust run-exe {args} # runs the compiled binary\n```\n\nNOTE: The hello-world example was taken from \u003chttps://zig-by-example.com/hello-world\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoprd%2Fexample-zig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoprd%2Fexample-zig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoprd%2Fexample-zig/lists"}