Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.mbt.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ Use it when you want a MoonBit executable that runs cleanly under `moon run`,
`wasmtime`, or another WASIp1 host without tying your code to host-specific file
and terminal APIs.

## ABI compatibility

0.1.0 is compatible with MoonBit < 0.9.3
0.2.0 is compatible with MoonBit >= 0.9.3

## Public API

- `args_get()`
Expand Down
6 changes: 3 additions & 3 deletions internal/ffi/top.mbt
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ pub fn malloc(size : Int) -> Int {

///|
pub extern "wasm" fn free(position : Int) =
#|(func (param i32) local.get 0 i32.const 8 i32.sub call $moonbit.decref)
#|(func (param i32) local.get 0 call $moonbit.decref)

///|
#owned(bytes)
pub extern "wasm" fn byte_array2ptr(bytes : FixedArray[Byte]) -> Int =
#|(func (param i32) (result i32) local.get 0 i32.const 8 i32.add)
#|(func (param i32) (result i32) local.get 0)

///|
#owned(bytes)
pub extern "wasm" fn bytes2ptr(bytes : Bytes) -> Int =
#|(func (param i32) (result i32) local.get 0 i32.const 8 i32.add)
#|(func (param i32) (result i32) local.get 0)
2 changes: 1 addition & 1 deletion moon.mod.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "moonbit-community/miniio",
"version": "0.1.0",
"version": "0.2.0",
"description": "Small, portable WASIp1 I/O SDK for building MoonBit CLI tools and agent skills.",
"keywords": ["wasi", "wasip1", "io", "cli", "agent"],
"readme": "README.md",
Expand Down
Loading