{"id":33863886,"url":"https://github.com/raphamorim/zaz","last_synced_at":"2026-05-29T19:03:14.746Z","repository":{"id":319383101,"uuid":"1078380017","full_name":"raphamorim/zaz","owner":"raphamorim","description":"cross-platform textual UI toolkit with bindings for Rust, C++, Zig and etc.","archived":false,"fork":false,"pushed_at":"2025-10-20T21:41:18.000Z","size":1702,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T08:55:43.084Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/raphamorim.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"raphamorim"}},"created_at":"2025-10-17T16:31:12.000Z","updated_at":"2025-11-01T06:24:24.000Z","dependencies_parsed_at":"2025-10-19T23:27:07.344Z","dependency_job_id":null,"html_url":"https://github.com/raphamorim/zaz","commit_stats":null,"previous_names":["raphamorim/yellow","raphamorim/zaz"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/raphamorim/zaz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fzaz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fzaz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fzaz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fzaz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raphamorim","download_url":"https://codeload.github.com/raphamorim/zaz/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raphamorim%2Fzaz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33666290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"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":"2025-12-09T12:00:34.065Z","updated_at":"2026-05-29T19:03:14.741Z","avatar_url":"https://github.com/raphamorim.png","language":"Rust","funding_links":["https://github.com/sponsors/raphamorim"],"categories":["Table of Contents"],"sub_categories":[],"readme":"# Zaz\n\n\u003e A terminal manipulation library for Rust and C/FFI bindings for other languages.\n\n| Rust      | Zig |\n| ----------- | ----------- |\n| \u003cimg src=\"examples/resources/demo.png\" alt=\"Zaz's mosaic demo\"\u003e      | \u003cimg src=\"examples/resources/demo-bindings-zig.png\" alt=\"Zaz's mosaic demo with Zig wrapper\"\u003e       |\n\n## Features\n\n- Effiecient terminal rendering (Smart Style Caching, Paul Heckel's Diff Algorithm, Cost-based Cursor Movement, etc...)\n- SIMD for large screens (work in progress)\n- Terminal initialization and screen management\n- Cursor positioning and text output\n- RGB color support with ANSI escape codes\n- Text attributes (bold, italic, underline, etc.)\n- Window and panel management\n- Keyboard input handling with Kitty keyboard protocol\n- Graphics support (Kitty image protocol, Sixel, iTerm2)\n- Unicode block mosaic rendering from images\n- Scrolling regions\n\n## Installation\n\n### Rust\n\nAdd to your `Cargo.toml`:\n\n```toml\n[dependencies]\nzaz = \"*\"\n```\n\n### Zig\n\n\u003e TODO: I will improve this flow eventually.\n\nTo use Zaz in your Zig project:\n\n1. Build the Zaz library:\n```bash\ncargo build --release\n```\n\n2. Copy the necessary files to your project:\n```bash\ncp bindings/zig/zaz.zig your-project/\ncp bindings/zig/zaz.h your-project/\ncp target/release/libzaz.dylib your-project/  # macOS\n# or\ncp target/release/libzaz.so your-project/     # Linux\n```\n\n3. In your `build.zig`:\n```zig\nconst zaz_mod = b.createModule(.{\n    .root_source_file = b.path(\"zaz.zig\"),\n    .link_libc = true,\n});\nzaz_mod.addIncludePath(b.path(\".\"));\n\nconst exe = b.addExecutable(.{\n    .name = \"my-app\",\n    .root_source_file = b.path(\"main.zig\"),\n    .target = target,\n    .optimize = optimize,\n});\nexe.root_module.addImport(\"zaz\", zaz_mod);\nexe.addIncludePath(b.path(\".\"));\nexe.addLibraryPath(b.path(\".\"));\nexe.linkSystemLibrary(\"zaz\");\nexe.linkLibC();\n```\n\n4. Run with library path:\n```bash\n# macOS\nDYLD_LIBRARY_PATH=. zig build run\n\n# Linux\nLD_LIBRARY_PATH=. zig build run\n```\n\n## Usage\n\n### Rust Example\n\n```rust\nuse zaz::{Screen, Color, Attr};\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let mut scr = Screen::init()?;\n\n    scr.clear()?;\n    scr.mvprint(2, 4, \"Hello from Zaz!\")?;\n\n    scr.set_fg(Color::Rgb(255, 200, 0))?;\n    scr.attron(Attr::BOLD)?;\n    scr.mvprint(4, 4, \"Colored text!\")?;\n\n    scr.refresh()?;\n    scr.getch()?;\n    scr.endwin()?;\n\n    Ok(())\n}\n```\n\n### Zig Example\n\n```zig\nconst std = @import(\"std\");\nconst zaz = @import(\"zaz\");\n\npub fn main() !void {\n    const screen = try zaz.Screen.init();\n    defer screen.deinit() catch {};\n\n    try screen.clear();\n    try screen.mvprint(2, 4, \"Hello from Zig + Zaz!\");\n\n    try screen.setFgColor(255, 200, 0);\n    try screen.attrOn(.bold);\n    try screen.mvprint(4, 4, \"Colored text!\");\n    try screen.attrOff(.bold);\n\n    try screen.refresh();\n    _ = try screen.getch();\n}\n```\n\n## C FFI API\n\nThe library exports a C-compatible API for use with other languages:\n\n### Screen Management\n- `zaz_init()` - Initialize screen\n- `zaz_endwin()` - Clean up and restore terminal\n- `zaz_clear()` - Clear screen\n- `zaz_refresh()` - Refresh display\n\n### Output\n- `zaz_print()` - Print at cursor position\n- `zaz_mvprint()` - Print at specific position\n- `zaz_move_cursor()` - Move cursor\n\n### Colors and Attributes\n- `zaz_set_fg_color()` - Set foreground RGB color\n- `zaz_set_bg_color()` - Set background RGB color\n- `zaz_attron()` - Enable text attributes\n- `zaz_attroff()` - Disable text attributes\n\n### Input\n- `zaz_getch()` - Get key input\n\n### Utilities\n- `zaz_get_size()` - Get terminal dimensions\n- `zaz_render_mosaic()` - Render image as Unicode art\n- `zaz_free_string()` - Free mosaic string\n\n## License\n\nSee LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphamorim%2Fzaz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraphamorim%2Fzaz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraphamorim%2Fzaz/lists"}