Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Git-ignoring the .cargo folder? #53

Description

@tombh

I have some fancy nightly features I like to enable for faster compiles, but they live in .cargo/config.toml. The trouble is that they depend on my specific CPU architecture, so they can't be committed to any repo. Here's an example:

# See: https://bevyengine.org/learn/quick-start/getting-started/setup

# Find your machines arch with `rustc -vV | sed -n 's|host: ||p'`
[target.aarch64-unknown-linux-gnu]
linker = "clang"
rustflags = [
  "-C", "link-arg=-fuse-ld=/usr/bin/mold",
  # (Nightly) Make the current crate share its generic instantiations
  "-Zshare-generics=y"
]

# Don't forget to:
# `rustup component add rustc-codegen-cranelift-preview --toolchain nightly`
[unstable]
codegen-backend = true
[profile.dev]
codegen-backend = "cranelift"
[profile.dev.package."*"]
codegen-backend = "llvm"

In this repo we use .cargo/config.toml for a xtask alias, so I can't add all those fancy nightly flags. I'd personally vote for ignoring the .cargo folder, but it's not a big deal, so I'm just making an issue to register my vote.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions