Whats going on with V8 modules with C++ name mangling and Rust ? On 16 April 2015 at 08:21, Alex <[email protected]> wrote: > I suppose you could do inter language modules via Emscripten llvm backend. If > it compiles to asm.js, the ownership semantics in Rust may or may not > translate to lighter memory requirements in the VM; not sure. It would kind > of be the worst of both worlds, I would think. > > @AaronNGray > > I dunno why this came up. Rust is a hot thing right now; people like to mix > and match. Maybe you could leverage the huge number of NPM modules while > reimplementing the hot parts of your code in Rust. > > Rust is a very verbose language that precisely denotes who owns data. This > means the system doesn't have to allocate extra data speculatively (memory > savings), vulnerabilities and leaks are circumvented (error savings), and > function calls are monomorphic (optimization boost). JS function calls > frequently break monomorphism, which disrupt the poor JIT compiler's attempts > to streamline things. See link: > http://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism.html > > Rust is not exactly web server oriented, and the current APIs are mostly > blocking. So I don't think putting rust into node makes a lot of sense. It > might make a lot of sense for your node app to use add-ons written in Rust, > though. E.g., a graphics processing addon could easily manage a thread pool > safely and efficiently to handle jobs from node. It doesn't have to worry > about blocking as much as your node app does. Rust is more for the endpoints, > that do the actual computational heavy lifting. Node apps tend to be > intermediate nodes. They stand between the web and something else: a > database, filesystem, or number crunching endpoint (like a graphics library). > > Hypothetically, you might build an API for a service similar to tinyPNG.com > implemented as a node app. It might hand off jobs to a library similar to > pngcrush that might be implemented in Rust. > > I was at a talk with Steve Klabnik today and he said crates.io uses 25MB to > run their package manager server. Of course, V8 has a large minimum memory > footprint and GC memory usage can easily get out of control. Rust sounds like > an efficient and robust systems programming language, but you have to think > hard about a lot of details most smaller companies won't want to worry about > when they're building a web API. > > Just my take. > > -- > Job board: http://jobs.nodejs.org/ > New group rules: > https://gist.github.com/othiym23/9886289#file-moderation-policy-md > Old group rules: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/nodejs/60452cfe-2cf8-41e4-8542-e536561412dd%40googlegroups.com. > For more options, visit https://groups.google.com/d/optout.
-- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CANkmNDcuzsgfapVnA1KhR%2Bm4%2BCXF0GZH0KUJ5M8f0_BEKHgvyg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
