Im building a small project using a nano and ethernet shield
and I found that when compiling, the ethernet library is using 50-60% of my memory.
I dont need any of the extra stuff that comes with some libraries, such as http servers
is there a small library that will give just enough for a MQTT communication to happen?
it has the enc28j60 chip. the Ethernet library can't work with it. UIPEthernet could, but it is even larger.
so your only option is the EtherCard library
You could probably save some memory by switching to a W5100 or W5500 Ethernet controller. Unlike the ENC28J60, the W5x00 has the TCP/IP stack built in. When you use the ENC28J60, the TCP/IP stack must be implemented in your Arduino's memory, which uses a lot.