I often see Rust mentioned at the same time as MIT-type licenses.

Is it just a cultural thing that people who write Rust dislike Libre copyleft licenses? Or is it baked in to the language somehow?

Edit: It has been pointed out that I meant to say “copyleft”, not “libre”, so edited the title and body likewise.

  • enemenemu@lemm.ee
    link
    fedilink
    arrow-up
    22
    ·
    edit-2
    5 days ago

    It’s kind of the default in the docs

    https://doc.rust-lang.org/cargo/reference/manifest.html?highlight=License#the-license-and-license-file-fields

    SPDX license expressions support AND and OR operators to combine multiple licenses.1

      [package]
       # ...
      license = "MIT OR Apache-2.0"
    

    Using OR indicates the user may choose either license. Using AND indicates the user must comply with both licenses simultaneously. The WITH operator indicates a license with a special exception. Some examples:

    MIT OR Apache-2.0
    LGPL-2.1-only AND MIT AND BSD-2-Clause
    GPL-2.0-or-later WITH Bison-exception-2.2
    

    When I started out (I don’t write Rust but other languages), in my first years, I liked gpl and after a couple of years I got to know MIT and I started using that because I thought it is “more free”. I wasn’t aware of the consequences immediately. Once I read the GNU philosophy and started reading more about free software, I started using gplv3 again

      • Ephera@lemmy.ml
        link
        fedilink
        English
        arrow-up
        14
        ·
        5 days ago

        Well, the thing is, if you’re developing a library, you usually do so, because you want it to be useful to people in the ecosystem.
        By putting it under the GPL, you limit that usefulness to only those projects which are willing to also put themselves under the GPL. From an idealist point of view, I certainly also would like to say that people not willing to put their software under GPL don’t need to be my users. But from a library author point of view, I might as well not write a library then, since no one’s going to use it then.

        Many open-source projects are under a permissive license themselves. I might disagree with their choice, but I don’t really want to exclude those from using my library. They’re still doing good things. I would love to exclude specifically any proprietary software from using my library, but that’s not really something you can require in your license without excluding all those permissive open-source projects.

        So, to answer your question, I actually don’t think people are being tricked into it. I thought about choosing GPL for my libraries for a while (all my applications are under GPL) and decided against it. Which is a personal choice that others can disagree with, but all I’m saying is, I know what I’m doing, I wasn’t tricked to use a permissive license.

      • enemenemu@lemm.ee
        link
        fedilink
        arrow-up
        6
        arrow-down
        1
        ·
        5 days ago

        You could say that, yes.

        It makes sense to suggest MIT license for a MIT project

        MIT is better than proprietary. MIT does not force you to not make your project free.

        • davel [he/him]@lemmy.ml
          link
          fedilink
          English
          arrow-up
          8
          ·
          edit-2
          5 days ago

          MIT does not force you to not make your project free.

          Given the double negative and the ambiguity of “free,” I don’t know what you’re trying to say here.

          • enemenemu@lemm.ee
            link
            fedilink
            arrow-up
            6
            ·
            5 days ago

            You are allowed to license your code change under gpl, you do not have to use MIT just because the package author uses MIT. You can use GPL.

            You can also use MIT or no license at all. it does not force you to use MIT

          • enemenemu@lemm.ee
            link
            fedilink
            arrow-up
            4
            ·
            edit-2
            5 days ago

            I am no dev of rust.

            My guess:

            • they didn’t want to scare anyone.
            • They really think that MIT is free and that anyone shall do with it whatever they like. They are not afraid that someone takes the rust code base and produces a proprietary fork and make money from it.