src | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE-APACHE | ||
LICENSE-MIT | ||
README.md |
A quick demo of running an axum
application as a CGI script!
This project uses the dumb_cgi
crate to do its job, thereby proving that dumbness is sometimes good.
Usage
This project can be compiled normally, but it might be better to statically link it for greater compatiblity with more servers (not all CGI servers are running the latest hardware, after all):
RUSTFLAGS='-C target-feature=+crt-static' cargo build --release
Due to problems with statically linking some libraries,
you might have to manually specify the platform for
x86_64-unknown-linux-gnu
if that's what you're building
for:
RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --target x86_64-unknown-linux-gnu
After this, copy the resulting target/release/axumcgi
file to cgi-bin
on your server and start using it!
(Note: you may have to rename the binary to something
like axumcgi.cgi
or less redundantly axum.cgi
to
make it work)
License
This project is licensed under either of
at your option.