Whisk together sugar, cornstarch, salt, and cocoa powder in a saucepan. Slowly whisk in soy milk and bring to a boil over medium heat, whisking constantly.
Lower heat and simmer, whisking until mixture thickens, 3-4 minutes.
Remove from heat and whisk in vanilla extract. Cool at least to room temperature in a bowl before placing in the refrigerator for a couple of hours to set.
Once the pudding has been cooled, spoon a small amount into the bottom of a small cup. Top with chopped walnuts and mandarin orange segments. Layer with a couple more spoonfuls of pudding, walnuts, and oranges.