generator library
Classes
- DartWitGeneratorWorld
- DartWitGeneratorWorldImports
- FileSystemPaths
- The paths in the file system that contain the wit files.
- InMemoryFiles
- Files paths and their contents.
- WitFile
- WitGeneratorConfig
- WitGeneratorInput
- The file inputs to use for the code generation.
Enums
- Int64TypeConfig
- Configures how 64 bit integers are represented in the generated code.
Functions
-
createDartWitGenerator(
{required WasiConfig wasiConfig, Future< WasmModule> loadModule()?}) → Future<DartWitGeneratorWorld> -
Creates a DartWitGeneratorWorld with the given
wasiConfig
. It setsUp the dynamic library for wasm_run for native platforms and loads the dart_wit_component WASM module from the file system or from the releases of wasm_run repository. -
defaultGeneratorConfig(
{required WitGeneratorInput inputs}) → WitGeneratorConfig - Returns a WitGeneratorConfig with the default configuration
-
wasiConfigFromPath(
String witPath, {Map< String, WasiDirectory> ? webBrowserFileSystem}) → WasiConfig -
Creates a WasiConfig from the given
witPath
. IfwitPath
is a file, it will use its parent directory as the preopened directory for the WASI config. IfwitPath
is a directory, it will use it as the preopened directory. For web platforms, thewitPath
will be the directory name used as the root of the web browser file system.