aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-11-24 15:08:20 +0100
committerGustav Sörnäs <gustav@sornas.net>2020-11-24 15:08:20 +0100
commiteba74d74502641a4565dc6011db33742e8450680 (patch)
treef7785882d1084944b309bd777d4663112823070a /rust
parent0960f519d9e1e3c108b1825a0ec241b1c56c5cca (diff)
downloadpintos-rs-eba74d74502641a4565dc6011db33742e8450680.tar.gz
move rust "libc" to separate crate and link with that instead
Diffstat (limited to 'rust')
-rw-r--r--rust/Cargo.toml20
-rw-r--r--rust/Makefile17
-rw-r--r--rust/rust-toolchain1
-rw-r--r--rust/src/lib.rs16
4 files changed, 0 insertions, 54 deletions
diff --git a/rust/Cargo.toml b/rust/Cargo.toml
deleted file mode 100644
index a74fdd6..0000000
--- a/rust/Cargo.toml
+++ /dev/null
@@ -1,20 +0,0 @@
-[package]
-name = "pintos-rs"
-version = "0.1.0"
-authors = ["Gustav Sörnäs <gustav@sornas.net>"]
-edition = "2018"
-
-[lib]
-name = "rust"
-crate-type = ["staticlib"]
-
-[profile.dev]
-panic = "abort"
-
-[profile.release]
-panic = "abort"
-
-[dependencies.libc]
-version = "0.2"
-default-features = false
-features = ["extra_traits"]
diff --git a/rust/Makefile b/rust/Makefile
deleted file mode 100644
index 39cae70..0000000
--- a/rust/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-all: debug
-
-debug: libpintos.a
- cargo rustc -- -C link-arg= -L.
-
-release: libpintos.a
- cargo rustc --release -- -C link-arg= -L.
-
-libpintos.a:
- make -C ../src/examples libc.a
- cp ../src/examples/libc.a libpintos.a
-
-clean:
- cargo clean
- rm -f libpintos.a
-
-.PHONY: all clean debug release libpintos.a
diff --git a/rust/rust-toolchain b/rust/rust-toolchain
deleted file mode 100644
index adfa491..0000000
--- a/rust/rust-toolchain
+++ /dev/null
@@ -1 +0,0 @@
-nightly-i686-unknown-linux-gnu
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
deleted file mode 100644
index e64fbbd..0000000
--- a/rust/src/lib.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-#![no_std]
-
-#[panic_handler]
-fn panic(_info: &core::panic::PanicInfo) -> ! {
- loop {}
-}
-
-#[no_mangle]
-pub unsafe extern "C" fn entry() {
- exit(0x69);
-}
-
-#[link(name="pintos", kind="static")]
-extern {
- fn exit(status: i32);
-}