Implement %native classes in C: declare them in
.loth, implement them in a shared library, and let the VM bind and
validate the two.
make and make libs.cc -shared -fPIC).The track builds one plugin: a stateful Counter class plus a
CounterUtil singleton registered by the same library.
value=30 label=hits twice=42
divide: DivideByZeroException
The example exercises every mechanism the chapters describe: language-visible fields, a GC root held in the handle, a language exception thrown from C, a blocking call, and a two-class library.
NativeCtx, typed accessors, strings, varargs, slots.gc_scan, finalize, value lifetimes.vm_throw, the exception pipeline, calling back into the language.native-info.