{"id":21195595,"url":"https://github.com/openpeeps/voodoo","last_synced_at":"2026-02-20T01:33:44.981Z","repository":{"id":231108325,"uuid":"780907407","full_name":"openpeeps/voodoo","owner":"openpeeps","description":"Working with Nim's macros is just Voodoo 😱","archived":false,"fork":false,"pushed_at":"2026-01-17T14:35:03.000Z","size":330,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-18T00:36:04.442Z","etag":null,"topics":["awesome-nim","json","json-parser","json-schema","json-serialization","macros","nim","nim-lang","nim-package","openpeeps"],"latest_commit_sha":null,"homepage":"","language":"Nim","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/openpeeps.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-02T11:44:02.000Z","updated_at":"2026-01-17T14:35:07.000Z","dependencies_parsed_at":"2024-06-06T06:38:33.144Z","dependency_job_id":"1f02d720-6378-47fc-a857-ea1091725172","html_url":"https://github.com/openpeeps/voodoo","commit_stats":null,"previous_names":["openpeeps/voodoo"],"tags_count":0,"template":false,"template_full_name":"openpeeps/pistachio","purl":"pkg:github/openpeeps/voodoo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fvoodoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fvoodoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fvoodoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fvoodoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openpeeps","download_url":"https://codeload.github.com/openpeeps/voodoo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openpeeps%2Fvoodoo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29638633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T22:32:43.237Z","status":"ssl_error","status_checked_at":"2026-02-19T22:32:38.330Z","response_time":117,"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":["awesome-nim","json","json-parser","json-schema","json-serialization","macros","nim","nim-lang","nim-package","openpeeps"],"created_at":"2024-11-20T19:29:04.032Z","updated_at":"2026-02-20T01:33:44.958Z","avatar_url":"https://github.com/openpeeps.png","language":"Nim","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/openpeeps/voodoo/blob/main/.github/voodoo.png\" width=\"170px\" height=\"160px\"\u003e\u003cbr\u003e\n  Working with Nim's macros 👑 is just Voodoo\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ccode\u003enimble install voodoo\u003c/code\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/\"\u003eAPI reference\u003c/a\u003e\u003cbr\u003e\n  \u003cimg src=\"https://github.com/openpeeps/voodoo/workflows/test/badge.svg\" alt=\"Github Actions\"\u003e  \u003cimg src=\"https://github.com/openpeeps/voodoo/workflows/docs/badge.svg\" alt=\"Github Actions\"\u003e\n\u003c/p\u003e\n\n## 😍 Key Features\n- [x] Compile-time utility tool\n- [x] Helps reduce code size \u0026 repetitive tasks\n- [x] Generate fast `getters`/`setters`\n- [x] Callee Introspection\n\n## Examples\n\n#### Getters\nGenerate fast getters from object fields. Excluding fields is also possible.\n```nim\nimport pkg/voodoo\n\ntype\n  Price* {.getters.} = object\n    net, gross: string\n\n  Product* {.getters: [id].} = object # exclude one or more fields\n    id: string\n    title, short_description: string\n    price: Price\n\nexpandGetters() # is required to expand generated procs.\n```\n\nOutput:\n```nim\nproc getNet*(price: Price): string =\n  ## Get `net` from `Price`\n  result = price.net\n\nproc getGross*(price: Price): string =\n  ## Get `gross` from `Price`\n  result = price.gross\n\nproc getTitle*(product: Product): string =\n  ## Get `title` from `Product`\n  result = product.title\n\nproc getShortDescription*(product: Product): string =\n  ## Get `short_description` from `Product`\n  result = product.short_description\n\nproc getPrices*(product: Product): Price =\n  ## Get `price` from `Product`\n  result = product.price\n```\n\n#### Setters\ntodo\n\n#### Extensibles\nIt's easy to make extensible enums/objects. This may allow other modules/packages\nto extend the functionality as if they were written in the original source.\n\nAlso, `extensible` pragma works with both public or private definitions. Well, that looks like Voodoo to me!\n\n```nim\nimport pkg/voodoo/extensible\ntype\n  Cardinal* {.extensible} = enum\n    north, west\n```\nDone! Now `Cardinal` is an extensible enum. Any other modules/packages importing it \ncan easily add fields to this enum. Yep, that's voodoo!\n\n```nim\nimport pkg/voodoo/extensible\nextendEnum Cardinal:\n  south\n  east\n\nimport ./cardinalModule\n\nassert compiles(Cardinal.north)\nassert compiles(Cardinal.south)\nassert compiles(Cardinal.east)\n```\n\n### ❤ Contributions \u0026 Support\n- 🐛 Found a bug? [Create a new Issue](https://github.com/openpeeps/voodoo/issues)\n- 👋 Wanna help? [Fork it!](https://github.com/openpeeps/voodoo/fork)\n- 😎 [Get €20 in cloud credits from Hetzner](https://hetzner.cloud/?ref=Hm0mYGM9NxZ4)\n- 🥰 [Donate via PayPal address](https://www.paypal.com/donate/?hosted_button_id=RJK3ZTDWPL55C)\n\n### 🎩 License\nMIT license. [Made by Humans from OpenPeeps](https://github.com/openpeeps).\u003cbr\u003e\nCopyright \u0026copy; 2024 OpenPeeps \u0026 Contributors \u0026mdash; All rights reserved.\n","funding_links":["https://www.paypal.com/donate/?hosted_button_id=RJK3ZTDWPL55C"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpeeps%2Fvoodoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenpeeps%2Fvoodoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenpeeps%2Fvoodoo/lists"}