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

charm plugin should include rust compiler in build dependencies #2004

Open
james-garner-canonical opened this issue Nov 25, 2024 · 1 comment
Labels
Enhancement New feature or request

Comments

@james-garner-canonical
Copy link

james-garner-canonical commented Nov 25, 2024

What needs to get done

Add "cargo" to the charm plugin build dependencies for deb based charms (see PR #2005).

I'm not 100% sure what's needed for yum and dnf systems.

Why it needs to get done

It's increasingly common that some python packages require a rust compiler at build time. We first noticed this a few months ago in the Juju SDK's 'Write your first Kubernetes charm' tutorial. Here we needed to add cargo to build-packages for the charm part when adding cos-lite.

This came up again recently with the 2023 Operator Day tutorial (video, repo) that most new starters are asked to do. Here the need for cargo comes from adding the traefik_k8s.v2.ingress lib, because it includes the popular PyPI package pydantic (note: the lib is using PYDEPS). We considered another documentation fix here (which would have to include both the tutorial and the ingress lib, as well as any other libs using pydantic), but it seems like it might be a better idea to just include cargo in the charm plugin's build dependencies by default.

@dimaqq
Copy link
Contributor

dimaqq commented Nov 27, 2024

When I played with this I had to include both rustc and cargo.
https://discourse.charmhub.io/t/charmcraft-3-0-in-the-beta-channel/13469/7?u=dimaqq

In any case, it would be great if rust toolchain was included by default just like the C toolchain.

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

No branches or pull requests

2 participants