Unverified Commit d953a446 authored by Harry Barber's avatar Harry Barber Committed by GitHub
Browse files

Add Server section to the Book (#1813)

* Move docs to server folder

* Index the Server folder

* Fix markdown lints

* Add basic overview.md to server folder
parent 4ba6063f
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
# Summary

- [Design Overview](./overview.md)
- [Tenets](./tenets.md)
- [Design FAQ](./faq.md)
@@ -13,6 +14,11 @@
  - [Endpoint Resolution](smithy/endpoint.md)
  - [Backwards Compatibility](smithy/backwards-compat.md)

- [Server](./server/overview.md)
  - [Generating Common Service Code](./server/code_generation.md)
  - [Generating the Pokémon Service](./server/pokemon_service.md)
  - [Instrumentation](./server/instrumentation.md)

- [RFCs](./rfcs/overview.md)
  - [RFC-0001: Sharing configuration between multiple clients](./rfcs/rfc0001_shared_config.md)
  - [RFC-0002: Supporting multiple HTTP versions for SDKs that use Event Stream](./rfcs/rfc0002_http_versions.md)
+3 −3
Original line number Diff line number Diff line
## Generating common service code
# Generating Common Service Code

How a service is constructed and how to plug in new business logic is described in [Pokémon Service][1].
This document introduces the project and how code is being generated. It is written for developers who want to start contributing to `smithy-rs`.

### Folder structure
## Folder structure

The project is divided in:

@@ -15,7 +15,7 @@ which contains common functions used by other crates, [copied into][2] the sourc

`/rust-runtime` crates ("runtime crates") are added to a crate's dependency only when used. If a model uses event streams, it will depend on [`aws-smithy-eventstream`][3].

### Generating code
## Generating code

`smithy-rs`'s entry points are Smithy code-generation plugins, and is not a command. One entry point is in [RustCodegenPlugin::execute][4] and
inherits from `SmithyBuildPlugin` in [smithy-build][5]. Code generation is in Kotlin and shared common, non-Rust specific code with the [`smithy` Java repository][6]. They plug into the [Smithy gradle][7] plugin, which is a gradle plugin.
+7 −0
Original line number Diff line number Diff line
# Smithy Server

Smithy Rust provides the ability to generate a server whose operations are provided by the customer.

- [Generating Common Service Code](./code_generation.md)
- [Generating the Pokémon Service](./pokemon_service.md)
- [Instrumentation](./instrumentation.md)
+26 −26
Original line number Diff line number Diff line
## Code generating the Pokémon Service
# Generating the Pokémon Service

This is an overview of client and server of the Pokémon service. It introduces:

@@ -10,7 +10,7 @@ All the code shown and linked to is from the repository at this commit: [db48039

The Smithy model used to generate the code snippets is: [Pokémon][2]

### Building the service
## Building the service

The entry point of a service is [main.rs][3]