libheif-rs
libheif-rs copied to clipboard
statically linking libheif
Hi, and thank you for this great library!
I am trying to statically link libheif to make distribution of my program easier and not have the user install libheif individually. Is there a recommended or even built-in way of doing so?
I'm afraid, I don't know how to do it. I've never done it before.
Hi, and thank you for this great library!
I am trying to statically link libheif to make distribution of my program easier and not have the user install libheif individually. Is there a recommended or even built-in way of doing so?
I'm pretty new to rust but doesn't rust embed libraries in executable at build time?
I'm pretty new to rust but doesn't rust embed libraries in executable at build time?
C libraries are manually dynamically linked. This has nothing to do with how rust crates work.
How to support compiling into wasm?
How to support compiling into wasm?
According to the Internet it is a very painful task.
Also you have to consider that libheif
is licensed under LGPL v3.
So if you want to distribute a combined work, you'll have to use the following license:
- statically linked:
- Either you must release both parts as LGPL.
- Or provide everything that allow the user to relink the application with a different version of the LGPL source code. In this case the other requirements are the same as if it was dynamically linked.
- dynamically linked: LGPL code stays LGPL, you can keep the proprietary code proprietary.
Source - https://stackoverflow.com/a/10179181
Hi, and thank you for this great library!
I am trying to statically link libheif to make distribution of my program easier and not have the user install libheif individually. Is there a recommended or even built-in way of doing so?
@woelper Did you succeed in statically linking libheif ?
Not completely. I managed to get some success on windows, but not on other platforms.
I know this is not Rust, but someone got it working by compiling libheif to WASM using emscripten and running it that way https://github.com/jerbob92/goheif/blob/feature/webassembly/libde265/libde265.go
Thanks to this guy, now my mom can access her photos
Also you have to consider that libheif is licensed under LGPL v3.
@Cykooz, has the license changed since then, or did I miss something?
C.f. libheif/README.md#license
The libheif is distributed under the terms of the GNU Lesser General Public License. The sample applications are distributed under the terms of the MIT License.
has the license changed since then, or did I miss something?
GNU Lesser General Public License - LGPL. Nothing has changed.