You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: src/licenses.md
+17-8
Original file line number
Diff line number
Diff line change
@@ -6,33 +6,42 @@ Detailed licensing information is available in the [COPYRIGHT document](https://
6
6
7
7
## Guidelines for reviewers
8
8
9
-
In general, reviewers need to be looking not only for the code quality of contributions but also that they are properly licensed.
10
-
We have some tips below for things to look out for when reviewing, but if you ever feel uncertain as to whether some code might be properly licensed, err on the safe side — reach out to the Council or Compiler Team Leads for feedback!
9
+
In general, reviewers need to be looking not only for the code quality of contributions but also
10
+
that they are properly licensed.
11
+
We have some tips below for things to look out for when reviewing, but if you ever feel uncertain
12
+
as to whether some code might be properly licensed, err on the safe side — reach out to the Council
13
+
or Compiler Team Leads for feedback!
11
14
12
15
Things to watch out for:
13
16
14
17
- The PR author states that they copied, ported, or adapted the code from some other source.
15
-
- There is a comment in the code pointing to a webpage or describing where the algorithm was taken from.
18
+
- There is a comment in the code pointing to a webpage or describing where the algorithm was taken
19
+
from.
16
20
- The algorithm or code pattern seems like it was likely copied from somewhere else.
17
21
- When adding new dependencies, double check the dependency's license.
18
22
19
-
In all of these cases, we will want to check that source to make sure it it is licensed in a way that is compatible with Rust’s license.
23
+
In all of these cases, we will want to check that source to make sure it it is licensed in a way
24
+
that is compatible with Rust’s license.
20
25
21
26
Examples
22
27
23
-
- Porting C code from a GPL project, like GNU binutils, is not allowed. That would require rust itself to be licensed under the GPL.
28
+
- Porting C code from a GPL project, like GNU binutils, is not allowed. That would require Rust
29
+
itself to be licensed under the GPL.
24
30
- Copying code from an algorithms text book may be allowed, but some algorithms are patented.
25
31
26
32
## Porting
27
33
28
-
Contributions to rustc, especially around platform and compiler intrinsics, often include porting over work from other projects, mainly LLVM and GCC.
34
+
Contributions to rustc, especially around platform and compiler intrinsics, often include porting
35
+
over work from other projects, mainly LLVM and GCC.
29
36
30
37
Some general rules apply:
31
38
32
39
- Copying work needs to adhere to the original license
33
40
- This applies to direct copy & paste
34
41
- This also applies to code you looked at and ported
35
42
36
-
In general, taking inspiration from other codebases is fine, but please exercise caution when porting code.
43
+
In general, taking inspiration from other codebases is fine, but please exercise caution when
44
+
porting code.
37
45
38
-
Ports of full libraries (e.g. C libraries shipped with LLVM) must keep the license of the original library.
46
+
Ports of full libraries (e.g. C libraries shipped with LLVM) must keep the license of the original
0 commit comments