From 4f9a05286ce446f4a7ef9c155a821e490779c457 Mon Sep 17 00:00:00 2001 From: Werner <26710260+GuilhermeWerner@users.noreply.github.com> Date: Sat, 25 Dec 2021 08:20:21 -0300 Subject: [PATCH] Update project structure --- .cargo/config.toml | 6 ++++++ .gitignore | 5 +---- Cargo.toml | 4 ++++ src/main.rs => Source/Main.rs | 1 + ps2.json | 3 --- rust-toolchain | 1 + 6 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 .cargo/config.toml rename src/main.rs => Source/Main.rs (83%) create mode 100644 rust-toolchain diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..5ca2d0b --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,6 @@ +[build] +target-dir = "Binaries" +target = "ps2.json" + +[unstable] +build-std = ["core"] diff --git a/.gitignore b/.gitignore index 8fb7d78..33080b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,2 @@ -/target - +Binaries/ Cargo.lock - -*.tar.gz diff --git a/Cargo.toml b/Cargo.toml index 99f570b..b5b16ec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,10 @@ name = "rust-ps2" version = "0.1.0" edition = "2018" +[[bin]] +name = "RustPS2" +path = "Source/Main.rs" + [dependencies] panic-halt = "0.2.0" prussia_rt = { git = "https://github.com/Ravenslofty/prussia" } diff --git a/src/main.rs b/Source/Main.rs similarity index 83% rename from src/main.rs rename to Source/Main.rs index 44becc8..8288454 100644 --- a/src/main.rs +++ b/Source/Main.rs @@ -1,5 +1,6 @@ #![no_std] #![no_main] +#![allow(non_snake_case)] #![allow(unused_imports)] use panic_halt; diff --git a/ps2.json b/ps2.json index a0134d6..0352121 100644 --- a/ps2.json +++ b/ps2.json @@ -8,16 +8,13 @@ "linker": "mips64el-none-elf-ld", "linker-flavor": "ld", "llvm-target": "mipsel-none-elf", - "llvm-args": "-mxgot", "max-atomic-width": 32, "os": "none", - "panic_strategy": "abort", "position-independent-executables": false, "relro-level": "full", "target-c-int-width": "32", "target-endian": "little", "target-pointer-width": "32", - "soft-float": true, "vendor": "unknown", "post-link-args": { "ld": [ diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000..bf867e0 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +nightly