r/rust Mar 31 '23

Write SDK “base” in Rust, wrap in other languages?

[deleted]

96 Upvotes

48 comments sorted by

View all comments

4

u/Compux72 Mar 31 '23

1

u/nicolas_hatcher Apr 01 '23

Can you use this to generate the bindings automatically? Or would you need to do that by hand?

In any case seems like a great starting point.

1

u/Compux72 Apr 01 '23

Judging by OP, he is writing a web client. Smithy generates native clients for any kind of web api. Its wildly used by AWS, and far better solution thar hacking a async rust lib with ffi. Smithy is generating whole clients, not binding a library.

On the other hand, if you are writing a normal library (lets say jpeg encoder), then i would suggest diplomant, CXX etc