Skip to content

Commit

Permalink
Move Luminol into crates folder
Browse files Browse the repository at this point in the history
  • Loading branch information
melody-rs committed Oct 13, 2023
1 parent 15205f2 commit a2883df
Show file tree
Hide file tree
Showing 13 changed files with 140 additions and 63 deletions.
80 changes: 80 additions & 0 deletions Cargo.lock

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

61 changes: 4 additions & 57 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,36 +1,6 @@
[package]
name = "luminol"
version = "0.4.0"
authors = [
"Lily Lyons <[email protected]>",
"Egor Poleshko <[email protected]>",
]
edition = "2021"
rust-version = "1.62"
description = "Luminol is a FOSS recreation of RPG Maker XP in Rust with love ❤️"
license = "GPL-3.0"
readme = "README.md"
repository = "https://github.com/Speak2Erase/Luminol"
keywords = ["gamedev", "rpg", "rpg-maker"]
categories = ["games"]
build = "build.rs"


[workspace]
members = [
"crates/luminol-audio",
"crates/luminol-components",
"crates/luminol-config",
"crates/luminol-core",
"crates/luminol-data",
"crates/luminol-filesystem",
"crates/luminol-graphics",
"crates/luminol-modals",
"crates/luminol-macros",
"crates/luminol-tabs",
"crates/luminol-term",
"crates/luminol-windows",
]
members = ["crates/*"]
resolver = "2"

[workspace.dependencies]
egui = "0.22.0"
Expand All @@ -46,6 +16,8 @@ egui-wgpu = "0.22.0"

wgpu = "0.16.3"

image = "0.24.7"

serde = { version = "1.0", features = ["derive"] }
alox-48 = "0.4.1"
ron = "0.8.1"
Expand Down Expand Up @@ -77,30 +49,6 @@ itertools = "0.11.0"

rfd = "0.12.0"

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

[dependencies]
eframe.workspace = true
egui.workspace = true

rfd.workspace = true

parking_lot.workspace = true
once_cell.workspace = true

steamworks = { version = "0.10.0", optional = true }
crc = { version = "3.0.1", optional = true }

[features]
steamworks = ["dep:steamworks", "crc"]

[target.'cfg(windows)'.build-dependencies]
winres = "0.1"

[package.metadata.winres]
OriginalFilename = "Luminol.exe"
ProductName = "Luminol"

# Fast and performant.
[profile.release]
opt-level = 3
Expand Down Expand Up @@ -141,7 +89,6 @@ opt-level = 3
# See why config is set up this way.
# https://bevy-cheatbook.github.io/pitfalls/performance.html#why-not-use---release


[patch.crates-io]
# We need this for rodio to work in WebAssembly until
# https://github.com/RustAudio/cpal/pull/774
Expand Down
3 changes: 0 additions & 3 deletions crates/luminol-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ pub mod tab;
/// Swaps between filesystem_native and filesystem_wasm depending on the target arch.
pub mod filesystem;

/// Embedded icon 256x256 in size.
pub const ICON: &[u8] = include_bytes!("../../../assets/icon-256.png");

#[allow(missing_docs)]
#[derive(Default)]
pub struct ToolbarState {
Expand Down
48 changes: 48 additions & 0 deletions crates/luminol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[package]
name = "luminol"
version = "0.4.0"
authors = [
"Lily Lyons <[email protected]>",
"Egor Poleshko <[email protected]>",
]
edition = "2021"
rust-version = "1.62"
description = "Luminol is a FOSS recreation of RPG Maker XP in Rust with love ❤️"
license = "GPL-3.0"
readme = "README.md"
repository = "https://github.com/Speak2Erase/Luminol"
keywords = ["gamedev", "rpg", "rpg-maker"]
categories = ["games"]
build = "build.rs"

default-run = "luminol"

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

[dependencies]
eframe.workspace = true
egui.workspace = true

rfd.workspace = true

parking_lot.workspace = true
once_cell.workspace = true

image.workspace = true

steamworks = { version = "0.10.0", optional = true }
crc = { version = "3.0.1", optional = true }

tracing-subscriber = "0.3.17"
color-backtrace = "0.6.0"


[features]
steamworks = ["dep:steamworks", "crc"]

[target.'cfg(windows)'.build-dependencies]
winres = "0.1"

[package.metadata.winres]
OriginalFilename = "Luminol.exe"
ProductName = "Luminol"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
11 changes: 8 additions & 3 deletions src/main.rs → crates/luminol/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@
#[cfg(target_arch = "wasm32")]
use wasm_bindgen::prelude::*;

/// Embedded icon 256x256 in size.
const ICON: &[u8] = include_bytes!("../../../assets/icon-256.png");

mod app;
mod lumi;
mod steam;
Expand Down Expand Up @@ -112,17 +115,19 @@ fn main() {
// Log to stdout (if you run with `RUST_LOG=debug`).
tracing_subscriber::fmt::init();

color_eyre::install().expect("failed to setup eyre hooks");
color_backtrace::BacktracePrinter::new()
.verbosity(color_backtrace::Verbosity::Full)
.install(color_backtrace::default_output_stream());

let image = image::load_from_memory(luminol::ICON).expect("Failed to load Icon data.");
let image = image::load_from_memory(ICON).expect("Failed to load Icon data.");

let native_options = eframe::NativeOptions {
drag_and_drop_support: true,
transparent: true,
icon_data: Some(eframe::IconData {
width: image.width(),
height: image.height(),
rgba: image.into_bytes(),
rgba: image.to_rgba8().into_vec(),
}),
wgpu_options: eframe::egui_wgpu::WgpuConfiguration {
supported_backends: eframe::wgpu::util::backend_bits_from_env()
Expand Down
File renamed without changes.

0 comments on commit a2883df

Please sign in to comment.