Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate! macros fail when WIT files use syntax defined in the WIT book #233

Open
jvatic opened this issue Jul 18, 2024 · 0 comments
Open

Comments

@jvatic
Copy link

jvatic commented Jul 18, 2024

Given a WIT file that contains kebab-case (or otherwise uses the interface syntax defined in the WIT book):

interface hello-world {
  hello-world: func () -> result<string, string>;
}

both host and guest generate! macros fail:

  --> src/app.rs:20:1
   |
20 | / tauri_bindgen_guest_rust::generate!({
21 | |     path: "runner-gui-tauri-commands/hello-world.wit",
22 | | });
   | |__^
   |
   = help: message: called `Result::unwrap()` on an `Err` value:   × unexpected character

Instead I have to change it to not conform to the book at all (so much for syntax highlighting 🙃).

interface hello_world {
  func hello_world() -> result<string, string>
}

I'm assuming this is due to the WIT spec having changed at some point? Are there plans to conform to the most recent WIT spec? (It'd be nice to be able to specify a single WIT file with many funcs and supportive types.)

(Possible duplicate of #124)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant