ballercat / walt

:zap: Walt is a JavaScript-like syntax for WebAssembly text format :zap:

Home Page:https://ballercat.github.io/walt/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Top Level StringLiteral constants

ballercat opened this issue · comments

Bug Report

Overview

Top level StringLiterals fail validation, they should not. Instead, they should compile out to a constant i32 pointer to the data location for a string.

Expected

Top level strings are allowed

Actual

Strings in top-level constants throw validation warnings.

Example

const memory: Memory<{ initial: 1 }>;
const myString: i32 = 'hello world';
export function test(): i32 {
  return myString;
}

Hi @ballercat what is the status of the issue, is anyone working on it, I would love to help you?

hey @sleman ! I would like to contribute however I have quite basic knowledge of Js