License type is missing
christian3042 opened this issue · comments
In the LICENSE files in each package (axum-core, axum-extra, axum-macros, axum) the license type (MIT License) is missing. Only from README it is recognizable, what license type it is. This can be confusing, when looking first at the LICENSE file an not being familiar with the content of different Open Source licenses.
Also the formatting could be improved and be uniform across all packages, e.g.
MIT License
Copyright (c) 2025 axum Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The license is also specified in Cargo.toml
but sure, it can be improved. Do you want to send a PR?
I think this is what the MIT license always looks like, no?
For example tokio itself has "MIT License" as the first line of the file.
Personally I don't mind either way so if someone wants to add that here too or if you think we should not, I'm fine with either outcome.
I checked a bunch of LICENSE-MIT
/ MIT.txt
files in various subdirectories of my local /usr/share/licenses
and found none with the license header. I'd rather not deviate from the norm on this. Though what does seem weird with the axum files is that they are not hard-linewrapped. I guess we could change that?
Other Github projects that I have checked, always have mentioned the license name - either in the file name or within the file itself. I think there is not a norm for that, and the license is primarily described by the content and not the name, but makes it easier to understand the kind of license, without looking any further.
Here are some examples:
https://github.com/tokio-rs/tokio/blob/master/LICENSE (mentioned within file)
https://github.com/diesel-rs/diesel/blob/master/LICENSE-MIT (mentioned within file name and file)
https://github.com/serde-rs/serde/blob/master/LICENSE-MIT (only mentioned in the file name)
Another reason for putting also the license name is, to help license scanners, to identify the license:
https://github.com/CycloneDX/license-scanner?tab=readme-ov-file
https://spdx.org/licenses/