instantiations / es_compression

Compression framework for Dart providing FFI implementations for Brotli, Lz4, Zstd (Zstandard) with ready-to-use prebuilt binaries for Win/Linux/Mac.
https://www.instantiations.com
BSD 3-Clause "New" or "Revised" License
41 stars 8 forks source link

Allow User specified shared library locations #5

Closed sethloco closed 4 years ago

sethloco commented 4 years ago

We will be distributing the shared libs so shouldn't be a problem. But would like to have something flexible enough to handle unsupported platforms and custom locations.

This means exposing custom hooks that the user can control to force where and how a library is loaded

sethloco commented 4 years ago

User can now

  1. Put the native library in the same directory as an exe, aot or anywhere in a place where the library lookup of the OS can find it
  2. There is a static variable for each codec (userDefinedLibraryPath) that the user can set before the first FFI call
  3. Environment variable (LZ4_LIBRARY_PATH, ZSTD_LIBRARY_PATH...)

See open_library.dart module for more details