mbuesch / disktest

Hard Disk (HDD), Solid State Disk (SSD), USB Stick, SD-Card tester
https://bues.ch/h/disktest
Apache License 2.0
34 stars 5 forks source link

Release it as a library #1

Closed patrickelectric closed 8 months ago

patrickelectric commented 8 months ago

It would be nice if this could be released as a library and the library itself provides the binary. This would help developers that want to have such functionality on their software.

mbuesch commented 8 months ago

That would be pretty easy, I think. The disktest worker actually is separate from the commandline interface already internally. I would even consider relicensing it under a more permissive license to help the library approach.

However, do you have an actual use case for this in mind? What kind of application would embed this?

Thanks for your suggestions and comments.

patrickelectric commented 8 months ago

I have a project called linux2rest that I use to fetch information of the systems via a rest API. Right now it's a passive library that just fetches information, but I would like to add a more active role, a disk test endpoint would be really great.

mbuesch commented 8 months ago

Interesting. But also sounds dangerous to have a rest API based disk chewer. :) Is that project available somewhere to look at?

patrickelectric commented 8 months ago

Oh yes: https://github.com/patrickelectric/linux2rest

patrickelectric commented 8 months ago

Sadly I'm reviving the project, the frontend UI is not working as expected, but the rest API is working just fine.

mbuesch commented 8 months ago

Cool. Thanks. I'll take a look at it. I'll leave the decision whether it's a good idea to have a data destroyer in your application up to you, of course :)

This would pretty much require a relicensing of disktest, because it currently is GPL2, which is incompatible with your project. I have no problem with relicensing disktest under Apache/MIT. I'll just have to check if I have vendored some foreign GPL work. I think it's not the case, but I will have to double check to make sure.

patrickelectric commented 8 months ago

TYVM!

mbuesch commented 8 months ago

Of course another use case for a library would be to create a classic GUI application. I don't plan to develop a GUI application, but it would be great to enable others to do that.

mbuesch commented 8 months ago

I have moved the core into the disktest-lib and disktest-rawio crates and published them. The APIs are basically unchanged. The documentation of the libraries currently lacks a bit, though.

Closing this issue. If you have suggestions for further improvements, please open a new issue. Thanks!

patrickelectric commented 8 months ago

Awesome! Thanks @mbuesch!