I left this here so it could apply for rust and foreign functions alike.