From the course: Rust LLMOps

Unlock this course with a free trial

Join today to access over 25,600 courses taught by industry experts.

Candle hello world

Candle hello world - Rust Tutorial

From the course: Rust LLMOps

Candle hello world

- [Instructor] All right, here I have a GitHub codespace that's got everything set up to do GPU-based development in Rust. I can type in rustc --version. That's installed. I can also type in make verify, and this shows me the compute cap and also shows me that the Cuda compiler driver is there. So next up, what I'm going to do is I'm going to follow the Hugging Face Rust Candle documentation, and I'm going to say cargo new myapp. Okay, let's go ahead and do that, cargo new myapp. All right, next up, we'll go ahead and cd into myapp. And what I like to do is just copy my own make file into a project. So we'll say, let's look above us and put the make file down here. That way I can use all of those commands and use shortcuts. And then, at this point, we can just do cargo build and it'll be ready to go. So, if I don't want to add the Cuda support, though, first let's build it without GPU. Let's go ahead and do cargo add command. So this is kind of nice. All I have to do you is type in…

Contents