-
Notifications
You must be signed in to change notification settings - Fork 202
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
support debug-embed
of rust_embed
#268
Comments
debug-embed
of rust_embed
Hello, This is a good question indeed, I haven't tried with distroless image before, but my rough guess points to how the Snippet from the utoipa/utoipa-swagger-ui/src/lib.rs Line 120 in 59c9c12
#[derive(RustEmbed)]
#[folder = "$UTOIPA_SWAGGER_DIR/$UTOIPA_SWAGGER_UI_VERSION/dist/"]
struct SwaggerUiDist; And the The build script is bit tricky to debug since its run at background and does not really give any user output. But it might be that the distroless case is not correctly handled by this Another thing that comes to my mind is that the |
Oh as you typed i changed the description cause i think we were using debug builds, meaning it wont be embedded at all |
Right, I could add this feature flag available for such a case like this, but will not enable it by default for everyone. So then the utoipa-swagger-ui could be defined with feature |
Yes that would be nice |
Despite this being a good idea. Likely it'ss not the problem as we do not specify |
Yeah, maybe it's worth debugging the rust_embed itself whether it is able to embed files in distroless environment with or without |
I added the feature and it can be found from master: ab7efd2 |
Great. I will try this latest next week |
Ok I found a minute to check. The 'debug-embed' feature solved the issue. Any plan on doing the next release? |
Okay nice, 👍 I could create a new release from |
Actually just released it 🙂 |
awesome, thx |
Relates to #527 |
Hey,
it would be nice to allow to select the
debug-embed
feature from utoipa-swagger-ui. It's either this or a problem with running the swagger-ui in distroless.The text was updated successfully, but these errors were encountered: