Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #14904
| From | "Scott Sauyet" <3103invalid@webnews.fastusenet.org> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Extending JavaScript (C lib) |
| Message-ID | <201207061231433103@webnews.fastusenet.org> (permalink) |
| References | <23cade81-201f-4f8c-92dc-110870559add@googlegroups.com> |
| Date | 2012-07-06 12:31 +0000 |
Mathieu Malaterre wrote: > I am slowly discovering the JavaScript world, and I would like to > know how I can extend JavaScript to use one of my custom C lib. I > have seen dozens of different solutions (libffi, mosync, > js-ctypes...) [ ... ] I haven't done C in years, and never done very much with it, so my answer might not be what you're looking for. I don't think you're going to able to do this, though. Not if you're trying to run in a browser environment. There are too many different browsers, each with its proprietary implementation of ECMAScript. Here is a case where I agree wholeheartedly with an admonition Thomas Lahn often makes in this group. There simply is no single "Javascript" for you to extend. If you ending working in a more homogeneous environment, then things might be a bit different. For instance, node, the server-side Javascript environment, runs inside Google's V8 engine. You could extend that, and use your extended version fairly successfully, I would think. But then you could probably only use your code under servers under your direct control, where you could install your altered version of node. So what sort of extensions are you trying to make to the language? Are there good reasons you can't implement the things you want in the language itself? -- Scott
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Extending JavaScript (C lib) mathieu.malaterre@gmail.com - 2012-07-06 00:32 -0700
Re: Extending JavaScript (C lib) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2012-07-06 07:57 +0000
Re: Extending JavaScript (C lib) "Scott Sauyet" <3103invalid@webnews.fastusenet.org> - 2012-07-06 12:05 +0000
Re: Extending JavaScript (C lib) Stefan Weiss <krewecherl@gmail.com> - 2012-07-06 15:05 +0200
Re: Extending JavaScript (C lib) "Scott Sauyet" <3103invalid@webnews.fastusenet.org> - 2012-07-06 12:31 +0000
Re: Extending JavaScript (C lib) mathieu.malaterre@gmail.com - 2012-07-06 06:30 -0700
Re: Extending JavaScript (C lib) "Scott Sauyet" <3103invalid@webnews.fastusenet.org> - 2012-07-06 14:36 +0000
Re: Extending JavaScript (C lib) "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2012-07-06 11:12 -0700
Re: Extending JavaScript (C lib) Erwin Moller <erwinmollerusenet@xs4all.nl> - 2012-07-09 11:37 +0200
csiph-web