D1plo1d / tiny-artnet

A no_std ArtNet 4 implementation for creating microcontroller-based ArtNet Nodes.
4 stars 2 forks source link

Requires an allocator #1

Open nils-van-zuijlen opened 8 months ago

nils-van-zuijlen commented 8 months ago

When in a no_std context, it is really common to have no allocator, but this crate requires tiny-artnet-bytes-no-atomic which requires having an allocator.

It would be nice if that was not the case, or at least documented.

nils-van-zuijlen commented 8 months ago

Also, I could not find your fork of bytes, and so cannot help with that.

nils-van-zuijlen commented 8 months ago

I managed to get it working by modifying the code retrieved from crates.io, I would really like to contribute back my changes so that a wider audience can enjoy them.

pixelprizm commented 8 months ago

Hey @nils-van-zuijlen, I am having the same issue you are - would like to use tiny-artnet without an allocator (on RP2040 (Pi Pico W)). Can you share what you changed to get it to work? Doesn't have to be a polished PR

nils-van-zuijlen commented 8 months ago

In tiny-artnet, Cargo.toml:

In tiny-artnet-bytes-no-atomic: To get this code, use cargo vendor, it will be downloaded in the vendor folder. You may follow the steps echoed by cargo and edit it there, or copy it to another folder.

pixelprizm commented 8 months ago

Awesome thank you for finding the change and for the nice writeup!!

max298 commented 6 days ago

Also huge thank you to @nils-van-zuijlen for the write up, this does indeed work!

For anyone also having trouble: I also found this fork by @maximeborges which replaces the tokio/bytes crate with another one called byte which just works out of the box. I couldn't test if it actually works because I'm missing the hardware, but it does compile so chances are this does indeed work 😃

maximeborges commented 6 days ago

I was a bit in a rush to get that working and completely forgot to open a PR. I'll have a look at the code at some point to make sure everything is sound. IIRC my fork worked properly for 48h continuously without a single issue, so you should be able to play with it.

D1plo1d commented 6 days ago

Hey all, I've unfortunately (fortunately?) become full time employed as of late on a big project and have totally ran out of time to work on this and other open source libraries.

If your interested in continuing the project feel free to create a fork under a different name and post it as a new crate - I'm sure a non-allocator version of this would be helpful to other folks too!

And hey, thanks for picking up my modest little artnet implementation and making it something better.