Skip to content

Commit c8f5aba

Browse files
authored
Readme (#45)
* readme * Create LICENSE * add empty contributing file
1 parent 7cb780b commit c8f5aba

3 files changed

Lines changed: 85 additions & 1 deletion

File tree

CONTRIBUTING.md

Whitespace-only changes.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Moderne verteilte Anwendungen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,64 @@
1-
# asyncapi-rust-generator
1+
# Crustagen
2+
3+
Crustagen is a Rust code generator that takes AsyncAPI specifications as input and generates Rust code along with all the required dependencies and auto-generated documentation. It's designed to be an efficient tool to convert AsyncAPI specs into Rust projects ready to build and run.
4+
5+
![Build Status](https://github.com/Programmierpraktikum-MVA/AsyncAPI/actions/workflows/ci.yml/badge.svg)
6+
7+
## Table of Contents
8+
9+
- [Crustagen](#crustagen)
10+
- [Table of Contents](#table-of-contents)
11+
- [Requirements](#requirements)
12+
- [Installation](#installation)
13+
- [Usage](#usage)
14+
- [Contribute](#contribute)
15+
- [License](#license)
16+
17+
18+
19+
## Requirements
20+
21+
- Rust 1.70 or later.
22+
- Cargo (comes with Rust).
23+
- AsyncAPI Specification (version 2.1.0 supported currently).
24+
25+
## Installation
26+
27+
```sh
28+
git clone https://github.com/yourusername/crustagen.git
29+
cd crustagen
30+
cargo build --release
31+
```
32+
33+
## Usage
34+
35+
To generate Rust code from an AsyncAPI specification, use the `-s` flag to specify the path to the spec file and the `-o` flag to specify the output directory.
36+
37+
Example:
38+
39+
```sh
40+
cargo run -- -s ./example/specs/basic.yaml -o ./output
41+
```
42+
43+
This will generate a Rust project in the specified output directory.
44+
45+
To run the server, navigate to the output directory (replace `{project-id}` with the actual project directory name, the title of the spec) and use `cargo run`:
46+
47+
```sh
48+
cd output/{project-id}
49+
cargo run
50+
```
51+
52+
To view the auto-generated documentation, use the following command:
53+
54+
```sh
55+
cargo doc --no-deps --open
56+
```
57+
58+
## Contribute
59+
60+
Contributions are always welcome! Please read the [contribution guidelines](CONTRIBUTING.md) first.
61+
62+
## License
63+
64+
[MIT](LICENSE)

0 commit comments

Comments
 (0)