Skip to content

fix(metrics-exporter-prometheus): 🐛 allow usage in wasm #578

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

Closed
wants to merge 1 commit into from

Conversation

sfroment
Copy link

@sfroment sfroment commented May 9, 2025

if you compile with cargo build --target wasm32-unknown-unknown compile will fail.
This PR Just aim to add compatibility for that to be able to use push gateway from a browser

if you compile with cargo build --target wasm32-unknown-unknown compile will fail

Signed-off-by: Sacha Froment <[email protected]>
@sfroment sfroment force-pushed the dev/sfroment/wasm branch from ae7a16e to 64f2fc4 Compare May 10, 2025 10:01
@tobz
Copy link
Member

tobz commented May 11, 2025

👋

I haven't reviewed this in depth, but at first glance, this looks like way more complexity than I'm willing to add just to support WebAssembly.

There's too much duplication and cfg flagging. I'd suggest trying to focus on cleaning that stuff up first, perhaps by trying to abstract the differing logic behind helper functions / types where necessary.

@sfroment
Copy link
Author

sfroment commented May 11, 2025

👌
Will make another PR once I've time to clean that up. At 1st I was just willing to get a 1st working draft for something else.
Thanks for the amazing lib :)
For the cfg flag although I don't see a good way to reduce it further at the moment

@sfroment sfroment closed this May 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants