GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - codelibs/sai: JavaScript engine developed in the Java programming language

BranchesTags
Open more actions menu

Latest commit

 

History

141 Commits
141 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bin
bin
 
 
buildtools/saigen
buildtools/saigen
 
 
docs
docs
 
 
gradle
gradle
 
 
samples
samples
 
 
src
src
 
 
test
test
 
 
tools/fxshell/org/codelibs/sai/tools
tools/fxshell/org/codelibs/sai/tools
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
ASSEMBLY_EXCEPTION
ASSEMBLY_EXCEPTION
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CLAUDE.md
CLAUDE.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
NOTICE
NOTICE
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
THIRD_PARTY_README
THIRD_PARTY_README
 
 
build.gradle.kts
build.gradle.kts
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle.kts
settings.gradle.kts
 
 

Repository files navigation

CodeLibs Sai Java CI with Gradle

Sai is a runtime environment for programs written in ECMAScript 5.1 that runs on top of JVM. This project forked from Nashorn.

Features

  • ECMAScript 5.1 implementation
  • Runs on JVM (Java 21+)
  • JSR-223 Script Engine API support
  • High performance bytecode generation using ASM library

Usage

Maven

JAR file is available in Maven repository. Add the following dependency to your pom.xml:

<dependency>
    <groupId>org.codelibs</groupId>
    <artifactId>sai</artifactId>
    <version>0.3.0</version>
</dependency>

Gradle

Add the following dependency to your build.gradle:

dependencies {
    implementation 'org.codelibs:sai:0.3.0'
}

Or in build.gradle.kts:

dependencies {
    implementation("org.codelibs:sai:0.3.0")
}

Build

See CONTRIBUTING.md for the project layout, the script test convention, and how to narrow a test run.

Requirements

  • Java 21. The build declares a Java 21 toolchain, so Gradle provisions one if needed.
  • No local Gradle install; use the wrapper.

Build Commands

# Full build (compile, test, javadoc, jar)
./gradlew build

# Clean build artifacts
./gradlew clean

# Create JAR only
./gradlew jar

# Run tests
./gradlew test

# Run tests in optimistic mode
./gradlew testOptimistic

# Run tests in pessimistic mode
./gradlew testPessimistic

# Generate Javadoc
./gradlew javadoc

# Generate API Javadoc only
./gradlew javadocApi

Running JavaScript

# Run a sample JavaScript file
./gradlew run

# Debug mode with code inspection
./gradlew debug

Testing

# Run all tests
./gradlew test

# Run test262 ECMAScript compliance tests
./gradlew test262

# Run test262 in parallel
./gradlew test262Parallel

# Download external test suites
./gradlew downloadExternals

Build Output

After building, you'll find the following artifacts in build/libs/:

  • sai-X.X.X.jar - Main JAR file
  • sai-X.X.X-sources.jar - Source code JAR
  • sai-X.X.X-javadoc.jar - Javadoc JAR

Note that ./gradlew compileJava on its own does not produce a usable engine: the @ScriptClass types are instrumented after compilation and only the JAR carries the result. Build jar, or anything that depends on it.

Contributing

Bug reports and pull requests are welcome - see CONTRIBUTING.md. For security issues, follow SECURITY.md rather than opening an issue.

License

GPLv2 with the Classpath Exception, inherited from Nashorn. See LICENSE and ASSEMBLY_EXCEPTION. Code bundled from other projects is listed in NOTICE.

About

JavaScript engine developed in the Java programming language

Resources

Readme
GPL-2.0 license

Contributing

Contributing

Security policy

Security policy
Activity
Custom properties

Stars

4 stars

Watchers

7 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.