the way osv.io works : the system doesn't have a userspace. there's a
single memory address space in which the system boots, and at the end of
the init, the only OS process makes a call to the "main" function of the
shared library that has been added to the system. it's not able to spawn
any new process as there's only one memory address space.

almost any program that is written in C and doesn't fork nor spawn is
runnable on OSV as long as you compile it with -fPIC and as a shared lib.

a lot of tools have been ported to osv (
https://github.com/cloudius-systems/osv-apps )
and i see a way to add racket to it.

but what i'd really like is to have the raco exe output as a shared
library. that way, i think i can port it to osv.

OR, maybe use the raco distribute output, in conjunction with a racket
binary compiled as a shared lib. + the racket source file of a project.








bitmessage address: BM-2cTD49oR1Xwu28XswZoh4qRMeeQwpUYvhY

On Wed, May 20, 2015 at 3:52 PM, Matthew Flatt <mfl...@cs.utah.edu> wrote:

> As you say, you can build the Racket executable using shared libraries
> by configuring with `--enable-shared`. Then, when you create an
> executable with `raco exe`, you end up with a smaller executable that
> refers to the shared libraries.
>
> I'm not sure how much that will save, since an executable created by
> `raco exe` is mostly bytecode (I think). Maybe those savings are not
> the point for osv.io, if somehow it matters that other pieces are
> shared libraries. Also, `raco distribute` will always include a copy of
> the shared libraries, but probably they would be easy to remove.
>
> At Tue, 19 May 2015 07:06:36 -0700 (PDT), yann degat wrote:
> > Hi
> >
> > i wonder if it could be quite straight forward to build a binary file
> with the
> > "raco exe" as a shared library with Position Independent Code ?
> >
> > I'd like to be able to build osv.io qemu images from racket projects.
> > It would be a pretty damn killer feature.
> > osv.io is some kind of a unikernel technology that allows you to build
> 8Mo
> > virtual machines to run on top of kvm, xen etc.
> >
> >
> > There could be two ways of doing this :
> >
> > - the first is quite simple : build the "racket" binary as a shared
> library,
> > and embed it in osv, and then run "racket ./myprog.rkt" within the osv
> Virtual
> > machine.
> > But it would require the VM to embed all the racket libraries ( ~300Mo )
> even
> > those which are not used by the program. It's not the "osv.io" way of
> doing
> > things.
> >
> > - the other one would be to use the raco tool to build a shared library
> instead
> > of an "exe" binary. we could then use the "distribute" command to upload
> only
> > the necessary files to the osv.io image.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Racket Users" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email
> > to racket-users+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to