code: func WriteModule(w io.Writer, module *module.Module) error {
  
  	if err := writeMagic(w); err != nil {
  		return err
  	}
  
  	if err := writeVersion(w); err != nil {
  		return err
  	}
  
  	if module == nil {
  		return nil
  	}
  
  	if err := writeTypeSection(w, module.Type); err != nil {
  		return err
  	}
  
  	if err := writeImportSection(w, module.Import); err != nil {
  		return err
  	}
  
  	if err := writeFunctionSection(w, module.Function); err != nil {
  		return err
  	}
  
  	if err := writeTableSection(w, module.Table); err != nil {
  		return err
  	}
  
  	if err := writeGlobalSection(w, module.Global); err != nil {
  		return err
  	}
  
  	if err := writeExportSection(w, module.Export); err != nil {
  		return err
  	}
  
  	if err := writeRawCodeSection(w, module.Code); err != nil {
  		return err
  	}
  
  	if err := writeDataSection(w, module.Data); err != nil {
  		return err
  	}
  
  	return nil
  }
docs: // WriteModule writes a binary-encoded representation of module to w.