How to publish a crate that depends on unpublished code in git?

My program relies on a feature I contributed to another crate (pcre2-sys). Unfortunately, the author of that other crate hasn't merged my PR and hasn't published it in a new release - overall that crate looks like unmaintained anymore. Unfortunately it is not possible to publish on crates.io something that has an unpublished dependency.

What is the standard community-friendly way of resolving such a problem?
Should I integrate that crate into my source code just as part of it?
Should I publish my fork of that crate with another name?
Or are there any other ideas?

Pinging the maintainer may help. @BurntSushi is active, so maybe he just didn't notice your PR.

In case that change won't be merged:

  • if you're forking, I recommend putting version number or year in the fork's name. There's a high chance you're not going to be interested in maintaining this fork forever, so it's best to give it a name that will obviously age.

  • It's best to keep -sys crates as separate crates. If it was just a few lines of Rust-native code then it'd be fine to copy it into your crate, but sys crates can be problematic. For example, you shouldn't have more than one copy of a sys crate in dependency tree, because C libs aren't namespaced. Linux distros that may need to package Rust programs have a lot of opinions about this, and may need to patch sys crates.

@kornel guessed right. If a PR goes that long without my attention (it happens), then it's safe to say that it has just dropped off my radar. A friendly ping ~monthly is okay I think.

1 Like

Thank you! :slight_smile:
Yes, it is easy to miss something when working on many projects.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.