Preheat oven to 170 degrees C. In a medium bowl, combine ground almonds and wholemeal flour. Cut in margarine until a dough is formed. Press dough into the bottom and half-way up the sides of a 23cm springform pan.
In a blender or food processor, crumble the tofu. Add sugar, cocoa, oil, soy milk, rum and vanilla. Process until smooth and creamy. Pour filling into crust.
Bake in the preheated oven for 75 minutes, or until filling is set. Allow to cool on a rack and then chill thoroughly in refrigerator before attempting to remove from the pan.