Until now, the engine's feature set was configurable either via `CONFIG_*` macro guards defined individually on compiler command line or via profiles (which are text files listing macro guards, picked up by the cmake build system and turning them into compiler command line options). And the features under profile control are all enabled by default (i.e., all macros are `CONFIG_DISABLE_*`). This causes a maintenance issue when new features are added to the engine, because the disabling macros have to be added to all profiles that don't include the new features. This can even cause "compatibility break" for applications that embed JerryScript but don't use the cmake or the python build system, because then profiles are unavailable and all feature disabling guards have to be explicitly passed to the compiler. (I.e., if such an application wants to use the ES5.1 feature set, it must define all the ES2015 disable macros; if the engine is developed further and a new ES2015 feature gets implemented, then the new feature will sneak into the application's binary unless its own build system is changed to add the new feature guard.) Even the in-repo example Curie BSP target seems to have suffered from this maintenance problem. This patch introduces two new grouping macro guards that enable the disabling of all ES5.1 builtins and all ES2015 features. As the grouping logic is in config.h, the maintenance of non-cmake-based build systems becomes easier (and there is no change for the python and cmake-based build systems). JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu
JerryScript: JavaScript engine for the Internet of Things
JerryScript is a lightweight JavaScript engine for resource-constrained devices such as microcontrollers. It can run on devices with less than 64 KB of RAM and less than 200 KB of flash memory.
Key characteristics of JerryScript:
- Full ECMAScript 5.1 standard compliance
- 160K binary size when compiled for ARM Thumb-2
- Heavily optimized for low memory consumption
- Written in C99 for maximum portability
- Snapshot support for precompiling JavaScript source code to byte code
- Mature C API, easy to embed in applications
Additional information can be found on our project page and Wiki.
Memory usage and Binary footprint are measured at here with real target daily.
The following table shows the latest results on the devices:
| STM32F4-Discovery | |
|---|---|
| Raspberry Pi 2 |
IRC channel: #jerryscript on freenode
Mailing list: jerryscript-dev@groups.io, you can subscribe here and access the mailing list archive here.
Quick Start
Getting the sources
git clone https://github.com/jerryscript-project/jerryscript.git
cd jerryscript
Building JerryScript
python tools/build.py
For additional information see Getting Started.
Documentation
Contributing
The project can only accept contributions which are licensed under the Apache License 2.0 and are signed according to the JerryScript Developer's Certificate of Origin. For further information please see our Contribution Guidelines.
License
JerryScript is open source software under the Apache License 2.0. Complete license and copyright information can be found in the source code.
Copyright JS Foundation and other contributors, http://js.foundation
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
