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

no_std support #57

Open
lu-zero opened this issue Jan 19, 2025 · 4 comments
Open

no_std support #57

lu-zero opened this issue Jan 19, 2025 · 4 comments

Comments

@lu-zero
Copy link

lu-zero commented Jan 19, 2025

Would be in-scope making graviola no_std+alloc?

@ctz
Copy link
Owner

ctz commented Jan 19, 2025

Hi! Yes, for sure.

At the moment this is difficult because I'm using the dynamic CPU feature detection in std -- eg https://doc.rust-lang.org/std/arch/macro.is_aarch64_feature_detected.html -- while avoiding that is easy on x86, I think the story on ARM is less clear.

@lu-zero
Copy link
Author

lu-zero commented Jan 19, 2025

Adding a feature to disable it and assume the target supports everything and/or receive the features from the caller might be sufficient?

Probably later in the development though :)

@ctz
Copy link
Owner

ctz commented Jan 19, 2025

Adding a feature to disable it and assume the target supports everything and/or receive the features from the caller might be sufficient?

Yes. Even simpler would be to require anyone using that feature specifies the features statically at compile time (using target-cpu=native or whatever). Which is probably more reasonable for a typical no-std user?

@lu-zero
Copy link
Author

lu-zero commented Jan 19, 2025

Having a way to override probably would make their life simpler.
But as it is now the plausible target would be a tiny os for arm and that's it.

In the future a beefy quasi-embedded risc-v that may or may not have RVV enabled might enjoy having a mean to pass the information since it usually comes from the device tree or the bootloader.

(I opened the issue because rustyguard has a WIP patchset that tries to use graviola directly and I got curious)

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

No branches or pull requests

2 participants