How to implement fgets using FFI? #1592
guest271314
started this conversation in
Static Hermes
Replies: 1 comment
-
|
This is what I came up with using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Static Hermes has these FFI examples https://github.com/facebook/hermes/blob/static_h/examples/ffi/.
I modified
fopen.jsto readstdinwithfopenThat works for the most part. However, fails when using
wasmtime.wasmerevidently does something different when"/dev/stdin"is encountered. bytecodealliance/wasmtime#9922 (comment)So now I'm trying to implement defining
stdinin the JavaScript context sofgetscan be used.This is what I've tried so far, from code I found in the field (https://github.com/thejustinwalsh/sh-raylib/blob/main/src/bunny-mark/resources.js, https://github.com/thejustinwalsh/sh-raylib/blob/main/src/bunny-mark/resources.h), havn;t gotten to
fgetsyet.Beta Was this translation helpful? Give feedback.
All reactions