<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection"><font face="Palatino, serif">Great, I’ll try both, thank you!</font></div>
<div name="messageReplySection">On Jan 28, 2020, 3:29 PM -0800, Peter Wang <novalazy@gmail.com>, wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">On Wed, 29 Jan 2020 10:13:47 +1100 (AEDT), Julien Fischer <jfischer@opturion.com> wrote:<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #e67e22;"><br />
Hi Patrick,<br />
<br />
On Tue, 28 Jan 2020, Patrick Henning wrote:<br />
<br />
<blockquote type="cite" class="spark_quote" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #3498db;">I am writing to request help with compiling Mercury code to<br />
WebAssembly via Emscripten. I believe this would involve using the<br />
Mercury compiler to compile the gc, runtime, standard library, etc, to<br />
c; and then using Emscripten to compile the c to WebAssembly code.<br />
From there it should be possibly to compile arbitrary Mercury code to<br />
c and then use Emscripten to compile that, linking in the previously<br />
prepared runtime and standard library and whatnot. <br />
<br />
Does anyone know if and how it would be possbile to carry out the<br />
first step of compiling all the Mercury preliminaries to c (similar to<br />
the functionality that the '-C' flag for mmc provides)?<br /></blockquote>
<br />
It's certainly possible to compile it all to C; that's how we build the<br />
source distribution.<br /></blockquote>
<br />
You can also do it with: mmc --make prog.cs<br />
<br />
Peter<br /></blockquote>
</div>
</body>
</html>