Basic window and wasm support

This commit is contained in:
Guilherme Werner
2024-02-16 19:23:56 -03:00
parent 47f2244d1d
commit feae6c0d9d
6 changed files with 112 additions and 2 deletions

View File

@ -9,7 +9,7 @@ publish = false
[lib]
name = "renderer"
crate-type = ["rlib"]
crate-type = ["cdylib", "rlib"]
path = "src/lib.rs"
[[bin]]
@ -17,3 +17,16 @@ name = "renderer"
path = "src/main.rs"
[dependencies]
cfg-if = "1"
env_logger = "0.10"
log = "0.4"
wgpu = "0.18"
winit = "0.28"
[target.'cfg(target_arch = "wasm32")'.dependencies]
console_error_panic_hook = "0.1.6"
console_log = "1.0"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4.30"
web-sys = { version = "0.3", features = ["Document", "Window", "Element"] }
wgpu = { version = "0.18", features = ["webgl"] }