How to use Pulumi with Rust?
# general
f
How to use Pulumi with Rust?
c
There isn't any official Rust lang support
e
f
@echoing-dinner-19531 Have you worked with it? Can I run providers with it?
e
I haven't, I don't know what its capable of, just that it was posted
s
@faint-stone-613 You're not going to get much of a performance advantage with Rust, just FYI. The bottleneck on IaC performance is that you spend most of your time waiting for the upstream cloud API to respond.
💯 1
f
It's more about ease of programming, using a powerful Rust type system, than performance aspect.
s
I would go with TypeScript then. It has a good type system.
f
@stocky-restaurant-98004 But what if I want better type system? When Rust support will be officially added?
s
I would not expect Rust to be added in the foreseeable future. The maintenance overhead of adding another language is quite a bit for our engineering team. It means a lot more code to maintain, so in order for it to be worth the work, there has to be a large demand for the language.
However, we do have some community members who have added support for languages. There's Scala language support that one of our community members wrote: https://github.com/VirtusLab/besom If you're interested in adding community-led Rust support, I can try to find you some resources on how to write a language host for Pulumi.
f
@stocky-restaurant-98004 IaaC in any language on frontpage is misleading then. Aren't you supporting 5 languages already? Idk, maybe adding new languages is easier than at the beginning. Isn't this issue showing large demand for language? https://github.com/pulumi/pulumi/issues/3622 What is language host? How is it different from prototype suggested before? https://github.com/pulumi/pulumi/issues/3622#issuecomment-2711968678
@stocky-restaurant-98004 I'll be thankful if you'll try to find some resources on how to write language host for Pulumi.
s
So the community-created Pulumi Gestalt is a language host. You can tell this because the command uses `pulumi plugin install language...`: https://github.com/andrzejressel/pulumi-gestalt
This is the Java language plugin: https://github.com/pulumi/pulumi-java/ And then we have some additional resources in the developer documentation: https://pulumi-developer-docs.readthedocs.io/latest/docs/architecture/languages.html
e
Supporting all languages is a goal, we are moving towards it. We are not quite at a place in engineering where we think we're in a good position to support lots of community language well. Besom had a lot of support from us to get going, and I suspect any other language would need that help now as well. But it is something we care about and are working towards making easier.
c
@faint-stone-613 good luck leveraging a "better" type system and still being able to use Providers for cloud platforms, where the APIs are pretty loose to begin with.
875 Views