www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - A potentially interesting project

reply SealabJaster <sealabjaster gmail.com> writes:
Was recently pondering if it were possible to auto-generate a 
client for the AWS API.

I decided to see how the official SDKs were made, and found out 
that Amazon created a tool called Smithy: 
https://github.com/awslabs/smithy

They've written their more recent SDKs via code generation in 
Smithy, see for example:

The base Go generator: https://github.com/aws/smithy-go

The generation specifically for the Go SDK: 
https://github.com/aws/aws-sdk-go-v2/tree/main/codegen

This is too much effort for me to personally bother with (plus I 
barely know Java), but I thought it might take someone else's 
interest, especially since I struggled to find any hint of this 
being a thing in the first place.
Oct 17 2021
next sibling parent Petar Kirov [ZombineDev] <petar.p.kirov gmail.com> writes:
On Monday, 18 October 2021 at 02:18:36 UTC, SealabJaster wrote:
 Was recently pondering if it were possible to auto-generate a 
 client for the AWS API.

 I decided to see how the official SDKs were made, and found out 
 that Amazon created a tool called Smithy: 
 https://github.com/awslabs/smithy

 They've written their more recent SDKs via code generation in 
 Smithy, see for example:

 The base Go generator: https://github.com/aws/smithy-go

 The generation specifically for the Go SDK: 
 https://github.com/aws/aws-sdk-go-v2/tree/main/codegen

 This is too much effort for me to personally bother with (plus 
 I barely know Java), but I thought it might take someone else's 
 interest, especially since I struggled to find any hint of this 
 being a thing in the first place.
Interesting! One of last year's SAoC projects was "D Language Client Libraries for Google APIs" [[¹]][1] [[²]][2] [[³]][3], so given what it was accomplished, I think a "D Client Libraries for AWS (or Microsoft Graph) APIs" project would be a logical next step. [1]: https://github.com/dlang/projects/issues/66 [2]: https://forum.dlang.org/post/eaefvlbgikujonfjjzqi forum.dlang.org [3]: https://forum.dlang.org/post/gimihhnxzbkeodvrotoy forum.dlang.org
Oct 18 2021
prev sibling parent reply James Blachly <james.blachly gmail.com> writes:
On 10/17/21 10:18 PM, SealabJaster wrote:
 Was recently pondering if it were possible to auto-generate a client for 
 the AWS API.
 
 I decided to see how the official SDKs were made, and found out that 
 Amazon created a tool called Smithy: https://github.com/awslabs/smithy
 
 They've written their more recent SDKs via code generation in Smithy, 
 see for example:
 
 The base Go generator: https://github.com/aws/smithy-go
 
 The generation specifically for the Go SDK: 
 https://github.com/aws/aws-sdk-go-v2/tree/main/codegen
 
 This is too much effort for me to personally bother with (plus I barely 
 know Java), but I thought it might take someone else's interest, 
 especially since I struggled to find any hint of this being a thing in 
 the first place.
You know, IIRC I saw someone who had prototyped such a thing (for D) when poking around Github late one night. I wish I could think of where I saw it. The repo had the entire JSON file documenting the AWS API surface, and -- I believe -- there was some code that had parsed just the S3 namespace and generated dlang code for this. In any case, I think this would be a tremendous project, and infinitely more maintainable than one that did NOT automatically generate code ...
Oct 18 2021
parent SealabJaster <sealabjaster gmail.com> writes:
On Tuesday, 19 October 2021 at 00:08:09 UTC, James Blachly wrote:
 In any case, I think this would be a tremendous project, and 
 infinitely more maintainable than one that did NOT 
 automatically generate code ...
My thoughts exactly.
Oct 19 2021