This is a rust port of Mikael Persson's lambdatwist-p3p c++ code. (https://github.com/midjji/lambdatwist-p3p) If you use this, you should probably cite that paper, since its basically a clone of that code.
@inproceedings{persson2018lambda,
title={Lambda twist: An accurate fast robust perspective three point (P3P) solver},
author={Persson, Mikael and Nordberg, Klas},
booktitle={Proceedings of the European conference on computer vision (ECCV)},
pages={318--332},
year={2018}
}