juniper icon indicating copy to clipboard operation
juniper copied to clipboard

Support no_std targets

Open bootstrap-prime opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. I'm developing on an embedded bare metal target, and something I've wanted for a while is a self-describing protocol with introspection. A UI app could use it to autogenerate a UI, and significantly reduce the maintenance burden around configuration of various gadgets. GraphQL seems like a great fit, with it's introspection and transport-agnosticism. A gadget could have a graphql server available over a bluetooth or usb serial transport, and you could interact with that and set/get variables. GraphQL doesn't technically have a dependency on js or other web tech, and so it could be used bare-metal. However, Juniper does not currently support no_std targets.

Describe the solution you'd like It would be nice if juniper supported a minimal implementation (single client, no async, no alloc if possible) on no_std targets.

bootstrap-prime avatar Jul 22 '22 17:07 bootstrap-prime

@bootstrap-prime does no_std here implies no alloc? If so, that's not possible, unfortunately. Not until Rust lands real async traits. We do quite a lot of boxing inside the machinery, mostly because of traits doesn't support async, but also for some other concerns too.

tyranron avatar Jul 24 '22 13:07 tyranron

Maybe, only the sync resolution may clink. But this still should be investigated.

tyranron avatar Jul 24 '22 13:07 tyranron

It would be nice if no_std no-alloc were possible, but it isn't necessarily required. bare-metal targets can bring their own allocator to be alloc and no_std.

bootstrap-prime avatar Jul 24 '22 16:07 bootstrap-prime