This gist is my test fixture for implementing several JS objects implemented in C++.
It's my best guess -- based on this mailing list, stack overflow etc -- of how implementing a JS type should work.
It is a very complicated wrapping around a dynamically allocated string, but working this way is what I kind of need to do; I'll be creating a JS object to call various third party library functions.
It isn't working right now; it gets as far as line 165:
v8::Local<v8::Object> instance = instance_template->NewInstance(context).ToLocalChecked();
Which apparently causes some sort of silent exception ending the program in v8::internal::(anonymous namespace)::ProbeInstantiationsCache(v8::internal::Isolate (or _ZN2v88internal12_GLOBAL__N_124ProbeInstantiationsCacheEPNS0_7IsolateEi if you speak C++ mangle).