Rust: تفاوت بین نسخهها
از ویکی فارسی اوبونتو
(ساخت صفحه) |
|||
| سطر ۱: | سطر ۱: | ||
'''Rust''' یک زبان برنامهنویسی است. | '''Rust''' یک زبان برنامهنویسی است. | ||
| + | |||
| + | == نصب == | ||
| + | |||
| + | برای نصب کامپایلر رااست از فرمان زیر استفاده کنید. | ||
| + | |||
| + | {{bc| | ||
| + | $ sudo apt install rustc cargo | ||
| + | }} | ||
| + | |||
| + | ==اجرا== | ||
| + | {{bc| | ||
| + | $ cat hello.rs | ||
| + | // This is the main function. | ||
| + | fn main() { | ||
| + | // Statements here are executed when the compiled binary is called. | ||
| + | |||
| + | // Print text to the console. | ||
| + | println!("Hello World!"); | ||
| + | } | ||
| + | $ rustc hello.rs | ||
| + | $ ./hello | ||
| + | Hello World! | ||
| + | }} | ||
| + | |||
| + | |||
[[رده: زبانهای برنامهنویسی]] | [[رده: زبانهای برنامهنویسی]] | ||
نسخهٔ ۱۹ خرداد ۱۴۰۳، ساعت ۱۶:۱۲
Rust یک زبان برنامهنویسی است.
نصب
برای نصب کامپایلر رااست از فرمان زیر استفاده کنید.
$ sudo apt install rustc cargo
اجرا
$ cat hello.rs
// This is the main function.
fn main() {
// Statements here are executed when the compiled binary is called.
// Print text to the console.
println!("Hello World!");
}
$ rustc hello.rs
$ ./hello
Hello World!