Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native extension libraries placement #16358

Open
DartBot opened this issue Jan 28, 2014 · 3 comments
Open

Native extension libraries placement #16358

DartBot opened this issue Jan 28, 2014 · 3 comments
Labels
area-library library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@DartBot
Copy link

DartBot commented Jan 28, 2014

This issue was originally filed by incr...@gmail.com


Suppose I have Dart project with plugin architecture, where plugins are placed in separate directories and each is compiled (dart2dart) into single file so they does not need any external dart libraries. They are loaded using Isolate.spawnUri().

These plugins use some c++ native extension library. As I understood, native library must be placed in the same directory as corresponding Dart library, i.e. in the each compiled plugin directory.

Does it means, that VM loads this native library multiple times, each from different plugin directory? If so, there should be some possibility to specify the single place where this library is (parameter of VM to specify native extension libraries placement?) and some mechanism to unload native library from VM when no Isolate uses it.

@DartBot
Copy link
Author

DartBot commented Jan 28, 2014

This comment was originally written by inc...@gmail.com


You are right. Single dir is nonsense. Have you any idea how not to want from VM to load the same lib multiple times for each Isolate? May it would be possible to make some statement to load native library (with path specified) at runtime... Or some kind of manifest file for each application...

@sgjesse
Copy link
Contributor

sgjesse commented Jan 28, 2014

Putting the native extension issue in to area IO for now.

You can use both relative and absolute paths for dart-ext URIs. However is does complicate stuff if the native library used is not in the same directory as the dart code (plugin). If the native library is part of the application using the plugins then using relative URIs to point to the same library might work.


cc @whesse.
Added Area-IO, Triaged labels.

@kevmoo
Copy link
Member

kevmoo commented May 14, 2014

Removed Area-IO label.
Added Library-IO label.

@kevmoo kevmoo added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed priority-unassigned labels Feb 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-library library-io type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants