Is it possible to use embedded julia without julia installed

Hi. Hope for community member experience!
Im trying to extend my c++ app with power of julia.
But i cant figure out some important questions:

  • Should julia be installed on another computer
  • Could i provide some library with my app.exe to run
  • How to install desired packages to run julia
  • Will CxxWrap modules worked with default CxxWrap package (doc CxxWrap v0.10 and later depends on the libcxxwrap_julia_jll)

Thanks!

You did not tell us how you install you c++ app and on which OS it shall work. You also did not tell us which features of Julia you want to use.

Does this article help: 10 examples of embedding Julia in C/C++ | juliabloggers.com

And I want to note that in 2024 the suggested method to install Julia is juliaup . This step can happen automatically in an installation script if required.

1 Like

It should work on windows.
I have no idea about install, try to figure thing (on this moment i only try things with julia), any way it could needed.
Does juliaup could be a part of an installation exe?
Could required packages also provided this way?

Thanks for advise about juliaup!

Blog post on embedding on windows: Functional Noise

You still did not answer the question which features of Julia you want to use. Sometimes it is possible to create a shared library with PackageCompiler, and then you do not need to install any packages on the computer of the user of your SW.

Thans for the link. Very interesting. New futures of julia, so many interesting options.

Sorry. I need possibility to define user function which will be used in c++ app. And possibly script for defining steps of call c++ function to solve some differential equation. (build mesh, solve temperature equation, update parameters etc.)
Hope to use julia package for neural/optimizations algorithms.

Seems like i need to control and extend c++ diffrential solver with julia.

Very likely Julia’s differential equation solver is better than whatever you’ve got in C++. I mean, I’d say Julias DE capabilities are pretty much the best thing around in any language.

If it were me I’d be looking at just calling Julia to do the solutions. Then use whatever C++ you’ve got to do the other things already developed in C++, display, or whatnot.

You know more about your application than I do, so maybe this isn’t really possible, but don’t be afraid to benchmark Julia against the C++ code in some test case and see what’s up. If you’re planning to user-define functions to input to a DE solver you likely will benefit from using the Julia DE solver too.