On Sat, Jun 11, 2016 at 10:31 PM, Antti Kantee <[email protected]> wrote:
> On 11/06/16 16:54, Neeraj Sharma wrote:
>>>
>>> I don't quite follow why dynamically loading something is necessary. Why
>>> can't you link the objects into the binary before you run it?
>>>
>>
>> The design of dynamically loading is to enable clean design and not
>> force user to recompile the Erlang VM for their custom NIFs (or C
>> code). It can be argued that for Rumprun this design be broken, but
>> that will be too intrusive to the base design. I am in the process of
>> understanding and brainstorming if at all this could be done in the
>> least intrusive way, but having said that I want to go down the path
>> of dynamic loadable objects within the Rumprun unikernel as well.
>
>
> The good thing about using clean design as an argument is that you can
> justify anything with it ;)
>
> Snarkiness aside, you don't need compile anything, you need to link things.
> As it happens, for Rumprun you need to link things anyway after you've built
> the binary.  Try to link your NIFs at the bake-stage, see where it gets you,
> and then we can figure out how to turn your experiment into clean design.
>

Interestingly there appears to be an option within the Erlang build
system to allow static linking of NIFs (somewhere hidden inside the
docs). I guess, so I was incorrect in assuming that it would be a lot
of work to get static linking in place :)
Having said that it will be nice to dig into the the other path as
well though probably a little later.

-Neeraj

Reply via email to