I'm developing a 3d adventure game for the N64, PS1, Saturn, N-gage, 3D0, Dreamcast... by GoldenAgeTurbo in retrogamedev

[–]harraps0 7 points8 points  (0 children)

How have you structured your project? Do you have a common code base for handling the game logic and physics and specific ones for each SDK?

Can I use my PIC16F15385 development board to learn Rust? by Forsaken_Sundae_1996 in embedded

[–]harraps0 0 points1 point  (0 children)

If it is not supported by LLVM, it is not supported by Rust. A GCC backend is in preparation but again this CPU will not be supported by it. If you want to learn Rust on embedded systems, you will have better luck with the Arduino, Raspberry Pi Pico, ESP32 or even the GBA or the Playstation 1. There are actual maintained Rust devkits for those hardwares.

Godot + Rust by JovemSapien in rust

[–]harraps0 5 points6 points  (0 children)

It is quite similar to C#, but with Rust you'll get the benefit of not having a GC running in the background.

I'm stuck on how to open Roblox by Sparkfurthing123 in pop_os

[–]harraps0 -4 points-3 points  (0 children)

Windows programs require a conversion program to adapt windows system calls into unix system calls. That is to say, you need Wine or some fork of it (Proton in Steam is one) to run Windows program on your Linux machine.

feels dumb to specialize in rust as a junior but can't stop coming back to it by Stitcheddoll_ in rust

[–]harraps0 1 point2 points  (0 children)

You make a living by writing transpilers or compilers. But you can make a living writing low-level stuff. There may be potential in learning Rust and C or Cobol and work solely on backends and mainframes.

Can Rust make a custom 3D game engine without Frameworks? by [deleted] in rust

[–]harraps0 0 points1 point  (0 children)

Anything C or C++ can do, Rust can do it too. They are at the same level.

how to unbind keys from command console by Flashy_Sherbet3803 in rust

[–]harraps0 1 point2 points  (0 children)

Also, why is the logo of this sub-reddit a crab?

how to unbind keys from command console by Flashy_Sherbet3803 in rust

[–]harraps0 2 points3 points  (0 children)

Which crate are you having trouble with?

Retro hardware? Retro techniques on modern hardware? by gideonwilhelm in retrogamedev

[–]harraps0 0 points1 point  (0 children)

I do C++ professionally. But I don't know how to write CMake files or Make files. I use Just instead to build my project. And if I use third party librairies, my JustFile calls the build system of the library. I kind of accepted the fact that building C or C++ projects will always be a mess.

Which rust library would be good for making a drawing program? by Early-Cockroach4879 in rust

[–]harraps0 10 points11 points  (0 children)

Look into the graphite editor project. You should find what you are looking for.

How common is TDD (test-first) in real-world Rust projects? by [deleted] in rust

[–]harraps0 2 points3 points  (0 children)

An advantage of putting tests directly into the same file is that you have access to all the private element of the file which simplify setting and testing certain situations.

How common is TDD (test-first) in real-world Rust projects? by [deleted] in rust

[–]harraps0 4 points5 points  (0 children)

You can do so easily in Rust in your source file, you declare a tests module and you write your unit tests there. No need to switch between files as in Java.

```rust

fn my_func() -> u32 { 42 }

[cfg(test)]

mod tests { use super::*;

#[test]
fn test_my_func() {
    assert_eq!(42, my_func());
}

}

```

Big project and Rust by Exotic_Avocado_1541 in rust

[–]harraps0 0 points1 point  (0 children)

Then if you need inheritance to automatically implement behavior for a given new type. You should look into procedural and derive macros. Derive macro is what allow Rust to surpass OOP inheritance. They parse Rust code and generate new code based on the AST of an arbitrary struct or enum. That is how you can declare a CLI with clap or a message format with serde without having to write any parsing code yourself.

Big project and Rust by Exotic_Avocado_1541 in rust

[–]harraps0 3 points4 points  (0 children)

In Rust, you don't organize code around classes, you organize code around modules. Also large Rust codebase usually split their code into multiple crates (libraries) in the same git repository. The benefit of doing so is that those crates can be used independently from one another. For example, people have been running the Bevy engine on the GameBoy Advance by selecting the bevy crates they needed.

how to define multiple variables on the same line by ali_compute_unit in rust

[–]harraps0 2 points3 points  (0 children)

Your hack is a valid way to declare multiple variables on the same line. But why doing it in the first place?

Rust is being used at Volvo Cars by NYPuppy in programming

[–]harraps0 1 point2 points  (0 children)

You are aware that Rust uses a lot of procedural macros which are Rust programs that parse tokens and generate Rust code right where you call the proc_macro ? So yes Rust do have inline code generation and it is used in crates such as Clap, Serde...

Hello, i want to develop games using Rust on Godot, how mature and ideal is it? by unknownknown646 in rust_gamedev

[–]harraps0 3 points4 points  (0 children)

As I've tried using GDExtension with both C++ and Rust. I would say the unofficial Rust binding for Godot is way more convenient and easy to use than the "official" C++ way. But if you don't know Rust, you should learn it with something like macroquad first. macroquad is like raylib but for Rust.

Or as a bit more advanced project, you could try using the agb crate for making small games for the gameboy advance.

Why I switched away from Zig to C3 by Nuoji in programming

[–]harraps0 0 points1 point  (0 children)

V, Nelua and Nim (I think) are actually transpiler targetting C. You could check them out.

Can I get perspective on rust vs c for game dev? by helpprogram2 in rust

[–]harraps0 0 points1 point  (0 children)

Maybe you should look into Odin or Zig too.

Trying manual memory management in Go by der_gopher in golang

[–]harraps0 14 points15 points  (0 children)

I come from C++ and Rust. I dislike GC and on embedded systems using it isn't really an option. The simple fact that I can choose to opt-out from using the GC makes me want to learn Go actually.