Now, there it is.
Atom Shell was open sourced a while ago and I roamed around in its code.
Apearently it directly targets a node_lib target within node.gyp. I have not
checked the current version of Node's gyp file, but I think now its actually
time to offer an embedding API. Why? Because even Atom had to hack its way
around...
Currently, nodejs does not offer access to node::Environment by default, which
holds a variety of objects. It also has no option of directly setting up an
environment, by passing a v8::Context, or just a v8::Object.
What I would suggest:
- A header called like: node_embed.h
- It should define a small set of functions that:
- Add a nodejs environment to a v8::Object or v8::Scope
- Provide version information
- That do NOT include v8, for the case that somebody already
selected a v8 header of their choice.
- Nodejs module structures must be forced to be added. Flags like
-all_load and --whole-archive are easily to forget. But due to the current
structure, modules are not always linked in by the linker, due to them not
having a strong reference from anywhere. A test build without either of the
flags resulted in only four of all modules ot be added inside.
- A short info on how the javascript in lib/*.js is converted in a
nodejs friendly header.
It would help other applications that intend to use nodejs for other tasks and
to add purpose-specific nodejs extensions.
Kind regards, Ingwie.
--
Job board: http://jobs.nodejs.org/
New group rules:
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/nodejs/D8EFEA78-C2BA-4E0D-97A0-0E14327C11DA%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.