Inside the squat, bunker-like building surrounded by fortified concrete walls, an assembly line of black workers gingerly fit together fuses, detonators and explosives to make a projectile for a 90 mm cannon. Four years ago this facility could make 400 rounds a day. Now it can produce 2000.

One of the weapons featured in a military parade in Durban last month was a 127 mm multitiered rocket system transported on a truck. It is a local copy of the World War II Soviet-made "Stalin's Organ," first encountered by the South Africans when they encountered Cuban troops in Angola's 1975 civil war.

Both these scenes are the result of an effort begun in 1963 when South Africa, spurred by a partial and voluntary Western arms embargo because of its racial policies, began preparing for the day when tht embargo might become mandatory, as it did in October 1977.

Today, helped along by violations of the embargo, its weapons industry is one of the largest in the developing world and a major factor in the continuation of white rule here. Not only does South Africa make most of the arms it needs to wage a conventional or guerrilla-type conflict with its African neighbors, or to quell an internal volt, but it also exports some of its products, among them the handmade Musgrave hunting rifle sold in the United States.

"In terms of indigenous manufacturing of licensed or locally designed defense equipment, South Africa ranks along with such states as Brazil, Argentina, India, Israel and Taiwan as a leading Third World arms producer," wrote Assistant Secretary of State for African Affairs Chester Crocker when he was at Georgetown University's Center for Strategic and International Studies in 1980.

It is also true, however, that the arms boycott has been costly to South Africa and that their arms industry cannot provide the weapons needed to counter what South African military strategists have begun to prepare for since 1975: an eventual communist-backed conventional assault on their country.

"South Africa can establish a balanced defense force to defend itself firstly against terrorism," said then-defense minister (now Prime Minister) Pieter Botha in 1975. "And this we are fully able to do. . . Secondly, we must have a deterrent to be able to resist a fairly heavy conventional attack on South Africa," he said.

South Africa's clear military superiority in the region and the reluctance so far of the Soviet, East German and Cuban forces to increase their involvement with the anti-South African guerrillas of the Southwest Africa People's Organization (SWAPO) in Namibia, make such a conventional attack remote at the moment.

But a complee breakdown in the protracted negotiations over South Africa's rule in Namibia (Southwest Africa) which could allow the guerrilla war to smolder on for another decade might increase chances of an attack. South Africa would then need to find a supplier of sophisticated weaponry.

South African officials are polished practitioners in the art of turning an affliction into a blessing. Pieter Marais, chairman of the South African Armaments Development and Manufacturing Corp. (Armscor), is no exception. In an interview, Marais said South Africa is "grateful" for the arms embargo of 1977 becuse it allowed it "to build up an arms industry to fight a war in an African context. We are getting tremendous benefits from the arms embargo, new skills, new technology, which stimultes our own industry."

But he does admit to some drawbacks, namely "the amount of money which must be spent on defense and the talent which could have been used for research in other ways." Without the arms ban, "we could have imported certain components at lower cost because our needs are small," he added.

"The mandatory arms embargo of 1977 has already hurt, but South Africa's greater concern is for the future," wrote U.S. defense expert Robert Jaster in a 1980 study for the London-based International Institute for Strategic Studies. "If the arms ban is strictly enforced, prolonged isolation from new developments in Western military technology could force South Africa's armory to fall behind in quality."

Marias hinted at this during the interview when discussing local production of Mirage F1 jet fighters.

"I don't want to say we are producing the latest ones," he said at one point, noting how "they become obsolete if produced en masse."

And there are limits to its indigenous industry. "For a number of heavy and sophisticated weapons, including tanks, submarines, long-range maritime patrol aircraft, heavy artillery, radar and communications equipment and certain types of ammunition, South Africa remains dependent on imports," writes Jaster.

Armscor was established in 1968 as a private company in which the state is the main shareholder. This year it will get $1.8 billion or 70 percent of South Africa's defense budget. It has 11 wholly owned subsidiaries in which it employs 25,000 people and has contracts with about 800 domestic firms, Marais said.

In South Africa's panoply of weapons there are some genuine innovations, notably the Ratel, a long-range (900-mile), high-speed armored personnel carrier built for rugged conditions.

But other items that the government implies are home-grown products are often less than that. The Elephant tank South Africa recently put on view as its own is actually the made-over hull of a British-made Centurion tank, probably from the shipment of 100 Centurions South Africa surreptitiously obtained from India in 1978, according to one reliable source.

Six missile-armed naval strike craft designated the Minister class by South Africa are actually Israeli-built Reshefs. Three were sailed here in 1978 and the others assembled in Durban, according to one informed source. At least two more are now being made under license in Durban, according to another source.

It is such licensing agreements, under which South Africa also manufactures fighters, trainers, surface-to-surface missiles and the Eland personnel carriers, that constitute the major way of getting around the 1977 arms embargo. Most of the agreements were established during the 1970s, when the arms industry underwent a major expansion under then-defense minister Botha.

But the embargo is leaky in other ways as well. Many of the military items produced by South Africa include foreign-made components acquired on the black market or through circuitous routes that end up at Armscor.

For example, an air-to-air missile similar to the U.S. Sidewinder that the South Africans are developing is guided by a U.S.-made computer, according to one recent visitor to the missile plant, even though the United States had an embargo on computer sales to the South African military even before 1977.

South Africa's arms-producing capacity has led it to search for export markets to help keep the industry economically viable. This is now the bailiwick of Armscor's official export agency, called Nimrod, which was set up less than a year ago.

Just what, how much and to whom South Africa exports is a closely guarded secret, but Marais has said the trade is worth several million dollars a year. It is likely that their products go mostly to countries with which it already has close military ties, such as Taiwan, Israel, Chile and Paraguay, and to Western-oriented African governments.