About profile files
Specify compile definitions in profile files to use when compiling the
The default profile is
es.next which enables all of the currently implemented features.
Using profiles with the build system
You can specify the profile for the build system in the following ways:
- with absolute path
- with a name (this options selects profiles/$(name).profile file)
Only single line options are allowed in the profile file. Any line starting with hash-mark is ignored. Semicolon character is not allowed.
1. Using the build script
If you want to use a predefined profile, run the build script as follows (assuming that you are in the project root folder):
Alternatively, if you want to use a custom profile at
# Disable not needed features JERRY_BUILTIN_DATAVIEW=0 JERRY_BUILTIN_MAP=0 JERRY_BUILTIN_PROMISE=0 JERRY_BUILTIN_SET=0 JERRY_BUILTIN_TYPEDARRAY=0
Run the build script as follows (assuming that you are in the project root folder):
2. Using only CMake build system
Set FEATURE_PROFILE option to one of the following values:
- the profile with absolute path
- name of the profile (which needs to exist in the
In JerryScript all of the features are enabled by default, so an empty profile file turns on all of the available ECMA features.
The defines can have a value of
1. If for whatever reason one of them are not defined, it is treated as if it were
ES 5.1 features
JERRY_BUILTIN_ANNEXB: Enables or disables the Annex B of the ECMA5.1 standard.
JERRY_BUILTIN_ARRAY: Enables or disable the Array built-in.
JERRY_BUILTIN_BOOLEAN: Enables or disables the Boolean built-in.
JERRY_BUILTIN_DATE: Enables or disables the Date built-in.
JERRY_BUILTIN_ERRORS: Enables or disables the Native Error Types (EvalError, RangeError, ReferenceError, SyntaxError, TypeError, URIError). Note: The Error object remains available.
JERRY_BUILTIN_JSON: Enables or disables the JSON built-in.
JERRY_BUILTIN_MATH: Enables or disables the Math built-in.
JERRY_BUILTIN_NUMBER: Enables or disables the Number built-in.
JERRY_BUILTIN_REGEXP: Enables or disables the RegExp built-in.
JERRY_BUILTIN_STRING: Enables or disables the String built-in.
JERRY_BUILTINS: Enables or disable all of the Standard Built-in ECMAScript 5.1 Objects This option is evaulated first, any other
JERRY_BUILTIN_<name>defines will override that specific builtin config. Equivalent with setting the following defines to the
JERRY_BUILTIN_BIGINT: Enables or disables the BigInt syntax and built-in.
JERRY_BUILTIN_DATAVIEW: Enables or disables the DataView built-in.
JERRY_BUILTIN_MAP: Enables or disables the Map built-ins.
JERRY_BUILTIN_PROMISE: Enables or disables the Promise built-in.
JERRY_BUILTIN_PROXY: Enables or disables the Proxy related internal workings and built-in.
JERRY_BUILTIN_REALMS: Enables or disables the Realms support in the engine.
JERRY_BUILTIN_REFLECT: Enables or disables the Reflext built-in.
JERRY_BUILTIN_SET: Enables or disables the Set built-in.
JERRY_BUILTIN_WEAKMAP: Enables or disables the WeakMap built-in.
JERRY_BUILTIN_WEAKSET: Enables or disables the WeakSet built-in.
JERRY_MODULE_SYSTEM: Enables or disable the module system language element.
JERRY_ESNEXT: Enables or disables all of the implemented ECMAScript2015+ features above.
- arrow functions language element.
- async functions language element.
- class language element.
- default value for formal parameters.
- destructuring assignment language element.
- destructuring binding pattern declarations.
- enhanced object initializer language element.
- for-of language element.
- for-await-of language element.
- generator functions language element.
- iterator built-in.
- nullish coalescing built-in.
- numeric separator language element.
- rest parameter language element.
- rest operator with object destructuring language element.
- spread syntax.
- symbol language element.
- template strings language element.
Furthermore all builtins follow the latest ECMAScript specification including those which behave differently in ES5.1. This option is evaulated first, any other
JERRY_<name>defines will override that specific entry. Equivalent with setting the following defines to the