ParadoxSpiral / libmpv-rs

A libmpv abstraction written in rust that's easy to use and provides the ability to read next to all video and audio codecs.
GNU Lesser General Public License v2.1
100 stars 36 forks source link

Publish to crates.io #7

Closed theduke closed 4 years ago

theduke commented 5 years ago

Hey there.

I'd need this library for a project (Youtube TUI) but it's apparently not published to crates.io.

Would be great if this could be done.

(might also relate to #1 )

Cobrand commented 5 years ago

You can use it without having it published to crates.io, put this in your Cargo.toml:

foo = { git = 'https://github.com/ParadoxSpiral/mpv-rs.git' }

theduke commented 5 years ago

Yeah I know, that's what I'm doing right now.

But I can't publish a crate depending on mpv that way.

ParadoxSpiral commented 5 years ago

What's preventing me from publishing is that @Cobrand's crate already took the name. Though thinking about it the name libmpv-rs might actually make more sense anyways.

theduke commented 5 years ago

Maybe @Cobrand is willing to hand over the crate name to you?

Failing that, libmpv sounds good to me. Duplicate crate names are inevitable at some point.

Cobrand commented 5 years ago

I'm not too fond of sharing the name, not because I don't trust ParadoxSpiral, but because it might cause issues for users. This repo is not an upgrade of my previous, it's a different version entirely. Currently this repo's version is 0.1.0, but my crate's version is 0.2, so you'd need to update it to at least 0.3. On crates.io there will be this awkward scenario where 0.3 's repository will be yours, but 0.2 (and lower)'s repository will be mine. Because of this (and I'm sure there are other reasons as well), I'd prefer if you could create another name on crates.io. I could push an update on my repo to redirect from the readme to your crate, but I'm not too fond of sharing the same name for now.

ParadoxSpiral commented 5 years ago

I agree, that would be awkward. A shame that crates.io does not support namespaces.

An issue would be that renaming the crate would break all crates that depend on the git, though I think that could be solved by reexporting libmpv-rs from a facade mpv-rs for the meanwhile.

ParadoxSpiral commented 5 years ago

Small update: I have the repo restructured locally and it works. However I've noticed weird behaviour around event handling where events seem to spuriously not fire which I want to checkout before releasing a major version bump.

ParadoxSpiral commented 5 years ago

So I've been thinking about this, and in hindsight the events_sync feature seems severely overengineered to the point I might just rip it out, and make mpv.wait_event safe by constraining it to one thread. Do you use the events_sync feature?

ParadoxSpiral commented 4 years ago

This crate has been published under the libmpv and libmpv-sys names.

theduke commented 4 years ago

Great, thanks.