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

Use libloading to load the TSS libraries #14

Closed
hug-dev opened this issue Dec 13, 2019 · 2 comments · Fixed by #16
Closed

Use libloading to load the TSS libraries #14

hug-dev opened this issue Dec 13, 2019 · 2 comments · Fixed by #16
Labels
enhancement New feature or request

Comments

@hug-dev
Copy link
Member

hug-dev commented Dec 13, 2019

We currently link the TSS libraries at compile time, it would be nice to be able to load them at runtime, through a constructor option.
There could be a feature flag to choose one of the two options.

@hug-dev hug-dev added the enhancement New feature or request label Dec 13, 2019
@hug-dev hug-dev added this to the Rust tss-esapi v1.0 milestone Dec 13, 2019
@hug-dev
Copy link
Member Author

hug-dev commented Dec 13, 2019

I am thinking of doing this using pkg-config:

  • pkg-config helps us find the library and header files on the system
  • bindgen generates a binding files for those header files
  • we list (by-hand) the function pointers types and symbol names that we want to dynamically load
  • the build script sets up an environment variable for the TSS libraries location so that the constructors can read it to load them

@hug-dev
Copy link
Member Author

hug-dev commented Dec 13, 2019

It would actually be a better idea to just have the pkg-config library finding but to still dynamically link it at compile time.
It makes little sense for this crate to use libloading as of today.

tgonzalezorlandoarm pushed a commit to tgonzalezorlandoarm/rust-tss-esapi that referenced this issue Mar 14, 2024
Various improvements of the service internals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant