التنينوكس on Nostr: Un #rust ans #actix web, how can I have a strict as app state that is non-send. ...
Un #rust ans #actix web, how can I have a strict as app state that is non-send.
Precisely I have a deno_core embedded with app state that needs to store and invoke JS closures. Those closrea are passed to rust as v8::Functions. I do not care if they are duplicated between threads or isolated in a global state. I just want to declare them in invoke them from my actix routes.
For context, I am experimenting a JS simple embedded app with an action router.
Published at
2024-09-03 19:07:33Event JSON
{
"id": "ce6ffdbc3408e3e89c7513446e58fe8761fe8a2bb8a515a6e415f43f724a2ef5",
"pubkey": "312ba530d9f5162682cbe01b52dadae3a843372c920ed2051a7236c262414e4e",
"created_at": 1725390453,
"kind": 1,
"tags": [
[
"t",
"rust"
],
[
"t",
"actix"
],
[
"proxy",
"https://social.touha.me/users/dragnucs/statuses/113075188738993924",
"activitypub"
]
],
"content": "Un #rust ans #actix web, how can I have a strict as app state that is non-send.\n\nPrecisely I have a deno_core embedded with app state that needs to store and invoke JS closures. Those closrea are passed to rust as v8::Functions. I do not care if they are duplicated between threads or isolated in a global state. I just want to declare them in invoke them from my actix routes.\n\nFor context, I am experimenting a JS simple embedded app with an action router.",
"sig": "22c5764dd1c04db549b9fc57a841d6ce3e5318948f36b2e441029667a3745be3cbc83cc1f66dda6fa63aacaa3935d261523382e09a5b458a7e755a8f40230fab"
}