4programmers.net

Witaj!

Wibowit dodał nowy post w wątku: Firmy, które korzystają z Rusta


paco_machine napisał(a):

Czytam ostatnio tysiące komentarzy jak starzy wyjadacze oprogramowania wkurzają się że Ubuntu i Debian wprowadza Rust.
Twierdzą że to próba zniszczenia wolnego oprogramowania FOSS i Linux od środka przez takie korporacje jak Microsoft.
Zmiana licencji GPL na tą z Rust ma im to ułatwić. Czy część kodu potrzebna do stworzenia kompilatora Rust (OCaml)nie była zamknięta?
Padają też oskarżenia setki razy że Rust to komunistyczny twór. Bloatware wprowadzany cichaczem przez korporacje.
Rust to ewidentnie celowo stworzona luka w zabezpieczeniach jądra Linuksa. Przechwytują i sabotują projekt Linux, aby w najbliższej przyszłości ograniczyć użytkownikom możliwość korzystania z prywatnych, bezpiecznych systemów operacyjnych. (...bla bla bla...)

rust for linux nie zmienia licencji linuksa. dalej ogólnie zostaje gpl 2, aczkolwiek miejscami są też inne licencje. zresztą tak samo jak wcześniej.

mimo, że systemy z rodziny bsd są na licencji bsd, a nie gpl, to i tak korzystają np. z linuksowych sterowników do grafiki i żaden linuksowiec się o to nie czepia (a przynajmniej o tym nie słychać), więc to licencjonowanie nie jest takie znowu zero-jedynkowe.

zadałem pytanie chatowi gpt:

what is the policy of 'rust for linux' project when it comes to source code licensing? which license is the desired one? when searching for rust files in linux kernel https://github.com/search?q=repo%3Atorvalds%2Flinux%20language%3ARust%20&type=code i see both

Kopiuj
// SPDX-License-Identifier: GPL-2.0 

and

Kopiuj
// SPDX-License-Identifier: Apache-2.0 OR MIT 

and other combinations.

i dostałem odpowiedź:

The practical policy is:

The Linux kernel as a whole is GPL-2.0-only, but individual source files may carry different SPDX expressions as long as they are GPL-2.0-compatible. The kernel licensing rules explicitly allow dual-licensed files and even show examples like GPL-2.0 OR MIT and GPL-2.0 OR Apache-2.0.

In the Rust subtree, the split you noticed is mostly about what kind of code the file is. Code that is clearly Linux-kernel-specific tends to be plain GPL-2.0: for example, rust/macros/lib.rs is GPL-2.0, and the Rust kernel-module docs/examples use license: "GPL" in module!{...}. That makes GPL-2.0 the normal/default choice for Rust code written specifically for the kernel itself.

The files marked Apache-2.0 OR MIT are mostly vendored or shared Rust crates that keep their upstream Rust-ecosystem licensing. The in-tree rust/proc-macro2/README.md says those files come from upstream proc-macro2 and are licensed under Apache-2.0 OR MIT; rust/syn/README.md says the same for syn; and the in-tree pin-init sources also carry Apache-2.0 OR MIT, while upstream pin-init says contributions are dual-licensed under Apache 2.0 and MIT.

So the answer to “which license is the desired one?” is:

  • For kernel-native Rust code in Linux: GPL-2.0 is the expected/default choice.
  • For imported/shared Rust crates such as proc-macro2, quote, syn, and pin-init: keep their existing Apache-2.0 OR MIT license, because that is their upstream license and the in-tree copies are intentionally preserving it.

So, no, Rust-for-Linux is not following a policy of “all Rust files should be Apache/MIT.” What you are seeing is a mixed tree: GPL for Linux-specific Rust, and Apache/MIT for upstream Rust crates that are carried into the tree.

If you want, I can also map the current rust/ subtree into “kernel-owned GPL code” vs “upstream dual-licensed crate code.”


Zobacz post

Z poważaniem,
4programmers.net

Jeżeli masz problemy z kliknięciem na przycisk "Zobacz post", skopiuj i wklej poniższy link w przeglądarce:

http://4programmers.net/Notification?path=%252FForum%252FRust%252F354300-firmy_ktore_korzystaja_z_rusta%253Fp%253D2016545%2523id2016545