Next.js Discord

Discord Forum

Hosting a Rust Backend on Vercel

Unanswered
Cape May Warbler posted this in #help-forum
Open in Discord
Cape May WarblerOP
So, a couple of things:
1. is this allowed? I check vercel's TOS and it doesn't seem prohibited..
2. How can I install rust!? I've tried:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; . "$HOME/.cargo/env"; npm install; npm run prod; 


However, this still says that cargo isn't a recognized command. is there a better way to do this?

5 Replies

Cape May WarblerOP
By the way, I have an Axum project that I'm trying to host
Cape May WarblerOP
update, this is sort of working

install command:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y; npm install; npm run prod;

build command:
$HOME/.cargo/bin/cargo build --release
now the issue is getting vercel to actually run the compiled file
Cape May WarblerOP
thanks for the help everyone /s