diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..c7be8ff --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,18 @@ +# lld as linker + +## for Linux +#[target.x86_64-unknown-linux-gnu] +#linker = "clang" +#rustflags = ["-C", "link-arg=-fuse-ld=lld"] +# +## for x86_64 MacOS +#[target.x86_64-apple-darwin] +#rustflags = ["-C", "link-arg=-fuse-ld=/usr/local/opt/llvm/bin/ld64.lld"] +# +## for aarch64 MacOS +#[target.aarch64-apple-darwin] +#rustflags = ["-C", "link-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld"] +# +## for Windows +#[target.x86_64-pc-windows-msvc] +#linker = "rust-lld.exe" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..c37334c --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "wgpu_render" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..4758da8 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "wgpu_render" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..c6b3ebc --- /dev/null +++ b/shell.nix @@ -0,0 +1,18 @@ +{ pkgs ? import { } }: + +with pkgs; + +# Bevy NixShell +# https://github.com/bevyengine/bevy/blob/main/docs/linux_dependencies.md +mkShell rec { + nativeBuildInputs = [ + pkg-config + ]; + buildInputs = [ + clang llvmPackages_18.bintools + udev alsa-lib vulkan-loader + xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr # To use the x11 feature + libxkbcommon wayland # To use the wayland feature + ]; + LD_LIBRARY_PATH = lib.makeLibraryPath buildInputs; +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}