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