From 3e8244f686017bebd0612a5e1e1dbf9891fbc71b Mon Sep 17 00:00:00 2001 From: Sweetbread Date: Sat, 14 Mar 2026 18:23:41 +0300 Subject: [PATCH] config: update things and add shell.nix --- .cargo/config.toml | 1 + i686-kolibri.json | 5 ++--- rust-toolchain | 5 ++++- shell.nix | 14 ++++++++++++++ 4 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 shell.nix diff --git a/.cargo/config.toml b/.cargo/config.toml index b155c62..4de3642 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,5 +1,6 @@ [unstable] build-std = ["core", "compiler_builtins", "alloc"] +json-target-spec = true [build] target = "i686-kolibri.json" diff --git a/i686-kolibri.json b/i686-kolibri.json index ae65da9..b1d3bcf 100644 --- a/i686-kolibri.json +++ b/i686-kolibri.json @@ -5,7 +5,6 @@ "dynamic-linking": false, "executables": true, "has-rpath": true, - "is-builtin": false, "linker-flavor": "ld.lld", "linker": "rust-lld", "llvm-target": "i686-unknown-none-code32", @@ -14,9 +13,9 @@ "relocation-model": "static", "position-independent-executables": false, "relro-level": "off", - "target-c-int-width": "32", + "target-c-int-width": 32, "target-endian": "little", - "target-pointer-width": "32", + "target-pointer-width": 32, "vendor": "unknown", "disable-redzone": true, "panic-strategy": "abort", diff --git a/rust-toolchain b/rust-toolchain index bf867e0..047b1c3 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1,4 @@ -nightly +[toolchain] +channel = "nightly" +components = ["rust-src", "llvm-tools-preview"] +profile = "default" diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..b66adcf --- /dev/null +++ b/shell.nix @@ -0,0 +1,14 @@ +{ pkgs ? import {} }: + +pkgs.mkShell { + packages = with pkgs; [ + rustup + cargo-make + cargo-binutils + fasm + ]; + + shellHook = '' + export PATH="$HOME/.cargo/bin:$PATH" + ''; +}