Hello! I encountered several compilation errors when trying to run trunk serve --open in the graphrag-wasm directory. It seems recent updates to graphrag-core have broken the WebAssembly build.
Environment:
OS: Windows
Rust version: 1.93.1
Command: trunk serve --open
Error Summary:
First, the tracing and tokio crates are unresolved in multiple files like gleaning_extractor.rs and chunking_strategies.rs. It looks like they might be missing from Cargo.toml or lack the proper cfg attributes for the wasm target.
Second, tokio::runtime::Runtime::new is being called, which fails to compile or run in a WebAssembly environment since the standard tokio multithreading runtime is not supported in Wasm.
Third, there are mismatched struct initializations. The Relationship struct is missing fields like causal_strength and temporal_range, and the RetrievalSystem instance is missing the parallel_processor field.
Fourth, in src/lib.rs around line 1062, the synchronous ask function attempts to use the question mark operator on the query_internal Future, causing a sync and async mismatch.
Steps to reproduce:
Navigate to the graphrag-wasm directory.
Run trunk serve --open.
Could you please take a look at making the core library compatible with the wasm target again? Thank you!
Hello! I encountered several compilation errors when trying to run trunk serve --open in the graphrag-wasm directory. It seems recent updates to graphrag-core have broken the WebAssembly build.
Environment:
OS: Windows
Rust version: 1.93.1
Command: trunk serve --open
Error Summary:
First, the tracing and tokio crates are unresolved in multiple files like gleaning_extractor.rs and chunking_strategies.rs. It looks like they might be missing from Cargo.toml or lack the proper cfg attributes for the wasm target.
Second, tokio::runtime::Runtime::new is being called, which fails to compile or run in a WebAssembly environment since the standard tokio multithreading runtime is not supported in Wasm.
Third, there are mismatched struct initializations. The Relationship struct is missing fields like causal_strength and temporal_range, and the RetrievalSystem instance is missing the parallel_processor field.
Fourth, in src/lib.rs around line 1062, the synchronous ask function attempts to use the question mark operator on the query_internal Future, causing a sync and async mismatch.
Steps to reproduce:
Navigate to the graphrag-wasm directory.
Run trunk serve --open.
Could you please take a look at making the core library compatible with the wasm target again? Thank you!