Replies: 1 comment 7 replies
-
Hi, the whole bytecode part was developed with file-system in mind for loading and saving. Replacing with a buffer would be an major change. That's why I implemented For Saving, you need to use |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am optimizing our Berry workflow, and I am thinking of working with raw compiled Berry bytes that I will just send around and use.
As I understood, that's what .bec files are for. However, all I need is to get a buffer of the Berry bytes (for example, after calling
be_loadstring
) and later on load it.Loading part
I suppose I could use the
be_bytecode_load_from_fs
function. However, I might not want to work with files in the future, so I could probably edit it to accept a byte stream."Saving" part
I basically need to get the bytecode, somewhere in the process of loading the code. I tried looking through the code, and I ended up somewhere around
m_parser
andbe_parser_source
; however, I'm still completely clueless. @s-hadinger Would you be able to give me a helping hand to locate a place where I can access the compiled bytecode buffer? If that's even possible though.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions