Skip to content

Specialized Rust compilation profiles #256

Description

@arthurpaulino

We want to have two main compilation profiles for the ix Rust crate:

  • A profile intended for CI runs
  • A profile intended for release builds

Due to the compute-intense characteristics of some of our tests (from Aiur), the profile for CI can be more optimized for execution than the typical debug profile. Doing opt-level = 3 is probably enough.

For maximally optimized release builds, this is what an AI system suggested to me:

[profile.release]
opt-level = 3       # Maximum optimization (for runtime speed)
lto = "fat"         # Full link-time optimization (best perf, slowest compile)
codegen-units = 1   # Forces single-codegen for better cross-function optimization
strip = true        # Removes debug symbols to reduce binary size
panic = "abort"     # Slightly smaller/faster code (optional)

Some of those might be overkill. When we have the Rust pipeline fully integrated (Lean->Ixon compilation + Aiur proving), then we'll be able to better evaluate this multi-dimensional metric and pick the config options that make sense for us.

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions