Live data from Hacker News

Rust gets working asmjs and wasm targets

github.com

1–10 of 20 posts

Re: Rust gets working asmjs and wasm targets

#3
post #2

Please someone figure out how to use Web APIs with Web Assembly so we can finally move away from EcmaScript's madness

Honest question. Given the vast amount of languages that compile to JavaScript what's stopping you from moving away from EcmaScript's "madness"?

Re: Rust gets working asmjs and wasm targets

#4
Seeing that build randomly breaking on mingw reminds me of the 'fun' I've had dealing with cross platform/compiler development in C++, it will be a great day when I can just do something like 'cargo build' for asmjs/Android/iOS/Windows/OSX/Linux and this brings us one step closer :)

Re: Rust gets working asmjs and wasm targets

#6
post #3
post #2

Please someone figure out how to use Web APIs with Web Assembly so we can finally move away from EcmaScript's madness

Honest question. Given the vast amount of languages that compile to JavaScript what's stopping you from moving away from EcmaScript's "madness"?

Probably because those abstractions leak like a sieve. It's really hard to get away from having to understand the underlying javascript, whether it be debugging, performance testing or just making everything work in the first place.

Re: Rust gets working asmjs and wasm targets

#7
post #5

The commit mentions that hello.rs work, anyone happen to notice if a copy of the resulting hello.wasm is posted anywhere? Or the steps to build hello.rs to hello.wasm?

  > Or the steps to build hello.rs to hello.wasm?
This will get easier next week, when we get the build bots to produce the right things.

With a little work, it should be something like

  $ rustup add toolchain some-wasm-triple
  $ cargo build --target some-wasm-triple
in my understanding.

Re: Rust gets working asmjs and wasm targets

#8
post #3
post #2

Please someone figure out how to use Web APIs with Web Assembly so we can finally move away from EcmaScript's madness

Honest question. Given the vast amount of languages that compile to JavaScript what's stopping you from moving away from EcmaScript's "madness"?

An outside opinion... The JavaScript world is so fractured, what would you use? Kotlin, Dart, Elm, CoffeeScript, ClojureScript, Nim...? Which ones will keep going?

Re: Rust gets working asmjs and wasm targets

#9
post #6
post #3

Earlier quoted context omitted.

Honest question. Given the vast amount of languages that compile to JavaScript what's stopping you from moving away from EcmaScript's "madness"?

Probably because those abstractions leak like a sieve. It's really hard to get away from having to understand the underlying javascript, whether it be debugging, performance testing or just making everything work in the first place.

That has certainly not been my experience. I've never had to think in JavaScript with Elm or ClojureScript for example.

Re: Rust gets working asmjs and wasm targets

#10
post #8
post #3

Earlier quoted context omitted.

Honest question. Given the vast amount of languages that compile to JavaScript what's stopping you from moving away from EcmaScript's "madness"?

An outside opinion... The JavaScript world is so fractured, what would you use? Kotlin, Dart, Elm, CoffeeScript, ClojureScript, Nim...? Which ones will keep going?

In my opinion, there are three big problems with coding for the web in a language that compiles to JS:

) The object models from other languages range from somewhat compatible to totally different. Mapping another language to good JS code is a challenge.

) Debugging and profiling become a hassle. Even with proper sourcemaps, you are just much further away from the native JS runtime.

*) Libraries. As soon as you want to use something like React, underscore, etc, you need a method to bring some stub definitions into your host language. This is solved in different ways, but always a burden. Often a very annoying one.

Webassembly right now is useful for cases where high perf is really needed (games, cpu intensive tasks, ...), but there is no access to the dom.

You ultimately need Javascript to interact with the Browser.

I recommend Typescript. It's a better language than ES(2015), but tries to remain close and compatible. It's also got enough traction and support (enterprises/big projects love it) to not be in danger of just going away.

Post reply on HN