How is smithy-rs meant to be used? #2596
-
Is there any docs on how we are meant to use smithy-rs. The examples directory is using code specific to this https://github.com/awslabs/smithy-rs repo. Is there any example of how to integrate the codegen for the server SDK in a fresh github repository? I am somewhat aware of the smithy gradle plugin but unsure how to integrate smithy-rs. I am about to do some hacky stuff with cloning this repo (https://github.com/awslabs/smithy-rs repo) and running similar to the examples directory with my own Smithy model but wonder if theres a better way. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hello! We don't have yet an official guide on how to use this repository as a dependency. I built an example some time ago on how to use smithy-rs as a submodule: https://github.com/crisidev/smithy-rs-pokemon-service The idea is that you add https://github.com/awslabs/smithy-rs as a submodule of your git repo and integrate it with a small piece of custom Gradle code. The example is outdated, but I'll spend some time today to update it to the latest version of smithy-rs so you can take a look to it. |
Beta Was this translation helpful? Give feedback.
-
My changes on the example repo are blocked by this bug: #2602 |
Beta Was this translation helpful? Give feedback.
-
Can someone please explain me, how to start exploring this smithy-rs if one is new into this. From where to start and how, Cannot understand the readme file also. It would be helpful if someone could help me. |
Beta Was this translation helpful? Give feedback.
-
Thanks @crisidev for this example. I'll +1 this as it's not clear how to integrate smithy-rs into a fresh project. While I was at AWS there was the Brazil approach which used an internally published version of the codegens + smithy-build.json configuration. Since the smithy-rs codegens are not published to maven, it was not clear how to incorporate smithy-rs's client and server codegens into a fresh project in the cleanest fashion. Your example repo is a great start! Thanks for providing this and in advance for updating it to the latest standards. This would be a great thing to link to officially. Or, just publish the codegens to maven central so smithy-build.json is all that's needed (I assume that's the plan one day?) |
Beta Was this translation helpful? Give feedback.
Hello! We don't have yet an official guide on how to use this repository as a dependency.
I built an example some time ago on how to use smithy-rs as a submodule: https://github.com/crisidev/smithy-rs-pokemon-service
The idea is that you add https://github.com/awslabs/smithy-rs as a submodule of your git repo and integrate it with a small piece of custom Gradle code. The example is outdated, but I'll spend some time today to update it to the latest version of smithy-rs so you can take a look to it.