Skip to content

Commit

Permalink
🔧 Updated description && docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nwrenger committed Jul 29, 2024
1 parent cdeca8d commit d24efa0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "gluer"
version = "0.3.1"
edition = "2021"
authors = ["Nils Wrenger <[email protected]>"]
description = "A wrapper for rust frameworks which addresses the persistent issue of redundant type and function definitions between the frontend and backend"
description = "A wrapper for Rust frameworks that eliminates redundant type and function definitions between the frontend and backend"
keywords = ["parser", "api", "macro"]
categories = ["accessibility", "web-programming", "api-bindings"]
rust-version = "1.64.0"
Expand Down
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,30 @@
[![crates.io](https://img.shields.io/crates/d/gluer.svg)](https://crates.io/crates/gluer)
[![docs.rs](https://docs.rs/gluer/badge.svg)](https://docs.rs/gluer)

A wrapper for rust frameworks which addresses the persistent issue of redundant type and function definitions between the frontend and backend. At present, it exclusively supports the `axum` framework.
A wrapper for Rust frameworks that eliminates redundant type and function definitions between the frontend and backend. Currently, it supports only the `axum` framework.

## Origin of the Name

The name "gluer" is inspired by the tool's primary function, **gluing together different parts of a Rust-based web application**. Just as glue binds different materials together to form a cohesive whole, `gluer` integrates various components of the frontend and backend, ensuring they work seamlessly without redundant code.

## Installation

Add this to your `Cargo.toml`:

```toml
[dependencies]
light_magic = "0.3.0"
light_magic = "0.3.1"
```

## Disclaimer
## Features

Please be informed that this crate is in a very early state and is expected to work in not every case. Open a Issue if you encounter one! What works is:
Note: This crate is in an early stage and may not work in all cases. Please open an issue if you encounter any problems!

- Defining the routing and api generation as outlined in [How to use](#how-to-use)
- Inferring the input and output types of functions (but only `Json<...>` for inputs)
- Converting them to ts types
- Generating the ts file with the functions and data types
- Define routing and api generation as outlined in [How to use](#how-to-use).
- Infer input and output types of functions (currently supports only `Json<...>` for inputs).
- Convert Rust structs to TypeScript interfaces.
- Generate a TypeScript file with functions and data types.
- The generated TypeScript file does not depend on any external TypeScript libraries.

## How to use

Expand Down Expand Up @@ -100,7 +105,7 @@ use gluer::api;
api!("tests/api.ts");
```

### Complete Example
## Complete Example

Below is a complete example demonstrating the use of gluer with `axum`:

Expand Down

0 comments on commit d24efa0

Please sign in to comment.