/**
* # Variants
* 
* ## `"utf8"`
* 
* ## `"utf16"`
* 
* ## `"compact-utf16"`
*/
export type StringEncoding = 'utf8' | 'utf16' | 'compact-utf16';
export type ProducersFields = [string, [string, string][]][];
export type ModuleMetaType = ModuleMetaTypeModule | ModuleMetaTypeComponent;
export interface ModuleMetaTypeModule {
  tag: 'module',
}
export interface ModuleMetaTypeComponent {
  tag: 'component',
  val: number,
}
export interface ModuleMetadata {
  name?: string,
  metaType: ModuleMetaType,
  range: [number, number],
  producers: ProducersFields,
}
export interface EmbedOpts {
  binary?: Uint8Array,
  witSource?: string,
  witPath?: string,
  stringEncoding?: StringEncoding,
  dummy?: boolean,
  world?: string,
  metadata?: ProducersFields,
}
import { ImportsEnvironment } from './imports/environment';
import { ImportsExit } from './imports/exit';
import { ImportsPreopens } from './imports/preopens';
import { ImportsStderr } from './imports/stderr';
import { ImportsStdin } from './imports/stdin';
import { ImportsStdout } from './imports/stdout';
import { ImportsWallClock } from './imports/wall-clock';
import { ImportsFilesystem } from './imports/filesystem';
import { ImportsStreams } from './imports/streams';
import { ImportsRandom } from './imports/random';
export function parse(wat: string): Uint8Array;
export function print(binary: Uint8Array | ArrayBuffer): string;
export function componentNew(binary: Uint8Array | ArrayBuffer, adapters: [string, Uint8Array | ArrayBuffer][] | null): Uint8Array;
export function componentWit(binary: Uint8Array | ArrayBuffer): string;
export function componentEmbed(embedOpts: EmbedOpts): Uint8Array;
export function metadataShow(binary: Uint8Array | ArrayBuffer): ModuleMetadata[];
export function metadataAdd(binary: Uint8Array | ArrayBuffer, metadata: ProducersFields): Uint8Array;

export const $init: Promise<void>;
