Skip to content

Zig virtual machine for eBPF programs.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

anoushk1234/zig-ebpf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eBPF in Zig ⚡️

This is a wip implementation of eBPF in native Zig inspired by Quentin Monnet's rbpf. This is different from existing zig eBPF libraries as it implements the ISA natively in zig without depending on libbpf or any C modules.

What works

  • 64-bit ALU operations
  • Memory operations
  • Byteswap operations
  • Branch instructions (needs more testing)
  • Syscalls
  • JIT Compiler
  • Assembler (needs more testing)
  • Disassembler
  • Unit Tests & Fuzzing

Why

Short answer: I was bored

Long answer: I wanted to work on something low level and complex, and also I really like Zig and wanted an excuse to write a large-ish project in it. I was inspired by Quentin Monnet and Solana Labs's work in rbpf and thought there should be a native Zig eBPF implementation. So I wanted to learn, experiment and have some fun in open source.

Contribution and Feedback

The author of this repo is new to Zig so if you feel there can be some improvements in making the code more idiomatic then PRs are welcome!

Following in the footsteps of rbpf, this project expects new commits to be coveryed by the Developer's Ceritificate of Origin.

License

zig-ebpf is distributed under both MIT License and Apache License(Version 2.0).

About

Zig virtual machine for eBPF programs.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages