# Embedding Julia in Scala

**URL:** <https://discourse.julialang.org/t/embedding-julia-in-scala/97347>\
**Category:** General Usage\
**Tags:** embedding, package-compiler\
**Created:** [April 11, 2023, 1:44pm UTC](https://discourse.julialang.org/t/embedding-julia-in-scala/97347 "2023-04-11T13:44:43Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [April 12, 2023, 8:17pm UTC](https://discourse.julialang.org/t/embedding-julia-in-scala/97347/4 "2023-04-12T20:17:26Z")

</div>

It’s not problematic to call FROM Julia (to C; and indirectly to others), but in the other direction, embedding isn’t as easy. Even though the C API should just work for also C++, there’s a package to make it easier:

> [@Jluna: a new Julia \<-\> C++ wrapper](https://discourse.julialang.org/t/jluna-a-new-julia-c-wrapper/77486):
>
> Available here: [https://github.com/Clemapfel/jluna](https://github.com/Clemapfel/jluna) (Edit: the license of the library has been changed to MIT, making it freely available without restrictions) I have spend the last few months, full-time, writing a Julia ⭤ wrapper completely from scratch. It aims to fully replace the C-API in usage in C++ projects, and offers a possible alternative to Cxx.jl. I aim for jluna to be… modern: uses the most modern C++20 features, the newest compiler versions and Julia 1.7+ generic: all std:: …

@Clemapfel  
I’m just bringing it up since you could maybe learn from it, and also to make the point it doesn’t seem so non-trivial without a major project. So that Clojure project might help all JVM languages.

@cnuernber  
Clojure has bidirectional interop with Java, and Java with Scala. I’m not sure, could you call straight from Scala to Clojure to Julia, or would you need to call from Scala to Java to Clojure to Julia…? I’m not sure, or could this project help with calling straight from Scala to Julia? I guess not without changing it/forking it.

---

_[View the full topic](https://discourse.julialang.org/t/embedding-julia-in-scala/97347)._
