2020-12-02 05:45:31 +08:00
|
|
|
# Smithy Rust ![status](https://github.com/awslabs/smithy-rs/workflows/CI/badge.svg)
|
2020-10-28 23:00:49 +08:00
|
|
|
Smithy code generators for Rust
|
2020-10-28 21:37:45 +08:00
|
|
|
|
2020-10-28 23:00:49 +08:00
|
|
|
## Setup
|
|
|
|
1. `./gradlew` will setup gradle for you
|
2020-11-05 11:09:00 +08:00
|
|
|
2. Running tests requires a working Rust installation. See [Rust docs](https://www.rust-lang.org/learn/get-started) for
|
2020-10-28 23:00:49 +08:00
|
|
|
installation instructions on your platform.
|
2020-10-28 21:37:45 +08:00
|
|
|
|
2020-11-05 11:09:00 +08:00
|
|
|
## Run tests
|
2020-10-28 23:00:49 +08:00
|
|
|
```./tesh.sh```
|
2020-10-28 21:37:45 +08:00
|
|
|
|
2020-11-05 11:09:00 +08:00
|
|
|
This will run all the unit tests, codegen an example model end-to-end and validates that the generated code compiles.
|
|
|
|
|
|
|
|
## Development
|
|
|
|
For development, pre-commit hooks may be useful. Setup:
|
|
|
|
```
|
|
|
|
brew install pre-commit # (or appropriate for your platform: https://pre-commit.com/)
|
|
|
|
pre-commit install
|
|
|
|
```
|
2021-01-20 04:23:07 +08:00
|
|
|
|
|
|
|
### Project Layout
|
|
|
|
* `aws`: AWS specific codegen & Rust code (signing, endpoints, customizations, etc.)
|
|
|
|
* `codegen`: Whitelabel Smithy code generation
|
|
|
|
* `codegen-test`: Smithy protocol test generation & integration tests for Smithy whitelabel code
|