Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPL license of Zokrates standard library #1370

Open
jswalens opened this issue Apr 8, 2024 · 0 comments
Open

GPL license of Zokrates standard library #1370

jswalens opened this issue Apr 8, 2024 · 0 comments

Comments

@jswalens
Copy link

jswalens commented Apr 8, 2024

I have a question regarding the license of the ZoKrates standard library. Not sure if this is the right place to ask, feel free to direct me elsewhere. (I already asked on Gitter, but did not receive a reply.)

Abstract

The ZoKrates standard library is released under LGPLv3, like the rest of the compiler. Does that mean that, when any ZoKrates program that uses the stdlib is distributed, it needs to be open sourced? Is this intentional?

Details

If I understand correctly, the LGPL requires a program that includes an LGPL library to either:

  1. Supply the source or object code of the whole program in such a way that the library can be swapped with a modified version of the library.
  2. Use the LGPL library as a "shared library", e.g. using dynamic linking. (So that the library can be swapped with a modified version, without needing the source or object code of the whole program.)

(See Section 4 point d) of the LGPL, or https://softwareengineering.stackexchange.com/a/86158.)

If I compile a ZoKrates program to an executable, all dependencies are "statically linked" into the final executable, i.e. there's just one executable that contains the compiled version of both my code and the stdlib code. There's no way in ZoKrates to "separate out" the calls to the stdlib. So we cannot do option (2) in ZoKrates.

For option (1), I also cannot provide "object code", as there's no such notion in ZoKrates (I think)?

Hence, if I compile a ZoKrates program that uses the stdlib to an executable, and distribute the executable to anyone, I need to give them the whole source code of my program as well (if I understand the LGPL correctly).

My main question is: is this the intention? In my opinion, it would make more sense to put the standard library under a more permissive license. (This does not necessarily mean the whole project needs to be under that license.)

For comparison, Python is licensed under a specific license that allows use of the standard library without requiring source code to be released. The Rust language and its stdlib is dual-licensed under Apache-2.0 & MIT, Go & its stdlib is licensed under BSD 3-clause -- which also allow their std libs to be used without requiring source code to be released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant