-
Notifications
You must be signed in to change notification settings - Fork 328
Docs/examples/fixes to make rust-async, threadpool optional #2253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Firstly, I wonder why do you want to disable those features? IIRC Rust does a lot of optimizations and will eliminate dead code if you do not use a feature automatically. Secondly, for thread pools: #2215 may be related if you want to disable it because of the web things. |
My thinking was, I'm not (supposed to be) using them. If I were to use the threadpool accidentally, that would be a bug. I do see some extra activity in web console in setting up the service workers which I assume is due to the threadpool. For async, just looking for opportunities to cut down surface area. |
I see, then #2215 may be useful for thread pool thing. For async, looks like e.g. opaque types uses tokio rwlock currently, so it requires the tokio dependency, and thus the flag async. |
Close since that issue is closed. But feel free to reopen this issue if you have any questions! |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue. |
Is your feature request related to a problem? Please describe.
From website/docs/guides/custom/rust/feature-flags.md it may be possible to remove unused features from the FRB import.
In my project at least, in disabling
threadpool
, the default generated executor seems to break compilation:In disabling
rust-async
—I am trying to use all methods as#[frb(sync)]
, but it's possible I've missed something—I see errors due toLockable
,RustAutoOpaqueInner
,LockableOrderInfo
and a few others. The RustAutoOpaqueInner errors are tied to types that I havepub use
imported,frb(mirror(
, and#[frb(external)]
. E.g.:Describe the solution you'd like
Not sure. I am already using, or intending to use, all sync methods for thread safety on wasm platform. I don't think I am using the threadpools. I would be looking for either documentation, example code, or code-generator errors to lead me to what I've done wrong here.
Describe alternatives you've considered
N/A
The text was updated successfully, but these errors were encountered: