Mbed-TLS / TF-PSA-Crypto

Reference implementation of the PSA Cryptography API
Apache License 2.0
7 stars 6 forks source link

Requirements for the build system #106

Open gilles-peskine-arm opened 2 weeks ago

gilles-peskine-arm commented 2 weeks ago

Write a requirements document for the build system.

Consider both the perspective of users and the perspective of maintainers.

Mailing list thread: https://lists.trustedfirmware.org/archives/list/mbed-tls@lists.trustedfirmware.org/thread/3HMNORCDGREUPE7XSTD2CKXFRZJXL36O/


Reasons why we're thinking about the build system:


Our primary high-level requirements:

chad-earthscope commented 2 weeks ago

First, I really appreciate finding mbedtls; open, non-viral licensed, trusted, portable, embeddable TLS libraries are few and far between. Especially ones that are actively and professionally maintained. Thank you.

My use case is is to include mbedtls in other open source client library and server implementations that are generally expected to be buildable on unix/Linux/macOS/BSDs and Windows. Therefore I do not have a "platform" or a "application" (for the library case) , or requirements for security of my own.

Regarding build system requirements, I usually speak the lowest common denominator for all systems. For the Unix-like cases the gnu makesfiles are great and match my projects cases, for which cmake would be an anomalous new dependency (and not often installed by default on systems, so a significant barrier for users that are not sysadmins). For Windows I am currently trying to figure out a method for a clean build that runs cmake from NMake, which is what my projects are using and I have one major use cases for a system that is all NMake. This is non-ideal combination. At least in windows if you have NMake installed you usually have cmake also. My ideal scenario is that you provide NMake makefiles as well, though I understand this is unlikely.

Some additional feedback based on my use cases: Regarding the build config and as a non TLS or security expert, I do not want to make decisions about detailed features. I would much rather let you all decide what reasonable defaults should be according to best practice, etc. So direct, easy ways to build TLS+crypto+509 libraries with no extras or uncommon dependencies, and sane defaults for common client and server use cases would be great.

A build system that requires python, perl, or even cmake, which are not always present, is a major dependency/barrier for systems that do have them, and therefore effecting portability. I imagine this might be one of the reasons to focus on cmake as the one solution. Unfortunately cmake is a pain for including in projects that are not already using cmake.

Thanks again for this work!