index-minimal.js 921 B

123456789101112131415161718192021222324252627282930313233343536
  1. "use strict";
  2. var protobuf = exports;
  3. /**
  4. * Build type, one of `"full"`, `"light"` or `"minimal"`.
  5. * @name build
  6. * @type {string}
  7. * @const
  8. */
  9. protobuf.build = "minimal";
  10. // Serialization
  11. protobuf.Writer = require("./writer");
  12. protobuf.BufferWriter = require("./writer_buffer");
  13. protobuf.Reader = require("./reader");
  14. protobuf.BufferReader = require("./reader_buffer");
  15. // Utility
  16. protobuf.util = require("./util/minimal");
  17. protobuf.rpc = require("./rpc");
  18. protobuf.roots = require("./roots");
  19. protobuf.configure = configure;
  20. /* istanbul ignore next */
  21. /**
  22. * Reconfigures the library according to the environment.
  23. * @returns {undefined}
  24. */
  25. function configure() {
  26. protobuf.Reader._configure(protobuf.BufferReader);
  27. protobuf.util._configure();
  28. }
  29. // Set up buffer utility according to the environment
  30. protobuf.Writer._configure(protobuf.BufferWriter);
  31. configure();