Issue I am trying to get the Dart native extension example from this page to work. http://www.dartlang.org/articles/native-extensions-for-standalone-dart-vm/ I am on Windows. I downloaded and extracted dart to C:\Program Files\dart I checked out dartsSVN into C:\Projects\dartSVN so I can get the
Continue readingTag: dart-native-extension
Can Dart be used as a general-purpose language?
Issue Dart supports interfacing with the native libraries (Ref: http://www.dartlang.org/articles/native-extensions-for-standalone-dart-vm/). There are some decent libraries available for socket communication, interfacing with databases and dealing with filesystems. Barring desktop GUI applications, I don’t see any reason why it cannot be used
Continue readingDoes Dart support interfacing with the native libraries?
Issue As the server-side part becomes more complex, developers will need to leverage the existing software. So, does Dart support interfacing with the native libraries (C libraries, in particular)? Solution Yes, it is quite possible, here is the official guide.
Continue readingHow to throw a custom error from a dart extension dll?
Issue I am trying to create an extension to wrap an existing DLL without extensive knowledge of C/++. I have used the sample extension as a base and everything seems to work fine, what I would like to do is
Continue readingDart native extensions – what exactly does dart-ext do on library include
Issue I include the following in my native extension :- #include “qpid/client/Connection.h” #include “qpid/client/Message.h” #include “qpid/client/Session.h” My Dart code using the native extension works, all fine and dandy, if however I include this :- #include “qpid/client/SubscriptionManager.h” I suddenly get :-
Continue readingDart: How to create stream in native extension
Issue In my native extension I need to stream ints to my Dart console apps. Very similar in concept to stdin. How do I create a native Dart Stream object which is exposed to console app? Solution I’ve tried to
Continue readingNative extensions – C++ native libraries
Issue The samples_extension works OK with C library linkage but what about C++ libraries? I have a class based C++ library I want to use as a native extension, so we have for example:- class Connect { open(…); …. }
Continue readingDart native extension: How to create "Push" data stream
Issue I’ll refer conceptually to “Pushed” vs “Polled” streams to help describe my question’s objective which is to “*Create a Pushed data stream emulating the data flow behavior of Dart’s stdin stream*” “Polled“: In my previous question, Menzoni’s answer is
Continue readingHow do you convert a Dart_Handle List to a C++ array?
Issue I’m trying to port over a node.js native abstraction to dart as a native extension. The node.js nan also happens to be using the v8 namespace, which I’m not terribly familiar with. The [incomplete] code snippet in particular that
Continue readingHow do you link external shared libraries to a native extension?
Issue I’m writing a pty native extension and want to link libutil so that I may use forkpty and openpty from <pty.h>. I’m using the two commands taken from the official guide: g++ -fPIC -lutil -I/home/crunchex/work/dart-sdk -c pty.cc -o pty.o
Continue reading