diff --git a/.cargo/config.toml b/.cargo/config.toml
new file mode 100644
index 0000000..2846269
--- /dev/null
+++ b/.cargo/config.toml
@@ -0,0 +1,9 @@
+
+[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))']
+rustflags = ["-C", "target-feature=+avx"]
+
+[target.wasm32-unknown-unknown]
+rustflags = ["--cfg=web_sys_unstable_apis"]
+
+[alias]
+run-wasm = "run --release --package run-wasm --"
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 0445f2c..d20463b 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -38,7 +38,7 @@ jobs:
cargo build --workspace --all-targets
- name: Run tests
run: |
- cargo test --workspace --all-targets
+ cargo test --workspace --all-targets --exclude benches
check:
name: Rustfmt & Clippy
diff --git a/Cargo.toml b/Cargo.toml
index aae69eb..6f51291 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,6 +3,7 @@ resolver = "2"
members = [
"crates/*",
"crates/*/macros",
+ "run-wasm",
"benches"
]
default-members = [
@@ -18,14 +19,42 @@ edition = "2024"
rust-version = "1.86"
[workspace.dependencies]
+glam = "0.30"
+serde = "1.0"
+raw-window-handle = "0.6"
slotmap = "1.0"
+thiserror = "2.0"
+tracing = "0.1"
+bitflags = "2.9"
fnv = "1.0"
+radsort = "0.1"
+bytemuck = "1.22"
+blink-alloc = "0.3"
+dynsequence = { version = "0.1.0-alpha.4" }
+blocking = "1.6"
threadpool = "1.8"
backtrace = "0.3"
+gametime = "0.5"
atomic_refcell = "0.1"
+palette = { version = "0.7", default-features = false }
+image = { version = "0.25", default-features = false }
+encase = { version = "0.11", features = ["glam"], default-features = false }
+encase_derive_impl = { version = "0.11" }
crossbeam-utils = "0.8"
+crossbeam-queue = "0.3"
+tracing-subscriber = { version = "0.3", features = ["env-filter"] }
+tracing-wasm = "0.2"
+tracing-log = "0.2"
+console_error_panic_hook = "0.1"
+wasm-bindgen = "0.2"
+wasm-bindgen-futures = "0.4"
+js-sys = "0.3"
+web-sys = "0.3"
+ndk = "0.9"
+ndk-glue = "0.7"
darling = "0.20"
proc-macro2 = "1.0"
syn = "2.0"
quote = "1.0"
proc-macro-crate = "3.3"
+
diff --git a/crates/assets-loader/CHANGELOG.md b/crates/assets-loader/CHANGELOG.md
new file mode 100644
index 0000000..fa542aa
--- /dev/null
+++ b/crates/assets-loader/CHANGELOG.md
@@ -0,0 +1,6 @@
+# `pulz-assets-loader` Changelog
+All notable changes to this crate will be documented in this file.
+
+## Unreleased (DATE)
+
+ * Initial version
diff --git a/crates/assets-loader/Cargo.toml b/crates/assets-loader/Cargo.toml
new file mode 100644
index 0000000..ae3ddc8
--- /dev/null
+++ b/crates/assets-loader/Cargo.toml
@@ -0,0 +1,24 @@
+[package]
+name = "pulz-assets-loader"
+version.workspace = true
+authors.workspace = true
+license.workspace = true
+edition.workspace = true
+repository.workspace = true
+readme = "README.md"
+
+[dependencies]
+pulz-ecs = { path = "../ecs" }
+pulz-assets = { path = "../assets" }
+
+[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
+blocking = { workspace = true }
+
+[target.'cfg(target_arch = "wasm32")'.dependencies]
+wasm-bindgen = { workspace = true }
+wasm-bindgen-futures = { workspace = true }
+js-sys = { workspace = true }
+web-sys = { workspace = true, features = [ 'Request', 'Response', "Window", ]}
+
+[target.'cfg(target_os = "android")'.dependencies]
+ndk = { workspace = true }
diff --git a/crates/assets-loader/README.md b/crates/assets-loader/README.md
new file mode 100644
index 0000000..ad064fe
--- /dev/null
+++ b/crates/assets-loader/README.md
@@ -0,0 +1,34 @@
+# `pulz-assets-loader`
+
+
+
+[](https://crates.io/crates/pulz-assets-loader)
+[](https://docs.rs/pulz-assets-loader/)
+[](#license)
+[](https://github.com/HellButcher/pulz/actions/workflows/rust.yml)
+
+
+**TODO**
+
+## Example
+
+
+**TODO**
+
+## License
+
+[license]: #license
+
+This project is licensed under either of
+
+* MIT license ([LICENSE-MIT] or )
+* Apache License, Version 2.0, ([LICENSE-APACHE] or )
+
+at your option.
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
+dual licensed as above, without any additional terms or conditions.
+
+[LICENSE-MIT]: ../../LICENSE-MIT
+[LICENSE-APACHE]: ../../LICENSE-APACHE
diff --git a/crates/assets-loader/src/lib.rs b/crates/assets-loader/src/lib.rs
new file mode 100644
index 0000000..6c57fe1
--- /dev/null
+++ b/crates/assets-loader/src/lib.rs
@@ -0,0 +1,165 @@
+#![warn(
+ // missing_docs,
+ // rustdoc::missing_doc_code_examples,
+ future_incompatible,
+ rust_2018_idioms,
+ unused,
+ trivial_casts,
+ trivial_numeric_casts,
+ unused_lifetimes,
+ unused_qualifications,
+ unused_crate_dependencies,
+ clippy::cargo,
+ clippy::multiple_crate_versions,
+ clippy::empty_line_after_outer_attr,
+ clippy::fallible_impl_from,
+ clippy::redundant_pub_crate,
+ clippy::use_self,
+ clippy::suspicious_operation_groupings,
+ clippy::useless_let_if_seq,
+ // clippy::missing_errors_doc,
+ // clippy::missing_panics_doc,
+ clippy::wildcard_imports
+)]
+#![doc(html_logo_url = "https://raw.githubusercontent.com/HellButcher/pulz/master/docs/logo.png")]
+#![doc(html_no_source)]
+#![doc = include_str!("../README.md")]
+
+use std::{future::Future, io::Cursor};
+
+use path::{AssetPath, AssetPathBuf};
+use platform::AssetOpen;
+
+pub mod path;
+pub mod platform;
+
+pub trait LoadAsset {
+ type Future: Future