Project

General

Profile

Actions

Bug #7667

closed

rust: move extern C definitions to suricata_sys and bindgen

Added by Philippe Antoine 2 months ago. Updated 18 days 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 (3 open0 closed)

Blocks Suricata - Story #7148: extensibility: pluginsNewVictor JulienActions
Blocks Suricata - Bug #7666: rust: zero-dependency crate suricata-coreNewPhilippe AntoineActions
Copied to Suricata - Bug #7762: rust: finish moving extern C definitions to suricata_sys and bindgenIn ProgressPhilippe AntoineActions
Actions #1

Updated by Philippe Antoine 2 months ago

  • Status changed from New to In Progress
Actions #3

Updated by Philippe Antoine about 2 months ago

  • Target version changed from 9.0.0-beta1 to 8.0.0-rc1
Actions #6

Updated by Victor Julien about 1 month ago

  • Parent task deleted (#7666)
Actions #7

Updated by Victor Julien about 1 month ago

Actions #8

Updated by Philippe Antoine about 1 month ago

  • Blocks Bug #7666: rust: zero-dependency crate suricata-core added
Actions #12

Updated by Philippe Antoine 21 days ago · Edited

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

Actions #13

Updated by Philippe Antoine 21 days ago

  • Target version changed from 8.0.0-rc1 to 9.0.0-beta1
Actions #15

Updated by Philippe Antoine 19 days 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

Actions #16

Updated by Jason Ish 19 days ago

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).

Actions #17

Updated by Victor Julien 18 days ago

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

Updated by Philippe Antoine 16 days ago

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

Also available in: Atom PDF