Problem
Right now is not possible to get a composite type members.
Solution
Support mustache dotted names https://github.com/mustache/spec/blob/master/specs/interpolation.yml#L162-L167 like so:
create function print_person(p person) returns text as $$
Hello, {{p.name}} {{p.lastname}}
$$ language plmustache;