Move release profile to opt-level 3

Co-authored-by: rewin <rewin1996@gmail.com>
This commit is contained in:
Lee-Orr
2024-03-27 15:17:37 -04:00
parent d63709c578
commit d3e9774302
15 changed files with 540 additions and 156 deletions
Generated
+513 -83
View File
File diff suppressed because it is too large Load Diff
+1 -45
View File
@@ -11,50 +11,6 @@ anyhow = "1.0.75"
[workspace.dependencies.bevy] [workspace.dependencies.bevy]
version = "0.13.1" version = "0.13.1"
features = ["tonemapping_luts"] features = ["tonemapping_luts"]
git = "https://github.com/rewin123/bevy.git"
branch = "fix-wasm-fetch"
[patch.crates-io]
bevy = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_a11y = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_animation = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_app = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_asset = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_audio = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_core = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_core_pipeline = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_derive = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_diagnostic = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_dylib = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_dynamic_plugin = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_ecs = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_encase_derive = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_gilrs = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_gizmos = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_gltf = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_hierarchy = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_input = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_internal = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_log = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_macro_utils = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_math = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_mikktspace = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_pbr = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_ptr = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_reflect = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_reflect_derive = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_render = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_scene = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_sprite = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_tasks = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_text = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_time = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_transform = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_ui = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_utils = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_window = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
bevy_winit = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
[profile.dev-custom] [profile.dev-custom]
inherits = "dev" inherits = "dev"
@@ -64,4 +20,4 @@ opt-level = 1
opt-level = 3 opt-level = 3
[profile.release] [profile.release]
opt-level = "s" opt-level = 3
+6 -7
View File
@@ -31,36 +31,35 @@ serde = "1.0.192"
serde-wasm-bindgen = { version = "0.6.1", optional = true } serde-wasm-bindgen = { version = "0.6.1", optional = true }
serde_json = "1.0.108" serde_json = "1.0.108"
studio-bvh = { path = "../studio-bvh" } studio-bvh = { path = "../studio-bvh" }
wasm-bindgen = "0.2.84" wasm-bindgen = "0.2"
web-sys = { version = "0.3.40", optional = true, features = [ web-sys = { version = "0.3", optional = true, features = [
"CustomEvent", "CustomEvent",
"CustomEventInit", "CustomEventInit",
"Document", "Document",
"HtmlElement", "HtmlElement",
"Window", "Window",
"WorkerGlobalScope"
] } ] }
clap = { version = "4.4.18", features = ["derive"] } clap = { version = "4.4.18", features = ["derive"] }
futures-intrusive = "0.5.0" futures-intrusive = "0.5.0"
wgpu = "0.19.3" wgpu = "0.19.3"
futures-lite = "2.2.0" futures-lite = "2.2.0"
futures = "0.3.30" futures = "0.3.30"
image = "0.24.8" image = "0.25.0"
bytemuck = "1.14.1" bytemuck = "1.14.1"
space_editor = {git = "https://github.com/rewin123/space_editor", rev = "7b93e21ee1eb8a42418890b6cd525eaa7db43b95"} space_editor = {git = "https://github.com/rewin123/space_editor", rev = "7b93e21ee1eb8a42418890b6cd525eaa7db43b95"}
anyhow.workspace = true anyhow.workspace = true
serde_repr = "0.1.18" serde_repr = "0.1.18"
wasm-bindgen-futures = "0.4"
[dependencies.reqwest] [dependencies.reqwest]
version = "0.11.24" version = "0.12.2"
features = [ features = [
"default", "default",
"json", "json",
"stream", "stream",
] ]
[patch.crates-io]
bevy = { git = "https://github.com/rewin123/bevy.git", branch = "fix-wasm-fetch", version = "0.13.1" }
[features] [features]
wasm = [ wasm = [
"dep:console_error_panic_hook", "dep:console_error_panic_hook",
+1 -1
View File
@@ -20,7 +20,7 @@ async function main() {
} }
/** @type import("node:child_process").StdioOptions */ /** @type import("node:child_process").StdioOptions */
const stdio = ["ignore", "inherit", "inherit"]; const stdio = ["inherit", "inherit", "inherit"];
const outDir = path.join(workspaceRoot, "dist/studio"); const outDir = path.join(workspaceRoot, "dist/studio");
+1 -1
View File
@@ -1,4 +1,4 @@
use std::ops::{Deref, DerefMut};
use bevy::{ use bevy::{
app::{App, Plugin, PostUpdate, Update}, app::{App, Plugin, PostUpdate, Update},
+3 -3
View File
@@ -1,11 +1,11 @@
use std::fmt; use std::fmt;
use bevy::{prelude::*, window::PrimaryWindow}; use bevy::{prelude::*, window::PrimaryWindow};
use bevy_inspector_egui::{bevy_egui::EguiPlugin, DefaultInspectorConfigPlugin}; use bevy_inspector_egui::{DefaultInspectorConfigPlugin};
use bevy_mod_picking::debug::DebugPickingMode; use bevy_mod_picking::debug::DebugPickingMode;
use space_editor::{ use space_editor::{
prelude::*, prelude::*,
space_editor_ui::{tools::gizmo::GizmoToolPlugin, EditorGizmoConfigPlugin, EditorPluginGroup}, space_editor_ui::{tools::gizmo::GizmoToolPlugin, EditorPluginGroup},
}; };
use crate::{ use crate::{
@@ -118,7 +118,7 @@ fn update_gizmo_line_thickness(
mut config_store: ResMut<GizmoConfigStore>, mut config_store: ResMut<GizmoConfigStore>,
q_window: Query<&Window, (Changed<Window>, With<PrimaryWindow>)>, q_window: Query<&Window, (Changed<Window>, With<PrimaryWindow>)>,
) { ) {
if let Ok(scale_factor) = q_window.get_single().map(|win| win.scale_factor() as f32) { if let Ok(scale_factor) = q_window.get_single().map(|win| win.scale_factor()) {
let (config, _) = config_store.config_mut::<DefaultGizmoConfigGroup>(); let (config, _) = config_store.config_mut::<DefaultGizmoConfigGroup>();
config.line_width = 2. * scale_factor; config.line_width = 2. * scale_factor;
} }
+1 -1
View File
@@ -76,7 +76,7 @@ pub fn start_headless(
Startup, Startup,
move |mut cmd: Commands, move |mut cmd: Commands,
mut ew: EventWriter<EditorEvent>, mut ew: EventWriter<EditorEvent>,
mut asset_server: Res<AssetServer>| { asset_server: Res<AssetServer>| {
cmd.insert_resource(SkyboxHolder(Some(Skybox { cmd.insert_resource(SkyboxHolder(Some(Skybox {
image: asset_server.load(skybox.clone()), image: asset_server.load(skybox.clone()),
brightness: 1.0, brightness: 1.0,
+1 -1
View File
@@ -237,7 +237,7 @@ fn translate_fps_camera_events(
mut input: EventWriter<InputAction>, mut input: EventWriter<InputAction>,
) { ) {
// Camera Translation (FPS-like) // Camera Translation (FPS-like)
use KeyCode::*;
let wasd_keys = [ let wasd_keys = [
KeyCode::KeyW, KeyCode::KeyW,
KeyCode::KeyA, KeyCode::KeyA,
+1 -1
View File
@@ -288,7 +288,7 @@ pub(super) fn on_rotate(
early_exit_test: &early_exit_test, early_exit_test: &early_exit_test,
..default() ..default()
}; };
let hits = raycast.cast_ray(ray.into(), &settings); let hits = raycast.cast_ray(ray, &settings);
// If the pointer is no longer in the vicinity of the sphere, we'll // If the pointer is no longer in the vicinity of the sphere, we'll
// invoke this closure to extrapolate additional rotation from the // invoke this closure to extrapolate additional rotation from the
+4 -1
View File
@@ -1,6 +1,9 @@
#![allow(clippy::type_complexity, clippy::too_many_arguments)] #![allow(clippy::type_complexity, clippy::too_many_arguments)]
use bevy::{app::PluginGroupBuilder, prelude::*}; use bevy::{
app::PluginGroupBuilder,
prelude::*,
};
use bevy_mod_picking::DefaultPickingPlugins; use bevy_mod_picking::DefaultPickingPlugins;
use bevy_web_asset::WebAssetPlugin; use bevy_web_asset::WebAssetPlugin;
use scene::ImportSceneEvent; use scene::ImportSceneEvent;
+1 -1
View File
@@ -111,7 +111,7 @@ pub struct SkyboxHolder(pub Option<Skybox>);
fn attach_skybox( fn attach_skybox(
mut cmd: Commands, mut cmd: Commands,
mut skybox_holder: ResMut<SkyboxHolder>, skybox_holder: ResMut<SkyboxHolder>,
mut q_camera: Query<Entity, (With<Camera3d>, Without<Skybox>)>, mut q_camera: Query<Entity, (With<Camera3d>, Without<Skybox>)>,
) { ) {
let Some(skybox) = skybox_holder.0.as_ref() else { let Some(skybox) = skybox_holder.0.as_ref() else {
+1 -1
View File
@@ -1,4 +1,4 @@
use bevy::render::render_graph::RenderSubGraph;
use bevy::{ use bevy::{
app::AppExit, app::AppExit,
core_pipeline::{core_3d, prepass::ViewPrepassTextures}, core_pipeline::{core_3d, prepass::ViewPrepassTextures},
+5 -8
View File
@@ -2,9 +2,7 @@ use core::fmt;
use bevy::{ use bevy::{
asset::LoadState, asset::LoadState,
core_pipeline::Skybox,
prelude::*, prelude::*,
render::render_resource::{TextureViewDescriptor, TextureViewDimension},
}; };
use crate::MainCamera; use crate::MainCamera;
@@ -38,7 +36,7 @@ struct SkyboxAssets {
env_specular: Handle<Image>, env_specular: Handle<Image>,
} }
fn load_skybox(mut cmd: Commands, assets: Res<AssetServer>, id: Res<SkyboxId>) { fn load_skybox(mut cmd: Commands, _assets: Res<AssetServer>, id: Res<SkyboxId>) {
let id = &**id; let id = &**id;
if let Ok(color) = Color::hex(id) { if let Ok(color) = Color::hex(id) {
cmd.insert_resource(ClearColor(color)); cmd.insert_resource(ClearColor(color));
@@ -47,7 +45,6 @@ fn load_skybox(mut cmd: Commands, assets: Res<AssetServer>, id: Res<SkyboxId>) {
brightness: 1.0, brightness: 1.0,
}) })
} else { } else {
let color = Color::hex("AAAAAA").unwrap(); let color = Color::hex("AAAAAA").unwrap();
cmd.insert_resource(ClearColor(color)); cmd.insert_resource(ClearColor(color));
cmd.insert_resource(AmbientLight { cmd.insert_resource(AmbientLight {
@@ -89,10 +86,10 @@ fn skybox_assets_loaded(
} }
fn spawn_skybox( fn spawn_skybox(
mut cmd: Commands, _cmd: Commands,
mut images: ResMut<Assets<Image>>, _images: ResMut<Assets<Image>>,
skybox_assets: Res<SkyboxAssets>, _skybox_assets: Res<SkyboxAssets>,
q_camera: Query<Entity, With<MainCamera>>, _q_camera: Query<Entity, With<MainCamera>>,
) { ) {
// // Configure the skybox texture as a cubemap // // Configure the skybox texture as a cubemap
// let image = images.get_mut(&skybox_assets.cubemap).unwrap(); // let image = images.get_mut(&skybox_assets.cubemap).unwrap();
-1
View File
@@ -1,5 +1,4 @@
use bevy::{ use bevy::{
a11y::accesskit::TextAlign,
diagnostic::{DiagnosticsStore, FrameTimeDiagnosticsPlugin}, diagnostic::{DiagnosticsStore, FrameTimeDiagnosticsPlugin},
prelude::*, prelude::*,
}; };
+1 -1
View File
@@ -153,7 +153,7 @@ fn take_screenshots(
src_buffer, src_buffer,
img.width(), img.width(),
img.height(), img.height(),
ColorType::Rgb8, ColorType::Rgb8.into(),
) { ) {
error!("{err}"); error!("{err}");
return; return;