diff options
-rw-r--r-- | Cargo.lock | 28 | ||||
-rw-r--r-- | dhall/Cargo.toml | 9 | ||||
-rw-r--r-- | dhall/src/semantics/resolve/resolve.rs | 6 |
3 files changed, 5 insertions, 38 deletions
@@ -90,18 +90,6 @@ dependencies = [ ] [[package]] -name = "blocking" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "futures-channel 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "once_cell 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", - "waker-fn 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] name = "bumpalo" version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -172,7 +160,6 @@ version = "0.5.3" dependencies = [ "abnf_to_pest 0.5.0", "annotate-snippets 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", - "blocking 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -290,7 +277,6 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -323,7 +309,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures-io 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", - "futures-sink 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures-task 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "memchr 2.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "pin-project 0.4.22 (registry+https://github.com/rust-lang/crates.io-index)", @@ -714,11 +699,6 @@ dependencies = [ ] [[package]] -name = "parking" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1337,11 +1317,6 @@ version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "waker-fn" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] name = "walkdir" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1524,7 +1499,6 @@ dependencies = [ "checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-buffer 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dbcf92448676f82bb7a334c58bbce8b0d43580fb5362a9d608b18879d12a3d31" "checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" -"checksum blocking 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "9d17efb70ce4421e351d61aafd90c16a20fb5bfe339fcdc32a86816280e62ce0" "checksum bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" "checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" @@ -1596,7 +1570,6 @@ dependencies = [ "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)" = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" "checksum output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" -"checksum parking 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1bcaa58ee64f8e4a3d02f5d8e6ed0340eae28fed6fdabd984ad1776e3b43848a" "checksum percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" "checksum pest 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" "checksum pest_consume 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "25f219b98d6adeb806008406459357c7692f413e2dd862219e262858d70a4108" @@ -1668,7 +1641,6 @@ dependencies = [ "checksum vcpkg 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "6454029bf181f092ad1b853286f23e2c507d8e8194d01d92da4a55c274a5508c" "checksum version-sync 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382f6877399646e1b88f4b89813b4577147fa924464317378eb39c280d1e9e4c" "checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" -"checksum waker-fn 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9571542c2ce85ce642e6b58b3364da2fb53526360dfb7c211add4f5c23105ff7" "checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" "checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" "checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" 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 { |