diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 00000000..7142e3c5 --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,6 @@ +[build] +target = "x86_64-cykusz_os.json" + +[unstable] +build-std-features = ["compiler-builtins-mem"] +build-std = ["alloc", "core", "compiler_builtins"] diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ba13bde6..442e4d97 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -40,9 +40,6 @@ jobs: - name: Install `rust-src` Rustup Component run: rustup component add rust-src - - - name: Install Xargo - run: cargo install xargo # Runs a single command using the runners shell - name: Build OS diff --git a/Cargo.lock b/Cargo.lock index c2a320a3..1d009645 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,12 +23,6 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "arrayvec" version = "0.7.4" @@ -55,9 +49,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" [[package]] name = "bitmaps" @@ -73,16 +67,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ - "android-tzdata", "num-traits", ] [[package]] -name = "cykusz_rs" +name = "cykusz-rs" version = "0.1.0" dependencies = [ "acpica", @@ -123,9 +116,9 @@ dependencies = [ [[package]] name = "intrusive-collections" -version = "0.9.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f4f90afb01281fdeffb0f8e082d230cbe4f888f837cc90759696b858db1a700" +checksum = "b694dc9f70c3bda874626d2aed13b780f137aab435f4e9814121955cf706122e" dependencies = [ "memoffset", ] @@ -160,18 +153,18 @@ dependencies = [ [[package]] name = "lru" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eedb2bdbad7e0634f83989bf596f497b070130daaa398ab22d84c39e266deec5" +checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" dependencies = [ "hashbrown", ] [[package]] name = "memoffset" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ "autocfg", ] @@ -184,9 +177,9 @@ checksum = "e34c69964cca7e0fbb60cfb7e5cf0148e30f0ccaafade2dd2f704fe79bc9e607" [[package]] name = "num-traits" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" +checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" dependencies = [ "autocfg", ] @@ -199,15 +192,15 @@ checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "paste" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] name = "proc-macro2" -version = "1.0.64" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78803b62cbf1f46fde80d7c0e803111524b9877184cfe7c3033659490ac7a7da" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -220,14 +213,14 @@ dependencies = [ "rlibc", "syscall-defs", "syscall-user", - "user_alloc", + "user-alloc", ] [[package]] name = "quote" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" +checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ "proc-macro2", ] @@ -238,7 +231,7 @@ version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.4.0", ] [[package]] @@ -249,9 +242,9 @@ checksum = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "spin" @@ -293,12 +286,12 @@ dependencies = [ [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] -name = "user_alloc" +name = "user-alloc" version = "0.1.0" dependencies = [ "linked_list_allocator", @@ -316,9 +309,9 @@ checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" [[package]] name = "uuid" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" +checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" [[package]] name = "version_check" diff --git a/Cargo.toml b/Cargo.toml index 6511752d..cef8acc8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,6 @@ [workspace] members = ["syscall-defs", "syscall-user", "user-alloc", "userspace", "acpica", "cykusz-rs"] +resolver = "2" [profile.release] debug=false diff --git a/Makefile b/Makefile index 3d1354d8..fb8568cf 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ assembly_source_files := $(wildcard cykusz-rs/src/arch/$(arch)/asm/*.asm) assembly_object_files := $(patsubst cykusz-rs/src/arch/$(arch)/asm/%.asm, \ build/arch/$(arch)/asm/%.o, $(assembly_source_files)) -target ?= $(arch)-unknown-none-gnu +target ?= $(arch)-cykusz_os ifdef dev rust_os := target/$(target)/debug/libcykusz_rs.a rust_shell := target/$(target)/debug/shell @@ -97,9 +97,9 @@ usb: $(kernel) cargo: ifdef dev - RUST_TARGET_PATH=`pwd` xargo build --workspace --target $(target) --verbose + cargo build --workspace --verbose else - RUST_TARGET_PATH=`pwd` xargo build --workspace --release --target $(target) --verbose + cargo build --workspace --release --verbose endif toolchain: $(cross_cpp) diff --git a/Xargo.toml b/Xargo.toml deleted file mode 100644 index d4b62aed..00000000 --- a/Xargo.toml +++ /dev/null @@ -1,2 +0,0 @@ -[target.x86_64-unknown-none-gnu.dependencies] -alloc = { } diff --git a/cleanup.sh b/cleanup.sh index 0d52145f..8418e54a 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -1,4 +1,4 @@ #!/bin/bash -cargo fix -p cykusz_rs -p user_alloc -p syscall-user -p syscall-defs --lib --allow-dirty --allow-staged +cargo fix -p cykusz-rs -p user-alloc -p syscall-user -p syscall-defs --lib --allow-dirty --allow-staged cargo fmt diff --git a/cykusz-rs/Cargo.toml b/cykusz-rs/Cargo.toml index 36a6814b..b209dfd7 100644 --- a/cykusz-rs/Cargo.toml +++ b/cykusz-rs/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["Rafal Mielniczuk "] edition = "2021" -name = "cykusz_rs" +name = "cykusz-rs" version = "0.1.0" [lib] diff --git a/cykusz-rs/src/lib.rs b/cykusz-rs/src/lib.rs index b9238a77..e0f3c3d5 100644 --- a/cykusz-rs/src/lib.rs +++ b/cykusz-rs/src/lib.rs @@ -1,4 +1,5 @@ #![no_std] +#![allow(internal_features)] #![feature(alloc_error_handler)] #![feature(array_methods)] #![feature(asm_const)] diff --git a/disk_scripts/install_os.sh b/disk_scripts/install_os.sh index 15b6406a..81f88990 100755 --- a/disk_scripts/install_os.sh +++ b/disk_scripts/install_os.sh @@ -17,8 +17,8 @@ PROGS="test testcpp hello stack nyancat ttytest fork stat fbdoom DOOM1.WAD" mount /dev/loop0p2 mnt mkdir -p mnt/bin -cp -f target/x86_64-unknown-none-gnu/release/init mnt/bin/init -cp -f target/x86_64-unknown-none-gnu/release/shell mnt/bin/shell +cp -f target/x86_64-cykusz_os/release/init mnt/bin/init +cp -f target/x86_64-cykusz_os/release/shell mnt/bin/shell for prog in $PROGS; do cp -f sysroot/build/$prog mnt/bin/$prog diff --git a/user-alloc/Cargo.toml b/user-alloc/Cargo.toml index a5601255..8a3919d8 100644 --- a/user-alloc/Cargo.toml +++ b/user-alloc/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "user_alloc" +name = "user-alloc" version = "0.1.0" authors = ["Rafal Mielniczuk "] edition = "2021" diff --git a/userspace/Cargo.toml b/userspace/Cargo.toml index 83013523..e0a9b2bd 100644 --- a/userspace/Cargo.toml +++ b/userspace/Cargo.toml @@ -11,7 +11,7 @@ rlibc = "*" default-features = false version = "*" -[dependencies.user_alloc] +[dependencies.user-alloc] path = "../user-alloc" [dependencies.syscall-defs] path = "../syscall-defs" diff --git a/x86_64-unknown-none-gnu.json b/x86_64-cykusz_os.json similarity index 100% rename from x86_64-unknown-none-gnu.json rename to x86_64-cykusz_os.json