@five-vm/cli
Version:
High-performance CLI for Five VM development with WebAssembly integration
89 lines • 2.69 kB
TypeScript
/**
* Five Compiler WASM Integration
*
* Real integration with Five VM WASM bindings for DSL compilation,
* ABI generation, and bytecode optimization.
*/
import { CompilationOptions, CompilationResult, Logger } from "../types.js";
export declare class FiveCompilerWasm {
private compiler;
private logger;
private initialized;
constructor(logger: Logger);
/**
* Initialize the compiler with real Five VM WASM module
*/
initialize(): Promise<void>;
/**
* Compile Five DSL source code from string (SDK compatibility)
*/
compile(source: string, options?: any): Promise<any>;
/**
* Compile Five DSL source code from file (CLI compatibility)
*/
compileFile(options: CompilationOptions): Promise<CompilationResult>;
/**
* Generate ABI from DSL source using real WASM compiler
*/
generateABI(sourceCode: string): Promise<any>;
/**
* Validate DSL syntax using real WASM compiler
*/
validateSource(sourceCode: string): Promise<{
valid: boolean;
errors: string[];
warnings: string[];
}>;
/**
* Optimize bytecode using real WASM optimizer
*/
optimizeBytecode(bytecode: Uint8Array): Promise<Uint8Array>;
/**
* Analyze bytecode using real WASM analyzer
*/
analyzeBytecode(bytecode: Uint8Array): Promise<any>;
/**
* Get detailed instruction analysis at specific offset
*/
analyzeInstructionAt(bytecode: Uint8Array, offset: number): Promise<any>;
/**
* Get bytecode summary statistics
*/
getBytecodeStats(bytecode: Uint8Array): Promise<any>;
/**
* Extract account definitions from DSL source
*/
extractAccountDefinitions(sourceCode: string): Promise<any>;
/**
* Extract function signatures from DSL source
*/
extractFunctionSignatures(sourceCode: string): Promise<any>;
/**
* Validate account constraints
*/
validateAccountConstraints(sourceCode: string, functionName: string, accounts: any[]): Promise<any>;
/**
* Get compiler version and capabilities from real WASM
*/
getCompilerInfo(): {
version: string;
features: string[];
};
/**
* Create a standardized compiler error
*/
private createCompilerError;
/**
* Get opcode usage statistics from compilation
*/
getOpcodeUsage(sourceCode: string): Promise<any>;
/**
* Get comprehensive opcode analysis showing used vs unused opcodes
*/
getOpcodeAnalysis(sourceCode: string): Promise<any>;
/**
* Check if compiler is ready
*/
isReady(): boolean;
}
//# sourceMappingURL=compiler.d.ts.map