oasysai / oasysdb

Hybrid vector database with flexible SQL storage engine & multi-index support.
https://docs.oasysdb.com/
Apache License 2.0
339 stars 12 forks source link

FEAT: support for wasm32 target (error due to simsimd crate) #106

Open komal-rs opened 1 month ago

komal-rs commented 1 month ago

Use case

Need target support for wasm32-unknown-unknown for developing on ICP ecosystem. Getting this error currently when building, something to do with the simsimd crate -

Caused by: Failed while trying to install all canisters.
Caused by: Failed to install wasm module to canister 'elna_db_backend'.
Caused by: Failed during wasm installation call
Caused by: The replica returned a rejection error: reject code CanisterError, reject message Error from Canister bkyz2-fmaaa-aaaaa-qaaaq-cai: Canister's Wasm module is not valid: Wasm module has an invalid import section. Module imports function 'simsimd_cos_f32' from 'env' that is not exported by the runtime..
This is likely an error with the compiler/CDK toolchain being used to build the canister. Please report the error to IC devs on the forum: https://forum.dfinity.org and include which language/CDK was used to create the canister., error code None

Here's the relevant error from above - Module imports function 'simsimd_cos_f32' from 'env' that is not exported by the runtime..

Please support wasm32-unknown-unknown as a target.

edwinkys commented 1 month ago

Hey Komal, thank you for reporting this. I think we can make simsimd crate and its functionality optional under the feature simd.

Also, I have never worked with WASM before. Could you provide more context about this matter? Like documentation to resources you're using?

komal-rs commented 1 month ago

That makes sense.

Also, I am using this as a crate to develop a canister in the ICP ecosystem. I am following their instructions like this - https://internetcomputer.org/docs/current/developer-docs/smart-contracts/advanced-features/simd

Intro docs - https://internetcomputer.org/docs/current/developer-docs/backend/rust/

But when I deploy the canister, I get the above error of simsimd_cos_f32 . Looks like it is being dynamically linked during runtime.

edwinkys commented 1 month ago

Thank you for providing the detail 😁 I will implement this optional SIMD feature in the next release.

komal-rs commented 1 week ago

@edwinkys the crate is still not wasm32-unknown-unknown compatible after this change. there are some internal dependencies which are conflicting. Requesting to make it wasm compatible. Available to offer help and support in any way possible from my side including any testing.

komal-rs commented 1 week ago

Error I get when building

oasysdb = { version = "0.7.3", default-features = false }

error[E0432]: unresolved import `crate::sys::IoSourceState`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/io_source.rs:14:5
   |
14 | use crate::sys::IoSourceState;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ no `IoSourceState` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/listener.rs:17:17
   |
17 | use crate::sys::tcp::{bind, listen, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

error[E0432]: unresolved import `crate::sys::tcp`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/stream.rs:15:17
   |
15 | use crate::sys::tcp::{connect, new_for_addr};
   |                 ^^^ could not find `tcp` in `sys`

error[E0433]: failed to resolve: could not find `Selector` in `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/poll.rs:321:18
    |
321 |             sys::Selector::new().map(|selector| Poll {
    |                  ^^^^^^^^ could not find `Selector` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:24:14
   |
24 |         sys::event::token(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:38:14
   |
38 |         sys::event::is_readable(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:43:14
   |
43 |         sys::event::is_writable(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:68:14
   |
68 |         sys::event::is_error(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:99:14
   |
99 |         sys::event::is_read_closed(&self.inner)
   |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:129:14
    |
129 |         sys::event::is_write_closed(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:151:14
    |
151 |         sys::event::is_priority(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:173:14
    |
173 |         sys::event::is_aio(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:183:14
    |
183 |         sys::event::is_lio(&self.inner)
    |              ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `event` in `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:221:26
    |
221 |                     sys::event::debug_details(f, self.0)
    |                          ^^^^^ could not find `event` in `sys`

error[E0433]: failed to resolve: could not find `tcp` in `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/listener.rs:105:18
    |
105 |             sys::tcp::accept(inner).map(|(stream, addr)| (TcpStream::from_std(stream), addr))
    |                  ^^^ could not find `tcp` in `sys`

error[E0433]: failed to resolve: could not find `udp` in `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/udp.rs:124:14
    |
124 |         sys::udp::bind(addr).map(UdpSocket::from_std)
    |              ^^^ could not find `udp` in `sys`

error[E0433]: failed to resolve: could not find `udp` in `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/udp.rs:546:14
    |
546 |         sys::udp::only_v6(&self.inner)
    |              ^^^ could not find `udp` in `sys`

error[E0412]: cannot find type `Selector` in module `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/poll.rs:272:20
    |
272 |     selector: sys::Selector,
    |                    ^^^^^^^^ not found in `sys`

error[E0412]: cannot find type `Selector` in module `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/poll.rs:728:44
    |
728 |     pub(crate) fn selector(&self) -> &sys::Selector {
    |                                            ^^^^^^^^ not found in `sys`

error[E0412]: cannot find type `Waker` in module `sys`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/waker.rs:79:17
   |
79 |     inner: sys::Waker,
   |                 ^^^^^ not found in `sys`
   |
help: consider importing one of these structs
   |
1  + use crate::Waker;
   |
1  + use std::task::Waker;
   |
help: if you import `Waker`, refer to it directly
   |
79 -     inner: sys::Waker,
79 +     inner: Waker,
   |

error[E0433]: failed to resolve: could not find `Waker` in `sys`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/waker.rs:87:14
   |
87 |         sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
   |              ^^^^^ could not find `Waker` in `sys`
   |
help: consider importing one of these structs
   |
1  + use crate::Waker;
   |
1  + use std::task::Waker;
   |
help: if you import `Waker`, refer to it directly
   |
87 -         sys::Waker::new(registry.selector(), token).map(|inner| Waker { inner })
87 +         Waker::new(registry.selector(), token).map(|inner| Waker { inner })
   |

error[E0412]: cannot find type `Event` in module `sys`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:18:17
   |
18 |     inner: sys::Event,
   |                 ^^^^^ not found in `sys`
   |
help: consider importing this struct through its public re-export
   |
1  + use crate::event::Event;
   |
help: if you import `Event`, refer to it directly
   |
18 -     inner: sys::Event,
18 +     inner: Event,
   |

error[E0412]: cannot find type `Event` in module `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:187:55
    |
187 |     pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
    |                                                       ^^^^^ not found in `sys`
    |
help: consider importing this struct through its public re-export
    |
1   + use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
187 -     pub(crate) fn from_sys_event_ref(sys_event: &sys::Event) -> &Event {
187 +     pub(crate) fn from_sys_event_ref(sys_event: &Event) -> &Event {
    |

error[E0412]: cannot find type `Event` in module `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:191:41
    |
191 |             &*(sys_event as *const sys::Event as *const Event)
    |                                         ^^^^^ not found in `sys`
    |
help: consider importing this struct through its public re-export
    |
1   + use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
191 -             &*(sys_event as *const sys::Event as *const Event)
191 +             &*(sys_event as *const Event as *const Event)
    |

error[E0412]: cannot find type `Event` in module `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/event.rs:217:46
    |
217 |             struct EventDetails<'a>(&'a sys::Event);
    |                                              ^^^^^ not found in `sys`
    |
help: consider importing this struct through its public re-export
    |
1   + use crate::event::Event;
    |
help: if you import `Event`, refer to it directly
    |
217 -             struct EventDetails<'a>(&'a sys::Event);
217 +             struct EventDetails<'a>(&'a Event);
    |

error[E0412]: cannot find type `Events` in module `sys`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/events.rs:43:17
   |
43 |     inner: sys::Events,
   |                 ^^^^^^ not found in `sys`
   |
help: consider importing this struct through its public re-export
   |
1  + use crate::Events;
   |
help: if you import `Events`, refer to it directly
   |
43 -     inner: sys::Events,
43 +     inner: Events,
   |

error[E0433]: failed to resolve: could not find `Events` in `sys`
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/events.rs:94:25
   |
94 |             inner: sys::Events::with_capacity(capacity),
   |                         ^^^^^^ could not find `Events` in `sys`
   |
help: consider importing this struct through its public re-export
   |
1  + use crate::Events;
   |
help: if you import `Events`, refer to it directly
   |
94 -             inner: sys::Events::with_capacity(capacity),
94 +             inner: Events::with_capacity(capacity),
   |

error[E0412]: cannot find type `Events` in module `sys`
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/events.rs:189:47
    |
189 |     pub(crate) fn sys(&mut self) -> &mut sys::Events {
    |                                               ^^^^^^ not found in `sys`
    |
help: consider importing this struct through its public re-export
    |
1   + use crate::Events;
    |
help: if you import `Events`, refer to it directly
    |
189 -     pub(crate) fn sys(&mut self) -> &mut sys::Events {
189 +     pub(crate) fn sys(&mut self) -> &mut Events {
    |

error[E0425]: cannot find value `listener` in this scope
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/listener.rs:76:24
   |
76 |         set_reuseaddr(&listener.inner, true)?;
   |                        ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/listener.rs:78:15
   |
78 |         bind(&listener.inner, addr)?;
   |               ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/listener.rs:79:17
   |
79 |         listen(&listener.inner, 1024)?;
   |                 ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `listener` in this scope
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/listener.rs:80:12
   |
80 |         Ok(listener)
   |            ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `stream` in this scope
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/stream.rs:95:18
   |
95 |         connect(&stream.inner, addr)?;
   |                  ^^^^^^ not found in this scope

error[E0425]: cannot find value `stream` in this scope
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/stream.rs:96:12
   |
96 |         Ok(stream)
   |            ^^^^^^ not found in this scope

error[E0425]: cannot find function `set_reuseaddr` in this scope
  --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/listener.rs:76:9
   |
76 |         set_reuseaddr(&listener.inner, true)?;
   |         ^^^^^^^^^^^^^ not found in this scope

error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/listener.rs:148:20
    |
148 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<TcpListener>`
    |
   ::: /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/io_source.rs:37:1
    |
37  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/listener.rs:157:20
    |
157 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<TcpListener>`
    |
   ::: /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/io_source.rs:37:1
    |
37  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpListener>` in the current scope
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/listener.rs:161:20
    |
161 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<TcpListener>`
    |
   ::: /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/io_source.rs:37:1
    |
37  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/listener.rs:237:9
    |
237 | /         unsafe {
238 | |             #[cfg(any(unix, target_os = "hermit", target_os = "wasi"))]
239 | |             {
240 | |                 net::TcpListener::from_raw_fd(listener.into_raw_fd())
...   |
245 | |             }
246 | |         }
    | |_________^ expected `TcpListener`, found `()`

   Compiling itoa v1.0.11
error[E0599]: no method named `register` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/stream.rs:330:20
    |
330 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<TcpStream>`
    |
   ::: /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/io_source.rs:37:1
    |
37  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/stream.rs:339:20
    |
339 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<TcpStream>`
    |
   ::: /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/io_source.rs:37:1
    |
37  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::TcpStream>` in the current scope
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/stream.rs:343:20
    |
343 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<TcpStream>`
    |
   ::: /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/io_source.rs:37:1
    |
37  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/tcp/stream.rs:419:9
    |
419 | /         unsafe {
420 | |             #[cfg(any(unix, target_os = "hermit", target_os = "wasi"))]
421 | |             {
422 | |                 net::TcpStream::from_raw_fd(stream.into_raw_fd())
...   |
427 | |             }
428 | |         }
    | |_________^ expected `TcpStream`, found `()`

error[E0599]: no method named `register` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/udp.rs:624:20
    |
624 |         self.inner.register(registry, token, interests)
    |                    ^^^^^^^^ method not found in `IoSource<UdpSocket>`
    |
   ::: /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/io_source.rs:37:1
    |
37  | pub struct IoSource<T> {
    | ---------------------- method `register` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `register`, perhaps you need to implement it
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `reregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/udp.rs:633:20
    |
633 |         self.inner.reregister(registry, token, interests)
    |                    ^^^^^^^^^^ method not found in `IoSource<UdpSocket>`
    |
   ::: /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/io_source.rs:37:1
    |
37  | pub struct IoSource<T> {
    | ---------------------- method `reregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `reregister`, perhaps you need to implement it
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0599]: no method named `deregister` found for struct `IoSource<std::net::UdpSocket>` in the current scope
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/udp.rs:637:20
    |
637 |         self.inner.deregister(registry)
    |                    ^^^^^^^^^^ method not found in `IoSource<UdpSocket>`
    |
   ::: /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/io_source.rs:37:1
    |
37  | pub struct IoSource<T> {
    | ---------------------- method `deregister` not found for this struct
    |
    = help: items from traits can only be used if the trait is implemented and in scope
note: `Source` defines an item `deregister`, perhaps you need to implement it
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/event/source.rs:75:1
    |
75  | pub trait Source {
    | ^^^^^^^^^^^^^^^^

error[E0308]: mismatched types
   --> /Users/komalsai/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mio-1.0.1/src/net/udp.rs:713:9
    |
713 | /         unsafe {
714 | |             #[cfg(any(unix, target_os = "hermit", target_os = "wasi"))]
715 | |             {
716 | |                 net::UdpSocket::from_raw_fd(socket.into_raw_fd())
...   |
721 | |             }
722 | |         }
    | |_________^ expected `UdpSocket`, found `()`
edwinkys commented 1 week ago

Hey @komal-rs Thank you for reaching out!

Based on the error message, I don't notice anything related to OasysDB. Instead, they seem to belong to a crate called Mio? Could you specify which part of OasysDB is causing this issue?

komal-rs commented 1 week ago

Yes, seems like this is an issue with mio - https://github.com/seanmonstar/reqwest/issues/1300

My understanding is oasys depends on tokio which depends on mio. Any workarounds you can think to solve it ?

komal-rs commented 1 week ago

Its being tracked here - https://github.com/tokio-rs/tokio/issues/4827

edwinkys commented 5 days ago

Hey! Apologize for the delay. Life has been very busy. OasysDB indeed depends on Tokio to allow connection to the SQL database.

I'm not quite sure if there is any work around for this version. The last thing we could do if your issue is not resolve is to fork v0.6 and remove the SIMD crate which was causing the error.