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

Documentation: alternative build systems #1920

Open
briansmith opened this issue Jan 16, 2024 · 1 comment
Open

Documentation: alternative build systems #1920

briansmith opened this issue Jan 16, 2024 · 1 comment

Comments

@briansmith
Copy link
Owner

People who use alternative build systems like Bazel often do not use the build.rs build script. In 0.17.x we've simplified and refactoed build.rs to make it easier to "port" its logic to 3rd-party build systems. We should document a checklist of steps that a ring user who is not using build.rs, when updating to a new version of ring, as they'll often have to adjust their build logic according to nay changes we've made in build.rs.

For example, in the 0.17.0 release, we added a dependency on the CARGO_MANIFEST_LINKS environment variable to build.rs. This broke peoples' Bazel builds because Bazel's rules_rust didn't define CARGO_MANIFEST_LINKS. If we had the appropriate checklist for upgrading to a new version of ring with an alternative build system, users would have discovered this.

Similarly, in the next upcoming release, we're adding a dependency on CARGO_CFG_TARGET_VENDOR and also adding new cfg logic that needs to be replicated in an alternative build system (ring_x25519_neon; see #1919). #1832 plans to expand this pattern to all targets.

We should note:

  • The document MSRV in Cargo.toml indicates the minimum version of Cargo we support. We assume that all the environment variables that that version of Cargo supports are available to build.rs. As long as build.rs works correctly on the MSRV of Cargo, we will consider the change to be SemVer-compatible. In other words, we expect alternative build systems to be compatible with Cargo w.r.t. the environment variables supported.
  • We do not test alternative build systems and support for them is limited accordingly. For example, we have no CI coverage.
  • We encourage people to submit improvements to build.rs that make it easier to mirror in other build systems.
@briansmith
Copy link
Owner Author

Issue #1977 tracks improving and extending build.rs and mk/package.sh to make it easier to use ring with Bazel and GN.

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

No branches or pull requests

1 participant