-
Notifications
You must be signed in to change notification settings - Fork 279
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
Hello World example #39
Comments
Hi @toinbis - The project generated with I'll double check the README examples for completeness - they could be missing something. Those aren't really meant to be copy/pasted but I suppose if we put any code out there it should work 😄 |
Just in case it's helpful — I had to update Rust to 1.55 using |
Thanks, @StephenHaney, do you recall which version you upgrade from? I don't think 1.55 is the minimum required, but I could be wrong. I tend to stay on the latest version available - but recognize not everyone does! |
Looks like I was on 1.49... I'm not a regular rust user (yet!), so I was a bit behind. It was throwing syntax errors in Also, related to getting the example project to deploy... on Mac ARM CPU, wasm-pack doesn't work ( From what I was reading, it sounds like wasm-pack just needs to release its newest merged code before that'll start working automatically on M1 CPUs (unconfirmed, just what I read). Once I figured those two bits out, I was able to |
Ah, that would explain it -- there are some features we use that are ahead of that release. We're still trying to determine the minimum version required, and it's probably around 1.53. Anyway, glad its working now! Yea the M1 support is a little tricky with the dependencies we don't control.. and I haven't determined a way to just tell wasm-pack to install an x86 binary and let Rosetta2 do it's thing if we detect an M1 system. |
I think this is mostly resolved from the recommendation to upgrade rust versions. I will do another pass though ASAP to ensure everything we publish is buildable. Thanks! |
Sure thing - we'll get some more examples up ASAP. |
Hi @nilslice any update on the examples? :) |
Hi @TRomesh - I just returned from vacation and getting back into the swing of things, but it's definitely on my list. In the meantime, take a look at the |
Current examples in https://github.com/cloudflare/workers-rs/blame/main/README.md#L9, https://blog.cloudflare.com/workers-rust-sdk/ and project generated by
wrangler generate --type=rust
all provide some advanced usage of using router, console_log, DO, POST handling. None of them worked out of the box for me.For those whose just start out, like me, would it be possible to provide and example worker that just returns
Hello world
string so we could start from there? Thanks a lot!The text was updated successfully, but these errors were encountered: