Refactor the library
Threads are a bad idea because for now the filter API is not guaranteed to be state-less. The interface is now synchronous, which should be enough for most filters. The refactoring brought other changes, the most important being the concept of modular input sources and output destination and the complete rewrite of the procedural macro.
This commit is contained in:
parent
988f028c23
commit
45639f18c0
18 changed files with 486 additions and 400 deletions
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "opensmtpd"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
authors = ["Rodolphe Bréard <rodolphe@what.tf>"]
|
||||
edition = "2018"
|
||||
description = "Interface for OpenSMTPD filters"
|
||||
|
@ -14,12 +14,12 @@ include = ["src/**/*", "Cargo.toml", "LICENSE-*.txt"]
|
|||
[dependencies]
|
||||
log = {version = "0.4", features = ["std"]}
|
||||
nom = "5.0"
|
||||
opensmtpd_derive = { path = "../opensmtpd-derive", version = "0.1" }
|
||||
opensmtpd_derive = { path = "../opensmtpd-derive", version = "0.2" }
|
||||
|
||||
[[example]]
|
||||
name = "dummy"
|
||||
path = "examples/dummy.rs"
|
||||
name = "echo"
|
||||
path = "examples/echo.rs"
|
||||
|
||||
[[example]]
|
||||
name = "counter"
|
||||
path = "examples/session_event_counter.rs"
|
||||
#[[example]]
|
||||
#name = "counter"
|
||||
#path = "examples/session_event_counter.rs"
|
||||
|
|
Reference in a new issue