A plugin for Rust #20119
tgolsson
started this conversation in
Development
A plugin for Rust
#20119
Replies: 2 comments 1 reply
-
Workspace support was recently merged; and in the coming week I'm hoping that we'll merge support for |
Beta Was this translation helpful? Give feedback.
0 replies
-
@tgolsson You think it's worth closing this discussion, as I think we all agree it would be awesome - and it's onto implementation? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello friends!
TL;DR - see bottom.
I've started working on a Pants plugin for Rust support, and this is both an announcement and a call-for-contributors . I (along with many others) have wanted Rust support in Pants for a long while now, and there's been multiple topics on this in the past. For example:
rustfmt
support #15093Based on all of these discussions, the lack of progress, and the ratio of unknowns to knowns, I went for the simplest alternative: only wrap Cargo. Doing this will not be efficient or "Pants-like" but it'll allow shipping Rust from Pants tomorrow. That's the baseline for dogfooding this, and everything else can come later. This is how I've developed all my other plugins, most of which I use daily and in production.
To make this easier to adopt and improve, I've opted to develop this is as a fully independent plugin. This means that if you're on Pants 2.17 or a pre-release of 2.181 you can immediately start using it. The plugin will automatically install Rust for you as part of Pants (isolated from your system), though not any C/C++ tools or native tools that might be needed. Later on,
To get startedthis, add the following to your
pants.toml
.Then, once you've added a rust package you can run
tailor
as usual, and start running, packaging, linting, formatting, and testing Rust code. There is currently no support for workspaces, but it's very high on the TODO, and contributions are welcome!There is also an example repository which shows how to set this up.
Footnotes
Once 2.18 is released, the plan is to only support the current stable Pants moving forward. ↩
Beta Was this translation helpful? Give feedback.
All reactions