Skip to content

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

@yqs112358

Description

@yqs112358

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

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions