* add keyboard handler * some cleanup * add l key binding * Fix WASM shared memory generation for Rust nightly 2025-10-20+ Add explicit linker flags for shared memory generation after Rust PR #147225 removed automatic flags with +atomics. This fixes DataCloneError when sharing memory with workers. Changes: - Add --shared-memory, --max-memory, --import-memory flags - Export TLS symbols: __wasm_init_tls, __tls_size, __tls_align, __tls_base - Update both Cargo.toml and package.json build scripts Amp-Thread-ID: https://ampcode.com/threads/T-41d99b69-5754-4fdf-b06e-a46343fa7485 Co-authored-by: Amp <amp@ampcode.com> * add a level-editor crate * remove redundant worker setup * simplify app setup * add SceneBuilder * separate out default scene implementation in a crate * define default method for MeshBuilder --------- Co-authored-by: Amp <amp@ampcode.com>
53 lines
1.2 KiB
TOML
53 lines
1.2 KiB
TOML
cargo-features = ["profile-rustflags"]
|
|
|
|
[package]
|
|
name = "renderer"
|
|
description = "WGPU renderer core library"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[lib]
|
|
crate-type = ["cdylib", "rlib"]
|
|
|
|
[features]
|
|
default = []
|
|
atomics = []
|
|
bulk-memory = []
|
|
|
|
[profile.release]
|
|
opt-level = "z"
|
|
lto = true
|
|
|
|
[target.wasm32-unknown-unknown]
|
|
rustflags = [
|
|
"-Clink-args=--shared-memory",
|
|
"-Clink-args=--max-memory=1073741824",
|
|
"-Clink-args=--import-memory",
|
|
"-Clink-args=--export=__wasm_init_tls",
|
|
"-Clink-args=--export=__tls_size",
|
|
"-Clink-args=--export=__tls_align",
|
|
"-Clink-args=--export=__tls_base",
|
|
]
|
|
|
|
[dependencies]
|
|
wasm-bindgen = { workspace = true }
|
|
wasm-bindgen-futures = { workspace = true }
|
|
console_error_panic_hook = { workspace = true }
|
|
console_log = { workspace = true }
|
|
log = { workspace = true }
|
|
wasm-logger = { workspace = true }
|
|
web-sys = { workspace = true }
|
|
js-sys = { workspace = true }
|
|
bytemuck = { workspace = true }
|
|
cgmath = { workspace = true }
|
|
raw-window-handle = { workspace = true }
|
|
wgpu = { workspace = true }
|
|
reqwest = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
ultraviolet = { workspace = true }
|
|
futures = { workspace = true }
|
|
gltf = { workspace = true }
|
|
|
|
[package.metadata.wasm-pack.profile.release]
|
|
wasm-opt = false
|