An Mbed-TLS wrapper for Nim, fully integrated with the Nim build system.
Applications using nim-mbedtls
are fully stand-alone, needing no additional DLL or shared library.
For now, the library is just a wrapper which exposes the raw C functions of mbedtls.
For each mbedtls
header file, a corresponding Nim file exists - ssl.h
~ mbedtls/ssl.nim
.
# You can import the whole library
import mbedtls
# ... or simply parts thereof, which can save compilation time
import mbedtls/ssl
You can install the development version of the library through nimble with the following command:
nimble install https://github.com/status-im/nim-mbedtls.git
Mbed-TLS
itself is compiled as part of your project - there is no need to install any third-party libraries.
There is some things left to do. In no particular order:
- Create a wrapper more convenient to use in Nim (ie without all the pointer cast for example)
- Add a script to regenerate the .nim files using
c2nim
ornimterop
- Add a CI with some tests
- Add
nim-mbedtls
to the nimble packages
Licensed and distributed under either of
- MIT license: LICENSE-MIT or http://opensource.org/licenses/MIT
or
- Apache License, Version 2.0, (LICENSE-APACHEv2 or http://www.apache.org/licenses/LICENSE-2.0)
at your option. This file may not be copied, modified, or distributed except according to those terms.