couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randall Leeds <>
Subject Re: NIFs and pre-R14B Erlang
Date Fri, 25 Mar 2011 17:38:20 GMT
On Fri, Mar 25, 2011 at 08:35, Filipe David Manana <> wrote:
> Actually with just a minimal change in encode.c, that NIF works in R13B04.
> I made an attempt to make it work under R13B03 as well but haven't succeed:
> Making the stubs call mochijson2 would be ok as well.
> +1 for introducing NIFs in trunk.

+1 here as well.

> On Fri, Mar 25, 2011 at 6:49 AM, Damien Katz <> wrote:
>> Nice. Reading that it looks like at runtime init code can check the Erlang
>> version and not attempt to load the nif library on Erlang old versions,
>> falling back to pure erlang code there. Cool.
>> So then the only remaining problem is the compiling and linking on the
>> older Erlangs where nifs aren't available or are incompatible. We'll need
>> to add something to the build system to deal with that so we don't get
>> build failures.

I've got the build system down pretty well at this point. A month or
so ago I made a bunch of patches to it that I need to rebase and clean
up for trunk anyway.
I'll spend some time this weekend cleaning up what I've already done
to get it ready for inclusion and then see about exposing the Erlang
version as a flag to make.
It should be some simple autotools stuff. It may be as easy as just
not compiling the NIF on an older Erlang (easy with make and

I expect if the native library isn't found the Erlang implementations
will take over, so long as we use an Erlang version that knows how to
deal with NIFs at all.
What version is that, BTW?


View raw message