crate 1.2.0

The easy way for creating JSON API with D and vibe.d


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Crate Build Status

Turn D structs into production-ready APIs.

Crate is a D language framework built on vibe.d that generates CRUD endpoints from struct definitions. Define your data model, hand it to a CrateRouter, and get a working API with authentication, middleware, and relation resolution — all fully customizable.

struct Product {
  string _id;
  string name;
  int price;
}

auto products = new MongoCrate!Product("products");
router.crateSetup!RestApi.add(products);
// Six endpoints, ready to go.

Crate supports serving REST, JSON:API, MCP, and GraphQL from the same model simultaneously. D's compile-time template system catches misconfiguration at build time, not in production.

Documentation: crate.szabobogdan.com

Contributing

See CONTRIBUTING.md for guidelines on how to get involved.

Code of Conduct

This project follows a Code of Conduct. By participating, you are expected to uphold it.

Security

To report a vulnerability, see SECURITY.md.

License

Crate is licensed under the MIT License.

Authors:
  • Bogdan Szabo
Sub packages:
crate:init-exec
Dependencies:
geo, open-api, vibe-d, stdx-allocator, cachetools, vibe-auth, describe-d
Versions:
1.2.0 2026-Apr-20
1.1.0 2026-Apr-09
1.0.5 2026-Mar-12
1.0.4 2026-Mar-11
1.0.3 2026-Mar-10
Show all 13 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 10 downloads this month

  • 49 downloads total

Score:
2.6
Short URL:
crate.dub.pm