{"id":13711988,"url":"https://github.com/ZigEmbeddedGroup/serial","last_synced_at":"2025-05-06T21:32:49.921Z","repository":{"id":40578403,"uuid":"257076425","full_name":"ZigEmbeddedGroup/serial","owner":"ZigEmbeddedGroup","description":"Serial port configuration library for Zig","archived":false,"fork":false,"pushed_at":"2024-12-16T11:07:26.000Z","size":65,"stargazers_count":65,"open_issues_count":6,"forks_count":19,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-02T00:06:34.452Z","etag":null,"topics":["serial","serial-port","uart","zig","zig-package","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/ZigEmbeddedGroup.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":"2020-04-19T18:45:34.000Z","updated_at":"2025-01-01T11:22:29.000Z","dependencies_parsed_at":"2023-01-19T22:19:07.485Z","dependency_job_id":"57479260-176f-434c-96e3-dd92b38d3be9","html_url":"https://github.com/ZigEmbeddedGroup/serial","commit_stats":{"total_commits":50,"total_committers":17,"mean_commits":"2.9411764705882355","dds":0.86,"last_synced_commit":"13cc57bd170decc987660aa35a177c668c3e9cc5"},"previous_names":["zigembeddedgroup/serial","masterq32/zig-serial"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigEmbeddedGroup%2Fserial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigEmbeddedGroup%2Fserial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigEmbeddedGroup%2Fserial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigEmbeddedGroup%2Fserial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZigEmbeddedGroup","download_url":"https://codeload.github.com/ZigEmbeddedGroup/serial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252772238,"owners_count":21801884,"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":["serial","serial-port","uart","zig","zig-package","ziglang"],"created_at":"2024-08-02T23:01:13.720Z","updated_at":"2025-05-06T21:32:49.908Z","avatar_url":"https://github.com/ZigEmbeddedGroup.png","language":"Zig","readme":"# Zig Serial Port Library\n\nLibrary for configuring and listing serial ports.\n\n## Features\n\n- Basic serial port configuration\n  - Baud Rate\n  - Parity (none, even, odd, mark, space)\n  - Stop Bits (one, two)\n  - Handshake (none, hardware, software)\n  - Byte Size (5, 6, 7, 8)\n- Flush serial port send/receive buffers\n- List available serial ports\n- API: supports Windows, Linux and Mac\n\n## Example\n\n```zig\n// Port configuration.\n// Serial ports are just files, \\\\.\\COM1 for COM1 on Windows:\nvar serial = try std.fs.cwd().openFile(\"\\\\\\\\.\\\\COM1\", .{ .mode = .read_write }) ;\ndefer serial.close();\n\ntry zig_serial.configureSerialPort(serial, zig_serial.SerialConfig{\n    .baud_rate = 19200,\n    .word_size = 8,\n    .parity = .none,\n    .stop_bits = .one,\n    .handshake = .none,\n});\n```\n\n## Usage\n\n### Library integration\n\nIntegrate the library in your project via the Zig package manager:\n\n- add `serial` to your `.zig.zon` file by providing the URL to the archive of a tag or specific commit of the library\n- to update the hash, run `zig fetch --save [URL/to/tag/or/commit.tar.gz]`\n\n### Running tests\n\nThe `build.zig` file contains a test step that can be called with `zig build test`. Note that this requires a serial port to be available on the system;\n\n- Linux: `/dev/ttyUSB0`\n- Mac: `/dev/cu.usbmodem101`\n- Windows: `COM3`\n\n### Building the examples\n\nYou can build the examples from the `./examples` directory by calling `zig build examples`. Binaries will be generated in `./zig-out/bin` by default.\n\n- Note that the `list_port_info` example currently only works on Windows\n\n### Building the documentation\n\nYou can generate the documentation by running `zig build docs`.\nAfter that you can browse it by:\n\n 1. starting the web server. For example, by running `python -m http.server 8000 zig-out/docs`\n 2. reading the docs from your browser at `http://127.0.0.1:8000`\n\n","funding_links":[],"categories":["Data \u0026 Science"],"sub_categories":["Sensor and Communication Interface"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZigEmbeddedGroup%2Fserial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZigEmbeddedGroup%2Fserial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZigEmbeddedGroup%2Fserial/lists"}