Hi Jan,

Thanks, one of my first attempts https://github.com/garrensmith/fortuna was
embedding v8 as a nif. It was my first nif and the implementation is wrong,
but it did prove it was possible and something we could consider going
forward. The one thing I'm not 100% sure of is moving V8 across threads.
Paul and I have had a discussion around that and we can't find good
evidence on whether moving V8 across threads is a good or bad idea. I
happened to speak to Ryan Dahl about it in the deno discord channel and he
recommended against it. I think a good starting point would be to use
https://github.com/rusterlium/rustler to create a nif and then use some of
the code from fortuna.

Also, I'm not sure embedding Deno would work. The Deno isolate is designed
to run in an async environment, so I think rather using standard v8 would
be better.

Cheers
Garren

On Wed, Jun 24, 2020 at 5:33 PM Jan Lehnardt <j...@apache.org> wrote:

> Congrats Garren, this is really cool! :)
>
> One related question: have you pondered embedding a JS engine into Erlang
> itself as well?
>
> Best
> Jan
> —
>
> > On 24. Jun 2020, at 16:21, Garren Smith <gar...@apache.org> wrote:
> >
> > Hi All,
> >
> > I've been playing around with the rust language quite a bit recently and
> > using it to write some rust related side projects. I've recently
> finished a
> > CouchDB View Server written in Rust using V8. Here is a blog post about
> > that details the new View Server protocol for CouchDB 4.x and my Rust
> > implementation
> > https://www.garrensmith.com/blogs/fortuna-rs-couchdb-view-server
> >
> > A few weeks back I also wrote about a miniCouchDB implementation I wrote
> in
> > Rust during a Cloudant Hack week.
> > https://www.garrensmith.com/blogs/mini-couch-hack-week
> >
> > Cheers
> > Garren
>
>

Reply via email to