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

worker bindgen doesn't work on windows #843

Closed
ambition-consulting opened this issue Sep 1, 2024 · 1 comment
Closed

worker bindgen doesn't work on windows #843

ambition-consulting opened this issue Sep 1, 2024 · 1 comment
Labels
bug Something isn't working build-ci Build and CI related tasks

Comments

@ambition-consulting
Copy link

path: "{golem_wit_path}/wit",

maybe escape windows patch backslashes with double backslash? https://doc.rust-lang.org/reference/tokens.html#ascii-escapes

error: unknown character escape: `U`                                                                                                                                                                                                                                                                                                                                                        
 --> C:\Users\John\work\src\rust\golem\target\debug\build\golem-worker-executor-base-2c82c333bd98c16e\out/preview2_mod.rs:2:19
  |
2 |         path: "C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |                   ^ unknown character escape
  |
  = help: for more information, visit <https://doc.rust-lang.org/reference/tokens.html#literals>
help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal
  |
2 |         path: r"C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: unknown character escape: `J`                                                                                                                                                                                                                                                                                                                                                        
 --> C:\Users\John\work\src\rust\golem\target\debug\build\golem-worker-executor-base-2c82c333bd98c16e\out/preview2_mod.rs:2:25
  |
2 |         path: "C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |                         ^ unknown character escape
  |
  = help: for more information, visit <https://doc.rust-lang.org/reference/tokens.html#literals>
help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal
  |
2 |         path: r"C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: unknown character escape: `.`
 --> C:\Users\John\work\src\rust\golem\target\debug\build\golem-worker-executor-base-2c82c333bd98c16e\out/preview2_mod.rs:2:30
  |
2 |         path: "C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |                              ^ unknown character escape
  |
  = help: for more information, visit <https://doc.rust-lang.org/reference/tokens.html#literals>
help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal
  |
2 |         path: r"C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: unknown character escape: `s`
 --> C:\Users\John\work\src\rust\golem\target\debug\build\golem-worker-executor-base-2c82c333bd98c16e\out/preview2_mod.rs:2:46
  |
2 |         path: "C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |                                              ^ unknown character escape
  |
  = help: for more information, visit <https://doc.rust-lang.org/reference/tokens.html#literals>
help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal
  |
2 |         path: r"C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: unknown character escape: `i`
 --> C:\Users\John\work\src\rust\golem\target\debug\build\golem-worker-executor-base-2c82c333bd98c16e\out/preview2_mod.rs:2:50
  |
2 |         path: "C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |                                                  ^ unknown character escape
  |
  = help: for more information, visit <https://doc.rust-lang.org/reference/tokens.html#literals>
help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal
  |
2 |         path: r"C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: unknown character escape: `g`
 --> C:\Users\John\work\src\rust\golem\target\debug\build\golem-worker-executor-base-2c82c333bd98c16e\out/preview2_mod.rs:2:83
  |
2 |         path: "C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |                                                                                   ^ unknown character escape
  |
  = help: for more information, visit <https://doc.rust-lang.org/reference/tokens.html#literals>
help: if you meant to write a literal backslash (perhaps escaping in a regular expression), consider a raw string literal
  |
2 |         path: r"C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
  |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

error: proc macro panicked
  --> C:\Users\John\work\src\rust\golem\target\debug\build\golem-worker-executor-base-2c82c333bd98c16e\out/preview2_mod.rs:1:1
   |
1  | / wasmtime::component::bindgen!({
2  | |         path: "C:\Users\John\.cargo\registry\src\index.crates.io-6f17d22bba15001f\golem-wit-1.0.0/wit",
3  | |         interfaces: "
4  | |           import golem:api/[email protected];
...  |
34 | |         skip_mut_forwarding_impls: true,
35 | |     });
   | |______^
   |
   = help: message: unexpected byte 'U' after \ character in string literal

@vigoo vigoo added bug Something isn't working build-ci Build and CI related tasks labels Sep 9, 2024
@vigoo
Copy link
Contributor

vigoo commented Dec 6, 2024

This is fixed now

@vigoo vigoo closed this as completed Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build-ci Build and CI related tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@vigoo @ambition-consulting and others