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

statically linking libheif #20

Open
woelper opened this issue Feb 26, 2024 · 7 comments
Open

statically linking libheif #20

woelper opened this issue Feb 26, 2024 · 7 comments

Comments

@woelper
Copy link

woelper commented Feb 26, 2024

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?

@Cykooz
Copy link
Owner

Cykooz commented Feb 26, 2024

I'm afraid, I don't know how to do it. I've never done it before.

@neckaros
Copy link

neckaros commented Mar 3, 2024

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?

@sophie-h
Copy link

sophie-h commented Mar 3, 2024

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.

@JokerAJP
Copy link

JokerAJP commented Mar 4, 2024

How to support compiling into wasm?

@Cykooz
Copy link
Owner

Cykooz commented Apr 23, 2024

How to support compiling into wasm?

According to the Internet it is a very painful task.

@Cykooz
Copy link
Owner

Cykooz commented May 12, 2024

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

@neckaros
Copy link

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 ?

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

5 participants