[m-dev.] Mercury, Emscripten, and WebAssembly

Patrick Henning path at fea.st
Thu Jan 30 10:27:00 AEDT 2020


Great, I’ll try both, thank you!
On Jan 28, 2020, 3:29 PM -0800, Peter Wang <novalazy at gmail.com>, wrote:
> On Wed, 29 Jan 2020 10:13:47 +1100 (AEDT), Julien Fischer <jfischer at opturion.com> wrote:
> >
> > Hi Patrick,
> >
> > On Tue, 28 Jan 2020, Patrick Henning wrote:
> >
> > > I am writing to request help with compiling Mercury code to
> > > WebAssembly via Emscripten. I believe this would involve using the
> > > Mercury compiler to compile the gc, runtime, standard library, etc, to
> > > c; and then using Emscripten to compile the c to WebAssembly code.
> > > From there it should be possibly to compile arbitrary Mercury code to
> > > c and then use Emscripten to compile that, linking in the previously
> > > prepared runtime and standard library and whatnot.
> > >
> > > Does anyone know if and how it would be possbile to carry out the
> > > first step of compiling all the Mercury preliminaries to c (similar to
> > > the functionality that the '-C' flag for mmc provides)?
> >
> > It's certainly possible to compile it all to C; that's how we build the
> > source distribution.
>
> You can also do it with: mmc --make prog.cs
>
> Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/developers/attachments/20200129/4cef9a2f/attachment.html>


More information about the developers mailing list