Skip to content

Instantly share code, notes, and snippets.

@nikitalita
Last active August 17, 2021 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nikitalita/b7fe0ab1288788423529689546fd62ee to your computer and use it in GitHub Desktop.
Save nikitalita/b7fe0ab1288788423529689546fd62ee to your computer and use it in GitHub Desktop.
Dynamic linking a GPL program with the Discord Game SDK

(Disclaimer: IANAL, this does not constitute legal advice, seek a lawyer for more guidance if necessary)

GPL and other FOSS licenses are only concerned with distribution; indeed, restrictions on use are forbidden by free software and open source definitions, it can only enforce restrictions on distribution. So, GPL clauses come into force whenever a GPL program is distributed to other people.

The thing that's at issue here is the FSF's interpretation of copyright law when it comes to software and derivative works.

  • First, the FSF takes the position that a program that dynamic links against a library at runtime with constitutes a derivative work; you've combined a program and a library to make a new program.
  • Second, "collectivity": They take the position that when you distribute said program with said library, you are distributing a "combined" program that constitutes a derivative work, even if said combination actually happens at runtime. The argument is that when you distribute them together, they are not "independent and seperate works", respectively.
  • (There's also the "interdependency" argument, but that doesn't apply here since it's an optional feature.)

So, according to this interpretation, if you dynamically link a GPL program with a library, the GPL would apply to both the libraries and the program itself. They can't enforce this against programs that link against DLLs that are not distributed with the program, since that's a restriction on use (which is why they have that Systems libraries exception in the first place). But, they can enforce that against programs that are distributed with those DLLs.

Nevertheless, their ability to enforce that rests on their interpretation of copyright law to actually be correct, and neither their interpretation of what constitutes derivative works or their interpretation of "collectivity" have actually been tested in court. Several copyright experts take the opinion that it is not correct.

However, most companies thus far have acted like this is the case and generally avoid doing this. Indeed, Discord seems to take this position themselves according to this from their Store Distribution Agreement:

2.6 Open Source Software. Except as otherwise expressly agreed in writing, Developer shall not distribute via Discord Store, or combine any Discord materials with, open source or other software that is licensed under terms that purport to bind Discord to contractual obligations (e.g., the GNU General Public License or Lesser General Public License).

TL;DR:

So, if you want to include Discord game SDK integration with a GPL program, the option that would cause the least friction while still being safe would likely be to prompt the user to automatically download and install it when they enable it for the first time.

Further reading: Software Interactions and the GNU General Public License GPL - the Linking Debate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment