Vienna — East and West have both been engaging in trying to build bridges in Eastern Europe this week. It began with the visit of the Soviet Union's longtime trouble-shooter, Andrei Gromyko, to Bucharest.
He was there to woo a frequently wayward ally, Romania, into a firmer Warsaw Pact line on nuclear missiles.
As the Soviet foreign minister left the Romanian capital Wednesday, the mildly maverick NATO figure of Pierre Trudeau arrived. The Canadian premier was on the last leg of his individual peace mission to revive East-West dialogue.
On Thursday, British Prime Minister Margaret Thatcher flew into Budapest for talks with Hungarian leaders on a number of topics.
Her aim was to inspire more Soviet confidence in the sincerity of recent East-West rapprochement offers by President Reagan and herself.
The Hungarians gave her a friendly, even warm welcome. But only two days before she arrived, the party newspaper Nepszabadsag cautioned against supposed Western ''differentiation'' between ''liberalized'' and ''hard-line'' communist states, with reform-minded Hungary as some sort of potential ''Trojan horse'' among the East Europeans.
In three days of talks with Romanian leaders, Mr. Gromyko was fairly successful in his attempt to move Romania from its almost neutralist approach to Euromissiles to a more pro-Soviet line.
The Soviets had been highly irked by the way Romania had equally condemned the deployment, starting in December, of NATO's new cruise and Pershing II missiles in Western Europe, and the Soviets' retaliatory missiles in Czechoslovakia and East Germany.
(Romania was the only nation in the Warsaw Pact to display this individualistic line, though there was obviously considerable uneasiness in East Germany and Czechoslovakia.)
Both superpower deployments, Romanian leaders have said, should be terminated , and both Russia and America should get back to the Geneva negotiating table.
The joint communique on Mr. Gromyko's talks with Romanian President Nicolae Ceausescu indicated that while Mr. Ceausescu held to this demand, he also moved closer to the Soviet position by blaming the US and the West for the ''further aggravation'' of the international situation by upgrading NATO's missile equipment.
The statement also alluded to the Soviets' insistent claim that the real motive behind the Western deployments was a bid for military superiority over the Warsaw Pact. (Earlier in his visit, Gromyko was permitted to make a tough speech on these lines to a gathering of factory workers, despite Romania's customary concern that its visitors refrain from statements overly critical of nations with whom it is on friendly terms.)
The communique endorsed the Soviet position per se on intermediate missiles. It also mentioned the ''great importance'' of Warsaw Pact declarations in Prague and Moscow last year, based on Soviet proposals for halting the arms race and for disarmament.
Differences between Bucharest and Moscow seemed, in fact, to have been narrowed to the question of how to create conditions conducive to negotiations between the superpowers.
Here, the communique departed from the formulas employed everywhere else in the text - the two parties ''expressed,'' ''viewed,'' or ''stressed'' - to spell out individual Soviet and Romanian ideas on what should be done next.
''The Soviet side,'' the communique said, had reaffirmed that if the NATO countries return to the situation prior to cruise and Pershing deployment in Western Europe, then the Soviet Union is ''ready to do the same'' - meaning, presumably, its counterdeployment, though it did not actually say so.
''The Romanian side,'' the communique went on, ''supports the stance of the Soviet Union and believes that everything has to be done . . . to achieve an adequate agreement conducive to a Europe fully free of intermediate-range missiles.''
This still seems to imply Romanian reserve about the merits of the Soviets' retaliatory action. But on the whole, Gromyko was probably satisfied that Romania now is, in effect, more closely in line: It agreed that the US and NATO are to blame for the present breakdown in East-West relations because they made the first move.
The Soviet foreign minister may also have reassured Romania, which has consistently refused to take part in any but token Warsaw Pact military training activity, that it was not now going to be asked to accept Soviet missile placement on its own territory, should the present international freeze continue.
If Mr. Gromyko gave such assurances, he also apparently ''came bearing gifts, '' including some important ones for Romania in its present economic crisis - specifically, its energy shortage. The communique spoke of ''new concrete measures'' in bilateral economic relations.
It also emphasized the further development of cooperation within Comecon (the socialist countries' trading organization), thus appearing to respond to Romania's longtime demand that Comecon do more for its less-developed members.
Until the late 1970s, Romania was still self-sufficient in oil - the one East European state independent of Soviet supplies. But, with native resources drying up, it had to turn to the Soviet Union.
Since 1981, the Soviets have been supplying something in excess of a million tons yearly. Gromyko apparently confirmed that the Soviet Union would deliver 1. 5 million tons of oil this year, as well as other badly needed raw materials.
Meanwhile, Hungary may be on its guard during Mrs. Thatcher's stay, which will be the first visit by a Western government leader since the post-Solidarity crisis in Poland.
But it is showing no desire to abate its assiduous cultivation of economic links with the West and diversity of contacts with both East and West - a process that has been going on for many years.
In that sense, Mrs. Thatcher's talks in Budapest just now could be, for both sides, a useful sounding board over what future moves might get East and West talking to each other again.