# Rust and Julia BoF at JuliaCon 2024

**URL:** <https://discourse.julialang.org/t/rust-and-julia-bof-at-juliacon-2024/116993>\
**Category:** General Usage\
**Tags:** rust\
**Created:** [July 13, 2024, 8:20am UTC](https://discourse.julialang.org/t/rust-and-julia-bof-at-juliacon-2024/116993 "2024-07-13T08:20:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![miguelraz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/miguelraz/32/631_2.png) [@miguelraz](https://discourse.julialang.org/u/miguelraz)\
**Post date:** [July 13, 2024, 8:20am UTC](https://discourse.julialang.org/t/rust-and-julia-bof-at-juliacon-2024/116993/1 "2024-07-13T08:20:35Z")

</div>

Welcome Julia and Rust friends!

Our BoF was a friendly discussion mostly around what Rust can offer to Julia devs. Most of the attendees didn’t know Rust yet but were keen to learn what it offers.

For those interested in learning Rust, I recommend the following free resources.

- The Rust Book (by Brown University) [https://rust-book.cs.brown.edu/](https://rust-book.cs.brown.edu/) . Includes quizzes and an overhaul of the Ownership system chapter.
- [GitHub - rust-lang/rustlings: 🦀 Small exercises to get you used to reading and writing Rust code!](https://github.com/rust-lang/rustlings) - Rust exercises to run locally
- [exercism.org](http://exercism.org) - Rust exercises to solve locally but share with mentors for free feedback
- [Introduction - Rust By Example](https://doc.rust-lang.org/rust-by-example/) - Rust by example
- [https://rust-analyzer.github.io/](https://rust-analyzer.github.io/) - rust-analyzer, the Rust LSP by excellence. Don’t miss out!

If you’re around at the Hackathon and have questions, I’ll be more than happy to help out.

* * *

If you have interesting ideas for hwo to bring the 2 languages together, please post in this chat.

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [July 13, 2024, 11:07am UTC](https://discourse.julialang.org/t/rust-and-julia-bof-at-juliacon-2024/116993/2 "2024-07-13T11:07:18Z")

</div>

> [@miguelraz](#):
>
> If you have interesting ideas for hwo to bring the 2 languages together, please post in this chat.

I hope this is interesting, because I struggle for a while now to overcome a problem in this project. I am stuck now, I have to admit.

I am trying to build a rust interface for Julia to the GUI library Slint:

- [GitHub - slint-ui/slint: Slint is a declarative GUI toolkit to build native user interfaces for Rust, C++, or JavaScript apps.](https://github.com/slint-ui/slint)
- [https://www.slint.dev/](https://www.slint.dev/)
- [https://releases.slint.dev/](https://releases.slint.dev/)

So far, my strategy for this is, to implement the rust interface step by step by making the Slint examples working for Julia. The result would be not the perfect rust interface API but a working base to create this in a second implementation phase. The Slint examples are located here:

- [slint/examples at master · slint-ui/slint · GitHub](https://github.com/slint-ui/slint/tree/master/examples)

and I started with the examples in `7guis`:

- [slint/examples/7guis at master · slint-ui/slint · GitHub](https://github.com/slint-ui/slint/tree/master/examples/7guis)

The examples `bookers.rs` and `cells.rs` are working already (of course `hello world` is working too):  
 ![image](https://global.discourse-cdn.com/julialang/original/3X/1/4/1455a8aa40ec83e97151f494f67a5735894cffea.png)

I am stuck with the next example `circledraw.jl` because this needs (in my opinion) a dynamic array to store the circles which are drawn. And I am fighting rust and it’s ownership without success for a while now. The idea is (in short) that the array to push the circle information into, resides in the `.slint` GUI definition file and adding the circles to this array. But rust don’t let me do this as I am not able to overcome the ownership constraint of this array.

The current progress with `Slint.jl` is avaiable here:

- [GitHub - oheil/Slint.jl: Slint GUI for Julia](https://github.com/oheil/Slint.jl)

Install, Build and running first examples are there for a fast to go. A bit more information is in `deps/README.md`. The current state of the code is probably not very clean but it’s also not very complex, at least for people with better `Rust` knowledge than I have.

I would be happy if someone could overcome the current hurdle and I am quite optimistic if this is solved, all other issues can be solved in a similar way. That means, with a solution a Slint GUI for Julia is just a matter of time doing the rest, which I am happy to do.

---

<div class="post-metadata">

**Author:** ![hunger](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hunger/32/210649_2.png) [@hunger](https://discourse.julialang.org/u/hunger)\
**Post date:** [July 13, 2024, 8:41pm UTC](https://discourse.julialang.org/t/rust-and-julia-bof-at-juliacon-2024/116993/3 "2024-07-13T20:41:08Z")

</div>

Why don’t you stop by with your problems at chat.slint.dev? We do not know Julia, but we do know rust and slint and have created bindings for several languages before… I am sure we can at least suggest things:-)

---

<div class="post-metadata">

**Author:** ![oheil](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oheil/32/220745_2.png) [@oheil](https://discourse.julialang.org/u/oheil)\
**Post date:** [July 13, 2024, 9:23pm UTC](https://discourse.julialang.org/t/rust-and-julia-bof-at-juliacon-2024/116993/4 "2024-07-13T21:23:21Z")

</div>

Welcome here and thanks for your attention.

I did with an earlier question and was kindly helped. For my current issue I was thinking about a pure rust example which resembles best what I am trying to do. But until today I haven’t done it yet. So no special reason but just not found the time yet.

I think it’s likely to be similar the `7guis\cells.rs` with the task to add rows dynamically to the cell matrix (if possible).

---

<div class="post-metadata">

**Author:** ![hunger](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hunger/32/210649_2.png) [@hunger](https://discourse.julialang.org/u/hunger)\
**Post date:** [July 14, 2024, 12:09am UTC](https://discourse.julialang.org/t/rust-and-julia-bof-at-juliacon-2024/116993/5 "2024-07-14T00:09:08Z")

</div>

Wonderful. I am not really good in the language area myself, so I am notmsure how much Incan helpmwith this specific issue, but my colleagues can help:-)

I know about julia, but never looked into the language, sorry, I stumbled over your post via google alerts:-)

---

<div class="post-metadata">

**Author:** ![era127](https://avatars.discourse-cdn.com/v4/letter/e/eb8c5e/32.png) [@era127](https://discourse.julialang.org/u/era127)\
**Post date:** [July 14, 2024, 4:20am UTC](https://discourse.julialang.org/t/rust-and-julia-bof-at-juliacon-2024/116993/6 "2024-07-14T04:20:18Z")

</div>

I think the ability to pass a `RecordBatchIterator ` using the Arrow ffi C api would be helpful to stream data between Rust and Arrow.jl without having to copy it. It would make it easier to integrate the Tables.jl interface and all of the crates that work with arrow.
