smithy-rs/rust-runtime/aws-smithy-http-server-type.../examples
Matteo Bigoi 3862ca0a37
Initial implementation of Typescript server bindings (#2277)
* A barely working code generation in typescript

* Extract shared socket into feature inside aws-smithy-http-server

* Building a fully functional application, I think

* Add NAPI build.rs

* Refactor all names to use typescript instead of js

* Add (hopefully) the PR bot for TS

* Clippy fixes

* Fix documentation

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>

* set_reuse_port in socket not on windows

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>

* Add example implementation

* Allow the new application to build

* Remove all occurrences of Python

* Simplify README

* Fix issue with the codegen-diff-revision script

* Try to prevent the ci-lint to bother us with TODO at this stage of development

* Remove codegen-client from typescript dependencies

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>

* Add CODEOWNERS and fix some other linting issues

* Add license

* Prevent from running tests on typescript in Windows

Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>

* Initial work to remove error from this PR

* Update to call_async

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>

* types/node in package.json

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>

* Generate app.ts

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>

* Improve makefile

* Adapting code to the latest changes and removing runtime dependency (for now).

* Removing rust-runtime/aws-smithy-http-server-typescript.

* Making CI happy.

* Restoring ServerCodegenDecorator to be like main.

* Adding back the aws-smithy-http-server-typescript crate back.

* Removing index.js file.

---------

Signed-off-by: Daniele Ahmed <ahmeddan@amazon.de>
Signed-off-by: Bigo <1781140+crisidev@users.noreply.github.com>
Co-authored-by: 82marbag <69267416+82marbag@users.noreply.github.com>
Co-authored-by: Alberto Pose <albepose@amazon.com>
2023-04-06 15:27:17 +00:00
..
.gitignore Initial implementation of Typescript server bindings (#2277) 2023-04-06 15:27:17 +00:00
Cargo.toml Initial implementation of Typescript server bindings (#2277) 2023-04-06 15:27:17 +00:00
Makefile Initial implementation of Typescript server bindings (#2277) 2023-04-06 15:27:17 +00:00
README.md Initial implementation of Typescript server bindings (#2277) 2023-04-06 15:27:17 +00:00
package.json Initial implementation of Typescript server bindings (#2277) 2023-04-06 15:27:17 +00:00
pokemon-service.ts Initial implementation of Typescript server bindings (#2277) 2023-04-06 15:27:17 +00:00

README.md

Smithy Rust/Typescript Server SDK example

This folder contains an example service called Pokémon Service used to showcase the service framework Typescript bindings capabilities and to run benchmarks.

The Python implementation of the service can be found inside pokemon_service.ts.

Depedencies

TODO: Add NAPI installation instructions

Build

Since this example requires both the server and client SDK to be code-generated from their model, a Makefile is provided to build and run the service. Just run make build to prepare the first build.

Once the example has been built successfully the first time, idiomatic cargo can be used directly.

make distclean can be used for a complete cleanup of all artefacts.

Test

cargo test can be used to spawn the Python service and run some simple integration tests against it.

More info can be found in the tests folder of pokemon-service-test package.