Stream: helpdesk (published)

Topic: ✔ Reach internals of PackageCompiler app


view this post on Zulip DrChainsaw (Jul 15 2022 at 11:46):

How difficult is it to reach the internals of a PackageCompiler.jl app?

Assume that the main function only calls SomePackage.somefunction(ARGS[1]), is it then feasible to using only the compiled artifact(s) to somehow call SomePackage.anotherfunction?

For example, if I have been given an executable .jar file, I think it is easy to call other methods than the main method if I just import it to a java project, and I can unzip the .jar to see its contents. Is it similar for PackageCompiler.jl or is the sysimage more opaque?

view this post on Zulip Sebastian Pfitzner (Jul 15 2022 at 11:51):

You should always be able to load the generated sysimg into a normal Julia process (with -J) and can then do whatever you want, no?

view this post on Zulip DrChainsaw (Jul 15 2022 at 11:57):

Sorry, I have never used PackageCompiler.jl before so I'm completely new to it.

So even a compiled "app" can be loaded as a normal image and then you have access to all the included packages?

view this post on Zulip Sebastian Pfitzner (Jul 15 2022 at 12:00):

yes: https://julialang.github.io/PackageCompiler.jl/stable/apps.html#Using-reflection-and-finding-lowered-code

view this post on Zulip DrChainsaw (Jul 15 2022 at 12:02):

Thanks, should have read more than just the first section :rolling_eyes:

view this post on Zulip DrChainsaw (Jul 15 2022 at 12:08):

I can't find mark resolved. Is it not available in the browser version of Zulip?

view this post on Zulip Sebastian Pfitzner (Jul 15 2022 at 12:09):

it's there for me in the browser:
image.png

view this post on Zulip Notification Bot (Jul 15 2022 at 12:12):

DrChainsaw has marked this topic as resolved.


Last updated: Dec 28 2024 at 04:38 UTC