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

Remove frozen-abi build script #2911

Merged
merged 9 commits into from
Sep 17, 2024

Conversation

kevinheavey
Copy link

Problem

Since all frozen-abi stuff is feature gated these days, we don't need #[cfg(RUSTC_WITH_SPECIALIZATION)] any more. We can just rely on the frozen-abi feature that already exists for all the crates that need it.

Summary of Changes

  • Replace all checks for RUSTC_WITH_SPECIALIZATION with checks for feature = "frozen-abi"
  • Remove all frozen-abi build scripts (these only serve to set RUSTC_WITH_SPECIALIZATION). In a few cases, there is still a build script doing other tasks, and I've only removed the frozen-abi parts.
  • Remove all rustc_version dependencies, as these are only used by frozen-abi build scripts
  • Make the two frozen-abi crates do almost nothing by default unless the frozen-abi feature of those crates is activated. The point of this is to make sure the workspace compiles on stable Rust - the frozen-abi feature is only for nightly Rust

Copy link

mergify bot commented Sep 13, 2024

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@kevinheavey kevinheavey marked this pull request as ready for review September 13, 2024 01:20
@ryoqun
Copy link
Member

ryoqun commented Sep 16, 2024

I appreciate these changes and think this is in good direction.

just curious. how much is build time reduced?

@ryoqun
Copy link
Member

ryoqun commented Sep 16, 2024

also, could you fix conflicts? (sorry for the delayed code-review btw...)

@kevinheavey
Copy link
Author

just curious. how much is build time reduced?

Seems to be 10-100 ms when the frozen-abi feature is deactivated. That's more than I would have guessed since the build script is empty when the feature is deactivated.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(it seems that "rustc_version 0.4.1" itself can't still get rid of because some trnasitive deps (namely ark-ff, cast and curve25519-dalek) depends on that..)

Comment on lines -42 to -44
[build-dependencies]
rustc_version = { workspace = true, optional = true }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems this isn't needed to begin with.

Copy link
Member

@ryoqun ryoqun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm; come to think of it, feature-based gating makes sense then custom build.rs and custom cfg... really thanks for all the efforts of fixing this one by one.

@kevinheavey kevinheavey added the automerge automerge Merge this Pull Request automatically once CI passes label Sep 17, 2024
@mergify mergify bot merged commit 6082e84 into anza-xyz:master Sep 17, 2024
53 checks passed
@kevinheavey kevinheavey deleted the remove-frozen-abi-build-script branch September 17, 2024 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge automerge Merge this Pull Request automatically once CI passes need:merge-assist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants