includejs offers a unified API for building your own JavaScript runtime, bridging multiple engines and platforms with ease.
In our journey to enhance includejs, we've also developed small - a minimalist, experimental runtime
aimed to provide ground for concepts and features we're considering for it.
Hosted on GitHub at crossnx/small.
- Multiple runtime support:
JavascriptCore,v8(more in the furture) - Cross platform support
- Direclty consumable from
CMake
π€ Stay tuned as we continue to expand our feature set.
| Feature | JavaScriptCore | V8 |
|---|---|---|
| Boolean | β Supported | β Not Supported |
| Number | β Supported | β Not Supported |
| String | β Supported | β Not Supported |
| Object | β Supported | β Not Supported |
| Array | β Supported | β Not Supported |
| Promise | β Supported | β Not Supported |
| Function | β Supported | β Not Supported |
| Error | β Supported | β Not Supported |
| Class | β Not Supported | β Not Supported |
| Set | β Not Supported | β Not Supported |
| Map | β Not Supported | β Not Supported |
| BigInt | β Not Supported | β Not Supported |
| Symbol | β Not Supported | β Not Supported |
| ArrayBuffer | β Not Supported | β Not Supported |
| TypedArray | β Not Supported | β Not Supported |
- Timers
- Console
| Platform | JavaScriptCore | V8 |
|---|---|---|
| macOS | β Supported | β Supported |
| Linux | β Supported | β Supported |
| Windows | β Not Supported | β Not Supported |
- C++
- CMake
- JavascriptCore
- Brew (macOS)
You can consume includejs just with CMake:
cmake_minimum_required(VERSION 3.18)
project(your_runtime VERSION 0.0.1 LANGUAGES CXX)
include(FetchContent)
FetchContent_Declare(
includejs
GIT_REPOSITORY https://github.com/crossnx/includejs
GIT_TAG main
DOWNLOAD_EXTRACT_TIMESTAMP NO)
FetchContent_MakeAvailable(includejs)
add_executable(your_runtime main.cc)
target_link_libraries(your_runtime PRIVATE includejs::engine)
