# Where do things stand today regarding WebAssembly?

**URL:** https://community.haxe.org/t/where-do-things-stand-today-regarding-webassembly/1683
**Category:** Haxe
**Created:** [April 15, 2019, 3:25pm UTC](https://community.haxe.org/t/where-do-things-stand-today-regarding-webassembly/1683 "2019-04-15T15:25:27Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![sundialservices](https://avatars.discourse-cdn.com/v2/letter/s/9e8a1a/32.png) [@sundialservices](https://community.haxe.org/u/sundialservices)
#### Post date: [April 15, 2019, 3:25pm UTC](https://community.haxe.org/t/where-do-things-stand-today-regarding-webassembly/1683/1 "2019-04-15T15:25:28Z")

</div>

Personally, I think that “WebAssembly is the Next Big Thing.™” The next _Very_ Big Thing.™

And so, I would like to know what present plans are to support it. Are we going to compile to C++ and then rely on tools such as Emscripten, or will we expect the **gcc** compiler suite to support it, or will Haxe undertake to generate WebAssembly bytecodes for itself as it presently now does _e.g._ for Flash or nme?

What do you think – by when – and, why?

---

<div class="post-metadata">

### Author: ![nadako](https://community.haxe.org/user_avatar/community.haxe.org/nadako/32/5_2.png) [@nadako](https://community.haxe.org/u/nadako)
#### Post date: [April 15, 2019, 3:40pm UTC](https://community.haxe.org/t/where-do-things-stand-today-regarding-webassembly/1683/2 "2019-04-15T15:40:12Z")

</div>

I don’t know much about WebAssembly, but I’m pretty sure that just outputting C++ or HL/C output and compiling it to webassembly using native C/C++ tools will be enough.

---

<div class="post-metadata">

### Author: ![Gama11](https://community.haxe.org/user_avatar/community.haxe.org/gama11/32/7_2.png) [@Gama11](https://community.haxe.org/u/Gama11)
#### Post date: [April 15, 2019, 4:24pm UTC](https://community.haxe.org/t/where-do-things-stand-today-regarding-webassembly/1683/3 "2019-04-15T16:24:26Z")

</div>

I’ve heard it thrown around that a direct WebAssmebly target could become attractive once Garbage Collection makes it into the spec ([GitHub - WebAssembly/gc: Branch of the spec repo scoped to discussion of GC integration in WebAssembly](https://github.com/WebAssembly/gc)). Other than that HXCPP or HL/C would be needed, since they include their own GC.

---

<div class="post-metadata">

### Author: ![sundialservices](https://avatars.discourse-cdn.com/v2/letter/s/9e8a1a/32.png) [@sundialservices](https://community.haxe.org/u/sundialservices)
#### Post date: [April 16, 2019, 4:37pm UTC](https://community.haxe.org/t/where-do-things-stand-today-regarding-webassembly/1683/4 "2019-04-16T16:37:21Z")

</div>

Well, I know that this is indeed a design-concern for them, because _some_ of their runtime targets don’t support “explicit” garbage collection … but I guess that I really think that the Haxe team should be making – and, _stating_ that they are making – specific in-roads into the direct generation of WebAssembly bytecode as a target.

I predict that WebAssembly is going to _“suddenly(!) become a Very Big Thing.”_ But of course there’s going to be lead-time in setting up your language system to do it, “so we’d better get started now.” When Wasm suddenly turns big, you need to be able to say that you are _ **"already in"** _ this game. Not that you’ve got an inelegant strategy or that you’re racing to catch up. You’d like to have the O’Reilly book well in process by the time Wasm “hits big.”

---

<div class="post-metadata">

### Author: ![nadako](https://community.haxe.org/user_avatar/community.haxe.org/nadako/32/5_2.png) [@nadako](https://community.haxe.org/u/nadako)
#### Post date: [April 16, 2019, 7:14pm UTC](https://community.haxe.org/t/where-do-things-stand-today-regarding-webassembly/1683/5 "2019-04-16T19:14:32Z")

</div>

Well, contributions are welcome 🙂

---

<div class="post-metadata">

### Author: ![sundialservices](https://avatars.discourse-cdn.com/v2/letter/s/9e8a1a/32.png) [@sundialservices](https://community.haxe.org/u/sundialservices)
#### Post date: [April 16, 2019, 11:00pm UTC](https://community.haxe.org/t/where-do-things-stand-today-regarding-webassembly/1683/6 "2019-04-16T23:00:37Z")

</div>

_"Wel-l-l-l …_ I admit that I really hadn’t thought of that angle – yet."

I’ve pored through that OCaml source-code and I candidly admit that I presently find that language to be quite baffling – which is maybe a bit of a strange thing to say since I usually like to say that “I’ve been a student of programming languages for over thirty-five(!) years.” Maybe that’s a very big part of what’s put me off – so far.

If I seriously _did_ want to put in a bid for more-active involvement … I _do_ have a lot of compiler experience, come to think of it … “where on earth would I begin?” The thought of actually wrapping my head around “this Haxe thing,” let alone actively contributing to it, is quite daunting. _ **"But . . ."** _

Do you have any materials on-line that might help me to explore this possibility? _(I can’t deny that I very well might be qualified, although this remains to be seen.)_

---

<div class="post-metadata">

### Author: ![Gama11](https://community.haxe.org/user_avatar/community.haxe.org/gama11/32/7_2.png) [@Gama11](https://community.haxe.org/u/Gama11)
#### Post date: [April 16, 2019, 11:07pm UTC](https://community.haxe.org/t/where-do-things-stand-today-regarding-webassembly/1683/7 "2019-04-16T23:07:33Z")

</div>

One thing that really helps a lot if you’re new to OCaml is IDE support - the [VSCode extension](https://marketplace.visualstudio.com/items?itemName=freebroccolo.reasonml) is not terrible. That means you get errors on-the-fly via diagnostics, have hover hints to show you the types of things (there’s almost no explicit type hints anywhere in the compiler, it’s all inferred) and of course completion. Also the code navigation features (workspace symbols, goto declaration…).

---

<div class="post-metadata">

### Author: ![sundialservices](https://avatars.discourse-cdn.com/v2/letter/s/9e8a1a/32.png) [@sundialservices](https://community.haxe.org/u/sundialservices)
#### Post date: [April 16, 2019, 11:12pm UTC](https://community.haxe.org/t/where-do-things-stand-today-regarding-webassembly/1683/8 "2019-04-16T23:12:51Z")

</div>

I don’t think I’ve gotten that far yet, Gamma . . . _“functional programming”_ is surely the bee’s knees but . . . 🤯 . . . “it somehow tires my brain.” (And I really don’t know why.)

Well, _“I called myself a ‘student,’ didn’t I?”_ Maybe it’s just time to have another go . . . 😃 . . . _(but which tutorials should I start with?)_

Hey, I’m not exactly a _newcomer_ to “this crazy programming thing,” and, If I could actually become _actively involved_ in this feature that I’m “standing around here just wishing for,” now wouldn’t that just be cool.

_(Ummm … I didn’t "just **‘sign up.™’"** No, not quite yet.)_

---

<div class="post-metadata">

### Author: ![nadako](https://community.haxe.org/user_avatar/community.haxe.org/nadako/32/5_2.png) [@nadako](https://community.haxe.org/u/nadako)
#### Post date: [April 17, 2019, 12:47pm UTC](https://community.haxe.org/t/where-do-things-stand-today-regarding-webassembly/1683/9 "2019-04-17T12:47:46Z")

</div>

TBH I didn’t fully understand your two last posts, but if you’re seriously interested in joining the compiler development, we could help you out with both OCaml and Haxe compiler architecture details via some real-time communication channel (Discord/Slack), but you have to be prepared to wrap your head around the general FP way of dealing with data (basically, get ready for a lot of recursion and pattern matching). Besides that, as it was said before, diving deeper into macros can give you a gentle intro into how the compiler works.
