Unsupported IO functions: fail to compile instead of fail to run

Previously for unsupported IO functions, we make it fail during the runtime with an exception, see this issue for more details:

I am thinking that instead of make it fail during the runtime, we may simply remove those unsupported functions to make it fail earlier to manage user expectation properly.


  • Failure should always be caught as early as possible
  • Less js code size for those not supported functions


  • In theory, those missed IO functions could be polyfilled on the user land, so we could get
    more existing ocaml libs supported, but I don’t see it happen in practice

Let me know if I miss any other tradeoffs, thanks!

Agreed, it makes sense to remove (at least comment out) functions that are not actually implemented. If needed they can be provided as third-party libraries.