v8worker
v8worker copied to clipboard
Questions: cloning, binary size, namespace
Hello,
I have some questions.
- Cloning the worker state (variables)
I dream of doing something like:
- js: $sendSync(...)
- go: recvSync(...) {...}
- clone the state of the worker at the point of the $sendSync was called
- spin up another worker with the same cloned state
- work in the clone, mess up everything, get some results
- return to the original worker
- have it just like it was.
Could that be made?
- Binary size
When I build my tiny project the binary is over 100M. I read that with gcc V8 will be under 10M but I understand my binary has everything linked statically. I'm a total noob with go, haven't really done anything with c++ and don't know where to start. Any info is appreciated.
- Namespace
Those $rect, $print etc. are fairly nice but I'd prefer these names customisable, perhaps having them inside an object (foo.print, foo.send, ...). Looking at the code this seems achievable but do you think this is a totally retarded idea?
Anyways, thanks for creating this fine tool. I will have lots of fun with it.