Specifically, I'm thinking of taking the libraries that squoosh.app (source) uses internally (imagequant, optipng, etc) and break them up into an image optimization webassemby set of libraries that can be used by other npm and browser build/bundles.

While I understand this work to have webassembly builds of these libraries would be GPL, does this also mean anyone using them would be GPL too? Even though it's not even dynamically linking. IMO, it's even more of a grey/allowed use than with dynamic linking. It's much closer imho to calling a GPL executable from a non-gpl executable.

  1. Related - Release codecs on NPM
  • If you combined some GPL code into a larger set of libraries, then in my opinion the combination is derived from that GPL code, so you need to follow the GPL rules by also releasing the source code of the whole set of libraries under the GPL as well.
    – Brandin
    Feb 15, 2020 at 11:55
  • @Brandin and if it's just a wasm file sitting on another web server the browser loads? I mean, what constitutes combining? If I call an executable that's gpl, that means my executable and all related code is gpl?
    – Tracker1
    Feb 18, 2020 at 5:05
  • What legal juridiction are you under? (European, USA, ...). Did you ask your lawyer? Feb 18, 2020 at 13:22
  • @Tracker1 This is answered in the GPL FAQ.
    – Brandin
    Feb 18, 2020 at 14:08
  • @Brandin seems like if the webasm would most closely resemble simple execution/fork since it's not really sharing internalized data structures, but passing in values (file contents) whole, as would a simple fork/exec. So an app that uses the webasm as a plugin shouldn't need to be GPL to use the wasm, assuming separate install (optionalDependencies)
    – Tracker1
    Feb 21, 2020 at 16:35

1 Answer 1


If the library is under GPL, anything linking to it must be GPL per FSF's interpretation that linking creates a derivative work. That hasn't been tested in court, so...

You can ship code (or object only) program under non-GPL, and ask the user to do the linking. They can do as they please, so it wouldn't be an overt violation of GPL, which only restricts distribution while allowing you to do as you please in private. But FSF contends that just creating said program that can only be linked to the GPL library is derivative of the library... even less court tested.

See e.g. the readline library (GPL) and its replacement libedit (BSD-like), where the second one was written to sidestep the above restriction.

  • My question is, what constitutes linking? If I write a program that calls grep (assuming grep is/was gpl), is my program now GPL?
    – Tracker1
    Feb 18, 2020 at 5:02
  • @Tracker1: only a court can answer to that question. The FSF has its own answer Feb 18, 2020 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.