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

[Question] Any plan to make API more Rust idiomatic? #2

Open
oxalica opened this issue Jan 14, 2024 · 1 comment
Open

[Question] Any plan to make API more Rust idiomatic? #2

oxalica opened this issue Jan 14, 2024 · 1 comment

Comments

@oxalica
Copy link

oxalica commented Jan 14, 2024

I found this library from crates.io, but the API seems to be very C-alike. It heavily uses un-typed integer flags, exposes raw errno instead of std::io::Error, and many functions are built around pointers here and there. The example setup is also quite tedious and requires manual memory management.

Is there any plan to make the API of libublk more Rust idiomatic? Or it's intended to be a low-level port of C code base and expects some other high-level library building on top of this one?

@ming1
Copy link
Collaborator

ming1 commented Jan 15, 2024

Hello,

Thanks for the report.

This library aims at native Rust lib definitely, and it is just
that I am one Rust beginner, and libublk is my 1st Rust project.

I will try to improve the interfaces and make it more
Rust idiomatic. Meantime any contribution toward this
direction is welcome!

Thanks,

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