Can the Haxe compiler be built for any of the supported languages?

107 views
Skip to first unread message

rraallvv

unread,
Aug 12, 2016, 6:43:56 PM8/12/16
to Haxe
Say I want to have a Haxe compiler running on a web browser, or alternatively on any other of the languages supported by Haxe, is that possible?

Regards.

Franco Ponticelli

unread,
Aug 12, 2016, 6:59:34 PM8/12/16
to haxe...@googlegroups.com
Nops, the compiler is written in OCaml.

On Fri, Aug 12, 2016 at 4:43 PM, rraallvv <rhod...@gmail.com> wrote:
Say I want to have a Haxe compiler running on a web browser, or alternatively on any other of the languages supported by Haxe, is that possible?

Regards.

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Rhody Lugo

unread,
Aug 12, 2016, 7:44:49 PM8/12/16
to haxe...@googlegroups.com
I see, thanks for the info Franco.

You received this message because you are subscribed to a topic in the Google Groups "Haxe" group.

Mark Knol

unread,
Aug 13, 2016, 12:53:23 PM8/13/16
to Haxe
But you can run haxe on a server and send code from frontend to server and the result of the compiler back. This is what try.haxe.org does.

Munir Hussin

unread,
Aug 13, 2016, 6:33:09 PM8/13/16
to Haxe
I made an attempt once to get the compiler running on the web browser itself. One is using ocaml to js compiler (js_of_ocaml), which you need to write some adapters in js for some system calls. I couldn't figure out that part, so the most I got was the haxe command line help to display in the browser's console. Running anything else errors out, due to missing stuff.

There might be another way. Maybe OCaml to LLVM, and then LLVM to js using emscripten. Haven't tried, so don't know if it works.

Rhody Lugo

unread,
Aug 14, 2016, 6:15:40 PM8/14/16
to haxe...@googlegroups.com
@Mark, yes that’s an option too, thanks. Also found https://github.com/HaxeFoundation/hscript which seems interesting.

> On Aug 13, 2016, at 12:53 PM, Mark Knol <mark...@gmail.com> wrote:
>
> But you can run haxe on a server and send code from frontend to server and the result of the compiler back. This is what try.haxe.org does.
>

Rhody Lugo

unread,
Aug 14, 2016, 6:37:19 PM8/14/16
to haxe...@googlegroups.com
@Hunir I’ll give js_of_ocaml a try, also found bucklescript (https://bloomberg.github.io/bucklescript/), it worths taking a look at. And lots of stuff googling about a LLVM backend for Ocaml.

Very much appreciated, thanks.

On Aug 13, 2016, at 6:33 PM, Munir Hussin <profou...@gmail.com> wrote:

I made an attempt once to get the compiler running on the web browser itself. One is using ocaml to js compiler (js_of_ocaml), which you need to write some adapters in js for some system calls. I couldn't figure out that part, so the most I got was the haxe command line help to display in the browser's console. Running anything else errors out, due to missing stuff.

There might be another way. Maybe OCaml to LLVM, and then LLVM to js using emscripten. Haven't tried, so don't know if it works.

Reply all
Reply to author
Forward
0 new messages