Skip to content

Commit 1f67281

Browse files
committed
Allow unknown encodings
Signed-off-by: Nicholas Gates <nick@nickgates.com>
1 parent 0c4cbe1 commit 1f67281

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

vortex-web/crate/src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,15 @@
99
1010
use std::sync::LazyLock;
1111

12+
use vortex::VortexSessionDefault;
13+
use vortex::io::runtime::wasm::WasmRuntime;
14+
use vortex::io::session::RuntimeSessionExt;
1215
use vortex::session::VortexSession;
1316

1417
mod wasm;
1518

16-
static SESSION: LazyLock<VortexSession> =
17-
LazyLock::new(|| VortexSession::default().allow_unknown());
19+
static SESSION: LazyLock<VortexSession> = LazyLock::new(|| {
20+
VortexSession::default()
21+
.with_handle(WasmRuntime::handle())
22+
.allow_unknown()
23+
});

vortex-web/crate/src/wasm.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use futures::FutureExt;
1818
use futures::TryStreamExt;
1919
use futures::future::BoxFuture;
2020
use serde::Serialize;
21-
use vortex::VortexSessionDefault;
2221
use vortex::array::ArrayRef;
2322
use vortex::array::LEGACY_SESSION;
2423
use vortex::array::VortexSessionExecute;
@@ -35,8 +34,6 @@ use vortex::file::VERSION;
3534
use vortex::file::VortexFile;
3635
use vortex::io::CoalesceConfig;
3736
use vortex::io::VortexReadAt;
38-
use vortex::io::runtime::wasm::WasmRuntime;
39-
use vortex::io::session::RuntimeSessionExt;
4037
use vortex::layout::LayoutChildType;
4138
use vortex::layout::LayoutRef;
4239
use vortex::layout::layouts::flat::Flat;
@@ -46,6 +43,8 @@ use vortex::session::registry::ReadContext;
4643
use wasm_bindgen::prelude::*;
4744
use wasm_bindgen_futures::JsFuture;
4845

46+
use crate::SESSION;
47+
4948
/// Initialize the WASM module (sets up panic hook for better error messages).
5049
#[wasm_bindgen(start)]
5150
pub fn init() {

0 commit comments

Comments
 (0)