Skip to content

Commit c92ac39

Browse files
committed
README cleanup
1 parent 6f99d8b commit c92ac39

1 file changed

Lines changed: 17 additions & 21 deletions

File tree

README.md

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,20 @@ This project regularly builds the latest available vcpkg version of the followin
3333
* `com.ensody.nativebuilds:zstd`: headers and static library
3434

3535
The artifacts are published to Maven Central, so they can be easily consumed by Gradle and Kotlin Multiplatform projects.
36+
A Gradle plugin is also provided to simplify the integration of the header files.
37+
38+
Apart from being easier to integrate, this project helps you stay up to date.
39+
The NativeBuilds automatically publish new versions to Maven Central.
40+
Tools like Dependabot can notify you of version updates coming from NativeBuilds.
41+
For security critical libraries like OpenSSL this automation is very helpful and important.
42+
43+
If you're a library author:
44+
This project also allows consumers of your library to update the underlying native library without you having to publish a new version of your own library.
45+
Each static library (e.g. OpenSSL) is packaged like any other Kotlin module, so the normal Gradle dependency resolution rules apply.
46+
It's even possible to substitute the static library with a debug version.
47+
48+
Finally, this project allows sharing/reusing the same underlying static library (e.g. OpenSSL or libcurl) in different projects.
49+
For example, cryptography-kotlin could depend on libcrypto.a and Ktor's Curl engine could also depend on libcrypto.a (and libssl.a and libcurl.a) without causing duplication or symbol conflicts.
3650

3751
## Usage
3852

@@ -80,16 +94,16 @@ kotlin {
8094
api(libs.openssl.libcrypto)
8195
}
8296

83-
// If you need direct access to the libcrypto/OpenSSL API you have to activate cinterop for the OpenSSL header files
97+
// If you need direct access to the libcrypto/OpenSSL API you have to activate cinterop
98+
// for the OpenSSL header files.
8499
// Note: for zstd you'd use the libs.zstd both here and in sourceSets.nativeMain.
85100
cinterops(libs.openssl.raw) {
86101
definitionFile.set(file("src/nativeMain/cinterop/openssl.def"))
87102
}
88-
89103
}
90104
```
91105

92-
Create `src/nativeMain/cinterop/openssl.def`, but focus only on the headers (the native .a is already part of `api(libs.openssl.libcrypto)` above:
106+
Create `src/nativeMain/cinterop/openssl.def`, but focus only on the headers. The native .a is already part of `api(libs.openssl.libcrypto)` above.
93107

94108
```
95109
package = my.package.openssl
@@ -100,24 +114,6 @@ headers = openssl/evp.h \
100114
openssl/encoder.h \
101115
openssl/decoder.h \
102116
openssl/ec.h
103-
noStringConversion = OSSL_PARAM_construct_double \
104-
OSSL_PARAM_construct_int \
105-
OSSL_PARAM_construct_int32 \
106-
OSSL_PARAM_construct_int64 \
107-
OSSL_PARAM_construct_long \
108-
OSSL_PARAM_construct_size_t \
109-
OSSL_PARAM_construct_time_t \
110-
OSSL_PARAM_construct_uint \
111-
OSSL_PARAM_construct_uint32 \
112-
OSSL_PARAM_construct_uint64 \
113-
OSSL_PARAM_construct_ulong \
114-
OSSL_PARAM_construct_BN \
115-
OSSL_PARAM_construct_utf8_string \
116-
OSSL_PARAM_construct_utf8_ptr \
117-
OSSL_PARAM_construct_octet_string \
118-
OSSL_PARAM_construct_octet_ptr \
119-
OSSL_ENCODER_CTX_new_for_pkey \
120-
OSSL_DECODER_CTX_new_for_pkey
121117
compilerOpts = -DOPENSSL_NO_DEPRECATED
122118
```
123119

0 commit comments

Comments
 (0)