You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking at mruby as a candidate scripting language for an embedded C application. The application that would use it would provided a raw byte buffer allocated outside the script and that the script should populate (e.g. by serializing various data types into it, or writing an ASCII string in it, etc.).
My question is: does mruby provide a gem with a class for such a use-case? (I'm thinking something similar to memoryview in Python or ArrayBuffer in Javascript)
The text was updated successfully, but these errors were encountered:
Currently, we don't have such a gem. We often use strings as byte buffers. In that case, we first allocate a string to be a buffer in Ruby, then manipulate it by byte accessing methods, e.g., getbyte, setbyte, byteslice, bytesplice, then export it to the external. The other scenario is copying a raw buffer in to a Ruby string, then manipulate it and copying back to the external buffer.
In any case, ArrayBuffer dedicated to this purpose is more convenient, so I will consider making a gem for this use-case, in the future.
I'm looking at mruby as a candidate scripting language for an embedded C application. The application that would use it would provided a raw byte buffer allocated outside the script and that the script should populate (e.g. by serializing various data types into it, or writing an ASCII string in it, etc.).
My question is: does mruby provide a gem with a class for such a use-case? (I'm thinking something similar to
memoryview
in Python orArrayBuffer
in Javascript)The text was updated successfully, but these errors were encountered: