-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add feature flag for enabling Mbed TLS support #39
Conversation
547b743
to
3c37b42
Compare
3c37b42
to
7324b76
Compare
7324b76
to
bd2e989
Compare
We should eventually revisit this decision. We could try to move the bundled source code into separate crates to reduce the crate size when encryption support is not actually needed. |
enum Encryption { | ||
MbedTls, | ||
OpenSsl, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and other parts of the code prepare for the eventual introduction of OpenSSL support as well, but for now I am reluctant to enable this because it requires further tests—and we can probably not bundle OpenSSL as well, so that the set of target platforms will probably be a reduced on, on a best-effort basis. Not ideal.
Sound like a plan. The size of this crate is already huge. How much does the package size increase when adding mbed TLS? |
bd2e989
to
2e43470
Compare
So we are more or less doubling the package size. |
Adding this feature is convenient. But is it worth the huge increase in package size? Each update of either |
That is correct. My plan is to integrate encryption support first in a way that works, then look for any other issues that we might need to solve to get encrypted OPC UA communication working in Rust. When this sort-of proof of concept is okay, we can try to split off the bundled source code into separate crates.1 Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's start with this baseline.
## Description This is a follow-up to #39 and includes additional bindings, some of which are only available with feature flag `mbedtls`.
Description
This adds a feature flag
mbedtls
that builds open62541 with Mbed TLS support for encryption. We bundle the Mbed TLS sources alongside the sources of open62541 to support all existing build targets.