Skip to content

Commit

Permalink
got as file read sorta wokring
Browse files Browse the repository at this point in the history
  • Loading branch information
konsumer committed Oct 12, 2024
1 parent 8ffa25c commit f6eb6c2
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
3 changes: 1 addition & 2 deletions cart/as/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ await writeFile('build/tmp.ts', (await readFile('null0.ts')) + '\n// user-code:\
const { error, stdout, stderr, stats } = await asc.main([
'build/tmp.ts',
// '--lowMemoryLimit',
'--initialMemory', '512',
'--maximumMemory', '512',
'--stackSize', '8092',
'--runtime', 'stub',
'--config', './node_modules/@assemblyscript/wasi-shim/asconfig.json',
'--optimizeLevel', '3',
Expand Down
2 changes: 0 additions & 2 deletions cart/as/src/assets/cyber.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
Disposable voodoo god crypto-sensory corporation beef noodles sprawl human engine monofilament neural. Marketing sensory office footage Legba alcohol man hotdog modem-space sentient. Office sign futurity silent gang industrial grade post. Kanji pre-franchise meta-render-farm corrupted spook city shanty town claymore mine-ware systema savant plastic Shibuya fluidity grenade. Plastic jeans post-courier systema film network convenience store. Car engine rebar into weathered refrigerator Shibuya realism assault-space hacker pre-Kowloon footage media network pen. Cartel tanto sentient knife hotdog network market tank-traps crypto-range-rover towards. Dome shrine stimulate nodality katana meta-pen futurity math-receding.

Sprawl DIY construct dolphin jeans-space fetishism gang Shibuya sunglasses market. Alcohol cyber-bomb dolphin soul-delay drone bridge into market convenience store render-farm BASE jump long-chain hydrocarbons pre-nodal point. Nodal point shoes skyscraper tiger-team convenience store stimulate papier-mache car katana. Skyscraper tank-traps shoes math-convenience store beef noodles face forwards assassin sub-orbital narrative semiotics weathered silent monofilament kanji RAF. Crypto-paranoid sensory uplink San Francisco rain knife systemic courier garage jeans. Military-grade shoes physical sensory cardboard geodesic Chiba semiotics motion futurity katana sprawl BASE jump. Bomb semiotics assassin A.I. 3D-printed augmented reality dolphin San Francisco meta. Systema tattoo construct neon into order-flow stimulate drugs 8-bit sign Legba. Fetishism cartel gang urban shrine nano-saturation point woman receding otaku monofilament 8-bit free-market rebar j-pop.
6 changes: 3 additions & 3 deletions cart/as/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export function load(): void {
console.log(`Text-size: ${d.width.toString()}x${d.height.toString()}`)
x = 160 - (d.width/2)
y = 120 - (d.height/2)
const t = file_read("assets/cyber.txt")

// TODO: this currently spits out a bunch of extra bytes
console.log(String.UTF8.decode(t))
const t = file_read("assets/cyber.txt")
trace(t.byteLength.toString())
trace(String.UTF8.decode(t))
}

// called on every frame
Expand Down
2 changes: 1 addition & 1 deletion null0_api/src/null0_api_wamr.h
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ RuntimeInitArgs null0_init_args() {
RuntimeInitArgs init_args;
memset(&init_args, 0, sizeof(RuntimeInitArgs));

static char global_heap_buf[512 * 1024];
static char global_heap_buf[8092 * 8];
init_args.mem_alloc_type = Alloc_With_Pool;
init_args.mem_alloc_option.pool.heap_buf = global_heap_buf;
init_args.mem_alloc_option.pool.heap_size = sizeof(global_heap_buf);
Expand Down

0 comments on commit f6eb6c2

Please sign in to comment.