-
Notifications
You must be signed in to change notification settings - Fork 0
/
feed.json
42 lines (42 loc) · 5.87 KB
/
feed.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
"version": "https://jsonfeed.org/version/1",
"title": "Get Rusty While Building a Database",
"description": "",
"home_page_url": "https://nihaocami.github.io/get-rusty-while-building-a-database",
"feed_url": "https://nihaocami.github.io/get-rusty-while-building-a-database/feed.json",
"user_comment": "",
"icon": "https://nihaocami.github.io/get-rusty-while-building-a-database/media/website/rust-db.png",
"author": {
"name": "Chris A."
},
"items": [
{
"id": "https://nihaocami.github.io/get-rusty-while-building-a-database/1-setting-up-a-new-rust-project.html",
"url": "https://nihaocami.github.io/get-rusty-while-building-a-database/1-setting-up-a-new-rust-project.html",
"title": "#1: Setting Up a New Rust Project",
"summary": "Hopefully by now you're all setup and ready to build. Let's start simple and just setup our project. If you have installed Rust correctly. You should start by running the following command: cargo init rusty-db In our case, we called our project rusty-db, but you…",
"content_html": "<p>Hopefully by now you're all setup and ready to build. Let's start simple and just setup our project.</p>\n<p>If you have installed Rust correctly. You should start by running the following command:</p>\n<pre class=\"language-bash\"><code>cargo init rusty-db</code></pre>\n<p>In our case, we called our project rusty-db, but you can name it whatever you want. This command should generate the following directory for you.</p>\n<pre class=\"language-apacheconf\"><code>📦rusty-db\n ┣ 📂src\n ┃ ┗ 📜main.rs\n ┗ 📜Cargo.toml</code></pre>\n<p>The <strong><em>Cargo.toml </em></strong>file includes your project settings including version, dependencies, name etc. At this point you can ignore that until we need it later.</p>\n<p>Now let's take a look at <em><strong>main.rs </strong></em></p>\n<pre class=\"language-rust\"><code>fn main() {\n println!(\"Hello, world!\");\n}\n</code></pre>\n<p>Here we see a <strong>main </strong>function defined using the <strong>fn </strong>keyword. In Rust, like some other programming languages, your application needs a \"main\" entry point and without it, your program won't compile.</p>\n<p>In our main function you can see that we are trying to print \"Hello, world!\" to our standard output. The <strong>println!() </strong>function is more powerful than the simple usage here. We will be using that more later.</p>\n<p>Now let's compile our program. You can do this in several ways and depending on your needs.</p>\n<p>If you just want to quickly run your application to validate it:</p>\n<pre class=\"language-bash\"><code>cargo run</code></pre>\n<p>This will build and compile your program. If you just want to build, but not run it:</p>\n<pre class=\"language-bash\"><code>cargo build</code></pre>\n<p>You can also use the following to build your program:</p>\n<pre class=\"language-bash\"><code>rustc <PATH_TO_MAIN.RS></code></pre>\n<p>Although I don't recommend that if you're just starting out. Cargo is generally the more \"friendly\" way to go.</p>\n<p>One last thing, if you prefer to use you're editor to run your application, I am sure you can find an extension for it. Since I use VS Code, I use the <a href=\"https://rust-analyzer.github.io\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Rust Analyzer</a> extension which provides tons of features including build/run.</p>\n<p>After running one of the above commands, you should now see an executable file built for your system. If you run that file through your command line, you should see the classic:</p>\n<pre class=\"language-bash\"><code>Hello, world!</code></pre>\n<p>Hooray! now that you're all set up, in the next chapter, we start to actually implement the db. </p>\n<p>Stay tuned :)</p>",
"author": {
"name": "Chris A."
},
"tags": [
],
"date_published": "2024-12-08T09:19:48-08:00",
"date_modified": "2024-12-08T17:34:44-08:00"
},
{
"id": "https://nihaocami.github.io/get-rusty-while-building-a-database/preface.html",
"url": "https://nihaocami.github.io/get-rusty-while-building-a-database/preface.html",
"title": "#0: Words That Need To Be Said",
"summary": "I have a motto. If you want to learn something very well, teach it - Some wise person Well, not exactly mine. But it is something I heard long time ago and it has proven to be true time and time again. So, as much…",
"content_html": "<p>I have a motto.</p>\n<blockquote>\n<p>If you want to learn something very well, teach it - Some wise person</p>\n</blockquote>\n<p>Well, not exactly mine. But it is something I heard long time ago and it has proven to be true time and time again. So, as much as I am making this as a contribution to Rust and Rust learners, it is also a selfish endeavour to learn more myself.</p>\n<p>In this series, I will be making a simple \"lite\" database like SQLite from scratch. Though I am aiming to build a NoSql version. Building a database is no simple task and it's a project that I am hoping to keep going for years to come.</p>\n<p>While doing this, we will be learning things as simple as defining functions in Rust and as advanced as handling multithreading, memory management and more. I should note that this won't be a \"intro to programming\" series and I assume you already have some fundamental understanding of programming concepts.</p>\n<p>I hope you find these posts useful and that it can help you in your journey to becoming Rusty.</p>",
"author": {
"name": "Chris A."
},
"tags": [
],
"date_published": "2024-12-06T08:27:32-08:00",
"date_modified": "2024-12-08T17:38:05-08:00"
}
]
}