Re: Can we ease WASM in D ?

2022-11-23 Thread Hipreme via Digitalmars-d-learn
On Wednesday, 16 November 2022 at 22:51:31 UTC, bioinfornatics wrote: Dear community, I look some day ago to the D wasm page: -> https://wiki.dlang.org/Generating_WebAssembly_with_LDC And since then I ask myself can we at compile time convert a D code to an extern C code for wasm ? Indeed,

Re: Can we ease WASM in D ?

2022-11-23 Thread Jesse Phillips via Digitalmars-d-learn
On Wednesday, 16 November 2022 at 22:51:31 UTC, bioinfornatics wrote: Dear community, I look some day ago to the D wasm page: -> https://wiki.dlang.org/Generating_WebAssembly_with_LDC And since then I ask myself can we at compile time convert a D code to an extern C code for wasm ? Thanks

Re: Can we ease WASM in D ?

2022-11-16 Thread bioinfornatics via Digitalmars-d-learn
Thanks Adam, H. S., max for your point of view On Wednesday, 16 November 2022 at 23:23:48 UTC, Adam D Ruppe wrote: On Wednesday, 16 November 2022 at 23:16:26 UTC, H. S. Teoh wrote: You mean with Phobos and everything included? I think there may be issues with that... Yes that would be

Re: Can we ease WASM in D ?

2022-11-16 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 16 November 2022 at 23:16:26 UTC, H. S. Teoh wrote: You mean with Phobos and everything included? I think there may be issues with that... Yes, this is a problem, but I think I have a solution: defer GC runs until javascript is running. There's also some llvm features that

Re: Can we ease WASM in D ?

2022-11-16 Thread H. S. Teoh via Digitalmars-d-learn
On Wed, Nov 16, 2022 at 10:51:31PM +, bioinfornatics via Digitalmars-d-learn wrote: > Dear community, > > I look some day ago to the D wasm page: > -> https://wiki.dlang.org/Generating_WebAssembly_with_LDC > > And since then I ask myself can we at compile time convert a D code > to an

Re: Can we ease WASM in D ?

2022-11-16 Thread max haughton via Digitalmars-d-learn
On Wednesday, 16 November 2022 at 23:00:40 UTC, Adam D Ruppe wrote: On Wednesday, 16 November 2022 at 22:51:31 UTC, bioinfornatics wrote: [...] It would be pretty cool if you could just mark `@wasm` on a function and have it magically convert... the dcompute thing i *think* does something

Re: Can we ease WASM in D ?

2022-11-16 Thread Adam D Ruppe via Digitalmars-d-learn
On Wednesday, 16 November 2022 at 22:51:31 UTC, bioinfornatics wrote: And since then I ask myself can we at compile time convert a D code to an extern C code for wasm ? It would be pretty cool if you could just mark `@wasm` on a function and have it magically convert... the dcompute thing i

Can we ease WASM in D ?

2022-11-16 Thread bioinfornatics via Digitalmars-d-learn
Dear community, I look some day ago to the D wasm page: -> https://wiki.dlang.org/Generating_WebAssembly_with_LDC And since then I ask myself can we at compile time convert a D code to an extern C code for wasm ? Indeed, if a library/framework would wrap this to let end user write his