git clone https://github.com/studersi/rust-test-apache.git
cd rust-test-apache
- Download Apache httpd
wget -P downloads/ https://downloads.apache.org/httpd/httpd-2.4.46.tar.gz
tar -xvf downloads/httpd-2.4.46.tar.gz -C downloads/
- Download APR
wget -P downloads/ https://downloads.apache.org/apr/apr-1.7.0.tar.gz
tar -xvf downloads/apr-1.7.0.tar.gz -C downloads/
- Build container
docker build -t rust-apache .
- Run container
docker run -it -v "$(pwd):/home/rustacian" rust-apache
- Build module
apxs -a -c mod_example.c
- Update
wrapper.h
grep "#include.*.h" mod_example.c | sed 's/[<>]/"/g' > mod_rs/wrapper.h
- Build Rust project
cd mod_rs
cargo build