[package]
name = "ax-feat"
version = "0.5.18"
repository = "https://github.com/rcore-os/tgoskits"
edition.workspace = true
authors = ["Yuekai Jia <equation618@gmail.com>"]
description = "Top-level feature selection for ArceOS"
license.workspace = true

[features]
default = ["alloc"]

# Multicore
smp = ["ax-hal/smp", "ax-runtime/smp", "ax-task?/smp", "ax-kspin/smp"]

# Floating point/SIMD
fp-simd = ["ax-hal/fp-simd"]
xuantie-c9xx = ["ax-hal/xuantie-c9xx"]

# User space support
uspace = ["ax-hal/uspace", "ax-task?/uspace"]
hv = ["ax-hal/hv"]

# Interrupts
irq = ["ax-hal/irq", "ax-runtime/irq", "ax-task?/irq", "ax-driver?/irq"]
ipi = ["irq", "dep:ax-ipi", "ax-hal/ipi", "ax-runtime/ipi", "ax-task?/ipi"]

# Custom or default platforms
ext-ld = ["ax-runtime/ext-ld"]
myplat = ["ax-hal/myplat"]
defplat = ["ax-hal/defplat"]
plat-dyn = [
    "paging",
    "ax-runtime/plat-dyn",
    "ax-config/plat-dyn",
]

# Memory
alloc = ["ax-alloc"]
paging = ["ax-hal/paging", "ax-runtime/paging"]
tls = ["ax-hal/tls", "ax-runtime/tls", "ax-task?/tls"]
dma = ["paging"]

# Multi-threading and scheduler
multitask = [
    "ax-task/multitask",
    "ax-sync/multitask",
    "ax-runtime/multitask",
]
lockdep = ["multitask", "ax-sync/lockdep", "ax-kspin/lockdep"]
task-ext = ["ax-task/task-ext"]
tracepoint-hooks = ["ax-task/tracepoint-hooks"]
sched-fifo = ["ax-task/sched-fifo"]
sched-rr = ["ax-task/sched-rr", "irq"]
sched-cfs = ["ax-task/sched-cfs", "irq"]
stack-guard-page = [
    "ipi",
    "multitask",
    "paging",
    "ax-task/stack-guard-page",
    "ax-runtime/stack-guard-page",
]

# File system
fs = [
    "paging",
    "dep:ax-fs",
    "ax-runtime/fs",
] # TODO: try to remove "paging"
fs-ng = ["paging", "dep:ax-fs-ng", "ax-runtime/fs-ng"]
fs-ng-ext4 = ["fs-ng", "ax-fs-ng/ext4", "ax-runtime/fs-ng-ext4"]
fs-ng-fat = ["fs-ng", "ax-fs-ng/fat", "ax-runtime/fs-ng-fat"]
fs-ng-times = ["fs-ng", "ax-fs-ng/times"]

# Networking
net = [
    "paging",
    "irq",
    "multitask",
    "dep:ax-net",
    "ax-runtime/net",
]
net-ng = ["paging", "irq", "multitask", "dep:ax-net-ng", "ax-runtime/net-ng"]
vsock = ["ax-runtime/vsock"]

# Display
display = [
    "paging",
    "dep:ax-display",
    "ax-runtime/display",
]

# Input
input = [
    "paging",
    "dep:ax-input",
    "ax-runtime/input",
]

# Real Time Clock (RTC) Driver.
rtc = ["ax-hal/rtc", "ax-runtime/rtc"]

# Backtrace
backtrace = ["axbacktrace/alloc"]
dwarf = ["axbacktrace/dwarf"]

[dependencies]
ax-alloc = { workspace = true, optional = true }
axbacktrace.workspace = true
ax-config = { workspace = true, optional = true }
ax-driver = { workspace = true, optional = true }
ax-display = { workspace = true, optional = true }
ax-fs = { workspace = true, optional = true }
ax-fs-ng = { workspace = true, optional = true }
ax-hal.workspace = true
ax-input = { workspace = true, optional = true }
ax-ipi = { workspace = true, optional = true }
ax-log.workspace = true
ax-net = { workspace = true, optional = true }
ax-net-ng = { workspace = true, optional = true }
ax-runtime.workspace = true
ax-sync = { workspace = true, optional = true }
ax-task = { workspace = true, optional = true }
ax-kspin = { workspace = true, optional = true }
