Breaking C++ API Changes in Node.js v0.12

49 views
Skip to first unread message

Honza Břečka

unread,
Jul 21, 2015, 9:54:32 AM7/21/15
to nod...@googlegroups.com
Hi, how do you write native addons that can run on both 0.10 and 0.12 node versions? There are breaking API changes, so code written for v0.12 can't be compiled on v0.10. Thanks

mscdex

unread,
Jul 21, 2015, 11:09:46 AM7/21/15
to nod...@googlegroups.com
On Tuesday, July 21, 2015 at 9:54:32 AM UTC-4, Honza Břečka wrote:
Hi, how do you write native addons that can run on both 0.10 and 0.12 node versions? There are breaking API changes, so code written for v0.12 can't be compiled on v0.10. Thanks

You should use nan[1] for the best compatibility. However it should be noted that that takes care of most things, but if you are using some uncommon v8 APIs (that do not have an equivalent anymore) you may have to rewrite that portion of code.

[1] https://github.com/iojs/nan

Martin Gonzalez

unread,
Jul 21, 2015, 11:09:46 AM7/21/15
to nod...@googlegroups.com

El mar., 21 de jul. de 2015 a la(s) 10:54 a. m., Honza Břečka <jan.b...@gmail.com> escribió:
Hi, how do you write native addons that can run on both 0.10 and 0.12 node versions? There are breaking API changes, so code written for v0.12 can't be compiled on v0.10. Thanks

--
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 nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/337df8bc-2059-4b6e-9984-fa0b551de7f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages