Commit: 6de495d
Parent: 77df082

WASM Build!

Mårten Åsberg committed on 2026-04-20 at 10:35
Cargo.lock +0 -14
diff --git a/Cargo.lock b/Cargo.lock
index b55df38..ba209e5 100644
@@ -1859,17 +1859,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "chacha20"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601"
dependencies = [
"cfg-if",
"cpufeatures",
"rand_core 0.10.1",
]
[[package]]
name = "clang-sys"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2581,7 +2570,6 @@ dependencies = [
"cfg-if",
"libc",
"r-efi 6.0.0",
"rand_core 0.10.1",
"wasip2",
"wasip3",
]
@@ -4052,8 +4040,6 @@ version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207"
dependencies = [
"chacha20",
"getrandom 0.4.2",
"rand_core 0.10.1",
]
Cargo.toml +7 -1
diff --git a/Cargo.toml b/Cargo.toml
index 8fdd36b..eff74b1 100644
@@ -5,7 +5,7 @@ edition = "2024"
[dependencies]
bevy = { version = "0.18.1", features = ["debug"] }
rand = "0.10.1"
rand = { version = "0.10.1", default-features = false }
rand_chacha = "0.10.0"
[profile.dev]
@@ -13,3 +13,9 @@ opt-level = 1
[profile.dev.package."*"]
opt-level = 3
[profile.wasm-release]
inherits = 'release'
opt-level = 'z'
lto = true
codegen-units = 1
README.md +2 -0
diff --git a/README.md b/README.md
index 01d0419..171e99e 100644
@@ -1,3 +1,5 @@
# Bunny Herding
Try it at [åsberg.net/bunny-herding](https://xn--sberg-lra.net/bunny-herding/)!
![Screenshot of game](./docs/screenshot.png)
wasm/index.html +22 -0
diff --git a/wasm/index.html b/wasm/index.html
new file mode 100644
index 0000000..4ec0e15
@@ -0,0 +1,22 @@
<!doctype html>
<html lang="en">
<head>
<base href="/bunny-herding/" />
</head>
<body style="margin: 0px">
<script type="module">
import init from "./bevy_game.js";
init().catch((error) => {
if (
!error.message.startsWith(
"Using exceptions for control flow, don't mind me. This isn't actually an error!",
)
) {
throw error;
}
});
</script>
</body>
</html>