News for hackers. Stuff that matters.
Re:Neon: Node plus Rust by KaterKarlo56 on Thursday December 24, 2015 @05:16AM (#10787735)
Honest question: Why would someone use Node instead of a Rust web framework when writing part of the code in Rust anyway?
Re:Neon: Node plus Rust by Filligree on Thursday December 24, 2015 @05:21AM (#10787742)
- 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 by vpkaihla on Thursday December 24, 2015 @07:43AM (#10787981)
> Node is javascript. You may want to run the same code on client and server, and it's simpler than compiling Rust to JS.

What would be the reason to do that?

Re:Neon: Node plus Rust by nailer on Thursday December 24, 2015 @07:54AM (#10788007)
You need to do the same thing on the client and the server.

- DOM manipulation for AJAX states so they can be reached directly from the server without needing client side JS to do anything

- Calculate discounts for products (obviously clients just POST the product they want, but the discounts should be applied on the server consistently to how they were shown to the user)

- Your code is something generic, like recursively checking for a keypath on an object, and totally useful for JS anywhere it runs.

All kinds of other reasons.

Re:Neon: Node plus Rust by k__ on Thursday December 24, 2015 @09:14AM (#10788189)
I found it rather pleasant to have the same libs on client and server. Learn one lib API and use it everywhere :)

It also enabled me to move functionality freely around.

Calculating report data on the front-end, so it gets ready tomorrow and later moving it into the back-end, for performance reasons.

Re:Neon: Node plus Rust by curun1r on Thursday December 24, 2015 @11:27AM (#10788623)
The reason that I'm using Rust and Node together is Lambda. It supports Java, Python and Node and my (admittedly perfunctory) tests showed that Node had the smallest overhead of the three in getting to Rust. However, this library seems to offer a richer interaction between the two platforms, which would imply using Node as something beyond a bridge to Rust, so there's likely an answer beyond mine that the author has in mind.
Re:Neon: Node plus Rust by jtblin on Thursday December 24, 2015 @05:25PM (#10789756)
Because rust isn't web yet: http://arewewebyet.com.
Re:Neon: Node plus Rust by pcwalton on Thursday December 24, 2015 @09:33PM (#10790227)
That site is very out of date. We've been trying to get it fixed (as none of us control it), but we haven't been able to so far. :(
Re:Neon: Node plus Rust by notduncansmith on Friday December 25, 2015 @12:24PM (#10791693)
To clarify, are you saying that Rust is web (i.e. that the tools necessary for modern web server development and deployment are available to the Rust ecosystem)?
Re:Neon: Node plus Rust by pcwalton on Saturday December 26, 2015 @12:40AM (#10793400)
Depends on what your needs are. I think Rust is ready for certain Web apps. crates.io runs on Rust, for example, and it's a modern Ember-based web app running right now.

I think that the situation is a lot better than that site indicates.