Project

General

Profile

Actions

Bug #7667

closed
PA PA

rust: move extern C definitions to suricata_sys and bindgen

Bug #7667: rust: move extern C definitions to suricata_sys and bindgen

Added by Philippe Antoine about 1 year ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Target version:
Affected Versions:
Effort:
Difficulty:
Label:

Description

For example rust/src/detect/mod.rs has quite some functions /// cbindgen:ignore extern "C" function definitions like DetectBufferSetActiveList

These should come from suricata_sys with the help of bindgen


Related issues 3 (1 open2 closed)

Blocks Suricata - Story #7148: extensibility: pluginsClosedVictor JulienActions
Blocks Suricata - Feature #7666: rust: zero-dependency crate suricata-ffiIn ProgressPhilippe AntoineActions
Copied to Suricata - Optimization #7762: rust: finish moving extern C definitions to suricata_sys and bindgenClosedPhilippe AntoineActions

PA Updated by Philippe Antoine about 1 year ago Actions #1

  • Status changed from New to In Progress

PA Updated by Philippe Antoine 12 months ago Actions #3

  • Target version changed from 9.0.0-beta1 to 8.0.0-rc1

VJ Updated by Victor Julien 11 months ago Actions #6

  • Parent task deleted (#7666)

VJ Updated by Victor Julien 11 months ago Actions #7

PA Updated by Philippe Antoine 11 months ago Actions #8

  • Blocks Feature #7666: rust: zero-dependency crate suricata-ffi added

PA Updated by Philippe Antoine 11 months ago · Edited Actions #12

Looking at some remaining cbindgen:ignore
- applayer.rs : will need a suricata_core crate or another hack to avoid redefining the AppLayerTxData and other types defined in rust
- core.rs : I think it deserves a ticket to get rid of SuricataContext with some :#[cfg(test)]. magic
- datasets.rs : I think it deserves a ticket to switch to rust hash maps instead of C ones
- filecontainer.rs : util-file.h mixes some rust and C, so kind of same difficulty as applayer.rs
- frames.rs : same C-rust mix

PA Updated by Philippe Antoine 11 months ago Actions #13

  • Target version changed from 8.0.0-rc1 to 9.0.0-beta1

PA Updated by Philippe Antoine 10 months ago Actions #15

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

JI Updated by Jason Ish 10 months ago Actions #16

Maybe close this with a target of 8.0.0-rc1 as a lot was done. Open a new ticket for 9.0, with subtasks if needed (if some are more complicated than others).

VJ Updated by Victor Julien 10 months ago Actions #17

  • Status changed from In Progress to Closed
  • Target version changed from 9.0.0-beta1 to 8.0.0-rc1

PA Updated by Philippe Antoine 10 months ago Actions #18

  • Copied to Optimization #7762: rust: finish moving extern C definitions to suricata_sys and bindgen added

JI Updated by Jason Ish 7 months ago · Edited Actions #19

  • Status changed from Closed to In Review

JI Updated by Jason Ish 7 months ago Actions #20

  • Status changed from In Review to Closed
Actions

Also available in: PDF Atom