From 270e1cffc37083cd2d88f3a0bc868b5e6e111157 Mon Sep 17 00:00:00 2001 From: Yogthos Date: Thu, 15 Oct 2026 12:38:38 -0400 Subject: [PATCH] Make the kernels native optional, so a binary using lev starts without them A program that links lev and builds for Windows, where no kernels are declared, got a binary that refused to start: jolt took the spec with no archive for the platform as a required runtime library and looked for lev_kernels.dll. Optional, it starts, and lev.tensors/available? is false. --- deps.edn | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/deps.edn b/deps.edn index 3ded3ea..bcd860a 100644 --- a/deps.edn +++ b/deps.edn @@ -25,8 +25,11 @@ ;; blas: Accelerate framework on mac, OpenBLAS elsewhere. ;; `jolt build` links the kernels statically from the archive so the binary ;; is self-contained; run/repl/test load the shared object. By platform, so - ;; a Windows build of a program that uses lev as a library links none. + ;; a Windows build of a program that uses lev as a library links none, and + ;; optional, so that program's binary still starts there, without them: + ;; lev.tensors/available? says whether they loaded. :jolt/native [{:name "lev_kernels" + :optional true :darwin ["native/liblev_kernels.dylib"] :linux ["native/liblev_kernels.so"] :static {:darwin {:archive "native/liblev_kernels.a"}