This repository compiles a simple SGP4 example (see src/main.rs) in no-std mode to illustrate the use of the library in no-std environments. No-std is typically required on microcontrollers that do not have a full operating system. On machines that do have an operating system, no-std can help reduce the compiled program size at the cost of portability, program safety, and code simplicity.
Only Linux x86-64 is supported, but Docker can be used to run this on a different operating system.
Tested on a x86-64 host with a Docker container based on nightly 2024-05-26. This may fail on an ARM host if the default Docker machine is ARM as well. Future Rust versions may break the program as well.
Run the commands in Dockerfile to build the program without Docker.
docker build . -t sgp4
docker run -t sgp4 './target/release/main'
Run the program with gdb to catch segfaults.
docker run -it sgp4
gdb ./target/release/main
run
Extract the executable from the container. A disassembler such as https://cutter.re can be used to inspect the compiled binary.
docker cp $(docker ps -n 1 --format json | jq -r '.ID'):/sgp4/target/release/main main