Created
November 29, 2024 10:24
-
-
Save yoeven/cc4cbe08d7224ea9c756fb5714db67f5 to your computer and use it in GitHub Desktop.
JigsawStack AI Web Search vs Exa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"requestId": "730e36306316f1c5e5b823eb5e180db1", | |
"autopromptString": "Heres how to get started with Rust:", | |
"resolvedSearchType": "neural", | |
"results": [ | |
{ | |
"score": 0.19925512373447418, | |
"title": "Getting started", | |
"id": "https://www.rust-lang.org/learn/get-started", | |
"url": "https://www.rust-lang.org/learn/get-started", | |
"publishedDate": "2022-01-01T20:22:00.000Z", | |
"author": "", | |
"text": "<div><div>\n<header>\n<p>\n</p><h2>Quickly set up a Rust development environment and write a small app!</h2>\n<p></p>\n</header>\n<div>\n<header>\n<h2>Installing Rust</h2>\n</header>\n<p>You can try Rust online in the Rust Playground without installing anything on your computer.</p>\n<p><a href=\"https://play.rust-lang.org/\">Try Rust without installing</a></p><hr/>\n<h3>Rustup: the Rust installer and version management tool</h3>\n<p>The primary way that folks install Rust is through a tool called Rustup, which is a Rust installer and version management tool.</p>\n<div>\n<div>\n<p>It looks like you’re running macOS, Linux, or another Unix-like OS. To download Rustup and install Rust, run the following in your terminal, then follow the on-screen instructions. See <a href=\"https://forge.rust-lang.org/infra/other-installation-methods.html\">\"Other Installation Methods\"</a> if you are on Windows.</p>\n<pre><code>curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>\n</div>\n<div>\n<p>It looks like you’re running Windows. To start using Rust, download the installer, then run the program and follow the onscreen instructions. You may need to install the <a href=\"https://visualstudio.microsoft.com/visual-cpp-build-tools/\">Visual Studio C++ Build tools</a> when prompted to do so. If you are not on Windows see <a href=\"https://forge.rust-lang.org/infra/other-installation-methods.html\">\"Other Installation Methods\"</a>.</p>\n<h3>Windows Subsystem for Linux</h3>\n<p>If you’re a Windows Subsystem for Linux user run the following in your terminal, then follow the on-screen instructions to install Rust.</p>\n<pre><code>curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>\n</div>\n<div>\n<div>\n<p>\nTo install Rust, if you are running a Unix such as WSL, Linux or macOS,<br/> run the following in your terminal, then follow the on-screen instructions.\n</p>\n<pre><code>curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>\n</div>\n<hr/>\n<p>\nIf you are running Windows,<br/>download and run <a href=\"https://win.rustup.rs\">rustup‑init.exe</a> then follow the on-screen instructions.\n</p>\n</div>\n</div>\n<br/>\n<h3>Is Rust up to date?</h3>\n<p>Rust updates very frequently. If you have installed Rustup some time ago, chances are your Rust version is out of date. Get the latest version of Rust by running <code>rustup update</code>.</p>\n<p><a href=\"https://www.rust-lang.org/tools/install\">Learn more about installation</a></p><hr/>\n<h3>Cargo: the Rust build tool and package manager</h3>\n<p>When you install Rustup you’ll also get the latest stable version of the Rust build tool and package manager, also known as Cargo. Cargo does lots of things:</p>\n<ul>\n<li>build your project with <code>cargo build</code></li>\n<li>run your project with <code>cargo run</code></li>\n<li>test your project with <code>cargo test</code></li>\n<li>build documentation for your project with <code>cargo doc</code></li>\n<li>publish a library to <a href=\"https://crates.io\">crates.io</a> with <code>cargo publish</code></li>\n</ul>\n<p>To test that you have Rust and Cargo installed, you can run this in your terminal of choice:</p>\n<p><code>cargo --version</code></p>\n<p><a href=\"https://doc.rust-lang.org/cargo/index.html\">Read the cargo book</a></p><hr/>\n<h3>Other tools</h3>\n<p>Rust support is available in many editors:</p>\n</div>\n<div>\n<header>\n<h2>Generating a new project</h2>\n</header>\n<p>Let’s write a small application with our new Rust development environment. To start, we’ll use Cargo to make a new project for us. In your terminal of choice run:</p>\n<p><code>cargo new hello-rust</code></p>\n<p>This will generate a new directory called <code>hello-rust</code> with the following files:</p>\n<pre><code>hello-rust\n|- Cargo.toml\n|- src\n|- main.rs</code></pre>\n<p><code>Cargo.toml</code> is the manifest file for Rust. It’s where you keep metadata for your project, as well as dependencies.</p>\n<p><code>src/main.rs</code> is where we’ll write our application code.</p>\n<hr/>\n<p>The <code>cargo new</code> step generated a \"Hello, world!\" project for us! We can run this program by moving into the new directory that we made and running this in our terminal:</p>\n<p><code>cargo run</code></p>\n<p>You should see this in your terminal:</p>\n<pre><code>$ cargo run\nCompiling hello-rust v0.1.0 (/Users/ag_dubs/rust/hello-rust)\nFinished dev [unoptimized + debuginfo] target(s) in 1.34s\nRunning `target/debug/hello-rust`\nHello, world!</code></pre>\n</div>\n<div>\n<header>\n<h2>Adding dependencies</h2>\n</header>\n<p>Let’s add a dependency to our application. You can find all sorts of libraries on <a href=\"https://crates.io\">crates.io</a>, the package registry for Rust. In Rust, we often refer to packages as “crates.”</p>\n<p>In this project, we’ll use a crate called <a href=\"https://crates.io/crates/ferris-says\"><code>ferris-says</code></a>.\n</p><p>In our <code>Cargo.toml</code> file we’ll add this information (that we got from the crate page):</p>\n<pre><code>[dependencies]\nferris-says = \"0.3.1\"</code></pre>\n<p>We can also do this by running <code>cargo add ferris-says</code>.</p>\n<p>Now we can run:</p>\n<p><code>cargo build</code></p>\n<p>...and Cargo will install our dependency for us.</p>\n<p>You’ll see that running this command created a new file for us, <code>Cargo.lock</code>. This file is a log of the exact versions of the dependencies we are using locally.</p>\n<p>To use this dependency, we can open <code>main.rs</code>, remove everything that’s in there (it’s just another example), and add this line to it:</p>\n<pre><code>use ferris_says::say;</code></pre>\n<p>This line means that we can now use the <code>say</code> function that the <code>ferris-says</code> crate exports for us.</p>\n</div>\n<div>\n<header>\n<h2>A small Rust application</h2>\n</header>\n<p>Now let’s write a small application with our new dependency. In our <code>main.rs</code>, add the following code:</p>\n<pre><code>use ferris_says::say; // from the previous step\nuse std::io::{stdout, BufWriter};\nfn main() {\nlet stdout = stdout();\nlet message = String::from(\"Hello fellow Rustaceans!\");\nlet width = message.chars().count();\nlet mut writer = BufWriter::new(stdout.lock());\nsay(&message, width, &mut writer).unwrap();\n}</code></pre>\n<p>Once we save that, we can run our application by typing:</p>\n<p><code>cargo run</code></p>\n<p>Assuming everything went well, you should see your application print this to the screen:</p>\n<pre><code> __________________________\n< Hello fellow Rustaceans! >\n--------------------------\n\\\n\\\n_~^~^~_\n\\) / o o \\ (/\n'_ - _'\n/ '-----' \\</code></pre>\n</div>\n<div>\n<header>\n<h2>Learn more!</h2>\n</header>\n<p>You’re a Rustacean now! Welcome! We’re so glad to have you. When you’re ready, hop over to our Learn page, where you can find lots of books that will help you to continue on your Rust adventure.</p>\n<p><a href=\"https://www.rust-lang.org/learn\">learn more!</a>\n</p></div>\n<div>\n<header>\n<h2>Who’s this crab, Ferris?</h2>\n</header>\n<p>Ferris is the unofficial mascot of the Rust Community. Many Rust programmers call themselves “Rustaceans,” a play on the word “<a href=\"https://en.wikipedia.org/wiki/Crustacean\">crustacean</a>.” We refer to Ferris with any pronouns “she,” “he,” “they,” “it,” etc.</p>\n<p>Ferris is a name playing off of the adjective, “ferrous,” meaning of or pertaining to iron. Since Rust often forms on iron, it seemed like a fun origin for our mascot’s name!</p>\n<p>You can find more images of Ferris on <a href=\"https://rustacean.net/\">rustacean.net</a>.\n</p></div>\n</div></div>", | |
"summary": "To get started with Rust, you can either use the online Rust Playground or install Rustup, the official installer. For Unix-like systems (macOS, Linux), run `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` in your terminal. Windows users should download and run `rustup-init.exe`. After installation, ensure you have the latest version using `rustup update`. Rustup also includes Cargo, the build tool and package manager, which you can verify with `cargo --version`. To create a new project, use `cargo new hello-rust`. This creates a `hello-rust` directory containing `Cargo.toml` (project metadata) and `src/main.rs` (where you write code).\n", | |
"image": "https://www.rust-lang.org/static/images/rust-social-wide.jpg", | |
"favicon": "https://www.rust-lang.org/static/images/favicon-32x32.png", | |
"highlights": [ | |
"To test that you have Rust and Cargo installed, you can run this in your terminal of choice: Let’s write a small application with our new Rust development environment. To start, we’ll use Cargo to make a new project for us. In your terminal of choice run: This will generate a new directory called hello-rust with the following files:" | |
], | |
"highlightScores": [ | |
0.4894680678844452 | |
] | |
}, | |
{ | |
"score": 0.19035981595516205, | |
"title": "Hello, World! - The Rust Programming Language", | |
"id": "https://doc.rust-lang.org/book/ch01-02-hello-world.html", | |
"url": "https://doc.rust-lang.org/book/ch01-02-hello-world.html", | |
"publishedDate": "2018-01-01T00:00:00.000Z", | |
"author": "", | |
"text": "<div><div>\n<div>\n<main>\n<p>Now that you’ve installed Rust, it’s time to write your first Rust program.\nIt’s traditional when learning a new language to write a little program that\nprints the text <code>Hello, world!</code> to the screen, so we’ll do the same here!</p>\n<section>\n<p>Note: This book assumes basic familiarity with the command line. Rust makes\nno specific demands about your editing or tooling or where your code lives, so\nif you prefer to use an integrated development environment (IDE) instead of\nthe command line, feel free to use your favorite IDE. Many IDEs now have some\ndegree of Rust support; check the IDE’s documentation for details. The Rust\nteam has been focusing on enabling great IDE support via <code>rust-analyzer</code>. See\n<a href=\"https://doc.rust-lang.org/book/appendix-04-useful-development-tools.html\">Appendix D</a> for more details.</p>\n</section>\n<h3><a href=\"#creating-a-project-directory\">Creating a Project Directory</a></h3>\n<p>You’ll start by making a directory to store your Rust code. It doesn’t matter\nto Rust where your code lives, but for the exercises and projects in this book,\nwe suggest making a <em>projects</em> directory in your home directory and keeping all\nyour projects there.</p>\n<p>Open a terminal and enter the following commands to make a <em>projects</em> directory\nand a directory for the “Hello, world!” project within the <em>projects</em> directory.</p>\n<p>For Linux, macOS, and PowerShell on Windows, enter this:</p>\n<pre><code>$ mkdir ~/projects\n$ cd ~/projects\n$ mkdir hello_world\n$ cd hello_world\n</code></pre>\n<p>For Windows CMD, enter this:</p>\n<pre><code>> mkdir \"%USERPROFILE%\\projects\"\n> cd /d \"%USERPROFILE%\\projects\"\n> mkdir hello_world\n> cd hello_world\n</code></pre>\n<h3><a href=\"#writing-and-running-a-rust-program\">Writing and Running a Rust Program</a></h3>\n<p>Next, make a new source file and call it <em>main.rs</em>. Rust files always end with\nthe <em>.rs</em> extension. If you’re using more than one word in your filename, the\nconvention is to use an underscore to separate them. For example, use\n<em>hello_world.rs</em> rather than <em>helloworld.rs</em>.</p>\n<p>Now open the <em>main.rs</em> file you just created and enter the code in Listing 1-1.</p>\n<figure>\n<span>Filename: main.rs</span>\n<pre><pre><code>fn main() {\nprintln!(\"Hello, world!\");\n}</code></pre></pre>\n<figcaption>Listing 1-1: A program that prints <code>Hello, world!</code></figcaption>\n</figure>\n<p>Save the file and go back to your terminal window in the\n<em>~/projects/hello_world</em> directory. On Linux or macOS, enter the following\ncommands to compile and run the file:</p>\n<pre><code>$ rustc main.rs\n$ ./main\nHello, world!\n</code></pre>\n<p>On Windows, enter the command <code>.\\main.exe</code> instead of <code>./main</code>:</p>\n<pre><code>> rustc main.rs\n> .\\main.exe\nHello, world!\n</code></pre>\n<p>Regardless of your operating system, the string <code>Hello, world!</code> should print to\nthe terminal. If you don’t see this output, refer back to the\n<a href=\"https://doc.rust-lang.org/book/ch01-01-installation.html#troubleshooting\">“Troubleshooting”</a> part of the Installation\nsection for ways to get help.</p>\n<p>If <code>Hello, world!</code> did print, congratulations! You’ve officially written a Rust\nprogram. That makes you a Rust programmer—welcome!</p>\n<h3><a href=\"#anatomy-of-a-rust-program\">Anatomy of a Rust Program</a></h3>\n<p>Let’s review this “Hello, world!” program in detail. Here’s the first piece of\nthe puzzle:</p>\n<pre><pre><code>fn main() {\n}</code></pre></pre>\n<p>These lines define a function named <code>main</code>. The <code>main</code> function is special: it\nis always the first code that runs in every executable Rust program. Here, the\nfirst line declares a function named <code>main</code> that has no parameters and returns\nnothing. If there were parameters, they would go inside the parentheses <code>()</code>.</p>\n<p>The function body is wrapped in <code>{}</code>. Rust requires curly brackets around all\nfunction bodies. It’s good style to place the opening curly bracket on the same\nline as the function declaration, adding one space in between.</p>\n<section>\n<p>Note: If you want to stick to a standard style across Rust projects, you can\nuse an automatic formatter tool called <code>rustfmt</code> to format your code in a\nparticular style (more on <code>rustfmt</code> in\n<a href=\"https://doc.rust-lang.org/book/appendix-04-useful-development-tools.html\">Appendix D</a>). The Rust team has included this tool\nwith the standard Rust distribution, as <code>rustc</code> is, so it should already be\ninstalled on your computer!</p>\n</section>\n<p>The body of the <code>main</code> function holds the following code:</p>\n<pre><pre><code><span>#![allow(unused)]\n</span><span>fn main() {\n</span> println!(\"Hello, world!\");\n<span>}</span></code></pre></pre>\n<p>This line does all the work in this little program: it prints text to the\nscreen. There are four important details to notice here.</p>\n<p>First, Rust style is to indent with four spaces, not a tab.</p>\n<p>Second, <code>println!</code> calls a Rust macro. If it had called a function instead, it\nwould be entered as <code>println</code> (without the <code>!</code>). We’ll discuss Rust macros in\nmore detail in Chapter 19. For now, you just need to know that using a <code>!</code>\nmeans that you’re calling a macro instead of a normal function and that macros\ndon’t always follow the same rules as functions.</p>\n<p>Third, you see the <code>\"Hello, world!\"</code> string. We pass this string as an argument\nto <code>println!</code>, and the string is printed to the screen.</p>\n<p>Fourth, we end the line with a semicolon (<code>;</code>), which indicates that this\nexpression is over and the next one is ready to begin. Most lines of Rust code\nend with a semicolon.</p>\n<h3><a href=\"#compiling-and-running-are-separate-steps\">Compiling and Running Are Separate Steps</a></h3>\n<p>You’ve just run a newly created program, so let’s examine each step in the\nprocess.</p>\n<p>Before running a Rust program, you must compile it using the Rust compiler by\nentering the <code>rustc</code> command and passing it the name of your source file, like\nthis:</p>\n<pre><code>$ rustc main.rs\n</code></pre>\n<p>If you have a C or C++ background, you’ll notice that this is similar to <code>gcc</code>\nor <code>clang</code>. After compiling successfully, Rust outputs a binary executable.</p>\n<p>On Linux, macOS, and PowerShell on Windows, you can see the executable by\nentering the <code>ls</code> command in your shell:</p>\n<pre><code>$ ls\nmain main.rs\n</code></pre>\n<p>On Linux and macOS, you’ll see two files. With PowerShell on Windows, you’ll\nsee the same three files that you would see using CMD. With CMD on Windows, you\nwould enter the following:</p>\n<pre><code>> dir /B %= the /B option says to only show the file names =%\nmain.exe\nmain.pdb\nmain.rs\n</code></pre>\n<p>This shows the source code file with the <em>.rs</em> extension, the executable file\n(<em>main.exe</em> on Windows, but <em>main</em> on all other platforms), and, when using\nWindows, a file containing debugging information with the <em>.pdb</em> extension.\nFrom here, you run the <em>main</em> or <em>main.exe</em> file, like this:</p>\n<pre><code>$ ./main # or .\\main.exe on Windows\n</code></pre>\n<p>If your <em>main.rs</em> is your “Hello, world!” program, this line prints <code>Hello, world!</code> to your terminal.</p>\n<p>If you’re more familiar with a dynamic language, such as Ruby, Python, or\nJavaScript, you might not be used to compiling and running a program as\nseparate steps. Rust is an <em>ahead-of-time compiled</em> language, meaning you can\ncompile a program and give the executable to someone else, and they can run it\neven without having Rust installed. If you give someone a <em>.rb</em>, <em>.py</em>, or\n<em>.js</em> file, they need to have a Ruby, Python, or JavaScript implementation\ninstalled (respectively). But in those languages, you only need one command to\ncompile and run your program. Everything is a trade-off in language design.</p>\n<p>Just compiling with <code>rustc</code> is fine for simple programs, but as your project\ngrows, you’ll want to manage all the options and make it easy to share your\ncode. Next, we’ll introduce you to the Cargo tool, which will help you write\nreal-world Rust programs.</p>\n</main>\n<nav>\n<a href=\"https://doc.rust-lang.org/book/ch01-01-installation.html\">\n<i></i>\n</a>\n<a href=\"https://doc.rust-lang.org/book/ch01-03-hello-cargo.html\">\n<i></i>\n</a>\n</nav>\n</div>\n<nav>\n<a href=\"https://doc.rust-lang.org/book/ch01-01-installation.html\">\n<i></i>\n</a>\n<a href=\"https://doc.rust-lang.org/book/ch01-03-hello-cargo.html\">\n<i></i>\n</a>\n</nav>\n</div></div>", | |
"summary": "To start with Rust, first install it. Then, create a project directory (e.g., `~/projects/hello_world`). Create a file named `main.rs` with the code `fn main() { println!(\"Hello, world!\"); }`. Compile it using `rustc main.rs` and run it using `./main` (or `.\\main.exe` on Windows). This will print \"Hello, world!\" to your terminal. The `main` function is the entry point of every Rust program. For more detailed installation instructions and troubleshooting, refer to the official Rust documentation.\n", | |
"favicon": "https://doc.rust-lang.org/book/favicon.svg", | |
"highlights": [ | |
"Now that you’ve installed Rust, it’s time to write your first Rust program. It’s traditional when learning a new language to write a little program that prints the text Hello, world! to the screen, so we’ll do the same here! Note: This book assumes basic familiarity with the command line." | |
], | |
"highlightScores": [ | |
0.5539560914039612 | |
] | |
}, | |
{ | |
"score": 0.18558505177497864, | |
"title": "Learn Rust", | |
"id": "https://www.rust-lang.org/learn", | |
"url": "https://www.rust-lang.org/learn", | |
"publishedDate": "", | |
"author": "", | |
"text": "<div><div>\n<header>\n</header>\n<div>\n<header>\n<h2>Get started with Rust</h2>\n</header>\n<section>\n<div>\n<p>Affectionately nicknamed “the book,” <cite>The Rust Programming Language</cite> will give you an overview of the language from first principles. You’ll build a few projects along the way, and by the end, you’ll have a solid grasp of the language.</p>\n</div>\n<div>\n<p>Alternatively, Rustlings guides you through downloading and setting up the Rust toolchain, and teaches you the basics of reading and writing Rust syntax, on the command line. It's an alternative to Rust by Example that works with your own environment.</p>\n</div>\n<div>\n<p>If reading multiple hundreds of pages about a language isn’t your style, then Rust By Example has you covered. While the book talks about code with a lot of words, RBE shows off a bunch of code, and keeps the talking to a minimum. It also includes exercises!</p>\n</div>\n</section>\n</div>\n<div>\n<header>\n<h2>\nDocumentation\n</h2>\n</header>\n<div>\n<h3>Read the core documentation</h3>\n<p>All of this documentation is also available locally using the <code>rustup doc</code> command, which will open up these resources for you in your browser without requiring a network connection!</p>\n<section>\n<div>\n<p><a href=\"https://doc.rust-lang.org/cargo/index.html\">Cargo Book</a></p><p>\nA book on Rust’s package manager and build system.\n</p>\n</div>\n<div>\n<p><a href=\"https://doc.rust-lang.org/rustdoc/index.html\">rustdoc Book</a></p><p>\nLearn how to make awesome documentation for your crate.\n</p>\n</div>\n<div>\n<p><a href=\"https://doc.rust-lang.org/rustc/index.html\">rustc Book</a></p><p>\nFamiliarize yourself with the knobs available in the Rust compiler.\n</p>\n</div>\n</section>\n</div>\n<hr/>\n<div>\n<h3>Build your skills in an application domain</h3>\n<section>\n<div>\n<p><a href=\"https://rustwasm.github.io/docs/book/\">\nWebAssembly Book\n</a></p><p>\nUse Rust to build browser-native libraries through WebAssembly.\n</p>\n</div>\n<div>\n<p><a href=\"https://doc.rust-lang.org/embedded-book\">\nEmbedded Book\n</a></p><p>\nBecome proficient with Rust for Microcontrollers and other embedded systems.\n</p>\n</div>\n</section>\n</div>\n</div>\n<div>\n<header>\n<h2>Master Rust</h2>\n</header>\n<p>Curious about the darkest corners of the language? Here’s where you can get into the nitty-gritty:</p>\n<section>\n<div>\n<p>\n</p>\n<div>\n<p>The Reference is not a formal spec, but is more detailed and comprehensive than the book.</p>\n<p><a href=\"https://doc.rust-lang.org/reference/index.html\">\nRead the reference\n</a>\n</p></div>\n</div>\n<div>\n<p>\n</p>\n<div>\n<p>The Rustonomicon is your guidebook to the dark arts of unsafe Rust. It’s also sometimes called “the ’nomicon.”</p>\n<p><a href=\"https://doc.rust-lang.org/nomicon/index.html\">\nRead the ’nomicon\n</a>\n</p></div>\n</div>\n<div>\n<p>\n</p>\n<div>\n<p>The Unstable Book has documentation for unstable features that you can only use with nightly Rust.</p>\n<p><a href=\"https://doc.rust-lang.org/nightly/unstable-book/index.html\">\nRead the unstable book\n</a>\n</p></div>\n</div>\n</section>\n</div>\n</div></div>", | |
"summary": "To get started with Rust, you have several options: \"The Rust Programming Language\" (nicknamed \"the book\") provides a comprehensive overview with example projects. Alternatively, Rustlings offers a command-line based tutorial focusing on syntax and toolchain setup. For a more concise approach, Rust By Example uses code examples with minimal text and includes exercises.\n", | |
"image": "https://www.rust-lang.org/static/images/rust-social-wide.jpg", | |
"favicon": "https://www.rust-lang.org/static/images/favicon-32x32.png", | |
"highlights": [ | |
"Affectionately nicknamed “the book,” The Rust Programming Language will give you an overview of the language from first principles. You’ll build a few projects along the way, and by the end, you’ll have a solid grasp of the language. Alternatively, Rustlings guides you through downloading and setting up the Rust toolchain, and teaches you the basics of reading and writing Rust syntax, on the command line. It's an alternative to Rust by Example that works with your own environment. If reading multiple hundreds of pages about a language isn’t your style, then Rust By Example has you covered." | |
], | |
"highlightScores": [ | |
0.6042646765708923 | |
] | |
}, | |
{ | |
"score": 0.18556015193462372, | |
"title": "Getting Started", | |
"id": "https://doc.rust-lang.org/book/getting-started.html", | |
"url": "https://doc.rust-lang.org/book/getting-started.html", | |
"publishedDate": "2011-01-01T00:00:00.000Z", | |
"author": "", | |
"text": "<div><p><small>There is a new edition of the book and this is an old link.</small></p><div><p>\nCopyright © 2011 The Rust Project Developers. Licensed under the\n<a href=\"http://www.apache.org/licenses/LICENSE-2.0\">Apache License, Version 2.0</a>\nor the <a href=\"https://opensource.org/licenses/MIT\">MIT license</a>, at your option.\n</p><p>\nThis file may not be copied, modified, or distributed except according to those terms.\n</p></div></div>", | |
"summary": "This page is outdated. To learn how to get started with Rust, you'll need to find the current edition of the Rust book. The link provided is obsolete.\n", | |
"favicon": "https://www.rust-lang.org/favicon.ico", | |
"highlights": [ | |
"There is a new edition of the book and this is an old link. Copyright © 2011 The Rust Project Developers. Licensed under the This file may not be copied, modified, or distributed except according to those terms." | |
], | |
"highlightScores": [ | |
0.4037245810031891 | |
] | |
}, | |
{ | |
"score": 0.1812359243631363, | |
"title": "Install Rust", | |
"id": "https://www.rust-lang.org/tools/install", | |
"url": "https://www.rust-lang.org/tools/install", | |
"publishedDate": "2013-01-01T00:00:00.000Z", | |
"author": "", | |
"text": "<div><div>\n<header>\n</header>\n<div>\n<header>\n<h2>Using rustup (Recommended)</h2>\n</header>\n<div>\n<div>\n<p>It looks like you’re running macOS, Linux, or another Unix-like OS. To download Rustup and install Rust, run the following in your terminal, then follow the on-screen instructions. See <a href=\"https://forge.rust-lang.org/infra/other-installation-methods.html\">\"Other Installation Methods\"</a> if you are on Windows.</p>\n<pre><code>curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>\n</div>\n<div>\n<p>It looks like you’re running Windows. To start using Rust, download the installer, then run the program and follow the onscreen instructions. You may need to install the <a href=\"https://visualstudio.microsoft.com/visual-cpp-build-tools/\">Visual Studio C++ Build tools</a> when prompted to do so. If you are not on Windows see <a href=\"https://forge.rust-lang.org/infra/other-installation-methods.html\">\"Other Installation Methods\"</a>.</p>\n<h3>Windows Subsystem for Linux</h3>\n<p>If you’re a Windows Subsystem for Linux user run the following in your terminal, then follow the on-screen instructions to install Rust.</p>\n<pre><code>curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>\n</div>\n<div>\n<div>\n<p>\nTo install Rust, if you are running a Unix such as WSL, Linux or macOS,<br/> run the following in your terminal, then follow the on-screen instructions.\n</p>\n<pre><code>curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>\n</div>\n<hr/>\n<p>\nIf you are running Windows,<br/>download and run <a href=\"https://win.rustup.rs\">rustup‑init.exe</a> then follow the on-screen instructions.\n</p>\n</div>\n</div>\n</div>\n<div>\n<header>\n<h2>Notes about Rust installation</h2>\n</header>\n<div>\n<h3>Getting started</h3>\n<p>\nIf you're just getting started with\nRust and would like a more detailed walk-through, see our\n<a href=\" /learn/get-started\n\">getting started</a> page. </p>\n<h3>Toolchain management with <code>rustup</code></h3>\n<p>\nRust is installed and managed by the\n<a href=\"https://rust-lang.github.io/rustup/\"><code>rustup</code></a>\ntool. Rust has a 6-week\n<a href=\"https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md\">\nrapid release process\n</a> and supports a\n<a href=\"https://forge.rust-lang.org/release/platform-support.html\">great\nnumber of platforms</a>, so there are many builds of Rust available at\nany time. <code>rustup</code> manages these builds in a consistent way\non every platform that Rust supports, enabling installation of Rust\nfrom the beta and nightly release channels as well as support for\nadditional cross-compilation targets.\n</p>\n<p>\nIf you've installed <code>rustup</code> in the past, you can update\nyour installation by running <code>rustup update</code>.\n</p>\n<p>\nFor more information see the\n<a href=\"https://rust-lang.github.io/rustup/\">\n<code>rustup</code> documentation</a>.\n</p>\n<h3>Configuring the <code>PATH</code> environment\nvariable</h3>\n<p>\nIn the Rust development environment, all tools are installed to the\n<span>\n<code>~/.cargo/bin</code>\n</span>\n<span>\n<code>%USERPROFILE%\\.cargo\\bin</code>\n</span> directory, and this is where you will find the Rust toolchain,\nincluding <code>rustc</code>, <code>cargo</code>, and <code>rustup</code>.\n</p>\n<p>\nAccordingly, it is customary for Rust developers to include this\ndirectory in their\n<a href=\"https://en.wikipedia.org/wiki/PATH_(variable)\">\n<code>PATH</code> environment variable</a>. During installation\n<code>rustup</code> will attempt to configure the <code>PATH</code>.\nBecause of differences between platforms, command shells, and bugs in\n<code>rustup</code>, the modifications to <code>PATH</code> may not\ntake effect until the console is restarted, or the user is logged out,\nor it may not succeed at all.\n</p>\n<p>\nIf, after installation, running <code>rustc --version</code> in the\nconsole fails, this is the most likely reason.\n</p>\n<h3>Uninstall Rust</h3>\n<p>\nIf at any point you would like to uninstall Rust, you can run\n<code>rustup self uninstall</code>.\nWe'll miss you though!\n</p>\n</div>\n</div>\n<div>\n<header>\n<h2>Other installation methods</h2>\n</header>\n<p>\nThe installation described above, via\n<code>rustup</code>, is the preferred way to install Rust for most\ndevelopers. However, Rust can be installed via other methods as well.\n</p>\n<p><a href=\"https://forge.rust-lang.org/infra/other-installation-methods.html\">\nLearn more\n</a>\n</p></div>\n</div></div>", | |
"summary": "To get started with Rust, the recommended method is using `rustup`. For macOS, Linux, or other Unix-like systems, run `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` in your terminal and follow the on-screen instructions. Windows users should download and run `rustup-init.exe` from [https://win.rustup.rs](https://win.rustup.rs) and follow the instructions. For a more detailed walkthrough, visit the official getting started page: [https://www.rust-lang.org/learn/get-started](https://www.rust-lang.org/learn/get-started).\n", | |
"image": "https://www.rust-lang.org/static/images/rust-social-wide.jpg", | |
"favicon": "https://www.rust-lang.org/static/images/favicon-32x32.png", | |
"highlights": [ | |
"If at any point you would like to uninstall Rust, you can run rustup, is the preferred way to install Rust for most developers. However, Rust can be installed via other methods as well." | |
], | |
"highlightScores": [ | |
0.5561408996582031 | |
] | |
}, | |
{ | |
"score": 0.18074727058410645, | |
"title": "Hello, world!", | |
"id": "https://doc.rust-lang.org/1.0.0/book/hello-world.html", | |
"url": "https://doc.rust-lang.org/1.0.0/book/hello-world.html", | |
"publishedDate": "", | |
"author": "", | |
"text": "<div><div>\n<p>Now that you have Rust installed, let’s write your first Rust program. It’s\ntraditional to make your first program in any new language one that prints the\ntext “Hello, world!” to the screen. The nice thing about starting with such a\nsimple program is that you can verify that your compiler isn’t just installed,\nbut also working properly. And printing information to the screen is a pretty\ncommon thing to do.</p>\n<p>The first thing that we need to do is make a file to put our code in. I like\nto make a <code>projects</code> directory in my home directory, and keep all my projects\nthere. Rust does not care where your code lives.</p>\n<p>This actually leads to one other concern we should address: this guide will\nassume that you have basic familiarity with the command line. Rust itself makes\nno specific demands on your editing tooling, or where your code lives. If you\nprefer an IDE to the command line, you may want to check out\n<a href=\"https://github.com/oakes/SolidOak\">SolidOak</a>, or wherever plugins are for your favorite IDE. There are\na number of extensions of varying quality in development by the community. The\nRust team also ships <a href=\"https://github.com/rust-lang/rust/blob/master/src/etc/CONFIGS.md\">plugins for various editors</a>. Configuring your\neditor or IDE is out of the scope of this tutorial, so check the documentation\nfor your setup, specifically.</p>\n<p>With that said, let’s make a directory in our projects directory.</p>\n<pre><code>$ mkdir ~/projects\n$ cd ~/projects\n$ mkdir hello_world\n$ cd hello_world\n</code></pre>\n<p>If you’re on Windows and not using PowerShell, the <code>~</code> may not work. Consult\nthe documentation for your shell for more details.</p>\n<p>Let’s make a new source file next. We’ll call our file <code>main.rs</code>. Rust files\nalways end in a <code>.rs</code> extension. If you’re using more than one word in your\nfilename, use an underscore: <code>hello_world.rs</code> rather than <code>helloworld.rs</code>.</p>\n<p>Now that you’ve got your file open, type this in:</p>\n<p><span>fn main() {\nprintln!(\"Hello, world!\");\n}\n</span></p><pre><span>fn</span> <span>main</span>() {\n<span>println</span><span>!</span>(<span>\"Hello, world!\"</span>);\n}\n</pre>\n<p>Save the file, and then type this into your terminal window:</p>\n<pre><code>$ rustc main.rs\n$ ./main # or main.exe on Windows\nHello, world!\n</code></pre>\n<p>Success! Let’s go over what just happened in detail.</p>\n<p><span>fn main() {\n}\n</span></p><pre><span>fn</span> <span>main</span>() {\n}\n</pre>\n<p>These lines define a <em>function</em> in Rust. The <code>main</code> function is special:\nit's the beginning of every Rust program. The first line says \"I’m declaring a\nfunction named <code>main</code> which takes no arguments and returns nothing.\" If there\nwere arguments, they would go inside the parentheses (<code>(</code> and <code>)</code>), and because\nwe aren’t returning anything from this function, we can omit the return type\nentirely. We’ll get to it later.</p>\n<p>You’ll also note that the function is wrapped in curly braces (<code>{</code> and <code>}</code>).\nRust requires these around all function bodies. It is also considered good\nstyle to put the opening curly brace on the same line as the function\ndeclaration, with one space in between.</p>\n<p>Next up is this line:</p>\n<p><span>fn main() {\nprintln!(\"Hello, world!\");\n}</span></p><pre> <span>println</span><span>!</span>(<span>\"Hello, world!\"</span>);\n</pre>\n<p>This line does all of the work in our little program. There are a number of\ndetails that are important here. The first is that it’s indented with four\nspaces, not tabs. Please configure your editor of choice to insert four spaces\nwith the tab key. We provide some <a href=\"https://github.com/rust-lang/rust/tree/master/src/etc/CONFIGS.md\">sample configurations for various\neditors</a>.</p>\n<p>The second point is the <code>println!()</code> part. This is calling a Rust <a href=\"https://doc.rust-lang.org/1.0.0/book/macros.html\">macro</a>,\nwhich is how metaprogramming is done in Rust. If it were a function instead, it\nwould look like this: <code>println()</code>. For our purposes, we don’t need to worry\nabout this difference. Just know that sometimes, you’ll see a <code>!</code>, and that\nmeans that you’re calling a macro instead of a normal function. Rust implements\n<code>println!</code> as a macro rather than a function for good reasons, but that's an\nadvanced topic. One last thing to mention: Rust’s macros are significantly\ndifferent from C macros, if you’ve used those. Don’t be scared of using macros.\nWe’ll get to the details eventually, you’ll just have to trust us for now.</p>\n<p>Next, <code>\"Hello, world!\"</code> is a ‘string’. Strings are a surprisingly complicated\ntopic in a systems programming language, and this is a ‘statically allocated’\nstring. If you want to read further about allocation, check out\n<a href=\"https://doc.rust-lang.org/1.0.0/book/the-stack-and-the-heap.html\">the stack and the heap</a>, but you don’t need to right now if you\ndon’t want to. We pass this string as an argument to <code>println!</code>, which prints the\nstring to the screen. Easy enough!</p>\n<p>Finally, the line ends with a semicolon (<code>;</code>). Rust is an ‘expression oriented’\nlanguage, which means that most things are expressions, rather than statements.\nThe <code>;</code> is used to indicate that this expression is over, and the next one is\nready to begin. Most lines of Rust code end with a <code>;</code>.</p>\n<p>Finally, actually compiling and running our program. We can compile with our\ncompiler, <code>rustc</code>, by passing it the name of our source file:</p>\n<pre><code>$ rustc main.rs\n</code></pre>\n<p>This is similar to <code>gcc</code> or <code>clang</code>, if you come from a C or C++ background. Rust\nwill output a binary executable. You can see it with <code>ls</code>:</p>\n<pre><code>$ ls\nmain main.rs\n</code></pre>\n<p>Or on Windows:</p>\n<pre><code>$ dir\nmain.exe main.rs\n</code></pre>\n<p>There are now two files: our source code, with the <code>.rs</code> extension, and the\nexecutable (<code>main.exe</code> on Windows, <code>main</code> everywhere else)</p>\n<pre><code>$ ./main # or main.exe on Windows\n</code></pre>\n<p>This prints out our <code>Hello, world!</code> text to our terminal.</p>\n<p>If you come from a dynamic language like Ruby, Python, or JavaScript,\nyou may not be used to these two steps being separate. Rust is an\n‘ahead-of-time compiled language’, which means that you can compile a program,\ngive it to someone else, and they don't need to have Rust installed. If you\ngive someone a <code>.rb</code> or <code>.py</code> or <code>.js</code> file, they need to have a\nRuby/Python/JavaScript implementation installed, but you just need one command\nto both compile and run your program. Everything is a tradeoff in language\ndesign, and Rust has made its choice.</p>\n<p>Congratulations! You have officially written a Rust program. That makes you a\nRust programmer! Welcome. 🎊🎉👍</p>\n<p>Next, I'd like to introduce you to another tool, Cargo, which is used to write\nreal-world Rust programs. Just using <code>rustc</code> is nice for simple things, but as\nyour project grows, you'll want something to help you manage all of the options\nthat it has, and to make it easy to share your code with other people and\nprojects.</p>\n</div></div>", | |
"summary": "To start with Rust, create a `projects` directory, then a subdirectory (e.g., `hello_world`). Create a file named `main.rs` inside it, containing: `fn main() { println!(\"Hello, world!\"); }`. Compile with `rustc main.rs` and run with `./main` (or `main.exe` on Windows). This tutorial assumes basic command-line familiarity; IDE users should consult relevant plugins or documentation.\n", | |
"highlights": [ | |
"Now that you have Rust installed, let’s write your first Rust program. It’s traditional to make your first program in any new language one that prints the text “Hello, world!” to the screen. The nice thing about starting with such a simple program is that you can verify that your compiler isn’t just installed," | |
], | |
"highlightScores": [ | |
0.5511966347694397 | |
] | |
}, | |
{ | |
"score": 0.17908117175102234, | |
"title": "Getting Started -", | |
"id": "https://doc.rust-lang.org/1.17.0/book/getting-started.html", | |
"url": "https://doc.rust-lang.org/1.17.0/book/getting-started.html", | |
"publishedDate": "", | |
"author": "", | |
"text": "<div><div>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#getting-started\"></a>\n<p>This first chapter of the book will get us going with Rust and its tooling.\nFirst, we’ll install Rust. Then, the classic ‘Hello World’ program. Finally,\nwe’ll talk about Cargo, Rust’s build system and package manager.</p>\n<p>We’ll be showing off a number of commands using a terminal, and those lines all\nstart with <code>$</code>. You don't need to type in the <code>$</code>s, they are there to indicate\nthe start of each command. We’ll see many tutorials and examples around the web\nthat follow this convention: <code>$</code> for commands run as our regular user, and <code>#</code>\nfor commands we should be running as an administrator.</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#installing-rust\"><h2>Installing Rust</h2></a>\n<p>The first step to using Rust is to install it. Generally speaking, you’ll need\nan Internet connection to run the commands in this section, as we’ll be\ndownloading Rust from the Internet.</p>\n<p>The Rust compiler runs on, and compiles to, a great number of platforms, but is\nbest supported on Linux, Mac, and Windows, on the x86 and x86-64 CPU\narchitecture. There are official builds of the Rust compiler and standard\nlibrary for these platforms and more. <a href=\"https://forge.rust-lang.org/platform-support.html\">For full details on Rust platform support\nsee the website</a>.</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#installing-rust\"><h2>Installing Rust</h2></a>\n<p>All you need to do on Unix systems like Linux and macOS is open a\nterminal and type this:</p>\n<pre><code>$ curl https://sh.rustup.rs -sSf | sh\n</code></pre>\n<p>It will download a script, and start the installation. If everything\ngoes well, you’ll see this appear:</p>\n<pre><code>Rust is installed now. Great!\n</code></pre>\n<p>Installing on Windows is nearly as easy: download and run\n<a href=\"https://win.rustup.rs\">rustup-init.exe</a>. It will start the installation in a console and\npresent the above message on success.</p>\n<p>For other installation options and information, visit the <a href=\"https://www.rust-lang.org/install.html\">install</a>\npage of the Rust website.</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#uninstalling\"><h2>Uninstalling</h2></a>\n<p>Uninstalling Rust is as easy as installing it:</p>\n<pre><code>$ rustup self uninstall\n</code></pre>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#troubleshooting\"><h2>Troubleshooting</h2></a>\n<p>If we've got Rust installed, we can open up a shell, and type this:</p>\n<pre><code>$ rustc --version\n</code></pre>\n<p>You should see the version number, commit hash, and commit date.</p>\n<p>If you do, Rust has been installed successfully! Congrats!</p>\n<p>If you don't, that probably means that the <code>PATH</code> environment variable\ndoesn't include Cargo's binary directory, <code>~/.cargo/bin</code> on Unix, or\n<code>%USERPROFILE%\\.cargo\\bin</code> on Windows. This is the directory where\nRust development tools live, and most Rust developers keep it in their\n<code>PATH</code> environment variable, which makes it possible to run <code>rustc</code> on\nthe command line. Due to differences in operating systems, command\nshells, and bugs in installation, you may need to restart your shell,\nlog out of the system, or configure <code>PATH</code> manually as appropriate for\nyour operating environment.</p>\n<p>Rust does not do its own linking, and so you’ll need to have a linker\ninstalled. Doing so will depend on your specific system. For\nLinux-based systems, Rust will attempt to call <code>cc</code> for linking. On\n<code>windows-msvc</code> (Rust built on Windows with Microsoft Visual Studio),\nthis depends on having <a href=\"http://landinghub.visualstudio.com/visual-cpp-build-tools\">Microsoft Visual C++ Build Tools</a>\ninstalled. These do not need to be in <code>%PATH%</code> as <code>rustc</code> will find\nthem automatically. In general, if you have your linker in a\nnon-traditional location you can call <code>rustc linker=/path/to/cc</code>, where <code>/path/to/cc</code> should point to your linker path.</p>\n<p>If you are still stuck, there are a number of places where we can get\nhelp. The easiest is\n<a href=\"irc://irc.mozilla.org/#rust-beginners\">the #rust-beginners IRC channel on irc.mozilla.org</a>\nand for general discussion\n<a href=\"irc://irc.mozilla.org/#rust\">the #rust IRC channel on irc.mozilla.org</a>, which we\ncan access through <a href=\"http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust-beginners,%23rust\">Mibbit</a>. Then we'll be chatting with other\nRustaceans (a silly nickname we call ourselves) who can help us out. Other great\nresources include <a href=\"https://users.rust-lang.org/\">the user’s forum</a> and <a href=\"http://stackoverflow.com/questions/tagged/rust\">Stack Overflow</a>.</p>\n<p>This installer also installs a copy of the documentation locally, so we can\nread it offline. It's only a <code>rustup doc</code> away!</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#hello-world\"><h2>Hello, world!</h2></a>\n<p>Now that you have Rust installed, we'll help you write your first Rust program.\nIt's traditional when learning a new language to write a little program to\nprint the text “Hello, world!” to the screen, and in this section, we'll follow\nthat tradition.</p>\n<p>The nice thing about starting with such a simple program is that you can\nquickly verify that your compiler is installed, and that it's working properly.\nPrinting information to the screen is also a pretty common thing to do, so\npracticing it early on is good.</p>\n<blockquote>\n<p>Note: This book assumes basic familiarity with the command line. Rust itself\nmakes no specific demands about your editing, tooling, or where your code\nlives, so if you prefer an IDE to the command line, that's an option. You may\nwant to check out <a href=\"https://github.com/oakes/SolidOak\">SolidOak</a>, which was built specifically with Rust in mind.\nThere are a number of extensions in development by the community, and the\nRust team ships plugins for <a href=\"https://github.com/rust-lang/rust/blob/master/src/etc/CONFIGS.md\">various editors</a>. Configuring your editor or\nIDE is out of the scope of this tutorial, so check the documentation for your\nspecific setup.</p>\n</blockquote>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#creating-a-project-file\"><h2>Creating a Project File</h2></a>\n<p>First, make a file to put your Rust code in. Rust doesn't care where your code\nlives, but for this book, I suggest making a <em>projects</em> directory in your home\ndirectory, and keeping all your projects there. Open a terminal and enter the\nfollowing commands to make a directory for this particular project:</p>\n<pre><code>$ mkdir ~/projects\n$ cd ~/projects\n$ mkdir hello_world\n$ cd hello_world\n</code></pre>\n<blockquote>\n<p>Note: If you’re on Windows and not using PowerShell, the <code>~</code> may not work.\nConsult the documentation for your shell for more details.</p>\n</blockquote>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#writing-and-running-a-rust-program\"><h2>Writing and Running a Rust Program</h2></a>\n<p>We need to create a source file for our Rust program. Rust files always end\nin a <em>.rs</em> extension. If you are using more than one word in your filename,\nuse an underscore to separate them; for example, you would use\n<em>my_program.rs</em> rather than <em>myprogram.rs</em>.</p>\n<p>Now, make a new file and call it <em>main.rs</em>. Open the file and type\nthe following code:</p>\n<pre><pre><code>fn main() {\nprintln!(\"Hello, world!\");\n}\n</code></pre></pre>\n<p>Save the file, and go back to your terminal window. On Linux or macOS, enter the\nfollowing commands:</p>\n<pre><code>$ rustc main.rs\n$ ./main\nHello, world!\n</code></pre>\n<p>In Windows, replace <code>main</code> with <code>main.exe</code>. Regardless of your operating\nsystem, you should see the string <code>Hello, world!</code> print to the terminal. If you\ndid, then congratulations! You've officially written a Rust program. That makes\nyou a Rust programmer! Welcome.</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#anatomy-of-a-rust-program\"><h2>Anatomy of a Rust Program</h2></a>\n<p>Now, let’s go over what just happened in your \"Hello, world!\" program in\ndetail. Here's the first piece of the puzzle:</p>\n<pre><pre><code>fn main() {\n}\n</code></pre></pre>\n<p>These lines define a <em>function</em> in Rust. The <code>main</code> function is special: it's\nthe beginning of every Rust program. The first line says, “I’m declaring a\nfunction named <code>main</code> that takes no arguments and returns nothing.” If there\nwere arguments, they would go inside the parentheses (<code>(</code> and <code>)</code>), and because\nwe aren’t returning anything from this function, we can omit the return type\nentirely.</p>\n<p>Also note that the function body is wrapped in curly braces (<code>{</code> and <code>}</code>). Rust\nrequires these around all function bodies. It's considered good style to put\nthe opening curly brace on the same line as the function declaration, with one\nspace in between.</p>\n<p>Inside the <code>main()</code> function:</p>\n<pre><pre><code># #![allow(unused_variables)]\n#\n#fn main() {\nprintln!(\"Hello, world!\");\n#}</code></pre></pre>\n<p>This line does all of the work in this little program: it prints text to the\nscreen. There are a number of details that are important here. The first is\nthat it’s indented with four spaces, not tabs.</p>\n<p>The second important part is the <code>println!()</code> line. This is calling a Rust\n<em><a href=\"https://doc.rust-lang.org/1.17.0/book/macros.html\">macro</a></em>, which is how metaprogramming is done in Rust. If it were calling a\nfunction instead, it would look like this: <code>println()</code> (without the !). We'll\ndiscuss Rust macros in more detail later, but for now you only need to\nknow that when you see a <code>!</code> that means that you’re calling a macro instead of\na normal function.</p>\n<p>Next is <code>\"Hello, world!\"</code> which is a <em>string</em>. Strings are a surprisingly\ncomplicated topic in a systems programming language, and this is a <em><a href=\"https://doc.rust-lang.org/1.17.0/book/the-stack-and-the-heap.html\">statically\nallocated</a></em> string. We pass this string as an argument to <code>println!</code>, which\nprints the string to the screen. Easy enough!</p>\n<p>The line ends with a semicolon (<code>;</code>). Rust is an <em><a href=\"https://doc.rust-lang.org/1.17.0/book/glossary.html#expression-oriented-language\">expression-oriented\nlanguage</a></em>, which means that most things are expressions, rather than\nstatements. The <code>;</code> indicates that this expression is over, and the next one is\nready to begin. Most lines of Rust code end with a <code>;</code>.</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#compiling-and-running-are-separate-steps\"><h2>Compiling and Running Are Separate Steps</h2></a>\n<p>In \"Writing and Running a Rust Program\", we showed you how to run a newly\ncreated program. We'll break that process down and examine each step now.</p>\n<p>Before running a Rust program, you have to compile it. You can use the Rust\ncompiler by entering the <code>rustc</code> command and passing it the name of your source\nfile, like this:</p>\n<pre><code>$ rustc main.rs\n</code></pre>\n<p>If you come from a C or C++ background, you'll notice that this is similar to\n<code>gcc</code> or <code>clang</code>. After compiling successfully, Rust should output a binary\nexecutable, which you can see on Linux or macOS by entering the <code>ls</code> command in\nyour shell as follows:</p>\n<pre><code>$ ls\nmain main.rs\n</code></pre>\n<p>On Windows, you'd enter:</p>\n<pre><code>$ dir\nmain.exe\nmain.rs\n</code></pre>\n<p>This shows we have two files: the source code, with an <code>.rs</code> extension, and the\nexecutable (<code>main.exe</code> on Windows, <code>main</code> everywhere else). All that's left to\ndo from here is run the <code>main</code> or <code>main.exe</code> file, like this:</p>\n<pre><code>$ ./main # or .\\main.exe on Windows\n</code></pre>\n<p>If <em>main.rs</em> were your \"Hello, world!\" program, this would print <code>Hello, world!</code> to your terminal.</p>\n<p>If you come from a dynamic language like Ruby, Python, or JavaScript, you may\nnot be used to compiling and running a program being separate steps. Rust is an\n<em>ahead-of-time compiled</em> language, which means that you can compile a program,\ngive it to someone else, and they can run it even without Rust installed. If\nyou give someone a <code>.rb</code> or <code>.py</code> or <code>.js</code> file, on the other hand, they need\nto have a Ruby, Python, or JavaScript implementation installed (respectively),\nbut you only need one command to both compile and run your program. Everything\nis a tradeoff in language design.</p>\n<p>Just compiling with <code>rustc</code> is fine for simple programs, but as your project\ngrows, you'll want to be able to manage all of the options your project has,\nand make it easy to share your code with other people and projects. Next, I'll\nintroduce you to a tool called Cargo, which will help you write real-world Rust\nprograms.</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#hello-cargo\"><h2>Hello, Cargo!</h2></a>\n<p>Cargo is Rust’s build system and package manager, and Rustaceans use Cargo to\nmanage their Rust projects. Cargo manages three things: building your code,\ndownloading the libraries your code depends on, and building those libraries.\nWe call libraries your code needs ‘dependencies’ since your code depends on\nthem.</p>\n<p>The simplest Rust programs don’t have any dependencies, so right now, you'd\nonly use the first part of its functionality. As you write more complex Rust\nprograms, you’ll want to add dependencies, and if you start off using Cargo,\nthat will be a lot easier to do.</p>\n<p>As the vast, vast majority of Rust projects use Cargo, we will assume that\nyou’re using it for the rest of the book. Cargo comes installed with Rust\nitself, if you used the official installers. If you installed Rust through some\nother means, you can check if you have Cargo installed by typing:</p>\n<pre><code>$ cargo --version\n</code></pre>\n<p>Into a terminal. If you see a version number, great! If you see an error like\n‘<code>command not found</code>’, then you should look at the documentation for the system\nin which you installed Rust, to determine if Cargo is separate.</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#converting-to-cargo\"><h2>Converting to Cargo</h2></a>\n<p>Let’s convert the Hello World program to Cargo. To Cargo-fy a project, you need\nto do three things:</p>\n<ol>\n<li>Put your source file in the right directory.</li>\n<li>Get rid of the old executable (<code>main.exe</code> on Windows, <code>main</code> everywhere\nelse).</li>\n<li>Make a Cargo configuration file.</li>\n</ol>\n<p>Let's get started!</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#creating-a-source-directory-and-removing-the-old-executable\"><h3>Creating a Source Directory and Removing the Old Executable</h3></a>\n<p>First, go back to your terminal, move to your <em>hello_world</em> directory, and\nenter the following commands:</p>\n<pre><code>$ mkdir src\n$ mv main.rs src/main.rs # or 'move main.rs src/main.rs' on Windows\n$ rm main # or 'del main.exe' on Windows\n</code></pre>\n<p>Cargo expects your source files to live inside a <em>src</em> directory, so do that\nfirst. This leaves the top-level project directory (in this case,\n<em>hello_world</em>) for READMEs, license information, and anything else not related\nto your code. In this way, using Cargo helps you keep your projects nice and\ntidy. There's a place for everything, and everything is in its place.</p>\n<p>Now, move <em>main.rs</em> into the <em>src</em> directory, and delete the compiled file you\ncreated with <code>rustc</code>. As usual, replace <code>main</code> with <code>main.exe</code> if you're on\nWindows.</p>\n<p>This example retains <code>main.rs</code> as the source filename because it's creating an\nexecutable. If you wanted to make a library instead, you'd name the file\n<code>lib.rs</code>. This convention is used by Cargo to successfully compile your\nprojects, but it can be overridden if you wish.</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#creating-a-configuration-file\"><h3>Creating a Configuration File</h3></a>\n<p>Next, create a new file inside your <em>hello_world</em> directory, and call it\n<code>Cargo.toml</code>.</p>\n<p>Make sure to capitalize the <code>C</code> in <code>Cargo.toml</code>, or Cargo won't know what to do\nwith the configuration file.</p>\n<p>This file is in the <em><a href=\"https://github.com/toml-lang/toml\">TOML</a></em> (Tom's Obvious, Minimal Language) format. TOML is\nsimilar to INI, but has some extra goodies, and is used as Cargo’s\nconfiguration format.</p>\n<p>Inside this file, type the following information:</p>\n<pre><code>[package]\nname = \"hello_world\"\nversion = \"0.0.1\"\nauthors = [ \"Your name <[email protected]>\" ]\n</code></pre>\n<p>The first line, <code>[package]</code>, indicates that the following statements are\nconfiguring a package. As we add more information to this file, we’ll add other\nsections, but for now, we only have the package configuration.</p>\n<p>The other three lines set the three bits of configuration that Cargo needs to\nknow to compile your program: its name, what version it is, and who wrote it.</p>\n<p>Once you've added this information to the <em>Cargo.toml</em> file, save it to finish\ncreating the configuration file.</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#building-and-running-a-cargo-project\"><h2>Building and Running a Cargo Project</h2></a>\n<p>With your <em>Cargo.toml</em> file in place in your project's root directory, you\nshould be ready to build and run your Hello World program! To do so, enter the\nfollowing commands:</p>\n<pre><code>$ cargo build\nCompiling hello_world v0.0.1 (file:///home/yourname/projects/hello_world)\n$ ./target/debug/hello_world\nHello, world!\n</code></pre>\n<p>Bam! If all goes well, <code>Hello, world!</code> should print to the terminal once more.</p>\n<p>You just built a project with <code>cargo build</code> and ran it with\n<code>./target/debug/hello_world</code>, but you can actually do both in one step with\n<code>cargo run</code> as follows:</p>\n<pre><code>$ cargo run\nRunning `target/debug/hello_world`\nHello, world!\n</code></pre>\n<p>The <code>run</code> command comes in handy when you need to rapidly iterate on a\nproject.</p>\n<p>Notice that this example didn’t re-build the project. Cargo figured out that\nthe file hasn’t changed, and so it just ran the binary. If you'd modified your\nsource code, Cargo would have rebuilt the project before running it, and you\nwould have seen something like this:</p>\n<pre><code>$ cargo run\nCompiling hello_world v0.0.1 (file:///home/yourname/projects/hello_world)\nRunning `target/debug/hello_world`\nHello, world!\n</code></pre>\n<p>Cargo checks to see if any of your project’s files have been modified, and only\nrebuilds your project if they’ve changed since the last time you built it.</p>\n<p>With simple projects, Cargo doesn't bring a whole lot over just using <code>rustc</code>,\nbut it will become useful in the future. This is especially true when you start\nusing crates; these are synonymous with a ‘library’ or ‘package’ in other\nprogramming languages. For complex projects composed of multiple crates, it’s\nmuch easier to let Cargo coordinate the build. Using Cargo, you can run <code>cargo build</code>, and it should work the right way.</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#building-for-release\"><h3>Building for Release</h3></a>\n<p>When your project is ready for release, you can use <code>cargo build --release</code> to compile your project with optimizations. These optimizations make\nyour Rust code run faster, but turning them on makes your program take longer\nto compile. This is why there are two different profiles, one for development,\nand one for building the final program you’ll give to a user.</p>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#what-is-that-cargolock\"><h3>What Is That <code>Cargo.lock</code>?</h3></a>\n<p>Running <code>cargo build</code> also causes Cargo to create a new file called\n<em>Cargo.lock</em>, which looks like this:</p>\n<pre><code>[root]\nname = \"hello_world\"\nversion = \"0.0.1\"\n</code></pre>\n<p>Cargo uses the <em>Cargo.lock</em> file to keep track of dependencies in your\napplication. This is the Hello World project's <em>Cargo.lock</em> file. This project\ndoesn't have dependencies, so the file is a bit sparse. Realistically, you\nwon't ever need to touch this file yourself; just let Cargo handle it.</p>\n<p>That’s it! If you've been following along, you should have successfully built\n<code>hello_world</code> with Cargo.</p>\n<p>Even though the project is simple, it now uses much of the real tooling you’ll\nuse for the rest of your Rust career. In fact, you can expect to start\nvirtually all Rust projects with some variation on the following commands:</p>\n<pre><code>$ git clone someurl.com/foo\n$ cd foo\n$ cargo build\n</code></pre>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#making-a-new-cargo-project-the-easy-way\"><h2>Making A New Cargo Project the Easy Way</h2></a>\n<p>You don’t have to go through that previous process every time you want to start\na new project! Cargo can quickly make a bare-bones project directory that you\ncan start developing in right away.</p>\n<p>To start a new project with Cargo, enter <code>cargo new</code> at the command line:</p>\n<pre><code>$ cargo new hello_world --bin\n</code></pre>\n<p>This command passes <code>--bin</code> because the goal is to get straight to making an\nexecutable application, as opposed to a library. Executables are often called\n<em>binaries</em> (as in <code>/usr/bin</code>, if you’re on a Unix system).</p>\n<p>Cargo has generated two files and one directory for us: a <code>Cargo.toml</code> and a\n<em>src</em> directory with a <em>main.rs</em> file inside. These should look familiar,\nthey’re exactly what we created by hand, above.</p>\n<p>This output is all you need to get started. First, open <code>Cargo.toml</code>. It should\nlook something like this:</p>\n<pre><code>[package]\nname = \"hello_world\"\nversion = \"0.1.0\"\nauthors = [\"Your Name <[email protected]>\"]\n[dependencies]\n</code></pre>\n<p>Do not worry about the <code>[dependencies]</code> line, we will come back to it later.</p>\n<p>Cargo has populated <em>Cargo.toml</em> with reasonable defaults based on the arguments\nyou gave it and your <code>git</code> global configuration. You may notice that Cargo has\nalso initialized the <code>hello_world</code> directory as a <code>git</code> repository.</p>\n<p>Here’s what should be in <code>src/main.rs</code>:</p>\n<pre><pre><code>fn main() {\nprintln!(\"Hello, world!\");\n}\n</code></pre></pre>\n<p>Cargo has generated a \"Hello World!\" for you, and you’re ready to start coding!</p>\n<blockquote>\n<p>Note: If you want to look at Cargo in more detail, check out the official <a href=\"http://doc.crates.io/guide.html\">Cargo\nguide</a>, which covers all of its features.</p>\n</blockquote>\n<a href=\"https://doc.rust-lang.org/1.17.0/book/getting-started.html#closing-thoughts\"><h2>Closing Thoughts</h2></a>\n<p>This chapter covered the basics that will serve you well through the rest of\nthis book, and the rest of your time with Rust. Now that you’ve got the tools\ndown, we'll cover more about the Rust language itself.</p>\n<p>You have two options: Dive into a project with ‘<a href=\"https://doc.rust-lang.org/1.17.0/book/guessing-game.html\">Tutorial: Guessing Game</a>’, or\nstart from the bottom and work your way up with ‘<a href=\"https://doc.rust-lang.org/1.17.0/book/syntax-and-semantics.html\">Syntax and\nSemantics</a>’. More experienced systems programmers will probably prefer\n‘Tutorial: Guessing Game’, while those from dynamic backgrounds may enjoy either. Different\npeople learn differently! Choose whatever’s right for you.</p>\n</div></div>", | |
"summary": "To get started with Rust, first install it. On Unix (Linux/macOS), run `curl https://sh.rustup.rs -sSf | sh` in your terminal. On Windows, download and run `rustup-init.exe`. After installation, verify by running `rustc --version` in your terminal; you should see version information. If not, ensure your `PATH` environment variable includes the Cargo binary directory (~/.cargo/bin on Unix, %USERPROFILE%\\.cargo\\bin on Windows). The guide also covers uninstallation (`rustup self uninstall`) and troubleshooting.\n", | |
"favicon": "https://doc.rust-lang.org/1.17.0/book/favicon.png", | |
"highlights": [ | |
"Now that you have Rust installed, we'll help you write your first Rust program. It's traditional when learning a new language to write a little program to print the text “Hello, world!” to the screen, and in this section, we'll follow The nice thing about starting with such a simple program is that you can quickly verify that your compiler is installed, and that it's working properly." | |
], | |
"highlightScores": [ | |
0.6808128952980042 | |
] | |
}, | |
{ | |
"score": 0.17755770683288574, | |
"title": "Hello World - Rust By Example", | |
"id": "https://doc.rust-lang.org/rust-by-example/hello.html", | |
"url": "https://doc.rust-lang.org/rust-by-example/hello.html", | |
"publishedDate": "2021-01-01T00:00:00.000Z", | |
"author": "", | |
"text": "<div><div>\n<div>\n<main>\n<p>This is the source code of the traditional Hello World program.</p>\n<pre><pre><code>// This is a comment, and is ignored by the compiler.\n// You can test this code by clicking the \"Run\" button over there ->\n// or if you prefer to use your keyboard, you can use the \"Ctrl + Enter\"\n// shortcut.\n// This code is editable, feel free to hack it!\n// You can always return to the original code by clicking the \"Reset\" button ->\n// This is the main function.\nfn main() {\n// Statements here are executed when the compiled binary is called.\n// Print text to the console.\nprintln!(\"Hello World!\");\n}</code></pre></pre>\n<p><code>println!</code> is a <a href=\"https://doc.rust-lang.org/rust-by-example/macros.html\"><em>macro</em></a> that prints text to the\nconsole.</p>\n<p>A binary can be generated using the Rust compiler: <code>rustc</code>.</p>\n<pre><code>$ rustc hello.rs\n</code></pre>\n<p><code>rustc</code> will produce a <code>hello</code> binary that can be executed.</p>\n<pre><code>$ ./hello\nHello World!\n</code></pre>\n<h3><a href=\"#activity\">Activity</a></h3>\n<p>Click 'Run' above to see the expected output. Next, add a new\nline with a second <code>println!</code> macro so that the output shows:</p>\n<pre><code>Hello World!\nI'm a Rustacean!\n</code></pre>\n</main>\n<nav>\n<a href=\"https://doc.rust-lang.org/rust-by-example/index.html\">\n<i></i>\n</a>\n<a href=\"https://doc.rust-lang.org/rust-by-example/hello/comment.html\">\n<i></i>\n</a>\n</nav>\n</div>\n<nav>\n<a href=\"https://doc.rust-lang.org/rust-by-example/index.html\">\n<i></i>\n</a>\n<a href=\"https://doc.rust-lang.org/rust-by-example/hello/comment.html\">\n<i></i>\n</a>\n</nav>\n</div></div>", | |
"summary": "This Rust by Example tutorial shows how to create a basic \"Hello, World!\" program. The code uses the `println!` macro to print to the console. To compile and run, save the code as `hello.rs` and use the command `rustc hello.rs` followed by `./hello`. The tutorial then challenges you to add a second `println!` statement to print an additional line of text. This is a good starting point for learning Rust.\n", | |
"favicon": "https://doc.rust-lang.org/rust-by-example/favicon.svg", | |
"highlights": [ | |
" rustc will produce a hello binary that can be executed. Click 'Run' above to see the expected output. Next, add a new line with a second println! macro so that the output shows:" | |
], | |
"highlightScores": [ | |
0.3842701315879822 | |
] | |
}, | |
{ | |
"score": 0.17698249220848083, | |
"title": "The Rust Programming Language - The Rust Programming Language", | |
"id": "https://doc.rust-lang.org/book/", | |
"url": "https://doc.rust-lang.org/book/", | |
"publishedDate": "2024-09-04T00:00:00.000Z", | |
"author": "", | |
"text": "<div><div>\n<div>\n<main>\n<p><em>by Steve Klabnik and Carol Nichols, with contributions from the Rust Community</em></p>\n<p>This version of the text assumes you’re using Rust 1.81.0 (released 2024-09-04)\nor later. See the <a href=\"https://doc.rust-lang.org/book/ch01-01-installation.html\">“Installation” section of Chapter 1</a>\nto install or update Rust.</p>\n<p>The HTML format is available online at\n<a href=\"https://doc.rust-lang.org/stable/book/\">https://doc.rust-lang.org/stable/book/</a>\nand offline with installations of Rust made with <code>rustup</code>; run <code>rustup doc --book</code> to open.</p>\n<p>Several community <a href=\"https://doc.rust-lang.org/book/appendix-06-translation.html\">translations</a> are also available.</p>\n<p>This text is available in <a href=\"https://nostarch.com/rust-programming-language-2nd-edition\">paperback and ebook format from No Starch\nPress</a>.</p>\n<blockquote>\n<p><strong>🚨 Want a more interactive learning experience? Try out a different version\nof the Rust Book, featuring: quizzes, highlighting, visualizations, and\nmore</strong>: <a href=\"https://rust-book.cs.brown.edu\">https://rust-book.cs.brown.edu</a></p>\n</blockquote>\n</main>\n<nav>\n<a href=\"https://doc.rust-lang.org/book/foreword.html\">\n<i></i>\n</a>\n</nav>\n</div>\n<nav>\n<a href=\"https://doc.rust-lang.org/book/foreword.html\">\n<i></i>\n</a>\n</nav>\n</div></div>", | |
"summary": "The official Rust Programming Language book is available online (https://doc.rust-lang.org/stable/book/) and offline via `rustup doc --book`. To get started, ensure you have Rust 1.81.0 or later installed (installation instructions are in Chapter 1). For a more interactive learning experience, consider using the alternative version at https://rust-book.cs.brown.edu.\n", | |
"favicon": "https://doc.rust-lang.org/book/favicon.svg", | |
"highlights": [ | |
" 🚨 Want a more interactive learning experience? Try out a different version of the Rust Book, featuring: quizzes, highlighting, visualizations, and" | |
], | |
"highlightScores": [ | |
0.48465806245803833 | |
] | |
}, | |
{ | |
"score": 0.1766430288553238, | |
"title": "入门", | |
"id": "https://www.rust-lang.org/zh-CN/learn/get-started", | |
"url": "https://www.rust-lang.org/zh-CN/learn/get-started", | |
"publishedDate": "2022-01-01T20:22:00.000Z", | |
"author": "", | |
"text": "<div><div>\n<header>\n<p>\n</p><h2>入门</h2>\n<h2>快速配置 Rust 开发环境并编写一个小应用!</h2>\n<p></p>\n</header>\n<div>\n<header>\n<h2>安装 Rust</h2>\n</header>\n<p>您可以在 Rust 演练场上在线试用 Rust 而无需在计算机上安装任何东西。</p>\n<p><a href=\"https://play.rust-lang.org/\">无需安装,直接尝试 Rust</a></p><hr/>\n<h3>Rustup:Rust安装器和版本管理工具</h3>\n<p>安装 Rust 的主要方式是通过 Rustup 这一工具,它既是一个 Rust 安装器又是一个版本管理工具。</p>\n<div>\n<div>\n<p>您似乎正在运行 macOS、Linux 或其它类 Unix 系统。要下载 Rustup 并安装 Rust,请在终端中运行以下命令,然后遵循屏幕上的指示。如果您在 Windows 上,请参见 <a href=\"https://forge.rust-lang.org/infra/other-installation-methods.html\">“其他安装方式”</a>。</p>\n<pre><code>curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>\n</div>\n<div>\n<p>您似乎正在运行 Windows。要使用 Rust,请下载安装器,然后运行该程序并遵循屏幕上的指示。当看到相应提示时,您可能需要安装 <a href=\"https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/\">Microsoft C++ 生成工具</a>。如果您不在 Windows 上,参看 <a href=\"https://forge.rust-lang.org/infra/other-installation-methods.html\">“其他安装方式”</a>。</p>\n<h3>Windows 的 Linux 子系统(WSL)</h3>\n<p>如果您是 Windows 的 Linux 子系统(WSL)用户,要安装 Rust,请在终端中运行以下命令,然后遵循屏幕上的指示。</p>\n<pre><code>curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>\n</div>\n<div>\n<div>\n<p>\n如果您正在运行 WSL、Linux 或 macOS 等类-Unix 系统,要安装 Rust,<br/>请在终端中运行以下命令,然后遵循屏幕上的指示。\n</p>\n<pre><code>curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh</code></pre>\n</div>\n<hr/>\n</div>\n</div>\n<br/>\n<h3>Rust 是最新的吗?</h3>\n<p>Rust 的升级非常频繁。如果您安装 Rustup 后已有一段时间,那么很可能您的 Rust 版本已经过时了。运行 <code>rustup update</code> 获取最新版本的 Rust。</p>\n<p><a href=\"https://www.rust-lang.org/zh-CN/tools/install\">了解更多关于安装的细节</a></p><hr/>\n<h3>Cargo:Rust 的构建工具和包管理器</h3>\n<p>您在安装 Rustup 时,也会安装 Rust 构建工具和包管理器的最新稳定版,即\nCargo。Cargo 可以做很多事情:</p>\n<ul>\n<li><code>cargo build</code> 可以构建项目</li>\n<li><code>cargo run</code> 可以运行项目</li>\n<li><code>cargo test</code> 可以测试项目</li>\n<li><code>cargo doc</code> 可以为项目构建文档</li>\n<li><code>cargo publish</code> 可以将库发布到 <a href=\"https://crates.io\">crates.io</a>。</li>\n</ul>\n<p>要检查您是否安装了 Rust 和 Cargo,可以在终端中运行:</p>\n<p><code>cargo --version</code></p>\n<p><a href=\"https://doc.rust-lang.org/cargo/index.html\">阅读《Cargo 手册》</a></p><hr/>\n<h3>其它工具</h3>\n<p>Rust 支持多种编辑器:</p>\n</div>\n<div>\n<header>\n<h2>创建新项目</h2>\n</header>\n<p>我们将在新的 Rust 开发环境中编写一个小应用。首先用 Cargo\n创建一个新项目。在您的终端中执行:</p>\n<p><code>cargo new hello-rust</code></p>\n<p>这会生成一个名为 <code>hello-rust</code> 的新目录,其中包含以下文件:</p>\n<pre><code>hello-rust\n|- Cargo.toml\n|- src\n|- main.rs</code></pre>\n<p><code>Cargo.toml</code> 为 Rust 的清单文件。其中包含了项目的元数据和依赖库。</p>\n<p><code>src/main.rs</code> 为编写应用代码的地方。</p>\n<hr/>\n<p><code>cargo new</code> 会生成一个新的“Hello, world!”项目!我们可以进入新创建的目录中,执行下面的命令来运行此程序:</p>\n<p><code>cargo run</code></p>\n<p>您应该会在终端中看到如下内容:</p>\n<pre><code>$ cargo run\nCompiling hello-rust v0.1.0 (/Users/ag_dubs/rust/hello-rust)\nFinished dev [unoptimized + debuginfo] target(s) in 1.34s\nRunning `target/debug/hello-rust`\nHello, world!</code></pre>\n</div>\n<div>\n<header>\n<h2>添加依赖</h2>\n</header>\n<p>现在我们来为应用添加依赖。您可以在\n<a href=\"https://crates.io\">crates.io</a>,即 Rust 包的仓库中找到所有类别的库。在 Rust 中,我们通常把包称作“crates”。</p>\n<p>在本项目中,我们使用了名为 <a href=\"https://crates.io/crates/ferris-says\"><code>ferris-says</code></a> 的库。</p>\n<p>我们在 <code>Cargo.toml</code> 文件中添加以下信息(从 crate 页面上获取):</p>\n<pre><code>[dependencies]\nferris-says = \"0.3.1\"</code></pre>\n<p>接着运行:</p>\n<p><code>cargo build</code></p>\n<p>…之后 Cargo 就会安装该依赖。</p>\n<p>运行此命令会创建一个新文件 <code>Cargo.lock</code>,该文件记录了本地所用依赖库的精确版本。</p>\n<p>要使用该依赖库,我们可以打开 <code>main.rs</code>,删除其中所有的内容(它不过是个示例而已),然后在其中添加下面这行代码:</p>\n<pre><code>use ferris_says::say;</code></pre>\n<p>这样我们就可以使用 <code>ferris-says</code> crate 中导出的 <code>say</code> 函数了。</p>\n</div>\n<div>\n<header>\n<h2>一个 Rust 小应用</h2>\n</header>\n<p>现在我们用新的依赖库编写一个小应用。在 <code>main.rs</code> 中添加以下代码:</p>\n<pre><code>use ferris_says::say; // from the previous step\nuse std::io::{stdout, BufWriter};\nfn main() {\nlet stdout = stdout();\nlet message = String::from(\"Hello fellow Rustaceans!\");\nlet width = message.chars().count();\nlet mut writer = BufWriter::new(stdout.lock());\nsay(&message, width, &mut writer).unwrap();\n}</code></pre>\n<p>保存完毕后,我们可以输入以下命令来运行此应用:</p>\n<p><code>cargo run</code></p>\n<p>如果一切正确,您会看到该应用将以下内容打印到了屏幕上:</p>\n<pre><code> __________________________\n< Hello fellow Rustaceans! >\n--------------------------\n\\\n\\\n_~^~^~_\n\\) / o o \\ (/\n'_ - _'\n/ '-----' \\</code></pre>\n</div>\n<div>\n<header>\n<h2>了解更多!</h2>\n</header>\n<p>您已经是一名 Rustacean 了!欢迎!我们很高兴您的加入!当您准备好后,跳转到学习页面,您可以在那里找到大量的文档,它们可以帮助您继续 Rust 之旅。</p>\n<p><a href=\"https://www.rust-lang.org/zh-CN/learn\">了解更多!</a>\n</p></div>\n<div>\n<header>\n<h2>这只螃蟹是谁? Ferris ?</h2>\n</header>\n<p>Ferris 是 Rust 社区的非官方吉祥物。很多 Rust 程序员自称“Rustaceans”,\n它与“<a href=\"https://en.wikipedia.org/wiki/Crustacean\">crustacean</a>”相似。\n我们可以用“她”、“他”、“它”等任何代词来指代 Ferris。</p>\n<p>Ferris 与形容词“ferrous”相似,它的含义与铁有关。由于 Rust(锈)通常由铁形成,\n因此它算得上是个吉祥物名字的有趣来源。</p>\n<p>您可以在 <a href=\"http://rustacean.net/\">http://rustacean.net/</a> 上找到更多\nFerris 的图片。\n</p></div>\n</div></div>", | |
"summary": "To get started with Rust, first install Rustup, the Rust installer and version manager. On macOS, Linux, or WSL, run `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` in your terminal. Windows users should download the installer from the official website. After installation, run `rustup update` to ensure you have the latest version. Cargo, Rust's build tool and package manager, is installed with Rustup. To create a new project, use `cargo new hello-rust`, then navigate to the directory and run `cargo run` to build and execute a simple \"Hello, world!\" program. The tutorial also covers adding dependencies via `Cargo.toml` and using external crates.\n", | |
"image": "https://www.rust-lang.org/static/images/rust-social-wide.jpg", | |
"favicon": "https://www.rust-lang.org/static/images/favicon-32x32.png", | |
"highlights": [ | |
"这会生成一个名为 hello-rust 的新目录,其中包含以下文件: Cargo.toml 为 Rust 的清单文件。其中包含了项目的元数据和依赖库。 cargo new 会生成一个新的“Hello, world!”项目!我们可以进入新创建的目录中,执行下面的命令来运行此程序: Compiling hello-rust v0.1.0 (/Users/ag_dubs/rust/hello-rust) Finished dev [unoptimized + debuginfo] target(s) in 1.34s" | |
], | |
"highlightScores": [ | |
0.14356084167957306 | |
] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"success": true, | |
"query": "how to get started with Rust", | |
"ai_overview": "**Getting Started with Rust**\n=====================================\n\nRust is a modern, systems programming language that emphasizes performance, reliability, and productivity. To get started with Rust, follow these steps:\n\n### 1. Install Rust\n\nYou can install Rust using the official installer or by using a package manager like Homebrew (on macOS) or apt-get (on Linux). You can also use the online Rust editor to start coding immediately.\n\n### 2. Choose a Code Editor\n\nRust supports a wide range of code editors, including Visual Studio Code, IntelliJ Rust, and Sublime Text. You can also use the online Rust editor to write and run code.\n\n### 3. Learn the Basics\n\nStart with the official Rust book, which covers the basics of the language, including variables, data types, functions, and control flow. You can also find many online resources, including tutorials, videos, and documentation.\n\n### 4. Practice with Examples\n\nPractice writing Rust code by working through examples and exercises. You can find many resources online, including the Rust by Example book and the Rust Cookbook.\n\n### 5. Join the Rust Community\n\nThe Rust community is known for being welcoming and supportive. Join online forums, attend meetups, and participate in open-source projects to connect with other Rust developers.\n\n### 6. Learn from Others\n\nLearn from experienced Rust developers by reading their code, attending talks, and participating in online discussions.\n\n### 7. Build Projects\n\nAs you gain more experience, build real-world projects to apply your knowledge and skills.\n\n**Recommended Resources**\n---------------------------\n\n* Official Rust book: <https://doc.rust-lang.org/book/>\n* Rust by Example: <https://doc.rust-lang.org/rust-by-example/>\n* Rust Cookbook: <https://doc.rust-lang.org/rust-cookbook/>\n* Online Rust editor: <https://play.rust-lang.org/>\n* Rust community: <https://www.rust-lang.org/community/>\n\n**Tips for Beginners**\n----------------------\n\n* Start with the basics and build a strong foundation.\n* Practice writing code regularly.\n* Join online forums and attend meetups to connect with other Rust developers.\n* Learn from experienced developers by reading their code and attending talks.\n* Build real-world projects to apply your knowledge and skills.", | |
"is_safe": true, | |
"image_urls": [ | |
"https://miro.medium.com/v2/resize:fit:1200/1*rn8oTrIDhJc2JFNN3mIwDw.png", | |
"https://learn.microsoft.com/training/achievements/take-your-first-steps-with-rust-social.png", | |
"https://www.rust-lang.org/static/images/rust-social-wide.jpg", | |
"https://miro.medium.com/v2/resize:fit:1200/1*xliBmETeb4HMWs5N-Ulf-g.png", | |
"https://www.jetbrains.com/help/fleet/getting-started-with-rust.html", | |
"https://cdn.mos.cms.futurecdn.net/SWpcKetcvkQRhzbShxSG5D.jpg", | |
"https://www.redditstatic.com/icon.png", | |
"https://lone.design/wp-content/uploads/2023/10/RustClient_oy33W11sbj.jpg", | |
"https://www.gamespot.com/a/uploads/scale_tiny/536/5360430/2414940-newrustlogo4nobg.png", | |
"https://www.redditstatic.com/icon.png", | |
"https://global.discourse-cdn.com/flex019/uploads/rust_lang/original/2X/8/83e41956eccfd67ad6ff76f15a2c22e58db31d4f.svg", | |
"https://i.ytimg.com/vi/CBpGxOwGonY/maxresdefault.jpg" | |
], | |
"results": [ | |
{ | |
"title": "Getting Started - The Rust Programming Language", | |
"url": "https://web.mit.edu/rust-lang_v1.25/arch/amd64_ubuntu1404/share/doc/rust/html/book/first-edition/getting-started.html", | |
"description": "This first chapter of the book will <strong>get</strong> us going <strong>with</strong> <strong>Rust</strong> and its tooling. First, we’ll install <strong>Rust</strong>. Then, the classic ‘Hello World’ program. Finally, we’ll talk about Cargo, <strong>Rust</strong>’s build system and package manager. We’ll be showing off a number of commands using a terminal, and those lines all <strong>start</strong> ...", | |
"content": "Getting started\nQuickly set up a Rust development environment and write a small app!\nInstalling Rust\nGenerating a new project\nAdding dependencies\nA small Rust application\nLearn more!\nWho’s this crab, Ferris?\nRustup: the Rust installer and version management tool\nWindows Subsystem for Linux\nIs Rust up to date?\nCargo: the Rust build tool and package manager\nOther tools\nGet help!\nTerms and policies\nSocial\nYou can try Rust online in the Rust Playground without installing anything on your computer.\nThe primary way that folks install Rust is through a tool called Rustup, which is a Rust installer and version management tool.\nIt looks like you’re running macOS, Linux, or another Unix-like OS. To download Rustup and install Rust, run the following in your terminal, then follow the on-screen instructions. See \"Other Installation Methods\" if you are on Windows.\nIt looks like you’re running Windows. To start using Rust, download the installer, then run the program and follow the onscreen instructions. You may need to install the Visual Studio C++ Build tools when prompted to do so. If you are not on Windows see \"Other Installation Methods\".\nIf you’re a Windows Subsystem for Linux user run the following in your terminal, then follow the on-screen instructions to install Rust.\nTo install Rust, if you are running a Unix such as WSL, Linux or macOS,\n run the following in your terminal, then follow the on-screen instructions.\nIf you are running Windows,\ndownload and run rustup‑init.exe then follow the on-screen instructions.\nRust updates very frequently. If you have installed Rustup some time ago, chances are your Rust version is out of date. Get the latest version of Rust by running rustup update.\nWhen you install Rustup you’ll also get the latest stable version of the Rust build tool and package manager, also known as Cargo. Cargo does lots of things:\nTo test that you have Rust and Cargo installed, you can run this in your terminal of choice:\ncargo --version\nRust support is available in many editors:\nLet’s write a small application with our new Rust development environment. To start, we’ll use Cargo to make a new project for us. In your terminal of choice run:\ncargo new hello-rust\nThis will generate a new directory called hello-rust with the following files:\nCargo.toml is the manifest file for Rust. It’s where you keep metadata for your project, as well as dependencies.\nsrc/main.rs is where we’ll write our application code.\nThe cargo new step generated a \"Hello, world!\" project for us! We can run this program by moving into the new directory that we made and running this in our terminal:\ncargo run\nYou should see this in your terminal:\nLet’s add a dependency to our application. You can find all sorts of libraries on crates.io, the package registry for Rust. In Rust, we often refer to packages as “crates.”\nIn this project, we’ll use a crate called ferris-says.\nIn our Cargo.toml file we’ll add this information (that we got from the crate page):\nWe can also do this by running cargo add ferris-says.\nNow we can run:\ncargo build\n...and Cargo will install our dependency for us.\nYou’ll see that running this command created a new file for us, Cargo.lock. This file is a log of the exact versions of the dependencies we are using locally.\nTo use this dependency, we can open main.rs, remove everything that’s in there (it’s just another example), and add this line to it:\nThis line means that we can now use the say function that the ferris-says crate exports for us.\nNow let’s write a small application with our new dependency. In our main.rs, add the following code:\nOnce we save that, we can run our application by typing:\ncargo run\nAssuming everything went well, you should see your application print this to the screen:\nYou’re a Rustacean now! Welcome! We’re so glad to have you. When you’re ready, hop over to our Learn page, where you can find lots of books that will help you to continue on your Rust adventure.\nFerris is the unofficial mascot of the Rust Community. Many Rust programmers call themselves “Rustaceans,” a play on the word “crustacean.” We refer to Ferris with any pronouns “she,” “he,” “they,” “it,” etc.\nFerris is a name playing off of the adjective, “ferrous,” meaning of or pertaining to iron. Since Rust often forms on iron, it seemed like a fun origin for our mascot’s name!\nYou can find more images of Ferris on rustacean.net.\nMaintained by the Rust Team. See a bug?\nFile an issue!\nLooking for the previous website?", | |
"site_name": "Mit", | |
"site_long_name": "web.mit.edu", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://web.mit.edu&size=96", | |
"snippets": [ | |
"This first chapter of the book will get us going with Rust and its tooling. First, we’ll install Rust. Then, the classic ‘Hello World’ program. Finally, we’ll talk about Cargo, Rust’s build system and package manager. We’ll be showing off a number of commands using a terminal, and those lines all start with $. You don't need to type in the $s, they are there to indicate the start of each command.", | |
"In fact, you can expect to start virtually all Rust projects with some variation on the following commands: $ git clone someurl.com/foo $ cd foo $ cargo build · You don’t have to go through that previous process every time you want to start a new project! Cargo can quickly make a bare-bones project directory that you can start developing in right away. To start a new project with Cargo, enter cargo new at the command line: ... This command passes --bin because the goal is to get straight to making an executable application, as opposed to a library.", | |
"Now that you have Rust installed, we'll help you write your first Rust program. It's traditional when learning a new language to write a little program to print the text “Hello, world!” to the screen, and in this section, we'll follow that tradition. The nice thing about starting with such a simple program is that you can quickly verify that your compiler is installed, and that it's working properly.", | |
"As you write more complex Rust programs, you’ll want to add dependencies, and if you start off using Cargo, that will be a lot easier to do. As the vast, vast majority of Rust projects use Cargo, we will assume that you’re using it for the rest of the book. Cargo comes installed with Rust itself, if you used the official installers." | |
] | |
}, | |
{ | |
"title": "Getting Started with Rust. I recently started to learn Rust… | by Rami Krispin | Medium", | |
"url": "https://medium.com/@rami.krispin/getting-started-with-rust-928bf7b8418f", | |
"description": "<strong>The Rust Programming Language by Steve Klabnik and Carol Nichols is one of the main books for learning Rust</strong>. The book will take you from installing and setting the language and printing “Hello World!” all the way to building a multithreaded web server.", | |
"content": "The Rust Programming Language\nGetting Started\nLet’s start your Rust journey! There’s a lot to learn, but every journey starts\nsomewhere. In this chapter, we’ll discuss:", | |
"site_name": "Medium", | |
"site_long_name": "medium.com", | |
"age": "2024-08-05T00:00:00.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://medium.com&size=96", | |
"thumbnail": "https://miro.medium.com/v2/resize:fit:1200/1*rn8oTrIDhJc2JFNN3mIwDw.png", | |
"snippets": [ | |
"I first heard about Rust when I discovered Polars, one of the fastest Python libraries for working with DataFrames, which is written in Rust. One of the language’s advantages is its memory safety features, which, unlike other languages such as C, do not require a garbage collector. I recently started learning the language and created a list of free and open resources that I found useful to start with the language.", | |
"Rust is a general-purpose programming language that emphasizes performance. I first heard about Rust when I discovered Polars, one of the fastest Python libraries for working with DataFrames, which…", | |
"Here is a YouTube channel that is fully dedicated to Rust programming. It has a sequence of videos that cover the Rust Programming Language book’s chapters along with other Rust topics.", | |
"The Rust Programming Language by Steve Klabnik and Carol Nichols is one of the main books for learning Rust. The book will take you from installing and setting the language and printing “Hello World!” all the way to building a multithreaded web server." | |
] | |
}, | |
{ | |
"title": "Getting Started with Rust", | |
"url": "https://www.programiz.com/rust/getting-started", | |
"description": "... Rust is a system programming ... to have a Rust compiler installed on your system. However, if you want to start immediately, you can <strong>use our free online Rust editor</strong>....", | |
"content": "What is the best way to learn Rust from a complete beginner programmer?\nDon’t miss a thing from Reddit!\nLog In\nEnter the 6-digit code from your authenticator app\nEnter a 6-digit backup code\nSign Up\nVerify your email\nCreate your username and password\nSign Up\nVerify your email\nCreate your username and password\nReset your password\nCheck your inbox\nChoose a Reddit account to continue\nReset your password\nTop Posts\nGet the Reddit app\nReddit and its partners use cookies and similar technologies to provide you with a better experience.\nBy accepting all cookies, you agree to our use of cookies to deliver and maintain our services and site, improve the quality of Reddit, personalize Reddit content and advertising, and measure the effectiveness of advertising.\nBy rejecting non-essential cookies, Reddit may still use certain cookies to ensure the proper functionality of our platform.\nFor more information, please see our\n Cookie Notice\n and our\n Privacy Policy.\nA place for all things related to the Rust programming language—an open-source systems language that emphasizes performance, reliability, and productivity.\nWhat the title says, I'm a complete beginner at programming. What's the best way to learn Rust and Programming fundamentals/principles in general? (Also another thing which is probably important is I have pretty severe ADHD)\nAnyone can view, post, and comment to this community\nBy continuing, you agree to our\n User Agreement\n and acknowledge that you understand the\n Privacy Policy.\nYou’ve set up two-factor authentication for this account.\nYou’ve set up two-factor authentication for this account.\nBy continuing, you agree to our\n User Agreement\n and acknowledge that you understand the\n Privacy Policy.\nEnter the 6-digit code we sent to\nReddit is anonymous, so your username is what you’ll go by here. Choose wisely—because once you get a name, you can’t change it.\nBy continuing, you agree to our\n User Agreement\n and acknowledge that you understand the\n Privacy Policy.\nEnter the 6-digit code we sent to\nReddit is anonymous, so your username is what you’ll go by here. Choose wisely—because once you get a name, you can’t change it.\nEnter your email address or username and we’ll send you a link to reset your password\nNeed help?\nAn email with a link to reset your password was sent to the email address associated with your account", | |
"site_name": "Programiz", | |
"site_long_name": "programiz.com", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://programiz.com&size=96", | |
"snippets": [ | |
"Created with over a decade of experience and thousands of feedback. ... Try Programiz PRO! ... Learn Python practically and Get Certified. Try Programiz PRO! ... Rust is a system programming language supported widely across all major operating systems. ... In this tutorial, you will learn both methods. To run Rust code, you need to have a Rust compiler installed on your system. However, if you want to start immediately, you can use our free online Rust editor.", | |
"Rust is an open-source systems programming language that is syntactically similar to C++. In this tutorial, you will learn how to get started in Rust programming language.", | |
"Now, you are all set to run Rust programs on your device. First, open VS Code, click on the File in the top menu, and then select New File. ... Then, save this file with a .rs extension by clicking on File again, then Save As, and type your filename ending in .rs. (Here, we are saving it as hello_world.rs). Before you start coding, make sure to install the rust-analyzer and Code Runner extensions in VS Code.", | |
"This command updates your package lists to ensure you get the latest versions of your software. ... Before we install Rust, we'd need to install Curl. You can install curl using the following command in the terminal window. ... When this installation is complete, we will use curl to install Rust. Now, proceed with the following curl command to install Rust." | |
] | |
}, | |
{ | |
"title": "Take your first steps with Rust - Training | Microsoft Learn", | |
"url": "https://learn.microsoft.com/en-us/training/paths/rust-first-steps/", | |
"description": "Interested in learning a new programming language that's growing in use and popularity? <strong>Start</strong> here! Lay the foundation of knowledge you need to build fast and effective programs in <strong>Rust</strong>.", | |
"content": "Getting started with ... Rust\nJoining forces: How Web2 and Web3 developers can build together\nWhy do developers love clean code but hate writing documentation?\nNo code, only natural language: Q&A on prompt engineering with Professor Greg Benson\nResearch roadmap update: November 2024\nYour docs are your infrastructure\nAdd to the discussion\nIntro\nThe rise of Rust\nWho is using it?\nWho’s it for?\nWhy you shouldn't learn it\nWhat are some of the key concepts?\nResources\nCommunities:\nTop conferences:\nIn this series, we look at the most loved languages according to the Stack Overflow developer survey, the spread and use cases for each of them and collect some essential links on how to get into them. First up: Rust.\nIn this series, we look at the most loved languages according to the Stack Overflow developer survey, the spread and use cases for each of them and collect some essential links on how to get into them. First up: Rust.\nDespite its relatively tiny userbase—roughly 5% of programmers use it—Rust has consistently come in number one as the most loved language in our developer survey for the past few years, thanks to its small but devoted community.\nRust was first created by Graydon Hoare. What began as a side project later got picked up by Mozilla, who remain one of the sponsors today.\nSince its first release in 2009, it has seen a steady ascent in popularity. Over 5000 people have contributed to the Rust codebase. Some enthusiasts wonder if it could replace C++. While it might not be a beginner's language, Rust is gaining ground in the software industry and can be a valuable tool in any developer’s skill set.\nJust how popular is Rust? If you look at the spread of questions around Rust, you can see it has grown continuously through 2020, although it’s still far from common.\nOn the TIOBE index, Rust comes in at #25 in November 2020. Most notably, it has continually led the Most Loved ranking in the Stack Overflow survey since 2016.\nMost loved languages in 2020 in the Developer Survey\nWith recent layoffs at Mozilla, some worry that this might threaten support for Rust. But the Rust Core Team addressed this in an update announcing the creation of an independent Rust foundation. In their statement, they point out that “many Mozilla employees in Rust leadership contributed to Rust in their personal time, not as a part of their job” and that they have “leaders and contributors from a diverse set of different backgrounds and employers.”\nMany companies sponsor Rust with infrastructure resources, including ARM, Microsoft Azure, Integer32, 1Password, Google Cloud, Mozilla, Sentry, and Amazon Web Services.\nAWS has affirmed their commitment by stating “at AWS, we love Rust, too, because it helps AWS write highly performant, safe infrastructure-level networking and other systems software.” And more recently they followed up with an outline of their plan to contribute with a dedicated Rust team.\nRust doesn’t look to fade away anytime soon, so learning it now won’t leave you with a useless skill and wasted time.\nMany companies are using Rust—according to the official Rust book, the use cases include “command line tools, web services, DevOps tooling, embedded devices, audio and video analysis and transcoding, cryptocurrencies, bioinformatics, search engines, Internet of Things applications, machine learning, and even major parts of the Firefox web browser.”\nAmazon first used Rust for Firecracker, which launched in 2018. In the above-mentioned post in November 2020, Shane Miller, senior software engineering manager at AWS, said “Rust is a critical component of our long-term strategy.”\nThe team at Dropbox wrote about betting on Rust as one of the best decisions they made. “More than performance, its ergonomics and focus on correctness has helped us tame sync’s complexity. We can encode complex invariants about our system in the type system and have the compiler check them for us.”\nSome people have spotted Apple hiring for Rust roles. And as people in the discussion on Hacker News point out, it is likely that most large companies experiment with it. Still noteworthy, Google’s new OS Fuchsia is built with Rust. Others using it include npm, Discord, and Figma.\nIt’s worth noting that only 5% of developers are currently using Rust. Even though it is loved, it’s not widely used, and low adoption could factor into consideration of its long-term prospects.\nDevelopers looking for safety and speed\nFirst and foremost, Rust is written for speed and stability. The process of writing code is usually slowed down when you run into issues. Steve Donovan describes this as safe by default. According to him, Rust principles work as guardrails. Read more on those five principles here.\nFor teams\nRust can also work for a team of programmers with varying systems programming knowledge by leveraging the strictness of the compiler. This way, less experienced programmers don’t need to rely on senior developers to catch their bugs and allowing more people to work together on the same codebase without having to worry about keeping track of all the moving parts, a huge help on larger code bases. Furthermore, `rustfmt` improves consistent coding style across a team.\nProgrammers of embedded systems\nEmbedded programmers praise the sophisticated type system, its easy cross-compiling, and Rust as a modern, zero-overhead language, offering a real alternative to C/C++ in the embedded space.\nFor students\nWhile many say it is not a beginner language as such, the community makes an explicit commitment to answering student and beginner questions.\nThe goals and motivations for Rust’s creators include better compile-time error detection and prevention, clarity and precision of expression, run-time efficiency, high-level zero-cost abstractions, and safe concurrency. Rust has some great compiler error messages; users stress that they are not only friendly in tone and worth reading the entire message since it is full of great information.\nRust is suitable for anything from work with high-performance servers, command-line utilities, operating system modules, web browsers or embedded applications. A recent keynote discusses industrial, automotive, and avionics use cases.\nRust is not a beginner’s language, and as such, most learning materials build off of previous programming skills. Knowing at least one language helps, but some developers have Rust as their first introduction to a systems programming language. Most guides recommend prior C or C++ knowledge. Many Rust tutorials are about rewriting tools previously written in another language. While learning it as your first programming language might be a brave endeavor, it might not be for everyone.\nIf you are new to programming, Rust might not be for you. There are many other languages that are considered better beginner languages. For those already familiar with C++, it’s worth noting, it is considered syntactically similar to Rust. Also see: Why is Rust difficult?\nWell-defined semantics make Rust easy to understand.\nRust allows some flexibility here, for those situations where mutating in place may be more efficient: it allows you to explicitly declare that a variable will be mutable. By requiring you to clearly state your intent, Rust nudges you to make the code’s purpose clearer - both for other programmers reading the code, and for the compiler itself.\nPart of the Rust community’s reputation for being welcoming comes from the wealth of material provided for learners by the Rust community and the Rust Core Team.\nOfficial Rust materials\nThere are Rust lovers out there documenting their own journey into Rust in an effort to create bite-sized guides to the basics, as well as learning by example use cases:\nEntry-level resources and tutorial series\nFor devs familiar with other languages\nTutorials geared towards programmers of specific other languages.\nAdvanced:\nOther resources:\nLearn from specific use cases, demos, talks.\nTalk: On stage after the Stack Musical at !!Con\nhttps://rustconf.com/\nhttps://www.rustlatam.org\nhttps://rustfest.global\nhttp://www.rust-belt-rust.com\nInteresting Stack Overflow questions:\nMore about Rust, or in fact any other technology tag you can find on the Rust wiki page.\nInterested in job opportunities with Rust? Check out those on our job board?\nLearning or teaching Rust and got a recommendation for our list? Add yours in the comments section!", | |
"site_name": "Microsoft", | |
"site_long_name": "learn.microsoft.com", | |
"age": "2023-03-13T00:00:00.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://learn.microsoft.com&size=96", | |
"thumbnail": "https://learn.microsoft.com/training/achievements/take-your-first-steps-with-rust-social.png", | |
"snippets": [ | |
"Understand what generic types and traits are and how to use them in Rust. ... Learn about how to effectively use modules and how to integrate with packages and third-party crates.", | |
"Learn about the types of testing you can do with Rust. ... Create a command-line program to manage to-do list items.", | |
"A quick introduction to Rust language features and how Rust compares with other programming languages.", | |
"Explore how to use hash maps in Rust. Discover how to use loop expressions to iterate through data. ... In this module, you'll learn about ways to handle errors in Rust." | |
] | |
}, | |
{ | |
"title": "Learn Rust - Rust Programming Language", | |
"url": "https://www.rust-lang.org/learn", | |
"description": "A language empowering everyone to build reliable and efficient software.", | |
"content": null, | |
"site_name": "Rust-lang", | |
"site_long_name": "rust-lang.org", | |
"age": "2023-04-08T00:00:00.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://rust-lang.org&size=96", | |
"thumbnail": "https://www.rust-lang.org/static/images/rust-social-wide.jpg", | |
"snippets": [ | |
"Use Rust to build browser-native libraries through WebAssembly. ... Become proficient with Rust for Microcontrollers and other embedded systems. Curious about the darkest corners of the language? Here’s where you can get into the nitty-gritty:", | |
"Alternatively, Rustlings guides you through downloading and setting up the Rust toolchain, and teaches you the basics of reading and writing Rust syntax, on the command line. It's an alternative to Rust by Example that works with your own environment.", | |
"If reading multiple hundreds of pages about a language isn’t your style, then Rust By Example has you covered. While the book talks about code with a lot of words, RBE shows off a bunch of code, and keeps the talking to a minimum.", | |
"All of this documentation is also available locally using the rustup doc command, which will open up these resources for you in your browser without requiring a network connection! ... Comprehensive guide to the Rust standard library APIs." | |
] | |
}, | |
{ | |
"title": "Introduction to the Rust Programming Language: Getting Started | by CodiLime | Medium", | |
"url": "https://medium.com/@codilime/introduction-to-the-rust-programming-language-getting-started-edbb474f9d5e", | |
"description": "What’s also important is that ... embedded devices. To start with Rust, and there is no surprise here, you need to <strong>download and install a Rust compiler, via Rustup as a recommended method</strong>....", | |
"content": null, | |
"site_name": "Medium", | |
"site_long_name": "medium.com", | |
"age": "2023-05-26T04:16:17.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://medium.com&size=96", | |
"thumbnail": "https://miro.medium.com/v2/resize:fit:1200/1*xliBmETeb4HMWs5N-Ulf-g.png", | |
"snippets": [ | |
"It has a built-in concurrency model that handles concurrent programming with ease. What’s also important is that Rust is cross-platform and can be compiled to run on different platforms, including Linux, macOS, Windows, and even embedded devices. To start with Rust, and there is no surprise here, you need to download and install a Rust compiler, via Rustup as a recommended method.", | |
"After installation, you can start your Rust journey. A short instruction on how to compile and run a Rust program: Write the Rust code in a text editor or an integrated development environment (IDE). Save the Rust code to a file with the .rs extension.", | |
"After starting the threads, we call the join method on each handle to wait for the threads to finish executing before exiting the main function. In this concurrency example, we are running multiple threads of execution at the same time. The println statements in each thread will interleave with each other and be printed out in a non-deterministic order. Rust provides several tools for concurrent programming, including threads, channels, and locks.", | |
"Read on to find information about the most important Rust-related aspects and get to know this programming language better. Below you will find a short overview of Rust, its advantages, and examples of Rust applications. Rust was designed to help with safe concurrent systems programming." | |
] | |
}, | |
{ | |
"title": "Introduction - A Gentle Introduction to Rust", | |
"url": "https://stevedonovan.github.io/rust-gentle-intro/", | |
"description": "I would recommend <strong>getting</strong> the default stable version; it's easy to download unstable versions later and to switch between. This <strong>gets</strong> the compiler, the Cargo package manager, the API documentation, and the <strong>Rust</strong> Book. The journey of a thousand miles <strong>starts</strong> <strong>with</strong> one step, and this first step is ...", | |
"content": null, | |
"site_name": "Stevedonovan", | |
"site_long_name": "stevedonovan.github.io", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://stevedonovan.github.io&size=96", | |
"snippets": [ | |
"I would recommend getting the default stable version; it's easy to download unstable versions later and to switch between. This gets the compiler, the Cargo package manager, the API documentation, and the Rust Book. The journey of a thousand miles starts with one step, and this first step is painless.", | |
"When a new stable release appears, you just have to say rustup update to upgrade. rustup doc will open the offline documentation in your browser. You will probably already have an editor you like, and basic Rust support is good. I'd suggest you start out with basic syntax highlighting at first, and work up as your programs get larger.", | |
"It's an opportunity to try before you buy, and get enough feeling for the power of the language to want to go deeper. As Einstein might have said, \"As gentle as possible, but no gentler.\". There is a lot of new stuff to learn here, and it's different enough to require some rearrangement of your mental furniture. By 'gentle' I mean that the features are presented practically with examples; as we encounter difficulties, I hope to show how Rust solves these problems.", | |
"Introduction to the Rust language, standard library and ecosystem" | |
] | |
}, | |
{ | |
"title": "Getting started with Rust | JetBrains Fleet Documentation", | |
"url": "https://www.jetbrains.com/help/fleet/getting-started-with-rust.html", | |
"description": "To start coding, <strong>create a project by using Cargo</strong>. Cargo is the build system and package manager for the Rust programming language. It provides a way to manage Rust projects, including building, testing, and managing dependencies. With your current workspace opened, click View | Terminal.", | |
"content": null, | |
"site_name": "JetBrains Fleet Help", | |
"site_long_name": "jetbrains.com", | |
"age": "2024-11-25T05:50:04.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://jetbrains.com&size=96", | |
"thumbnail": "https://www.jetbrains.com/help/fleet/getting-started-with-rust.html", | |
"snippets": [ | |
"This tutorial gets you up to speed with Rust development in JetBrains Fleet. It covers the installation, project setup, and working with code. JetBrains Toolbox 1.22.10970 or later: the Download page. Rust: Install Rust. Workspace is the directory where your project resides. It contains the project files and settings. You can open an existing project or start a new project by opening an empty directory.", | |
"To start coding, create a project by using Cargo. Cargo is the build system and package manager for the Rust programming language. It provides a way to manage Rust projects, including building, testing, and managing dependencies. With your current workspace opened, click View | Terminal.", | |
"Broadly, debugging is the process of detecting and correcting errors in a program. You can run the debugging from the gutter of the editor or by using run.json. For a tutorial on debugging, refer to Debug Rust code. Each debugging process starts with setting a breakpoint.", | |
"It allows you to customize the startup: add command line arguments, use custom commands, and so on. For example, in the following example we use executableArgs to pass command-line parameters to our program. For more information about run configuration parameters, refer to Rust run configurations." | |
] | |
}, | |
{ | |
"title": "Rust Tips - a starting guide for beginner players | GamesRadar+", | |
"url": "https://www.gamesradar.com/rust-tips-help-getting-started/", | |
"description": "Originally released way back in 2013, <strong>Rust</strong> has finally arrived on consoles and is still one of the most entertaining and challenging survival experiences you can find. However, without an in-game tutorial it’s hard <strong>to</strong> <strong>get</strong> <strong>started</strong>, so check out these <strong>Rust</strong> tips and see if you can live to see ...", | |
"content": null, | |
"site_name": "gamesradar", | |
"site_long_name": "gamesradar.com", | |
"age": "2022-04-26T00:00:00.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://gamesradar.com&size=96", | |
"thumbnail": "https://cdn.mos.cms.futurecdn.net/SWpcKetcvkQRhzbShxSG5D.jpg", | |
"snippets": [ | |
"Originally released way back in 2013, Rust has finally arrived on consoles and is still one of the most entertaining and challenging survival experiences you can find. However, without an in-game tutorial it’s hard to get started, so check out these Rust tips and see if you can live to see another day.", | |
"Your very first choice in Rust is choosing a server to play on. Many newcomers just go for a highly populated official sever, but these are often full of experienced players. As a newcomer, you need some time to figure out how to play without repeatedly get killed right after spawning. You should therefore join a beginner-friendly server. To get started, click ‘play’ in the main menu, and then go to ‘community servers’. You will see a search bar at the bottom of your screen.", | |
"As explained in the previous point, you need plenty of wood to get started, and it also gives you cover. The desert, on the other hand, is dangerous, and the snowy areas are unsuitable for new players without clothes. It’s also a good idea to be close to roads and old towns to search for better materials later on. ... This is perhaps the most common mistake people make in Rust; farming far more than necessary.", | |
"How to stay alive and get started in the brutal world of Rust" | |
] | |
}, | |
{ | |
"title": "r/playrust on Reddit: Everything you need to know to start playing Rust. - A collection of guides and tutorials", | |
"url": "https://www.reddit.com/r/playrust/comments/t1bzxw/everything_you_need_to_know_to_start_playing_rust/", | |
"description": "Mostly PC users, for console <strong>Rust</strong> please use r/RustConsole. ... Bogleheads are passive investors who follow Jack Bogle's simple but powerful message to diversify with low-cost index funds and let compounding grow wealth. Jack founded Vanguard and pioneered indexed mutual funds. His work has since inspired others <strong>to</strong> <strong>get</strong> ...", | |
"content": null, | |
"site_name": "Reddit", | |
"site_long_name": "reddit.com", | |
"age": "2022-02-25T19:17:01.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://reddit.com&size=96", | |
"thumbnail": "https://www.redditstatic.com/icon.png", | |
"snippets": [ | |
"Mostly PC users, for console Rust please use r/RustConsole. ... Bogleheads are passive investors who follow Jack Bogle's simple but powerful message to diversify with low-cost index funds and let compounding grow wealth. Jack founded Vanguard and pioneered indexed mutual funds. His work has since inspired others to get the most out of their long-term investments.", | |
"Rust - Electriicty guide - A guide on electricity by AntiCod ... Berries are awesome - Why you should get a mixing table and use teas. Jfarr's monument guides - There is no playlist so I will only link one of his videos. But you can search for \"Jfarr *monument name* guide\" and find one for every monument. All Monument keycard puzzles - A guide on all the puzzles by Wadez ... A guide on how to improve your aim before you even start your computer - How your setup determines your ingame performance", | |
"In this post I want to put together all my guides and those of other players to create a resource that we can point new players to if they come to…", | |
"The largest community for the game RUST. A central place for discussion, media, news and more. Mostly PC users, for console Rust please use r/RustConsole. ... For help with problems with Blender 3D Software, check out our rules before posting questions." | |
] | |
}, | |
{ | |
"title": "Getting started in Rust — Rustafied", | |
"url": "https://www.rustafied.com/getting-started-in-rust-experimental", | |
"description": "<strong>Rust</strong> is a brutal game, so you will need something to defend yourself. There are two main weapons at the <strong>start</strong>: ... Wooden Spear Crafting Cost: 300 wood You can either throw this spear or use it to poke holes into something. Be careful when throwing though, since whatever you threw it at might decide to run away with ...", | |
"content": null, | |
"site_name": "Rustafied", | |
"site_long_name": "rustafied.com", | |
"age": "2020-04-02T00:00:00.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://rustafied.com&size=96", | |
"snippets": [ | |
"Rust is a brutal game, so you will need something to defend yourself. There are two main weapons at the start: ... Wooden Spear Crafting Cost: 300 wood You can either throw this spear or use it to poke holes into something. Be careful when throwing though, since whatever you threw it at might decide to run away with it or even throw it back at you.", | |
"A guide on how to get started in Rust Experimental. It covers the everything you need to know to build your first base in Rust.", | |
"PRO TIP: Usually, attacking an animal with a melee weapon isn’t the best idea. There is a trick though: If you manage to make an animal follow you into shallow water, it will become very slow. Since the poking range of the spear is greater than the attack range of all animals in Rust, you can safely kill it without getting hurt.", | |
"Hunting Bow Crafting Cost: 200 wood, 50 cloth (+ 25 wood, 10 stone per 2 wooden arrows) You have to get good with this weapon. It is THE main weapon for the first day in Rust. It shoots arrows at short to medium distance. You can kill most animals with 3-4 shots; only bears are quite dangerous because they take 8 hits before going down." | |
] | |
}, | |
{ | |
"title": "RUST Beginner Tips - Ultimate Starter Guide For Rust Players", | |
"url": "https://lone.design/rust-beginner-tips-starter-guide-for-rust-players/", | |
"description": "Craft a defensive tool such as ... a bow with arrows. Craft a Stone Hatchet and a Stone Pickaxe for faster resource gathering. A Sleeping Bag is crucial for setting a respawn point, make sure to craft and place one early on using cloth. Craft a Building Plan and Hammer <strong>to</strong> <strong>start</strong> constructing your shelter. You can also browse crafting calculator sites <strong>to</strong> <strong>get</strong> the exact requirement needed for any item as well as more information about items, costs, amounts, etc, from sites like Rustlabs...", | |
"content": null, | |
"site_name": "Lone", | |
"site_long_name": "lone.design", | |
"age": "2023-11-08T03:58:17.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://lone.design&size=96", | |
"thumbnail": "https://lone.design/wp-content/uploads/2023/10/RustClient_oy33W11sbj.jpg", | |
"snippets": [ | |
"Craft a defensive tool such as Spear which is only 300 wood or alternatively a bow with arrows. Craft a Stone Hatchet and a Stone Pickaxe for faster resource gathering. A Sleeping Bag is crucial for setting a respawn point, make sure to craft and place one early on using cloth. Craft a Building Plan and Hammer to start constructing your shelter. You can also browse crafting calculator sites to get the exact requirement needed for any item as well as more information about items, costs, amounts, etc, from sites like Rustlabs", | |
"By Lone Guides, Player Guides, Rust beginner guide, guide, player guide Comments Off on RUST Beginner Tips – Ultimate Starter Guide for Rust Players · Embarking on the gritty and relentless journey that Rust offers is an experience that hinges between thrilling survival and unforgiving challenges. As a newcomer, the harsh realities of Rust’s world may seem overwhelming, yet with the right guidance, the path to becoming a seasoned survivor is a reasonable goal.", | |
"This starter guide for Rust serves as your companion through the early stages of Rust, offering a reservoir of essential tips to navigate the difficulties of the game. These tips are in no specific order, but just to offer a rich library of vastly beneficial information to a new player of the game. ... Your entry into Rust begins with choosing a server—a decision that could shape your initial experience.", | |
"Your base is your sanctuary, where you’ll store resources, respawn upon death, and take a breather from Rust’s harsh environment. Location: Living further away from higher-tier monuments is ideal when starting to avoid high-traffic areas. Also, live close to resources if possible. Design: Start with a simple design like a 1×1 or 2×1 with an airlock to prevent raiders from easily accessing your base." | |
] | |
}, | |
{ | |
"title": "Rust Tips For Beginners: 9 Strategies To Help Survive The First Few Nights - GameSpot", | |
"url": "https://www.gamespot.com/articles/rust-tips-for-beginners-9-strategies-to-help-survive-the-first-few-nights/1100-6505158/", | |
"description": "So you can type in tags like "beginner" <strong>to</strong> <strong>get</strong> the best <strong>starting</strong> servers. Of course, if you want a trial by fire, then going with a hardcore or Official server could be the way to go. Wood is the first resource you'll want in abundance. Wood is one of the most important early-game resources you can gather in <strong>Rust</strong>...", | |
"content": null, | |
"site_name": "GameSpot", | |
"site_long_name": "gamespot.com", | |
"age": "2022-08-06T00:00:00.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://gamespot.com&size=96", | |
"thumbnail": "https://www.gamespot.com/a/uploads/scale_tiny/536/5360430/2414940-newrustlogo4nobg.png", | |
"snippets": [ | |
"The number one thing that might deter a newcomer from playing Rust further is if their base gets ransacked by another player. Even if players picked a beginner-friendly or PvE server, their base can still get robbed. For this reason, players want to ensure they pick an out-of-the-way spot for their first base. This will allow them to get started with a modest amount of resources and learn the basics of building a base.", | |
"At the start of the game, though, you don't want to gather more than you think you will need to get set up with a base and some additional constructions. Hide your riches or watch them disappear. Speaking of protection, this brings us to the final tip on this list. Whenever you do start to progress in Rust and build a bigger base with more resources invested, you'll want to start protecting your items.", | |
"Rust can be a difficult game to start out in, so we compiled a list of tips to help beginners get on the right track.", | |
"It's the only material you will need to build your first starter base and is also needed to build items like a storage box and campfire. To gather wood, you'll first need a simple item like a rock. Even this primitive item will allow you to hit a tree in order to get a modest amount of wood. Once you have 100 wood, and 75 metal fragments, you can craft a hatchet, which will increase your wood-gathering speed. As you progress in Rust, you'll find that different trees drop more wood and stronger hatchets yield a higher number of wood planks each time you chop down a tree." | |
] | |
}, | |
{ | |
"title": "r/rust on Reddit: Best way to start learning rust.", | |
"url": "https://www.reddit.com/r/rust/comments/en3wjg/best_way_to_start_learning_rust/", | |
"description": "A couple months ahead of you and found the free book on the <strong>Rust</strong> site was perfect when coupled <strong>with</strong> <strong>Rust</strong> By Example -also free. ... The official <strong>rust</strong> books are a great <strong>start</strong>. You learn everything you need <strong>to</strong> <strong>get</strong> <strong>started</strong> <strong>with</strong> <strong>rust</strong>. There is also rustlings and <strong>rust</strong> by example.", | |
"content": null, | |
"site_name": "Reddit", | |
"site_long_name": "reddit.com", | |
"age": "2020-01-11T06:20:56.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://reddit.com&size=96", | |
"thumbnail": "https://www.redditstatic.com/icon.png", | |
"snippets": [ | |
"I have also started learning rust and I am enjoying. I find it easier to convert small application I have developed with other languages to rust. Ofcourse I do this while, referring to online rust material. Just make sure you get started.", | |
"A place for all things related to the Rust programming language—an open-source systems language that emphasizes performance, reliability, and productivity. ... I know some basic stuff from c,c++, and shell scripting. Where should i start with learning rust, im willing to purchase a book or class if that is a good way to start.", | |
"Start your project in Rust and work on it. Like a CLI application. ... I would start with reading on of the books, then code some toy code to make sure you have comprehended what you read, wash rinse and repeat.", | |
"The rust compiler helps you to complete a bunch of lessons. This is sooooo cool. ... Awesome bro I'll check that out along with some of the free books people are recommending, thank you for your suggestions. ... +1 on this. I come from the same background as you: C/C++ (but for embedded systems). You'll have to relax at first and let some thing sink before you can start gaining confidence because you'll be able to do the same things that you did on C/C++ but the mechanism are COMPLETELY different." | |
] | |
}, | |
{ | |
"title": "Video Tutorial For Start Rust - tutorials - The Rust Programming Language Forum", | |
"url": "https://users.rust-lang.org/t/video-tutorial-for-start-rust/28169", | |
"description": "Hey Guys, I <strong>start</strong> Reading <strong>Rust</strong> lang book. I want inside book watch video tutorial in <strong>Rust</strong> for fundamentals, please introduce to me some good video tutorials for <strong>rust</strong> lang", | |
"content": null, | |
"site_name": "Rust-lang", | |
"site_long_name": "users.rust-lang.org", | |
"age": "2019-05-12T06:34:21.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://users.rust-lang.org&size=96", | |
"thumbnail": "https://global.discourse-cdn.com/flex019/uploads/rust_lang/original/2X/8/83e41956eccfd67ad6ff76f15a2c22e58db31d4f.svg" | |
}, | |
{ | |
"title": "GETTING STARTED in Rust as a BEGINNER (2024) - YouTube", | |
"url": "https://www.youtube.com/watch?v=CBpGxOwGonY", | |
"description": "In this video, I go through 1 hour of <strong>Rust</strong> gameplay and cover some very basic, beginner friendly tips that will help you both survive and progress as a new R...", | |
"content": null, | |
"site_name": "YouTube", | |
"site_long_name": "youtube.com", | |
"age": "2024-02-02T19:00:06.000Z", | |
"language": "en", | |
"is_safe": true, | |
"favicon": "https://t1.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://youtube.com&size=96", | |
"thumbnail": "https://i.ytimg.com/vi/CBpGxOwGonY/maxresdefault.jpg" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment