cloudflare / cloudflare/workers-rs
[BUG] No loader is configured for ".rs" files: src/lib.rs
- Dominant language
- Rust
- Stars
- 3.7k
- Forks
- 429
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### What version of `workers-rs` are you using?
0.0.11
### Describe the bug
I got error when creating Cloudflare Worker (followed by command lines in README.md):
```bash
[INFO]: Installing wasm-bindgen...
[INFO]: Optimizing wasm binaries with `wasm-opt`...
[INFO]: Optional fields missing from Cargo.toml: 'description', 'repository', and 'license'. These are not necessary, but recommended
[INFO]: :-) Done in 35.83s
[INFO]: :-) Your wasm pkg is ready to publish at /home/kimyvgy/project_name/build.
shim.mjs 20.3kb
✘ [ERROR] No loader is configured for ".rs" files: src/lib.rs
✘ [ERROR] Build failed with 1 error:
error: No loader is configured for ".rs" files: src/lib.rs
If you think this is a bug then please create an issue at https://github.com/cloudflare/wrangler2/issues/new/choose
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
```
### Steps To Reproduce
1. Initialize worker with NPM
```bash
npm init cloudflare project_name worker-rust
cd project_name
```
2. Check wrangler version
```bash
yarn install
npx wrangler --version
⛅️ wrangler 2.1.6
```
3. Start worker
```bash
yarn dev
```
The error will show.
Contributor guide
Assessment
This issue has not been assessed yet.