To execute/run commands with Rust, you can make use of the 'Command' struct found in the standard library. The struct is an interface between you and the command-line, allowing you to run commands and get the output you may need. It also lets you pass in arguments in a clear and effective way.
In this video I go over an example of how we can run a small Python script with Rust by using the Command struct, and then print the output.
For your reference, check this out:
https://doc.rust-lang.org/std/process...
Follow me on Twitter @dcode!
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
Смотрите видео Rust Programming Tutorial #40 - Running/Executing Commands (CLI) онлайн, длительностью часов минут секунд в хорошем качестве, которое загружено на канал dcode 25 Февраль 2018. Делитесь ссылкой на видео в социальных сетях, чтобы ваши подписчики и друзья так же посмотрели это видео. Данный видеоклип посмотрели 16,245 раз и оно понравилось 344 посетителям.