The WebSerial API could be implemented using the serial library by wjwwood, also used in ROS. It's a very good, open-source, stable C++ library with a clear documentation, and it's MIT-licensed.