asonix / telecord

A bot to bridge Telegram and Discord written in Rust
3 stars 0 forks source link

Fix Serenity for -musl targets #1

Open asonix opened 6 years ago

asonix commented 6 years ago

This issue isn't so much an issue with Telecord itself as it is an issue with the hyper-native-tls library and by extension, Serenity. When running -musl builds of telecord on arm devices (raspberry pi), the application bails immediately with a complaint along the lines of 'invalid mac'. This is an openssl error wrapped in a hyper error wrapped in a serenity error. Ultimately, this issue can be solved by upgrading Serenity to use version 0.11 of hyper, but that may require a re-architecture of the library, since the Hyper v 0.10 library is synchronous and the v 0.11 library is asynchronous. Such a big change will surely have an impact on how Serenity runs. Perhaps this opportunity can be taken to rewrite Serenity (maybe as a fork) to run in a tokio event-loop. If this were to happen, then Telecord could be greatly simplified by running both the Discord and Telegram bots in the same event-loop.

Regardless, the hyper-native-tls dependency of Serenity needs to go away.

asonix commented 6 years ago

I'll also note that I know this issue is specific to hyper-native-tls and Serenity because one of my other telebot-based projects, admin-bot works fine on raspberry pi. In fact, I'm running a -musl build of admin-bot in 'production' right now.