Open squeaktoy opened 3 days ago
I haven't tried using Xrust in async code. It has not been designed for that use case. iow, it is single threaded. I'd say you would have to put calls to Xrust methods in a block that prevents it from being used in a multi-threaded fashion.
My question would be, what are you trying to achieve with your code?
I'm trying to use xrust inside an axum middleware. The idea is that it interccepts ServeDir (directory serving over HTTP) for files that might be XSLT, and then perform the transformation with XML API response as input. axum is async though, and as such I need async primitives like Arc. xrust uses Rc which doesn't work inside async scopes.
I am writing a project that uses xrust at https://git.sr.ht/~latex/streamlist I'm trying to use xrust in async code, and it's not working. How would I get this to work?