cloudflare / cloudflare/workers-rs

[Feature] Add custom build commands

Open
#647 3 comments 0 reactions 0 assignees View on GitHub
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

### Description

Custom build commands to support building on cloudflare should be something like:
```toml
build = { command = """\
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y \
&& . $HOME/.cargo/env \
&& rustup target add wasm32-unknown-unknown \
&& cargo install -q worker-build \
&& worker-build --release\
""" }
```

Note, this causes the same command to be run when using wrangler dev locally, which is a bit of a pain because you usually don't want to reinstall rustup etc. These are noops (at least in my own environment), but maybe not noops everywhere.

What I've actually done is added these to a prod environment and used that, but I'm not certain this is the right way to handle this either.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.