Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of QML in a module #34

Open
Ph0non opened this issue Feb 9, 2017 · 2 comments
Open

Use of QML in a module #34

Ph0non opened this issue Feb 9, 2017 · 2 comments
Assignees
Milestone

Comments

@Ph0non
Copy link

Ph0non commented Feb 9, 2017

Startup Time for my code is quite long, so i want to try to pack it all into a module and use __precompile__().

Somehow QML didn't recognize the functions used in julia which are exposed to QML through @qmlfunction. Neither if i export the function or call it with Julia.NuclideVector.decay_gui from QML (still @qmlfunction decay_gui of julia side).

It always results in TypeError: Cannot call method 'decay_gui' of undefined.

Is it even reasonable and possible to precompile a package with the use of QML?

edit: https://github.com/Ph0non/NuclideVector/tree/module

@barche
Copy link
Collaborator

barche commented Feb 9, 2017

I remember experimenting with precompilation for QML itself, but couldn't get it to work. Putting your own (backend) functions in a precompiled module should work, it could be a macro hygiene issue if it doesn't, I'll take a look.

barche added a commit that referenced this issue Feb 10, 2017
@barche
Copy link
Collaborator

barche commented Feb 10, 2017

OK, just looked at this a bit more in detail, and what works is calling precompiled methods as in the test I just committed. However, these methods must be in a separate module that does not depend on QML, since QML itself cannot be precompiled because it uses pointers to functions inside ccall. You should be able to place your callbacks in a submodule and precompile that, so everything can still be in a single package.

@ufechner7 ufechner7 self-assigned this Oct 23, 2023
@ufechner7 ufechner7 added this to the 0.8.2 milestone Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants