According to the spec (https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#limitations):
The entire metadata BSON document MUST NOT exceed 512 bytes. This includes all BSON overhead. The client.application.name cannot exceed 128 bytes. MongoDB will return an error if these limits are not adhered to, which will result in handshake failure. Drivers MUST validate these values and truncate driver provided values if necessary. Implementors are encouraged to prioritize truncating the platform field before all others. Additionally, implementors are encouraged to place high priority information about the platform earlier in the string, in order to avoid possible truncating of those details.
We don't perform any of this truncation/validation in the driver currently, but we should as it will be a blocker for anyone who encounters it and there are no great workarounds. Note that fixing RUST-1268 is going to make it more likely users hit this issue.