Skip to content

Commit

Permalink
Removed wee_alloc
Browse files Browse the repository at this point in the history
  • Loading branch information
urholaukkarinen committed Dec 23, 2023
1 parent e4469e4 commit f778e93
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 13 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ members = ["demo"]
egui = "0.24.1"
glam = { version = "0.24", features = ["mint"] }
mint = "0.5"

[profile.release]
opt-level = "s"
lto = "thin"
3 changes: 0 additions & 3 deletions demo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ rev="42746602ef89bcbe19a9333e8804fac2b914fe95"
[dependencies.bevy_infinite_grid]
git = "https://github.com/pcwalton/bevy_infinite_grid.git"
rev = "c752a23063b2b05163e307889eb276d6574115ab"

[target.'cfg(target_arch = "wasm32")'.dependencies]
wee_alloc = "0.4.5"
1 change: 0 additions & 1 deletion demo/build_web.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
trunk build --config Trunk.toml --release
wasm-opt -Oz ../docs/egui-gizmo-demo_bg.wasm --output ../docs/egui-gizmo-demo_bg.wasm
7 changes: 0 additions & 7 deletions demo/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ use crate::camera::{setup_camera, update_camera};

mod camera;

#[cfg(target_arch = "wasm32")]
extern crate wee_alloc;

#[cfg(target_arch = "wasm32")]
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;

const SOURCE_URL: &str = "https://github.com/urholaukkarinen/egui-gizmo/blob/main/demo/src/main.rs";

fn main() {
Expand Down
2 changes: 1 addition & 1 deletion docs/egui-gizmo-demo.js

Large diffs are not rendered by default.

Binary file modified docs/egui-gizmo-demo_bg.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<title>egui-gizmo demo</title><style>body,canvas,html{margin:0;padding:0;width:100%;height:100%;overflow:hidden;position:absolute;background:black;z-index:0}</style><link as=fetch crossorigin href=./egui-gizmo-demo_bg.wasm integrity=sha384-F6G3KEItqUAIEv8aO3PF-wpIyJqDa4gTsmYFC3pTRy51tTA_Zx__pqlgnik6vGFO rel=preload type=application/wasm><link crossorigin href=./egui-gizmo-demo.js integrity=sha384-3R6c4TAVkoLHrZZbhulNU6_dV0Yfg5wfrgHbP9V0UbhyvnILJ94hMQfGHvBvTB0W rel=modulepreload></head><body oncontextmenu="return false;"><script type=module>
<title>egui-gizmo demo</title><style>body,canvas,html{margin:0;padding:0;width:100%;height:100%;overflow:hidden;position:absolute;background:black;z-index:0}</style><link as=fetch crossorigin href=./egui-gizmo-demo_bg.wasm integrity=sha384-0_buKgG-D-8iYyCT0JFMbYOItWqv5egeNPj77alEs3OIgGY1ymr8oIyP_uIJAjWg rel=preload type=application/wasm><link crossorigin href=./egui-gizmo-demo.js integrity=sha384-GEq08pA0KdIbfWTwVDS6PwJGR-AmP8RMmOmoJt6qAU5bFo_9tAuBnHdKNm3nWr3f rel=modulepreload></head><body oncontextmenu="return false;"><script type=module>
import init, * as bindings from './egui-gizmo-demo.js';
init('./egui-gizmo-demo_bg.wasm');
window.wasmBindings = bindings;
Expand Down

0 comments on commit f778e93

Please sign in to comment.