Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-21 Thread Seb via Digitalmars-d-learn
On Friday, 20 July 2018 at 16:37:24 UTC, Seb wrote: On Friday, 20 July 2018 at 15:33:19 UTC, Radu wrote: On Thursday, 19 July 2018 at 18:16:17 UTC, kinke wrote: I'll go with Seb's suggestion and look at the betterC tests upstream for issues like this. FYI: I made a reboot of the old PR to a

Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-20 Thread Seb via Digitalmars-d-learn
On Friday, 20 July 2018 at 15:33:19 UTC, Radu wrote: On Thursday, 19 July 2018 at 18:16:17 UTC, kinke wrote: I'll go with Seb's suggestion and look at the betterC tests upstream for issues like this. FYI: I made a reboot of the old PR to a new one which just adds the betterC testsuite:

Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-20 Thread Radu via Digitalmars-d-learn
On Thursday, 19 July 2018 at 18:16:17 UTC, kinke wrote: On Thursday, 19 July 2018 at 12:44:30 UTC, Radu wrote: [...] Removing some superfluous explicit druntime dependencies from Phobos would be a start. Your (nice) example compiles fine with this 4-lines Phobos hack: [...] Was able to

Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-19 Thread kinke via Digitalmars-d-learn
On Thursday, 19 July 2018 at 12:44:30 UTC, Radu wrote: --- int foo() { import std.algorithm, std.range; auto r = 100.iota.stride(2).take(5); return r.sum(); } --- ldc2 -mtriple=wasm32-unknown-unknown-wasm -betterC -link-internally -L-allow-undefined -release -Os wasm.d

Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-19 Thread Seb via Digitalmars-d-learn
On Thursday, 19 July 2018 at 12:44:30 UTC, Radu wrote: Just tried something similar with new LDC Webassembly support [1] and it fails to compile ... This is a prime example of stuff that should just workTM on targets like that. I would like to submit some fixes but I think there needs to be

Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-19 Thread Seb via Digitalmars-d-learn
On Thursday, 19 July 2018 at 12:40:09 UTC, Zheng (Vic) Luo wrote: On Thursday, 19 July 2018 at 11:35:00 UTC, Seb wrote: Well, since 2.079 it's actually possible to use D without a dependency any runtime (even libc): https://dlang.org/changelog/2.079.0.html#minimal_runtime Also with

Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-19 Thread Zheng Luo (Vic) via Digitalmars-d-learn
On Thursday, 19 July 2018 at 11:35:00 UTC, Seb wrote: Well, since 2.079 it's actually possible to use D without a dependency any runtime (even libc): https://dlang.org/changelog/2.079.0.html#minimal_runtime Also with -betterC you can actually use lots of things from core that don't depend

Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-19 Thread Radu via Digitalmars-d-learn
On Thursday, 19 July 2018 at 11:35:00 UTC, Seb wrote: On Thursday, 19 July 2018 at 10:27:36 UTC, Zheng (Vic) Luo wrote: Current implementation of d-runtime relies on a lot of symbols from libc, librt, libpthread, which makes it hard to create a minimal runtime used for embedded devices.

Re: Is there any plan for a dependency-free subset of "core" runtime?

2018-07-19 Thread Seb via Digitalmars-d-learn
On Thursday, 19 July 2018 at 10:27:36 UTC, Zheng (Vic) Luo wrote: Current implementation of d-runtime relies on a lot of symbols from libc, librt, libpthread, which makes it hard to create a minimal runtime used for embedded devices. Although there are some unofficial minimal versions of

Is there any plan for a dependency-free subset of "core" runtime?

2018-07-19 Thread Zheng Luo (Vic) via Digitalmars-d-learn
Current implementation of d-runtime relies on a lot of symbols from libc, librt, libpthread, which makes it hard to create a minimal runtime used for embedded devices. Although there are some unofficial minimal versions of d-runtime, many of them lack maintenance and outdates rapidly. I was