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

Is there a plan to release Golang library similar to the libublk-rs? #70

Open
PhanLe1010 opened this issue Aug 6, 2024 · 9 comments
Open

Comments

@PhanLe1010
Copy link

PhanLe1010 commented Aug 6, 2024

Thank you for the great work!

Is there a plan to release a Golang library similar to the libublk-rs https://github.com/ublk-org/libublk-rs ?

Longhorn is trying to support UBLK as the storage frontend (ref ticket longhorn/longhorn#5159). It is mostly written in Golang so we are wondering if there is any plan to release the Golang library

cc @ming1 @derekbit

Thank you very much!

@ming1
Copy link
Collaborator

ming1 commented Aug 9, 2024

Hello,

The reason of libublk-rs is that:

  • Rust is one memory safety language, which is important
    for ublk, which is one low-level system component
  • Rust has excellent performance
  • crates.io provides convenient package management
  • rich & powerful 3rd library, such as serde_json, clap, ...
  • async/.await matches well with ublk async implementation

And it takes much effort/time in re-writing it with golang.
Especially I know nothing about Go now. And there are lots
of things for me to do recently: io_uring zero copy, ublk-ebpf,
more targets, ...

So I don't have plan to write one golang ublk library.

But if you or anyone would like to write the library or one wrapper with golang, I am happy to provide help.

Thanks,

@cz172638
Copy link

cz172638 commented Aug 9, 2024

@PhanLe1010 afaik, influxdb v2 is using libflux written in rust, while influx itself in go. why not simply only go-lang wrapper?

@PhanLe1010
Copy link
Author

PhanLe1010 commented Aug 14, 2024

Hi @ming1

Thank you very much for the explanation! Yeah, it totally makes sense as you already have a lot of other works and it would be too much effort to rewriting (and more importantly maintaining) the library in a new language.

We (Longhorn) will attempt to write a Golang wrapper to see if it works. We would very much appreciate your help when doing this. What would be the best way to reach out to you when we have questions?

Also, do you think it is better to write a Golang wrapper around the C library or the Rust library?

@PhanLe1010
Copy link
Author

PhanLe1010 commented Aug 14, 2024

@PhanLe1010 afaik, influxdb v2 is using libflux written in rust, while influx itself in go. why not simply only go-lang wrapper?

Thanks @cz172638 for the wrapper idea. We will investigate this

@ming1
Copy link
Collaborator

ming1 commented Aug 16, 2024

Hi @ming1

Thank you very much for the explanation! Yeah, it totally makes sense as you already have a lot of other works and it would be too much effort to rewriting (and more importantly maintaining) the library in a new language.

We (Longhorn) will attempt to write a Golang wrapper to see if it works. We would very much appreciate your help when doing this. What would be the best way to reach out to you when we have questions?

Either github or email: [email protected] is fine for me.

Also, do you think it is better to write a Golang wrapper around the C library or the Rust library?

I'd suggest to try Rust library first.

Thanks,

@derekbit
Copy link

Hi @ming1
Thank you very much for the explanation! Yeah, it totally makes sense as you already have a lot of other works and it would be too much effort to rewriting (and more importantly maintaining) the library in a new language.
We (Longhorn) will attempt to write a Golang wrapper to see if it works. We would very much appreciate your help when doing this. What would be the best way to reach out to you when we have questions?

Either github or email: [email protected] is fine for me.

Also, do you think it is better to write a Golang wrapper around the C library or the Rust library?

I'd suggest to try Rust library first.

Thanks,

@ming1
Thank you. We have the same idea in today's internal discussion.
Before diving into the libublk-rs, will the libublk-rs be actively maintained in the future? It seems the c++ version is more active.

cc @PhanLe1010 @shuo-wu @innobead

@ming1
Copy link
Collaborator

ming1 commented Aug 16, 2024

rs, will the libublk-rs be actively maintained in the future?

Yes.

c++ version is just easy for trying some new ideas, but all new features & bug fixes will land in Rust lib.

Thanks,

@derekbit
Copy link

rs, will the libublk-rs be actively maintained in the future?

Yes.

c++ version is just easy for trying some new ideas, but all new features & bug fixes will land in Rust lib.

Thanks,

Cool! Thanks @ming1

@PhanLe1010
Copy link
Author

Thanks a lot @ming1 ! We are very appreciate your support!

Hi @ming1
Thank you very much for the explanation! Yeah, it totally makes sense as you already have a lot of other works and it would be too much effort to rewriting (and more importantly maintaining) the library in a new language.
We (Longhorn) will attempt to write a Golang wrapper to see if it works. We would very much appreciate your help when doing this. What would be the best way to reach out to you when we have questions?

Either github or email: [email protected] is fine for me.

Also, do you think it is better to write a Golang wrapper around the C library or the Rust library?

I'd suggest to try Rust library first.

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

4 participants