[package]
edition = "2021"
rust-version = "1.95.0"
name = "kernal-api"
version = "0.1.14"
build = "build.rs"
include = [
"/Cargo.toml",
"/Cargo.lock",
"/build.rs",
"/README.md",
"/LICENSE",
"/NOTICE",
"/conpty-sidecar.sha256.toml",
"/src/**",
"/tests/**",
"/examples/wasm-admission.rs",
"/examples/wasm-tauri-screenshot/runner.rs",
"/examples/wasm-tauri-screenshot/status.rs",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Async OS HAL, profiling, symbolization, and allocator instrumentation"
homepage = "https://github.com/zackees/kernal-api"
readme = "README.md"
keywords = [
"async",
"profiling",
"process",
"hal",
"diagnostics",
]
categories = [
"asynchronous",
"development-tools::profiling",
"os",
]
license = "BSD-3-Clause"
repository = "https://github.com/zackees/kernal-api"
[package.metadata.docs.rs]
features = [
"full",
"independent-spawn",
"config-toml",
"json",
"source-cpp",
"daemon-identity",
"daemon-frame-v1",
"daemon-registration",
"daemon-registration-v2",
]
rustdoc-args = [
"--cfg",
"docsrs",
]
targets = [
"aarch64-apple-darwin",
"aarch64-pc-windows-msvc",
"aarch64-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
]
[features]
allocator = ["dep:mimalloc-pprof"]
archive = [
"dep:zip",
"dep:tar",
"dep:zstd",
"dep:flate2",
]
archive-auth-test-support = [
"archive",
"dep:openssl",
"dep:tempfile",
]
command-arguments = ["dep:shell-words"]
command-schema = ["dep:clap"]
config-toml = ["dep:toml"]
conpty-sidecar = [
"pty",
"dep:dirs",
"hash-sha256",
"dep:tar",
"dep:ureq",
"dep:zstd",
]
crash = [
"snapshot",
"dep:crash-handler",
"dep:getrandom",
]
daemon-frame-v1 = ["running-process/frame-v1-codec"]
daemon-identity = ["running-process/backend-identity"]
daemon-registration = ["running-process/daemon-registration"]
daemon-registration-v2 = ["running-process/daemon-registration-v2"]
default = []
error-context = []
event-stream = [
"dep:futures-core",
"dep:tokio-stream",
"tokio-stream/sync",
]
fs = [
"dep:dirs",
"dep:globset",
"dep:jwalk",
"dep:reflink-copy",
"dep:tempfile",
]
fs-watch = ["dep:notify"]
full = [
"allocator",
"conpty-sidecar",
"crash",
"fs",
"fs-watch",
"ipc-async",
"profile",
"session-relay",
"symbolize",
"symbolize-split",
"tokio-console",
"window-icon",
]
hash-sha256 = ["dep:sha2"]
http-client = [
"dep:reqwest",
"dep:bytes",
"dep:hyper",
]
http-server = [
"dep:hyper",
"hyper/server",
"hyper/http1",
"dep:hyper-util",
"dep:http-body-util",
"dep:bytes",
"dep:futures-core",
]
independent-spawn = ["running-process/independent-spawn"]
ipc = [
"dep:dirs",
"dep:interprocess",
]
ipc-async = [
"ipc",
"interprocess/tokio",
"tokio/net",
]
json = [
"dep:serde",
"dep:serde_json",
]
profile = [
"snapshot",
"dep:flate2",
"dep:prost",
"dep:serde",
"dep:serde_json",
]
pty = [
"dep:portable-pty",
"terminal-input",
]
secure-random = ["dep:getrandom"]
session-relay = ["ipc-async"]
snapshot = [
"dep:framehop",
"dep:object",
]
source-cpp = [
"dep:tree-sitter",
"dep:tree-sitter-cpp",
]
sqlite = [
"dep:rusqlite",
"dep:tempfile",
]
symbolize = ["dep:prost"]
symbolize-split = [
"symbolize",
"dep:object",
]
symbolize-worker = [
"symbolize",
"dep:addr2line",
"dep:lzma-rs",
"dep:object",
"dep:pdb",
"dep:pdb-addr2line",
"hash-sha256",
"dep:tempfile",
"dep:url",
"dep:ureq",
]
tauri-webview = [
"dep:tauri",
"dep:tauri-runtime",
"dep:tauri-runtime-wry",
"dep:tauri-utils",
"dep:url",
"dep:wry",
"dep:webkit2gtk",
"dep:gtk",
"dep:gio",
"dep:cairo-rs",
"dep:webview2-com",
"dep:windows",
"dep:windows-core",
"dep:block2",
"dep:objc2-app-kit",
"dep:objc2-foundation",
"dep:objc2-core-foundation",
"dep:objc2-core-graphics",
"dep:objc2-image-io",
"dep:objc2-web-kit",
]
tauri-webview-test-support = [
"tauri-webview",
"dep:png",
]
terminal-input = []
terminal-style = []
text-similarity = ["dep:strsim"]
tokio-console = [
"profile",
"dep:console-api",
"dep:console-subscriber",
"dep:prost-types",
"dep:tokio-stream",
"dep:tonic",
"dep:tracing",
"dep:tracing-subscriber",
"tokio/net",
"tokio/time",
]
wasm-component-compiler-experiment = [
"wasm-component-hash-experiment",
"wit-bindgen?/async",
"wasmtime?/component-model",
"wasmtime?/component-model-async",
]
wasm-component-hash-experiment = ["dep:wit-bindgen"]
wasm-sketch-host = [
"dep:wasmtime",
"dep:wasmparser",
"fs",
]
wasm-sketch-worker = [
"wasm-sketch-host",
"dep:tempfile",
"dep:cap-std",
]
wasm-sketch-worker-test-support = ["wasm-sketch-worker"]
websocket = [
"http-server",
"dep:futures-util",
"dep:tokio-tungstenite",
]
window-icon = [
"dep:png",
"dep:x11rb",
]
[lib]
name = "kernal_api"
path = "src/lib.rs"
[[bin]]
name = "kernal-api-wasm-tauri"
path = "examples/wasm-tauri-screenshot/runner.rs"
required-features = [
"wasm-sketch-worker",
"tauri-webview",
]
[[bin]]
name = "kernal-symbolize"
path = "src/bin/kernal-symbolize.rs"
required-features = ["symbolize-worker"]
[[bin]]
name = "kernal-tauri-smoke"
path = "src/bin/kernal-tauri-smoke.rs"
required-features = ["tauri-webview-test-support"]
[[bin]]
name = "kernal-wasm-worker"
path = "src/bin/kernal-wasm-worker.rs"
required-features = ["wasm-sketch-worker"]
[[example]]
name = "wasm-admission"
path = "examples/wasm-admission.rs"
required-features = ["wasm-sketch-host"]
[[test]]
name = "allocator_heap_profile"
path = "tests/allocator_heap_profile.rs"
[[test]]
name = "daemon"
path = "tests/daemon/main.rs"
[[test]]
name = "data"
path = "tests/data/main.rs"
[[test]]
name = "diagnostics"
path = "tests/diagnostics/main.rs"
[[test]]
name = "fs"
path = "tests/fs/main.rs"
[[test]]
name = "net"
path = "tests/net/main.rs"
[[test]]
name = "process"
path = "tests/process/main.rs"
[[test]]
name = "source_policy"
path = "tests/source_policy/main.rs"
[[test]]
name = "terminal"
path = "tests/terminal/main.rs"
[[test]]
name = "wasm"
path = "tests/wasm/main.rs"
[[test]]
name = "wasm_tauri_screenshot"
path = "tests/wasm_tauri_screenshot.rs"
[[test]]
name = "wasm_worker_containment"
path = "tests/wasm_worker_containment.rs"
[dependencies.bytes]
version = "=1.12.1"
optional = true
[dependencies.cap-std]
version = "=4.0.3"
optional = true
[dependencies.clap]
version = "=4.6.0"
features = [
"std",
"string",
]
optional = true
[dependencies.console-api]
version = "=0.9.0"
optional = true
[dependencies.console-subscriber]
version = "=0.5.0"
optional = true
[dependencies.crash-handler]
version = "=0.7.0"
optional = true
[dependencies.dirs]
version = "=6.0.0"
optional = true
[dependencies.flate2]
version = "=1.1.9"
optional = true
[dependencies.framehop]
version = "=0.13.3"
optional = true
[dependencies.futures-core]
version = "=0.3.34"
optional = true
[dependencies.futures-util]
version = "=0.3.34"
features = ["sink"]
optional = true
default-features = false
[dependencies.getrandom]
version = "=0.4.3"
optional = true
[dependencies.globset]
version = "=0.4.18"
optional = true
[dependencies.http-body-util]
version = "=0.1.5"
optional = true
[dependencies.hyper]
version = "=1.11.0"
optional = true
default-features = false
[dependencies.hyper-util]
version = "=0.1.20"
features = ["tokio"]
optional = true
default-features = false
[dependencies.interprocess]
version = "=2.4.3"
optional = true
[dependencies.jwalk]
version = "=0.8.1"
optional = true
[dependencies.mimalloc-pprof]
version = "=0.9.4"
optional = true
[dependencies.openssl]
version = "=0.10.81"
features = ["vendored"]
optional = true
[dependencies.png]
version = "=0.17.16"
optional = true
[dependencies.portable-pty]
version = "=0.9.0"
optional = true
[dependencies.prost]
version = "=0.14.4"
optional = true
[dependencies.prost-types]
version = "=0.14.4"
optional = true
[dependencies.reflink-copy]
version = "=0.1.30"
optional = true
[dependencies.reqwest]
version = "=0.12.28"
features = ["default-tls"]
optional = true
default-features = false
[dependencies.rusqlite]
version = "=0.40.2"
features = [
"bundled",
"backup",
]
optional = true
default-features = false
[dependencies.serde]
version = "=1.0.229"
features = ["derive"]
optional = true
[dependencies.serde_json]
version = "=1.0.151"
features = ["raw_value"]
optional = true
[dependencies.sha2]
version = "=0.10.9"
optional = true
[dependencies.shell-words]
version = "=1.1.1"
optional = true
[dependencies.strsim]
version = "=0.11.1"
optional = true
[dependencies.tar]
version = "=0.4.46"
optional = true
default-features = false
[dependencies.tempfile]
version = "=3.27.0"
optional = true
[dependencies.thiserror]
version = "=2.0.20"
[dependencies.tokio-stream]
version = "=0.1.19"
optional = true
[dependencies.tokio-tungstenite]
version = "=0.28.0"
features = ["handshake"]
optional = true
default-features = false
[dependencies.toml]
version = "=0.8.23"
optional = true
[dependencies.tonic]
version = "=0.14.6"
features = [
"codegen",
"transport",
]
optional = true
default-features = false
[dependencies.tracing]
version = "=0.1.44"
optional = true
[dependencies.tracing-subscriber]
version = "=0.3.23"
optional = true
[dependencies.tree-sitter]
version = "=0.26.11"
optional = true
[dependencies.tree-sitter-cpp]
version = "=0.23.4"
optional = true
[dependencies.ureq]
version = "=2.12.1"
features = ["tls"]
optional = true
default-features = false
[dependencies.url]
version = "=2.5.8"
optional = true
[dependencies.wasmparser]
version = "=0.248.0"
optional = true
default-features = false
[dependencies.wasmtime]
version = "=45.0.0"
features = [
"async",
"cranelift",
"runtime",
"threads",
]
optional = true
default-features = false
[dependencies.zip]
version = "=2.4.2"
optional = true
[dependencies.zstd]
version = "=0.13.3"
optional = true
default-features = false
[dev-dependencies.native-tls]
version = "=0.2.18"
[dev-dependencies.tempfile]
version = "=3.27.0"
[dev-dependencies.tokio]
version = "=1.53.1"
features = [
"macros",
"rt-multi-thread",
"test-util",
"time",
]
[build-dependencies.toml]
version = "=0.8.23"
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies.notify]
version = "=7.0.0"
optional = true
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies.object]
version = "=0.36.7"
features = [
"read",
"std",
]
optional = true
default-features = false
[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))'.dependencies.tauri]
version = "=2.11.5"
optional = true
default-features = false
[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))'.dependencies.tauri-runtime]
version = "=2.11.3"
optional = true
[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))'.dependencies.tauri-runtime-wry]
version = "=2.11.4"
optional = true
default-features = false
[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))'.dependencies.tauri-utils]
version = "=2.9.3"
optional = true
[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))'.dependencies.wry]
version = "=0.57.0"
features = ["os-webview"]
optional = true
default-features = false
[target.'cfg(not(target_family = "wasm"))'.dependencies.blake3]
version = "=1.8.7"
features = ["rayon"]
[target.'cfg(not(target_family = "wasm"))'.dependencies.memmap2]
version = "=0.9.11"
[target.'cfg(not(target_family = "wasm"))'.dependencies.running-process]
version = "=4.10.14"
features = ["kernel-substrate"]
default-features = false
[target.'cfg(not(target_family = "wasm"))'.dependencies.sysinfo]
version = "=0.30.13"
[target.'cfg(not(target_family = "wasm"))'.dependencies.tokio]
version = "=1.53.1"
features = [
"fs",
"io-util",
"macros",
"net",
"process",
"rt",
"rt-multi-thread",
"signal",
"sync",
"time",
]
default-features = false
[target.'cfg(target_family = "wasm")'.dependencies.wit-bindgen]
version = "=0.58.0"
features = [
"macros",
"realloc",
"std",
]
optional = true
default-features = false
[target.'cfg(target_os = "linux")'.dependencies.addr2line]
version = "=0.24.2"
features = [
"std",
"loader",
]
optional = true
default-features = false
[target.'cfg(target_os = "linux")'.dependencies.cairo-rs]
version = "=0.18.5"
features = ["png"]
optional = true
[target.'cfg(target_os = "linux")'.dependencies.gio]
version = "=0.18.4"
optional = true
[target.'cfg(target_os = "linux")'.dependencies.gtk]
version = "=0.18.2"
optional = true
[target.'cfg(target_os = "linux")'.dependencies.lzma-rs]
version = "=0.3.0"
optional = true
[target.'cfg(target_os = "linux")'.dependencies.webkit2gtk]
version = "=2.0.2"
features = ["v2_40"]
optional = true
[target.'cfg(target_os = "linux")'.dependencies.x11rb]
version = "=0.13.2"
optional = true
[target.'cfg(target_os = "macos")'.dependencies.addr2line]
version = "=0.24.2"
features = [
"std",
"loader",
]
optional = true
default-features = false
[target.'cfg(target_os = "macos")'.dependencies.block2]
version = "=0.6.2"
optional = true
[target.'cfg(target_os = "macos")'.dependencies.lzma-rs]
version = "=0.3.0"
optional = true
[target.'cfg(target_os = "macos")'.dependencies.mach2]
version = "=0.4.3"
[target.'cfg(target_os = "macos")'.dependencies.objc2-app-kit]
version = "=0.3.2"
features = [
"std",
"NSImage",
"NSImageRep",
"NSGraphicsContext",
"NSView",
"NSWindow",
"objc2-core-graphics",
]
optional = true
default-features = false
[target.'cfg(target_os = "macos")'.dependencies.objc2-core-foundation]
version = "=0.3.2"
features = [
"std",
"CFString",
]
optional = true
default-features = false
[target.'cfg(target_os = "macos")'.dependencies.objc2-core-graphics]
version = "=0.3.2"
features = [
"std",
"CGDataConsumer",
"CGImage",
]
optional = true
default-features = false
[target.'cfg(target_os = "macos")'.dependencies.objc2-foundation]
version = "=0.3.2"
features = [
"std",
"NSError",
]
optional = true
default-features = false
[target.'cfg(target_os = "macos")'.dependencies.objc2-image-io]
version = "=0.3.2"
features = [
"std",
"CGImageDestination",
"objc2-core-graphics",
]
optional = true
default-features = false
[target.'cfg(target_os = "macos")'.dependencies.objc2-web-kit]
version = "=0.3.2"
features = [
"std",
"WKWebView",
"WKSnapshotConfiguration",
"block2",
]
optional = true
default-features = false
[target."cfg(unix)".dependencies.libc]
version = "=0.2.189"
[target."cfg(windows)".dependencies.libc]
version = "=0.2.189"
[target."cfg(windows)".dependencies.object]
version = "=0.36.7"
features = [
"read",
"std",
]
optional = true
default-features = false
[target."cfg(windows)".dependencies.pdb]
version = "=0.8.0"
optional = true
[target."cfg(windows)".dependencies.pdb-addr2line]
version = "=0.12.1"
optional = true
[target."cfg(windows)".dependencies.webview2-com]
version = "=0.39.1"
optional = true
[target."cfg(windows)".dependencies.widestring]
version = "=1.2.1"
[target."cfg(windows)".dependencies.winapi]
version = "=0.3.9"
features = [
"consoleapi",
"errhandlingapi",
"fileapi",
"handleapi",
"ioapiset",
"jobapi2",
"memoryapi",
"minwindef",
"namedpipeapi",
"processenv",
"processthreadsapi",
"psapi",
"securitybaseapi",
"synchapi",
"tlhelp32",
"winbase",
"wincon",
"wincontypes",
"windef",
"winerror",
"winnt",
"winuser",
]
[target."cfg(windows)".dependencies.windows]
version = "=0.62.2"
features = [
"Win32_System_Com",
"Win32_Foundation",
]
optional = true
[target."cfg(windows)".dependencies.windows-core]
version = "=0.62.2"
optional = true
[target."cfg(windows)".dependencies.windows-sys]
version = "=0.61.2"
features = [
"Wdk_System_Threading",
"Win32_Foundation",
"Win32_Security",
"Win32_Security_Authorization",
"Win32_Storage_FileSystem",
"Win32_System_Console",
"Win32_System_Diagnostics_Debug",
"Win32_System_Environment",
"Win32_System_IO",
"Win32_System_JobObjects",
"Win32_System_Kernel",
"Win32_System_LibraryLoader",
"Win32_System_Memory",
"Win32_System_Pipes",
"Win32_System_Registry",
"Win32_System_SystemInformation",
"Win32_System_Threading",
]
[lints.rust]
warnings = "deny"
[profile.dev]
codegen-units = 1
[profile.test]
codegen-units = 1