[Home](./index.md) > [@keymanapp/kmc-package](./kmc-package.md) > [KmpCompiler](./kmc-package.kmpcompiler.md) > [run](./kmc-package.kmpcompiler.run.md) ## KmpCompiler.run() method Compiles a .kps file to .kmp file. Returns an object containing binary artifacts on success. The files are passed in by name, and the compiler will use callbacks as passed to the [KmpCompiler.init()](./kmc-package.kmpcompiler.init.md) function to read any input files by disk. **Signature:** ```typescript run(inputFilename: string, outputFilename?: string): Promise; ``` ## Parameters | Parameter | Type | Description | | --- | --- | --- | | inputFilename | string | | | outputFilename | string | _(Optional)_ | **Returns:** Promise<[KmpCompilerResult](./kmc-package.kmpcompilerresult.md)> Binary artifacts on success, null on failure.