Spidermonkey doesn't seem too hard to integrate, creating a shim for a javascript 
a library that provides an API for Inkscape hopefully shouldn't be too tricky and possible with a few precompiler directives in the code and a script
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/How_to_embed_the_JavaScript_engine  
  Spidermonkey looks a little short on documentation especially when it comes to C/JaverScript interoperability.  


V8 maybe seems a little trickier to embed, only a little not a great deal but has good, clear documentation. it is however C++ base, so it how well that mixes with Inkscape's choice of c
https://chromium.googlesource.com/v8/v8/+/branch-heads/6.8/samples/hello-world.cc  

do it's going to take some searching for documentation and examples of wrapping up c for javascript and javascript for c to determine which one will embed the nicest based on hope Inkscape's SPI is implemented and also look at debugging support and any other featurtes