maybe if you develop a simple hook that does something very simple in c++ it will become more obvious how to do the same in Rust?
On Fri, Dec 9, 2022 at 11:01 AM Eric Graham <[email protected]> wrote: > > Thanks for the link! I have gone through that page and the instructions are > thorough. There are projects like CXX (https://cxx.rs/) 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 > https://stackoverflow.com/questions/801657/is-python-faster-and-lighter-than-c > 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. > > > > ________________________________ > From: Darren Ankney <[email protected]> > Sent: Friday, December 9, 2022 9:49 AM > To: Eric Graham <[email protected]> > Cc: [email protected] <[email protected]> > Subject: Re: [Kea-users] Hook Development - Rust > > Apologies if you've already found this guide, but here is a link to > the hook developers guide: > > https://reports.kea.isc.org/dev_guide/df/d46/hooksdgDevelopersGuide.html > > I'm not super familiar with rust myself (though I have played around > with it) but you can't just include header files that were meant for > 'c' or 'c++' right? At least from what little i've done, it didn't > seem so... it seemed they had their own API and an application to > search user created extensions for such. The developer's guide I > linked says it should be possible to create hooks in other languages. > They mention Python. I'd say Rust is way closer to C++ the Python > is... so it should be possible? > > On Fri, Dec 9, 2022 at 10:32 AM Eric Graham <[email protected]> > wrote: > > > > Hi Darren, > > > > 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. > > > > I sure wish it would have been implemented differently, as something like > > gRPC + protobuf! > > > > > > ________________________________ > > From: Darren Ankney <[email protected]> > > Sent: Thursday, December 8, 2022 7:34 PM > > To: [email protected] <[email protected]> > > Subject: Re: [Kea-users] Hook Development - Rust > > > > If nothing else, perhaps you could make use of the run_script hook: > > https://kea.readthedocs.io/en/kea-2.2.0/arm/hooks.html#run-script-run-script-support-for-external-hook-scripts > > You could probably write the "script" in whatever language you want, > > including rust, or at least that's the way I interpret it. > > > > On Thu, Dec 8, 2022 at 2:16 PM Eric Graham <[email protected]> > > wrote: > > > > > > Hello! First time using this / any mailing list, so critiques welcome. > > > > > > 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? > > > > > > Thank you, > > > Eric > > > > > > If this email belongs in the dev list, please correct me. Thanks. > > > 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. > > > -- > > > ISC funds the development of this software with paid support > > > subscriptions. Contact us at https://www.isc.org/contact/ for more > > > information. > > > > > > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. > > > > > > Kea-users mailing list > > > [email protected] > > > https://lists.isc.org/mailman/listinfo/kea-users > > > > -- > > ISC funds the development of this software with paid support subscriptions. > > Contact us at https://www.isc.org/contact/ for more information. > > > > To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. > > > > Kea-users mailing list > > [email protected] > > https://lists.isc.org/mailman/listinfo/kea-users > -- ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information. To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users. Kea-users mailing list [email protected] https://lists.isc.org/mailman/listinfo/kea-users
