-
Notifications
You must be signed in to change notification settings - Fork 76
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
Add serialize
, fromstr
and wasm-bindgen
features
#592
Conversation
Codecov ReportBase: 97.65% // Head: 97.65% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## main #592 +/- ##
=======================================
Coverage 97.65% 97.65%
=======================================
Files 14 14
Lines 5576 5576
=======================================
Hits 5445 5445
Misses 131 131
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
We currently run Similarly |
Also would you recommend enabling all the |
For simplicitly, this is what we do for our release assets, and its also what is done in the packaging manifests for stuff like homebrew. For the most part, this is fine. But note that there can be conflicts between the different Lua versions. The main things I know of is:
Ideally we would select the syntax we are using through some sort of configuration at runtime, but currently the features are behind compile time flags so we can't do this. If possible, my recommendation would be to produce wasm binaries for each different syntax version, then using config select the correct one to use. This comes with disadvantages though (you now need to package 5x the wasm binary). Having all features enabled should typically be fine for everyday use. |
Ok thanks, I think I'll just enable all Lua features then and maybe make it configurable in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, looks good to me, thanks!
I wonder if we even need separate features for serialize
and fromstr
, since they are small enough. For now I'll just leave it as-is though
While working on creating a dprint plugin for integrating StyLua (dprint-plugin-stylua), I found few things were missing in StyLua to make the integration easier:
serde::Serialize
impl for the config typesFromStr
impl for the config enum types (usingstrum::EnumString
)wasm-bindgen
crate for correct compilationI turned these three things into features and left the defaults just like they were before.