https://pantsbuild.org/ logo
#general
Title
# general
f

fresh-continent-76371

11/08/2022, 8:02 AM
Am about to embark on adding some rust development into our pipeline. is there a) a roadmap for the rust backend support b) irrespective of a), what is the best way to "generate" artefacts from shell and have them available as "dependencies" in the pants ecosystem ? (Rust is one language, we have another in the embedded space, proprietary)
h

happy-kitchen-89482

11/08/2022, 6:27 PM
Hi! There isn’t a roadmap for a) yet, but we’d love to see it happen. Re b), have you looked at
experimental_shell_command
?
f

fresh-continent-76371

11/08/2022, 8:58 PM
@happy-kitchen-89482 yes I have , but I haven’t worked out how to declare dependencies generated by the shell command
Also - is there an existing issue that has started to flesh out the cargo / pants interaction ?
So far I have found - • Rust PyO3 support (we'd love to) - https://github.com/pantsbuild/pants/discussions/14649 Other Backend Discussions • JS/ TS - https://github.com/pantsbuild/pants/discussions/17357 • C/C++ - https://github.com/pantsbuild/pants/discussions/15499 Quickly looking at both of these, a pants backend needs to provide (in some preferential X do-ability order) 1. hooks into the Compilers and Toolchains of that language 2. hooks into the package management methods of that language 3. Linting and formatting hooks 4. Testing hooks 5. Compilation hooks 6. Build Generators Am I missing anything ? I can see two activities here • create some documentation / guidance for new comers like me who are interested in a "backend" for their language (and get a handle on what is required) • create a discussion for Rust backend support specifically.
h

happy-kitchen-89482

11/08/2022, 11:45 PM
You’ve pretty much nailed it. Except I would say “hooks into” sounds a bit more elaborate than what really happens, which is that pants invokes those tools in a process. So there is no modifying or plugging into Cargo/rustc/whatever.
Oh, and the other missing bit is dep inference, unless that’s what you meant by “build generators”?
f

fresh-continent-76371

11/08/2022, 11:48 PM
Oh, and the other missing bit is dep inference, unless that’s what you meant by “build generators”?
kind of, not really so dependency inference I can see as two areas. • native language tool chain generation and dependency inference ◦ it produces something -
ramons-binary
◦ we can determine the immediate and transitive dependencies that
ramons-binary
depends on • "native tooling" is used to generate stuff,
ramons-binary-api-dataclass-FooBar.schema.json
@happy-kitchen-89482 - follow along on the discussion thread now I suppose.
h

happy-kitchen-89482

11/09/2022, 12:00 AM
Yep, let’s take it there. Thanks for opening it!
🙌 1