You can do things like creating ad-hoc environments:
$ devenv -O languages.rust.enable:true shell
Once you teach your coding agent to use it, it will just use it to get packages if needs any: https://devenv.sh/integrations/claude-code/#global-configura...