Hello everyone ! (New nauplius onboard :))

Welcome, @Daja, to our community! Glad to have you here. :heart:

I also like games of course, I am looking for a first easy manageable first project.

This might be a bit sophisticated, but have a look at Amethyst. It's a game engine in Rust.

For a general overview, head over to:

3 Likes

Coincidence @janriemer, but the crash course teacher (just figured he is @CleanCut on the forum!) is a contributor to Amethyst and told me about it today too :slight_smile: ! I'll definitely have a look. If I understand well, it's an engine but with the possibility to write Rust code?

1 Like

Welcome! I do want it encourage you to share any issues you might have while expanding your understanding of the language. That feedback can help improve the documentation and behavior of the compiler for all newcomers after you :slightly_smiling_face:

3 Likes

@Daja Welcome! I hope you found my crash course useful :blush:

Amethyst is a game engine entirely written in Rust, and with which you use Rust to write your games. The engine is alpha quality and undergoing some rapid change, but that is true of any active game engine written in Rust. :wink: I just started seriously contributing to Amethyst earlier this month--I'm doing what I can to help it reach a more usable condition. You are most welcome to come check it out. There is also an Amethyst forum.

3 Likes

@ekuber Thank you! There is a lot to learn so I try to stackoverflow everything and note my interrogation, but since it is so nicely asked and important for the compiler I will ask here :writing_hand:t5: :speech_balloon:.

@CleanCut this course is gold! It gave me the magic little push to pass to the other side: from learning passively to actually wanting to develop something of my own. I felt the spark of a new bright and expanding little universum in my head -if you see what I mean :sparkles:.

2 Likes

I'm so glad! Inspiring reactions like yours make teaching worth it. :heart:

3 Likes

@Daja Embedded projects are also my domain - I'm working on a bare metal OS for my Raspberry Pi 3 B+ :wink: - One day it will hopefully serve a nice and convinient OS to run RPi driven :robot: :smiley: that could be easily extended with new ferures and capabilities. I'v moved from C to C++ to Rust exactly for the promises of safety, performance and the like :wink: - Doing all this stuff in spare time takes a long time to evolve but the learning and fun is really worth it.

So enjoy your journey - and the amazing community here is always happy to support - this is my experience at least :smiley:

Reading/Writing horror stories? Wow - Halloween must be the best time of the year for you than :smiley: :smiley: :smiley:

2 Likes

@CleanCut I

@2ndTaleStudio I would not dare to say they are my domain, just a strong interest. I just figured interrupts and I2C for school -to build something that was fun :oncoming_automobile:. May I ask if your project is similar to the Arduino interface?

:book: I am really bad at writing, so I hope to make generated fiction ... also someday.

Hey, well - even if one should not answer a question with a question by itself but may I ask you back what kind of similarity are you referring to? Regarding I2C interface or Rust programming for embedded Arduino in general?

I meant Rust programming IDE for Arduino or Raspberry pi (that I never tried!)

Well, the Arduino, at least for the whole C development (Iā€™m not sure for Rust) comes with its own IDE that allows you to develop and publish your compiled code directly to the Arduino. For the Rapberry Pi such a thing does not exist. Iā€™m developing using the Visual Studio Code on Windows and cross compiling to Aarch64 bare metal build target. To get the things to the RPi you either load the binary on an SD card and put it into the Pi or - as this leads fast to an SD card dance :wink: - you write or use a small bootloader that is put once on the Sd card and allows you to transfer new versions of your bare metal software to the RPi via UART serial interface. However, this is only valid for real bare metal. As the RPi is capable of running a full Linux there are many people just developing on the Pi like any other hardware that is running an OS ... :slight_smile:

1 Like

I write all my Rust programs for Raspberry Pi and other such boards on my Win 10 PC under WSL running Debian. When they are in good shape I move the source to the Pi, git push/git pull and compile it there.

I also edit code on the Pi via VS Code running on Windows via sshfs.

All very smooth.

@2ndTaleStudio Thank you for all the information, and sorry for stupid questions.
If I sound like I don't know what I am talking about, it's because honestly I don't know what I am talking about :sweat_smile:.
I used the toolchain the school provided us with and write code for PIC32. I never dared bare metal!

@ZiCog Hi and thanks for sharing! It sounds very complicated right now in my eyes yet I wonder which kind of projects you work with?

There is no such thing :wink: - no need to apologize;)

2 Likes

Ha! Welcome to the club! You are in good company.

That's not to say there are not a lot of very skilled people here as well.

Since I started with Rust a year ago it has pervaded all parts of our current project.

We have Raspberry Pi and similar single board computers at remote locations talking to sensor devices over serial ports or ethernet links using SSH. They relay their sensor data to our servers over the NATS messaging system: https://nats.io/

On the server we have Rust receiving data streams from those remote devices and decoding the somewhat complicate proprietary protocol packets they contain. Data is extracted and forwarded to our database.

Rust is also forwarding data from the NATS server over web sockets to browsers for real-time data visualizations.

We have a Rust web server using the Rocket crate to serve up a REST API that is used by clients to retrieve data from our database. It also serves up the HTML/CSS/JS for those data visualization pages.

If I could only get my partner off of Python the whole company would be a Rust shop.

4 Likes

@2ndTaleStudio I am very nervous to write stupid things in front of so knowledgeable people :upside_down_face: . I am still doing my research about literaly everything. I even needed to look up crate in my language before using "cargo" for "crates" made sense haha.

@ZiCog This is really exciting and I am glad you detailed it for me. I love to read how Rust is used in a professional context to help see the application beyond the learning phase/hobby-project I am at right now. I see you integrated it in the whole chain of from data collection, db, dataviz, serving clients to the final site. Specially nice to read because one of the numerous confusions I have is, if Rust takes so long time for my computer to compile, how is it managed at a bigger scale (I am still reading on that)?

1 Like

We are pretty amateur at cloud deployment. No containers, kubernettes or whatever. Just get the code onto the server(s) and and have a systemd service run it.

Mostly slow build times are not an issue. Yes it can take minutes to do a release build from scratch as cargo downloads and compiles all the dependencies of your project. But after that builds are much faster. Mostly when working on Rust code I find myself doing a lot of "cargo check" rather than a compilation. That is pretty quick. The if it checks it will generally build in debug mode for testing occasionally.

Don't forget whatever time you lose on Rust compilation you get back, and more, on testing and debugging and random down time.

Here is how it goes around here:

  1. Create / modify Rust code on a local PC.
  2. Test the completed code on a local PC. Generally data comes in and goes out via our NATS messaging servers and/or REST APIs, so tests are done on live data even at home. Or we have our remote embedded systems in the lab to test on.
  3. Push tested code to github/bitbucket
  4. Pull code to production server.
  5. "Cargo build --release" it.
  6. Restart the service with systemctl.

Amazingly, as rude an crude as this is, it has worked flawlessly for a year now.

Actually so far dashboards/visualizations in the browser are all still Javascript. I'm looking into that.

If you want to talk about Rust at scale, then Cloudflare offers their "Cloud Workers". Write some code, push it to Cloudflare, boom, you have a web server up and running, globally deployed, no server to worry about at all!

1 Like

I have learned the basics of Rust, but I am a nauplius when it comes to more advanced features. When I make mistakes with them, others help me learn by pointing out my mistakes. So don't be afraid to write :slight_smile:

1 Like

@ZiCog yes that's pretty amazing!
@L.F au nauplius! good to know! Let me update my title hehe.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.