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 3 months ago
Goal : makegit grep 'extern "C" {' rust/src/
return nothing
Updated by Philippe Antoine 25 days ago
AppLayerRegisterParser difficulty is that AppLayerParserFPtr uses StreamSlice as an argument and it is defined in rust...
Updated by Philippe Antoine 18 days 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 ?