There isn't such thing as a WM under Wayland. There are only compositors which make up everything such as the WM, Effects compositor, io etc.
To standardize things for smaller compositors things like wlroots exist. Creating a basic compositor using that is around 100 lines of code