© 2026 Hedgehog Software, LLC
postinstall
sh: 1: cargo: not found
source $HOME/.cargo/env
/bin/sh: 1: source: not found
import { execSync } from 'node:child_process'; if (process.env.CF_PAGES !== '1') { console.log('Skipping Rust setup: Not on Cloudflare Pages CI.'); process.exit(0); } console.log('Setting up Rust toolchain...'); execSync('curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none', { stdio: 'inherit', }); process.env.PATH = `${process.env.PATH}:${process.env.HOME}/.cargo/bin`; // TODO: https://github.com/rust-lang/rustup/issues/2686 use rustup ensure to sync with rust-toolchain.toml execSync('rustup install nightly', { stdio: 'inherit' }); console.log('Rust toolchain setup successfully!'); execSync('cargo install cargo-component', { stdio: 'inherit' }); console.log('cargo-component installed successfully!');