summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dhall/Cargo.toml9
-rw-r--r--dhall/src/semantics/resolve/resolve.rs6
2 files changed, 5 insertions, 10 deletions
diff --git a/dhall/Cargo.toml b/dhall/Cargo.toml
index 69b2ac8..9a30d24 100644
--- a/dhall/Cargo.toml
+++ b/dhall/Cargo.toml
@@ -13,8 +13,8 @@ include = ["src/**/*", "README.md", "build.rs"]
[dependencies]
annotate-snippets = "0.7.0"
-itertools = "0.9.0"
hex = "0.4.2"
+itertools = "0.9.0"
lazy_static = "1.4.0"
once_cell = "1.3.1"
percent-encoding = "2.1.0"
@@ -25,14 +25,11 @@ serde_cbor = "0.9.0"
sha2 = "0.9.0"
url = "2.1"
+# Reqwest needs proper async support to work on wasm. So no remote imports on
+# wasm for now.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
reqwest = { version = "0.10", features = ["blocking"] }
-[target.'cfg(target_arch = "wasm32")'.dependencies]
-# Disable native tls because hyper doesn't build on wasm
-reqwest = { version = "0.10", default-features = false }
-blocking = "0.4.3"
-
[dev-dependencies]
pretty_assertions = "0.6.1"
version-sync = "0.9"
diff --git a/dhall/src/semantics/resolve/resolve.rs b/dhall/src/semantics/resolve/resolve.rs
index fb770db..114bd9b 100644
--- a/dhall/src/semantics/resolve/resolve.rs
+++ b/dhall/src/semantics/resolve/resolve.rs
@@ -201,10 +201,8 @@ pub(crate) fn download_http_text(url: Url) -> Result<String, Error> {
Ok(reqwest::blocking::get(url).unwrap().text().unwrap())
}
#[cfg(target_arch = "wasm32")]
-pub(crate) fn download_http_text(url: Url) -> Result<String, Error> {
- blocking::block_on(async {
- Ok(reqwest::get(url).await.unwrap().text().await.unwrap())
- })
+pub(crate) fn download_http_text(_url: Url) -> Result<String, Error> {
+ panic!("Remote imports are not supported on wasm yet")
}
fn make_aslocation_uniontype() -> Expr {