Steve Vai played both his guitar part (Jack Butler’s part) and the classical part that Ralph Macchio’s character played. The slide guitar parts were played by Ry Cooder.
An interesting fact that a lot of people don’t know, Vai played the classical part (Paganini 5th Caprice) at a slower tempo in the studio on a tuned down guitar and then sped the track up to A 440 for the final cut in the movie. So he really didn’t play it as fast as you hear in the movie. I didn’t find this out until this past year. I wish I would have known that back in the day when I learned it at full speed. Worked out either way, it was a good chops builder…~TS