Live data from Hacker News

Neon: Node plus Rust

calculist.org

41–50 of 71 posts

Re: Neon: Node plus Rust

#41

I can see this being useful in combination with Piston[1] to achieve scripting for game engines, in the same way Lua is normally used. Rust as a core for a game engine seems like a really great idea, considering the speed and safety benefits it provides. [1] https://github.com/PistonDevelopers/piston

Javascript seems like a great contender in this space to me. Btw, as well as using nodejs / v8, there are also Rust bindings for SpiderMonkey (Mozilla's JS engine): https://github.com/servo/rust-mozjs

(not super user-friendly yet, as this mainly exists for Servo - but there's enough here to embed Javascript scripts in your Rust projects!)

Re: Neon: Node plus Rust

#42
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…

You might want to look into BERT [0], I think there is a JavaScript library. We used it a few years ago to call Ruby from Erlang, it wasn't fast at the time, but it did what we needed it to do.

[0] https://github.com/blog/531-introducing-bert-and-bert-rpc

Re: Neon: Node plus Rust

#43
post #22

Earlier quoted context omitted.

Did Yehuda ever open source or complete a similar abstraction like this but for Ruby? I remember someone mentioning to me he was working on it. I have a longstanding todo (though I have no motivation because I currently have no use for Rust or Ruby) to try something similar though I remember my initial attempts having trouble with how Ruby's C API expresses some values.

I'm actively working on it ( https://github.com/tildeio/turboruby ) and in fact was racing @dherman to finish. He beat me by a mile :( but I hope to wrap up a usable first version soon.

I'm looking forward to it! I really want to flex some Rust muscle at work for our performance critical stuff.

Re: Neon: Node plus Rust

#47

Honest question: Why would someone use Node instead of a Rust web framework when writing part of the code in Rust anyway?

- Node has full garbage collection. Rust has some very clever memory-handling, but it's not quite the same.

- Node is javascript. You may want to run the same code on client and server, and it's simpler than compiling Rust to JS.

- There may be JS libraries you want to use.

I could go on.

Re: Neon: Node plus Rust

#49
Since both node and Rust use libuv for parallelism. Is it possible to provide the node libuv pool to rust so that they share a single bound on parallel operations?

Also, can I use Neon for async callbacks?

Re: Neon: Node plus Rust

#50
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…

Give me this but with Elixir and Im sold.
Post reply on HN