// somehow render the wikicreole text in $text into $rendered_text
That's the bit that takes the time. Writing a parser that works correctly in every case is quite a task. Integrating it into MediaWiki is easy by comparison. I guess if there is an existing GPL WikiCreole parser, that could be integrated directly, but I don't know of one.