Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement attribute index for wasm build #12

Merged
merged 3 commits into from
Feb 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/rust/bst/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ chrono = { workspace = true }
ordered-float = { workspace = true }
once_cell = { workspace = true }
packed_rtree = { path = "../packed_rtree", optional = true }

[target.'cfg(feature = "http")'.dependencies]
packed_rtree = { path = "../packed_rtree" }
2 changes: 1 addition & 1 deletion src/rust/fcb_core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod cj_utils;
mod const_vars;
mod error;
mod fb;
pub mod fb;
#[allow(dead_code, unused_imports, clippy::all, warnings)]
#[cfg(feature = "http")]
#[cfg(feature = "wasm")]
Expand Down
5 changes: 2 additions & 3 deletions src/rust/fcb_core/src/reader/attr_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use anyhow::{anyhow, Ok, Result};
pub use bst::*;

use chrono::{DateTime, Utc};
use ordered_float::OrderedFloat;

use crate::{AttributeIndex, Column, ColumnType, FeatureOffset};

Expand All @@ -15,7 +14,7 @@ use super::{

pub type AttrQuery = Vec<(String, Operator, ByteSerializableValue)>;

pub(crate) fn process_attr_index_entry<R: Read>(
pub fn process_attr_index_entry<R: Read>(
reader: &mut R,
multi_index: &mut MultiIndex,
columns: &[Column],
Expand Down Expand Up @@ -86,7 +85,7 @@ fn byte_serializable_to_bytes(value: &ByteSerializableValue) -> Vec<u8> {
}
}

pub(crate) fn build_query(query: &AttrQuery) -> Query {
pub fn build_query(query: &AttrQuery) -> Query {
Query {
conditions: query
.iter()
Expand Down
2 changes: 1 addition & 1 deletion src/rust/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ build-fcb_core:

.PHONY: wasm-build
wasm-build:
cd wasm && wasm-pack build --target web --debug --out-dir ../ts
cd wasm && wasm-pack build --target web --debug --out-dir ../../ts
# cargo build --target web --release
2 changes: 2 additions & 0 deletions src/rust/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ async-trait = { workspace = true, default-features = false }
console_error_panic_hook = { workspace = true }
console_log = { workspace = true }
log = { workspace = true }
bst = { path = "../bst" }
chrono = { workspace = true }
Loading