Tested with FreePascal v3.3.1 commit 8132ccd4.
FreePascal's WASM RTL seems to have no support for strings yet, so just trying to experiment.
ShortString
works well, but it is limited to length of 255 bytes.
- Open this repo in devcontainer, e.g. using Github Codespaces. Type or copy/paste following commands to devcontainer's terminal.
cd
into the folder of this example:
cd browser-sync-xhr-shortstring
- Compile the example:
fpcwasm main.pp
- Run simple HTTP server to temporarily publish project to Web:
python3 -m http.server
Codespace will show you "Open in Browser" button. Just click that button or obtain web address from "Forwarded Ports" tab.
- As
index.html
and a 200kb-sizedmain.wasm
are loaded into browser, refer to browser developer console to see the results.
Perform your own experiments if desired.