Deployment

The user-mode library comes as dynamic libraries, named

  • Windows: rustcbfssync26.dll (available for 32-bit (x86) and 64-bit (x64) processor architectures)
  • Linux: librustcbfssync.so.26.0 (available for 32-bit (x86) and 64-bit (x64) processor architectures)
  • macOS: librustcbfssync26.0.dylib (available for x64 and ARM64 processor architectures)

Windows: When deploying the application, copy the dynamic library to the target system and place it next to the application's executable file (on Windows, it has the .exe extension.

Alternatively, the native library may be placed into one of directories, the paths to which are contained in the

  • Windows: PATH environment variable, such as C:\Windows\System32 (or C:\Windows\SysWOW64 when deploying a 32-bit application on a 64-bit Windows system)
  • Linux: LD_LIBRARY_PATH environment variable
  • macOS: DYLD_LIBRARY_PATH environment variable

Threading and Concurrency

The struct utilizes different underlying technologies on different operating systems. Because of that, the threading model exposed to applications depends in part on the platform struct runs on.

NOTE: Even when configured for minimal concurrency, the struct always fires events in the context of some worker thread, and not in the thread the struct was originally created on. Therefore, applications must be sure to synchronize operations between event handlers and other threads as necessary (including, but not limited to, calls to the struct instance, unless a method is explicitly documented as callable within events).

Configuring Event Concurrency

The serialize_events property controls whether events relating to different files should be allowed to fire in parallel on several worker threads, or serialized on a single worker thread. By default, this property is set to seOnMultipleThreads, and events for different files are allowed to fire in parallel.

Windows: Generally speaking, the struct always enforces per-file event serialization; that is, events relating to the same file are always fired in sequence regardless of the property value. With per-file event serialization already ensured, the most important concurrency-related consideration is whether to enforce multifile event serialization as well, which is what serialize_events controls. When serialize_events is set to seOnMultipleThreads, the MinWorkerThreadCount, MaxWorkerThreadCount, and WorkerInitialStackSize configuration settings let the application tune the worker thread pool. These settings are ignored when serialize_events is set to seOnOneWorkerThread.

Linux: When serialize_events is set to seOnMultipleThreads, the struct may fire events related to the same file concurrently in several threads. If the application is not prepared for that, it should use seOnOneWorkerThread mode.

macOS: The events always fire on a single worker thread, and the serialize_events property has no effect.