[package] name = "lightweight-mmap" version = "0.4.2" edition = "2021" description = "Simple memory mapping helpers for Rust, with minimal amount of code generated." repository = "https://github.com/Sewer56/lightweight-mmap" license-file = "LICENSE" include = ["src/**/*"] readme = "README.MD" [features] default = ["std", "mmap"] std = [] # Feature for enabling C library exports. (Test code build size) c-exports = [] # Enables memory mapping operations. # When this is disabled, library can only be used to open file handles. # When this is enabled, library can be used to open file handles, and extra data for fast opening # of mmap(s) may be stored inside each handle depending on platform. mmap = [] # Skips core::fmt formatting machinery where possible. no-format = [ "dep:itoa", "dep:nanokit" ] # Trims the lengths of memory maps up to the size of the file, ensuriung mapping # cannot go beyond. At slight cost of map open time. trim-file-lengths = [] [dependencies] thiserror = "1.0.66" bitflags = "2.6.0" itoa = { version = "1.0.8", default-features = false, optional = true } nanokit = { version = "0.2.0", features = ["no-inline-concat"], optional = true } [target.'cfg(unix)'.dependencies] libc = "0.2.146" errno = "0.3.9" [target.'cfg(target_os = "windows")'.dependencies.windows-sys] version = "0.59.0" features = [ "Win32_Foundation", "Win32_Storage_FileSystem", "Win32_Security", "Win32_Globalization", "Win32_System_Memory", "Win32_System_SystemInformation", "Win32_System_Threading" ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dev-dependencies] tempfile = "3.13.0" # Profile Build [profile.profile] inherits = "release" debug = true codegen-units = 1 lto = true strip = false # No stripping!! # Optimized Release Build [profile.release] codegen-units = 1 lto = true strip = true # Automatically strip symbols from the binary. panic = "abort"