Live data from Hacker News

Neon: Node plus Rust

calculist.org

31–40 of 71 posts

Re: Neon: Node plus Rust

#31
post #26

Earlier quoted context omitted.

If the goal is having a fast "business-rules engine" coupled to a pretty HTML5-based app-wrapper, one of my own projects is to combine Electron with the Erlang VM. Rather than trying to go whole-hog on linking the two worlds together at a process level, I've just embedded an Erlang release into the Electron package, which decompresses itself to the user's Library/APPDATA dir on Electron startup, transparently registe…

I'm doing the same thing with a JVM. I had to fix the bug where named pipes on Windows were totally busted in Electron before I could make any progress.

Ah, I ran into that problem (I think?) and had been just using regular IP sockets as a stop-gap, planning to switch back over after it was fixed. I'm glad to hear someone with knowledge of Electron internals ran into it as well; I feel bad that I didn't file it as a bug, though.

Re: Neon: Node plus Rust

#32
post #29

This is really cool. I'd love to see a system whereby pure computation modules were also supported in the browser via web assembly.

Me too! :) The possibilities of rustc (which has an LLVM backend) and Emscripten (which consumes LLVM IR) are really interesting.

Agreed! In fact it would also be useful in Node: you could build an almost-full-performance but portable version of a native module as a fallback for clients who don't have the requisite software to build a Neon library (say, one they only indirectly depend on) on their machine.

Re: Neon: Node plus Rust

#33
post #26

Could be killer if combined with electron.

If the goal is having a fast "business-rules engine" coupled to a pretty HTML5-based app-wrapper, one of my own projects is to combine Electron with the Erlang VM. Rather than trying to go whole-hog on linking the two worlds together at a process level, I've just embedded an Erlang release into the Electron package, which decompresses itself to the user's Library/APPDATA dir on Electron startup, transparently registe…

Using Erlang in a desktop application sounds great, do you have any code online somewhere? Or could you make a gist? I would love to see how you made that work.

Re: Neon: Node plus Rust

#34
post #31

Earlier quoted context omitted.

I'm doing the same thing with a JVM. I had to fix the bug where named pipes on Windows were totally busted in Electron before I could make any progress.

Ah, I ran into that problem (I think?) and had been just using regular IP sockets as a stop-gap, planning to switch back over after it was fixed. I'm glad to hear someone with knowledge of Electron internals ran into it as well; I feel bad that I didn't file it as a bug, though.

If you're curious, the fix was here: https://github.com/atom/electron/issues/1968

It made it out into the regular release and I think it's fixed but TBH I haven't tested for a few months.

My work is all on GH here as well: https://github.com/orbitaljs There might be some synergy here between the projects.

Re: Neon: Node plus Rust

#35
post #32

Earlier quoted context omitted.

Me too! :) The possibilities of rustc (which has an LLVM backend) and Emscripten (which consumes LLVM IR) are really interesting.

Agreed! In fact it would also be useful in Node: you could build an almost-full-performance but portable version of a native module as a fallback for clients who don't have the requisite software to build a Neon library (say, one they only indirectly depend on) on their machine.

And, before you know it, we'll have realized the dream of Urbit, in JS ;)

Always bet on JS!

Re: Neon: Node plus Rust

#36
This is fantastic! Great idea and job so far! One of the biggest disadvantages with node is any type of complex manipulations / processing due to the single threaded, scheduler paradigm but combining node with native modules makes it much easier to pass off more complex pieces directly to C++.

Passing off to rust? Count me in! I'll be taking a look at this when linux is supported (would also love windows support but mac os x and linux are necessary for me).

Re: Neon: Node plus Rust

#37

This is fantastic! Great idea and job so far! One of the biggest disadvantages with node is any type of complex manipulations / processing due to the single threaded, scheduler paradigm but combining node with native modules makes it much easier to pass off more complex pieces directly to C++. Passing off to rust? Count me in! I'll be taking a look at this when linux is supported (would also love windows support but…

  >  I'll be taking a look at this when linux is supported 
https://github.com/dherman/neon/pull/22

https://github.com/dherman/neon-cli/pull/6

Re: Neon: Node plus Rust

#38

This is fantastic! Great idea and job so far! One of the biggest disadvantages with node is any type of complex manipulations / processing due to the single threaded, scheduler paradigm but combining node with native modules makes it much easier to pass off more complex pieces directly to C++. Passing off to rust? Count me in! I'll be taking a look at this when linux is supported (would also love windows support but…

> I'll be taking a look at this when linux is supported https://github.com/dherman/neon/pull/22 https://github.com/dherman/neon-cli/pull/6

I just saw :D

Damn people work fast. I hadn't even looked into what it would take to support Linux (and honestly my rust knowledge at the moment is so limited I probably wouldn't have figured it out in a reasonable time frame).

Re: Neon: Node plus Rust

#40

Would this allow Rust to be run on AWS Lambda?

I don't know the answer to how Neon would affect that, but AFAIK, you can already do this:

http://julienblanchard.com/2015/rust-on-aws-lambda/

But that uses a shell command. There's also this way to do so using FFI (article is about C++, but I'm pretty sure you could do the same with Rust):

http://benchling.engineering/crispr-aws-lambda/

Post reply on HN