Skip to content

Latest commit

Β 

History

History
90 lines (67 loc) Β· 3.03 KB

File metadata and controls

90 lines (67 loc) Β· 3.03 KB

includejs logo

includejs

Build your own JavasScript runtime

github action build

πŸ“– Documentation

includejs offers a unified API for building your own JavaScript runtime, bridging multiple engines and platforms with ease.

Example

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.

Features

  • 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.

JavasScript

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

WHATWG APIs

  • Timers
  • Console

Platform support

Platform JavaScriptCore V8
macOS βœ… Supported βœ… Supported
Linux βœ… Supported βœ… Supported
Windows ❌ Not Supported ❌ Not Supported

Dependencies

  • C++
  • CMake
  • JavascriptCore
  • Brew (macOS)

Usage

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)