Skip to content

Conversation

@olehmisar
Copy link

I needed to parse dkim signature in js and this is the only good library I found. These are the changed I applied in order to compile this library to WASM. Consider using these changes as a reference if you want to add WASM support to this library natively.

Overview:

  • hide resolver behind a feature flag because mio is not supported in WASM
  • use WASM-compatible features of zip and mail-builder crates
  • made get_canonicalized_header non-async because it does not need to be.

For those who want to use this library in a WASM project, you can install my fork like this:

[dependencies]
wasm-bindgen = "0.2.84"
ring = { version = "0.17.7", features = ["wasm32_unknown_unknown_js"] }
getrandom = {version ="0.2.15", features = ["js"] }
mail-auth = { git="https://github.com/olehmisar/mail-auth.git", rev="fb1d434", features=["ring"], default-features = false  }

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.

1 participant