If you guys aren't married already then wait until she gets her permanent residence, you don't want to mess her permanent residence, because if you do get married then she will lose her permanent residence and then you both have to apply again together which isn't easy
If you don't want to separate, you can go ahead and apply for visitor visa and if you got accepted you can come (you don't need to declare that you are coming to get married in Canada you can just say you are coming for a visit as many people advice to do so) and when you arrive to Canada you can get married (after she would have of landed and became pr) and you apply inland
Or you can stay where you are and after she lands and becomes pr she can go back and get married to you and you can apply outland
Both ways work but surely do not marry before she becomes a pr and don't get married and hide it from authorities(her landing as single if she was married) because they will know eventually and she won't be able to sponsor you and she puts her pr at risk too so be careful