Rust language

Been reading about the Rust programming language. Looks very interesting and promising. I wonder if it could be linked into Juce somehow - or perhaps another cross-platform audio framework will come out of it. 

It currently has bindings with Port Audio. 

 

 

3 Likes

Rust has just reached version 1.0 ! 

http://blog.rust-lang.org/2015/05/15/Rust-1.0.html

Can't see many examples of using it for audio apps but it looks promising... 

I'm obviously a little late to this thread, but the Servo team at Mozilla is discussing implementing the Web Audio API (https://github.com/servo/servo/issues/6710), which seems like a good project to follow if you're interested in Rust and its audio applications. It's still extremely early stage, but I've got my eye on it.

1 Like

Looks like that project is moving along nicely:

I’ve been using Rust, alongside C++, for over a year now. I find it very difficult to learn, but what it offers is amazing. I’ve built quite a few tools I’ve needed with Rust.

Curious to hear what others think about it.

1 Like

I’ve convinced a client to use it for an upcoming project for a signal processing backend and CLI tool. It’ll be my first proper foray into Rust. I’ll report back once I’ve got my feet wet!

2 Likes

It’s a great language, but the learning curve is pretty ridiculous. I just finished implementing a prefix tree with it. I also built a serial number generator with it. I haven’t had the chance to do anything audio-related yet, but I think I’ll attempt it soon.

1 Like

Implementing data structures is like the worst way to learn that language.

There’s a rust-audio discourse out there if anyone is interested

1 Like

Would you be willing to elaborate on why you think data structures are the worst projects to use to learn Rust?

I’ve written maybe 8-10 toy projects using Rust and so far, the prefix tree has been the thing that has taught me the most, so I think it actually was the most informative projective I’ve done with it. I ended up using pointers, RefCell, Options, Results, Vec, etc; it’s been challenging, but great.

I like this booklet a lot on linked lists in Rust. It brings up a lot of the hazards in handrolling data data structures.

I think trees are pretty straightforward in Rust via enum variants, but the moment you start throwing unsafe code around you can get careless just like in C/C++. Sticking to idiomatic, safe Rust really helps you appreciate the borrow checker and understand it.

I think building something like an echo/chat server is a much better introduction to the language.

I actually used that book for reference a few times. I did mention it was a “toy project” because I wouldn’t ever use my own encryption or data structures in a serious project.

I didn’t need to use unsafe Rust at all. To me, using unsafe Rust, unless you absolutely can’t avoid it, sort of defeats the purpose of even using it. If I think I I’d ever need to use unsafe Rust, I’d just use C++.

1 Like

Also, the chat project you mentioned sounds great, but that really is beyond me. I probably couldn’t build a chat server even in a language I’m most fluent in, like C++, otherwise I would.