-
Hey there! I just found pen and was wondering if it's possible to easily embed in a Rust application for the purpose of scripting. Is there any sort of embedding API, or is it more targeted towards making standalone executables? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Currently, Pen does not support direct embedding in Rust. I'm assuming that what you want to do is to embed codes in Pen in However, you can put |
Beta Was this translation helpful? Give feedback.
Currently, Pen does not support direct embedding in Rust. I'm assuming that what you want to do is to embed codes in Pen in
.rs
files in Rust using macros or something.However, you can put
.pen
and.rs
files side by side and make them coexist in Rust projects callingpen build
in abuild.rs
script. The build script should build an archive library from source codes written in Pen and export functions usingforeign
directives and then link it into the final Rust binary.