summaryrefslogtreecommitdiff
path: root/cli/ops/compiler.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-05-07 20:43:27 +0200
committerGitHub <noreply@github.com>2020-05-07 20:43:27 +0200
commit2b66b8a03e4f81cc158be40d07534f26fa762c2b (patch)
treebdeb6b1e6737bd839c87e2d6d178da42d9004ca4 /cli/ops/compiler.rs
parent93cf3bd5341d5985201ea0905280082d5a3310f9 (diff)
BREAKING: Remove support for .wasm imports (#5135)
Importing .wasm files is non-standardized therefore deciding to support current functionality past 1.0 release is risky. Besides that .wasm import posed many challenges in our codebase due to complex interactions with TS compiler which spawned thread for each encountered .wasm import. This commit removes: - cli/compilers/wasm.rs - cli/compilers/wasm_wrap.js - two integration tests related to .wasm imports
Diffstat (limited to 'cli/ops/compiler.rs')
-rw-r--r--cli/ops/compiler.rs17
1 files changed, 1 insertions, 16 deletions
diff --git a/cli/ops/compiler.rs b/cli/ops/compiler.rs
index d93a0edf4..83b6d944c 100644
--- a/cli/ops/compiler.rs
+++ b/cli/ops/compiler.rs
@@ -3,7 +3,6 @@ use super::dispatch_json::Deserialize;
use super::dispatch_json::JsonOp;
use super::dispatch_json::Value;
use crate::futures::future::try_join_all;
-use crate::msg;
use crate::op_error::OpError;
use crate::state::State;
use deno_core::CoreIsolate;
@@ -125,21 +124,7 @@ fn op_fetch_source_files(
}
_ => f,
};
- // Special handling of WASM and JSON files:
- // compile them into JS first!
- // This allows TS to do correct export types as well as bundles.
- let source_code = match file.media_type {
- msg::MediaType::Wasm => {
- global_state
- .wasm_compiler
- .compile(global_state.clone(), &file)
- .await
- .map_err(|e| OpError::other(e.to_string()))?
- .code
- }
- _ => String::from_utf8(file.source_code)
- .map_err(|_| OpError::invalid_utf8())?,
- };
+ let source_code = String::from_utf8(file.source_code).map_err(|_| OpError::invalid_utf8())?;
Ok::<_, OpError>(json!({
"url": file.url.to_string(),
"filename": file.filename.to_str().unwrap(),