Cargo.toml 2.1 KB

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