unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* How best to produce a standalone executable with Guile?
@ 2020-04-05  5:28 James Cooper
  2020-04-05 14:44 ` Matt Wette
  2020-04-07  9:31 ` James Cooper
  0 siblings, 2 replies; 5+ messages in thread
From: James Cooper @ 2020-04-05  5:28 UTC (permalink / raw)
  To: guile-user

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).

I have looked at all the sections of the Guile manual that appeared
relevant, but to be honest I'm still a bit confused about what the best
approach would be.  *s* *9.4.5 Bytecode* in the manual seems to suggest
that one can use guild to produce what will be a standalone executable that
looks like an ELF binary to the system and runs on the Guile VM, but I'm
entirely sure if I am reading it correctly.  *s 6.18.5 Compiling Scheme
Code* also discusses compilation but seems to denounce the practice
explicitly.  *s 9.3.8 Just-In-Time Native Code* talks about JIT compilation
to native code for a given target.  Is it possible to apply this process
ahead-of-time?

A potential alternative approach I can see is using the capabilities of
running Guile code in a C program (compiled with GCC).  This would
presumably involve creating a template C program that just calls the
appropriate Guile functions and passes the relevant command line parameters
in.

Any thoughts on what would likely produce the most efficient executable in
the end?  The target programs do not need to modify themselves at run-time
(or really do anything dynamic) if that makes a difference.  And does
anyone know of pre-existing examples they could point me to?  Please do let
me know if there is further information I could provide that would help.
Thanks in advance.

Regards,

James


^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <mailman.85.1586102413.15610.guile-user@gnu.org>]

end of thread, other threads:[~2020-04-07 21:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-05  5:28 How best to produce a standalone executable with Guile? James Cooper
2020-04-05 14:44 ` Matt Wette
2020-04-07  9:31 ` James Cooper
2020-04-07 21:30   ` Arne Babenhauserheide
     [not found] <mailman.85.1586102413.15610.guile-user@gnu.org>
2020-04-05 17:19 ` Christopher Howard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).