🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

Milvus
Zilliz

What are the restrictions of the Mozilla Public License (MPL)?

The Mozilla Public License (MPL) is a weak copyleft license that imposes specific restrictions to ensure openness while allowing integration with proprietary code. Its primary restrictions revolve around source code disclosure for modifications, compatibility with other licenses, and attribution requirements. These rules strike a balance between enforcing openness for direct changes to MPL-licensed code and permitting flexibility when combining it with other codebases.

The first major restriction is that any modifications to MPL-licensed source files must be made available under the same license. If you modify or add to an existing MPL-licensed file, you must publicly share those changes, including the modified source code. For example, if you fix a bug in an MPL-licensed library, you cannot keep the fix proprietary—it must remain under the MPL. However, this applies only to the original MPL files themselves. If you combine MPL code with entirely new modules or files under a different license (e.g., proprietary or permissive licenses like MIT), those new components can remain under their original terms. This makes the MPL more flexible than strong copyleft licenses like the GPL, which would require the entire combined work to be open-sourced.

A second restriction involves compatibility with other licenses. The MPL 2.0 explicitly allows combining MPL-licensed code with code under the GNU GPL, LGPL, or Apache License 2.0, but integrating with other licenses may require explicit permission. For instance, if you want to merge MPL code with a project under the MIT License, you must ensure the MPL’s requirements are respected for the MPL-licensed portions. Additionally, if you combine MPL code with GPL-licensed code, the entire work becomes subject to the GPL’s terms. This creates a clear boundary: the MPL’s copyleft applies only to its own files, but mixing licenses in a single project requires careful compliance with all involved licenses’ rules.

Finally, the MPL requires maintaining attribution and legal notices. Any distribution of MPL-licensed code—whether modified or unmodified—must retain copyright notices, license text, and a list of contributors. For example, if you distribute a compiled binary containing MPL code, you must include a copy of the license and attribute the original authors, typically in documentation or an included notice file. This ensures transparency about the code’s origins and licensing terms. These requirements are less burdensome than those in licenses like the Apache License 2.0 (which mandates explicit patent notices) but still enforce basic accountability for how the code is used and shared.

Like the article? Spread the word