noritada / grib-rs

GRIB format parser for Rust
Apache License 2.0
57 stars 9 forks source link

Add support for wasm build of the library crate #65

Closed noritada closed 10 months ago

noritada commented 10 months ago

This PR adds support for building wasm from the library crate.

Support for JPEG 2000 code stream format has been removed from the wasm build since openjpeg-sys cannot be built.

This PR introduces boilerplate code and tricky code to work around the problems involved in conditional compilation of code containing generics type parameters. These code could be rewritten in a smarter way. Also, future improvements to the Rust language and compiler may allow for simpler code.

I am only confirming successful build and have not yet tested it.