I think for this exercise to work on web assembly, it would be better to change the bearing to a number (0 = north, 1 = east, 2 = south, 3 = west) to avoid superfluous string handling; the Return value should be bearing (i32), x (i32) and y (i32). if the bearing is -1, it indicates an error.
So all that needs to be implemented would be an evaluate function that takes the bearing, x, y and offset/length of the instruction string and returns the robot after the instructions were executed.
Is that ok?