-
Notifications
You must be signed in to change notification settings - Fork 232
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
Embedding and AOT #1119
Comments
Disclaimer: I'm still relatively new to Janet specifics, so what I say below might not be perfectly accurate. You can do whatever Those forms can then be used at runtime by putting them into a fiber and This all, of course, depends on you knowing exactly what you want to run ahead of time. |
On a side note, if you haven't checked out @greenfork's jzignet yet, may be it's worth a look. There is specific mention of embedding in the README:
There is also: https://hg.sr.ht/~paulsnar/zig-janet which is apparently based on the above (at least according to this). ...and there is this project which seems to be written in Zig with some Janet bits inside. No clue about specifics though (^^; |
@sogaiu I did check jzignet, it's not compiling on my version of zig so I bascially rewrite my own. I don't think they have a solution for my problem, tho. |
I think #999 would answer some of your questions. Also, here are some code snippets. Lines 4126 to 4136 in 4ff81a5
Lines 4229 to 4237 in 4ff81a5
Lines 1254 to 1264 in 4ff81a5
|
Searching |
One way is to run cfunction can't be included this way by default. You can modify |
I am trying to embedding janet into Zig, and I succeeded with embedding tutorial.
However, there's an overhead using the dostring/dobytes that I want to avoid. Is it possible to call compile functions in zig's compile time, so I can have bytes code embedded in my executable instead of having source code being compiled multiple times whenever I try to run the executable?
Thank you!
The text was updated successfully, but these errors were encountered: