{"id":13476067,"url":"https://github.com/getty-zig/getty","last_synced_at":"2025-04-13T00:44:11.558Z","repository":{"id":37253657,"uuid":"355227921","full_name":"getty-zig/getty","owner":"getty-zig","description":"A (de)serialization framework for Zig","archived":false,"fork":false,"pushed_at":"2024-12-31T22:18:10.000Z","size":158506,"stargazers_count":217,"open_issues_count":13,"forks_count":13,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-13T00:44:07.820Z","etag":null,"topics":["getty","serialization","zig","ziglang"],"latest_commit_sha":null,"homepage":"https://getty.so","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/getty-zig.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":"2021-04-06T14:54:07.000Z","updated_at":"2025-04-10T23:17:13.000Z","dependencies_parsed_at":"2024-01-25T05:09:36.241Z","dependency_job_id":"c283762b-cdc6-4652-84af-0c05cae1b829","html_url":"https://github.com/getty-zig/getty","commit_stats":{"total_commits":1250,"total_committers":10,"mean_commits":125.0,"dds":0.1744,"last_synced_commit":"78738b665a53db4be85696635b9c832fbca8d273"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getty-zig%2Fgetty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getty-zig%2Fgetty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getty-zig%2Fgetty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getty-zig%2Fgetty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getty-zig","download_url":"https://codeload.github.com/getty-zig/getty/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650419,"owners_count":21139672,"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":["getty","serialization","zig","ziglang"],"created_at":"2024-07-31T16:01:26.284Z","updated_at":"2025-04-13T00:44:11.520Z","avatar_url":"https://github.com/getty-zig.png","language":"Zig","readme":"# Getty\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Getty\" src=\"https://github.com/getty-zig/logo/blob/main/getty-solid.svg\" width=\"410px\"\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003ca href=\"https://github.com/getty-zig/getty/releases/latest\"\u003e\u003cimg alt=\"Version\" src=\"https://img.shields.io/github/v/release/getty-zig/getty?include_prereleases\u0026label=Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://ziglang.org/download\"\u003e\u003cimg alt=\"Zig\" src=\"https://img.shields.io/badge/Zig-master-fd9930.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/getty-zig/getty/actions/workflows/test.yml\"\u003e\u003cimg alt=\"Build status\" src=\"https://img.shields.io/github/actions/workflow/status/getty-zig/getty/test.yml?branch=main\u0026label=Build\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://discord.gg/njDA67U5ph\"\u003e\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/1016029822172024955?color=7289da\u0026label=Discord\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/getty-zig/getty/blob/main/LICENSE\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-MIT-blue\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\nGetty is a framework for building __robust__, __optimal__, and __reusable__ (de)serializers in Zig.\n\n- Compile-time (de)serialization.\n- Out-of-the-box support for a variety of `std` types.\n- Granular customization for existing and remote types.\n- Data models that serve as simple and generic baselines for (de)serializers.\n\n## Quick Start\n\n\u003cdetails\u003e\n\u003csummary\u003e\n  \u003ccode\u003ebuild.zig\u003c/code\u003e\n\u003c/summary\u003e\n\u003cbr\u003e\n\n```zig\nconst std = @import(\"std\");\n\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 json_mod = b.dependency(\"json\", opts).module(\"json\");\n\n    const exe = b.addExecutable(.{\n        .name = \"quick-start\",\n        .root_source_file = .{ .path = \"src/main.zig\" },\n        .target = target,\n        .optimize = optimize,\n    });\n\n    exe.addModule(\"json\", json_mod);\n\n    const run_cmd = b.addRunArtifact(exe);\n    const run_step = b.step(\"run\", \"Run the app\");\n    run_step.dependOn(\u0026run_cmd.step);\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\n  \u003ccode\u003ebuild.zig.zon\u003c/code\u003e\n\u003c/summary\u003e\n\u003cbr\u003e\n\n```zig\n.{\n    .name = \"quick-start\",\n    .version = \"0.1.0\",\n    .paths = .{\"\"},\n    .dependencies = .{\n        .json = .{\n            .url = \"https://github.com/getty-zig/json/archive/3e3cf7b.tar.gz\",\n            .hash = \"122017ccb426b5f5690fdda438134852e940796b0ac619eb2648782a7879146f4fcd\",\n        },\n    },\n}\n```\n\n\u003c/details\u003e\n\n\u003cdetails open\u003e\n\u003csummary\u003e\n  \u003ccode\u003esrc/main.zig\u003c/code\u003e\n\u003c/summary\u003e\n\u003cbr\u003e\n\n```zig\nconst std = @import(\"std\");\nconst json = @import(\"json\");\n\nconst ally = std.heap.page_allocator;\n\nconst Point = struct {\n    x: i32,\n    y: i32,\n};\n\npub fn main() !void {\n    const value = Point{ .x = 1, .y = 2 };\n\n    // Serialize a Point value into JSON.\n    const serialized = try json.toSlice(ally, value);\n    defer ally.free(serialized);\n\n    // Deserialize JSON data into a Point value.\n    const deserialized = try json.fromSlice(ally, Point, serialized);\n\n    // Print results.\n    std.debug.print(\"{s}\\n\", .{serialized});  // {\"x\":1,\"y\":2}\n    std.debug.print(\"{}\\n\", .{deserialized}); // main.Point{ .x = 1, .y = 2 }\n}\n```\n\n\u003c/details\u003e\n\n## Installation\n\n1. Declare Getty as a project dependency with `zig fetch`:\n\n    ```sh\n    zig fetch --save git+https://github.com/getty-zig/getty.git#\u003cCOMMIT\u003e\n    ```\n\n2. Expose Getty as a module in your project's `build.zig`:\n\n    ```zig\n    pub 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 getty_mod = b.dependency(\"getty\", opts).module(\"getty\"); // 👈\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(\"getty\", getty_mod); // 👈\n\n        // ...\n    }\n    ```\n\n3. Import Getty into your code:\n\n    ```zig\n    const getty = @import(\"getty\");\n    ```\n\n## Resources\n\n- [Website](https://getty.so/)\n- [Tutorial](https://getty.so/user-guide/tutorial/)\n- [Examples](examples)\n- [API Reference](https://docs.getty.so/)\n- [Contributing](https://getty.so/contributing/)\n","funding_links":[],"categories":["Zig","Libraries","File format processing"],"sub_categories":["Linker"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetty-zig%2Fgetty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetty-zig%2Fgetty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetty-zig%2Fgetty/lists"}