nim-bearssl/bearssl.nim
Jacek Sieka c4aec8b664
split decls into separate modules in bearssl/abi (#27)
* split `decls.nim` into smaller modules - allows using parts of the ABI
without compiling all of `bearssl`
* deprecate functions with `Br` prefix - there are duplicate exports
both with and without `Br` for the same function and we use both in
consumers like `chronos` and `libp2p`
* fix several cases of incorrectly mapped types
* use `var` for certain arguments that can't be `nil`
* add script to regenerate ABI with `c2nim`
* consistently use `uint` for length (`int` was sometimes used)

The Split likely needs more cleanup work - this is a first cut to get
the idea in place.

In the new layout, `bearssl/abi/` contains "raw" nim mappings while
hand-written helpers are in `bearssl/`.
2022-06-14 19:33:00 +02:00

33 lines
1.0 KiB
Nim

## Nim-BearSSL
## Copyright (c) 2018-2022 Status Research & Development GmbH
## Licensed under either of
## * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE))
## * MIT license ([LICENSE-MIT](LICENSE-MIT))
## at your option.
## This file may not be copied, modified, or distributed except according to
## those terms.
when defined(bearsslSplitAbi):
# This will become default in the future - we cannot use it now because there
# are duplicate symbols in `decls.nim` - the new ABI can already be accessed
# using the more specific imports (`import bearssl/ssl`)
import
./bearssl/[
aead, blockx, brssl, ec, errors, hash, hmac, kdf, pem, prf, rand, rsa,
ssl, x509],
./bearssl/abi/[cacert, config]
export
aead, blockx, brssl, ec, errors, hash, hmac, kdf, pem, prf, rand, rsa,
ssl, x509,
cacert, config
else:
import
./bearssl/[cacert, errors, decls] # Deprecated, will be removed in the future
export cacert, errors, decls
when defined(nimHasUsed): {.used.}