Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error.

Understanding/Setting up Bela and Development Environement for Rust

woodwindblues

Hello,

Are there any Resources on how to set up Bela and its Development Environement for Rust instead of C++? I found Bela-rs and Bela-sys, but I don't quite understand how it all fits together, yet. As far as I understand it, I would have to:
1. Set up Bela-sys according to it's readme.
2. Add Bela-rs as github-dependency to my Rust project.
3. Build my project according to the instructions in the Bela-sys readme.

This would mean I would/could not use the Bela Browser IDE for my Rust projects, but I could still use it for C++/Supercollider/CSound/PD projects, that I could install alongside my Rust program?

Am I getting this right?


giuliomoro

woodwindblues This would mean I would/could not use the Bela Browser IDE for my Rust projects, but I could still use it for C++/Supercollider/CSound/PD projects, that I could install alongside my Rust program?

that sounds about right, however if the build process of a rust program can be scripted as a series of compile/link steps (and I am sure it can), we could look into integrating that in the IDE.

I have not tried any of the Rust stuff myself, as unfortunately I haven't had a chance yet to get up to speed with Rust, but it seems that the most recent efforts are those undertaken by @l0calh05t and @ErikNatanael, who may be able to provide some further clarifications and share their preferred workflows.


plate-of-shrimp

I was able to build a tone program with bela-sys, without using bela-rs. So I didn't need to do (2). The bela-sys README says this should be expected. By that same README, If you use bela-rs, on the other hand, you can optionally use bela-sys.

And yes, in both cases you don't use the IDE, you are building the program on your desktop computer and copying it to the Bela to run it ("cross compilation").


l0calh05t

Sorry for the late reply. Didn’t see the notification. You can try basing your projects off my template https://github.com/l0calh05t/bela-template I also documented a lot of my process on my blog https://electric-snow.net I haven’t updated that series in a while since I’ve been busy with other stuff (analog electronics, building a bass, etc).

Please note that I use a branch/fork (next branch on my fork) of bela-rs, not the original