Thread overview
Loading of wasm function fails
Apr 22, 2019
dokutoku
Apr 22, 2019
Adam D. Ruppe
Apr 22, 2019
dokutoku
April 22, 2019
I try to use wasm with LDC, but I can not load wasm functions with the following message even if I write it the same as the "Generating WebAssembly with LDC" page on wiki

TypeError: exports.add is not a function

How can I solve this problem?
April 22, 2019
On Monday, 22 April 2019 at 10:36:23 UTC, dokutoku wrote:
> How can I solve this problem?

I played with this last week, try adding

-L--export-dynamic

to your ldc command line to build.

I mentioned it briefly on my blog last week http://dpldocs.info/this-week-in-d/Blog.Posted_2019_04_15.html#what-adam-is-working-on
April 22, 2019
On Monday, 22 April 2019 at 13:05:03 UTC, Adam D. Ruppe wrote:
> On Monday, 22 April 2019 at 10:36:23 UTC, dokutoku wrote:
>> How can I solve this problem?
>
> I played with this last week, try adding
>
> -L--export-dynamic
>
> to your ldc command line to build.
>
> I mentioned it briefly on my blog last week http://dpldocs.info/this-week-in-d/Blog.Posted_2019_04_15.html#what-adam-is-working-on

It was possible! Thank you!

I will check your blog regularly as well.