We calculate the properties of p-n junctions, n-i junctions, and Schottky b
arriers made on a single-wall carbon nanotube. In contrast to planar bulk j
unctions, the depletion width for nanotubes varies exponentially with inver
se doping. In addition, there is a very long-range (logarithmic) tail in th
e charge distribution, extending over the entire tube. These effects can re
nder traditional devices unworkable, while opening new possibilities for de
vice design. Our general conclusions should apply to a broad class of nanot
ube heterojunctions, and to other quasi-one-dimensional "molecular wire" de
vices.