Skip to content

Commit

Permalink
Spanzuratoarea
Browse files Browse the repository at this point in the history
  • Loading branch information
rares45 committed Jun 3, 2023
0 parents commit 75d82b7
Show file tree
Hide file tree
Showing 15 changed files with 769 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target
/.vscode
26 changes: 26 additions & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
combine_control_expr = false
comment_width = 100
control_brace_style = "AlwaysSameLine"
edition = "2021"
fn_single_line = true
format_code_in_doc_comments = true
format_strings = true
hard_tabs = false
imports_layout = "HorizontalVertical"
max_width = 80
imports_granularity = "Module"
newline_style = "Unix"
normalize_comments = true
normalize_doc_attributes = true
overflow_delimited_expr = true
reorder_impl_items = true
reorder_imports = true
group_imports = "StdExternalCrate"
reorder_modules = true
single_line_if_else_max_width = 0
tab_spaces = 2
trailing_comma = "Vertical"
use_small_heuristics = "Max"
use_try_shorthand = true
where_single_line = true
wrap_comments = true
89 changes: 89 additions & 0 deletions Cargo.lock

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

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

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
raylib = {version = "3.7.0"}

[build-dependencies]
copy_to_output = "2.1.0"

[target.'cfg(target_os = "linux")'.dependencies]
raylib = {version = "3.7.0", features=["nobuild"]}

[profile.release]
strip = true # Automatically strip symbols from the binary.
codegen-units = 1 # Allow for maximum size reduction optimizations
lto = true
22 changes: 22 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
fn main() {
configure_linux();
}

#[cfg(target_os = "linux")]
fn configure_linux() {
// Get the path to the raylib shared library

use copy_to_output::copy_to_output;
let lib_dir = "./lib";

// Set the environment variable for the runtime library search path
println!("cargo:rustc-env=LD_LIBRARY_PATH={}", lib_dir);

// Link against the raylib shared library
println!("cargo:rustc-link-search=native={}", lib_dir);
println!("cargo:rustc-link-lib=dylib=raylib");
println!("cargo:rustc-link-arg=-Wl,-rpath,$ORIGIN/lib");

copy_to_output("lib", &std::env::var("PROFILE").unwrap())
.expect("Could not copy");
}
1 change: 1 addition & 0 deletions lib/libraylib.so
Binary file added lib/libraylib.so.3.7.0
Binary file not shown.
1 change: 1 addition & 0 deletions lib/libraylib.so.370
5 changes: 5 additions & 0 deletions src/colors.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
use raylib::prelude::Color;

pub const BACKGROUND: Color = Color::new(45, 49, 66, 255);
pub const PRIMARY: Color = Color::new(240, 100, 73, 255);
pub const TEXT: Color = Color::new(237, 230, 227, 255);
Loading

0 comments on commit 75d82b7

Please sign in to comment.