Disclaimer: not really REST, but writing HTTP-controlled made the title too long.
TL;DR
When compiled with CGO_ENABLED=0
, this code produces a static binary file that can be uploaded to a server and run.
CPU burn can be started by requesting /start_cpu
and stopped by requesting /stop_cpu
.