4
0

Cargo.toml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. # Packaging directives
  13. include = [
  14. "src/**",
  15. "examples/**",
  16. "tests/**",
  17. "bench/**",
  18. "LICENSE*",
  19. "Cargo.toml",
  20. ]
  21. [dependencies]
  22. # Default features (std) are disabled so that the dependencies don't pull in the
  23. # standard library when the crate is compiled for no_std
  24. byteorder = { version = "1.2", default-features = false }
  25. log = {version = "0.4.21", default-features = false }
  26. combine = { version = "4.6", default-features = false }
  27. # Optional Dependencies when using the standard library
  28. libc = { version = "0.2", optional = true }
  29. time = { version = "0.2", optional = true }
  30. # Optional Dependencies for the CraneLift JIT
  31. cranelift-codegen = { version = "0.99", optional = true }
  32. cranelift-frontend = { version = "0.99", optional = true }
  33. cranelift-jit = { version = "0.99", optional = true }
  34. cranelift-native = { version = "0.99", optional = true }
  35. cranelift-module = { version = "0.99", optional = true }
  36. [dev-dependencies]
  37. elf = "0.0.10"
  38. json = "0.11"
  39. hex = "0.4.3"
  40. [features]
  41. default = ["std"]
  42. std = ["dep:time", "dep:libc", "combine/std"]
  43. cranelift = [
  44. "dep:cranelift-codegen",
  45. "dep:cranelift-frontend",
  46. "dep:cranelift-jit",
  47. "dep:cranelift-native",
  48. "dep:cranelift-module",
  49. ]
  50. # Examples that depend on the standard library should be disabled when
  51. # testing the `no_std` configuration.
  52. [[example]]
  53. name = "disassemble"
  54. required-features = ["std"]
  55. [[example]]
  56. name = "load_elf"
  57. required-features = ["std"]
  58. [[example]]
  59. name = "uptime"
  60. required-features = ["std"]
  61. [[example]]
  62. name = "to_json"
  63. [[example]]
  64. name = "rbpf_plugin"
  65. [[example]]
  66. name = "allowed_memory"