Actions
Optimization #3524
closed
PA
Remove unsafe Rust code for ALPROTO_X constants
Optimization #3524:
Remove unsafe Rust code for ALPROTO_X constants
Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
Effort:
Difficulty:
Label:
Description
Now, these constants are defined in C enumeration `AppProtoEnum`
In Rust, we use a global variable ('`static mut`) whose value we get as a return of a C function call.
As a global variable, we must use `unsafe` every time we read it
We should either :
- export these from C to Rust with bindgen
- move this enum to Rust and export it to C with cbindgen (cbindgen is already used)
Actions