using pest_derive in my WASM module #616
Replies: 4 comments
-
Following up on this — is anyone familiar with using (NB: we don't need a dynamic grammar like Pest's site uses, just a standard grammar, but in wasm) |
Beta Was this translation helpful? Give feedback.
-
pest_derive reads the file system to find the actual grammar file when you use However, if you just want to use a pest generated parser in wasm, any normal pest parser should work fine, as this filesystem access is done at build time. |
Beta Was this translation helpful? Give feedback.
-
Thanks @CAD97 . I'll have another go on my end — sounds like |
Beta Was this translation helpful? Give feedback.
-
Wow I halted my project because of this but Id love to give it another shot, Im still watching this from the sidelines |
Beta Was this translation helpful? Give feedback.
-
I am working in a Node.js based WASM project, I would like tell Pest about my grammar, unfortunately the grammar cannot be opened for whatever reason. I can pass files into my lex() function as a WASM export.
I know that the Pest website runs a WASM version with dynamic grammar so this most be possible, although I cant find the Rust src's for it.
How do I derive grammar as a string but not using
grammar
orgrammar_inline
.Note that I am a Rust beginner.
Beta Was this translation helpful? Give feedback.
All reactions