digitalmars.D.announce - compile D to asm.js using ldc --betterC and emcc
- cosinus (4/4) Oct 07 2017 I wrote a little working demo that shows how to use D inside
- Suliman (2/6) Oct 07 2017 could you make it online?
- cosinus (4/5) Oct 07 2017 you mean build everything and commit?
- Dukc (8/12) Oct 08 2017 Judging by looking at that build script, sure that's simpler than
- SrMordred (3/17) Nov 14 2017 Can someone explain the reasons why LDC can't compiles to webasm
- Joakim (7/26) Nov 14 2017 Nobody has done the work to port it, though someone has expressed
- Walter Bright (3/8) Nov 14 2017 Now on reddit:
I wrote a little working demo that shows how to use D inside firefox. It uses emscripten(emcc) and ldc. https://github.com/cosinus2/dlang-emscripten-demo
Oct 07 2017
On Saturday, 7 October 2017 at 17:31:37 UTC, cosinus wrote:I wrote a little working demo that shows how to use D inside firefox. It uses emscripten(emcc) and ldc. https://github.com/cosinus2/dlang-emscripten-democould you make it online?
Oct 07 2017
On Saturday, 7 October 2017 at 18:27:53 UTC, Suliman wrote:could you make it online?you mean build everything and commit? I've just added the binaries, I can't add the whole chain, its to big.
Oct 07 2017
On Saturday, 7 October 2017 at 17:31:37 UTC, cosinus wrote:I wrote a little working demo that shows how to use D inside firefox. It uses emscripten(emcc) and ldc. https://github.com/cosinus2/dlang-emscripten-demoJudging by looking at that build script, sure that's simpler than what I read you had to do some time back! You had to switch to some legacy llvm and compile the indermediate first to C and only then to Asm.js. This looks like powerful enough for normal use. You still miss DRuntime but a lot better than using C to do the same. Perhaps even better than Typescript in some cases?
Oct 08 2017
On Sunday, 8 October 2017 at 09:48:57 UTC, Dukc wrote:On Saturday, 7 October 2017 at 17:31:37 UTC, cosinus wrote:Can someone explain the reasons why LDC can't compiles to webasm with the DRuntime?I wrote a little working demo that shows how to use D inside firefox. It uses emscripten(emcc) and ldc. https://github.com/cosinus2/dlang-emscripten-demoJudging by looking at that build script, sure that's simpler than what I read you had to do some time back! You had to switch to some legacy llvm and compile the indermediate first to C and only then to Asm.js. This looks like powerful enough for normal use. You still miss DRuntime but a lot better than using C to do the same. Perhaps even better than Typescript in some cases?
Nov 14 2017
On Tuesday, 14 November 2017 at 10:01:51 UTC, SrMordred wrote:On Sunday, 8 October 2017 at 09:48:57 UTC, Dukc wrote:Nobody has done the work to port it, though someone has expressed interest and opened an issue for it: https://github.com/ldc-developers/ldc/issues/2144 Regarding porting druntime, I'm told by some here that there are some issues with the GC and thread-local storage because of the particular wasm instruction set, but I've never looked into it.On Saturday, 7 October 2017 at 17:31:37 UTC, cosinus wrote:Can someone explain the reasons why LDC can't compiles to webasm with the DRuntime?I wrote a little working demo that shows how to use D inside firefox. It uses emscripten(emcc) and ldc. https://github.com/cosinus2/dlang-emscripten-demoJudging by looking at that build script, sure that's simpler than what I read you had to do some time back! You had to switch to some legacy llvm and compile the indermediate first to C and only then to Asm.js. This looks like powerful enough for normal use. You still miss DRuntime but a lot better than using C to do the same. Perhaps even better than Typescript in some cases?
Nov 14 2017
On 10/7/2017 10:31 AM, cosinus wrote:I wrote a little working demo that shows how to use D inside firefox. It uses emscripten(emcc) and ldc. https://github.com/cosinus2/dlang-emscripten-demoNow on reddit: https://www.reddit.com/r/programming/comments/7cuoih/compile_d_to_webassembly_using_ldc_betterc_and/
Nov 14 2017