Taiwan should learn a lesson from Ukraine. It makes no sense to go to war against a neighboring nation trusting on support from people thousands of miles away. Do any deals locally, that's the best way to survive.
Ukraine did not go to war, Russia went to war, and Ukraine had a "local" deal with Russia (in exchange for Ukraine giving up their nukes, Russia promised to honor their territorial integrity), Russia simply refused to honor their half of the deal.
The initial deal as I remember was with Russia, US and UK. And the deal was a memoranda which is not even binding and does not compel any real actions in case of breach. Basically Ukraine had acted as a fool.
Immediately after break up from USSR they had 50+ million population, strong army, industry, tech, great location as a transit hub, agriculture, resources etc. and their fucking corrupt "leaders" pissed it all away an had turned their country into an easy prey and a shadow of its former self.