@rumblestiltskin @dessalines @LemmyDev ah, nice! Lemmy is written with actix_web! Awesome!

My Problem is that I need to pass a ipfs_api::IpfsClient to actix_web, so that I can have a handle to the client in each handler... and I don't know how to do it, especially because ipfs-api depends on awc which uses a Rc<_> somewhere internally and thus cannot be shared across threads... or I am doing something wrong. Dunno.


@musicmatze @dessalines @LemmyDev Can't you pass in an argument to each of your routes like you pass in the DB pool eg. App::new().data(ipfs_client) ?

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!