]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
rust: rename to suricata (from suricata_rust)
authorJason Ish <jason.ish@oisf.net>
Fri, 17 Dec 2021 22:28:56 +0000 (16:28 -0600)
committerVictor Julien <vjulien@oisf.net>
Tue, 11 Jan 2022 06:38:58 +0000 (07:38 +0100)
Rename the Rust lib to simply "suricata" instead of "suricata_rust".
This allows Rust plugin/library code to use it under the name "suricata"
which is what should be expected.

The name was only "suricata_rust" to prevent on-disk conflict with the C
code, so just rename the file on disk, which doesn't affect how the code
is interacted with from an API layer.

rust/Cargo.toml.in
rust/Makefile.am

index 6febd4c532722258153e5be6ed916a9cf958826d..0987651203a24e8917bbba5b393de6ecaa463802 100644 (file)
@@ -9,7 +9,7 @@ members = [".", "./derive"]
 [lib]
 crate-type = ["staticlib", "rlib"]
 path = "@e_rustdir@/src/lib.rs"
-name = "suricata_rust"
+name = "suricata"
 
 [profile.release]
 debug = true
index aa2b571789e46a1bbc139179bff17bddec072aca..854377f5de5b6ec96998286bf48da3b1df9bd6f9 100644 (file)
@@ -45,8 +45,12 @@ else
                $(CARGO) build $(RELEASE) $(NIGHTLY_ARGS) \
                        --features "$(RUST_FEATURES)" $(RUST_TARGET)
 endif
-       if test -e $(RUST_SURICATA_LIBDIR)/suricata_rust.lib; then \
-               cp $(RUST_SURICATA_LIBDIR)/suricata_rust.lib \
+       if test -e $(RUST_SURICATA_LIBDIR)/suricata.lib; then \
+               cp -a $(RUST_SURICATA_LIBDIR)/suricata.lib \
+                       $(RUST_SURICATA_LIBDIR)/${RUST_SURICATA_LIBNAME}; \
+       fi
+       if test -e $(RUST_SURICATA_LIBDIR)/libsuricata.a; then \
+               cp -a $(RUST_SURICATA_LIBDIR)/libsuricata.a \
                        $(RUST_SURICATA_LIBDIR)/${RUST_SURICATA_LIBNAME}; \
        fi
        $(MAKE) gen/rust-bindings.h