-
Notifications
You must be signed in to change notification settings - Fork 10
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 as library #13
Comments
We will also need it as a library. |
Hi, Nice to hear that someone except me is actually trying to make use of bita! :) About the library split it's something I've been working on but it's still very much a work in progress. The library part is referred to as bitar but it's interface is not very well defined and undocumented as for now. Mainly there are parts in the cli tool that should live in the library to make it easier to reuse from other tools. So for now I can only refer you to |
The 0.6.x releases of |
Thank you, that looks promising indeed. I'll give it a shot when i can. I've already written a dumb substitute in the meantime; here's hope i won't need it! |
Thanks to the example, i mostly made it work - it's no as easy as i'd like, but perfectly functional. However, when trying to use it from an async context (specifically, iced-futures), i'm getting errors like these:
If you don't need any kind of feedback, one can use this terrible workaround: Is this something that can be fixed in bitar, e.g. by implementing |
..to Archive and clone functions. This to be less restrictive on types implementing the traits (see issue #13).
Latest master (5d34ca6) may solve your troubles @MCOfficer . |
That seems to have worked, thank you. It still is a bit unwieldy (and now |
Not sure I follow... Why do you have to create another async runtime, aren't you already running tokio, or are you mixing runtimes? |
Probably - without that workaround, i get an error telling me I'm not on the tokio runtime, so i guess iced uses the futures runtime internally. I should also look into this, apparently one can make iced use tokio. Either way, I assume this is nothing that needs fixing on bitar's end. |
Will not support multiple runtimes at this time, no :) |
In case future viewers also run into problems with tokio compatibility, i'd like to point them towards stjepang's latest stunt: tokio-fix. Edit: it's been yanked for unknown reasons. Check out async-compat instead. |
I'm interested at using this to serve updates of an game but got a few questions:
(Sorry for hijacking this; Really interested in this approach) |
I've used bita at small scale but in production for some time with good results. Not planning on changing the archive format and my intent is definitely to keep it backwards compatible in the meaning that any old archive should be possible to read with a more recent version of the tool. So yes and no, I guess :)
Depends on what you mean by performance. Compared to some other tool or in numbers like memory or cpu usage, bytes/second scanned, network transfer speed? Think it's probably best to measure for your own specific case.
Impossible to say since it's highly dependent on the data operating on. Best is probably to test with your specific dataset. The Generally the more data two versions of a file share and the more data is kept in order between those versions the better the result.
Definitely can be but same answer as above, you will need to test on your specific data to know. There should be no hard limit on file size that is close to those numbers.
bita doesn't really work with or care about multiple files. It operates on and compresses a single file. If that file is something like a tar-archive with lots of files in it makes no difference to bita. Will probably work best if the archive is uncompressed before processed with bita though. And also good if files in the archive are kept in order between versions of that archive.
No worries, hope you got some answers out of this :) |
Can't speak for performance since i have to reference points, but as for stability, ESLauncher2 has been using bita in "production" for its most trivial task (updating an instance) for roughly a year. There is a fallback, but it's for when the upstream server gives out, afaik it was never used due to bita throwing up. |
Hello,
Bita almost perfectly fits my needs, except it seems to be exclusively a CLI tool. Is there any chance this can be used as library from another rust project?
The text was updated successfully, but these errors were encountered: