mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-25 20:51:44 +00:00
unify, stub impl
This commit is contained in:
14
tests/allocators/rt/assembly/index.ts
Normal file
14
tests/allocators/rt/assembly/index.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import "rt";
|
||||
import { memory as builtin_memory } from "memory";
|
||||
|
||||
export namespace memory {
|
||||
export function allocate(size: usize): usize {
|
||||
return __rt_allocate(size, 0);
|
||||
}
|
||||
export function free(ptr: usize): void {
|
||||
__rt_free(ptr);
|
||||
}
|
||||
export function fill(dst: usize, c: u8, n: usize): void {
|
||||
builtin_memory.fill(dst, c, n);
|
||||
}
|
||||
}
|
6
tests/allocators/rt/assembly/tsconfig.json
Normal file
6
tests/allocators/rt/assembly/tsconfig.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"extends": "../../../../std/assembly.json",
|
||||
"include": [
|
||||
"./**/*.ts"
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user