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

65 lines
2.4 KiB
Nim

import
"."/[csources]
{.used.}
const
bearIntPath = bearSrcPath / "int"
{.compile: bearIntPath / "i15_add.c".}
{.compile: bearIntPath / "i15_bitlen.c".}
{.compile: bearIntPath / "i15_decmod.c".}
{.compile: bearIntPath / "i15_decode.c".}
{.compile: bearIntPath / "i15_decred.c".}
{.compile: bearIntPath / "i15_encode.c".}
{.compile: bearIntPath / "i15_fmont.c".}
{.compile: bearIntPath / "i15_iszero.c".}
{.compile: bearIntPath / "i15_moddiv.c".}
{.compile: bearIntPath / "i15_modpow.c".}
{.compile: bearIntPath / "i15_modpow2.c".}
{.compile: bearIntPath / "i15_montmul.c".}
{.compile: bearIntPath / "i15_mulacc.c".}
{.compile: bearIntPath / "i15_muladd.c".}
{.compile: bearIntPath / "i15_ninv15.c".}
{.compile: bearIntPath / "i15_reduce.c".}
{.compile: bearIntPath / "i15_rshift.c".}
{.compile: bearIntPath / "i15_sub.c".}
{.compile: bearIntPath / "i15_tmont.c".}
{.compile: bearIntPath / "i31_add.c".}
{.compile: bearIntPath / "i31_bitlen.c".}
{.compile: bearIntPath / "i31_decmod.c".}
{.compile: bearIntPath / "i31_decode.c".}
{.compile: bearIntPath / "i31_decred.c".}
{.compile: bearIntPath / "i31_encode.c".}
{.compile: bearIntPath / "i31_fmont.c".}
{.compile: bearIntPath / "i31_iszero.c".}
{.compile: bearIntPath / "i31_moddiv.c".}
{.compile: bearIntPath / "i31_modpow.c".}
{.compile: bearIntPath / "i31_modpow2.c".}
{.compile: bearIntPath / "i31_montmul.c".}
{.compile: bearIntPath / "i31_mulacc.c".}
{.compile: bearIntPath / "i31_muladd.c".}
{.compile: bearIntPath / "i31_ninv31.c".}
{.compile: bearIntPath / "i31_reduce.c".}
{.compile: bearIntPath / "i31_rshift.c".}
{.compile: bearIntPath / "i31_sub.c".}
{.compile: bearIntPath / "i31_tmont.c".}
{.compile: bearIntPath / "i32_add.c".}
{.compile: bearIntPath / "i32_bitlen.c".}
{.compile: bearIntPath / "i32_decmod.c".}
{.compile: bearIntPath / "i32_decode.c".}
{.compile: bearIntPath / "i32_decred.c".}
{.compile: bearIntPath / "i32_div32.c".}
{.compile: bearIntPath / "i32_encode.c".}
{.compile: bearIntPath / "i32_fmont.c".}
{.compile: bearIntPath / "i32_iszero.c".}
{.compile: bearIntPath / "i32_modpow.c".}
{.compile: bearIntPath / "i32_montmul.c".}
{.compile: bearIntPath / "i32_mulacc.c".}
{.compile: bearIntPath / "i32_muladd.c".}
{.compile: bearIntPath / "i32_ninv32.c".}
{.compile: bearIntPath / "i32_reduce.c".}
{.compile: bearIntPath / "i32_sub.c".}
{.compile: bearIntPath / "i32_tmont.c".}
{.compile: bearIntPath / "i62_modpow2.c".}