code: function compile(source) {
      var module = assemblyscript_1.Compiler.compileString(source, {
          target: assemblyscript_1.CompilerTarget.WASM32,
          memoryModel: assemblyscript_1.CompilerMemoryModel.MALLOC,
          silent: true
      });
      var wasmFile;
      if (!module) {
          throw Error('compilation failed');
      }
      module.optimize();
      if (!module.validate()) {
          throw Error('validation failed');
      }
      wasmFile = module.emitBinary();
      module.dispose();
      return new Buffer(wasmFile);
  }
docs: compile assemblyscript to WebAssembly(wasm)
  @param {string} source - assemblyscript string
  @returns {Buffer} wasm stream as a Buffer