<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">That's a good idea. At the very least, I can confirm whether the hook is expected to load
if only implementing version(). According to the docs, I believe it to be so, but there's a lot there and I may be mistaken. I'll see what comes of it and post back here for future readers. If you or anyone else have more suggestions for now, please don't
hesitate to share them. I can always work on the C++ PoC and the Rust hook at the same time.<br>
</span></div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Kea-users <kea-users-bounces@lists.isc.org> on behalf of Darren Ankney <darren.ankney@gmail.com><br>
<b>Sent:</b> Friday, December 9, 2022 10:06 AM<br>
<b>To:</b> kea-users@lists.isc.org <kea-users@lists.isc.org><br>
<b>Subject:</b> Re: [Kea-users] Hook Development - Rust</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">CAUTION: This email originated outside the organization. Do not click any links or attachments unless you have verified the sender.<br>
<br>
maybe if you develop a simple hook that does something very simple in<br>
c++ it will become more obvious how to do the same in Rust?<br>
<br>
On Fri, Dec 9, 2022 at 11:01 AM Eric Graham <eric.graham@vantagepnt.com> wrote:<br>
><br>
> Thanks for the link! I have gone through that page and the instructions are thorough. There are projects like CXX (<a href="https://cxx.rs/">https://cxx.rs/</a>) that help with the Rust <--> C++ stuff, but to be honest, I am new to Rust (Python is one I'm
more familiar with, but I am not interested in writing the hook in Python at this stage - speed
<a href="https://stackoverflow.com/questions/801657/is-python-faster-and-lighter-than-c">
https://stackoverflow.com/questions/801657/is-python-faster-and-lighter-than-c</a> and type safety). I assume something is wrong with how I'm linking against Kea, but I don't know. Unfortunately, the debug log during hook loading is not terribly helpful. I
am confident it's possible, though.<br>
><br>
><br>
><br>
> ________________________________<br>
> From: Darren Ankney <darren.ankney@gmail.com><br>
> Sent: Friday, December 9, 2022 9:49 AM<br>
> To: Eric Graham <eric.graham@vantagepnt.com><br>
> Cc: kea-users@lists.isc.org <kea-users@lists.isc.org><br>
> Subject: Re: [Kea-users] Hook Development - Rust<br>
><br>
> Apologies if you've already found this guide, but here is a link to<br>
> the hook developers guide:<br>
><br>
> <a href="https://reports.kea.isc.org/dev_guide/df/d46/hooksdgDevelopersGuide.html">
https://reports.kea.isc.org/dev_guide/df/d46/hooksdgDevelopersGuide.html</a><br>
><br>
> I'm not super familiar with rust myself (though I have played around<br>
> with it) but you can't just include header files that were meant for<br>
> 'c' or 'c++' right? At least from what little i've done, it didn't<br>
> seem so... it seemed they had their own API and an application to<br>
> search user created extensions for such. The developer's guide I<br>
> linked says it should be possible to create hooks in other languages.<br>
> They mention Python. I'd say Rust is way closer to C++ the Python<br>
> is... so it should be possible?<br>
><br>
> On Fri, Dec 9, 2022 at 10:32 AM Eric Graham <eric.graham@vantagepnt.com> wrote:<br>
> ><br>
> > Hi Darren,<br>
> ><br>
> > Thanks for the link! I actually have already done so, but for a few reasons (I believe it is slower than a hook, and it's limited) I would prefer to write a "native" one.<br>
> ><br>
> > I sure wish it would have been implemented differently, as something like gRPC + protobuf!<br>
> ><br>
> ><br>
> > ________________________________<br>
> > From: Darren Ankney <darren.ankney@gmail.com><br>
> > Sent: Thursday, December 8, 2022 7:34 PM<br>
> > To: kea-users@lists.isc.org <kea-users@lists.isc.org><br>
> > Subject: Re: [Kea-users] Hook Development - Rust<br>
> ><br>
> > If nothing else, perhaps you could make use of the run_script hook:<br>
> > <a href="https://kea.readthedocs.io/en/kea-2.2.0/arm/hooks.html#run-script-run-script-support-for-external-hook-scripts">
https://kea.readthedocs.io/en/kea-2.2.0/arm/hooks.html#run-script-run-script-support-for-external-hook-scripts</a><br>
> > You could probably write the "script" in whatever language you want,<br>
> > including rust, or at least that's the way I interpret it.<br>
> ><br>
> > On Thu, Dec 8, 2022 at 2:16 PM Eric Graham <eric.graham@vantagepnt.com> wrote:<br>
> > ><br>
> > > Hello! First time using this / any mailing list, so critiques welcome.<br>
> > ><br>
> > > I am looking into the possibility of writing a Rust hook. I understand that using C++ is likely the simplest alternative, but Rust is attractive for its memory safety and speed. I have not had luck finding any Kea hook in Rust to use as a starting point.
The C FFI is a complicating factor. In fact, I have not had luck getting a very basic PoC to register with Kea, just implementing version(). Does anyone know of a hook even partially implemented in Rust, or have interest in doing so?<br>
> > ><br>
> > > Thank you,<br>
> > > Eric<br>
> > ><br>
> > > If this email belongs in the dev list, please correct me. Thanks.<br>
> > > This message is intended solely for the use of the individual and entity to whom it is addressed and may contain information that is privileged, confidential, and exempt from disclosure under applicable state and federal laws. If you are not the addressee
or are not authorized to receive for the intended addressee you are hereby notified that you may not use, copy, distribute, or disclose to anyone this message or the information contained herein. If you have received this message in error, immediately advise
the sender by reply email and destroy this message.<br>
> > > --<br>
> > > ISC funds the development of this software with paid support subscriptions. Contact us at
<a href="https://www.isc.org/contact/">https://www.isc.org/contact/</a> for more information.<br>
> > ><br>
> > > To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users">
https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
> > ><br>
> > > Kea-users mailing list<br>
> > > Kea-users@lists.isc.org<br>
> > > <a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
> ><br>
> > --<br>
> > ISC funds the development of this software with paid support subscriptions. Contact us at
<a href="https://www.isc.org/contact/">https://www.isc.org/contact/</a> for more information.<br>
> ><br>
> > To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users">
https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
> ><br>
> > Kea-users mailing list<br>
> > Kea-users@lists.isc.org<br>
> > <a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
><br>
--<br>
ISC funds the development of this software with paid support subscriptions. Contact us at
<a href="https://www.isc.org/contact/">https://www.isc.org/contact/</a> for more information.<br>
<br>
To unsubscribe visit <a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a>.<br>
<br>
Kea-users mailing list<br>
Kea-users@lists.isc.org<br>
<a href="https://lists.isc.org/mailman/listinfo/kea-users">https://lists.isc.org/mailman/listinfo/kea-users</a><br>
</div>
</span></font></div>
</body>
</html>