ballercat / ballercat/walt

Top Level StringLiteral constants

Open
#115 3 comments 0 reactions 0 assignees View on GitHub
bug good first issue help wanted
Dominant language
JavaScript
Stars
4.6k
Forks
119
PR merge metrics
No merged PRs in 30d

Description

# 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
```js
const memory: Memory<{ initial: 1 }>;
const myString: i32 = 'hello world';
export function test(): i32 {
return myString;
}
```

Contributor guide

Open the contributing guide

Research direction

No source files or tests are named. Start by reproducing the JavaScript example and tracing validation of top-level constants and StringLiterals; compare the generated WebAssembly representation with the expected i32 pointer to string data. Done means the example compiles without validation warnings and the exported function returns the string pointer.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, wasm
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.