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

crate doesn't build on non-unix systems #35

Open
xobs opened this issue Aug 29, 2019 · 2 comments
Open

crate doesn't build on non-unix systems #35

xobs opened this issue Aug 29, 2019 · 2 comments
Assignees

Comments

@xobs
Copy link

xobs commented Aug 29, 2019

Somewhat related to #27 -- if you include this crate in a project, it won't build on any other platforms.

This can be worked around by adding a Cargo-level conditional. However, it would be nicer to modify lib.rs such that it only builds any modules that are compatible with a given platform.

The nix crate does something similar, allowing unconditional inclusion on all platforms:

https://github.com/nix-rust/nix/blob/master/src/lib.rs

@xobs
Copy link
Author

xobs commented Aug 29, 2019

Note that it also fails on Darwin, linux-mips, and linux-mips64: https://travis-ci.org/xobs/wishbone-utils/builds/578424583

@golemparts
Copy link
Owner

Thanks for reporting this issue. Since rppal won't work on anything other than a Raspberry Pi running a supported linux distro, adding a Cargo-level conditional would be the appropriate workaround when working with larger projects that target additional platforms. However, I do like the idea of a cleaner solution where that step can be omitted. I'll look into the solution used by nix.

@golemparts golemparts self-assigned this Sep 9, 2019
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

2 participants