Skip to content

Refactor TinyGo API into separate packages #183

Merged
danielledeleo merged 6 commits intomainfrom
jagger/tinygo-api-refactor
Dec 14, 2021
Merged

Refactor TinyGo API into separate packages #183
danielledeleo merged 6 commits intomainfrom
jagger/tinygo-api-refactor

Conversation

@danielledeleo
Copy link
Copy Markdown
Contributor

Note: breaks existing runnables (see tests for changes)

Copy link
Copy Markdown
Contributor

@cohix cohix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing to check on, otherwise this looks great!


if size < 0 {
if size == -1 {
return nil, runnable.NewHostError("unknown error returned from host")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the other languages return here? I'm wondering because not calling get_ffi_result can cause the host to retain that data in the buffer and can cause issues for subsequent host calls. Can't remember if a -1 error from the host means it never filled the buffer at all.

@danielledeleo danielledeleo merged commit ebdc67c into main Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants