Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move all crates into a crates directory #1940

Merged
merged 2 commits into from Aug 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Expand Up @@ -209,4 +209,4 @@ jobs:
override: true

- run: cargo check --features wgpu --target aarch64-linux-android
working-directory: eframe
working-directory: crates/eframe
20 changes: 10 additions & 10 deletions Cargo.toml
@@ -1,16 +1,16 @@
[workspace]
resolver = "2"
members = [
"egui_demo_app",
"egui_demo_lib",
"egui_extras",
"egui_glium",
"egui_glow",
"egui-wgpu",
"egui-winit",
"egui",
"emath",
"epaint",
"crates/egui_demo_app",
"crates/egui_demo_lib",
"crates/egui_extras",
"crates/egui_glium",
"crates/egui_glow",
"crates/egui-wgpu",
"crates/egui-winit",
"crates/egui",
"crates/emath",
"crates/epaint",

"examples/*",
]
Expand Down
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -8,7 +8,7 @@ fn main() {

let mut egui_glium = egui_glium::EguiGlium::new(&display, &event_loop);

let png_data = include_bytes!("../../examples/retained_image/src/rust-logo-256x256.png");
let png_data = include_bytes!("../../../examples/retained_image/src/rust-logo-256x256.png");
let image = load_glium_image(png_data);
let image_size = egui::vec2(image.width as f32, image.height as f32);
// Load to gpu memory
Expand Down
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.
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.
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.
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.
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.
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.
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.
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.
File renamed without changes.
2 changes: 1 addition & 1 deletion examples/confirm_exit/Cargo.toml
Expand Up @@ -9,4 +9,4 @@ publish = false


[dependencies]
eframe = { path = "../../eframe" }
eframe = { path = "../../crates/eframe" }
4 changes: 2 additions & 2 deletions examples/custom_3d_glow/Cargo.toml
Expand Up @@ -9,6 +9,6 @@ publish = false


[dependencies]
eframe = { path = "../../eframe", features = ["glow"] }
egui_glow = { path = "../../egui_glow" }
eframe = { path = "../../crates/eframe", features = ["glow"] }
egui_glow = { path = "../../crates/egui_glow" }
glow = "0.11"
4 changes: 2 additions & 2 deletions examples/custom_3d_three-d/Cargo.toml
Expand Up @@ -11,8 +11,8 @@ publish = false
crate-type = ["cdylib", "rlib"]

[dependencies]
eframe = { path = "../../eframe", features = ["glow"] }
egui_glow = { path = "../../egui_glow" }
eframe = { path = "../../crates/eframe", features = ["glow"] }
egui_glow = { path = "../../crates/egui_glow" }
glow = "0.11"
three-d = { version = "0.13", default-features = false }

Expand Down
2 changes: 1 addition & 1 deletion examples/custom_font/Cargo.toml
Expand Up @@ -9,4 +9,4 @@ publish = false


[dependencies]
eframe = { path = "../../eframe" }
eframe = { path = "../../crates/eframe" }
4 changes: 3 additions & 1 deletion examples/custom_font/src/main.rs
Expand Up @@ -19,7 +19,9 @@ fn setup_custom_fonts(ctx: &egui::Context) {
// .ttf and .otf files supported.
fonts.font_data.insert(
"my_font".to_owned(),
egui::FontData::from_static(include_bytes!("../../../epaint/fonts/Hack-Regular.ttf")),
egui::FontData::from_static(include_bytes!(
"../../../crates/epaint/fonts/Hack-Regular.ttf"
)),
);

// Put my font first (highest priority) for proportional text:
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_font_style/Cargo.toml
Expand Up @@ -9,4 +9,4 @@ publish = false


[dependencies]
eframe = { path = "../../eframe" }
eframe = { path = "../../crates/eframe" }
2 changes: 1 addition & 1 deletion examples/custom_window_frame/Cargo.toml
Expand Up @@ -9,4 +9,4 @@ publish = false


[dependencies]
eframe = { path = "../../eframe" }
eframe = { path = "../../crates/eframe" }
4 changes: 2 additions & 2 deletions examples/download_image/Cargo.toml
Expand Up @@ -9,8 +9,8 @@ publish = false


[dependencies]
eframe = { path = "../../eframe" }
egui_extras = { path = "../../egui_extras", features = ["image"] }
eframe = { path = "../../crates/eframe" }
egui_extras = { path = "../../crates/egui_extras", features = ["image"] }
ehttp = "0.2"
image = { version = "0.24", default-features = false, features = ["jpeg"] }
poll-promise = "0.1"
2 changes: 1 addition & 1 deletion examples/file_dialog/Cargo.toml
Expand Up @@ -9,5 +9,5 @@ publish = false


[dependencies]
eframe = { path = "../../eframe" }
eframe = { path = "../../crates/eframe" }
rfd = "0.8"
2 changes: 1 addition & 1 deletion examples/hello_world/Cargo.toml
Expand Up @@ -9,4 +9,4 @@ publish = false


[dependencies]
eframe = { path = "../../eframe" }
eframe = { path = "../../crates/eframe" }
2 changes: 1 addition & 1 deletion examples/puffin_profiler/Cargo.toml
Expand Up @@ -9,6 +9,6 @@ publish = false


[dependencies]
eframe = { path = "../../eframe", features = ["puffin"] }
eframe = { path = "../../crates/eframe", features = ["puffin"] }
puffin = "0.13"
puffin_http = "0.10"
4 changes: 2 additions & 2 deletions examples/retained_image/Cargo.toml
Expand Up @@ -9,6 +9,6 @@ publish = false


[dependencies]
eframe = { path = "../../eframe" }
egui_extras = { path = "../../egui_extras", features = ["image"] }
eframe = { path = "../../crates/eframe" }
egui_extras = { path = "../../crates/egui_extras", features = ["image"] }
image = { version = "0.24", default-features = false, features = ["png"] }
4 changes: 2 additions & 2 deletions examples/screenshot/Cargo.toml
Expand Up @@ -9,6 +9,6 @@ publish = false


[dependencies]
eframe = { path = "../../eframe" }
egui_extras = { path = "../../egui_extras", features = ["image"] }
eframe = { path = "../../crates/eframe" }
egui_extras = { path = "../../crates/egui_extras", features = ["image"] }
itertools = "0.10.3"
2 changes: 1 addition & 1 deletion examples/serial_windows/Cargo.toml
Expand Up @@ -9,4 +9,4 @@ publish = false


[dependencies]
eframe = { path = "../../eframe" }
eframe = { path = "../../crates/eframe" }
4 changes: 2 additions & 2 deletions examples/svg/Cargo.toml
Expand Up @@ -9,5 +9,5 @@ publish = false


[dependencies]
eframe = { path = "../../eframe" }
egui_extras = { path = "../../egui_extras", features = ["svg"] }
eframe = { path = "../../crates/eframe" }
egui_extras = { path = "../../crates/egui_extras", features = ["svg"] }
2 changes: 1 addition & 1 deletion sh/build_demo_web.sh
Expand Up @@ -52,7 +52,7 @@ rm -f "docs/${CRATE_NAME}_bg.wasm"
echo "Building rust…"
BUILD=release

(cd $CRATE_NAME &&
(cd crates/$CRATE_NAME &&
cargo build \
--release \
--lib \
Expand Down
44 changes: 22 additions & 22 deletions sh/check.sh
Expand Up @@ -23,29 +23,29 @@ cargo fmt --all -- --check
cargo doc -p eframe -p egui -p egui_demo_lib -p egui_extras -p egui_glium -p egui_glow -p egui-winit -p emath -p epaint --lib --no-deps --all-features
cargo doc --document-private-items --no-deps --all-features

(cd eframe && cargo check --no-default-features --features "glow")
(cd eframe && cargo check --no-default-features --features "wgpu")
(cd egui && cargo check --no-default-features --features "serde")
(cd egui_demo_app && cargo check --no-default-features --features "glow")
(cd egui_demo_app && cargo check --no-default-features --features "wgpu")
(cd egui_demo_lib && cargo check --no-default-features)
(cd egui_extras && cargo check --no-default-features)
(cd egui_glium && cargo check --no-default-features)
(cd egui_glow && cargo check --no-default-features)
(cd egui-winit && cargo check --no-default-features)
(cd emath && cargo check --no-default-features)
(cd epaint && cargo check --no-default-features --release)
(cd epaint && cargo check --no-default-features)
(cd crates/eframe && cargo check --no-default-features --features "glow")
(cd crates/eframe && cargo check --no-default-features --features "wgpu")
(cd crates/egui && cargo check --no-default-features --features "serde")
(cd crates/egui_demo_app && cargo check --no-default-features --features "glow")
(cd crates/egui_demo_app && cargo check --no-default-features --features "wgpu")
(cd crates/egui_demo_lib && cargo check --no-default-features)
(cd crates/egui_extras && cargo check --no-default-features)
(cd crates/egui_glium && cargo check --no-default-features)
(cd crates/egui_glow && cargo check --no-default-features)
(cd crates/egui-winit && cargo check --no-default-features)
(cd crates/emath && cargo check --no-default-features)
(cd crates/epaint && cargo check --no-default-features --release)
(cd crates/epaint && cargo check --no-default-features)

(cd eframe && cargo check --all-features)
(cd egui && cargo check --all-features)
(cd egui_demo_app && cargo check --all-features)
(cd egui_extras && cargo check --all-features)
(cd egui_glium && cargo check --all-features)
(cd egui_glow && cargo check --all-features)
(cd egui-winit && cargo check --all-features)
(cd emath && cargo check --all-features)
(cd epaint && cargo check --all-features)
(cd crates/eframe && cargo check --all-features)
(cd crates/egui && cargo check --all-features)
(cd crates/egui_demo_app && cargo check --all-features)
(cd crates/egui_extras && cargo check --all-features)
(cd crates/egui_glium && cargo check --all-features)
(cd crates/egui_glow && cargo check --all-features)
(cd crates/egui-winit && cargo check --all-features)
(cd crates/emath && cargo check --all-features)
(cd crates/epaint && cargo check --all-features)

./sh/wasm_bindgen_check.sh

Expand Down
2 changes: 1 addition & 1 deletion sh/wasm_bindgen_check.sh
Expand Up @@ -16,7 +16,7 @@ export RUSTFLAGS=--cfg=web_sys_unstable_apis
echo "Building rust…"
BUILD=debug # debug builds are faster

(cd $CRATE_NAME &&
(cd crates/$CRATE_NAME &&
cargo build \
--lib \
--target wasm32-unknown-unknown \
Expand Down