Skip to content

Commit ae80ff0

Browse files
committed
Initial, buildable code and repo layout
Two MIPS III N32 ABI executables are produced; requires this patch: rust-lang/rust#113497 See the readme for instructions and other notes.
1 parent 670fe01 commit ae80ff0

21 files changed

+1031
-676
lines changed

.cargo/config.toml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# ---
2+
# Configuration for Cargo inherited by all virtual workspaces
3+
# ---
4+
5+
# The Nintendo 64 is not an officially supported platform by Rust. To target
6+
# this platform, normally available out of the box modules and intrinsics for
7+
# officially supported platforms (e.g. memset) must be compiled alongside the
8+
# packages in this repo.
9+
#
10+
# Docs:
11+
# - https://doc.rust-lang.org/cargo/reference/unstable.html#build-std
12+
# - https://doc.rust-lang.org/cargo/reference/unstable.html#build-std-features
13+
# - https://github.com/rust-lang/compiler-builtins
14+
#
15+
[unstable]
16+
build-std = [
17+
"core",
18+
"compiler_builtins",
19+
]
20+
build-std-features = [
21+
"compiler-builtins-mem",
22+
]
23+
24+
# Linking "freestanding" binaries requires special incantations on most platforms,
25+
# see: https://os.phil-opp.com/freestanding-rust-binary/#linker-errors
26+
#
27+
[target.'cfg(target_os = "linux")']
28+
rustflags = [
29+
"-C", "link-arg=-nostartfiles",
30+
]
31+
32+
[target.'cfg(target_os = "macos")']
33+
rustflags = [
34+
"-C", "link-args=-e __start -static -nostartfiles",
35+
]
36+
37+
# This project targets the platform's central processor and graphics coprocessor,
38+
# which have different microarchitectures (despite both being MIPS processors).
39+
# Target-specific rustc flags are defined below if they're needed. Example args
40+
# useful for debugging code generate are left commented.
41+
#
42+
[target.mips-ultra64-cpu]
43+
rustflags = [
44+
# "--verbose",
45+
# "--print", "link-args",
46+
# "--emit=llvm-ir,llvm-bc",
47+
# "-C", "save-temps",
48+
]
49+
50+
[target.mips-ultra64-rcp]
51+
rustflags = [
52+
# "--verbose",
53+
# "--print", "link-args",
54+
# "--emit=llvm-ir,llvm-bc",
55+
# "-C", "save-temps",
56+
]
57+
58+
# eof

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"rust-analyzer.linkedProjects": [
3+
"${workspaceFolder}/Cargo.toml"
4+
]
5+
}

Cargo.lock

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[workspace]
2+
resolver = "2"
3+
members = [
4+
"lib-kernel",
5+
"rcp-kernel",
6+
"cpu-kernel",
7+
]
8+
9+
[workspace.package]
10+
version = "0.0.1"
11+
edition = "2021"
12+
license = "GPL-3.0+"
13+
repository = "https://github.com/xSetech/Summer"
14+
authors = [
15+
"Seth Junot <[email protected]>",
16+
]
17+
18+
[profile.dev]
19+
panic = "abort"
20+
21+
[profile.release]
22+
panic = "abort"

0 commit comments

Comments
 (0)