Skip to content

Commit

Permalink
[WASM lib] Add compiler error with instructions to build the webassem…
Browse files Browse the repository at this point in the history
…bly (#2316)
  • Loading branch information
Anaethelion authored Oct 23, 2023
1 parent 11106f0 commit 365e1a9
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 365e1a9

Please sign in to comment.