split modules in library/executable

This commit is contained in:
swrup 2026-03-20 23:08:55 +01:00 committed by Swrup
parent 87f06339c8
commit 176c7cfa2b
4 changed files with 67 additions and 27 deletions

View file

@ -211,10 +211,6 @@ module Coin = struct
let all_coins = List.map parse_coin coin_sections let all_coins = List.map parse_coin coin_sections
end end
let spath s =
let open Fat.Spath in
match of_string s with Error (`Msg e) -> fail "%s" e | Ok v -> v
module Exchange_secmod_rsa = struct module Exchange_secmod_rsa = struct
let get field = let get field =
let section = "taler-exchange-secmod-" ^ "rsa" in let section = "taler-exchange-secmod-" ^ "rsa" in

View file

@ -1,17 +1,23 @@
(executable (executable
(name mte) (name mte)
(modules mte) (modules
fat
global
headers
respond
pg_type
pg
mte
mte_terms
mte_info
mte_management
secmod_eddsa
secmod_rsa
keys
log_reporter)
(link_flags :standard -cclib "-z solo5-abi=hvt") (link_flags :standard -cclib "-z solo5-abi=hvt")
(libraries mte)
(foreign_stubs
(language c)
(names manifest)))
(library
(name mte)
(wrapped false)
(modules :standard \ mte b32)
(libraries (libraries
mte
; ;
mkernel mkernel
mnet mnet
@ -26,23 +32,53 @@
mirage-ptime.solo5 mirage-ptime.solo5
mfat mfat
; ;
b32
;
caqti caqti
caqti-miou caqti-miou
caqti-mnet caqti-mnet
caqti-driver-pgx caqti-driver-pgx
pgx pgx
; ;
bin )
jsont (foreign_stubs
cohttp ; just for header stuff (language c)
duration (names manifest)))
kdf.hkdf
digestif (library
(name mte)
(wrapped false)
(modules
syntax
amount
libtool_version
time
assets_crunch
assets
hash
eddsa
rsa
signkey
denomination
config_parser
config
taler_signatures
signatures
api)
(libraries
b32
;
fmt fmt
logs logs
logs.fmt)) logs.fmt
bin
caqti
jsont
jsont.bytesrw
digestif
kdf.hkdf
mirage-crypto-ec
mirage-crypto-pk
fpath
cohttp))
(library ; crockford base32 (library ; crockford base32
(name b32) (name b32)

View file

@ -24,9 +24,13 @@ module Spath = Mfat.Spath
module Cfg = struct module Cfg = struct
include Config.Exchange_secmod_eddsa include Config.Exchange_secmod_eddsa
let to_spath s =
let open Fat.Spath in
match of_string s with Error (`Msg e) -> Fmt.failwith "%s" e | Ok v -> v
(* 8.3 filenames for FAT *) (* 8.3 filenames for FAT *)
let key_dir = Config.spath "/EDDSA" let key_dir = to_spath "/EDDSA"
let sm_key = Config.spath "/SM_EDDSA" let sm_key = to_spath "/SM_EDDSA"
end end
type key = { type key = {

View file

@ -27,8 +27,12 @@ end
module Cfg = struct module Cfg = struct
include Config.Exchange_secmod_rsa include Config.Exchange_secmod_rsa
let key_dir = Config.spath "/RSA" let to_spath s =
let sm_key = Config.spath "/SM_RSA" let open Fat.Spath in
match of_string s with Error (`Msg e) -> Fmt.failwith "%s" e | Ok v -> v
let key_dir = to_spath "/RSA"
let sm_key = to_spath "/SM_RSA"
let coin_config_list = List.map Coin_config.of_coin Config.Coin.all_coins let coin_config_list = List.map Coin_config.of_coin Config.Coin.all_coins
let get_coin_config ~section_name = let get_coin_config ~section_name =