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

Use kqueue native APIs directly to support i686 / macOS #136

Closed
passcod opened this issue Dec 28, 2017 · 1 comment
Closed

Use kqueue native APIs directly to support i686 / macOS #136

passcod opened this issue Dec 28, 2017 · 1 comment
Labels
A-enhancement os-bsd os-mac Z-needs implementation Needs an implementation, will accept PRs

Comments

@passcod
Copy link
Member

passcod commented Dec 28, 2017

The kqueue binding currently doesn't build at all on i686 and variants, because it doesn't use the right types when doing the binding for those architectures. However, the kqueue crate seems abandoned. Given this is a pretty small API, it shouldn't be too complex to do it ourselves instead.

See failed Travis builds on i686-unknown-freebsd, for example this one: https://travis-ci.org/passcod/notify/jobs/322424840

You can also see the build failure locally by running ci/cross-tests.sh build i686-unknown-freebsd.

Want to help?

Here is the documentation for the wrapper we currently use: https://docs.worrbase.com/rust/kqueue/
That should also give you its source.

kqueue is documented in its manual page: https://www.freebsd.org/cgi/man.cgi?kqueue(2)

To test the backend, run cargo test -p notify-backend-kqueue in BSD.

If you don't have a BSD on hand, you can get one running by installing Vagrant, checking out the next branch of this repo, and running vagrant up. That will bring up a FreeBSD11 virtual machine that you can then vagrant ssh into for developing. Use vagrant rsync or vagrant rsync-auto to sync up files to the virtual machine. However, note that this will bring up an x86_64 machine. To test on i686 you'll have to set up another one.

You don't have to reimplement the binding. If you find a kqueue binding that does what we want and is maintained, you can use that!

The goal here is to make Notify have a working backend on BSD on both x64 and x86. A bonus goal would be to support kqueue on macOS, as well.

@passcod passcod added A-enhancement Z-needs implementation Needs an implementation, will accept PRs os-bsd labels Dec 28, 2017
@passcod passcod added this to the 5.0.0 milestone Dec 28, 2017
@passcod passcod changed the title Use kqueue native APIs directly to have it build on i*86 Use kqueue native APIs directly to 1) have it build on i*86 2) support macOS Jan 2, 2018
@passcod passcod changed the title Use kqueue native APIs directly to 1) have it build on i*86 2) support macOS Use kqueue native APIs directly to have it build on i686 / support macOS Jan 2, 2018
@passcod passcod changed the title Use kqueue native APIs directly to have it build on i686 / support macOS Use kqueue native APIs directly to support i686 / macOS Jan 2, 2018
@passcod passcod added the os-mac label Jan 2, 2018
@passcod
Copy link
Member Author

passcod commented Apr 29, 2018

Looks like this will be easier to achieve by using the mio kqueue implementation directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-enhancement os-bsd os-mac Z-needs implementation Needs an implementation, will accept PRs
Projects
None yet
Development

No branches or pull requests

1 participant