From 7502758c3f9d1745b4cc30fafc5670e275c7af66 Mon Sep 17 00:00:00 2001 From: Mason Protter Date: Fri, 10 Nov 2023 23:37:24 +0100 Subject: [PATCH] note about compile_shlib --- src/StaticCompiler.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/StaticCompiler.jl b/src/StaticCompiler.jl index 0d5a740..d38fe72 100644 --- a/src/StaticCompiler.jl +++ b/src/StaticCompiler.jl @@ -129,6 +129,8 @@ compile_shlib(funcs::Array, [path::String="./"]; filename="libfoo", demangle=tru ``` As `compile_executable`, but compiling to a standalone `.dylib`/`.so` shared library. +Arguments and returned values from `compile_shlib` must be native objects such as `Int`, `Float64`, or `Ptr`. They cannot be things like `Tuple{Int, Int}` because that is not natively sized. Such objects need to be passed by reference instead of by value. + If `demangle` is set to `false`, compiled function names are prepended with "julia_". ### Examples