Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
zierf committed May 14, 2024
0 parents commit a0f599f
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -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"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "wgpu_render"
version = "0.1.0"
edition = "2021"

[dependencies]
18 changes: 18 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{ pkgs ? import <nixpkgs> { } }:

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;
}
3 changes: 3 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

0 comments on commit a0f599f

Please sign in to comment.