#Installing rustls, openssl, or imap crates on wasm

4 messages · Page 1 of 1 (latest)

tulip marten
#

I'm trying to use the imap create in a Tauri 2.0 app.

It fails on building ring, with this in Cargo.toml

[dependencies.imap]                     
version = "3.0.0-alpha.14"           
default-features = false             
features = ["rustls-tls"]

The error is really long and can be found here: https://paste.rs/XllGu

Basically ring fails on wasm, as I understand it because it requires libc, which is not a thing on wasm (but wasi).

Has anyone managed to get something like rustls or openssl running on Tauri?

jolly gorge
#

If you're using Leptos for the front end, you need to put your imap dependency in the Cargo.toml that's inside your src-tauri folder. The Leptos front end is compiled to wasm, the tauri backend is native rust code that shouldn't have any trouble compiling the imap library.

crisp gale
#

123 | None => platform::load_native_certs(), | ^^^^^^^^ use of undeclared crate or module platform