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

Support libuv 1.9.1 #2

Merged
merged 1 commit into from
Jun 15, 2016
Merged

Support libuv 1.9.1 #2

merged 1 commit into from
Jun 15, 2016

Conversation

Qard
Copy link
Contributor

@Qard Qard commented Jun 15, 2016

I made some updates to support libuv 1.9.1.

@sorear sorear merged commit d1e1ccf into sorear:master Jun 15, 2016
@sorear
Copy link
Owner

sorear commented Jun 15, 2016

I actually don't have a current need for this project, due to changing plans in the place I originally wanted it for. If you're going to be an active user of it and want to take over, I'll happily give GitHub or Cargo access as necessary.

@Qard
Copy link
Contributor Author

Qard commented Jun 16, 2016

I'm not sure yet how involved I'll be. I'm sort of just evaluating it now and trying to figure out how to make a more Rust-y API on top of it. It might get used for the duktape version of nucleus, as the core of it gets converted to Rust.

@creationix
Copy link

I'll try and use this. If it works out, I won't mind taking ownership.

@Qard
Copy link
Contributor Author

Qard commented Jun 25, 2016

I'm happy to help out with maintenance, once a solid abstract API is figured out. I don't have the time to build the whole abstract API myself though. 😸

@creationix
Copy link

I'm still new to rust. How exactly do I use this?

I know the libuv API in C pretty well having used it in half a dozen projects and this source looks like a rust header calling describing the ffi interface to a subset of libuv.

Do you have a simple example or something like a TCP echo server?

@Qard
Copy link
Contributor Author

Qard commented Jun 25, 2016

It works largely the same as the C API, at this level. All the functions are in the same module namespace. You need to use C types via the libc::{...} list at the top of lib.rs. Casting between Rust types and C types shouldn't be too difficult. You'll have to use lots of unsafe { ... } blocks though, since C/FFI stuff is all marked unsafe. The FFI docs should cover most of your questions, but if you need any help, feel free to ping me on IRC (also qard there) and I can help out. Keep in mind I'm a bit new to Rust myself though. 😉

@sorear
Copy link
Owner

sorear commented Jun 25, 2016

I wouldn't mind trying to do the high-level API if there's interest.

@creationix
Copy link

@sorear go for it. I'm not getting to that any time soon it appears.

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.

None yet

3 participants