-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into enable-asan-on-macos
- Loading branch information
Showing
41 changed files
with
891 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
brew "cmake" | ||
brew "clang-format" | ||
brew "doxygen" | ||
brew "v8" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
vendorpull https://github.com/sourcemeta/vendorpull 70342aaf458e6cb80baeb5b718901075fc42ede6 | ||
noa https://github.com/sourcemeta/noa 653bda26413812241e503fd0b550a66f2df4700f | ||
noa https://github.com/sourcemeta/noa 9da0f1877859f60e439e31856cd4ef5fd4ca6063 | ||
googletest https://github.com/google/googletest 987e225614755fec7253aa95bf959c09e0d380d7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,90 @@ | ||
![IncludeJS](./assets/banner.png) | ||
<p align="center"><img src="./assets/banner.png" alt="includejs logo"/></p> | ||
<h1 align="center">includejs</h1> | ||
<h3 align="center">Build your own JavasScript runtime</h3> | ||
<p align="center"> | ||
<a href="https://github.com/crossnx/includejs/actions/workflows/ci.yml"><img src="https://github.com/crossnx/includejs/actions/workflows/ci.yml/badge.svg" alt="github action build"></a> | ||
</p> | ||
|
||
<p align="center"> | ||
<img referrerpolicy="no-referrer-when-downgrade" src="https://static.scarf.sh/a.png?x-pxid=8107db3b-fcee-4af8-81f0-14e29ec04430" /> | ||
<a href="www.includejs.org/">📖 Documentation</a> | ||
</p> | ||
|
||
`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`](https://github.com/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 | ||
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) | ||
``` | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.