Skip to content

Commit

Permalink
fix: fix feature flag for wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
eitsupi committed Dec 29, 2024
1 parent 574a600 commit 14b234c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Makevars.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ $(STATLIB):
cargo build $(CARGO_BUILD_ARGS); \
else \
sed -E -i \
-e 's/^\s*"json",$$/"serde_json",/' \
-e "/^\s*\"($(WASM_INCOMPATIBLE_FEATURES))\",$$/d" \
./rust/Cargo.toml && \
export CC="$(CC)" && \
Expand Down
2 changes: 2 additions & 0 deletions src/rust/src/conversion/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,8 @@ pub(crate) fn parse_cloud_options(
Ok(out)
}

// TODO: Refactor with adding `parquet` feature as like Python Polars
#[cfg(not(target_arch = "wasm32"))]
impl TryFrom<&str> for Wrap<ParallelStrategy> {
type Error = String;

Expand Down
2 changes: 2 additions & 0 deletions src/rust/src/expr/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ impl PlRExpr {
.into())
}

// TODO: Refactor with adding `extract_jsonpath` feature as like Python Polars
#[cfg(not(target_arch = "wasm32"))]
fn str_json_path_match(&self, pat: &PlRExpr) -> Result<Self> {
Ok(self
.inner
Expand Down
2 changes: 2 additions & 0 deletions src/rust/src/expr/struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ impl PlRExpr {
.into())
}

// TODO: Refactor with adding `json` feature as like Python Polars
#[cfg(not(target_arch = "wasm32"))]
fn struct_json_encode(&self) -> Result<Self> {
Ok(self.inner.clone().struct_().json_encode().into())
}
Expand Down
4 changes: 4 additions & 0 deletions src/rust/src/lazyframe/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,8 @@ impl PlRLazyFrame {
Ok(r.finish().map_err(RPolarsErr::from)?.into())
}

// TODO: Refactor with adding `parquet` feature as like Python Polars
#[cfg(not(target_arch = "wasm32"))]
fn new_from_parquet(
source: StringSexp,
cache: bool,
Expand Down Expand Up @@ -565,6 +567,8 @@ impl PlRLazyFrame {
Ok(lf.into())
}

// TODO: Refactor with adding `json` feature as like Python Polars
#[cfg(not(target_arch = "wasm32"))]
fn new_from_ndjson(
source: StringSexp,
low_memory: bool,
Expand Down

0 comments on commit 14b234c

Please sign in to comment.