kevinswiber/postman2openapi

Reduce size of WASM file

kevinswiber opened this issue · 0 comments

  • Remove url crate altogether
  • Remove serde_yaml support for wasm32. YAML conversion can be handled by a consumer if they choose to do so. This allows them to bring in a YAML dependency by choice.
  • Remove regex crate. It's currently used for variable resolution in Postman collections, but we can hand-roll our own functionality for this. This crate takes up a lot of space.
  • Remove OpenAPI 2.0 schema. Likely a smaller win but worth taking. Let's not support OpenAPI 2.0 with this project. Adding 3.1 support will increase the size when it comes.
  • Move to https://github.com/cloudflare/serde-wasm-bindgen to save some bytes. Need to investigate the impact.
  • Migrate away from the indexmap crate. It bundles both hashbrown and serde. Needs investigation on impact.