-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: add special target for Cloudflare Workers #151
Conversation
I haven't looked too closely at how observe-sdk is packaged up yet, but from #150 the observe-sdk appears to use This might retread ground you've already covered, but it looks like Cloudflare has some instructions on how to patch wasm-bindgen output to be used in a worker. Also: I believe that wrangler respects |
@chrisdickinson two great pointers! I will take a look at them both. thank you very much! I was very unhappy with the fact that I had to create new packages, but this gives me a lot of hope |
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.
LGTM! Great work!
@mhmd-azeez - nice! were you able to test this on a remote worker deployed in Cloudflare? or only |
@nilslice I had only tested locally because I assumed that the npm packages would be installed on the server, but it seems like when you do |
Fixes #150
Unfortunately, from what I see it's not possible to have one package that works for boths Cloudflare Workers and other platforms. The problem is, Cloudflare Workers need you to import the wasm statically (dynamic import doesn't work), and the other platforms don't let you import wasm files statically.