Skip to content

Remove target-cpu=native from .cargo/config.toml for portable builds #27

@jose-compu

Description

@jose-compu

Description

.cargo/config.toml sets rustflags = ["-C", "target-cpu=native"] for release builds. While this optimizes for the build machine, it produces binaries that may not run on other CPUs and can cause illegal instruction errors.

Proposed Changes

  • Remove target-cpu=native from .cargo/config.toml
  • Document it as an optional flag users can set locally for maximum performance
  • Keep it only in a developer-facing profile or CI benchmark job if needed

Impact

Ensures published binaries and crates are portable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    code qualityStatic analysis, lints, and code standardsperformancePerformance benchmarks and optimization

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions