Skip to content

Testing of client&server-side Rust interaction #217

@JohnScience

Description

@JohnScience

Hi, I have a Tauri app where the frontend is written using wasm_bindgen and built with wasm_pack. This means that I have Rust both on the frontend (with HTML&CSS) and on the backend.

For best performance of transmission of large arrays, I have to use tauri::Builder::register_uri_scheme_protocol() as suggested in this issue.

I want to ensure that the data that I encode as Vec<u8> body on the backend can be correctly decoded on the frontend with ReadableStreamDefaultReader ( MDN | web_sys ) and ReadableStreamBYOBReader ( MDN | web_sys ), if the latter is available.

Can I somehow leverage fantoccini for this purpose? The great challenge is that the Rust for the frontend and for the backend is compiled for different compile targets.

Essentially, I would like to mock the connection to a server and provide immediately-loaded Rust. I believe that it's almost certainly too much of a request for too much of a niche problem but I acknowledge that it would be useful for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions