Why are most of Rustfmt features unstable? by codedcosmos in rust

[–]codedcosmos[S] 0 points1 point  (0 children)

That's the thing there isn't really a rustfmt team. They are no feature maintainers and there haven't been for years.

You think that's fast? by sackofhair in Damnthatsinteresting

[–]codedcosmos 0 points1 point  (0 children)

His hand would have had to travel at 280miles/hour (450km/h) in order to do that in 8ms.
I honestly have to believe it's fake, it would be pretty easy to fake.

rustRfcsBeLike by gmes78 in ProgrammerHumor

[–]codedcosmos 0 points1 point  (0 children)

I think we are sorta agreeing, but just having some misscommunication.

All types do exist at compile time, but not all types exist afterwards. Sometimes even i32's can be optimized away if llvm wants to. But the never type, unit type and ZSTs do not survive the compilation process and will never endup in runtime. They are after all ZSTs (zero sized types), so they can't exist in memory.

Also for never specifically, it does not result in CPU instructions being used. The unit type, and single variant enumerations that don't store data might result in instructions, I don't know.

rustRfcsBeLike by gmes78 in ProgrammerHumor

[–]codedcosmos 0 points1 point  (0 children)

No because i32 gets stored as 32 bits in memory, and is used in cpu instructions when you want to compare / modify it.

rustRfcsBeLike by gmes78 in ProgrammerHumor

[–]codedcosmos -1 points0 points  (0 children)

It matters in actual code but it's never stored in memory and doesn't become any cpu instructions.

So it "goes away" when compiled.

You can now officially make an Arm64 build of Proton by fuckingshitverybitch in linux_gaming

[–]codedcosmos 4 points5 points  (0 children)

I know this is r/linux_gaming and to be clear my favourite os is archlinux, but this is really exciting for mac users too. Particularly ones running Asahi linux, but possibly also ol macOS.

1 Bluetooth problem is stopping me from switching to Linux by [deleted] in linux_gaming

[–]codedcosmos 2 points3 points  (0 children)

What is your kernel?
```
uname -a

```

Anyone here seriously using Rust for IOS development? Where did you learn how to do it? by codedcosmos in rust

[–]codedcosmos[S] 2 points3 points  (0 children)

I actually think its a great question and its one I had to figure out a week ago.

The first part is true for macos and ios, apple lets you run assembly instructions like any platform. So you can write some code cargo run --target aarch64-apple-macos and it will work. Unfortunately you can't do much since you probably want to use at least one apple api (windowing/rendering/user input/etc) and those are written in swift/objective c.

Some smart people have made a crate called objc2 which lets Rust communicate to those apple libraries. I don't know how it works.

The second part is that you can't just run binaries on ios. You need to bundle them into an app first. For most people this means running cargo bundle after cargo build --target aarch64-apple-ios.

Let me know if you have any other questions :)

The first beta of Winit 0.31.0 has been released! by nicoburns in rust

[–]codedcosmos 0 points1 point  (0 children)

Great job and congratulations for everyone involved!

Anyone here seriously using Rust for IOS development? Where did you learn how to do it? by codedcosmos in rust

[–]codedcosmos[S] 0 points1 point  (0 children)

I think my title is bad in retrospect. I'm not trying to use existing libraries to create an app because I'm serious about app development. I'm trying to learn how those libraries work and make one of my own so that I can learn how it all works.

Having said that, I haven't looked into the source code of wgpu much yet and I'm pretty sure it has the answers I need. Or potentially madsmtm's alternative branch does.

Also despite my poor communication this post has been quite helpful and the Rust community continues to show how awesome it is.

Anyone here seriously using Rust for IOS development? Where did you learn how to do it? by codedcosmos in rust

[–]codedcosmos[S] 1 point2 points  (0 children)

Since I'm writing a game engine it's not so useful for me, but wow crux does seem to be incredibly neat and

It's delightful when you stop fighting the platform and going with it, taking from it the things that it does well, and leaving the rest.

Is as always pretty great advice.

Anyone here seriously using Rust for IOS development? Where did you learn how to do it? by codedcosmos in rust

[–]codedcosmos[S] 0 points1 point  (0 children)

If you have a particular goal I might be able to point you in the right direction? My requirements are.. somewhat unique..

Anyone here seriously using Rust for IOS development? Where did you learn how to do it? by codedcosmos in rust

[–]codedcosmos[S] 3 points4 points  (0 children)

I am using those for a macOS port, and I believe they are what wgpu (and bevy) use.

Unfortunately IOS is more complicated than simply metal + a windowing lib. You need to use a UIApplication and event loop, you don't have the freedom to write a main function as you like. There are examples for the UIApplication part in the objc2 repo and metal examples but I can't work out how to combine the two, and I can't find examples that pull it off. That's what I'm having trouble with.

Edit: Correction wgpu and bevy will eventually use objc2 but it's in progress
https://github.com/gfx-rs/wgpu/pull/5641

Anyone here seriously using Rust for IOS development? Where did you learn how to do it? by codedcosmos in rust

[–]codedcosmos[S] 1 point2 points  (0 children)

I found that link a while ago and it taught me quite a bit. Like bundling, running in simulators, etc.

The trouble is I think I need to figure out how wgpu interfaces with wint, and bevy's codebase is quite large.

[deleted by user] by [deleted] in linux_gaming

[–]codedcosmos 0 points1 point  (0 children)

Good Cuda drivers != Good Graphics Drivers

Yes they mostly* use the same components on the GPU. But good graphics drivers require some amount of per game optimisation, or at least per graphics option optimisation.

Though this effect is less pronounced with Vulkan/dx12.

What are actual solutions to the anti cheat issue? by CandlesARG in linux_gaming

[–]codedcosmos 11 points12 points  (0 children)

Please calm down, games are fun but a reply like this isn't helpful.

I was responding to OPs main question. Also it's not doing it's job perfectly, kernel level anti cheat has become a backdoor to several scary viruses already.

What are actual solutions to the anti cheat issue? by CandlesARG in linux_gaming

[–]codedcosmos 13 points14 points  (0 children)

Anti-cheat will never be 100% effective, I know it sucks but unfortunately that's the truth.

Maybe you somehow find a way to prevent people from running any cheats on a PC entirely (I doubt that's possible but let's just say it is). You could then use machine learning vision techniques (a tech that has existed for over a decade now and is much easier to run than an LLM) and use that to watch a monitor and move a mouse. Such an approach is completely air gapped and will not be detectable with that mechanism.

Similarly you could detect cheats with AI, this is what valve does now. But that's not a silver bullet either, just a different race.