Skip to content

Simplify features and detect based on OS #126

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

JohnAZoidberg
Copy link
Member

@JohnAZoidberg JohnAZoidberg commented May 4, 2025

Now we can build on Windows and FreeBSD, in addition to previously just Linux: with cargo build only!

@JohnAZoidberg
Copy link
Member Author

Unfortunately no progress on rust-lang/cargo#1197.
But the way it was implemented was ugly anyways, there was no reason to have so many features. If things are clearly OS dependent, we can just gate based on target OS.

@JohnAZoidberg JohnAZoidberg force-pushed the cargo-build-windows branch 4 times, most recently from 8ebe3ea to 19260ef Compare May 4, 2025 14:40
Now we can build on Windows just with `cargo build`!

Signed-off-by: Daniel Schaefer <dhs@frame.work>
@JohnAZoidberg JohnAZoidberg force-pushed the cargo-build-windows branch from 19260ef to db46c4b Compare May 4, 2025 15:54
@JohnAZoidberg
Copy link
Member Author

JohnAZoidberg commented May 4, 2025

TODO:

  • I think there's no need for the std feature, can just cfg(no_std)
  • I think I don't need sha2/force-soft anymore
  • Try on windows (Ryzen AI 300)
  • Try on Linux (Intel Core Ultra S1)
  • Try on FreeBSD
  • Try on UEFI (Intel Core Ultra S1)

Linking doesn't fail anymore for UEFI builds.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
There's no need for it, the only no_std environment is UEFI and it's
unlikely there'll be another one.
Maybe we could rename uefi to no_std in the future, but right now it
makes no sense to duplicate it.

Signed-off-by: Daniel Schaefer <dhs@frame.work>
@JohnAZoidberg JohnAZoidberg force-pushed the cargo-build-windows branch from 9a59034 to f73981d Compare May 5, 2025 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant