Skip to content

Commit 365e1a9

Browse files
authored
[WASM lib] Add compiler error with instructions to build the webassembly (#2316)
1 parent 11106f0 commit 365e1a9

File tree

1 file changed

+4
-0
lines changed
  • compiler-rs/compiler-wasm-lib/src

1 file changed

+4
-0
lines changed

compiler-rs/compiler-wasm-lib/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ use anyhow::bail;
1919
use wasm_bindgen::prelude::*;
2020
use clients_schema::{Availabilities, Visibility};
2121

22+
23+
#[cfg(not(target_arch="wasm32"))]
24+
compile_error!("To build this crate use `make compiler-wasm-lib`");
25+
2226
#[wasm_bindgen]
2327
pub fn convert_schema_to_openapi(json: &str, flavor: &str) -> Result<String, String> {
2428
set_panic_hook();

0 commit comments

Comments
 (0)