support ebpf with https://github.com/aya-rs/aya?
basically i mean making s2n as an ebpf
You're wanting to compile the entire library as a eBPF program? What are you hoping to gain by doing that? Even if it were possible (it's definitely not in its current state) the outcome would definitely be slower than it is now.
because...
https://speakerdeck.com/pantuza/equic-gateway-maximizing-quic-throughput-using-a-gateway-service-based-on-ebpf-plus-xdp?slide=16
https://github.com/pantuza/equic
basically i mean making s2n as an ebpf
I don't think this proposes making s2n an eBPF program. According to the slides linked, possibly this could offload one of s2n-quic's gateway services like connection quotas (but possibly also encryption offload and HTTP request rate-limiting) to the kernel via eBPF.
It doesn't seem like a terrible idea, but I'm not sure to what degree the kernel module must communicate with s2n-quic. It seems it would be different for each type of offloading.
BPF itself doesn't magically make things faster. The potential advantage comes from where it is executed. That being said, outside of XDP, there aren't a whole lot of things that could be moved into BPF. Encryption would be much slower since you don't have any intrinsics. And without a fast communication channel between the bpf program and userspace we'd likely make things worse.