Closed quintesse closed 9 years ago
AFAICT exporting native code has to be done by hand. Something like ex$.run = run;
after your function.
See numbers.js
in the language module for example: ex$.JSNumber=JSNumber;
So I believe with stitching and native JS this has to be done by hand.
Then that should at least be documented: https://github.com/ceylon/ceylon-js/wiki/Native-Compilation
It's a Wiki, be my guest ;)
I'm not the one that knows how this works ;)
Well, let's ask @chochos if the current behaviour is right, or if it's even possible/desirable for the stitcher to generate the exporting itself.
At least that's what I think is the problem. Running the following code fails with a message saying
run
doesn't exist:run.ceylon:
run.js:
The
run.js
file gets stitched in properly I can see it in the output file, but it just doesn't get mentioned in the exports (if I add anative("js")
section instead of using stitching everything works just fine)