Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.87 KB

README.md

File metadata and controls

40 lines (27 loc) · 1.87 KB

Rusoto Service Crate Generator

This executable generates crates for AWS services based on their botocore service manifests.

Usage

In order to run the service generator, first make sure that the botocore submodule has been initialized:

$ git submodule update --init

Then, from the service_crategen directory, call:

$ cargo run -- generate -c ./services.json -o ../rusoto/services

This will regenerate all services in the rusoto/services directory, updating them with the configuration defined in the services.json file and applying any code generation changes.

Customizing Generated Crates

Some service crates may require customized code, perhaps as helper code to make it easier to use for end-users or custom tests. Since services are regenerated by the generator, there needs to be a safe place for custom code to sit that won't be destroyed on regeneration.

Every crate is generated with a custom module inside. This module is empty by default, but anything can be added to the custom directory and module after generation and it will not be deleted on regeneration. This does mean, however, that care must be taken to verify that custom code still builds and works on regenerated crates, so it should be well-tested and kept up-to-date.

Testing Generated Crates

After regenerating, all crates should be tested to verify that they still build and their tests pass. This is a fairly simple process. From the rusoto directory, run:

$ cargo test --all --lib

This will tests service crates, in addition to the rusoto_core crate.

Checking Services (Missing & Outdated)

The crate generator is also able to check for any missing or outdated services with the check command:

$ cargo run -- check -c ./services.json

If there are any missing or outdated services, they will be output in a formatted list along with useful information.