Optimization #7762
openrust: finish moving extern C definitions to suricata_sys and bindgen
Updated by Philippe Antoine 7 months ago
- Copied from Bug #7667: rust: move extern C definitions to suricata_sys and bindgen added
Updated by Philippe Antoine 7 months ago
applayer.rs and frames.rs share the same problem : we want to bindgen a C function like `AppLayerFrameNewByRelativeOffset` which uses as argument of type `StreamSlice` which is defined in rust
This is going to be the difficult part.
There are some easier things to do first
Updated by Philippe Antoine 7 months ago
- Blocks Feature #7666: rust: zero-dependency crate suricata-core added
Updated by Philippe Antoine 6 months ago
- Tracker changed from Bug to Optimization
Updated by Philippe Antoine 6 months ago
- Related to Optimization #4517: cbindgen export the constants from Rust to C, also for macro such as BIT_U8(1), and remove duplicate definitions between rust and C added
Updated by Philippe Antoine 4 months ago
Goal : makegit grep 'extern "C" {' rust/src/
return nothing
Updated by Philippe Antoine about 2 months ago
AppLayerRegisterParser difficulty is that AppLayerParserFPtr uses StreamSlice as an argument and it is defined in rust...
Updated by Philippe Antoine about 1 month ago ยท Edited
Philippe Antoine wrote in #note-7:
AppLayerRegisterParser difficulty is that AppLayerParserFPtr uses StreamSlice as an argument and it is defined in rust...
Solutions :
- move StreamSlice definition to C
- Have function prototype use a void*, then cast
- AppLayerEventType
- AppLayerGetFileState
- AppLayerGetTxIterTuple
- AppLayerTxData
- AppLayerTxConfig
- AppLayerStateData
@Jason Ish, what do you think about moving definitions to C ?
Updated by Philippe Antoine 18 days ago
- Status changed from In Progress to In Review
Updated by Philippe Antoine 18 days ago
- Copied to Optimization #8187: rust: move extern C definition to suricata-lua-sys and bindgen added