Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new APIs to "eval a file" in Engine.h #89

Closed
yqs112358 opened this issue Aug 5, 2022 · 1 comment
Closed

Add new APIs to "eval a file" in Engine.h #89

yqs112358 opened this issue Aug 5, 2022 · 1 comment

Comments

@yqs112358
Copy link

yqs112358 commented Aug 5, 2022

如题,至今引擎加载源码都只能依靠读取文件然后eval,在适配其他引擎过程中此种加载方式会带来一些困扰
比如

  • V8 engine 和 embedded NodeJs 需要使用.mjs后缀判定此文件为ES Module文件,以启动ES Module支持
  • Python解释器用import可以更方便地实现实例隔离,而非使用其标准中尚不太完善的subinterpreter
  • 等等

因此有必要为Engine.h提供支持加载指定路径文件的eval,并在不同引擎做特殊处理

@yqs112358
Copy link
Author

Finished in #93 and #91

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant