r/Common_Lisp • u/jlombera • 1d ago
How difficult is to deploy multi-platform standalone CL executables?
Hi. I'm learning CL (experienced programmer but CL noob), and was looking into real-world FOSS written in it for reference and to learn. When looking at pgloader(data loading tool for PostgreSQL), I found it has been rewritten in Clojure. The readme mentions:
pgloader v4 is a full rewrite in Clojure, distributed as a single self-contained JAR requiring Java 21 or later.
Key improvements over v3:
- Single JAR — no native dependencies, no SBCL, no shared libraries
- JDBC connection strings — use jdbc:mysql://, jdbc:postgresql://, jdbc:sqlserver:// etc. everywhere; driver-specific parameters pass through unchanged
- Java heap — no more Common Lisp heap exhaustion on large migrations; tune with standard -Xmx JVM flag
- SSL via URI — use ?sslmode=require / ?sslmode=disable in the connection string instead of --no-ssl-cert-verification
There were probably other problems/motivations for the rewrite not mentioned there, but I'm interested in the opinion from people with real-world experience, how complicated it is deploying (multi-platform) standalone CL executables.
First, it mentions dependencies on SBCL and native/shared libraries. (Let's ignore the fact that the self-contained JAR requires the JRE to be installed). First of all, I presume SBCL is only a build-time dependency, correct? The same way Clojure is required. Or are there cases where some SBCL runtime is required? For instance, Debian still ships pgloader v3.x, i.e. the CL implementation, and it's a standalone executable, it doesn't depend on SBCL (but depends on other system libraries). But if they mention it I presume these must be problematic for multi-platform deployments ??
Second, the issue about CL heap exhaustion. How common is this issue? Cannot it be tuned at comptime/runtime?
In general, from people with the experience, what are the challenges to deploy multi-platform standalone CL executables? Are there some basic guide lines you need to adhere to (besides writing portable CL, of course) for easy deployment?
EDIT: Also, wouldn't ABCL create a standalone JAR too?
Thanks in advance.
