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

Make embedding dirt-simple #18421

Closed
twadleigh opened this issue Sep 9, 2016 · 6 comments
Closed

Make embedding dirt-simple #18421

twadleigh opened this issue Sep 9, 2016 · 6 comments
Labels
embedding Embedding Julia using the C API help wanted Indicates that a maintainer wants help on an issue or pull request
Milestone

Comments

@twadleigh
Copy link
Contributor

Embedding should work uniformly across all supported platforms according to the documentation. Further, embedding Julia installed in the standard way for a platform should require no arguments to jl_init.

Some related issues: #6327, #8757 , #14163, #17657.

@StefanKarpinski StefanKarpinski added the embedding Embedding Julia using the C API label Sep 9, 2016
@StefanKarpinski StefanKarpinski added this to the 1.0 milestone Sep 9, 2016
@twadleigh
Copy link
Contributor Author

twadleigh commented Sep 10, 2016

Getting jl_init to the point where it can be called without arguments is straightforward. Since it resides in libjulia, it (or some function within libjulia that might be in its call chain) can determine the path to the libjulia that is currently being called (via GetModuleHandleEx on windows, or dladdr on POSIX). From that, JULIA_HOME can be inferred, as well as the paths to try for the julia executable (cf. #18437) and system image.

@StefanKarpinski StefanKarpinski added the help wanted Indicates that a maintainer wants help on an issue or pull request label Sep 10, 2016
@StefanKarpinski
Copy link
Member

I've marked as milestone 1.0 but this could ideally happen sooner.

@twadleigh
Copy link
Contributor Author

I'm actively working it.

On Sep 10, 2016 11:28 AM, "Stefan Karpinski" [email protected]
wrote:

I've marked as milestone 1.0 but this could ideally happen sooner.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#18421 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABf4buATdb2UdBvk8y0cZTt3QGb5nWONks5qovbngaJpZM4J4_Iq
.

@vtjnash
Copy link
Member

vtjnash commented Sep 10, 2016

For 1.0, I think ideally ./julia will link against sys.so directly and dispense with our duplication of the system linker. But since this complicates the -J option, we aren't quite there yet, and I'm not sure the specifics of the best way to fix that. For embedding applications though, I think that's already definitely the way to go (and jl_init just needs to be updated to accept the handles directly rather than using dlopen to look them up).

@tkelman
Copy link
Contributor

tkelman commented Apr 15, 2017

can we call this fixed by #21299 ?

@KristofferC
Copy link
Member

I think so, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedding Embedding Julia using the C API help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

5 participants