overdrivenpotato / rust-psp

Rust on PSP. Panic and allocation support. Access PSP system libraries.
Other
588 stars 31 forks source link

fix panic implementation for rust 1.81 #177

Closed lorenzofelletti closed 1 week ago

lorenzofelletti commented 1 week ago

Fixes panic implementation to be compatible with nightly rust 1.81

Output of rustc --version:

rustc 1.81.0-nightly (8fcd4dd08 2024-06-18)

Tested on both PPSSPP and a PSP 3000, and it works.

lorenzofelletti commented 1 week ago

Notable difference: now the panic gets printed like this (example):

PanicInfo {
    message: oh no,
    location: Location {
        file: "src/main.rs",
        line: 10,
        col: 5,
    },
    can_unwind: true,
    force_no_backtrace: false,
}

I'm working on restoring the message as it was before

zetanumbers commented 1 week ago

As they said about contributors to rust-lang:

Could you not rename types

for five minutes!

lorenzofelletti commented 1 week ago

Fixed the panic message, now it prints (with the same example as the other comment)

panicked at src/main.rs:10:5: oh no
sajattack commented 1 week ago

Please update the MSRV in the readme and the cargo-psp/main.rs

lorenzofelletti commented 1 week ago

Done. Should I do it also to build-rust.yml and build-rust-macos.yml?

sajattack commented 1 week ago

Done. Should I do it also to build-rust.yml and build-rust-macos.yml?

No I think it's fine.

  # The version is irrelevant here. This is a small base image that contains
    # `rustup`. The actual toolchain is selected with `RUSTUP_TOOLCHAIN` below,
    # and should be cached with `RUSTUP_HOME`.
    tag: 1.44-slim
sajattack commented 1 week ago

Derp nevermind, yes please update the RUSTUP_TOOLCHAIN.