golem icon indicating copy to clipboard operation
golem copied to clipboard

worker bindgen doesn't work on windows

Open ambition-consulting opened this issue 5 months ago • 1 comments

https://github.com/golemcloud/golem/blob/bcb2be9f59ca11fcef796a1f3dd818ebaab76d8b/golem-worker-executor-base/build.rs#L46

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

ambition-consulting avatar Sep 01 '24 20:09 ambition-consulting