From the course: Using Rust with Python
Unlock this course with a free trial
Join today to access over 23,200 courses taught by industry experts.
Embedded Rust CLI test - Rust Tutorial
From the course: Using Rust with Python
Embedded Rust CLI test
- [Instructor] Here we have a diagram of what I would consider a best practice for building out embedded Python tools with Rust is that not only do we have the command lane interface here, but we need to ensure that the business logic will have continuity in the face of changes or you know, other developers working on the projects, et cetera. You can't just assume that the business logic will work, even if it compiles the tool works, there could be an issue. So we need to validate the input by writing a unit test. So let's go ahead and take a look at how we would do that. So first up here you can see again the code, but we're going to get into a GitHub code space here and look through the logic. So we see here that this is a CLI tool that wraps Py03 embedded Python code and it takes input. Now what is the input that it's actually going to take and what's it actually going to do? Well if we go through here, we can see that it's going to expect Marco, but in this case it's going to…
Contents
-
-
Introduction: Instructor45s
-
Introduction: Rust and Python5m
-
PyO3 installation4m 15s
-
(Locked)
Basic Rust library4m 46s
-
(Locked)
Rust to Python3m 33s
-
(Locked)
Rust ownership model4m 59s
-
(Locked)
Diagram of a PyO3 project3m 40s
-
(Locked)
Python calculator CLI3m 54s
-
(Locked)
PyO3 features2m 38s
-
(Locked)
PyO3 exceptions4m 21s
-
(Locked)
Call Python from Rust5m 53s
-
(Locked)
Run Python with embedded Rust4m 47s
-
(Locked)
Embedded Rust CLI diagram3m 34s
-
(Locked)
Embedded Rust CLI4m 31s
-
(Locked)
Embedded Rust CLI test4m 59s
-
(Locked)
Rust-built Python tools3m 52s
-
(Locked)
Using the Rust Ruff linter5m 15s
-
(Locked)
Using Polars in Python with Rust4m 9s
-
(Locked)
Polars CLI in Rust4m
-
(Locked)
Polars CLI test in Rust4m 21s
-
(Locked)
Polars CLI integration test3m 29s
-
(Locked)
Polars criterion benchmarking5m 39s
-