Discussion:
[dart-misc] Library with native C and JS code
Steven Roose
2016-01-24 16:35:32 UTC
Permalink
Hi


I would like to create a library for some high-performance calculations by
using optimized C and JS code. I know that many code Dart classes like f.e.
Set and Map, have native implementations depending on the available
platform using native extensions.

Is it possible to do that same thing for a third-party package? Is there
any documentation on how to do this?


Many thanks

Steven Roose
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Robert Åkerblom-Andersson
2016-01-24 19:34:07 UTC
Permalink
Hi,

With a small risk of stating the obvious, I sorry if that is the case, but
have you seen this article:

https://www.dartlang.org/articles/native-extensions-for-standalone-dart-vm/

A part for that I don't know too much about native extensions. I'm not sure
if you can publish and reuse packages using native extensions on pub
however, if you have to precompile the C stuff yourself and then package it
in or how to get that part working. If someone could fill in with details
on the publishing part of a library using native extensions that would be
great.

Regards, Robert
Post by Steven Roose
Hi
I would like to create a library for some high-performance calculations by
using optimized C and JS code. I know that many code Dart classes like f.e.
Set and Map, have native implementations depending on the available
platform using native extensions.
Is it possible to do that same thing for a third-party package? Is there
any documentation on how to do this?
Many thanks
Steven Roose
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Don Olmstead
2016-01-24 22:20:46 UTC
Permalink
Well you can't use JS on the Dart VM so you would need to port that over.
You can use native extensions as Robert mentioned. The only problem there
is that pub never got support to build extensions in a similar manner to
the node-gyp stuff.

On Sun, Jan 24, 2016 at 11:34 AM, Robert Åkerblom-Andersson <
Post by Robert Åkerblom-Andersson
Hi,
With a small risk of stating the obvious, I sorry if that is the case, but
https://www.dartlang.org/articles/native-extensions-for-standalone-dart-vm/
A part for that I don't know too much about native extensions. I'm not
sure if you can publish and reuse packages using native extensions on pub
however, if you have to precompile the C stuff yourself and then package it
in or how to get that part working. If someone could fill in with details
on the publishing part of a library using native extensions that would be
great.
Regards, Robert
Post by Steven Roose
Hi
I would like to create a library for some high-performance calculations
by using optimized C and JS code. I know that many code Dart classes like
f.e. Set and Map, have native implementations depending on the available
platform using native extensions.
Is it possible to do that same thing for a third-party package? Is there
any documentation on how to do this?
Many thanks
Steven Roose
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Continue reading on narkive:
Loading...