Skip to content

[bug] HashMap always empty when passed to #[tauri::command] #6078

@bicarlsen

Description

@bicarlsen

Describe the bug

When passing a HashMap to a #[tauri::command] the contents is always empty. This seems to be the case regardless of the types associated with the HashMap. I have verified that the HashMap is correctly Serialized. I am using Yew as a front end.

Reproduction

MRE is located at https://github.com/bicarlsen/tauri-command-hashmap-mre.

Expected behavior

HashMap should arrive as was sent.

Platform and versions

Environment
› OS: Pop!_OS 22.04 X64
› Node.js: 19.4.0
› npm: 9.2.0
› pnpm: Not installed!
› yarn: Not installed!
› rustup: 1.25.1
› rustc: 1.66.0
› cargo: 1.66.0
› Rust toolchain: stable-x86_64-unknown-linux-gnu

Packages
WARNING: no lock files found, defaulting to npm
› @tauri-apps/cli [NPM]: 1.2.2
› @tauri-apps/api [NPM]: Not installed!
› tauri [RUST]: 1.2.3,
› tauri-build [RUST]: 1.2.1,
› tao [RUST]: 0.15.8,
› wry [RUST]: 0.23.4,

App
› build-type: bundle
› CSP: unset
› distDir: ../dist
› devPath: http://localhost:1420/
package.json not found

App directory structure
├─ .vscode
├─ src-tauri
├─ .git
├─ target
├─ dist
├─ public
└─ src

Stack trace

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions