Crates.io | crustd |
lib.rs | crustd |
version | 0.0.1 |
source | src |
created_at | 2024-05-27 23:37:59.308822 |
updated_at | 2024-05-27 23:37:59.308822 |
description | A set of traits and utilities for streamlining CRUD boilerplate with sqlx and axum |
homepage | |
repository | https://www.github.com/zenlex/crustd |
max_upload_size | |
id | 1253854 |
size | 7,228 |
A library for streamlining basic CRUD op setup in a JSON API.
This is under active development and breaking changes should be expected. Contributors are welcome!
The basic end goal is to be able to define data models and relationships in a toml file (and potentially controller and service properties) and have the boilerplate templated from stubs to create db tables with migrations, routers, and controllers for the core CRUD operations for each of the defined structs.
Currently the start is a set of three traits - CrudService, CrudController, and CrudRouter. You are required to implement the CrudService methods to define your DB queries and then the Router and Controller can be simple empty impl blocks.
The traits are currently coupled to a sqlx + postgres impelementation. They were a byproduct of another project I extracted to start work on a library.
Next steps: