Integrating Julia with Rust?

I think you’ll get some pushback on the idea that using Cargo would be a clear improvement over Julia’s amazing built-in packaging system.

For example, Cargo relies on build scripts to support non-Rust dependencies. Julia used to do this, but deployment of non-Julia dependencies was a huge pain because it relied on users having working non-Julia build systems. Nowadays in Julia we have JLL packages and Yggdrasil.

There have been some efforts on calling Julia from Rust using Rust’s FFI, since in that sense Julia can be called like any other C library: I wrote Rust bindings for Julia. If you're interested in calling Julia from Rust, please have a look and tell me what you think

And for the reverse, here’s an example of calling Rust from Julia: Simple example of calling Rust from Julia

See also: [ANN] Embedding Rust Library in a Julia Package

I’m not sure how widely used these are; so far, it seems Julia and Rust have mostly been applied to very different kinds of software and applications.

The advantage of Rust vs. Julia is not really runtime efficiency (putting aside compiler latency), but the age-old tradeoffs of static typing (stronger compile-time guarantees, compact AOT binaries) vs. dynamic typing (e.g. easier exploration/prototyping, interactive JIT environments).

But there have been many “Julia vs. Rust” threads on this forum (rehashing the many decades of debates on static vs. dynamic languages), e.g.

So probably it isn’t productive to start yet another general thread on this topic — let’s keep this focused on interop.

10 Likes