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
-
Static Hermes has these FFI examples https://github.com/facebook/hermes/blob/static_h/examples/ffi/.
I modified
fopen.js
to readstdin
withfopen
That works for the most part. However, fails when using
wasmtime
.wasmer
evidently does something different when"/dev/stdin"
is encountered. bytecodealliance/wasmtime#9922 (comment)So now I'm trying to implement defining
stdin
in the JavaScript context sofgets
can 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
fgets
yet.Beta Was this translation helpful? Give feedback.
All reactions