-
Notifications
You must be signed in to change notification settings - Fork 433
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
Fix build on non-32/64-bit architectures #1144
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look fine to me, but we should also consider adding tests for platforms with such small pointer widths.
Agreed, we should have tests for a least one Running the following commands worked for me to build rustup toolchain install nightly-2021-01-07
rustup default nightly-2021-01-07
cargo build -Z build-std=core --target=avr-unknown-gnu-atmega328 --no-default-features --release @Palladinium can you add test for this to the CI. See existing no-std build tests: rand/.github/workflows/test.yml Line 163 in 52407e7
We may want to add a dedicated `test-avr job, as it will need its own toolchain. |
Note: AVR has 16-bit pointers (and 8-bit registers). See the Wikipedia page and the AVR-Rust Guidebook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Marking "request changes" for adding to the CI and removing the u8
impls.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for fixing the CI stuff!
I'll let @vks handle merging/squashing, as I don't normally merge PRs for this repo. |
Thanks everyone! |
I've been trying to build
rand
for AVR (which has 8-bit pointers), failing with errors like the following:This fixes it, and should fix it for any 8-bit and 16-bit architecture.