From 8ed4cc43a90906ef8e233399b9d4492ecc72119d Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Tue, 12 Jul 2022 00:35:32 +0100 Subject: [PATCH] Add the spec around loading Serene libs vs generic libs (not completed) --- builder | 4 ++-- docs/spec.org | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/builder b/builder index 1ad441f..c9bbcae 100755 --- a/builder +++ b/builder @@ -77,10 +77,10 @@ CMAKEARGS_DEBUG=("-DCMAKE_BUILD_TYPE=Debug") CMAKEARGS=("-DCMAKE_EXPORT_COMPILE_COMMANDS=ON" "-DSERENE_CCACHE_DIR=$HOME/.ccache") -# shellcheck source=scripts/utils.sh +# shellcheck source=./scripts/utils.sh source "$ME/scripts/utils.sh" -# shellcheck source=scripts/devfs.sh +# shellcheck source=./scripts/devfs.sh source "$ME/scripts/devfs.sh" diff --git a/docs/spec.org b/docs/spec.org index cdd199c..316581f 100644 --- a/docs/spec.org +++ b/docs/spec.org @@ -51,6 +51,20 @@ - If ~def~ is not a top level expression, it will create an ~undef~ global binding which will be set to the ~~ when the execution flow reaches the ~def~ itself. +* Libraries +In terms of static and dynamic libraries, If the library is a Serene library +meaning that it is designed to only work with serene (we will see how in a bit), then +whatever namespaces that it contains will be added to the compiler and all those +namespaces will be map to the library (all the namespaces will point to the same JITDylib). + +But if the library is a generic static or dynamic library a namespace with the same +name as the library minus the suffix will be added to the compiler, for example ~libssh.so~ +will be mapped to ~libssh~ namespace. +** Static + +** Dynamic + +** Object * Unsorted ** Eval Evaluating any form using =eval= will add the form to the namespace containing the