How to communicate with a uart nmea device using a mega2560 arduino in rust?

I have a neo-7m gps module which I'm trying to read data from in rust using a mega2560 arduino.

I've plugged in txd from the module into digital pin 1 (tx0), and plugged in the rxd into digital pin 0 (rx0). I've plugged vcc into 3.3v and gnd into gnd on the arduino (of course), although I haven't plugged pps into anything, since after doing a bit of research I am fairly sure it's only used to report if the unit is working properly.

Now if I flash a blank project from the arduino ide (the new one not the legacy one), go to serial monitor and set it to 9600 baud (as the docs for the neo-7m specify) then data appears as expected (continuously and not corrupted).

Now if I then close off arduino ide leaving the same program flashed and open up another serial monitor (I'm using Serial Monitor in vs code), then after clicking start monitoring, data continues to appear as expected exactly as it did in the arduino ide.

Although if I then flash a blank project (created using cargo generate --git created in rust, then it no longer works properly. Now when I run the rust project, If I open up serial monitor in vs code exactly as I did before, then about 50% of the times I run it, about 2-3 lines of valid data are outputted and then it just stops. If I continuously restart the program using the reset button on the arduino then again, 50% of the time it outputs another 2-3 lines of valid data, but I can't seem to get any consistent results.

Not sure if it'll help but when running the arduino ide program, the tx light seems stays permanently until I open up the serial monitor, and then it continues to blink every roughly 500ms.
If I run the rust program although, then the tx light only blinks very quickly at the start about 50% of the time (which is only the times that it appears in the terminal).

From this I am sure that the arduino ide's program is doing something differently to the rust program, but I have no idea what. I'm fairly sure that I've wired up the uart communication correctly since rust is atleast outputting some valid data. I'm still suspicious that I do need to wire pps up to something, since my module already seems to have a test led on the other side.

I ended up figuring it out.

Tx from the module needed to go into the Rx pin on the arduino and Rx from the module needed to go to the Tx pin on the arduino. Not sure why it worked in the arduino ide serial monitor with tx -> tx and rx -> rx, but it did. I also had to move over to the uart1 pins (instead of uart0), since clearly the serial communication with my computer itself was interfering with what I was trying to do with the gps.