docopt.rs is dual-licensed under the MIT and Unlicense.

How can the software be both copyrighted and in the public domain? Is this an example of invalid licensing?

2 Answers 2


Firstly, no it's not invalid at all. It's always valid to dual or multi license a product under many licenses, even completely contradictory licenses. When you dual license something the recipients get to choose which license they will accept the work under. They only choose one, so it doesn't matter if another license would give them contradictory rights.

The authors of docopt.rs have probably done this because in some jurisdictions it is difficult or perhaps even impossible to put a work in the public domain. By dual licensing with the very permissive MIT license they solve that problem by providing a license which is valid everywhere. If you are somewhere where public domain dedications are questionable, or if your company's lawyers are uncomfortable with you using something published under the Unlicense, then you can use the safe option of the MIT instead.

  • 3
    A dual-license is especially important in case of the “Unlicense” since the Unlicense is not OSI approved and could be considered an amateurishly written “crayon license” that may or may not work as intended. As such, using “Unlicensed” code carries disproportionate risk; offering the MIT license as an alternative mitigates this. For all scenarios where one might consider the Unlicense, CC0 looks like a much more reliable alternative.
    – amon
    Jun 11, 2017 at 11:12
  • 4
    @amon Note that CC0 is not OSI approved either. Both are approved by the FSF but the FSF recommends CC0 over the Unlicense.
    – Zimm i48
    Jun 11, 2017 at 13:05
  • 2
    Sure, it's fine to have two licenses, and they may contradict if they apply to different users/uses. But isn't "public domain" a special case, because in most locales what it means is that no one owns the software, and thus no other license has any standing? Though I suppose you could have it in public domain in some countries and some other license in other countries. Jun 16, 2017 at 18:04

When you are the original creator of a piece of copyrighted work, whether this is a book or code, then you can release that under as many licenses as you desire. It may not make much business sense, but as the copyright holder you have that right.

This happens all the time. For example a photo that is exclusively licensed by a newspaper for a certain number of weeks. Then again sold after that period to many magazines at the same time, and lastly followed by releasing it in the public domain when it's commercial value has dwindled but it's use by others may have marketing value.

Three times the same object is made available under different contract terms/ license.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.