A library for building full PSP modules, including both PRX plugins and regular homebrew apps.
#![no_std]
#![no_main]
psp::module!("sample_module", 1, 1);
fn psp_main() {
psp::enable_home_button();
psp::dprintln!("Hello PSP from rust!");
}
See examples
directory for sample programs.
This project is a completely new SDK, with no dependency on the original C/C++PSPSDK. It aims to be a complete replacement, with more efficientimplementations of graphics functions, and the addition of missing libraries.
core
supportalloc
supportpanic = "unwind"
supportlibc
cratestd
supportTo compile for the PSP, you will need a Rust nightly version equal to orlater than 2021-05-21
and the rust-src
component. Please install Rust usinghttps://rustup.rs/
Use the following if you are new to Rust. (Feel free to set an override manuallyper-project instead).
$ rustup default nightly && rustup component add rust-src
You also need cargo-psp
installed:
$ cargo install cargo-psp
Enter one of the example directories, examples/hello-world
for instance, andrun cargo psp
.
This will create an EBOOT.PBP
file under target/mipsel-sony-psp/debug/
Assuming you have a PSP with custom firmware installed, you can simply copy thisfile into a new directory under PSP/GAME
on your memory stick, and it willshow up in your XMB menu.
.
└── PSP
└── GAME
└── hello-world
└── EBOOT.PBP
If you do not have a PSP, we recommend using the PPSSPP emulator.Note that graphics code is very sensitive so if you're writing graphics code werecommend developing on real hardware. PPSSPP is more relaxed in some aspects.
PRXEncrypter
If you don't have a PSP with CFW installed, you can manually sign the PRX usingPRXEncrypter
, and then re-package it using pack-pbp
.
If you have the PSPSDK installed and have built a working copy PSPLink manually,you can also use psplink
and pspsh
to run the .prx
undertarget/mipsel-sony-psp/debug/
if you prefer. Refer to the installation andusage guides for those programs.
psp-gdb
is currently too old to support printing Rust types. rust-lldb
maybe possible but it has not be experimented with yet.
To use the psp
crate in your own Rust programs, add it to Cargo.toml
likeany other dependency:
[dependencies]
psp = "x.y.z"
In your main.rs
file, you need to setup a basic skeleton like so:
#![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!");
}
Now you can simply run cargo psp
to build your EBOOT.PBP
file. You can alsoinvoke cargo psp --release
to create a release build.
If you would like to customize your EBOOT with e.g. an icon or new title, youcan create a Psp.toml
file in the root of your project. Note that all keys areoptional:
title = "XMB title"
xmb_icon_png = "path/to/24bit_144x80_image.png"
xmb_background_png = "path/to/24bit_480x272_background.png"
xmb_music_at3 = "path/to/ATRAC3_audio.at3"
More options can be found in the schema defintion here.
This crate breaks on builds with opt-level=0
. Likely due to a bug in EABIinterop. cargo-psp
patches over this by passing -C opt-level=3
.
error[E0460]: found possibly newer version of crate ...
If you get an error like this:
error[E0460]: found possibly newer version of crate `panic_unwind` which `psp` depends on
--> src/main.rs:4:5
|
4 | use psp::dprintln;
| ^^^
|
= note: perhaps that crate needs to be recompiled?
Simply clean your target directory and it will be fixed:
$ cargo clean
RUST开服教程详解: 1.首先你要有一台专用游戏服务器 CPU: 最低要求2.7Ghz 睿频3.3Ghz 吃单核CPU,CPU频率越高越好 RAM内存:最低8GB 推荐12GB 硬盘:最低10GB 推荐20GB到50GB 宽带: 上传宽带最低5M 推荐30M到50M 防御:最低50GB 推荐100GB及其以上 2.Steam RUST开服教程,服务器系统 建议使用Windows 20
Rust 《Rust 权威指南》读书笔记,本文将持续跟进 基础篇 Hello, world! fn main() { println!("Hello, world!"); } println!是一个宏,负责打印。 变量声明 使用let 关键字进行声明: let 变量名: 类型; 也可以同时赋初始值: let 变量名: 类型 = 值; 编译器可对部分值的类型进行推导: let 变量名 =
十八、模式和匹配(Patterns and Matching) 模式是Rust中的一种特殊语法,用于匹配复杂类型和简单类型的结构。将模式与match 表达式和其他构造结合使用,可以更好地控制程序的控制流。一个模式由以下的一些组合组成: 文字 (Literals) 析构数组、枚举、结构体或元组 (Destructured arrays, enums, structs, or tuples) 变量 (
如何开始游戏? 巴拉巴拉那么多现在开始步入正轨吧! 点击find game 就进入了服务器列表,在这里你可以加入官方的服务器(热闹但高延迟) 也可以加入玩家自己设置的服务器(有些服务器不怎么友好详情请看贴吧举报贴) 1=官方服务器列表 2和3=玩家自建服务器 4=收藏过得服务器 5=玩过的服务器 如果你喜欢某个服务器请单击服务器列表中对应的小星星,下次直接点4就不用找了 选定之后点击join se
RUST总结 RUST类型 Rust内置的原生类型 (primitive types) 有以下几类: 布尔类型:有两个值 true 和 false 。 字符类型:表示单个Unicode字符,存储为4个字节。 数值类型:分为有符号整数 ( i8 , i16 , i32 , i64 , isize(自适应类型) )、 无符号整数 ( u8 , u16 , u32 , u64 , usize ) 以及浮
Rust 是 Mozilla 的一个新的编程语言,由web语言的领军人物Brendan Eich(js之父),Dave Herman以及Mozilla公司的Graydon Hoare 合力开发。 创建这个新语言的目的是为了解决一个很顽疾的问题:软件的演进速度大大低于硬件的演进,软件在语言级别上无法真正利用多核计算带来的性能提升。Rust是针对多核体系提出的语言,并且吸收一些其他动态语言的重要特性,
我想写一个模拟 DNF 装备增幅的程序,通过多次样本执行得到平均每件增幅 10 装备需要增幅多少次。装备 +4 之前不会失败,+4 之后会失败且失败后还会掉级,具体如下图所示: 公会秘药和普雷宠物会额外增加每次增幅的成功率 1% 和 4%,所以一共分了三种情况。 我最开始用 js 写了一版: 后来想到我刚学了 rust,不如练练手,而且 rust 很快,于是又写了一版: 然而实际上 rust 代码
Rust-GPU 是面向 GPU 编程的开源项目,目标是使 Rust 成为 GPU 着色器开发的“一等公民”编程语言和生态系统。 示例 use glam::{Vec3, Vec4, vec2, vec3};#[spirv(fragment)]pub fn main( #[spirv(frag_coord)] in_frag_coord: &Vec4, #[spirv(push_cons
Visual Rust 是一个可视化的 Rust 语言集成开发环境。这是一个 Visual Studio 的扩展,首先是一个 Rust 语言编辑器,同时可创建、编译和运行 Rust 项目。
Goose 是受 Locust 启发的 Rust 负载测试工具。用户行为通过标准的 Rust 代码定义,负载测试是依赖于 Goose 库的应用程序,Web 请求是使用 Reqwest HTTP 客户端发出的。 主要特性 文档齐全 基于 Reqwest,支持异步发起请求 所提供的指标与 Locust 报告一致
rbatis 是一个用 Rust 编写的高性能、安全、动态 SQL(编译时)ORM 框架,受 Mybatis 和 MybatisPlus 的启发。它提供高性能,基于 Future,带有 async_std/tokio,单线程基准测试可以轻松达到 200,000 QPS。 特性: 编译时动态 sql(mybatis 动态 sql 标签)、全异步(Future)、生产实践(abs_admin) 内存安