Elligator based on TweetNaCl TweetNacl is all-in-one crypto library. It's very easy to use, so I often include it in my projects;

But recently I need to use Elligator, I had to use LibElligator. It would be very usefull to have Elligator func in TweetNacl.

I am not a cryptographer so it's hard to me to undersand internals of both libs.
Is it posible to implement elligator hashing based on math of TweetNacl?
It's certainly possible, although it will be very slow.

TweetNacl includes all the required field arithmetic operations. The main thing you will have to implement is the Chi function.

If you don't understand the internals and how these functions work, I would recommend using libsodium instead. It has a compatible API, and supports hash-to-point using Elligator.