Looks like it would have been a lot easier if this existed back then. (haven't worked on the site for 5+ years)
We got acqui-hired in 2015 and the product was shut down, but in hindsight I wish we'd open sourced at least those libraries.
It was created by Apple as a wrapper for CoreGraphics back around Mac OS X Tiger 10.4. (IIRC, Canvas even debuted in Apple's Dashboard widgets rather than Safari? I'm not 100% sure.)
I remember writing my own Canvas implementation around 2008-2009 using JavaScriptCore and CoreGraphics. It took maybe two days. I used it for a video application where JS plugins needed to render 2D graphics but I couldn't provide a browser engine because that would have been too slow and unpredictable for render functions that get called in the video render loop.
Also since this was a video application running custom scripts written specifically for that host app, there wasn't a big worry about exact compatibility with any other Canvas-using code.
Anyway, here's the old code that doesn't look like there's anything interesting going on:
https://github.com/pojala/lacqit/blob/main/Lacqit/LQJSBridge...
Looks like I misremembered — it's using Cairo rather than CoreGraphics. I don't remember why that was.