From ef52def4a8115a862743e8a7945b1d4240959d42 Mon Sep 17 00:00:00 2001 From: swrup Date: Thu, 12 Mar 2026 12:29:50 +0100 Subject: [PATCH] --- dune | 1 + dune-workspace | 7 +++++++ src/devices.ml | 4 ++-- src/dune | 22 ++++++++++++++++++++-- src/manifest.json | 1 + 5 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 dune create mode 100644 dune-workspace create mode 100644 src/manifest.json diff --git a/dune b/dune new file mode 100644 index 00000000..07287393 --- /dev/null +++ b/dune @@ -0,0 +1 @@ +(vendored_dirs vendors) diff --git a/dune-workspace b/dune-workspace new file mode 100644 index 00000000..3d54f458 --- /dev/null +++ b/dune-workspace @@ -0,0 +1,7 @@ +(lang dune 3.0) +(context (default)) +(context (default + (name solo5) + (host default) + (toolchain solo5) + (disable_dynamically_linked_foreign_archives true))) diff --git a/src/devices.ml b/src/devices.ml index 6a37b593..6173478a 100644 --- a/src/devices.ml +++ b/src/devices.ml @@ -1,5 +1,5 @@ -let db_connection caqti_switch : (unit, Caqti_miou.connection) Vifu.Device.device - = +let db_connection caqti_switch : + (unit, Caqti_miou.connection) Vifu.Device.device = let f () = let db_uri = Config.Exchangedb_postgres.config in match Caqti_miou_unix.connect ~sw:caqti_switch db_uri with diff --git a/src/dune b/src/dune index 0a6fa0ea..8eebeb9d 100644 --- a/src/dune +++ b/src/dune @@ -1,8 +1,11 @@ (executable - (public_name mte) (name mte) (modules mte) - (libraries mte)) + (link_flags :standard -cclib "-z solo5-abi=hvt") + (libraries mte) + (foreign_stubs + (language c) + (names manifest))) (library (name mte) @@ -43,3 +46,18 @@ (with-stdout-to %{null} (run ocaml-crunch -m plain ../assets -o %{target})))) + +(rule + (targets manifest.c) + (deps manifest.json) + (enabled_if + (= %{context_name} "solo5")) + (action + (run solo5-elftool gen-manifest manifest.json manifest.c))) + +(rule + (targets manifest.c) + (enabled_if + (= %{context_name} "default")) + (action + (write-file manifest.c ""))) diff --git a/src/manifest.json b/src/manifest.json new file mode 100644 index 00000000..31af9131 --- /dev/null +++ b/src/manifest.json @@ -0,0 +1 @@ +{"type":"solo5.manifest","version":1,"devices":[]}