mailing list of musl libc
 help / color / mirror / code / Atom feed
* WebAssembly (Wasm) support in Musl
@ 2017-11-27 19:11 Nicholas Wilson
  2017-11-27 20:27 ` A. Wilcox
  2017-11-28 13:03 ` Szabolcs Nagy
  0 siblings, 2 replies; 5+ messages in thread
From: Nicholas Wilson @ 2017-11-27 19:11 UTC (permalink / raw)
  To: musl

Hi,

I'm interested in the plans for WebAssembly support in Musl.

(Background: WebAssembly is a new portable Virtual Machine instruction set, designed for use in browsers to run performance-critical code. It's supported now in all major browsers, and could be a significant part of the web platform in future.)

The Emscripten project has previously used Musl internally, based on a fork, and that's using a quite complicated compiler that performs many legacy pre- and post-processing stages. (I have previously contributed to LLVM and Emscripten, but I'm not affiliated with either project.)

Recently, LLVM/Clang have been working on a brand new & clean compiler target, designed to generate WebAssembly output directly in a clean way, without Emscripten's existing convoluted intermediate steps. The native Clang support for WebAssembly is nearing the point where it's ready to use - at which point it will need a libc!

I'd like to see that added to Musl natively, as part of the upstream release. Is that something that you would be willing to accept patches for?

I've got some patches ready, and apart from adding some new directories ("arch/wasm", "src/internal/wasm") there are hardly any changes at all needed to the core code to get it all compiling for Wasm.

All the best,
Nick

---
Nick Wilson
RealVNC Ltd

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WebAssembly (Wasm) support in Musl
  2017-11-27 19:11 WebAssembly (Wasm) support in Musl Nicholas Wilson
@ 2017-11-27 20:27 ` A. Wilcox
  2017-11-27 21:03   ` Jon Chesterfield
  2017-11-28 13:03 ` Szabolcs Nagy
  1 sibling, 1 reply; 5+ messages in thread
From: A. Wilcox @ 2017-11-27 20:27 UTC (permalink / raw)
  To: musl

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On 27/11/17 13:11, Nicholas Wilson wrote:
> I'm interested in the plans for WebAssembly support in Musl.


and just like that, assuming this port is accepted, my opinion of
webassembly goes from 'the worst thing ever invented for computing' to
'maybe only in the top 20 worst things ever invented for computing'.

- --arw


- -- 
A. Wilcox (awilfox)
Project Lead, Adélie Linux
http://adelielinux.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJaHHUUAAoJEMspy1GSK50U0XAP/1E2sqtpOmSwBGq+9jBY7mwG
GpVxrdi11532+g2SlcFdUfGWFhut6qMxAdkxGY3eqBgAAUvpfFE53lus1evMjxxt
lHtEwexcG+lO+UjF+2L84u6gT+4vQp9m7yAMYR66xGaEyMhLVcfc4Bf/12bxGrNL
NXjeHg5BUI9dmlJ1nIm1YV1xNDm12Knbm1JxwdWdxCX+gC9HamsynsnWe1vPBWnj
oZX7VOrs8DNHUcHZP7A+HT7Nqe78T2+5HTQf0D+xWLva8ac1ajuHMrUUe+HemyaF
X7/UelU91AauToBqg1kFhUNf1PZSAcepkd0sHsuzIqG4EMoMr9WSB3OE0OIC4Y0T
cgaAyh7x1i8/wrPXLvqgAWpipWeMHEz4f+fTPDkcWzZHqYwf8lXHl8xCwLPKmpUD
owarqy+XrAab84dekvYTDC9Sz2xu0TY+EyggQzAea21uioExbVMvAjfJC/nOqoQD
q8fw4GS3Rpru/7ZalIpWFUFVHLaiivr2/KGcqkiLM1Lb7nHZquA9WWxk8H2TSRyE
XCWo6PlNIdcXA15Voe85D8+p1L2Fh82Z7xjA1b/taarNwJeoBYNGiOCfUiTgMq8K
ROkQlar/oYXhyi2oYL0/QKztZR2b2P6f1JaiOWlyRFV/o08FM/o6wTN+A/jRkMbf
U/sZTxJ4G3tzcx250Mmw
=3PUT
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WebAssembly (Wasm) support in Musl
  2017-11-27 20:27 ` A. Wilcox
@ 2017-11-27 21:03   ` Jon Chesterfield
  0 siblings, 0 replies; 5+ messages in thread
From: Jon Chesterfield @ 2017-11-27 21:03 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]

I'd like to see closer links between llvm and musl in general. I'm
therefore also interested.

On Mon, Nov 27, 2017 at 8:27 PM, A. Wilcox <awilfox@adelielinux.org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> On 27/11/17 13:11, Nicholas Wilson wrote:
> > I'm interested in the plans for WebAssembly support in Musl.
>
>
> and just like that, assuming this port is accepted, my opinion of
> webassembly goes from 'the worst thing ever invented for computing' to
> 'maybe only in the top 20 worst things ever invented for computing'.
>
> - --arw
>
>
> - --
> A. Wilcox (awilfox)
> Project Lead, Adélie Linux
> http://adelielinux.org
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQIcBAEBCAAGBQJaHHUUAAoJEMspy1GSK50U0XAP/1E2sqtpOmSwBGq+9jBY7mwG
> GpVxrdi11532+g2SlcFdUfGWFhut6qMxAdkxGY3eqBgAAUvpfFE53lus1evMjxxt
> lHtEwexcG+lO+UjF+2L84u6gT+4vQp9m7yAMYR66xGaEyMhLVcfc4Bf/12bxGrNL
> NXjeHg5BUI9dmlJ1nIm1YV1xNDm12Knbm1JxwdWdxCX+gC9HamsynsnWe1vPBWnj
> oZX7VOrs8DNHUcHZP7A+HT7Nqe78T2+5HTQf0D+xWLva8ac1ajuHMrUUe+HemyaF
> X7/UelU91AauToBqg1kFhUNf1PZSAcepkd0sHsuzIqG4EMoMr9WSB3OE0OIC4Y0T
> cgaAyh7x1i8/wrPXLvqgAWpipWeMHEz4f+fTPDkcWzZHqYwf8lXHl8xCwLPKmpUD
> owarqy+XrAab84dekvYTDC9Sz2xu0TY+EyggQzAea21uioExbVMvAjfJC/nOqoQD
> q8fw4GS3Rpru/7ZalIpWFUFVHLaiivr2/KGcqkiLM1Lb7nHZquA9WWxk8H2TSRyE
> XCWo6PlNIdcXA15Voe85D8+p1L2Fh82Z7xjA1b/taarNwJeoBYNGiOCfUiTgMq8K
> ROkQlar/oYXhyi2oYL0/QKztZR2b2P6f1JaiOWlyRFV/o08FM/o6wTN+A/jRkMbf
> U/sZTxJ4G3tzcx250Mmw
> =3PUT
> -----END PGP SIGNATURE-----
>

[-- Attachment #2: Type: text/html, Size: 2165 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WebAssembly (Wasm) support in Musl
  2017-11-27 19:11 WebAssembly (Wasm) support in Musl Nicholas Wilson
  2017-11-27 20:27 ` A. Wilcox
@ 2017-11-28 13:03 ` Szabolcs Nagy
  2017-11-28 13:09   ` Nicholas Wilson
  1 sibling, 1 reply; 5+ messages in thread
From: Szabolcs Nagy @ 2017-11-28 13:03 UTC (permalink / raw)
  To: musl

* Nicholas Wilson <nicholas.wilson@realvnc.com> [2017-11-27 19:11:44 +0000]:
> I'm interested in the plans for WebAssembly support in Musl.
> 

i thought there was already support for wasm somewhere,
at least there were some discussions on this list some
time ago.. with a quick search i could find

https://github.com/WebAssembly/musl
(and varius forks of it)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: WebAssembly (Wasm) support in Musl
  2017-11-28 13:03 ` Szabolcs Nagy
@ 2017-11-28 13:09   ` Nicholas Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Nicholas Wilson @ 2017-11-28 13:09 UTC (permalink / raw)
  To: musl

> i thought there was already support for wasm somewhere,
> at least there were some discussions on this list some
> time ago.. with a quick search i could find

> https://github.com/WebAssembly/musl
> (and varius forks of it)

That's a good question!

(I think that particular github repo is a throwaway "experiment".)

The thing that people are actually using currently (including my company) is Emscripten's fork of Musl, which doesn't support the "wasm" target directly, but rather supports asm.js, a precursor to Wasm. Emscripten's fork plays around with Musl the internals quite a bit, and contains a lot of "FIXME" comments, so it's not really quite ready for pushing upstream to you yet.

Given that asm.js is being replaced with wasm, I thought that a fresh start would really be the way to go regarding getting wasm into upstream Musl.

My patches are similar in spirit to what Emscripten has done, but only support wasm (rather than asm.js), and do so natively rather than via the emscripten glue.

With wasm, a lot less glue should be needed, since it's now a pretty "normal" Clang compiler again.

Nick

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-28 13:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-27 19:11 WebAssembly (Wasm) support in Musl Nicholas Wilson
2017-11-27 20:27 ` A. Wilcox
2017-11-27 21:03   ` Jon Chesterfield
2017-11-28 13:03 ` Szabolcs Nagy
2017-11-28 13:09   ` Nicholas Wilson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).