xref: /DragonOS/kernel/crates/rbpf/Cargo.toml (revision fae6e9ade46a52976ad5d099643d51cc20876448)
1[package]
2
3# Project metadata
4name = "rbpf"
5version = "0.2.0"
6authors = ["Quentin <quentin@isovalent.com>"]
7
8# Additional metadata for packaging
9description = "Virtual machine and JIT compiler for eBPF programs"
10repository = "https://github.com/qmonnet/rbpf"
11readme = "README.md"
12keywords = ["BPF", "eBPF", "interpreter", "JIT", "filtering"]
13license = "Apache-2.0/MIT"
14edition = "2021"
15
16# Packaging directives
17include = [
18    "src/**",
19    "examples/**",
20    "tests/**",
21    "bench/**",
22    "LICENSE*",
23    "Cargo.toml",
24]
25
26[dependencies]
27
28# Default features (std) are disabled so that the dependencies don't pull in the
29# standard library when the crate is compiled for no_std
30byteorder = { version = "1.2", default-features = false }
31log = {version = "0.4.21", default-features = false }
32combine = { version = "4.6", default-features = false }
33
34# Optional Dependencies when using the standard library
35libc = { version = "0.2", optional = true }
36time = { version = "0.2", optional = true }
37
38# Optional Dependencies for the CraneLift JIT
39cranelift-codegen = { version = "0.99", optional = true }
40cranelift-frontend = { version = "0.99", optional = true }
41cranelift-jit = { version = "0.99", optional = true }
42cranelift-native = { version = "0.99", optional = true }
43cranelift-module = { version = "0.99", optional = true }
44
45[dev-dependencies]
46
47elf = "0.0.10"
48json = "0.11"
49hex = "0.4.3"
50
51[features]
52#default = ["std", "user", "cranelift"]
53cargo-clippy = []
54std = ["dep:time", "dep:libc", "combine/std"]
55cranelift = [
56    "dep:cranelift-codegen",
57    "dep:cranelift-frontend",
58    "dep:cranelift-jit",
59    "dep:cranelift-native",
60    "dep:cranelift-module",
61]
62user = []
63
64# Examples that depend on the standard library should be disabled when
65# testing the `no_std` configuration.
66[[example]]
67name = "disassemble"
68required-features = ["std"]
69
70[[example]]
71name = "uptime"
72required-features = ["std"]
73
74[[example]]
75name = "to_json"
76
77[[example]]
78name = "rbpf_plugin"
79