cffff273a1 
								
							
								 
							
						 
						
							
							
								
								aya-gen: fix lint  👀  
							
							
							
						 
						
							3 years ago  
				
					
						
							
							
								 
						
							
							
								e675e51bd9 
								
							
								 
							
						 
						
							
							
								
								aya-gen: re-export generate::{InputFile, generate}  
							
							
							
						 
						
							3 years ago  
				
					
						
							
							
								 
						
							
							
								68bc11e42c 
								
									
								
							
								 
							
						 
						
							
							
								
								aya-gen cli rework ( #297 )  
							
							... 
							
							
							
							* update aya-gen from structopt to clap 3
* aya-gen: add --header option
* aya-gen: run bindgen as a child process
* aya-gen: add support for passing additional bindgen args 
							
						 
						
							3 years ago  
				
					
						
							
							
								 
						
							
							
								ddf26300c8 
								
							
								 
							
						 
						
							
							
								
								build(deps): update bindgen requirement from 0.59 to 0.60  
							
							... 
							
							
							
							Updates the requirements on [bindgen](https://github.com/rust-lang/rust-bindgen ) to permit the latest version.
- [Release notes](https://github.com/rust-lang/rust-bindgen/releases )
- [Changelog](https://github.com/rust-lang/rust-bindgen/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/rust-bindgen/compare/v0.59.0...v0.60.1 )
---
updated-dependencies:
- dependency-name: bindgen
  dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com> 
							
						 
						
							3 years ago  
				
					
						
							
							
								 
						
							
							
								9a33b6b654 
								
							
								 
							
						 
						
							
							
								
								aya-gen: Remove getters  
							
							... 
							
							
							
							Signed-off-by: Dave Tucker <dave@dtucker.co.uk> 
							
						 
						
							3 years ago  
				
					
						
							
							
								 
						
							
							
								bd336acb02 
								
							
								 
							
						 
						
							
							
								
								aya-gen: Disable Debug derive for BTF types  
							
							... 
							
							
							
							It's a workaround for the upstream bindgen issue:
https://github.com/rust-lang/rust-bindgen/issues/2083 
tl;dr: Rust nightly complains about #[repr(packed)] structs deriving
Debug without Copy.
It needs to be fixed properly upstream, but for now we have to disable
Debug derive here.
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com> 
							
						 
						
							4 years ago  
				
					
						
							
							
								 
						
							
							
								37afde3fca 
								
							
								 
							
						 
						
							
							
								
								aya-gen: fix lint error  
							
							
							
						 
						
							4 years ago  
				
					
						
							
							
								 
						
							
							
								4fcb1d75b9 
								
							
								 
							
						 
						
							
							
								
								aya-gen: bump bindgen to 0.59  
							
							
							
						 
						
							4 years ago  
				
					
						
							
							
								 
						
							
							
								ca14306860 
								
							
								 
							
						 
						
							
							
								
								aya-gen: use aya_bpf::cty instead of aya_bpf_cty  
							
							... 
							
							
							
							This avoids having to add an explicit extra dep on aya-bpf-cty in ebpf
programs 
							
						 
						
							4 years ago  
				
					
						
							
							
								 
						
							
							
								1159741eda 
								
							
								 
							
						 
						
							
							
								
								aya-gen: fix clippy warnings  
							
							
							
						 
						
							4 years ago  
				
					
						
							
							
								 
						
							
							
								9595bd4571 
								
							
								 
							
						 
						
							
							
								
								aya-gen: don't generate doc comments  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								4dccd840ca 
								
							
								 
							
						 
						
							
							
								
								aya-gen: rename binary from main to aya-gen  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								29f2d9b2d9 
								
							
								 
							
						 
						
							
							
								
								aya: switch to rustified enums  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								bdca32cebf 
								
							
								 
							
						 
						
							
							
								
								aya-bpf-bindings: fix anonymous enums  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								08d4b1aeda 
								
							
								 
							
						 
						
							
							
								
								aya-gen: add bindgen builder for userspace code  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								d9c3489165 
								
							
								 
							
						 
						
							
							
								
								aya-gen: rename probe_read_getter to read_getter  
							
							... 
							
							
							
							The same code can be used to wrap with preserve_access_index() 
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								99447bcc0d 
								
							
								 
							
						 
						
							
							
								
								aya-gen: add bindgen module and utils to write to file  
							
							
							
						 
						
							5 years ago  
				
					
						
							
							
								 
						
							
							
								b66a73f6c7 
								
							
								 
							
						 
						
							
							
								
								Add aya-gen  
							
							... 
							
							
							
							aya-gen can be used to generate bindings for kernel types, eg:
	aya-gen btf-types ethhdr --probe-read-getters
Will generate:
	// ...
	#[repr(C)]
	#[derive(Debug, Copy, Clone)]
	pub struct ethhdr {
	    pub h_dest: [::aya_bpf_cty::c_uchar; 6usize],
	    pub h_source: [::aya_bpf_cty::c_uchar; 6usize],
	    pub h_proto: __be16,
	}
	impl ethhdr {
	    pub fn h_dest(&self) -> Option<[::aya_bpf_cty::c_uchar; 6usize]> {
		unsafe { ::aya_bpf::helpers::bpf_probe_read(&self.h_dest) }.ok()
	    }
	    pub fn h_source(&self) -> Option<[::aya_bpf_cty::c_uchar; 6usize]> {
		unsafe { ::aya_bpf::helpers::bpf_probe_read(&self.h_source) }.ok()
	    }
	    pub fn h_proto(&self) -> Option<__be16> {
		unsafe { ::aya_bpf::helpers::bpf_probe_read(&self.h_proto) }.ok()
	    }
	} 
							
						 
						
							5 years ago