guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How best to produce a standalone executable with Guile?


From: Matt Wette
Subject: Re: How best to produce a standalone executable with Guile?
Date: Sun, 5 Apr 2020 07:44:18 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 4/4/20 10:28 PM, James Cooper wrote:
Hi Guile folks,

I am currently experimenting with a handful of languages that include
modern implementations of Concurrent ML, to determine which one appears
best able to handle computationally- and message-heavy workloads (at least
for my purposes, Computer Vision).  Guile is one of the languages I am
trying out with the Fibers library.

My question is, how can I best go about creating Linux executables from
Guile, where said programs benefit from the most ahead-of-time compilation
and optimisation possible?  I don't believe they strictly need to be
standalone, as the environment I will be running the programs in will
likely be the same as the development environment. So they can undoubtedly
have dependencies on external libraries.  Furthermore, I am perfectly happy
with the process being a bit convoluted, as I can easily automate it with a
makefile.  I would, however, prefer if at all possible that the option to
target other processor architectures remains available down the line (I
assume using GCC can enable this, but I'm not sure).

[...]
You can't produce a pre-compiled machine code binary of your guile
program.  I believe you can use the environment variable
GUILE_JIT_THRESHOLD set to zero to have your code compiled to
machine code on first use.

$ GUILE_JIT_THRESHOLD=0 guile my-program.scm

You can also start execution of your guile program from C using
the techniques described in the section "Programming in C" in the
Guile Reference Manual.

Matt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]