[Zeek] Extending zeek with rust
Johanna Amann
johanna at icir.org
Mon Jan 13 14:03:29 PST 2020
Hi Quentin,
> I've been looking at several plugin examples for zeek and I have
> failed to
> find a definite answer to the following question: is it possible to
> write
> zeek plugins in Rust? The obvious way would be to compile any rust
> implementation in it's own lib and then wrap it in C/C++ but I would
> be
> interested in something more "native".
Disclaimer: I have not used Rust myself.
The only API that we currently provide for writing plug-ins is based on
C++. So - Zeek has to be able to call into your code with the C++ API
that it expects, and your code has to be able to call back into Zeek.
The way that you outline - with the Rust code in its own library -
sounds like the easiest alternative.
If Rust can directly call into C++ - and can generate a library that is
callable in exactly the way that C++ expects, you might be able to make
this work without the wrapper - but after a short peek into the
documetation this does not seem trivially possible.
Johanna
More information about the Zeek
mailing list