Building codes on that are going to vary locally. They are doable in most of Switzerland if you plan for it: no sky lights, no chimney (there's setbacks and fire codes for those), ect.
I thought the IFC International Fire Codes were a bit more ubiquitous than they are. Apparently whole roof is possible in a few EU countries. Probably not a good idea for the stick-built houses prevalent in US though