Nonlinear model predictive control (NMPC) is a common method for optimal control where a large nonlinear optimization problem is solved to determine the next control input, allowing for accurate control at the cost of significant computation time. In this thesis, a real-time framework for NMPC is developed. The main contribution is a structure-exploiting quadratic program (QP) solver using an active-set method with low-rank updates of the Riccati factorization. This is then extended with sequential quadratic programming (SQP) to incorporate nonlinear dynamics. The resulting QP solver shows an improvement in computation time from the low-rank updates compared to standard Riccati factorization. The QP and SQP solvers achieve accuracies similar to reference implementations while achieving better performance with respect to computation time.