Skip to content

Optional features #2068

Open
Open
@Razican

Description

Currently, the engine is provided as-is, with almost no room for customizing its features. Nevertheless, we have some situations (such as the optional #2067 feature, or the eval() function, or even not fully published features where it would be nice if the user of the engine could decide if they are available or not.

This can be provided by creating a feature for each of the features in the spec. Then, by default, we would include everything that is part of the spec and it's mandatory (still allowing our users to not use default features and pick each of them individually). Parts of the spec that are still only proposals (even if they are in test262) should not be included by default, but should be included when testing.

Furthermore, some users might not want all built-ins in the engine, to provide a smaller surface for their users, so we should provide an API where the global object is empty, and users can decide the list of globals that get added.

This would require extensive testing, so we would need to probably do a cargo check with each feature individually and --no-default-features.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      To do

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions