File tree Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Expand file tree Collapse file tree 3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ must therefore link to all of them at build time.
1818
1919The paths to the libraries are discovered using ` pkg-config ` - make sure they
2020are discoverable in this way on your system. Our build script looks for
21- ` tss2-esys ` , ` tss2-tctildr ` and ` tss2-mu ` . A minimum version of ` 4.1.3 ` is
22- required for all of them.
21+ ` tss2-sys ` , ` tss2- esys` , ` tss2-tctildr ` and ` tss2-mu ` . A minimum version of ` 4.1.3 ` is
22+ required for all of them. On windows ` tss2-tcti-tbs ` is also required.
2323
2424Having installed the open-source implementation libraries at ` /usr/local/lib ` (by default), it
2525might happen that ` pkg-config ` can not find them. Run the following command if that is the
@@ -51,8 +51,12 @@ environment variable `TPM_TSS_SOURCE_PATH` or it will be retrieved from
5151Github during the build. The version to retrieve can be controlled by setting
5252the ` TPM2_TSS_SOURCE_VERSION ` environment variable.
5353[ !IMPORTANT]
54- On windows it might be necessary to manually create the VERSION file
55- when a local source is being used.
54+ * The ` bundled ` feature will make it possible to build the crate without
55+ having to worry about the ` tpm2-tss ` library dependencies. But it is still
56+ necessary to make the shared libraries available to the executable that uses
57+ the library.
58+ * On windows it might be necessary to manually create the VERSION file
59+ when a local source is being used.
5660
5761To enable this feature:
5862
Original file line number Diff line number Diff line change @@ -869,10 +869,8 @@ pub mod tpm2_tss {
869869 "release" => "Release" ,
870870 _ => panic!( "Unknown cargo profile: {}" , profile) ,
871871 } ;
872- println!(
873- "cargo:rustc-link-search=dylib={}" ,
874- _source_path. join( "x64" ) . join( build_string) . display( )
875- ) ;
872+ let lib_out_path: PathBuf = _source_path. join( "x64" ) . join( build_string) ;
873+ println!( "cargo:rustc-link-search=all={}" , lib_out_path. display( ) ) ;
876874 }
877875 }
878876 }
Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ The crate currently offers the following features:
3535* ` rustcrypto-full ` (disabled by default) - provides conversion from all
3636 supported elliptic curves, rsa or hashes.
3737 Support for individual hash, rsa or curves can be pulled individually.
38+ * ` bundled ` - Downloads, builds and dynamically links against the tpm2-tss libraries.
39+ This means that the executable using the crate needs to have the tpm2-tss shared
40+ libraries available to the executable. This can be achieved by copying the shared libraries
41+ to the same folder as the executable or by adding the path to them to the appropriate environmental
42+ variable e.g. ` LD_LIBRARY_PATH ` , ` DYLD_FALLBACK_LIBRARY_PATH ` or ` PATH ` .
3843
3944## Cross compiling
4045
You can’t perform that action at this time.
0 commit comments