Skip to content

Commit

Permalink
build: Compile prql-js for wasm only (#3115)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty authored Jul 26, 2023
1 parent 57946ce commit 71bd470
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bindings/prql-js/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test = false
[features]
default = ["console_error_panic_hook"]

[dependencies]
[target.'cfg(target_family="wasm")'.dependencies]
prql-compiler = {path = "../../crates/prql-compiler", default-features = false}
wasm-bindgen = "0.2.87"

Expand All @@ -31,7 +31,7 @@ wasm-bindgen = "0.2.87"
# code size when deploying.
console_error_panic_hook = {version = "0.1.7", optional = true}

[dev-dependencies]
[target.'cfg(target_family="wasm")'.dev-dependencies]
wasm-bindgen-test = "0.3.30"

[package.metadata.cargo-udeps.ignore]
Expand Down
2 changes: 2 additions & 0 deletions bindings/prql-js/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg(target_family = "wasm")]

mod utils;

use std::str::FromStr;
Expand Down
4 changes: 2 additions & 2 deletions crates/prql-compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ test-dbs = ["duckdb", "rusqlite", "tokio"]
test-dbs-external = ["chrono", "duckdb", "mysql", "pg_bigdecimal", "postgres", "rusqlite", "tiberius", "tokio", "tokio-util"]

[dependencies]
prql-ast = {path = "../prql-ast", version = "0.9.2" }
prql-parser = {path = "../prql-parser", version = "0.9.2" }
prql-ast = {path = "../prql-ast", version = "0.9.2"}
prql-parser = {path = "../prql-parser", version = "0.9.2"}

anstream = {version = "0.3.2", features = ["auto"]}
anyhow = {version = "1.0.57", features = ["backtrace"]}
Expand Down

0 comments on commit 71bd470

Please sign in to comment.