#run-time #net #raw #thermo #dotnet #fisher #raw-file-reader

dotnetrawfilereader-sys

A low-level interface to a in-process dotnet runtime for Thermo Fisher's RawFileReader library

15 unstable releases (4 breaking)

0.5.1 Jan 15, 2025
0.4.0 Dec 15, 2024
0.3.0 Sep 25, 2024
0.2.6 Jul 1, 2024
0.2.0 Mar 22, 2024

#198 in Memory management

Download history 27/week @ 2024-11-15 31/week @ 2024-11-22 58/week @ 2024-11-29 65/week @ 2024-12-06 186/week @ 2024-12-13 32/week @ 2024-12-20 27/week @ 2024-12-27 38/week @ 2025-01-03 314/week @ 2025-01-10 156/week @ 2025-01-17 1/week @ 2025-01-24 25/week @ 2025-01-31 15/week @ 2025-02-07 11/week @ 2025-02-14 6/week @ 2025-02-21 13/week @ 2025-02-28

56 downloads per month
Used in 3 crates (via thermorawfilereader)

Apache-2.0

1.5MB
239 lines

Contains (Windows DLL, 735KB) ThermoFisher.CommonCore.RawFileReader.dll, (Windows DLL, 460KB) lib/ThermoFisher.CommonCore.Data.dll, (Windows DLL, 110KB) lib/librawfilereader.dll, (Windows DLL, 35KB) lib/OpenMcdf.Extensions.dll, (Windows DLL, 63KB) lib/OpenMcdf.dll, (Windows DLL, 47KB) ThermoFisher.CommonCore.BackgroundSubtraction.dll and 2 more.

thermorawfilereader

Read Thermo RAW files from Rust via in-process .NET runtime hosting and Thermo Fisher's RawFileReader .NET library. You must still install the .NET 8 runtime for this library to function. It should be compatible with .NET 7 but small changes may have to be made to the project files to function.

Which crate is which?

  • librawfilereader: This is the C# library that Rust calls, it exchanges information using either opaque tokens or FlatBuffers (see ./schema/schema.fbs). All interaction with Thermo's actual library happens in here.
  • dotnetrawfilereader-sys: This Rust crate A) bundles the C# assemblies for librawfilereader and its dependencies and B) configures the loading of the .NET runtime and provides it with a Rust-backed memory allocator, after a fashion.
  • thermorawfilereader: This Rust crate provides (relatively) high level bindings for librawfilereader and the FlatBuffers messages it generates.

mzdata contains an implementation adapting thermorawfilereader to work with that library's types.

Licenses

The code in this repository is licensed under the Apache-2.0 license, but it all depends upon Thermo Fisher's RawFileReader library. This library has a proprietary license at https://github.com/thermofisherlsms/RawFileReader/blob/main/License.doc, and it's assumed that you accept their license's terms by using this library.


lib.rs:

This crate wraps the librawfilereader .NET library and its associated dependencies, manages the creation of a hosted .NET runtime for them, and provides access to the runtime. See thermorawfilereader for useful bindings.

For regular use, call get_runtime to get a runtime handle, or set_runtime_dir to pre-specify the location where runtime files need to be cached. Alternatively, set the DOTNET_RAWFILEREADER_BUNDLE_PATH environment variable.

If you wish to link with a local nethost library instead of downloading the latest version at build time, please see netcorehost's documentation. This is still distinct from actually statically linking with .NET's coreclr library which must be installed separately.

Licensing

By using this library, you agree to the RawFileReader License

Dependencies

~3–12MB
~161K SLoC