Skip to content

Commit

Permalink
[WASM lib] Add compiler error with instructions to build the webassembly
Browse files Browse the repository at this point in the history
  • Loading branch information
Anaethelion committed Oct 23, 2023
1 parent 11106f0 commit 43fa66c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler-rs/compiler-wasm-lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ use anyhow::bail;
use wasm_bindgen::prelude::*;
use clients_schema::{Availabilities, Visibility};


#[cfg(not(target_arch="wasm32"))]
compile_error!("To build this crate use `make compiler-wasm-lib`");

#[wasm_bindgen]
pub fn convert_schema_to_openapi(json: &str, flavor: &str) -> Result<String, String> {
set_panic_hook();
Expand Down

0 comments on commit 43fa66c

Please sign in to comment.