overdrivenpotato / rust-psp Goto Github PK
View Code? Open in Web Editor NEWRust on PSP. Panic and allocation support. Access PSP system libraries.
License: Other
Rust on PSP. Panic and allocation support. Access PSP system libraries.
License: Other
Intra-doc links just hit stable rust. This allows us to make links in the docs, which would be very helpful for doc comments like this one:
/// Wait until display list has finished executing
///
/// # Parameters
///
/// - `mode`: What to wait for, one of `GuSyncMode`
/// - `behavior`: How to sync, one of `GuSyncBehavior`
///
If someone out there wants an easy way to get started contributing to rust-psp, this is it.
More info:
https://blog.rust-lang.org/2020/11/19/Rust-1.48.html#easier-linking-in-rustdoc
https://doc.rust-lang.org/stable/rustdoc/linking-to-items-by-name.html
The following code will not compile due to a link error, as fmodf
is missing:
fn psp_main() {
psp::dprintln!("{}", 10f32 % core::hint::black_box(2.0));
}
This can likely be resolved by linking in the libm
crate, which has an implementation of fmodf
. This should fix any additional missing functions.
Alternatively it may be possible to somehow natively compile this, if the PSP can support such an instruction (perhaps even through VFPU). This would result in much faster code.
I get the following error
Compiling bitflags v1.3.2
Compiling num_enum v0.5.11
Compiling psp-test v0.1.0 ($DIR/workspacetest/psp-test)
Finished dev [unoptimized + debuginfo] target(s) in 10.76s
Saved to $DIR/workspacetest/target/mipsel-sony-psp/debug/EBOOT.PBP
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', $HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-psp-0.2.2/src/fix_imports.rs:27:42
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrac
Here's a reproduction script:
#!/bin/bash -xe
cargo new workspacetest
cd workspacetest
cargo new psp-test
echo '
[workspace]
members = ["psp-test"]
' >> Cargo.toml
cd psp-test
cargo add psp
echo '#![no_std]
#![no_main]
// Create a module named "sample_module" with version 1.0
psp::module!("sample_module", 1, 0);
fn psp_main() {
psp::enable_home_button();
psp::dprintln!("Hello PSP from rust!");
}' > src/main.rs
cd ..
cargo psp -p psp-test
For whatever reason, this is producing EBOOT.PBP file, so it might not be that bad. But my real project for unknown to me reason does not have this line "Saved to ...EBOOT.PBP" at all. Investigating still, but would apreciate what to do with just what's described.
I am encountering errors when trying to build examples/rust-std-hello-world
. Here is my environment.
PC: M2 MacBookAir
Rust Version: cargo 1.74.0-nightly (414d9e3a6 2023-09-22)
Build Command: RUST_PSP_BUILD_STD=1 cargo psp
Log:
โฏ RUST_PSP_BUILD_STD=1 cargo psp
[NOTE]: Detected RUST_PSP_BUILD_STD env var, using "build-std".
Compiling compiler_builtins v0.1.101
Compiling core v0.0.0 (/Users/aethiopicuschan/.rustup/toolchains/nightly-2023-09-26-aarch64-apple-darwin/lib/rustlib/src/rust/library/core)
Compiling libc v0.2.148
Compiling cc v1.0.79
Compiling memchr v2.5.0
Compiling proc-macro2 v1.0.78
Compiling std v0.0.0 (/Users/aethiopicuschan/.rustup/toolchains/nightly-2023-09-26-aarch64-apple-darwin/lib/rustlib/src/rust/library/std)
Compiling unicode-ident v1.0.12
Compiling syn v1.0.109
Compiling paste v1.0.14
Compiling libm v0.2.8
Compiling psp v0.3.7 (/Users/aethiopicuschan/tmp/rust-psp/psp)
Compiling unstringify v0.1.4
Compiling quote v1.0.35
Compiling unwind v0.0.0 (/Users/aethiopicuschan/.rustup/toolchains/nightly-2023-09-26-aarch64-apple-darwin/lib/rustlib/src/rust/library/unwind)
Compiling num_enum_derive v0.5.11
Compiling rustc-std-workspace-core v1.99.0 (/Users/aethiopicuschan/.rustup/toolchains/nightly-2023-09-26-aarch64-apple-darwin/lib/rustlib/src/rust/library/rustc-std-workspace-core)
Compiling alloc v0.0.0 (/Users/aethiopicuschan/.rustup/toolchains/nightly-2023-09-26-aarch64-apple-darwin/lib/rustlib/src/rust/library/alloc)
Compiling cfg-if v1.0.0
Compiling adler v1.0.2
Compiling rustc-demangle v0.1.23
Compiling rustc-std-workspace-alloc v1.99.0 (/Users/aethiopicuschan/.rustup/toolchains/nightly-2023-09-26-aarch64-apple-darwin/lib/rustlib/src/rust/library/rustc-std-workspace-alloc)
Compiling panic_unwind v0.0.0 (/Users/aethiopicuschan/.rustup/toolchains/nightly-2023-09-26-aarch64-apple-darwin/lib/rustlib/src/rust/library/panic_unwind)
Compiling panic_abort v0.0.0 (/Users/aethiopicuschan/.rustup/toolchains/nightly-2023-09-26-aarch64-apple-darwin/lib/rustlib/src/rust/library/panic_abort)
Compiling gimli v0.28.0
Compiling std_detect v0.1.5 (/Users/aethiopicuschan/.rustup/toolchains/nightly-2023-09-26-aarch64-apple-darwin/lib/rustlib/src/rust/library/stdarch/crates/std_detect)
Compiling hashbrown v0.14.0
Compiling object v0.32.0
Compiling miniz_oxide v0.7.1
Compiling addr2line v0.21.0
Compiling proc_macro v0.0.0 (/Users/aethiopicuschan/.rustup/toolchains/nightly-2023-09-26-aarch64-apple-darwin/lib/rustlib/src/rust/library/proc_macro)
Compiling bitflags v1.3.2
Compiling num_enum v0.5.11
error[E0658]: use of unstable library feature 'restricted_std'
|
= help: add `#![feature(restricted_std)]` to the crate attributes to enable
error[E0658]: use of unstable library feature 'restricted_std'
--> /Users/aethiopicuschan/tmp/rust-psp/psp/src/lib.rs:88:9
|
88 | pub use std::panic::catch_unwind;
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add `#![feature(restricted_std)]` to the crate attributes to enable
error[E0635]: unknown feature `psp_std`
--> /Users/aethiopicuschan/tmp/rust-psp/psp/src/lib.rs:20:38
|
20 | #![cfg_attr(feature = "std", feature(psp_std))]
| ^^^^^^^
Some errors have detailed explanations: E0635, E0658.
For more information about an error, try `rustc --explain E0635`.
error: could not compile `psp` (lib) due to 3 previous errors
`cargo build` command exited with status: ExitStatus(unix_wait_status(25856))
Is the issue I'm encountering related to my environment or the specific command I'm using? Alternatively, could this be attributed to a bug or features that are not yet implemented in the toolchain or library? Any insights or guidance on how to proceed would be greatly appreciated.
Thanks.
I am trying to make a game where I need to display sprites to the screen, I followed a tutorial to setup a graphics system, but can't seem to draw sprites, If anyone can point me in the right direction to set up.
psp/src/panic.rs
breaks a lot lately, maybe gate this under a cargo feature and use panic = "abort"
by default.
Is rust-psp not supported on Windows or did I do something wrong?
I am using the rustup-init.exe(64-bit) installer
toolchain info:
PS C:\Users\diamant3\Desktop\psp-controller> rustup show
Default host: x86_64-pc-windows-msvc
rustup home: C:\Users\diamant3\.rustup
installed toolchains
--------------------
stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc (default)
active toolchain
----------------
nightly-x86_64-pc-windows-msvc (default)
rustc 1.64.0-nightly (93ffde6f0 2022-07-23)
systeminfo:
PS C:\Users\diamant3\Desktop\psp-controller> systeminfo
Host Name: MSI
OS Name: Microsoft Windows 11 Home Single Language
OS Version: 10.0.22000 N/A Build 22000
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
Registered Owner: diamant3
bug:
PS C:\Users\diamant3\Desktop\psp-controller> cargo psp
Compiling psp v0.3.1
Compiling cfg-if v0.1.10
Compiling alloc v0.0.0 (C:\Users\diamant3\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\alloc)
error[E0433]: failed to resolve: could not find `unix` in `os`
--> C:\Users\diamant3\.cargo\registry\src\github.com-1ecc6299db9ec823\psp-0.3.1\build.rs:1:20
|
1 | use std::{env, os::unix::prelude::OsStrExt, path::Path};
| ^^^^ could not find `unix` in `os`
Compiling unwind v0.0.0 (C:\Users\diamant3\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\unwind)
error[E0599]: no method named `as_bytes` found for struct `OsString` in the current scope
--> C:\Users\diamant3\.cargo\registry\src\github.com-1ecc6299db9ec823\psp-0.3.1\build.rs:15:10
|
15 | .as_bytes()
| ^^^^^^^^ method not found in `OsString`
Some errors have detailed explanations: E0433, E0599.
For more information about an error, try `rustc --explain E0433`.
error: could not compile `psp` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
PS C:\Users\diamant3\Desktop\psp-controller>
There is currently no support for kernel mode functions. It would be nice to have an (off by default) kernel
feature in this crate to enable all the missing kernel mode functions.
Fails with this log
PS C:\Users\conziebonzie\Desktop\psp> cargo psp
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Blocking waiting for file lock on package cache
Compiling psp v0.2.2
error[E0557]: feature has been removed
--> C:\Users\conziebonzie\.cargo\registry\src\index.crates.io-6f17d22bba15001f\psp-0.2.2\src\lib.rs:6:5
|
6 | untagged_unions,
| ^^^^^^^^^^^^^^^ feature has been removed
|
= note: unions with `Copy` and `ManuallyDrop` fields are stable; there is no intent to stabilize more
error[E0432]: unresolved import `core::panic::BoxMeUp`
--> C:\Users\conziebonzie\.cargo\registry\src\index.crates.io-6f17d22bba15001f\psp-0.2.2\src\panic.rs:12:68
|
12 | use core::{mem::{self, ManuallyDrop}, any::Any, panic::{PanicInfo, BoxMeUp, Location}};
| ^^^^^^^ no `BoxMeUp` in `panic`
error: unwinding panics are not supported without std
|
= help: using nightly cargo, use -Zbuild-std with panic="abort" to avoid unwinding
= note: since the core library is usually precompiled with panic="unwind", rebuilding your crate with panic="abort" may not be enough to fix the problem
Some errors have detailed explanations: E0432, E0557.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `psp` (lib) due to 3 previous errors
`cargo build` command exited with status: ExitStatus(ExitStatus(101))
PS C:\Users\conziebonzie\Desktop\psp>
It seems with a recent nightly change panic/exception support has broken and resulted in any/all panics causing an invalid memory access deep within libunwind
.
I have invested a couple of weeks investigating, and unfortunately haven't been able to find an easy solution to the problem. Though I have made some findings in the process which I'll dump below:
.eh_frame
/ .eh_frame_hdr
have valid dataRA
/PC
to be in a 0x00000000 - PROGRAM_SIZE
rangeunwinding
/libunwinding
since they do not expect .text
to be relocatedunwinding
is to manually patch RA
/PC
by subtracting 0x8804000
vaddr
to be at 0x0
At this stage, I'm not sure how to proceed, as fixing up the eh_frame
data could be done during prx generation - but is likely to be a non-trivial amount of work. Similarly, forcing the linker to set a vaddr
of 0x8804000
for .text
might fix this issue as well, but also means a non-trivial amount of work. I'm not familiar with how the PSP relocates executables at runtime, so I'm not confident in either of these approaches being a one-size-fits-all solution.
If we're able to resolve the issue with frame data, we can also switch to unwinding as I've done here + upstream support to std similar to xous. Which will significantly reduce the complexity of panic handling, as we won't need to ship a patched libunwind
or need nearly as much boilerplate.
Once #47 is complete, we should upstream our definitions to libc
. This should be done via an automated script to avoid any errors.
bitflags!
invocations?Some options:
Hi,
I'm currently working on a PR to bump up the embedded-graphics version to 0.7.1. I tried to compile the embedded-graphics example with cargo psp on macOS and on manjaro linux. On both I get the error linking with rust-lld failed ... rust-lld: error undefined ymbol: fmodf
.
situation is like #151, but another error
cargo psp
Blocking waiting for file lock on package cache
Compiling psp v0.3.6 (/home/cofeek/Desktop/codes/rustlang/rust-psp/psp)
error[E0432]: unresolved import `core::panic::BoxMeUp`
--> /home/cofeek/Desktop/codes/rustlang/rust-psp/psp/src/panic.rs:15:13
|
15 | panic::{BoxMeUp, Location, PanicInfo},
| ^^^^^^^ no `BoxMeUp` in `panic`
warning: the feature `lang_items` is internal to the compiler or standard library
--> /home/cofeek/Desktop/codes/rustlang/rust-psp/psp/src/lib.rs:10:5
|
10 | lang_items
| ^^^^^^^^^^
|
= note: using it is strongly discouraged
= note: `#[warn(internal_features)]` on by default
For more information about this error, try `rustc --explain E0432`.
warning: `psp` (lib) generated 1 warning
error: could not compile `psp` (lib) due to previous error; 1 warning emitted
`cargo build` command exited with status: ExitStatus(unix_wait_status(25856))
Compilation exited abnormally with code 101 at Sat Sep 23 22:40:16
This requires porting PRXEncrypter
from the PSPSDK.
Hello! First of all, great work on this awesome library! Really easy to use and get started with.
However, I've been trying to do some VFPU stuff and ran into some issues. I made a commit at gardell@273a9af that should show the problem.
I'm loading a ScePspFMatrix4
into the columns C000
, C010
, C020
and C030
then perform a vtfm4.q
on the M100
register. But when I look at the result, it is as if the matrix was transposed. If I use E100
I get the results that I want.
Looking at http://hitmen.c02.at/files/yapspd/psp_doc/chap4.html section 4.5.1 Registers
it is explained that C000
, C010
, C020
and C030
are indeed the columns of the matrix M100
and that E100
is the transpose of M100
.
I also set up the example matrices from the above commit in Wolfram Alpha to double check:
https://www.wolframalpha.com/input?i=transpose%28%7B%7B1%2C+2%2C+3%2C+4%7D%2C+%7B5%2C+6%2C+7%2C+8%7D%2C+%7B9%2C+10%2C+11%2C+12%7D%2C+%7B13%2C+14%2C+15%2C+16%7D%7D%29+*+%7B%7B17%7D%2C+%7B18%7D%2C+%7B19%7D%2C+%7B20%7D%7D
note that Wolfram Alpha uses row-major order, so a transpose()
there is needed. To have row-major order with the VFPU I could have used R000
, R001
, R002
, R003
when loading the matrix in my example above..
Doesn't this mean that, in this library the symbols M100
and E100
should swap places?
Thanks,
Johan
It's nice to make the aims of the project clear to users and contributors alike. A milestone will be able to keep track of the progress made on the features in the Roadmap in a clear and concise way.
This also creates a chance to pool the relevant information for each feature and write up mentoring instructions to get the ball rolling.
libc
shimstd
supportEBOOT.PBP
generation
I'd also like to suggest keeping a knowledge base (maybe a Book) of what is known about the PSP. prx.md
already contains the beginnings of this, and I think it'd be good to lay things out for future maintainers. I'd be happy to compile what we have at the moment if you can point me to what's been used in the implementation so far.
Im looking a project to learn rust and this one seems fun.
There is anything I can help with?
Hello there.
When I try to compile with cargo psp
I get stuck on this error
error: linking with `rust-lld` failed: exit status: 1
= note: rust-lld: error: undefined symbol: strlen
>>> referenced by c_str.rs:408 (src/ffi/c_str.rs:408)
>>> alloc-65f2e8dec69d54dc.alloc.1e0b9b8f-cgu.6.rcgu.o:(alloc::ffi::c_str::CString::from_raw::hf8e528a7891a1756) in archive /Users/mrcesar107/Documents/psp-dev/rust/target/mipsel-sony-psp/debug/deps/liballoc-65f2e8dec69d54dc.rlib
I'm trying to use it in a mac with m1 chip and also with a linux x64 computer
rustc
version is rustc 1.63.0-nightly (490324f7b 2022-05-26)
I'll appreciate a lot if anyone can help me with this problem. Thank you ;)
After #160 is merged, we are missing the following.
? | Inst | Ops | Enc |
---|---|---|---|
โฌ | bvf | vfpu-branch | vfpu-branch |
โฌ | bvfl | vfpu-branch | vfpu-branch |
โฌ | bvt | vfpu-branch | vfpu-branch |
โฌ | bvtl | vfpu-branch | vfpu-branch |
โฌ | lvl.q | vfpu-load16 | vfpu-memory-quad |
โฌ | lvr.q | vfpu-load16 | vfpu-memory-quad |
โฌ | svl.q | vfpu-store16 | vfpu-memory-quad |
โฌ | svr.q | vfpu-store16 | vfpu-memory-quad |
โฌ | vcmovf | vfpu-condmove | vfpu-condmove |
โฌ | vcmovt | vfpu-condmove | vfpu-condmove |
โฌ | vcmp | vfpu-compare | vfpu-alu-compare |
โฌ | vmfvc | vfpu-control-read | vfpu-read-control |
โฌ | vmtvc | vfpu-control-write | vfpu-write-control |
โฌ | vwbn | vector-unary-mod | vector-imm8 |
Do note that lvl.q / lvr.q corrupt registers and when implemented, we should probably add a mitigation to save/restore the affected COP1 register. Shouldn't be too difficult to do with the existing macro magic.
I want to make a project on v0.3.3, but build fails:
Compiling psp v0.3.3
error[E0605]: non-primitive cast: `*mut &mut dyn BoxMeUp` as `&mut dyn BoxMeUp`
--> /home/slendi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/psp-0.3.3/src/panic.rs:151:42
|
151 | panic_unwind::__rust_start_panic(obj as _)
| ^^^^^^^^ invalid cast
|
help: consider borrowing the value
|
151 | panic_unwind::__rust_start_panic(&mut *obj as _)
| ++++++
error[E0277]: the trait bound `&mut dyn BoxMeUp: BoxMeUp` is not satisfied
--> /home/slendi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/psp-0.3.3/src/panic.rs:151:42
|
151 | panic_unwind::__rust_start_panic(obj as _)
| ^^^ the trait `BoxMeUp` is not implemented for `&mut dyn BoxMeUp`
|
= help: the trait `BoxMeUp` is implemented for `PanicPayload<'a>`
= note: required for the cast from `&mut dyn BoxMeUp` to the object type `dyn BoxMeUp`
Some errors have detailed explanations: E0277, E0605.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `psp` (lib) due to 2 previous errors
Same error also happens on v0.3.2.
This can be done via a fork for now, but ideally we can upstream this to the official rust repo. Depends on #49
In the README it mentions core support.
Doing cargo psp -Z build-std=core
fails, however, and so does cargo psp -Z build-std=core,alloc
(without alloc, I get a few more errors about alloc not being available, I imagine to use core I also have to enable the alloc crate).
I'm using the latest version of the library, with the embedded-graphics
feature enabled.
I get the following error:
error[E0463]: can't find crate for `panic_unwind`
--> C:\Users\luukv\.cargo\registry\src\github.com-1ecc6299db9ec823\psp-0.2.1\src\lib.rs:25:36
|
25 | #[cfg(not(feature = "stub-only"))] extern crate panic_unwind;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate
error: language item required, but not found: `eh_personality`
|
= note: this can occur when a binary crate with `#![no_std]` is compiled for a target where `eh_personality` is defined in the standard library
= help: you may be able to compile for a target that doesn't need `eh_personality`, specify a target with `--target` or in `.cargo/config`
Any idea what this means?
psp-gdb
somewhat works for now, but it is a hefty dependency as it requires the C toolchain to be compiled and installed. It also does not support printing Rust types.
whenever i attempt to compile any of the example applications, it errors out, i tried the steps in this comment but that did not seem to help
Edit: If i downgrade to toolchain version to nightly-2021-11-17 it works fine, so it seems to be from the newer nightlies
Using the psp::math::cosf32 function crashes my PSP. It works fine in an emulator, but the moment I use that function on a real PSP, the console freezes and turns off after a few seconds.
We are very close to complete parity with the reverse engineered Sony API found in PSPSDK. This is a tracking issue. Discussion is happening in the #rust-psp
channel here: https://discord.gg/WY8XhDG
cannot build my program and also an example program
rustup default nightly && rustup component add rust-src
cargo install cargo-psp
git clone https://github.com/overdrivenpotato/rust-psp.git
cd rust-psp/examples/hello-world
cargo psp
successful build
error[E0061]: this function takes 4 arguments but 3 arguments were supplied
--> /home/cofeek-codes/Desktop/codes/rustlang/rust-psp/psp/src/panic.rs:109:20
|
109 | let mut info = PanicInfo::internal_constructor(message, location, can_unwind);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^------------------------------- an argument of type `bool` is missing
|
note: associated function defined here
--> /home/cofeek-codes/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/panic_info.rs:42:12
|
42 | pub fn internal_constructor(
| ^^^^^^^^^^^^^^^^^^^^
help: provide the argument
|
109 | let mut info = PanicInfo::internal_constructor(message, location, can_unwind, /* bool */);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
For more information about this error, try `rustc --explain E0061`.
warning: `psp` (lib) generated 1 warning
error: could not compile `psp` (lib) due to previous error; 1 warning emitted
`cargo build` command exited with status: ExitStatus(unix_wait_status(25856))
Fresh install, was looking to get started homebrewing somewhere. I still have a PSP, but what sold the deal was the incredible integration into Rust! Just like developing a normal Rust program.
Compiling the hello world example, however, failed with this.
Default host: x86_64-unknown-linux-gnu
rustup home: /home/shinichi/.rustup
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu (default)
bpf
installed targets for active toolchain
--------------------------------------
wasm32-unknown-unknown
x86_64-unknown-linux-gnu
active toolchain
----------------
nightly-x86_64-unknown-linux-gnu (default)
rustc 1.59.0-nightly (efec54529 2021-12-04)
Compiling psp-hello-world-example v0.1.0 (/home/shinichi/source/rust-psp/examples/hello-world)
error: linking with `rust-lld` failed: exit status: 1
|
= note: "rust-lld" "-flavor" "gnu" "--emit-relocs" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.1dvxhiqozxhnax6p.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.1jbozp62rdtspcki.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.2f4y6geg7q8tmzzl.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.2n939cxqcyvkm4zm.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.35zh3xdcf9mnlahg.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.4l8q58w309e8uxl7.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.4tzohso5uud2lmu2.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.4uizm1it4n5rvmyj.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.4zw6ef1533g1n0n1.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.5a1sk7asrejlxhvz.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.j6mffm6lx6dvy5j.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.jup3vqfcmegl9vk.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.tbsnez2jyccmt29.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.tvoskcf6h0i6x3i.rcgu.o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a.3ugzb26hdj0rwsm3.rcgu.o" "--as-needed" "-L" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps" "-L" "/home/shinichi/source/rust-psp/examples/hello-world/target/debug/deps" "-L" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/build/psp-5331f3a82de138d9/out" "-L" "/home/shinichi/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/mipsel-sony-psp/lib" "--start-group" "-Bstatic" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/libpsp-1b097d29e42403d7.rlib" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/libbitflags-e76b5db384bd4099.rlib" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/libnum_enum-bb71ad21b1bf98e3.rlib" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/libpanic_unwind-0ad6e09684aafd6d.rlib" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/libunwind-9f962eaf1c8fee42.rlib" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/liblibc-9919ce7872eb5b4e.rlib" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/libcfg_if-a68ee819c51dc776.rlib" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/liballoc-f52b6509161d11ab.rlib" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/libpaste-728a443b7a53f844.rlib" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/librustc_std_workspace_core-3ad2d07ae1915367.rlib" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/libcore-3219c33cda6fbcc2.rlib" "--end-group" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/libcompiler_builtins-59551438213631d6.rlib" "-Bdynamic" "--script" "/tmp/rustcnxutzJ/rustc-mipsel-sony-psp-linkfile.ld" "--eh-frame-hdr" "-znoexecstack" "-L" "/home/shinichi/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/mipsel-sony-psp/lib" "-o" "/home/shinichi/source/rust-psp/examples/hello-world/target/mipsel-sony-psp/debug/deps/psp_hello_world_example-0fdc2911ce5c492a" "-O1" "-s"
= note: rust-lld: error: --strip-all and --emit-relocs may not be used together
error: could not compile `psp-hello-world-example` due to previous error
I have a workspace set up like this:
.
โโโ Cargo.toml
โโโ embedded_frontend/ // Graphic rendering with embedded-graphics
โโโ pc_app/ // PC-only app
โโโ psp_app/ // PSP-only app
โโโ src/ // backend library
pc_app and psp_app are binaries while the root crate and embedded_frontend are libraries (both imported by the binary crates).
Cargo.toml workspace:
[workspace]
members = ["pc_app", "embedded_frontend", "psp_app"]
When trying to compile the PSP app from the psp_app directory with __CARGO_TESTS_ONLY_SRC_ROOT=/path/to/rust/src/ cargo +nightly-2022-06-11 psp --release
, I get the error:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', cargo-psp/src/fix_imports.rs:27:42
Editing the cargo-psp source to add dbg!(&path.as_ref());
before the panic shows this: [cargo-psp/src/fix_imports.rs:27] &path.as_ref() = "[my workspace path]/target/mipsel-sony-psp/release/pc_app"
. But the PC app obviously can't be compiled for the PSP, and even if it was, it's not what I'm trying to build here.
In the meantime, I can exclude psp_app from the workspace but this breaks rust-analyzer on psp_app's source files.
I could make a pull request so that cargo-psp doesn't panic if a binary isn't present.
Is there a way to send HTTP requests with this crate?
I would really like to, but can't figure out how.
Can somebody please help me?
@overdrivenpotato had some ideas on improving the Rust/Bash code for the CI test scripts and I want to file this tracking issue to make sure they don't get forgotten.
sys::sceNetInetRecv
return type is set to usize
, as pspsdk sets it to size_t
. However, the Linux manual for the recv
functions sets its return type to ssize_t
(isize
in Rust), which actually makes more sense as it gives you a way to intercept an error from the returned value.
Do we know if the correct return type is indeed usize
and not isize
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.