Cargo.toml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. [dev-dependencies]
  38. elf = "0.0.10"
  39. json = "0.11"
  40. hex = "0.4.3"
  41. [features]
  42. default = ["std"]
  43. std = ["dep:time", "dep:libc", "combine/std"]
  44. cranelift = [
  45. "dep:cranelift-codegen",
  46. "dep:cranelift-frontend",
  47. "dep:cranelift-jit",
  48. "dep:cranelift-native",
  49. "dep:cranelift-module",
  50. ]
  51. # Examples that depend on the standard library should be disabled when
  52. # testing the `no_std` configuration.
  53. [[example]]
  54. name = "disassemble"
  55. required-features = ["std"]
  56. [[example]]
  57. name = "load_elf"
  58. required-features = ["std"]
  59. [[example]]
  60. name = "uptime"
  61. required-features = ["std"]
  62. [[example]]
  63. name = "to_json"
  64. [[example]]
  65. name = "rbpf_plugin"
  66. [[example]]
  67. name = "allowed_memory"