Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use trunk crate/cli using rules_rust #3110

Open
flynneva opened this issue Dec 16, 2024 · 1 comment
Open

How to use trunk crate/cli using rules_rust #3110

flynneva opened this issue Dec 16, 2024 · 1 comment

Comments

@flynneva
Copy link

flynneva commented Dec 16, 2024

I've got rules_rust all setup and working for my personal website here that id like to b build it as a static site and deploy the built dist/ folder - built with trunk build.

I'm using the latest rules_rust release I think and bzlmod too using the from_cargo approach to pull in crates.

The problem im getting to is if I try and add the trunk crate to the Cargo.toml file and run bazel query @crates//......its not listed for some reason.

I think its because the crate only provides an "installable" CLI binary and not an actual library.

Is there a way to somehow get this trunk CLI executable as a Bazel target, without having to break hermicity/still pull it in using rules_rust? I couldn't find an example of this situation anywhere in the rules_rust docs unfortunately...thats why im asking here.

Thanks in advanced 🙏🏼

@flynneva
Copy link
Author

You can sort of see what im trying to do in the latest CI run in the deploy job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant