VSCode IDE enhancement and readme update (#3172)

- Temporarily disable the deque test for the VS Code extension, as the
  Rust formatter seems to malfunction after a recent VS Code update.
- Add configuration for iwasm host managed heap size, allowing users
  to flexibly `malloc` memory. This also fixes the current bug that when
  default size is 0, it can't run and debug.
- Apply coding style formatting for WAMR IDE source code and add a
  format check for it in CI.
- Update document and some screenshots.
This commit is contained in:
TianlongLiang
2024-02-22 12:36:49 +08:00
committed by GitHub
parent 1429d8cc03
commit 0fa0beba94
23 changed files with 303 additions and 182 deletions

View File

@ -20,6 +20,7 @@ export class TargetConfigPanel {
maxMemorySize: '131072',
stackSize: '4096',
exportedSymbols: 'main',
hostManagedHeapSize: '4096',
};
private static readonly userInputError: number = -2;
@ -74,14 +75,16 @@ export class TargetConfigPanel {
initMemSize: string,
maxMemSize: string,
stackSize: string,
exportedSymbols: string
exportedSymbols: string,
hostManagedHeapSize: string
): number {
if (
outputFileName === '' ||
initMemSize === '' ||
maxMemSize === '' ||
stackSize === '' ||
exportedSymbols === ''
exportedSymbols === '' ||
hostManagedHeapSize === ''
) {
return TargetConfigPanel.userInputError;
}
@ -95,6 +98,7 @@ export class TargetConfigPanel {
maxMemorySize: maxMemSize,
stackSize: stackSize,
exportedSymbols: exportedSymbols,
hostManagedHeapSize: hostManagedHeapSize,
};
const configStr = readFromConfigFile();
@ -174,6 +178,10 @@ export class TargetConfigPanel {
.replace(
/(\${exported_symbols_val})/,
TargetConfigPanel.buildArgs.exportedSymbols
)
.replace(
/(\${host_managed_heap_size_val})/,
TargetConfigPanel.buildArgs.hostManagedHeapSize
);
return html;
@ -189,7 +197,8 @@ export class TargetConfigPanel {
message.initMemSize === '' ||
message.maxMemSize === '' ||
message.stackSize === '' ||
message.exportedSymbols === ''
message.exportedSymbols === '' ||
message.hostManagedHeapSize === ''
) {
vscode.window.showErrorMessage(
'Please fill chart before your submit!'
@ -201,7 +210,8 @@ export class TargetConfigPanel {
message.initMemSize,
message.maxMemSize,
message.stackSize,
message.exportedSymbols
message.exportedSymbols,
message.hostManagedHeapSize
) === TargetConfigPanel.executionSuccess
) {
vscode.window