devicescript icon indicating copy to clipboard operation
devicescript copied to clipboard

Tree shaking keeps SPI/I2C even if not used

Open mmoskal opened this issue 1 year ago • 1 comments

This program should have the same devs disasm regardless if the import is present or not

import { startBME680 } from "@devicescript/drivers"
console.log(Buffer.alloc)

mmoskal avatar Jul 03 '23 18:07 mmoskal

branch: https://github.com/microsoft/devicescript/tree/var-when-used branch - but this requires some work with cell assignment in the compiler

mmoskal avatar Aug 11 '23 13:08 mmoskal