[pmg-devel] [PATCH v7 pmg-log-tracker/pmg-api] rewrite in rust

Mira Limbeck m.limbeck at proxmox.com
Tue Feb 18 16:36:35 CET 2020


pmg-log-tracker has been rewritten in Rust. Functionality is the same
with before queue filter support added in patch 3.

Patch 4 adds some (limited) tests. Tests can be run with 'cargo test'.

There's one change regarding the interface. In addition to the short
versions of arguments also long versions exist.

v7:
 - added README
 - added comments
v6:
 - added before queue filter support
 - added some (limited) tests
 - add pmg-smtp-filter ID to SMTP reply on reject
v3:
 - benchmarks using /usr/bin/time instead of zsh built-in

v2:
 - patch to remove src/pmg-log-tracker.c and src/Makefile
 - added simple benchmarks

Mira Limbeck (4):
  rewrite in rust
  remove C source code
  add before queue filter support
  add tests

 Cargo.toml                                   |   12 +
 Makefile                                     |    4 +-
 README                                       |   40 +
 debian/cargo-checksum.json                   |    1 +
 debian/control                               |   17 +-
 debian/rules                                 |    2 +-
 src/Makefile                                 |   20 -
 src/main.rs                                  | 2288 ++++++++++++++++
 src/pmg-log-tracker.c                        | 2580 ------------------
 tests/test_input_mixed                       |   93 +
 tests/test_output_after_queue                |  105 +
 tests/test_output_after_queue_host           |   69 +
 tests/test_output_after_queue_qid            |   27 +
 tests/test_output_after_queue_search_string  |   14 +
 tests/test_output_before_queue               |   73 +
 tests/test_output_before_queue_host          |   67 +
 tests/test_output_before_queue_qid           |   41 +
 tests/test_output_before_queue_search_string |   27 +
 tests/tests_after_queue.rs                   |  115 +
 tests/tests_before_queue.rs                  |  115 +
 tests/utils.rs                               |   31 +
 21 files changed, 3136 insertions(+), 2605 deletions(-)
 create mode 100644 Cargo.toml
 create mode 100644 README
 create mode 100644 debian/cargo-checksum.json
 delete mode 100644 src/Makefile
 create mode 100644 src/main.rs
 delete mode 100644 src/pmg-log-tracker.c
 create mode 100644 tests/test_input_mixed
 create mode 100644 tests/test_output_after_queue
 create mode 100644 tests/test_output_after_queue_host
 create mode 100644 tests/test_output_after_queue_qid
 create mode 100644 tests/test_output_after_queue_search_string
 create mode 100644 tests/test_output_before_queue
 create mode 100644 tests/test_output_before_queue_host
 create mode 100644 tests/test_output_before_queue_qid
 create mode 100644 tests/test_output_before_queue_search_string
 create mode 100644 tests/tests_after_queue.rs
 create mode 100644 tests/tests_before_queue.rs
 create mode 100644 tests/utils.rs

Mira Limbeck (1):
  add pmg-smtp-filter ID to reply

 src/PMG/SMTP.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.20.1




More information about the pmg-devel mailing list