I opened a PR: https://github.com/SnowCait/cloudflare-sandbox/pull/1
I reduced a little bit the size. I'll investigate to understand what cause this size
nostr:npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet
I'm trying to use rust-nostr with Cloudflare Workers, but it exceeds the 1MiB limit.
Is there a way to reduce the size of the bundled rust-nostr?
(I'm new to Rust, so I'm sorry if this is a basic question.)
Total Upload: 2061.33 KiB / gzip: 1458.08 KiB
When I comment it out,
Total Upload: 459.45 KiB / gzip: 195.30 KiB
Here is the code.
Here is the Cloudflare Wokers document.
I opened a PR: https://github.com/SnowCait/cloudflare-sandbox/pull/1
I reduced a little bit the size. I'll investigate to understand what cause this size
Thank you!
I confirmed that the size has decreased.
Total Upload: 1621.89 KiB / gzip: 1332.35 KiB
I found the cause: it's the signature verification method.
Removing it the size (unzipped) is 642kb.
The verify signature method internally call only `secp.verify_schnorr` method (`secp256k1` library).
Indeed.
The size become much sumaller after removing the verify code.
Total Upload: 575.34 KiB / gzip: 299.15 KiB
I hope we can find an alternative as I don't want to save invalid data.