vita-rust / common

Common files for Rust cross-compilation to the PS Vita
6 stars 4 forks source link

example tutorial for Rust on the vita SDK? #3

Open ajstrand opened 3 years ago

ajstrand commented 3 years ago

I'm new to using the vita SDK, but I've dabbled with Rust a bit for web dev type stuff. Is Rust on the vita still something that's possible/supported?

It looks like some these repos havent been updated since 2018 or so, so I wasnt sure if the project was dead.

zetanumbers commented 3 years ago

I was studying psp-toolchain for rust lately and wanted to do kinda the same thing for vita. If you would like to contribute I believe we could talk at HENkaku server. I am zetanumbers#0286. Maybe mods would create a new channel for this.

I will say that i managed to build example, even by just using -Z build-std and without xargo.

ajstrand commented 3 years ago

Yeah, I happened to find the psp rust toolchain and it's impressive what they've done. I'll reach out to on the Henkaku server, since I've already joined there.

althonos commented 3 years ago

Hi @ajstrand ,

this whole thing was an experiment with embedded Rust and the only ARM platform I had at the time, but unfortunately I don't have my PS Vita with me currently as I'm living abroad, so I can't spend as much time as the psp-rust people on this.

First you need the Vita SDK because this is still using the linker and stub files from them. Then, you should have a look at the example in psp2-sys repo. If you can get it to compile, you can then move on to looking at the C examples in the Vita SDK samples. The hello_rust_world example is basically the hello_word from there, transpiled to Rust and using cargo-make to compile instead of CMake.