chore: initalise Rust project

This commit is contained in:
Muhammad Nauman Raza 2023-07-20 16:11:34 +01:00
parent c9def010ef
commit 41bbcb249a
6 changed files with 3758 additions and 4 deletions

33
.cargo/config.toml Normal file
View file

@ -0,0 +1,33 @@
# Add the contents of this file to `config.toml` to enable "fast build" configuration. Please read the notes below.
# NOTE: For maximum performance, build using a nightly compiler
# If you are using rust stable, remove the "-Zshare-generics=y" below.
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-Clink-arg=-fuse-ld=lld", "-Zshare-generics=y"]
# NOTE: you must install [Mach-O LLD Port](https://lld.llvm.org/MachO/index.html) on mac. you can easily do this by installing llvm which includes lld with the "brew" package manager:
# `brew install llvm`
[target.x86_64-apple-darwin]
rustflags = [
"-C",
"link-arg=-fuse-ld=/usr/local/opt/llvm/bin/ld64.lld",
"-Zshare-generics=y",
]
[target.aarch64-apple-darwin]
rustflags = [
"-C",
"link-arg=-fuse-ld=/opt/homebrew/opt/llvm/bin/ld64.lld",
"-Zshare-generics=y",
]
[target.x86_64-pc-windows-msvc]
linker = "rust-lld.exe"
rustflags = ["-Zshare-generics=n"]
# Optional: Uncommenting the following improves compile times, but reduces the amount of debug info to 'line number tables only'
# In most cases the gains are negligible, but if you are on macos and have slow compile times you should see significant gains.
#[profile.dev]
#debug = 1

4
.gitignore vendored
View file

@ -3,10 +3,6 @@
debug/ debug/
target/ target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt # These are backup files generated by rustfmt
**/*.rs.bk **/*.rs.bk

3668
Cargo.lock generated Normal file

File diff suppressed because it is too large Load diff

56
Cargo.toml Normal file
View file

@ -0,0 +1,56 @@
[package]
name = "ambition-bevy"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
[dependencies.bevy]
version = "0.11.0"
default-features = false
features = [
# Some defaults
"bevy_asset",
"bevy_audio",
"bevy_gilrs",
"bevy_scene",
"bevy_winit",
"bevy_render",
"bevy_core_pipeline",
"bevy_sprite",
"bevy_text",
"bevy_ui",
"animation",
"tonemapping_luts",
"filesystem_watcher",
"android_shared_stdcxx",
"subpixel_glyph_atlas",
"bevy_dynamic_plugin",
# Misc. non-default features
"x11",
"ktx2",
"zstd",
# Media formats
"png",
"jpeg",
"flac",
# Tracing
"trace",
# Fast compiling
"dynamic_linking"
]
# Enable a small amount of optimization in debug mode
[profile.dev]
opt-level = 1
# Enable high optimizations for dependencies (incl. Bevy), but not for code:
[profile.dev.package."*"]
opt-level = 3
# Use nightly rust
[toolchain]
channel = "nightly"

Binary file not shown.

1
src/main.rs Normal file
View file

@ -0,0 +1 @@
fn main() {}