I said it years ago, v8 needs something like SpiderMonkey's cookbook <
https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Cookbook>.But
you can bug Stephen Beal about this, because Chromium & the v8 teams'
priority is to support chrome, not embedders.  Stephen has had a few run
ins with v8 & chromium devs and continue to ignore him.


-L

On Tuesday, July 9, 2013, Floby wrote:

> Tim's examples are pretty nice.
> The only things missing for all my use cases are storing pointers in JS
> objects so I can get them back when I need it.
>
> something like
>
> js_set_pointer(C, myObject, pointer);
> myType *pointer = js_get_pointer(C, myObject);
>
> On Monday, 8 July 2013 20:35:36 UTC+2, Timothy J Fontaine wrote:
>
> [cross post from 
> http://atxconsulting.com/**2013/07/06/rewrite-it-anyway/<http://atxconsulting.com/2013/07/06/rewrite-it-anyway/>
> ]
>
> Node v1.0 is approaching, and v0.12 is imminent (as far as that goes for
> FOSS
> projects). As we work towards getting v0.12 out the door, there have been
> a lot
> of changes happening for node's primary dependency v8. Ben is working on
> moving
> us to the 3.20 branch, follow his progress
> [here](https://github.com/**joyent/node/pull/5804<https://github.com/joyent/node/pull/5804>
> ).
>
> As you can tell this is a signficant change to the API, which requires a
> touch
> of virtually every file in our `src/`, this has been a huge headache for
> him,
> and will ultimately cause a huge headache for developers of binary addons.
>
> You're going to have to `#ifdef` around significant portions of the API to
> keep
> your module working across different version of node, this is going to
> cause
> endless amounts of pain and issues for node and developers who have for the
> most part been accepting of the churn in our underspecified addon API.
>
> This one is going to hurt.
>
> A lot.
>
> ## TL;DR -- A modest proposal
>
> Since you're going to have to rewrite your module anyway, it's time for
> node to
> specify and export the API we are going to "bless" for addons. That is,
> just
> what API we are going to support and make sure continues to work from
> minor and
> major releases, as well as a deprecation policy.
>
> More specifically I think we should be exporting a separate (and not equal)
> wrapper around (at the very least) javascript object creation, get/set,
> function
> calling.
>
>  Additionally we should package and distribute (if possible in npm) a
> transitional library/headers which module authors can target today which
> will
> allow their module to compile and work from v0.8 through v1.0
>
> ## The Platform Problem
>
> We currently allow platforms/distributors to build against shared (their
> own)
> versions of many of our dependencies, including but not limited to:
>
>  * v8
>    - Holy crap, we're about as tightly coupled to the version of v8 we
> ship as
> chromium itself is.
>  * libuv
>    - If we weren't strictly coupled to v8, we certainly are for libuv,
> there
> would be no (useful) node, without libuv.
>  * openssl
>    - This is a must for linux distributions, who like to break DSA keys
> and then
> make every dependency vulnerable as a result (sorry Debian, I keed I keed).
>    - This actually allows distributors who know specific things about their
> platform to enable/disable the features that allow it to run best.
>  * zlib
>    - Meh, this isn't such a big deal, it doesn't really change all that
> often.
>  * http_parser
>    - Really? People ship this as a separate library?
>
> This functionality was added to appease platform builders, the likes of
> Debian,
> Fedora, and even SmartOS. However, doing so has complicated and muddled the
> scenario of building and linking binary addons.
>
> Currently node-gyp downloads the sourceball, extracts the headers from it,
> and makes some assumptions from `process.config` about how to build your
> addon.
> In practice this has been working reasonably well.
>
> However, I'm very concerned about this as a long term strategy. It's
> possible
> for someone to have tweaked or twisted the node (or one of its
> dependencies)
> builds, which could lead to some unintended consequences. In the "best"
> case,
> you'll get a compiler error from a changed API or clashing symbol. In the
> worst
> case they have modified the ABI which will manifest itself in unexpected
> and
> often subtle ways.
>
> Not to mention that we have no good answer on how to build and link addon
> modules against the proper version of a shared dependency (what if the
> system
> has multiple openssl's, what if they compiled against it in one place, but
> now
> run against it in another).
>
> And last but not least, how do modules consume symbols from our
> dependencies
> that node itself doesn't consume. Consider a specific crypto routin
>
>  --
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> 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 post to this group, send email to 
> nodejs@googlegroups.com<javascript:_e({}, 'cvml', 'nodejs@googlegroups.com');>
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com <javascript:_e({}, 'cvml',
> 'nodejs%2bunsubscr...@googlegroups.com');>
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>
> ---
> 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 nodejs+unsubscr...@googlegroups.com <javascript:_e({}, 'cvml',
> 'nodejs%2bunsubscr...@googlegroups.com');>.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
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 nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to