make both native and browser runtime optional

This commit is contained in:
2022-02-21 22:23:52 +01:00
parent 90467f7c5b
commit 44b8656f29
7 changed files with 374 additions and 330 deletions

View File

@@ -5,8 +5,13 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
default = ["native", "browser"]
native = ["wasmtime"]
browser = ["warp", "tokio", "tokio-stream", "webbrowser"]
[dependencies]
wasmtime = "0.30"
wasmtime = { version = "0.30", optional = true }
anyhow = "1"
minifb = { version = "0.20", default-features = false, features = ["x11"] }
notify = "4"
@@ -15,7 +20,7 @@ curlywas = { git = "https://github.com/exoticorn/curlywas.git", rev = "196719b"
wat = "1"
uw8-tool = { path = "uw8-tool" }
same-file = "1"
warp = "0.3.2"
tokio = { version = "1.17.0", features = ["sync", "rt"] }
tokio-stream = { version = "0.1.8", features = ["sync"] }
webbrowser = "0.6.0"
warp = { version = "0.3.2", optional = true }
tokio = { version = "1.17.0", features = ["sync", "rt"], optional = true }
tokio-stream = { version = "0.1.8", features = ["sync"], optional = true }
webbrowser = { version = "0.6.0", optional = true }