Comparing version 0.3.0 to 0.4.0
@@ -264,3 +264,3 @@ import { | ||
// @ts-ignore | ||
let path_buf = __alloc(path_max, 0); | ||
let path_buf = heap.alloc(path_max); | ||
while (true) { | ||
@@ -271,3 +271,3 @@ let ret = fd_prestat_dir_name(this.rawfd, path_buf, path_max); | ||
// @ts-ignore | ||
path_buf = __realloc(path_buf, path_max); | ||
path_buf = heap.realloc(path_buf, path_max); | ||
continue; | ||
@@ -277,3 +277,3 @@ } | ||
// @ts-ignore | ||
__free(path_buf); | ||
heap.free(path_buf); | ||
return path; | ||
@@ -737,3 +737,3 @@ } | ||
// @ts-ignore | ||
let buf = __alloc(buf_size, 0); | ||
let buf = heap.alloc(buf_size); | ||
// @ts-ignore | ||
@@ -752,3 +752,3 @@ let buf_used_p = memory.data(8); | ||
// @ts-ignore | ||
buf = __realloc(buf, buf_size); | ||
buf = heap.realloc(buf, buf_size); | ||
} | ||
@@ -768,3 +768,3 @@ let offset = 0; | ||
// @ts-ignore | ||
__free(buf); | ||
heap.free(buf); | ||
fd.close(); | ||
@@ -903,6 +903,5 @@ | ||
let env_ptr = load<usize>(env_ptrs + i * sizeof<usize>()); | ||
let env_ptr_split = StringUtils.fromCString(env_ptr).split("=", 2); | ||
let key = env_ptr_split[0]; | ||
let value = env_ptr_split[1]; | ||
this.env.push(new EnvironEntry(key, value)); | ||
let env = StringUtils.fromCString(env_ptr); | ||
let eq = env.indexOf("="); | ||
this.env.push(new EnvironEntry(env.substring(0, eq), env.substring(eq + 1))); | ||
} | ||
@@ -909,0 +908,0 @@ } |
{ | ||
"name": "as-wasi", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"scripts": { | ||
@@ -15,3 +15,3 @@ "asbuild:untouched": "asc assembly/index.ts -b build/untouched.wasm -t build/untouched.wat --use abort=wasi_abort --debug", | ||
"devDependencies": { | ||
"assemblyscript": "^0.16", | ||
"assemblyscript": "^0.17.0", | ||
"concat-md": "^0.3.5", | ||
@@ -18,0 +18,0 @@ "rimraf": "^3.0.2", |
66093
10
1011