rust/ffi: stub out a rust ffi crate

This crate is for Rust wrappers around the -sys crate which includes
only raw bindings. This is the place to add nice wrappers around those
bindings, however it should remain clear of dependencies on the main
Suricata core crates.

Ticket: #7666
pull/14806/head
Jason Ish 9 months ago committed by Victor Julien
parent e9611a4d7c
commit 2c51744ccc

@ -112,3 +112,6 @@ jobs:
# does not work in other subdirectories for now
- run: cargo fmt --check
working-directory: rust/htp
# The ffi crate is cargo fmt clean.
- run: cargo fmt --check
working-directory: rust/ffi

@ -2558,6 +2558,7 @@ AM_CONDITIONAL([BUILD_SHARED_LIBRARY], [test "x$enable_shared" = "xyes"] && [tes
AC_CONFIG_FILES(Makefile src/Makefile rust/Makefile rust/Cargo.lock rust/Cargo.toml rust/derive/Cargo.toml rust/.cargo/config.toml)
AC_CONFIG_FILES(rust/sys/Makefile rust/sys/Cargo.toml)
AC_CONFIG_FILES(rust/ffi/Makefile rust/ffi/Cargo.toml)
AC_CONFIG_FILES(rust/suricatactl/Makefile rust/suricatactl/Cargo.toml)
AC_CONFIG_FILES(rust/suricatasc/Makefile rust/suricatasc/Cargo.toml)
AC_CONFIG_FILES(rust/htp/Makefile rust/htp/Cargo.toml)

@ -1603,6 +1603,10 @@ dependencies = [
"syn 1.0.109",
]
[[package]]
name = "suricata-ffi"
version = "9.0.0-dev"
[[package]]
name = "suricata-htp"
version = "9.0.0-dev"

@ -13,6 +13,7 @@ members = [
"suricatactl",
"suricatasc",
"sys",
"ffi",
"htp",
]

@ -1,4 +1,5 @@
SUBDIRS = htp \
SUBDIRS = ffi \
htp \
sys \
suricatasc \
suricatactl
@ -11,6 +12,7 @@ EXTRA_DIST = .cargo/config.toml.in \
derive/Cargo.toml \
dist/htp/htp_rs.h \
dist/rust-bindings.h \
ffi \
htp \
src \
suricatactl \

@ -0,0 +1,6 @@
[package]
name = "suricata-ffi"
version = "@PACKAGE_VERSION@"
edition = "2021"
license = "GPL-2.0-only"
description = "Nice wrappers around Suricata C interface"

@ -0,0 +1,3 @@
EXTRA_DIST = Cargo.toml
all-local: Cargo.toml

@ -0,0 +1,16 @@
/* Copyright (C) 2026 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
* Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*/
Loading…
Cancel
Save