datatype99
brew install datatype99
v1.6.5
MIT
Algebraic data types for C99
1
30-day installs · #16148
1
90-day · #25888
6
365-day · #20882
1.5k
★ GitHub stars · updated 1y ago
Runtime dependencies
GitHub topics
adt
algebraic
algebraic-data-types
c99
derive
introspection
metalang99
metaprogramming
pattern-matching
reflection-library
sum-types
tagged-unions
type-system
variant
Links
- https://github.com/Hirrolot/datatype99
- GitHub: Hirrolot/datatype99
- Brew formula source: Formula/d/datatype99.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [
"metalang99"
],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Algebraic data types for C99",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:36:51+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "datatype99",
"github_default_branch": "master",
"github_last_commit_at": "2025-03-17T03:16:52Z",
"github_readme_excerpt": "\u003cdiv align=\"center\"\u003e\n \u003ca href=\"examples/binary_tree.c\"\u003e\u003cimg src=\"images/preview.png\" width=\"600px\" /\u003e\u003c/a\u003e\n \u003ch1\u003eDatatype99\u003c/h1\u003e\n \u003ca href=\"https://github.com/hirrolot/datatype99/actions\"\u003e\n \u003cimg src=\"https://github.com/hirrolot/datatype99/workflows/C/C++%20CI/badge.svg\"\u003e\n \u003c/a\u003e\n\n Safe, intuitive [algebraic data types] with exhaustive pattern matching \u0026 compile-time introspection facilities. No external tools required, pure C99.\n\u003c/div\u003e\n\n[algebraic data types]: https://en.wikipedia.org/wiki/Algebraic_data_type\n\n## Highlights\n\n - **Type-safe.** Such things as improperly typed variants, non-exhaustive pattern matching, and invalid field access are caught at compile-time.\n\n - **Portable.** Everything you need is a standard-conforming C99 compiler; neither the standard library, nor compiler/platform-specific functionality or VLA are required.\n\n - **Predictable.** Datatype99 comes with formal [code generation semantics], meaning that the generated data layout is guaranteed to always be the same.\n\n - **Comprehensible errors.** Datatype99 is [resilient to bad code].\n\n - **Battle-tested.** Datatype99 is used at [OpenIPC] to develop real-time streaming software for IP cameras; this includes an [RTSP 1.0 implementation] along with ~50k lines of private code.\n\n[resilient to bad code]: #q-what-about-compile-time-errors\n[OpenIPC]: https://openipc.org/\n[RTSP 1.0 implementation]: https://github.com/OpenIPC/smolrtsp/\n\n## Installation\n\nDatatype99 consists of one header file `datatype99.h` and one dependency [Metalang99]. To use it in your project, you need to:\n\n[Metalang99]: https://github.com/hirrolot/metalang99\n\n 1. Add `datatype99` and `metalang99/include` to your include directories.\n 2. Specify [`-ftrack-macro-expansion=0`] (GCC) or [`-fmacro-backtrace-limit=1`] (Clang) to avoid useless macro expansion errors.\n\n[`-ftrack-macro-expansion=0`]: https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html\n[`-fmacro-backtrace-limit=1`]: https://clang.llvm.org/docs/ClangCommandLine",
"github_repo": "Hirrolot/datatype99",
"github_stars": 1500,
"github_topics": [
"adt",
"algebraic",
"algebraic-data-types",
"c99",
"derive",
"introspection",
"metalang99",
"metaprogramming",
"pattern-matching",
"reflection-library",
"sum-types",
"tagged-unions",
"type-system",
"variant"
],
"homepage": "https://github.com/Hirrolot/datatype99",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 1,
"installs_365d": 6,
"installs_90d": 1,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "MIT",
"llm_generated_at": null,
"llm_model": null,
"name": "datatype99",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 16148,
"rank_365d": 20882,
"rank_90d": 25888,
"raw_hash": "7936face85aa353c",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/d/datatype99.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [],
"version_head": "HEAD",
"version_stable": "1.6.5",
"versioned_formulae": [],
"why_use_this": null
}