(short summary: why is emulation of Windows environment so difficult).

First of all, my apologies if this is an off-topic question for this list but I hope it will be useful for others in the similar situation.

I need to port fairly large WinAPI-heavy application to Linux. After some googling it becomes clear that there's nothing except for Wine/Winelib which is *huge*. However for at least most basic WinAPI functions it looks fairly easy to just re-implement it via Boost/STL/libc/Linux syscalls. Why there's nothing small like this already? Why only Wine with like 3 millions LoC and run-time dependencies?

Is the approach described above make some sense for at least most common functionality (threading, IPC, file operations) w/o things like UI, graphics and registry. For instance, we need to either re-implement around 200 WinAPI functions (mostly events, mutexes, semaphore, sockets, file and folder operations) or to rewrite the entire thing from scratch. Using Winelib directly is not an option due to the nature of the app. Any help/advices are greatly appreciated.

Thank you.