Critical Alert: The Cascading "License Virus" Effect of GPL/AGPL Crates Poses a Silent Threat to the Rust Ecosystem #12152
Closed
DwainOwens
started this conversation in
General
Replies: 1 comment
-
you can use e.g. https://github.com/EmbarkStudios/cargo-deny/ to avoid pulling in GPL dependencies |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Current Behavior
Disclaimer: This issue is not intended to diminish the importance or the foundational role of the GPL and AGPL licenses in the open-source community. These licenses are valuable and serve a critical purpose. This issue is about ensuring developers are acutely and immediately aware of the significant legal implications of using such crates in their projects, especially within the context of Rust's powerful and seamless dependency management.
1. The Problem: A Silent Threat in the Dependency Tree
The beauty of Cargo and crates.io is how effortlessly developers can pull in dependencies. A simple
cargo add
can introduce a powerful new functionality. However, this simplicity masks a significant danger: the "viral" or cascading nature of GPL and AGPL licenses.A developer working on a proprietary, closed-source project can unknowingly import a crate that, deep within its own dependency tree, relies on a GPL-licensed crate. For example:
Proprietary App -> Crate A -> Crate B -> Crate C (GPL)
When the final binary is compiled and distributed, the GPL's terms from
Crate C
can be argued to extend to the entire linked work. This would legally obligate the developers of the "Proprietary App" to make their entire source code available under the GPL.This is an extremely perilous situation for any individual or company developing proprietary software in Rust. The ease of adding dependencies creates a minefield where a single, deeply nested GPL crate can inadvertently force a project to become open-source against the author's will or business model. This poses a substantial and existential threat to the growth of Rust in commercial and enterprise environments.
2. The LGPL can also become a problem:
As Reddit user valarauca14 said:
As Reddit user DataPath said:
The Urgency: Why This is Critical for the Rust Ecosystem
For Rust to continue its incredible growth and be a top-tier choice for all types of software development (including commercial, proprietary applications), developers must have absolute clarity and confidence in their dependency choices. The current system on crates.io, while displaying the license, does not adequately warn developers about the profound and cascading legal implications of using a GPL or AGPL-licensed crate. This is not just a matter of metadata; it's a matter of ecosystem safety and stability.
This is not about scaring people away from the GPL. It is about providing informed consent. It is about protecting the Rust ecosystem from unintentional and potentially catastrophic legal issues that could stifle its adoption in the broader software industry. We must act to ensure developers are not caught by surprise.
Expected Behavior
We need to make the implications of using these licenses impossible to ignore. I suggest one or both of the following solutions be implemented on the crates.io website and within the Cargo toolchain:
A Prominent, Unmistakable Warning on Crates.io:
For any crate licensed under GPL or AGPL (or any other strongly copyleft license), a highly visible warning box should be displayed at the top of the crate's page. This should not be subtle. I envision:
A Warning in the Cargo Toolchain:
An even more direct approach would be to issue a warning directly in the terminal when a developer adds a GPL/AGPL-licensed crate as a dependency:
Steps To Reproduce
No response
Environment
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions