AI prompts
base on ๐Memory safe, blazing fast, configurable, minimal hello world written in rust(๐) in a few lines of code with few(1247๐) dependencies๐ # ๐ hello-world.rs ๐
๐ Memory safe, blazing fast, minimal and configurable hello world project written in the rust(๐) programming language ๐
๐ While this depends on more c code than rust(๐) code to compile, because rust(๐) is magically **memory safe**, now all c code is memory safe too ๐
๐ This project is very minimal, it only requires **1247** crates ๐
### Building
To compile this project you need only one library ๐:
<div>1. <a href="https://www.cairographics.org/download/">cairo development libraries</a> ๐.</div>
<div>1. <a href="https://www.gtk.org/docs/installations/">libgtk development libraries</a> ๐.</div>
<div>1. alsa-lib ๐</div>
<div>1. glfw ๐</div>
<div>1. freetype ๐</div>
<div>1. libglib ๐</div>
<div>1. pango ๐</div>
<div>1. atk ๐</div>
<div>1. pixbuf ๐</div>
<div>1. gdk ๐</div>
<div>1. vulkan(moltenVK on mac) ๐</div>
</br>
<div>Just a single library ๐</div>
</br>
You probably have most of them already, if it says something along the words, you know what to search for now
Then you can just `make` and the compiled executable should be located in `./target/release/hello-world` run it or install it with `make install`.
Due to the lightweightness of rust(๐), unlike node_modules being fairly large for few dependencies, rust(๐) manages compile caches efficiently and stores them to storage to save compile times! Just **37G** target folder on couple of compilation(dev+release), the compile time is only around **2 hours and 30 minutes** on my mac air on release mode

A clean build makes it take around _4.7G_

The CPU usage is pretty minimal too (release mode)

It is slower than echo but memory safety comes at a cost! We need to be memory chad and blazing pure and lightning based

Benchmark by [cypercine](https://github.com/mTvare6/cypercine)
### Installation
#### Arch Linux
```sh
$ makepkg -si
$ pacman -U <package>.pkg.tar.xz
```
#### Docker
```sh
$ docker build -t hello-world .
$ docker run -it --rm --name hwrs hello-world
```
#### Nix
```sh
$ nix-env -i -f default.nix
```
#### Shade
```sh
$ wget "https://raw.githubusercontent.com/mTvare6/hello-world.rs/master/hello-world.rs-buildscript" -O <prefix>/user/main/hello-world.rs
$ shade install hello-world.rs
```
### Why rust(๐) while its only 1 line and depends on 600 c bind crates?
Here are my takes on that matter
> **C** in "c language" stands for **C**ringe and **C**VE and **C**ervical **C**apricious **C**atastrophic **C**hthonic **C**lumsy **C**lueless **C**omplex and **C**ryptic ๐คฎ
> **R** in "rust(๐) systems programming language" stands for **R**ewrite, **R**obust, **R**eliable, **R**ambunctious, **R**eprehensibl[ly great] and **S**ecure๐
> [Since hello-world.rs is written in blazingly pure, configurable, lightweight and memory pure rust(๐) - the CVEs are secure, memory chad and blazing pure](https://github.com/mTvare6/hello-world.rs/issues/) ๐
Here are the comments from few of my fellow Rustaceans ๐
> People ask the question "what's rust(๐) good for?" pretty frequently, and little terminal apps like this are precisely the reason. [...]. It enables a kind of workflow that simply didn't exist before: I could have a fully safe, "correct", LLVM-optimized binary installed on my desktop in an afternoon.๐
> Modern rust(๐) appears pretty similar to modern JavaScript. You declare your variables with let๐
> I think it would make rust(๐) more productive if rust(๐) could absorb Python's ecosystem(many mature wheels) as soon as possible.๐
> One thing I like about rust(๐) is that it filters out lazy/sloppy thinkers. Even when I disagree with another rust(๐) programmer, there is a certain level of respect that comes from knowing that they thought about the problem deeply enough to pass the borrow checker.๐
> The thing I hate about rust(๐) the most is that all the other languages feel extra dumb and annoying once I learned borrowing, lifetimes etc.๐
> "I feel like the discovery of rust(๐) is transporting me back to my younger self [...]" "When I started learning rust(๐) in earnest in 2018, I thought this was a fluke. It is just the butterflies you get when you think you fall in love, I told myself."๐
> rust(๐)โs product is not a programming language or a compiler. rust(๐)โs product is the experience of being a rust(๐) developer๐
> rust(๐) can handle CPU-intensive operations such as executing algorithms. ๐
> Because itโs typically typed, rust(๐) catches errors at compile time. [...] Also, it compiles code down to machine learning, allowing for extra efficiency.๐
> Many people try to compare rust(๐) to Go, but this is flawed. Go is an ancient board game that emphasizes strategy. rust(๐) is more appropriately compared to Chess, a board game focused on low-level tactics.๐
> rust(๐)'s unsafe keyword is a critical innovation for information security. I believe that Safe rust(๐) will eventually be a foundational technology for all of human society.๐
> I wish I had a compiler (one as informative as rust(๐)'s would be amazing) but for Japanese. If I could learn Japanese the way I learn programming I'd be conversationally fluent by now.๐
> rust(๐) held onto itโs spot as the most beloved language among the professional developers we surveyed. That said, the majority of developers who took the survey arenโt familiar with the language.๐
> I've experienced modern package management through Cargo and anything below that level now seems like returning to stone age.๐
> I probably can write same code in c, but since rust(๐) is rust(๐), I need to (re)write in rust(๐) ๐
> Wait its only time until rust(๐) makes assembly memroy safe.๐
> Done lots of C/C++/Python is the past, just started learning node/JS recently. Just kicked off a rust(๐) tutorial, you people obviously already know this, but rust(๐) is basically all the awesomeness of C++ smashed together with all the awesomeness and dependency management of JS. Looking forward to learning more rust(๐) in the future! ๐
> All C/C++ devs are absolute fools, they are wasting their time writing c/c++ when instead they could write in rust(๐)!
> [C devs are people who use leeches to cure diseases](https://matrix.to/#/!CkLhFPTTdUYTfxSNGd:libera.chat/$nlVNx5d4nW6dNd7Y_0M6feEdwln2xU_mIUOivwJaXgM?via=libera.chat&via=matrix.org&via=halogen.city) ๐
> As a rust(๐) developer, I have no idea how any of my code or computers actually works, but its cool to ask people in discord.gg/rust(๐) for all help and write code๐
I've recently added source to where I've got these quotes from, when I get time I will add sources to where there messages are from, for now some sources aren't marked
", Assign "at most 3 tags" to the expected json: {"id":"12356","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"