./scripts/show-results.sh ci ${{ needs.perf-main.outputs.result-link }} ${{ needs.perf-current.outputs.result-link }}
' >> $GITHUB_STEP_SUMMARY
echo "Or use a pre-built container image:" >> $GITHUB_STEP_SUMMARY
- echo -e '
docker run --rm -it -p 3000:3000 docker.io/andreatp/chicory-show-jmh ci ${{ needs.perf-main.outputs.result-link }} ${{ needs.perf-current.outputs.result-link }}
' >> $GITHUB_STEP_SUMMARY
+ echo -e '
docker run --rm -it -p 3000:3000 docker.io/andreatp/endive-show-jmh ci ${{ needs.perf-main.outputs.result-link }} ${{ needs.perf-current.outputs.result-link }}
' >> $GITHUB_STEP_SUMMARY
diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index e93340eaa..cabebe80b 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -47,8 +47,8 @@ jobs:
- name: Setup Git
run: |
- git config user.name "Chicory BOT"
- git config user.email "chicory@dylibso.com"
+ git config user.name "Endive BOT"
+ git config user.email "endive@bytecodealliance.org"
- name: Set the version
run: |
diff --git a/.github/workflows/zig-testsuite.yaml b/.github/workflows/zig-testsuite.yaml
index 230cac1ef..5a3df406e 100644
--- a/.github/workflows/zig-testsuite.yaml
+++ b/.github/workflows/zig-testsuite.yaml
@@ -21,10 +21,10 @@ jobs:
java-version: '21'
cache: maven
- name: Compile the Zig testsuite
- if: github.repository_owner == 'dylibso'
+ if: github.repository_owner == 'bytecodealliance'
run: ./scripts/build-zig-testsuite.sh
- name: Nightly Test
- if: github.repository_owner == 'dylibso'
+ if: github.repository_owner == 'bytecodealliance'
run: |
# Build everything
mvn -B -Dquickly
diff --git a/ADOPTERS.md b/ADOPTERS.md
new file mode 100644
index 000000000..41eff7da6
--- /dev/null
+++ b/ADOPTERS.md
@@ -0,0 +1,22 @@
+# Endive Adopters
+
+Organizations and projects using Endive (formerly Chicory) in production:
+
+* [sqlite4j](https://github.com/roastedroot/sqlite4j) - Pure Java SQLite JDBC driver
+* [pglite4j](https://github.com/roastedroot/pglite4j) - Embedded PostgreSQL 17 in pure Java
+* [Quickjs4J](https://github.com/roastedroot/quickjs4j) - Sandboxed runtime for JavaScript (used by [Microcks](https://github.com/microcks/microcks) and [Apicurio Registry](https://github.com/Apicurio/apicurio-registry))
+* [jq4j](https://github.com/roastedroot/jq4j) - jq JSON processor as pure Java bytecode
+* [protobuf4j](https://github.com/roastedroot/protobuf4j) - protoc compiler as pure Java bytecode
+* [lumis4j](https://github.com/roastedroot/lumis4j) - Pure Java syntax highlighter powered by Tree-sitter
+* [Proxy-Wasm Java Host](https://github.com/roastedroot/proxy-wasm-java-host)
+* [Apache Camel - Wasm component](https://camel.apache.org/components/4.8.x/wasm-component.html)
+* [JRuby](https://github.com/jruby/jruby) - Ruby Prism parser
+* [Debezium](https://github.com/debezium/debezium) - Pluggable Go Single Message Transformations
+* [OPA Java Wasm SDK](https://github.com/StyraInc/opa-java-wasm) - Open Policy Agent WebAssembly Java SDK
+* [Trino](https://trino.io/docs/current/udf/python.html) - Python user-defined functions
+* [Extism Chicory SDK](https://github.com/extism/chicory-sdk)
+* [OpenFeature Go Feature Flag provider](https://github.com/open-feature/java-sdk-contrib) - local feature flag evaluation
+* [Spotify Confidence resolver](https://github.com/spotify/confidence-resolver) - local feature flag evaluation
+* [Bazel](https://github.com/bazelbuild/bazel) - WebAssembly execution in repo rules
+* [WildFly AI Feature Pack](https://github.com/wildfly-extras/wildfly-ai-feature-pack)
+* Quarkus extensions: [quarkus-chicory](https://github.com/quarkiverse/quarkus-chicory), [quarkus-proxy-wasm](https://github.com/quarkiverse/quarkus-proxy-wasm), [quarkus-quickjs4j](https://github.com/quarkiverse/quarkus-quickjs4j), [quarkus-grpc-zero](https://github.com/quarkiverse/quarkus-grpc-zero)
diff --git a/AGENT.md b/AGENT.md
index 4b69874f8..120a3e16b 100644
--- a/AGENT.md
+++ b/AGENT.md
@@ -1,6 +1,6 @@
# Working with this repository
-Chicory is a WebAssembly runtime written in Java. This document captures practical knowledge for working in the codebase.
+Endive is a WebAssembly runtime written in Java. This document captures practical knowledge for working in the codebase.
## Prerequisites
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 000000000..f84fd18db
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,49 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
+
+## Code of Conduct Team
+
+The Organization’s Code of Conduct Team is responsible for ensuring that all Code of Conduct complaints are investigated and resolved. It consists of the members of the Technical Steering Commmittee along with the Executive Director acting as Compliance Officer. The Compliance Officer, on behalf of the Code of Conduct Team, will advise the Board of all complaints and their resolution and will report at least annually to the Board on compliance activity relating to the organizational Code of Conduct.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Bytecode Alliance CoC Team at [report@bytecodealliance.org](mailto:report@bytecodealliance.org). The CoC Team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The CoC Team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the Bytecode Alliance's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at http://contributor-covenant.org/version/1/4.
+
+[homepage]: https://www.contributor-covenant.org
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 4f307fb32..4d5e22047 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -19,7 +19,7 @@ But first, read this page (including the small print at the end).
## Coding Philosophy
-Writing a runtime is a big challenge. We want Chicory to always be a solid foundation
+Writing a runtime is a big challenge. We want Endive to always be a solid foundation
for running Wasm in Java. In order to accomplish this, it's going to take a large team
of diverse contributors. That's why our goal up front is to aim for writing
simple code that's easy to understand and is as backwards compatible as possible.
@@ -92,7 +92,7 @@ Our priority is to focus on implementing [proposals](https://github.com/WebAssem
### Continuous Integration
-Because we are all humans, and to ensure Chicory evolves in the right direction, all changes must pass continuous integration before being merged. The CI is based on GitHub Actions, which means that pull requests will receive automatic feedback. Please watch out for the results of these workflows to see if your PR passes all tests.
+Because we are all humans, and to ensure Endive evolves in the right direction, all changes must pass continuous integration before being merged. The CI is based on GitHub Actions, which means that pull requests will receive automatic feedback. Please watch out for the results of these workflows to see if your PR passes all tests.
### IntelliJ default limits
@@ -125,7 +125,7 @@ If you believe you found a bug, and it's likely possible, please indicate a way
## Legal
-All original contributions to Chicory projects are licensed under the
+All original contributions to Endive projects are licensed under the
[ASL - Apache License](https://www.apache.org/licenses/LICENSE-2.0),
version 2.0 or later, or, if another license is specified as governing the file or directory being
modified, such other license.
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 000000000..4cb5b84e3
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,5 @@
+Endive
+Copyright 2026 The Bytecode Alliance
+
+This project is based on Chicory, originally created by Dylibso, Inc.
+Original source: https://github.com/dylibso/chicory
diff --git a/README.md b/README.md
index c44f0d4ed..700c7e5c1 100644
--- a/README.md
+++ b/README.md
@@ -1,31 +1,35 @@
-# Chicory
+# Endive
-
[](https://gist.githubusercontent.com/andreaTP/69354d1cc6cf23e4c3c4a9a8daf7ea15/raw/badge-interpreter.svg)
[](https://gist.githubusercontent.com/andreaTP/69354d1cc6cf23e4c3c4a9a8daf7ea15/raw/badge-compiler.svg)
[](https://gist.githubusercontent.com/andreaTP/69354d1cc6cf23e4c3c4a9a8daf7ea15/raw/badge-wasi.svg)
-[](https://chicory.zulipchat.com/join/g4gqsxoys6orfxlrk6hn4cyp/)
+[](https://bytecodealliance.zulipchat.com/#narrow/stream/endive)
-Chicory is a JVM native WebAssembly runtime. It allows you to run WebAssembly programs with
-zero native dependencies or JNI. Chicory can run Wasm anywhere that the JVM can go. It is designed with
+Endive is a JVM native WebAssembly runtime. It allows you to run WebAssembly programs with
+zero native dependencies or JNI. Endive can run Wasm anywhere that the JVM can go. It is designed with
simplicity and safety in mind.
-> *Reach out to us*: let us know what you are building with Chicory.
-> [Join our team Zulip chat with this invite link](https://chicory.zulipchat.com/join/g4gqsxoys6orfxlrk6hn4cyp/).
+Endive is a fork of [Chicory](https://github.com/dylibso/chicory) by Dylibso, Inc.
+We thank Dylibso for the incubation period and their foundational work on this project.
+
+> *Reach out to us*: let us know what you are building with Endive.
+> [Join our Zulip chat](https://bytecodealliance.zulipchat.com/#narrow/stream/endive).
-Get started now with the [official documentation](https://chicory.dev/docs/)
+Get started now with the [official documentation](https://endive.run/docs/)
## Why?
@@ -43,65 +47,46 @@ architecture and operating system. This matrix can become quite large. This elim
### 2. Runtime
-At runtime, you must use FFI to execute the module. While there might be performance benefits to doing this for some modules,
-when you do, you're effectively escaping the safety and observability of the JVM. Having a pure JVM runtime means all your
+At runtime, you must use FFI to execute the module. When you do, you're effectively escaping the safety and observability of the JVM. Having a pure JVM runtime means all your
security and memory guarantees, and your tools, can stay in place.
## Goals
+* Be the default runtime for Wasm on the JVM
* Be as safe as possible
- * In that we are willing to sacrifice things like performance for safety and simplicity
-* Make it easy to run Wasm in any JVM environment without native code, including very restrictive environments.
+* Make it easy to run Wasm in any JVM environment without native code, including very restrictive environments
* Fully support the core Wasm spec
-* Make integration with Java (and other host languages) easy and idiomatic.
-
-## Non-Goals:
-
-* Be a standalone runtime
-* Be the fastest runtime
-* Be the right choice for every JVM project
+* Make integration with Java (and other host languages) easy and idiomatic
## Roadmap
-Chicory development was started in September 2023. The following are the milestones we're aiming for. These
-are subject to change but represent our best guesses with current information. These are not necessarily sequential
-and some may be happening in parallel. Unless specified, any unchecked box is still not planned or started.
+Endive development builds on years of work started in September 2023 as Chicory.
If you have an interest in working on any of these please reach out in Zulip!
-### 2023
+### Completed
* [x] Wasm binary parser
* [x] Simple bytecode interpreter
-* [x] Establish basic coding and testing patterns
* [x] Generate JUnit tests from wasm test suite
-
-### 2024
-
-* [x] Make all tests green with the interpreter (important for correctness)
-* [x] Implement validation logic (important for safety)
-* [x] Draft of the v1.0 API (important for stability and dx)
-* [x] Decouple interpreter and create separate compiler and interpreter "engines"
-* [x] Proof of concept AOT compiler (run some subset of modules)
-* [x] AOT engine passes all the same specs as interpreter (stretch goal)
+* [x] All tests green with the interpreter (correctness)
+* [x] Validation logic (safety)
+* [x] v1.0 API (stability and dx)
+* [x] Decoupled interpreter and compiler "engines"
+* [x] Build-time compiler passes all the same specs as interpreter
* [x] WASIp1 Support (including test gen)
- * [Read more details in the documentation](https://chicory.dev/docs/usage/wasi/)
-
-### 2025
-
* [x] SIMD Support
- * in the interpreter
-* [x] Tail Call
- * in the interpreter(and compiler**)
+* [x] Tail Call (interpreter and compiler)
* [x] Compiler out of experimental
* [x] Exception Handling
* [x] Threads Support
* [x] Extended Constant Expressions
-
-### 2026
-
* [x] GC support
* [x] Multi-Memory Support
+
+### Ongoing
+
* [ ] Performance
+* [ ] WASIp2 Support
## On the press
@@ -127,28 +112,6 @@ If you have an interest in working on any of these please reach out in Zulip!
* [kwasm](https://github.com/jasonwyatt/KWasm)
* [wazero](https://wazero.io/)
-## Who uses Chicory?
-
-* [sqlite4j - Pure Java SQLite JDBC driver](https://github.com/roastedroot/sqlite4j)
-* [pglite4j - Embedded PostgreSQL 17 in pure Java](https://github.com/roastedroot/pglite4j)
-* [Quickjs4J - Sandboxed runtime for JavaScript](https://github.com/roastedroot/quickjs4j) (used by [Microcks](https://github.com/microcks/microcks) and [Apicurio Registry](https://github.com/Apicurio/apicurio-registry))
-* [jq4j - jq JSON processor as pure Java bytecode](https://github.com/roastedroot/jq4j)
-* [protobuf4j - protoc compiler as pure Java bytecode](https://github.com/roastedroot/protobuf4j)
-* [lumis4j - Pure Java syntax highlighter powered by Tree-sitter](https://github.com/roastedroot/lumis4j)
-* [Proxy-Wasm - Java Host](https://github.com/roastedroot/proxy-wasm-java-host)
-* Quarkus extensions: [quarkus-chicory](https://github.com/quarkiverse/quarkus-chicory), [quarkus-proxy-wasm](https://github.com/quarkiverse/quarkus-proxy-wasm), [quarkus-quickjs4j](https://github.com/quarkiverse/quarkus-quickjs4j), [quarkus-grpc-zero](https://github.com/quarkiverse/quarkus-grpc-zero)
-* [Apache Camel - Wasm component](https://camel.apache.org/components/4.8.x/wasm-component.html)
-* [JRuby - Ruby Prism parser](https://github.com/jruby/jruby)
-* [Debezium - Pluggable Go Single Message Transformations](https://github.com/debezium/debezium)
-* [OPA - Open Policy Agent - WebAssembly Java SDK](https://github.com/StyraInc/opa-java-wasm)
-* [Trino - Python user-defined functions](https://trino.io/docs/current/udf/python.html) [(Trino plugin source)](https://github.com/trinodb/trino/tree/master/plugin/trino-functions-python) [(Python host source)](https://github.com/trinodb/trino-wasm-python)
-* [Extism Chicory SDK](https://github.com/extism/chicory-sdk)
-* [OpenFeature Go Feature Flag provider - local feature flag evaluation](https://github.com/open-feature/java-sdk-contrib)
-* [Spotify Confidence resolver - local feature flag evaluation](https://github.com/spotify/confidence-resolver)
-* [Bazel - WebAssembly execution in repo rules](https://github.com/bazelbuild/bazel)
-* [WildFly - AI Feature Pack](https://github.com/wildfly-extras/wildfly-ai-feature-pack)
-
-## Meet the Team
-
-📅 Chicory Office Hours, every Tuesdays, 16:00–16:30 UTC (09:00–09:30 PT · 12:00–12:30 ET · 18:00–18:30 CET).
-The link will be shared in the Zulip chat each week. Let’s talk Chicory!
+## Who uses Endive?
+
+See [ADOPTERS.md](ADOPTERS.md) for the full list of organizations and projects using Endive.
diff --git a/SECURITY.md b/SECURITY.md
index 67cf632f4..df4123765 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -1,9 +1,13 @@
-# Reporting Security Issues
+# Security Policy
-The Chicory team and community take security bugs in Chicory seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
+Please refer to the [Bytecode Alliance security policy](https://bytecodealliance.org/security) for details on our disclosure policy and how to receive notifications about security issues.
-To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/dylibso/chicory/security/advisories/new) tab.
+## Reporting a Vulnerability
-The Chicory team will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
+To report a vulnerability, navigate to the [security](https://github.com/bytecodealliance/endive/security) tab and click the green `Report a Vulnerability` button, or use [this direct link](https://github.com/bytecodealliance/endive/security/advisories/new) to the reporting form.
-Report security bugs in third-party modules to the person or team maintaining the module when applicable.
+The Endive team will send a response indicating the next steps in handling your report. After the initial reply, we will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
+
+Security patches are handled as priority releases. We recommend that CVE numbers are requested for discovered vulnerabilities following the [Bytecode Alliance security policy](https://bytecodealliance.org/security).
+
+Report security bugs in third-party dependencies to the person or team maintaining them when applicable.
diff --git a/android-tests/README.md b/android-tests/README.md
index c2ed575cc..368e8eb1b 100644
--- a/android-tests/README.md
+++ b/android-tests/README.md
@@ -1,8 +1,8 @@
-# Running Chicory tests on Android
+# Running Endive tests on Android
-This is an Android project designed to run Chicory tests on device.
+This is an Android project designed to run Endive tests on device.
-Since Chicory uses maven and Android doesn't have official maven
+Since Endive uses maven and Android doesn't have official maven
support, we cannot make Android testing part of the main build.
Instead, we use this project where it uses the outputs of the
@@ -10,10 +10,10 @@ main maven build to run those tests as Android instrumentation tests.
Inside the `device-tests` folder, there is an Android library project
setup. It doesn't have any code, except for declaring product flavors
-for each main chicory project and setting up its dependencies to run
+for each main endive project and setting up its dependencies to run
tests.
-To run the tests on Android you need first to build a local `CHICORY_REPO`:
+To run the tests on Android you need first to build a local `ENDIVE_REPO`:
```bash
mvn -Dandroid-prepare
@@ -30,12 +30,12 @@ Finally you can run the tests from the gradle project:
./android-tests/gradlew -p android-tests cC
```
-You can override the repository location by setting the `CHICORY_REPO` environment variable.
-It can either be an absolute path, or relative to the Chicory checkout directory.
+You can override the repository location by setting the `ENDIVE_REPO` environment variable.
+It can either be an absolute path, or relative to the Endive checkout directory.
```base
# mv local-repo my-repo
-CHICORY_REPO=my-repo ./android-tests/gradlew -p android-tests cC
+ENDIVE_REPO=my-repo ./android-tests/gradlew -p android-tests cC
```
## Environment Setup
diff --git a/android-tests/device-tests/build.gradle.kts b/android-tests/device-tests/build.gradle.kts
index f275a1b30..d399365a1 100644
--- a/android-tests/device-tests/build.gradle.kts
+++ b/android-tests/device-tests/build.gradle.kts
@@ -4,7 +4,7 @@ plugins {
}
android {
- namespace = "com.dylibso.runtimeTests"
+ namespace = "run.endive.runtimeTests"
compileSdk = 35
defaultConfig {
@@ -12,10 +12,10 @@ android {
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
- val chicoryDimension = "chicoryDimension"
- flavorDimensions += chicoryDimension
+ val endiveDimension = "endiveDimension"
+ flavorDimensions += endiveDimension
productFlavors {
- create("runtime") { dimension = chicoryDimension }
+ create("runtime") { dimension = endiveDimension }
// add future modules similar to the runtime configuration above.
}
@@ -42,11 +42,11 @@ dependencies {
// if you need to add a dependency on a specific module, you can use
// "androidTestImplementation"()
// e.g.
- // "androidTestRuntimeImplementation"(libs.chicory.runtime)
- androidTestImplementation(libs.chicory.wasi)
- androidTestImplementation(libs.chicory.runtime)
- androidTestImplementation(libs.chicory.wasm)
- androidTestImplementation(libs.chicory.wasmCorpus)
+ // "androidTestRuntimeImplementation"(libs.endive.runtime)
+ androidTestImplementation(libs.endive.wasi)
+ androidTestImplementation(libs.endive.runtime)
+ androidTestImplementation(libs.endive.wasm)
+ androidTestImplementation(libs.endive.wasmCorpus)
androidTestImplementation(libs.junit.jupiter.api)
}
@@ -57,7 +57,7 @@ dependencies {
* the target maven project. See the pom file for runtime project for a sample setup.
*
* @param configurationName Target Gradle configuration name
- * @param libraryPath Library path relative to the main chicory maven project
+ * @param libraryPath Library path relative to the main endive maven project
*/
fun addLibraryTests(configurationName: String, libraryPath: String) {
// Add the jar task's output as a dependency.
diff --git a/android-tests/device-tests/src/androidTest/java/com/dylibso/runtimeTests/Placeholder.kt b/android-tests/device-tests/src/androidTest/java/run/endive/runtimeTests/Placeholder.kt
similarity index 75%
rename from android-tests/device-tests/src/androidTest/java/com/dylibso/runtimeTests/Placeholder.kt
rename to android-tests/device-tests/src/androidTest/java/run/endive/runtimeTests/Placeholder.kt
index d6c4ce900..07306968a 100644
--- a/android-tests/device-tests/src/androidTest/java/com/dylibso/runtimeTests/Placeholder.kt
+++ b/android-tests/device-tests/src/androidTest/java/run/endive/runtimeTests/Placeholder.kt
@@ -1,4 +1,4 @@
-package com.dylibso.runtimeTests
+package run.endive.runtimeTests
// we need a file here to prevent gradle from skipping tests due to no inputs.
object Placeholder
diff --git a/android-tests/gradle/libs.versions.toml b/android-tests/gradle/libs.versions.toml
index 7cf94de56..51a4c762c 100644
--- a/android-tests/gradle/libs.versions.toml
+++ b/android-tests/gradle/libs.versions.toml
@@ -1,15 +1,15 @@
[versions]
agp = "9.1.0"
junitJupiterApi = "5.14.3"
-kotlin = "2.3.20"
-chicory = "999-SNAPSHOT"
+kotlin = "2.3.21"
+endive = "999-SNAPSHOT"
[libraries]
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junitJupiterApi" }
-chicory-wasi = { module = "com.dylibso.chicory:wasi", version.ref = "chicory"}
-chicory-runtime = { module = "com.dylibso.chicory:runtime", version.ref = "chicory"}
-chicory-wasm = { module = "com.dylibso.chicory:wasm", version.ref = "chicory"}
-chicory-wasmCorpus = { module = "com.dylibso.chicory:wasm-corpus", version.ref = "chicory"}
+endive-wasi = { module = "run.endive:wasi", version.ref = "endive"}
+endive-runtime = { module = "run.endive:runtime", version.ref = "endive"}
+endive-wasm = { module = "run.endive:wasm", version.ref = "endive"}
+endive-wasmCorpus = { module = "run.endive:wasm-corpus", version.ref = "endive"}
android-gradle-plugin-api = { module = "com.android.tools.build:gradle-api", version.ref = "agp"}
[plugins]
kotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
diff --git a/android-tests/settings.gradle.kts b/android-tests/settings.gradle.kts
index 5339c8ac3..d1ccf19ce 100644
--- a/android-tests/settings.gradle.kts
+++ b/android-tests/settings.gradle.kts
@@ -16,7 +16,7 @@ dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenLocal {
- val repoOverride = settings.providers.environmentVariable("CHICORY_REPO")
+ val repoOverride = settings.providers.environmentVariable("ENDIVE_REPO")
val relativePath =
if (repoOverride.isPresent) {
repoOverride.get()
diff --git a/annotations/annotations/pom.xml b/annotations/annotations/pom.xml
index 4308addc6..97c9f7ab9 100644
--- a/annotations/annotations/pom.xml
+++ b/annotations/annotations/pom.xml
@@ -3,14 +3,14 @@
4.0.0
- com.dylibso.chicory
- chicory
+ run.endive
+ endive999-SNAPSHOT../../pom.xmlannotationsjar
- Chicory - Annotations
+ Endive - AnnotationsAnnotations for easy interoperability with Wasm modules
diff --git a/annotations/annotations/src/main/java/module-info.java b/annotations/annotations/src/main/java/module-info.java
index 9ac617bed..059577dec 100644
--- a/annotations/annotations/src/main/java/module-info.java
+++ b/annotations/annotations/src/main/java/module-info.java
@@ -1,3 +1,3 @@
-module com.dylibso.chicory.annotations {
- exports com.dylibso.chicory.annotations;
+module run.endive.annotations {
+ exports run.endive.annotations;
}
diff --git a/annotations/annotations/src/main/java/com/dylibso/chicory/annotations/Buffer.java b/annotations/annotations/src/main/java/run/endive/annotations/Buffer.java
similarity index 86%
rename from annotations/annotations/src/main/java/com/dylibso/chicory/annotations/Buffer.java
rename to annotations/annotations/src/main/java/run/endive/annotations/Buffer.java
index 2cbb306ed..7336d1453 100644
--- a/annotations/annotations/src/main/java/com/dylibso/chicory/annotations/Buffer.java
+++ b/annotations/annotations/src/main/java/run/endive/annotations/Buffer.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.annotations;
+package run.endive.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/annotations/annotations/src/main/java/com/dylibso/chicory/annotations/CString.java b/annotations/annotations/src/main/java/run/endive/annotations/CString.java
similarity index 86%
rename from annotations/annotations/src/main/java/com/dylibso/chicory/annotations/CString.java
rename to annotations/annotations/src/main/java/run/endive/annotations/CString.java
index eba26052a..450c51d39 100644
--- a/annotations/annotations/src/main/java/com/dylibso/chicory/annotations/CString.java
+++ b/annotations/annotations/src/main/java/run/endive/annotations/CString.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.annotations;
+package run.endive.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/annotations/annotations/src/main/java/com/dylibso/chicory/annotations/HostModule.java b/annotations/annotations/src/main/java/run/endive/annotations/HostModule.java
similarity index 87%
rename from annotations/annotations/src/main/java/com/dylibso/chicory/annotations/HostModule.java
rename to annotations/annotations/src/main/java/run/endive/annotations/HostModule.java
index d0b6e3ca2..9d84ce11f 100644
--- a/annotations/annotations/src/main/java/com/dylibso/chicory/annotations/HostModule.java
+++ b/annotations/annotations/src/main/java/run/endive/annotations/HostModule.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.annotations;
+package run.endive.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/annotations/annotations/src/main/java/com/dylibso/chicory/annotations/WasmExport.java b/annotations/annotations/src/main/java/run/endive/annotations/WasmExport.java
similarity index 87%
rename from annotations/annotations/src/main/java/com/dylibso/chicory/annotations/WasmExport.java
rename to annotations/annotations/src/main/java/run/endive/annotations/WasmExport.java
index 001f809f1..d62e6a166 100644
--- a/annotations/annotations/src/main/java/com/dylibso/chicory/annotations/WasmExport.java
+++ b/annotations/annotations/src/main/java/run/endive/annotations/WasmExport.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.annotations;
+package run.endive.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/annotations/annotations/src/main/java/com/dylibso/chicory/annotations/WasmModuleInterface.java b/annotations/annotations/src/main/java/run/endive/annotations/WasmModuleInterface.java
similarity index 92%
rename from annotations/annotations/src/main/java/com/dylibso/chicory/annotations/WasmModuleInterface.java
rename to annotations/annotations/src/main/java/run/endive/annotations/WasmModuleInterface.java
index fa83ffc5d..0aa7bef32 100644
--- a/annotations/annotations/src/main/java/com/dylibso/chicory/annotations/WasmModuleInterface.java
+++ b/annotations/annotations/src/main/java/run/endive/annotations/WasmModuleInterface.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.annotations;
+package run.endive.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
diff --git a/annotations/it/pom.xml b/annotations/it/pom.xml
index 4c9c5730e..4ec656013 100644
--- a/annotations/it/pom.xml
+++ b/annotations/it/pom.xml
@@ -3,29 +3,29 @@
4.0.0
- com.dylibso.chicory
- chicory
+ run.endive
+ endive999-SNAPSHOT../../pom.xmlannotations-itjar
- Chicory - Annotations - IT
- Integration tests for the Chicory annotations
+ Endive - Annotations - IT
+ Integration tests for the Endive annotations
- com.dylibso.chicory
+ run.endiveannotations-processor
- com.dylibso.chicory
- chicory-compiler-maven-plugin
+ run.endive
+ endive-compiler-maven-plugin
- com.dylibso.chicory
+ run.endivewasi
@@ -38,9 +38,9 @@
maven-dependency-plugin
- com.dylibso.chicory:annotations-processor
- com.dylibso.chicory:chicory-compiler-maven-plugin
- com.dylibso.chicory:wasi
+ run.endive:annotations-processor
+ run.endive:endive-compiler-maven-plugin
+ run.endive:wasi
@@ -50,7 +50,7 @@
${project.basedir}
- ${project.version}
+ ${project.version}
diff --git a/annotations/it/src/it/all-exports/pom.xml b/annotations/it/src/it/all-exports/pom.xml
index 40ef8f1e0..a76537041 100644
--- a/annotations/it/src/it/all-exports/pom.xml
+++ b/annotations/it/src/it/all-exports/pom.xml
@@ -2,9 +2,9 @@
4.0.0
- com.dylibso.chicory
+ run.endive
- all-exports-chicory-it
+ all-exports-endive-it0.0-SNAPSHOTjar
@@ -14,27 +14,21 @@
- com.dylibso.chicory
+ run.endiveannotations@project.version@
- com.dylibso.chicory
+ run.endiveruntime@project.version@
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@provided
-
- com.dylibso.chicory
- wasm-corpus
- @project.version@
- test
- org.junit.jupiter
@@ -48,6 +42,12 @@
@junit.version@test
+
+ run.endive
+ wasm-corpus
+ @project.version@
+ test
+
@@ -61,7 +61,7 @@
${maven.compiler.release}
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@
diff --git a/annotations/it/src/it/all-exports/src/test/java/chicory/test/AllExportsTest.java b/annotations/it/src/it/all-exports/src/test/java/endive/test/AllExportsTest.java
similarity index 90%
rename from annotations/it/src/it/all-exports/src/test/java/chicory/test/AllExportsTest.java
rename to annotations/it/src/it/all-exports/src/test/java/endive/test/AllExportsTest.java
index 1165f71af..e8f8e6bd6 100644
--- a/annotations/it/src/it/all-exports/src/test/java/chicory/test/AllExportsTest.java
+++ b/annotations/it/src/it/all-exports/src/test/java/endive/test/AllExportsTest.java
@@ -1,13 +1,13 @@
-package chicory.test;
+package endive.test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-import com.dylibso.chicory.annotations.WasmModuleInterface;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wasm.Parser;
-import com.dylibso.chicory.wasm.types.Value;
import org.junit.jupiter.api.Test;
+import run.endive.annotations.WasmModuleInterface;
+import run.endive.runtime.Instance;
+import run.endive.wasm.Parser;
+import run.endive.wasm.types.Value;
class AllExportsTest {
diff --git a/annotations/it/src/it/all-imports/pom.xml b/annotations/it/src/it/all-imports/pom.xml
index fdcfe072d..4c0113129 100644
--- a/annotations/it/src/it/all-imports/pom.xml
+++ b/annotations/it/src/it/all-imports/pom.xml
@@ -2,9 +2,9 @@
4.0.0
- com.dylibso.chicory
+ run.endive
- all-imports-chicory-it
+ all-imports-endive-it0.0-SNAPSHOTjar
@@ -14,27 +14,21 @@
- com.dylibso.chicory
+ run.endiveannotations@project.version@
- com.dylibso.chicory
+ run.endiveruntime@project.version@
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@provided
-
- com.dylibso.chicory
- wasm-corpus
- @project.version@
- test
- org.junit.jupiter
@@ -48,6 +42,12 @@
@junit.version@test
+
+ run.endive
+ wasm-corpus
+ @project.version@
+ test
+
@@ -61,7 +61,7 @@
${maven.compiler.release}
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@
diff --git a/annotations/it/src/it/all-imports/src/test/java/chicory/test/AllImportsTest.java b/annotations/it/src/it/all-imports/src/test/java/endive/test/AllImportsTest.java
similarity index 86%
rename from annotations/it/src/it/all-imports/src/test/java/chicory/test/AllImportsTest.java
rename to annotations/it/src/it/all-imports/src/test/java/endive/test/AllImportsTest.java
index 18767488e..e67876fdb 100644
--- a/annotations/it/src/it/all-imports/src/test/java/chicory/test/AllImportsTest.java
+++ b/annotations/it/src/it/all-imports/src/test/java/endive/test/AllImportsTest.java
@@ -1,24 +1,24 @@
-package chicory.test;
+package endive.test;
-import static com.dylibso.chicory.wasm.types.Value.REF_NULL_VALUE;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static run.endive.wasm.types.Value.REF_NULL_VALUE;
-import com.dylibso.chicory.annotations.WasmModuleInterface;
-import com.dylibso.chicory.runtime.ByteBufferMemory;
-import com.dylibso.chicory.runtime.GlobalInstance;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Memory;
-import com.dylibso.chicory.runtime.TableInstance;
-import com.dylibso.chicory.wasm.Parser;
-import com.dylibso.chicory.wasm.types.MemoryLimits;
-import com.dylibso.chicory.wasm.types.Table;
-import com.dylibso.chicory.wasm.types.TableLimits;
-import com.dylibso.chicory.wasm.types.Value;
-import com.dylibso.chicory.wasm.types.ValueType;
import org.junit.jupiter.api.Test;
+import run.endive.annotations.WasmModuleInterface;
+import run.endive.runtime.ByteBufferMemory;
+import run.endive.runtime.GlobalInstance;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Memory;
+import run.endive.runtime.TableInstance;
+import run.endive.wasm.Parser;
+import run.endive.wasm.types.MemoryLimits;
+import run.endive.wasm.types.Table;
+import run.endive.wasm.types.TableLimits;
+import run.endive.wasm.types.Value;
+import run.endive.wasm.types.ValueType;
class AllImportsTest {
diff --git a/annotations/it/src/it/colliding-exports/pom.xml b/annotations/it/src/it/colliding-exports/pom.xml
index e06f38cc5..46341cc56 100644
--- a/annotations/it/src/it/colliding-exports/pom.xml
+++ b/annotations/it/src/it/colliding-exports/pom.xml
@@ -2,9 +2,9 @@
4.0.0
- com.dylibso.chicory
+ run.endive
- colliding-imports-chicory-it
+ colliding-imports-endive-it0.0-SNAPSHOTjar
@@ -14,32 +14,26 @@
- com.dylibso.chicory
+ run.endiveannotations@project.version@
- com.dylibso.chicory
+ run.endiveruntime@project.version@
- com.dylibso.chicory
+ run.endivewasi@project.version@
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@provided
-
- com.dylibso.chicory
- wasm-corpus
- @project.version@
- test
- org.junit.jupiter
@@ -53,6 +47,12 @@
@junit.version@test
+
+ run.endive
+ wasm-corpus
+ @project.version@
+ test
+
@@ -66,7 +66,7 @@
${maven.compiler.release}
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@
diff --git a/annotations/it/src/it/colliding-exports/src/test/java/chicory/test/CollidingExportsTest.java b/annotations/it/src/it/colliding-exports/src/test/java/endive/test/CollidingExportsTest.java
similarity index 85%
rename from annotations/it/src/it/colliding-exports/src/test/java/chicory/test/CollidingExportsTest.java
rename to annotations/it/src/it/colliding-exports/src/test/java/endive/test/CollidingExportsTest.java
index b8c24dbbf..755c71811 100644
--- a/annotations/it/src/it/colliding-exports/src/test/java/chicory/test/CollidingExportsTest.java
+++ b/annotations/it/src/it/colliding-exports/src/test/java/endive/test/CollidingExportsTest.java
@@ -1,14 +1,14 @@
-package chicory.test;
+package endive.test;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import com.dylibso.chicory.annotations.WasmModuleInterface;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wasi.WasiOptions;
-import com.dylibso.chicory.wasi.WasiPreview1;
-import com.dylibso.chicory.wasm.Parser;
import java.io.ByteArrayOutputStream;
import org.junit.jupiter.api.Test;
+import run.endive.annotations.WasmModuleInterface;
+import run.endive.runtime.Instance;
+import run.endive.wasi.WasiOptions;
+import run.endive.wasi.WasiPreview1;
+import run.endive.wasm.Parser;
class CollidingExportsTest {
diff --git a/annotations/it/src/it/externref-base/pom.xml b/annotations/it/src/it/externref-base/pom.xml
index 3f982e462..2698bd9bf 100644
--- a/annotations/it/src/it/externref-base/pom.xml
+++ b/annotations/it/src/it/externref-base/pom.xml
@@ -2,9 +2,9 @@
4.0.0
- com.dylibso.chicory
+ run.endive
- externref-base-chicory-it
+ externref-base-endive-it0.0-SNAPSHOTjar
@@ -14,32 +14,26 @@
- com.dylibso.chicory
+ run.endiveannotations@project.version@
- com.dylibso.chicory
+ run.endiveruntime@project.version@
- com.dylibso.chicory
+ run.endivewasi@project.version@
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@provided
-
- com.dylibso.chicory
- wasm-corpus
- @project.version@
- test
- org.junit.jupiter
@@ -53,6 +47,12 @@
@junit.version@test
+
+ run.endive
+ wasm-corpus
+ @project.version@
+ test
+
@@ -66,7 +66,7 @@
${maven.compiler.release}
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@
diff --git a/annotations/it/src/it/externref-base/src/test/java/chicory/test/ExternRefExampleTest.java b/annotations/it/src/it/externref-base/src/test/java/endive/test/ExternRefExampleTest.java
similarity index 90%
rename from annotations/it/src/it/externref-base/src/test/java/chicory/test/ExternRefExampleTest.java
rename to annotations/it/src/it/externref-base/src/test/java/endive/test/ExternRefExampleTest.java
index 845913657..49b57d3c2 100644
--- a/annotations/it/src/it/externref-base/src/test/java/chicory/test/ExternRefExampleTest.java
+++ b/annotations/it/src/it/externref-base/src/test/java/endive/test/ExternRefExampleTest.java
@@ -1,11 +1,11 @@
-package chicory.test;
+package endive.test;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import com.dylibso.chicory.annotations.WasmModuleInterface;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wasm.Parser;
import org.junit.jupiter.api.Test;
+import run.endive.annotations.WasmModuleInterface;
+import run.endive.runtime.Instance;
+import run.endive.wasm.Parser;
class ExternRefExampleTest {
diff --git a/annotations/it/src/it/hello-wasi/pom.xml b/annotations/it/src/it/hello-wasi/pom.xml
index 8cff4ac4f..5735418d5 100644
--- a/annotations/it/src/it/hello-wasi/pom.xml
+++ b/annotations/it/src/it/hello-wasi/pom.xml
@@ -2,9 +2,9 @@
4.0.0
- com.dylibso.chicory
+ run.endive
- hello-wasi-chicory-it
+ hello-wasi-endive-it0.0-SNAPSHOTjar
@@ -14,32 +14,26 @@
- com.dylibso.chicory
+ run.endiveannotations@project.version@
- com.dylibso.chicory
+ run.endiveruntime@project.version@
- com.dylibso.chicory
+ run.endivewasi@project.version@
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@provided
-
- com.dylibso.chicory
- wasm-corpus
- @project.version@
- test
- org.junit.jupiter
@@ -53,6 +47,12 @@
@junit.version@test
+
+ run.endive
+ wasm-corpus
+ @project.version@
+ test
+
@@ -66,7 +66,7 @@
${maven.compiler.release}
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@
diff --git a/annotations/it/src/it/hello-wasi/src/test/java/chicory/test/HelloWasiTest.java b/annotations/it/src/it/hello-wasi/src/test/java/endive/test/HelloWasiTest.java
similarity index 88%
rename from annotations/it/src/it/hello-wasi/src/test/java/chicory/test/HelloWasiTest.java
rename to annotations/it/src/it/hello-wasi/src/test/java/endive/test/HelloWasiTest.java
index 1133546a3..208f5c80f 100644
--- a/annotations/it/src/it/hello-wasi/src/test/java/chicory/test/HelloWasiTest.java
+++ b/annotations/it/src/it/hello-wasi/src/test/java/endive/test/HelloWasiTest.java
@@ -1,15 +1,15 @@
-package chicory.test;
+package endive.test;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import com.dylibso.chicory.annotations.WasmModuleInterface;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wasi.WasiOptions;
-import com.dylibso.chicory.wasi.WasiPreview1;
-import com.dylibso.chicory.wasm.Parser;
import java.io.ByteArrayOutputStream;
import org.junit.jupiter.api.Test;
+import run.endive.annotations.WasmModuleInterface;
+import run.endive.runtime.Instance;
+import run.endive.wasi.WasiOptions;
+import run.endive.wasi.WasiPreview1;
+import run.endive.wasm.Parser;
class HelloWasiTest {
diff --git a/annotations/it/src/it/import-exports/pom.xml b/annotations/it/src/it/import-exports/pom.xml
index 464831e6e..82303d28d 100644
--- a/annotations/it/src/it/import-exports/pom.xml
+++ b/annotations/it/src/it/import-exports/pom.xml
@@ -2,9 +2,9 @@
4.0.0
- com.dylibso.chicory
+ run.endive
- import-exports-chicory-it
+ import-exports-endive-it0.0-SNAPSHOTjar
@@ -14,27 +14,21 @@
- com.dylibso.chicory
+ run.endiveannotations@project.version@
- com.dylibso.chicory
+ run.endiveruntime@project.version@
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@provided
-
- com.dylibso.chicory
- wasm-corpus
- @project.version@
- test
- org.junit.jupiter
@@ -48,6 +42,12 @@
@junit.version@test
+
+ run.endive
+ wasm-corpus
+ @project.version@
+ test
+
@@ -61,7 +61,7 @@
${maven.compiler.release}
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@
diff --git a/annotations/it/src/it/import-exports/src/test/java/chicory/test/ImportExportsTest.java b/annotations/it/src/it/import-exports/src/test/java/endive/test/ImportExportsTest.java
similarity index 90%
rename from annotations/it/src/it/import-exports/src/test/java/chicory/test/ImportExportsTest.java
rename to annotations/it/src/it/import-exports/src/test/java/endive/test/ImportExportsTest.java
index a5cc22c08..acfb9e12a 100644
--- a/annotations/it/src/it/import-exports/src/test/java/chicory/test/ImportExportsTest.java
+++ b/annotations/it/src/it/import-exports/src/test/java/endive/test/ImportExportsTest.java
@@ -1,12 +1,12 @@
-package chicory.test;
+package endive.test;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import com.dylibso.chicory.annotations.WasmModuleInterface;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wasm.Parser;
import java.util.concurrent.atomic.AtomicInteger;
import org.junit.jupiter.api.Test;
+import run.endive.annotations.WasmModuleInterface;
+import run.endive.runtime.Instance;
+import run.endive.wasm.Parser;
class ImportExportsTest {
public final AtomicInteger count = new AtomicInteger();
diff --git a/annotations/it/src/it/mixed-imports/pom.xml b/annotations/it/src/it/mixed-imports/pom.xml
index a5205e6fb..7831026ae 100644
--- a/annotations/it/src/it/mixed-imports/pom.xml
+++ b/annotations/it/src/it/mixed-imports/pom.xml
@@ -2,9 +2,9 @@
4.0.0
- com.dylibso.chicory
+ run.endive
- mixed-imports-chicory-it
+ mixed-imports-endive-it0.0-SNAPSHOTjar
@@ -14,27 +14,21 @@
- com.dylibso.chicory
+ run.endiveannotations@project.version@
- com.dylibso.chicory
+ run.endiveruntime@project.version@
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@provided
-
- com.dylibso.chicory
- wasm-corpus
- @project.version@
- test
- org.junit.jupiter
@@ -48,6 +42,12 @@
@junit.version@test
+
+ run.endive
+ wasm-corpus
+ @project.version@
+ test
+
@@ -61,7 +61,7 @@
${maven.compiler.release}
- com.dylibso.chicory
+ run.endiveannotations-processor@project.version@
diff --git a/annotations/it/src/it/mixed-imports/src/test/java/chicory/test/MixedImportsTest.java b/annotations/it/src/it/mixed-imports/src/test/java/endive/test/MixedImportsTest.java
similarity index 84%
rename from annotations/it/src/it/mixed-imports/src/test/java/chicory/test/MixedImportsTest.java
rename to annotations/it/src/it/mixed-imports/src/test/java/endive/test/MixedImportsTest.java
index a84788a25..8331bafa2 100644
--- a/annotations/it/src/it/mixed-imports/src/test/java/chicory/test/MixedImportsTest.java
+++ b/annotations/it/src/it/mixed-imports/src/test/java/endive/test/MixedImportsTest.java
@@ -1,15 +1,15 @@
-package chicory.test;
+package endive.test;
import static org.junit.jupiter.api.Assertions.assertEquals;
-import com.dylibso.chicory.annotations.WasmModuleInterface;
-import com.dylibso.chicory.runtime.ByteBufferMemory;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Memory;
-import com.dylibso.chicory.wasm.Parser;
-import com.dylibso.chicory.wasm.types.MemoryLimits;
import java.util.concurrent.atomic.AtomicReference;
import org.junit.jupiter.api.Test;
+import run.endive.annotations.WasmModuleInterface;
+import run.endive.runtime.ByteBufferMemory;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Memory;
+import run.endive.wasm.Parser;
+import run.endive.wasm.types.MemoryLimits;
class MixedImportsTest {
diff --git a/annotations/it/src/it/plugin-only-exports/pom.xml b/annotations/it/src/it/plugin-only-exports/pom.xml
index 1ff062c64..02eb2b3bb 100644
--- a/annotations/it/src/it/plugin-only-exports/pom.xml
+++ b/annotations/it/src/it/plugin-only-exports/pom.xml
@@ -2,9 +2,9 @@
4.0.0
- com.dylibso.chicory
+ run.endive
- plugin-only-exports-chicory-it
+ plugin-only-exports-endive-it0.0-SNAPSHOTjar
@@ -14,16 +14,10 @@
- com.dylibso.chicory
+ run.endiveruntime@project.version@
-
- com.dylibso.chicory
- wasm-corpus
- @project.version@
- test
- org.junit.jupiter
@@ -37,28 +31,16 @@
@junit.version@test
+
+ run.endive
+ wasm-corpus
+ @project.version@
+ test
+
-
- com.dylibso.chicory
- chicory-compiler-maven-plugin
- @project.version@
-
-
- compile-all-exports
-
- compile
-
-
- chicory.test.AllExportsModule
- src/test/resources/all-exports.wat.wasm
- chicory.test.AllExportsWrapper
-
-
-
- org.apache.maven.pluginsmaven-compiler-plugin
@@ -91,6 +73,24 @@
+
+ run.endive
+ endive-compiler-maven-plugin
+ @project.version@
+
+
+ compile-all-exports
+
+ compile
+
+
+ endive.test.AllExportsModule
+ src/test/resources/all-exports.wat.wasm
+ endive.test.AllExportsWrapper
+
+
+
+
diff --git a/annotations/it/src/it/plugin-only-exports/src/test/java/chicory/test/PluginOnlyExportsTest.java b/annotations/it/src/it/plugin-only-exports/src/test/java/endive/test/PluginOnlyExportsTest.java
similarity index 93%
rename from annotations/it/src/it/plugin-only-exports/src/test/java/chicory/test/PluginOnlyExportsTest.java
rename to annotations/it/src/it/plugin-only-exports/src/test/java/endive/test/PluginOnlyExportsTest.java
index 1dfc6f830..6035392d0 100644
--- a/annotations/it/src/it/plugin-only-exports/src/test/java/chicory/test/PluginOnlyExportsTest.java
+++ b/annotations/it/src/it/plugin-only-exports/src/test/java/endive/test/PluginOnlyExportsTest.java
@@ -1,11 +1,11 @@
-package chicory.test;
+package endive.test;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wasm.types.Value;
import org.junit.jupiter.api.Test;
+import run.endive.runtime.Instance;
+import run.endive.wasm.types.Value;
class PluginOnlyExportsTest {
diff --git a/annotations/processor/pom.xml b/annotations/processor/pom.xml
index 39d85ac32..0966cba80 100644
--- a/annotations/processor/pom.xml
+++ b/annotations/processor/pom.xml
@@ -3,38 +3,33 @@
4.0.0
- com.dylibso.chicory
- chicory
+ run.endive
+ endive999-SNAPSHOT../../pom.xmlannotations-processorjar
- Chicory - Annotations Processor
+ Endive - Annotations ProcessorAnnotation processors for easy interoperability with Wasm modules
- com.dylibso.chicory
+ com.github.javaparser
+ javaparser-core
+
+
+ run.endiveannotations
- com.dylibso.chicory
+ run.endivecodegen
- com.dylibso.chicory
+ run.endivewasm
-
- com.github.javaparser
- javaparser-core
-
-
- com.dylibso.chicory
- runtime
- test
- com.google.testing.compilecompile-testing
@@ -50,6 +45,11 @@
junit-jupiter-enginetest
+
+ run.endive
+ runtime
+ test
+
@@ -66,8 +66,8 @@
maven-dependency-plugin
- com.dylibso.chicory:runtime
- com.dylibso.chicory:wasm
+ run.endive:runtime
+ run.endive:wasm
diff --git a/annotations/processor/src/main/java/com/dylibso/chicory/annotations/processor/AbstractModuleProcessor.java b/annotations/processor/src/main/java/run/endive/annotations/processor/AbstractModuleProcessor.java
similarity index 94%
rename from annotations/processor/src/main/java/com/dylibso/chicory/annotations/processor/AbstractModuleProcessor.java
rename to annotations/processor/src/main/java/run/endive/annotations/processor/AbstractModuleProcessor.java
index 4149d6e9d..d6e427cf3 100644
--- a/annotations/processor/src/main/java/com/dylibso/chicory/annotations/processor/AbstractModuleProcessor.java
+++ b/annotations/processor/src/main/java/run/endive/annotations/processor/AbstractModuleProcessor.java
@@ -1,6 +1,5 @@
-package com.dylibso.chicory.annotations.processor;
+package run.endive.annotations.processor;
-import com.dylibso.chicory.codegen.CodegenUtils;
import com.github.javaparser.printer.DefaultPrettyPrinter;
import javax.annotation.processing.AbstractProcessor;
import javax.annotation.processing.Filer;
@@ -10,6 +9,7 @@
import javax.lang.model.element.PackageElement;
import javax.lang.model.util.Elements;
import javax.tools.Diagnostic;
+import run.endive.codegen.CodegenUtils;
public abstract class AbstractModuleProcessor extends AbstractProcessor {
diff --git a/annotations/processor/src/main/java/com/dylibso/chicory/annotations/processor/HostModuleProcessor.java b/annotations/processor/src/main/java/run/endive/annotations/processor/HostModuleProcessor.java
similarity index 95%
rename from annotations/processor/src/main/java/com/dylibso/chicory/annotations/processor/HostModuleProcessor.java
rename to annotations/processor/src/main/java/run/endive/annotations/processor/HostModuleProcessor.java
index 61b18cf17..8400db446 100644
--- a/annotations/processor/src/main/java/com/dylibso/chicory/annotations/processor/HostModuleProcessor.java
+++ b/annotations/processor/src/main/java/run/endive/annotations/processor/HostModuleProcessor.java
@@ -1,14 +1,10 @@
-package com.dylibso.chicory.annotations.processor;
+package run.endive.annotations.processor;
import static com.github.javaparser.StaticJavaParser.parseType;
import static java.lang.String.format;
import static javax.tools.Diagnostic.Kind.ERROR;
import static javax.tools.Diagnostic.Kind.NOTE;
-import com.dylibso.chicory.annotations.Buffer;
-import com.dylibso.chicory.annotations.CString;
-import com.dylibso.chicory.annotations.HostModule;
-import com.dylibso.chicory.annotations.WasmExport;
import com.github.javaparser.ast.ArrayCreationLevel;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.NodeList;
@@ -43,6 +39,10 @@
import javax.lang.model.element.TypeElement;
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.TypeMirror;
+import run.endive.annotations.Buffer;
+import run.endive.annotations.CString;
+import run.endive.annotations.HostModule;
+import run.endive.annotations.WasmExport;
public final class HostModuleProcessor extends AbstractModuleProcessor {
@@ -81,11 +81,11 @@ private void processModule(TypeElement type) {
cu.setPackageDeclaration(packageName);
cu.addImport(type.getQualifiedName().toString());
}
- cu.addImport("com.dylibso.chicory.runtime.HostFunction");
- cu.addImport("com.dylibso.chicory.runtime.Instance");
- cu.addImport("com.dylibso.chicory.wasm.types.Value");
- cu.addImport("com.dylibso.chicory.wasm.types.FunctionType");
- cu.addImport("com.dylibso.chicory.wasm.types.ValType");
+ cu.addImport("run.endive.runtime.HostFunction");
+ cu.addImport("run.endive.runtime.Instance");
+ cu.addImport("run.endive.wasm.types.Value");
+ cu.addImport("run.endive.wasm.types.FunctionType");
+ cu.addImport("run.endive.wasm.types.ValType");
cu.addImport("java.util.List");
var typeName = type.getSimpleName().toString();
@@ -193,10 +193,10 @@ private Expression processMethod(Element member, ExecutableElement executable) {
throw new AbortProcessingException();
}
break;
- case "com.dylibso.chicory.runtime.Instance":
+ case "run.endive.runtime.Instance":
arguments.add(new NameExpr("instance"));
break;
- case "com.dylibso.chicory.runtime.Memory":
+ case "run.endive.runtime.Memory":
arguments.add(new MethodCallExpr(new NameExpr("instance"), "memory"));
break;
default:
diff --git a/annotations/processor/src/main/java/com/dylibso/chicory/annotations/processor/WasmModuleProcessor.java b/annotations/processor/src/main/java/run/endive/annotations/processor/WasmModuleProcessor.java
similarity index 92%
rename from annotations/processor/src/main/java/com/dylibso/chicory/annotations/processor/WasmModuleProcessor.java
rename to annotations/processor/src/main/java/run/endive/annotations/processor/WasmModuleProcessor.java
index 6dcbe971c..b3cd46cd9 100644
--- a/annotations/processor/src/main/java/com/dylibso/chicory/annotations/processor/WasmModuleProcessor.java
+++ b/annotations/processor/src/main/java/run/endive/annotations/processor/WasmModuleProcessor.java
@@ -1,13 +1,9 @@
-package com.dylibso.chicory.annotations.processor;
+package run.endive.annotations.processor;
import static java.lang.String.format;
import static javax.tools.Diagnostic.Kind.ERROR;
import static javax.tools.Diagnostic.Kind.NOTE;
-import com.dylibso.chicory.annotations.WasmModuleInterface;
-import com.dylibso.chicory.codegen.ModuleInterfaceCodegen;
-import com.dylibso.chicory.wasm.Parser;
-import com.dylibso.chicory.wasm.WasmModule;
import com.github.javaparser.ast.CompilationUnit;
import java.io.IOException;
import java.io.Writer;
@@ -20,6 +16,10 @@
import javax.lang.model.element.TypeElement;
import javax.tools.FileObject;
import javax.tools.StandardLocation;
+import run.endive.annotations.WasmModuleInterface;
+import run.endive.codegen.ModuleInterfaceCodegen;
+import run.endive.wasm.Parser;
+import run.endive.wasm.WasmModule;
public final class WasmModuleProcessor extends AbstractModuleProcessor {
diff --git a/annotations/processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor b/annotations/processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor
index 65c82face..f19a2fd34 100644
--- a/annotations/processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor
+++ b/annotations/processor/src/main/resources/META-INF/services/javax.annotation.processing.Processor
@@ -1,2 +1,2 @@
-com.dylibso.chicory.annotations.processor.HostModuleProcessor
-com.dylibso.chicory.annotations.processor.WasmModuleProcessor
+run.endive.annotations.processor.HostModuleProcessor
+run.endive.annotations.processor.WasmModuleProcessor
diff --git a/annotations/processor/src/test/java/com/dylibso/chicory/annotations/processor/HostModuleProcessorTest.java b/annotations/processor/src/test/java/run/endive/annotations/processor/HostModuleProcessorTest.java
similarity index 91%
rename from annotations/processor/src/test/java/com/dylibso/chicory/annotations/processor/HostModuleProcessorTest.java
rename to annotations/processor/src/test/java/run/endive/annotations/processor/HostModuleProcessorTest.java
index cd92f9a60..63bef61e3 100644
--- a/annotations/processor/src/test/java/com/dylibso/chicory/annotations/processor/HostModuleProcessorTest.java
+++ b/annotations/processor/src/test/java/run/endive/annotations/processor/HostModuleProcessorTest.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.annotations.processor;
+package run.endive.annotations.processor;
import static com.google.testing.compile.CompilationSubject.assertThat;
import static com.google.testing.compile.Compiler.javac;
@@ -22,15 +22,15 @@ void generateModules() {
assertThat(compilation).succeededWithoutWarnings();
assertThat(compilation)
- .generatedSourceFile("chicory.testing.BasicMath_ModuleFactory")
+ .generatedSourceFile("endive.testing.BasicMath_ModuleFactory")
.hasSourceEquivalentTo(JavaFileObjects.forResource("BasicMathGenerated.java"));
assertThat(compilation)
- .generatedSourceFile("chicory.testing.Simple_ModuleFactory")
+ .generatedSourceFile("endive.testing.Simple_ModuleFactory")
.hasSourceEquivalentTo(JavaFileObjects.forResource("SimpleGenerated.java"));
assertThat(compilation)
- .generatedSourceFile("chicory.testing.Nested_ModuleFactory")
+ .generatedSourceFile("endive.testing.Nested_ModuleFactory")
.hasSourceEquivalentTo(JavaFileObjects.forResource("NestedGenerated.java"));
assertThat(compilation)
diff --git a/annotations/processor/src/test/resources/BasicMath.java b/annotations/processor/src/test/resources/BasicMath.java
index 64b294bcc..cfd1196b8 100644
--- a/annotations/processor/src/test/resources/BasicMath.java
+++ b/annotations/processor/src/test/resources/BasicMath.java
@@ -1,8 +1,8 @@
-package chicory.testing;
+package endive.testing;
-import com.dylibso.chicory.annotations.HostModule;
-import com.dylibso.chicory.annotations.WasmExport;
-import com.dylibso.chicory.runtime.HostFunction;
+import run.endive.annotations.HostModule;
+import run.endive.annotations.WasmExport;
+import run.endive.runtime.HostFunction;
@HostModule("math")
public final class BasicMath {
diff --git a/annotations/processor/src/test/resources/BasicMathGenerated.java b/annotations/processor/src/test/resources/BasicMathGenerated.java
index 35ba6eb97..8bb955770 100644
--- a/annotations/processor/src/test/resources/BasicMathGenerated.java
+++ b/annotations/processor/src/test/resources/BasicMathGenerated.java
@@ -1,15 +1,15 @@
-package chicory.testing;
+package endive.testing;
-import com.dylibso.chicory.runtime.HostFunction;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wasm.types.Value;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.ValType;
+import run.endive.runtime.HostFunction;
+import run.endive.runtime.Instance;
+import run.endive.wasm.types.Value;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.ValType;
import java.util.List;
import javax.annotation.processing.Generated;
-@Generated("com.dylibso.chicory.annotations.processor.HostModuleProcessor")
+@Generated("run.endive.annotations.processor.HostModuleProcessor")
public final class BasicMath_ModuleFactory {
private BasicMath_ModuleFactory() {
diff --git a/annotations/processor/src/test/resources/Box.java b/annotations/processor/src/test/resources/Box.java
index defdc0ae4..63d75e495 100644
--- a/annotations/processor/src/test/resources/Box.java
+++ b/annotations/processor/src/test/resources/Box.java
@@ -1,10 +1,10 @@
-package chicory.testing;
+package endive.testing;
-import com.dylibso.chicory.annotations.HostModule;
-import com.dylibso.chicory.annotations.WasmExport;
-import com.dylibso.chicory.runtime.HostFunction;
-import com.dylibso.chicory.runtime.Memory;
-import com.dylibso.chicory.wasm.ChicoryException;
+import run.endive.annotations.HostModule;
+import run.endive.annotations.WasmExport;
+import run.endive.runtime.HostFunction;
+import run.endive.runtime.Memory;
+import run.endive.wasm.WasmEngineException;
public class Box {
@@ -18,7 +18,7 @@ public void print(Memory memory, int ptr, int len) {
@WasmExport
public void exit() {
- throw new ChicoryException("exit");
+ throw new WasmEngineException("exit");
}
public HostFunction[] toHostFunctions() {
diff --git a/annotations/processor/src/test/resources/InvalidParameterString.java b/annotations/processor/src/test/resources/InvalidParameterString.java
index aac34d35d..13fd61bf2 100644
--- a/annotations/processor/src/test/resources/InvalidParameterString.java
+++ b/annotations/processor/src/test/resources/InvalidParameterString.java
@@ -1,7 +1,7 @@
-package chicory.testing;
+package endive.testing;
-import com.dylibso.chicory.annotations.HostModule;
-import com.dylibso.chicory.annotations.WasmExport;
+import run.endive.annotations.HostModule;
+import run.endive.annotations.WasmExport;
@HostModule("bad_param")
public final class InvalidParameterString {
diff --git a/annotations/processor/src/test/resources/InvalidParameterUnsupported.java b/annotations/processor/src/test/resources/InvalidParameterUnsupported.java
index c1697fbab..877e37068 100644
--- a/annotations/processor/src/test/resources/InvalidParameterUnsupported.java
+++ b/annotations/processor/src/test/resources/InvalidParameterUnsupported.java
@@ -1,7 +1,7 @@
-package chicory.testing;
+package endive.testing;
-import com.dylibso.chicory.annotations.HostModule;
-import com.dylibso.chicory.annotations.WasmExport;
+import run.endive.annotations.HostModule;
+import run.endive.annotations.WasmExport;
import java.math.BigDecimal;
@HostModule("bad_param")
diff --git a/annotations/processor/src/test/resources/InvalidReturn.java b/annotations/processor/src/test/resources/InvalidReturn.java
index fa0d42f4e..21a6660e1 100644
--- a/annotations/processor/src/test/resources/InvalidReturn.java
+++ b/annotations/processor/src/test/resources/InvalidReturn.java
@@ -1,7 +1,7 @@
-package chicory.testing;
+package endive.testing;
-import com.dylibso.chicory.annotations.HostModule;
-import com.dylibso.chicory.annotations.WasmExport;
+import run.endive.annotations.HostModule;
+import run.endive.annotations.WasmExport;
@HostModule("bad_return")
public final class InvalidReturn {
diff --git a/annotations/processor/src/test/resources/NestedGenerated.java b/annotations/processor/src/test/resources/NestedGenerated.java
index 539dbe579..1e07ef69d 100644
--- a/annotations/processor/src/test/resources/NestedGenerated.java
+++ b/annotations/processor/src/test/resources/NestedGenerated.java
@@ -1,16 +1,16 @@
-package chicory.testing;
+package endive.testing;
-import chicory.testing.Box.Nested;
-import com.dylibso.chicory.runtime.HostFunction;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wasm.types.Value;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.ValType;
+import endive.testing.Box.Nested;
+import run.endive.runtime.HostFunction;
+import run.endive.runtime.Instance;
+import run.endive.wasm.types.Value;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.ValType;
import java.util.List;
import javax.annotation.processing.Generated;
-@Generated("com.dylibso.chicory.annotations.processor.HostModuleProcessor")
+@Generated("run.endive.annotations.processor.HostModuleProcessor")
public final class Nested_ModuleFactory {
private Nested_ModuleFactory() {
diff --git a/annotations/processor/src/test/resources/NoPackage.java b/annotations/processor/src/test/resources/NoPackage.java
index 4f09c14dc..d068a522a 100644
--- a/annotations/processor/src/test/resources/NoPackage.java
+++ b/annotations/processor/src/test/resources/NoPackage.java
@@ -1,8 +1,8 @@
-import com.dylibso.chicory.annotations.HostModule;
-import com.dylibso.chicory.annotations.WasmExport;
-import com.dylibso.chicory.runtime.Memory;
-import com.dylibso.chicory.runtime.HostFunction;
-import com.dylibso.chicory.wasm.ChicoryException;
+import run.endive.annotations.HostModule;
+import run.endive.annotations.WasmExport;
+import run.endive.runtime.Memory;
+import run.endive.runtime.HostFunction;
+import run.endive.wasm.WasmEngineException;
@HostModule("nopackage")
public final class NoPackage {
@@ -14,7 +14,7 @@ public void print(Memory memory, int ptr, int len) {
@WasmExport
public void exit() {
- throw new ChicoryException("exit");
+ throw new WasmEngineException("exit");
}
public HostFunction[] toHostFunctions() {
diff --git a/annotations/processor/src/test/resources/NoPackageGenerated.java b/annotations/processor/src/test/resources/NoPackageGenerated.java
index 1c84c7246..1462685ae 100644
--- a/annotations/processor/src/test/resources/NoPackageGenerated.java
+++ b/annotations/processor/src/test/resources/NoPackageGenerated.java
@@ -1,13 +1,13 @@
-import com.dylibso.chicory.runtime.HostFunction;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wasm.types.Value;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.ValType;
+import run.endive.runtime.HostFunction;
+import run.endive.runtime.Instance;
+import run.endive.wasm.types.Value;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.ValType;
import java.util.List;
import javax.annotation.processing.Generated;
-@Generated("com.dylibso.chicory.annotations.processor.HostModuleProcessor")
+@Generated("run.endive.annotations.processor.HostModuleProcessor")
public final class NoPackage_ModuleFactory {
private NoPackage_ModuleFactory() {
diff --git a/annotations/processor/src/test/resources/Simple.java b/annotations/processor/src/test/resources/Simple.java
index fe25fd675..c968746ac 100644
--- a/annotations/processor/src/test/resources/Simple.java
+++ b/annotations/processor/src/test/resources/Simple.java
@@ -1,14 +1,14 @@
-package chicory.testing;
+package endive.testing;
import static java.util.Objects.requireNonNull;
-import com.dylibso.chicory.annotations.Buffer;
-import com.dylibso.chicory.annotations.CString;
-import com.dylibso.chicory.annotations.HostModule;
-import com.dylibso.chicory.annotations.WasmExport;
-import com.dylibso.chicory.runtime.Memory;
-import com.dylibso.chicory.runtime.HostFunction;
-import com.dylibso.chicory.wasm.ChicoryException;
+import run.endive.annotations.Buffer;
+import run.endive.annotations.CString;
+import run.endive.annotations.HostModule;
+import run.endive.annotations.WasmExport;
+import run.endive.runtime.Memory;
+import run.endive.runtime.HostFunction;
+import run.endive.wasm.WasmEngineException;
import java.util.Random;
@HostModule("simple")
@@ -39,7 +39,7 @@ public void randomGet(Memory memory, int ptr, int len) {
@WasmExport
public void exit() {
- throw new ChicoryException("exit");
+ throw new WasmEngineException("exit");
}
public HostFunction[] toHostFunctions() {
diff --git a/annotations/processor/src/test/resources/SimpleGenerated.java b/annotations/processor/src/test/resources/SimpleGenerated.java
index 8f2707cca..055839733 100644
--- a/annotations/processor/src/test/resources/SimpleGenerated.java
+++ b/annotations/processor/src/test/resources/SimpleGenerated.java
@@ -1,15 +1,15 @@
-package chicory.testing;
+package endive.testing;
-import com.dylibso.chicory.runtime.HostFunction;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wasm.types.Value;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.ValType;
+import run.endive.runtime.HostFunction;
+import run.endive.runtime.Instance;
+import run.endive.wasm.types.Value;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.ValType;
import java.util.List;
import javax.annotation.processing.Generated;
-@Generated("com.dylibso.chicory.annotations.processor.HostModuleProcessor")
+@Generated("run.endive.annotations.processor.HostModuleProcessor")
public final class Simple_ModuleFactory {
private Simple_ModuleFactory() {
diff --git a/bom/pom.xml b/bom/pom.xml
index 2e54a0461..0eeac4dae 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -3,94 +3,94 @@
4.0.0
- com.dylibso.chicory
- chicory
+ run.endive
+ endive999-SNAPSHOTbompom
- Chicory - BOM
+ Endive - BOMBill of Materials (BOM)
- com.dylibso.chicory
+ run.endiveannotations${project.version}
- com.dylibso.chicory
+ run.endiveannotations-processor${project.version}
- com.dylibso.chicory
+ run.endivebuild-time-compiler${project.version}
- com.dylibso.chicory
+ run.endivebuild-time-compiler-cli-experimental${project.version}
- com.dylibso.chicory
- chicory-compiler-maven-plugin
- ${project.version}
-
-
- com.dylibso.chicory
+ run.endivecli-experimental${project.version}
- com.dylibso.chicory
+ run.endivecodegen${project.version}
- com.dylibso.chicory
+ run.endivecompiler${project.version}
- com.dylibso.chicory
+ run.endivedircache-experimental${project.version}
- com.dylibso.chicory
+ run.endive
+ endive-compiler-maven-plugin
+ ${project.version}
+
+
+ run.endivelog${project.version}
- com.dylibso.chicory
+ run.endiveruntime${project.version}
- com.dylibso.chicory
+ run.endivesimd${project.version}
- com.dylibso.chicory
+ run.endivewabt${project.version}
- com.dylibso.chicory
+ run.endivewasi${project.version}
- com.dylibso.chicory
+ run.endivewasm${project.version}
- com.dylibso.chicory
+ run.endivewasm-tools${project.version}
diff --git a/build-time-compiler-cli/pom.xml b/build-time-compiler-cli/pom.xml
index 96af13f04..4c4fb01b3 100644
--- a/build-time-compiler-cli/pom.xml
+++ b/build-time-compiler-cli/pom.xml
@@ -3,33 +3,33 @@
4.0.0
- com.dylibso.chicory
- chicory
+ run.endive
+ endive999-SNAPSHOTbuild-time-compiler-cli-experimentaljar
- Chicory - Build Time Compiler Cli
- Chicory Build Time Compiler CLI
+ Endive - Build Time Compiler Cli
+ Endive Build Time Compiler CLI
- com.dylibso.chicory
+ info.picocli
+ picocli
+
+
+ run.endivebuild-time-compiler
- com.dylibso.chicory
+ run.endivecompiler
- com.dylibso.chicory
+ run.endivewasm
-
- info.picocli
- picocli
-
@@ -79,7 +79,7 @@
- com.dylibso.chicory.experimental.compiler.cli.Cli
+ run.endive.experimental.compiler.cli.Clifalse
@@ -105,7 +105,7 @@
2.1.1-Xmx1G
- chicory-compiler
+ endive-compilertrue
diff --git a/build-time-compiler-cli/src/main/java/com/dylibso/chicory/experimental/compiler/cli/Cli.java b/build-time-compiler-cli/src/main/java/run/endive/experimental/compiler/cli/Cli.java
similarity index 87%
rename from build-time-compiler-cli/src/main/java/com/dylibso/chicory/experimental/compiler/cli/Cli.java
rename to build-time-compiler-cli/src/main/java/run/endive/experimental/compiler/cli/Cli.java
index 8b6b6b00d..9e4245caa 100644
--- a/build-time-compiler-cli/src/main/java/com/dylibso/chicory/experimental/compiler/cli/Cli.java
+++ b/build-time-compiler-cli/src/main/java/run/endive/experimental/compiler/cli/Cli.java
@@ -1,20 +1,20 @@
-package com.dylibso.chicory.experimental.compiler.cli;
+package run.endive.experimental.compiler.cli;
-import com.dylibso.chicory.build.time.compiler.Config;
-import com.dylibso.chicory.build.time.compiler.Generator;
-import com.dylibso.chicory.compiler.InterpreterFallback;
-import com.dylibso.chicory.wasm.Version;
import java.io.IOException;
import java.nio.file.Path;
import java.util.Set;
import picocli.CommandLine;
+import run.endive.build.time.compiler.Config;
+import run.endive.build.time.compiler.Generator;
+import run.endive.compiler.InterpreterFallback;
+import run.endive.wasm.Version;
@CommandLine.Command(
- name = "chicory-compiler",
+ name = "endive-compiler",
versionProvider = Cli.VersionProvider.class,
mixinStandardHelpOptions = true,
helpCommand = true,
- header = "A CLI to generate resources using the Chicory build-time compiler")
+ header = "A CLI to generate resources using the Endive build-time compiler")
public class Cli implements Runnable {
static final class VersionProvider implements CommandLine.IVersionProvider {
@Override
@@ -30,7 +30,7 @@ public String[] getVersion() {
order = 1,
names = "--prefix",
description = "The prefix to be used to generate resources",
- defaultValue = "com.dylibso.chicory.Wasm")
+ defaultValue = "run.endive.Wasm")
String prefix;
@CommandLine.Option(
diff --git a/build-time-compiler/pom.xml b/build-time-compiler/pom.xml
index cdb10da1e..89bf66cef 100644
--- a/build-time-compiler/pom.xml
+++ b/build-time-compiler/pom.xml
@@ -3,38 +3,38 @@
4.0.0
- com.dylibso.chicory
- chicory
+ run.endive
+ endive999-SNAPSHOT../pom.xmlbuild-time-compilerjar
- Chicory - Build Time Compiler
- Chicory Build Time Compiler
+ Endive - Build Time Compiler
+ Endive Build Time Compiler
- com.dylibso.chicory
+ com.github.javaparser
+ javaparser-core
+
+
+ run.endivecodegen
- com.dylibso.chicory
+ run.endivecompiler
- com.dylibso.chicory
+ run.endiveruntime
- com.dylibso.chicory
+ run.endivewasm
-
- com.github.javaparser
- javaparser-core
-
diff --git a/build-time-compiler/src/main/java/module-info.java b/build-time-compiler/src/main/java/module-info.java
index fb1e96328..aeae8a7ee 100644
--- a/build-time-compiler/src/main/java/module-info.java
+++ b/build-time-compiler/src/main/java/module-info.java
@@ -1,9 +1,9 @@
-module com.dylibso.chicory.build.time.compiler {
- requires transitive com.dylibso.chicory.compiler;
- requires com.dylibso.chicory.codegen;
- requires com.dylibso.chicory.runtime;
- requires com.dylibso.chicory.wasm;
+module run.endive.build.time.compiler {
+ requires transitive run.endive.compiler;
+ requires run.endive.codegen;
+ requires run.endive.runtime;
+ requires run.endive.wasm;
requires com.github.javaparser.core;
- exports com.dylibso.chicory.build.time.compiler;
+ exports run.endive.build.time.compiler;
}
diff --git a/build-time-compiler/src/main/java/com/dylibso/chicory/build/time/compiler/Config.java b/build-time-compiler/src/main/java/run/endive/build/time/compiler/Config.java
similarity index 97%
rename from build-time-compiler/src/main/java/com/dylibso/chicory/build/time/compiler/Config.java
rename to build-time-compiler/src/main/java/run/endive/build/time/compiler/Config.java
index 661ca846e..1aba2b9b9 100644
--- a/build-time-compiler/src/main/java/com/dylibso/chicory/build/time/compiler/Config.java
+++ b/build-time-compiler/src/main/java/run/endive/build/time/compiler/Config.java
@@ -1,9 +1,9 @@
-package com.dylibso.chicory.build.time.compiler;
+package run.endive.build.time.compiler;
-import com.dylibso.chicory.compiler.InterpreterFallback;
import java.nio.file.Path;
import java.util.Set;
import java.util.StringJoiner;
+import run.endive.compiler.InterpreterFallback;
public final class Config {
/**
diff --git a/build-time-compiler/src/main/java/com/dylibso/chicory/build/time/compiler/Generator.java b/build-time-compiler/src/main/java/run/endive/build/time/compiler/Generator.java
similarity index 94%
rename from build-time-compiler/src/main/java/com/dylibso/chicory/build/time/compiler/Generator.java
rename to build-time-compiler/src/main/java/run/endive/build/time/compiler/Generator.java
index 53df0c5f9..d0a79f1c3 100644
--- a/build-time-compiler/src/main/java/com/dylibso/chicory/build/time/compiler/Generator.java
+++ b/build-time-compiler/src/main/java/run/endive/build/time/compiler/Generator.java
@@ -1,23 +1,10 @@
-package com.dylibso.chicory.build.time.compiler;
+package run.endive.build.time.compiler;
-import static com.dylibso.chicory.wasm.Encoding.readVarUInt32;
-import static com.dylibso.chicory.wasm.WasmWriter.writeVarUInt32;
import static com.github.javaparser.StaticJavaParser.parseClassOrInterfaceType;
import static com.github.javaparser.StaticJavaParser.parseType;
+import static run.endive.wasm.Encoding.readVarUInt32;
+import static run.endive.wasm.WasmWriter.writeVarUInt32;
-import com.dylibso.chicory.codegen.CodegenUtils;
-import com.dylibso.chicory.codegen.ModuleInterfaceCodegen;
-import com.dylibso.chicory.compiler.internal.ByteClassCollector;
-import com.dylibso.chicory.compiler.internal.Compiler;
-import com.dylibso.chicory.runtime.CompiledModule;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Machine;
-import com.dylibso.chicory.wasm.Parser;
-import com.dylibso.chicory.wasm.WasmModule;
-import com.dylibso.chicory.wasm.WasmWriter;
-import com.dylibso.chicory.wasm.types.OpCode;
-import com.dylibso.chicory.wasm.types.RawSection;
-import com.dylibso.chicory.wasm.types.SectionId;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.Modifier;
import com.github.javaparser.ast.NodeList;
@@ -46,6 +33,19 @@
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
+import run.endive.codegen.CodegenUtils;
+import run.endive.codegen.ModuleInterfaceCodegen;
+import run.endive.compiler.internal.ByteClassCollector;
+import run.endive.compiler.internal.Compiler;
+import run.endive.runtime.CompiledModule;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Machine;
+import run.endive.wasm.Parser;
+import run.endive.wasm.WasmModule;
+import run.endive.wasm.WasmWriter;
+import run.endive.wasm.types.OpCode;
+import run.endive.wasm.types.RawSection;
+import run.endive.wasm.types.SectionId;
public class Generator {
@@ -124,7 +124,7 @@ public void generateModuleInterface(String moduleInterfaceName) throws IOExcepti
ModuleInterfaceCodegen.builder(module)
.withPackageName(packageName)
.withTypeName(typeName)
- .withGeneratorName("com.dylibso.chicory.build.time.compiler.Generator")
+ .withGeneratorName("run.endive.build.time.compiler.Generator")
.build();
var classes = codegen.generate();
diff --git a/chicory1.png b/chicory1.png
deleted file mode 100644
index c876b8c59..000000000
Binary files a/chicory1.png and /dev/null differ
diff --git a/cli/README.md b/cli/README.md
index 99b78c24c..2d0cd0f4c 100644
--- a/cli/README.md
+++ b/cli/README.md
@@ -1,3 +1,3 @@
# Cli
-This produces a CLI for executing Chicory on the command line.
+This produces a CLI for executing Endive on the command line.
diff --git a/cli/pom.xml b/cli/pom.xml
index 09ec2fc06..75fa48fd6 100644
--- a/cli/pom.xml
+++ b/cli/pom.xml
@@ -3,33 +3,33 @@
4.0.0
- com.dylibso.chicory
- chicory
+ run.endive
+ endive999-SNAPSHOTcli-experimentaljar
- Chicory - Cli - Experimental
- A Chicory CLI
+ Endive - Cli - Experimental
+ A Endive CLI
- com.dylibso.chicory
+ info.picocli
+ picocli
+
+
+ run.endiveruntime
- com.dylibso.chicory
+ run.endivewasi
- com.dylibso.chicory
+ run.endivewasm
-
- info.picocli
- picocli
-
@@ -64,7 +64,7 @@
- com.dylibso.chicory.experimental.cli.Cli
+ run.endive.experimental.cli.Clifalse
@@ -90,7 +90,7 @@
2.1.1-Xmx1G
- chicory
+ endivetrue
diff --git a/cli/src/main/java/com/dylibso/chicory/experimental/cli/Cli.java b/cli/src/main/java/run/endive/experimental/cli/Cli.java
similarity index 92%
rename from cli/src/main/java/com/dylibso/chicory/experimental/cli/Cli.java
rename to cli/src/main/java/run/endive/experimental/cli/Cli.java
index 02fb10954..c0012cd13 100644
--- a/cli/src/main/java/com/dylibso/chicory/experimental/cli/Cli.java
+++ b/cli/src/main/java/run/endive/experimental/cli/Cli.java
@@ -1,19 +1,19 @@
-package com.dylibso.chicory.experimental.cli;
+package run.endive.experimental.cli;
-import com.dylibso.chicory.runtime.ImportValues;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wasi.WasiOptions;
-import com.dylibso.chicory.wasi.WasiPreview1;
-import com.dylibso.chicory.wasm.Parser;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.logging.LogManager;
import picocli.CommandLine;
+import run.endive.runtime.ImportValues;
+import run.endive.runtime.Instance;
+import run.endive.wasi.WasiOptions;
+import run.endive.wasi.WasiPreview1;
+import run.endive.wasm.Parser;
@CommandLine.Command(
- name = "chicory",
+ name = "endive",
mixinStandardHelpOptions = true,
helpCommand = true,
header = "A pure Java WASM runtime available as a CLI.")
diff --git a/codegen/pom.xml b/codegen/pom.xml
index 838f47458..721667b6d 100644
--- a/codegen/pom.xml
+++ b/codegen/pom.xml
@@ -3,26 +3,26 @@
4.0.0
- com.dylibso.chicory
- chicory
+ run.endive
+ endive999-SNAPSHOT../pom.xmlcodegenjar
- Chicory - Codegen
- Shared code generation utilities for Chicory annotation processor and build-time compiler
+ Endive - Codegen
+ Shared code generation utilities for Endive annotation processor and build-time compiler
-
- com.dylibso.chicory
- wasm
- com.github.javaparserjavaparser-core
+
+ run.endive
+ wasm
+
diff --git a/codegen/src/main/java/module-info.java b/codegen/src/main/java/module-info.java
index b6d84f953..25a995b21 100644
--- a/codegen/src/main/java/module-info.java
+++ b/codegen/src/main/java/module-info.java
@@ -1,7 +1,7 @@
-module com.dylibso.chicory.codegen {
+module run.endive.codegen {
requires java.compiler;
- requires com.dylibso.chicory.wasm;
+ requires run.endive.wasm;
requires com.github.javaparser.core;
- exports com.dylibso.chicory.codegen;
+ exports run.endive.codegen;
}
diff --git a/codegen/src/main/java/com/dylibso/chicory/codegen/CodegenUtils.java b/codegen/src/main/java/run/endive/codegen/CodegenUtils.java
similarity index 97%
rename from codegen/src/main/java/com/dylibso/chicory/codegen/CodegenUtils.java
rename to codegen/src/main/java/run/endive/codegen/CodegenUtils.java
index cc91d154b..38186d038 100644
--- a/codegen/src/main/java/com/dylibso/chicory/codegen/CodegenUtils.java
+++ b/codegen/src/main/java/run/endive/codegen/CodegenUtils.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.codegen;
+package run.endive.codegen;
import static com.github.javaparser.printer.configuration.DefaultPrinterConfiguration.ConfigOption.COLUMN_ALIGN_PARAMETERS;
diff --git a/codegen/src/main/java/com/dylibso/chicory/codegen/ModuleInterfaceCodegen.java b/codegen/src/main/java/run/endive/codegen/ModuleInterfaceCodegen.java
similarity index 94%
rename from codegen/src/main/java/com/dylibso/chicory/codegen/ModuleInterfaceCodegen.java
rename to codegen/src/main/java/run/endive/codegen/ModuleInterfaceCodegen.java
index 57e0fb2ef..b9c41c04a 100644
--- a/codegen/src/main/java/com/dylibso/chicory/codegen/ModuleInterfaceCodegen.java
+++ b/codegen/src/main/java/run/endive/codegen/ModuleInterfaceCodegen.java
@@ -1,14 +1,8 @@
-package com.dylibso.chicory.codegen;
+package run.endive.codegen;
import static com.github.javaparser.StaticJavaParser.parseClassOrInterfaceType;
import static com.github.javaparser.StaticJavaParser.parseType;
-import com.dylibso.chicory.wasm.WasmModule;
-import com.dylibso.chicory.wasm.types.ExternalType;
-import com.dylibso.chicory.wasm.types.FunctionImport;
-import com.dylibso.chicory.wasm.types.Import;
-import com.dylibso.chicory.wasm.types.ValType;
-import com.dylibso.chicory.wasm.types.Value;
import com.github.javaparser.ast.ArrayCreationLevel;
import com.github.javaparser.ast.CompilationUnit;
import com.github.javaparser.ast.Modifier;
@@ -40,6 +34,12 @@
import java.util.Map;
import java.util.stream.Collectors;
import javax.annotation.processing.Generated;
+import run.endive.wasm.WasmModule;
+import run.endive.wasm.types.ExternalType;
+import run.endive.wasm.types.FunctionImport;
+import run.endive.wasm.types.Import;
+import run.endive.wasm.types.ValType;
+import run.endive.wasm.types.Value;
public final class ModuleInterfaceCodegen {
@@ -103,7 +103,7 @@ public Map generate() {
String prefix = packageName.isEmpty() ? "" : packageName + ".";
var exportsCu = newCu();
- exportsCu.addImport("com.dylibso.chicory.runtime.Instance");
+ exportsCu.addImport("run.endive.runtime.Instance");
var processorName = new StringLiteralExpr(generatorName);
var exportsClass =
@@ -162,7 +162,7 @@ public Map generate() {
var exportMethodBodyGen = exportMethodBodyGen(exportCallHandle, export.name());
if (export.exportType() == ExternalType.MEMORY) {
- exportsCu.addImport("com.dylibso.chicory.runtime.Memory");
+ exportsCu.addImport("run.endive.runtime.Memory");
exportsConstructor
.getBody()
@@ -176,7 +176,7 @@ public Map generate() {
exportMethod.createBody().addStatement(new ReturnStmt(exportFieldName));
continue;
} else if (export.exportType() == ExternalType.GLOBAL) {
- exportsCu.addImport("com.dylibso.chicory.runtime.GlobalInstance");
+ exportsCu.addImport("run.endive.runtime.GlobalInstance");
exportsConstructor
.getBody()
@@ -190,7 +190,7 @@ public Map generate() {
exportMethod.createBody().addStatement(new ReturnStmt(exportFieldName));
continue;
} else if (export.exportType() == ExternalType.TABLE) {
- exportsCu.addImport("com.dylibso.chicory.runtime.TableInstance");
+ exportsCu.addImport("run.endive.runtime.TableInstance");
exportsConstructor
.getBody()
@@ -206,7 +206,7 @@ public Map generate() {
}
// it should be a function here
assert (export.exportType() == ExternalType.FUNCTION);
- exportsCu.addImport("com.dylibso.chicory.runtime.ExportFunction");
+ exportsCu.addImport("run.endive.runtime.ExportFunction");
var funcType =
(export.index() >= functionImports.length)
@@ -337,11 +337,11 @@ public Map generate() {
importFunctionCall));
if (importedFun.importType() == ExternalType.MEMORY) {
- cu.addImport("com.dylibso.chicory.runtime.Memory");
+ cu.addImport("run.endive.runtime.Memory");
importMethod.setType("Memory");
importMethod.removeBody();
- importsCu.addImport("com.dylibso.chicory.runtime.ImportMemory");
+ importsCu.addImport("run.endive.runtime.ImportMemory");
toImportValuesBody.addStatement(
new MethodCallExpr(
new NameExpr("imports"),
@@ -349,11 +349,11 @@ public Map generate() {
NodeList.nodeList(importObj.apply("ImportMemory"))));
continue;
} else if (importedFun.importType() == ExternalType.GLOBAL) {
- cu.addImport("com.dylibso.chicory.runtime.GlobalInstance");
+ cu.addImport("run.endive.runtime.GlobalInstance");
importMethod.setType("GlobalInstance");
importMethod.removeBody();
- importsCu.addImport("com.dylibso.chicory.runtime.ImportGlobal");
+ importsCu.addImport("run.endive.runtime.ImportGlobal");
toImportValuesBody.addStatement(
new MethodCallExpr(
new NameExpr("imports"),
@@ -361,11 +361,11 @@ public Map generate() {
NodeList.nodeList(importObj.apply("ImportGlobal"))));
continue;
} else if (importedFun.importType() == ExternalType.TABLE) {
- cu.addImport("com.dylibso.chicory.runtime.TableInstance");
+ cu.addImport("run.endive.runtime.TableInstance");
importMethod.setType("TableInstance");
importMethod.removeBody();
- importsCu.addImport("com.dylibso.chicory.runtime.ImportTable");
+ importsCu.addImport("run.endive.runtime.ImportTable");
toImportValuesBody.addStatement(
new MethodCallExpr(
new NameExpr("imports"),
@@ -378,8 +378,8 @@ public Map generate() {
// needed to generate the functions signatures
importsCu.addImport(List.class);
importsCu.addImport(ValType.class);
- importsCu.addImport("com.dylibso.chicory.runtime.Instance");
- importsCu.addImport("com.dylibso.chicory.runtime.HostFunction");
+ importsCu.addImport("run.endive.runtime.Instance");
+ importsCu.addImport("run.endive.runtime.HostFunction");
var importType =
module.typeSection()
@@ -478,7 +478,7 @@ public Map generate() {
var toImportValuesMethod =
importsInterface.addMethod("toImportValues", Modifier.Keyword.DEFAULT);
- importsCu.addImport("com.dylibso.chicory.runtime.ImportValues");
+ importsCu.addImport("run.endive.runtime.ImportValues");
toImportValuesMethod.setType("ImportValues");
toImportValuesMethod.setBody(toImportValuesBody);
}
diff --git a/compiler-maven-plugin/pom.xml b/compiler-maven-plugin/pom.xml
index 9a875bc30..223b8df00 100644
--- a/compiler-maven-plugin/pom.xml
+++ b/compiler-maven-plugin/pom.xml
@@ -3,23 +3,23 @@
4.0.0
- com.dylibso.chicory
- chicory
+ run.endive
+ endive999-SNAPSHOT../pom.xml
- chicory-compiler-maven-plugin
+ endive-compiler-maven-pluginmaven-plugin
- Chicory - Compiler Maven Plugin
+ Endive - Compiler Maven PluginA Maven Plugin to compile at build time WASM to Java bytecode
- com.dylibso.chicory
+ run.endivebuild-time-compiler
- com.dylibso.chicory
+ run.endivecompiler
@@ -51,7 +51,7 @@
org.apache.maven.pluginsmaven-plugin-plugin
- chicory
+ endive
diff --git a/compiler-maven-plugin/src/main/java/com/dylibso/chicory/build/time/maven/ChicoryCompilerGenMojo.java b/compiler-maven-plugin/src/main/java/run/endive/build/time/maven/EndiveCompilerGenMojo.java
similarity index 92%
rename from compiler-maven-plugin/src/main/java/com/dylibso/chicory/build/time/maven/ChicoryCompilerGenMojo.java
rename to compiler-maven-plugin/src/main/java/run/endive/build/time/maven/EndiveCompilerGenMojo.java
index ba279c2df..5866a32ed 100644
--- a/compiler-maven-plugin/src/main/java/com/dylibso/chicory/build/time/maven/ChicoryCompilerGenMojo.java
+++ b/compiler-maven-plugin/src/main/java/run/endive/build/time/maven/EndiveCompilerGenMojo.java
@@ -1,8 +1,5 @@
-package com.dylibso.chicory.build.time.maven;
+package run.endive.build.time.maven;
-import com.dylibso.chicory.build.time.compiler.Config;
-import com.dylibso.chicory.build.time.compiler.Generator;
-import com.dylibso.chicory.compiler.InterpreterFallback;
import java.io.File;
import java.io.IOException;
import java.util.Set;
@@ -14,12 +11,15 @@
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
+import run.endive.build.time.compiler.Config;
+import run.endive.build.time.compiler.Generator;
+import run.endive.compiler.InterpreterFallback;
/**
* This plugin generates an invokable library from the compiled Wasm
*/
@Mojo(name = "compile", defaultPhase = LifecyclePhase.GENERATE_SOURCES, threadSafe = true)
-public class ChicoryCompilerGenMojo extends AbstractMojo {
+public class EndiveCompilerGenMojo extends AbstractMojo {
/**
* the wasm module to be used
@@ -38,7 +38,7 @@ public class ChicoryCompilerGenMojo extends AbstractMojo {
*/
@Parameter(
required = true,
- defaultValue = "${project.build.directory}/generated-resources/chicory-compiler")
+ defaultValue = "${project.build.directory}/generated-resources/endive-compiler")
private File targetClassFolder;
/**
@@ -46,7 +46,7 @@ public class ChicoryCompilerGenMojo extends AbstractMojo {
*/
@Parameter(
required = true,
- defaultValue = "${project.build.directory}/generated-sources/chicory-compiler")
+ defaultValue = "${project.build.directory}/generated-sources/endive-compiler")
private File targetSourceFolder;
/**
@@ -54,7 +54,7 @@ public class ChicoryCompilerGenMojo extends AbstractMojo {
*/
@Parameter(
required = true,
- defaultValue = "${project.build.directory}/generated-resources/chicory-compiler")
+ defaultValue = "${project.build.directory}/generated-resources/endive-compiler")
private File targetWasmFolder;
/**
diff --git a/compiler-tests/pom.xml b/compiler-tests/pom.xml
index bb2fe7752..bb109d798 100644
--- a/compiler-tests/pom.xml
+++ b/compiler-tests/pom.xml
@@ -3,15 +3,15 @@
4.0.0
- com.dylibso.chicory
- chicory
+ run.endive
+ endive999-SNAPSHOT../pom.xmlcompiler-testsjar
- Chicory - Compiler tests
+ Endive - Compiler testsSpec tests for the compiler
@@ -21,61 +21,71 @@
test
- com.dylibso.chicory
- build-time-compiler
+ org.junit.jupiter
+ junit-jupiter-apitest
- com.dylibso.chicory
- compiler
+ org.junit.jupiter
+ junit-jupiter-enginetest
- com.dylibso.chicory
- runtime
+ org.ow2.asm
+ asmtest
- com.dylibso.chicory
- wabt
+ org.ow2.asm
+ asm-utiltest
- com.dylibso.chicory
- wasm
+ run.endive
+ build-time-compilertest
- com.dylibso.chicory
- wasm-corpus
+ run.endive
+ compilertest
- org.junit.jupiter
- junit-jupiter-api
+ run.endive
+ runtimetest
- org.junit.jupiter
- junit-jupiter-engine
+ run.endive
+ wabttest
- org.ow2.asm
- asm
+ run.endive
+ wasmtest
- org.ow2.asm
- asm-util
+ run.endive
+ wasm-corpustest
+
- com.dylibso.chicory
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ true
+
+
+
+
+ run.endivetest-gen-plugin${project.version}
@@ -429,16 +439,6 @@
-
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
- true
-
-
-
diff --git a/compiler-tests/src/test/java/com/dylibso/chicory/testing/ArgsAdapter.java b/compiler-tests/src/test/java/run/endive/testing/ArgsAdapter.java
similarity index 95%
rename from compiler-tests/src/test/java/com/dylibso/chicory/testing/ArgsAdapter.java
rename to compiler-tests/src/test/java/run/endive/testing/ArgsAdapter.java
index cfb01e5b5..dae93f93d 100644
--- a/compiler-tests/src/test/java/com/dylibso/chicory/testing/ArgsAdapter.java
+++ b/compiler-tests/src/test/java/run/endive/testing/ArgsAdapter.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.testing;
+package run.endive.testing;
import java.util.ArrayDeque;
diff --git a/compiler-tests/src/test/java/com/dylibso/chicory/testing/ClassTooLargeTest.java b/compiler-tests/src/test/java/run/endive/testing/ClassTooLargeTest.java
similarity index 91%
rename from compiler-tests/src/test/java/com/dylibso/chicory/testing/ClassTooLargeTest.java
rename to compiler-tests/src/test/java/run/endive/testing/ClassTooLargeTest.java
index 9136048c2..66e24bfdf 100644
--- a/compiler-tests/src/test/java/com/dylibso/chicory/testing/ClassTooLargeTest.java
+++ b/compiler-tests/src/test/java/run/endive/testing/ClassTooLargeTest.java
@@ -1,16 +1,16 @@
-package com.dylibso.chicory.testing;
+package run.endive.testing;
-import static com.dylibso.chicory.corpus.WatGenerator.bigWat;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static run.endive.corpus.WatGenerator.bigWat;
-import com.dylibso.chicory.compiler.MachineFactoryCompiler;
-import com.dylibso.chicory.compiler.internal.Compiler;
-import com.dylibso.chicory.runtime.ExportFunction;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.wabt.Wat2Wasm;
-import com.dylibso.chicory.wasm.Parser;
import org.junit.jupiter.api.Test;
+import run.endive.compiler.MachineFactoryCompiler;
+import run.endive.compiler.internal.Compiler;
+import run.endive.runtime.ExportFunction;
+import run.endive.runtime.Instance;
+import run.endive.wabt.Wat2Wasm;
+import run.endive.wasm.Parser;
public class ClassTooLargeTest {
diff --git a/compiler-tests/src/test/java/com/dylibso/chicory/testing/ImplementsCompiledModuleTest.java b/compiler-tests/src/test/java/run/endive/testing/ImplementsCompiledModuleTest.java
similarity index 72%
rename from compiler-tests/src/test/java/com/dylibso/chicory/testing/ImplementsCompiledModuleTest.java
rename to compiler-tests/src/test/java/run/endive/testing/ImplementsCompiledModuleTest.java
index 5b3fefd54..ebd3cd065 100644
--- a/compiler-tests/src/test/java/com/dylibso/chicory/testing/ImplementsCompiledModuleTest.java
+++ b/compiler-tests/src/test/java/run/endive/testing/ImplementsCompiledModuleTest.java
@@ -1,10 +1,10 @@
-package com.dylibso.chicory.testing;
+package run.endive.testing;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-import com.dylibso.chicory.runtime.CompiledModule;
-import com.dylibso.chicory.wabt.Wat2WasmModule;
import org.junit.jupiter.api.Test;
+import run.endive.runtime.CompiledModule;
+import run.endive.wabt.Wat2WasmModule;
public class ImplementsCompiledModuleTest {
diff --git a/compiler-tests/src/test/java/com/dylibso/chicory/testing/InterpreterFallbackTest.java b/compiler-tests/src/test/java/run/endive/testing/InterpreterFallbackTest.java
similarity index 86%
rename from compiler-tests/src/test/java/com/dylibso/chicory/testing/InterpreterFallbackTest.java
rename to compiler-tests/src/test/java/run/endive/testing/InterpreterFallbackTest.java
index 64862808b..52db9cf82 100644
--- a/compiler-tests/src/test/java/com/dylibso/chicory/testing/InterpreterFallbackTest.java
+++ b/compiler-tests/src/test/java/run/endive/testing/InterpreterFallbackTest.java
@@ -1,26 +1,13 @@
-package com.dylibso.chicory.testing;
+package run.endive.testing;
-import static com.dylibso.chicory.corpus.WatGenerator.methodTooLarge;
import static java.lang.invoke.MethodHandleProxies.asInterfaceInstance;
import static java.lang.invoke.MethodHandles.publicLookup;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static run.endive.corpus.WatGenerator.methodTooLarge;
-import com.dylibso.chicory.build.time.compiler.Config;
-import com.dylibso.chicory.build.time.compiler.Generator;
-import com.dylibso.chicory.compiler.InterpreterFallback;
-import com.dylibso.chicory.runtime.HostFunction;
-import com.dylibso.chicory.runtime.ImportValues;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Machine;
-import com.dylibso.chicory.wabt.Wat2Wasm;
-import com.dylibso.chicory.wasm.ChicoryException;
-import com.dylibso.chicory.wasm.Parser;
-import com.dylibso.chicory.wasm.WasmModule;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.ValType;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -38,6 +25,19 @@
import org.approvaltests.core.Options;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
+import run.endive.build.time.compiler.Config;
+import run.endive.build.time.compiler.Generator;
+import run.endive.compiler.InterpreterFallback;
+import run.endive.runtime.HostFunction;
+import run.endive.runtime.ImportValues;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Machine;
+import run.endive.wabt.Wat2Wasm;
+import run.endive.wasm.Parser;
+import run.endive.wasm.WasmEngineException;
+import run.endive.wasm.WasmModule;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.ValType;
public class InterpreterFallbackTest {
@@ -78,12 +78,12 @@ private void generateAll(Generator generator) throws IOException {
public void testDefaultInterpreterFallback() throws IOException {
var config =
defaultConfig()
- .withName("com.dylibso.chicory.testing.Test1")
+ .withName("run.endive.testing.Test1")
// .withInterpreterFallback(InterpreterFallback.FAIL)
.build();
var generator = new Generator(config);
- var exception = assertThrows(ChicoryException.class, () -> generateAll(generator));
+ var exception = assertThrows(WasmEngineException.class, () -> generateAll(generator));
assertTrue(
exception.getMessage().contains(expectedMessageContent),
@@ -94,7 +94,7 @@ public void testDefaultInterpreterFallback() throws IOException {
public void testWarnInterpreterFallback() throws IOException {
var config =
defaultConfig()
- .withName("com.dylibso.chicory.testing.Test2")
+ .withName("run.endive.testing.Test2")
.withInterpreterFallback(InterpreterFallback.WARN)
.build();
var generator = new Generator(config);
@@ -108,7 +108,7 @@ public void testWarnInterpreterFallback() throws IOException {
public void testSilentInterpreterFallback() throws IOException, ClassNotFoundException {
var config =
defaultConfig()
- .withName("com.dylibso.chicory.testing.Test3")
+ .withName("run.endive.testing.Test3")
.withInterpreterFallback(InterpreterFallback.SILENT)
.build();
var generator = new Generator(config);
@@ -122,7 +122,7 @@ public void testSilentInterpreterFallback() throws IOException, ClassNotFoundExc
var url = classDir.toUri().toURL();
var cl = new URLClassLoader(new URL[] {url});
- var machineClass = cl.loadClass("com.dylibso.chicory.testing.Test3Machine");
+ var machineClass = cl.loadClass("run.endive.testing.Test3Machine");
Function machineFactory = createMachineFactory(machineClass);
var hostStackTrace = new ArrayList();
@@ -191,12 +191,12 @@ private boolean containsInOrder(List expected, List actual) {
public void testFailWithInterpretedFunctions() throws IOException {
var config =
defaultConfig()
- .withName("com.dylibso.chicory.testing.Test3")
+ .withName("run.endive.testing.Test3")
.withInterpretedFunctions(Set.of(1))
.build();
var generator = new Generator(config);
- var exception = assertThrows(ChicoryException.class, () -> generateAll(generator));
+ var exception = assertThrows(WasmEngineException.class, () -> generateAll(generator));
assertTrue(
exception.getMessage().contains(expectedMessageContent),
@@ -207,7 +207,7 @@ public void testFailWithInterpretedFunctions() throws IOException {
public void testWithInterpretedFunctionsOk() throws IOException {
var config =
defaultConfig()
- .withName("com.dylibso.chicory.testing.Test3")
+ .withName("run.endive.testing.Test3")
.withInterpretedFunctions(Set.of(1, 2))
.build();
var generator = new Generator(config);
@@ -245,7 +245,7 @@ private Function createMachineFactory(Class> machineClass)
Function function = asInterfaceInstance(Function.class, handle);
return function;
} catch (ReflectiveOperationException e) {
- throw new ChicoryException(e);
+ throw new WasmEngineException(e);
}
}
diff --git a/compiler-tests/src/test/java/com/dylibso/chicory/testing/MethodTooLargeTest.java b/compiler-tests/src/test/java/run/endive/testing/MethodTooLargeTest.java
similarity index 91%
rename from compiler-tests/src/test/java/com/dylibso/chicory/testing/MethodTooLargeTest.java
rename to compiler-tests/src/test/java/run/endive/testing/MethodTooLargeTest.java
index 8fc975a2a..c29ef1611 100644
--- a/compiler-tests/src/test/java/com/dylibso/chicory/testing/MethodTooLargeTest.java
+++ b/compiler-tests/src/test/java/run/endive/testing/MethodTooLargeTest.java
@@ -1,13 +1,9 @@
-package com.dylibso.chicory.testing;
+package run.endive.testing;
-import static com.dylibso.chicory.corpus.WatGenerator.methodTooLarge;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.objectweb.asm.Type.getInternalName;
+import static run.endive.corpus.WatGenerator.methodTooLarge;
-import com.dylibso.chicory.compiler.internal.Compiler;
-import com.dylibso.chicory.compiler.internal.Shaded;
-import com.dylibso.chicory.wabt.Wat2Wasm;
-import com.dylibso.chicory.wasm.Parser;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Map;
@@ -18,6 +14,10 @@
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.util.TraceClassVisitor;
+import run.endive.compiler.internal.Compiler;
+import run.endive.compiler.internal.Shaded;
+import run.endive.wabt.Wat2Wasm;
+import run.endive.wasm.Parser;
public class MethodTooLargeTest {
diff --git a/compiler-tests/src/test/java/com/dylibso/chicory/testing/PackageSettings.java b/compiler-tests/src/test/java/run/endive/testing/PackageSettings.java
similarity index 71%
rename from compiler-tests/src/test/java/com/dylibso/chicory/testing/PackageSettings.java
rename to compiler-tests/src/test/java/run/endive/testing/PackageSettings.java
index 01770e325..14ba80062 100644
--- a/compiler-tests/src/test/java/com/dylibso/chicory/testing/PackageSettings.java
+++ b/compiler-tests/src/test/java/run/endive/testing/PackageSettings.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.testing;
+package run.endive.testing;
public class PackageSettings {
public String ApprovalBaseDirectory = "../resources";
diff --git a/compiler-tests/src/test/java/com/dylibso/chicory/testing/Spectest.java b/compiler-tests/src/test/java/run/endive/testing/Spectest.java
similarity index 84%
rename from compiler-tests/src/test/java/com/dylibso/chicory/testing/Spectest.java
rename to compiler-tests/src/test/java/run/endive/testing/Spectest.java
index 9d89548c3..be3aca5da 100644
--- a/compiler-tests/src/test/java/com/dylibso/chicory/testing/Spectest.java
+++ b/compiler-tests/src/test/java/run/endive/testing/Spectest.java
@@ -1,24 +1,24 @@
-package com.dylibso.chicory.testing;
+package run.endive.testing;
-import static com.dylibso.chicory.wasm.types.Value.REF_NULL_VALUE;
+import static run.endive.wasm.types.Value.REF_NULL_VALUE;
-import com.dylibso.chicory.runtime.ByteBufferMemory;
-import com.dylibso.chicory.runtime.GlobalInstance;
-import com.dylibso.chicory.runtime.HostFunction;
-import com.dylibso.chicory.runtime.ImportGlobal;
-import com.dylibso.chicory.runtime.ImportMemory;
-import com.dylibso.chicory.runtime.ImportTable;
-import com.dylibso.chicory.runtime.ImportValues;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.TableInstance;
-import com.dylibso.chicory.runtime.WasmFunctionHandle;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.MemoryLimits;
-import com.dylibso.chicory.wasm.types.Table;
-import com.dylibso.chicory.wasm.types.TableLimits;
-import com.dylibso.chicory.wasm.types.ValType;
-import com.dylibso.chicory.wasm.types.Value;
import java.util.List;
+import run.endive.runtime.ByteBufferMemory;
+import run.endive.runtime.GlobalInstance;
+import run.endive.runtime.HostFunction;
+import run.endive.runtime.ImportGlobal;
+import run.endive.runtime.ImportMemory;
+import run.endive.runtime.ImportTable;
+import run.endive.runtime.ImportValues;
+import run.endive.runtime.Instance;
+import run.endive.runtime.TableInstance;
+import run.endive.runtime.WasmFunctionHandle;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.MemoryLimits;
+import run.endive.wasm.types.Table;
+import run.endive.wasm.types.TableLimits;
+import run.endive.wasm.types.ValType;
+import run.endive.wasm.types.Value;
// https://github.com/WebAssembly/spec/blob/ee82c8e50c5106e0cedada0a083d4cc4129034a2/interpreter/host/spectest.ml
public final class Spectest {
diff --git a/compiler-tests/src/test/java/com/dylibso/chicory/testing/TestModule.java b/compiler-tests/src/test/java/run/endive/testing/TestModule.java
similarity index 83%
rename from compiler-tests/src/test/java/com/dylibso/chicory/testing/TestModule.java
rename to compiler-tests/src/test/java/run/endive/testing/TestModule.java
index 181f3ea27..167043bb9 100644
--- a/compiler-tests/src/test/java/com/dylibso/chicory/testing/TestModule.java
+++ b/compiler-tests/src/test/java/run/endive/testing/TestModule.java
@@ -1,15 +1,15 @@
-package com.dylibso.chicory.testing;
+package run.endive.testing;
-import com.dylibso.chicory.compiler.MachineFactoryCompiler;
-import com.dylibso.chicory.corpus.CorpusResources;
-import com.dylibso.chicory.runtime.ImportValues;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Store;
-import com.dylibso.chicory.wabt.Wat2Wasm;
-import com.dylibso.chicory.wasm.MalformedException;
-import com.dylibso.chicory.wasm.Parser;
-import com.dylibso.chicory.wasm.WasmModule;
import java.io.IOException;
+import run.endive.compiler.MachineFactoryCompiler;
+import run.endive.corpus.CorpusResources;
+import run.endive.runtime.ImportValues;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Store;
+import run.endive.wabt.Wat2Wasm;
+import run.endive.wasm.MalformedException;
+import run.endive.wasm.Parser;
+import run.endive.wasm.WasmModule;
public class TestModule {
diff --git a/compiler-tests/src/test/resources/com/dylibso/chicory/testing/InterpreterFallbackTest.testSilentInterpreterFallback-indirect.approved.txt b/compiler-tests/src/test/resources/com/dylibso/chicory/testing/InterpreterFallbackTest.testSilentInterpreterFallback-indirect.approved.txt
deleted file mode 100644
index 769db7dc7..000000000
--- a/compiler-tests/src/test/resources/com/dylibso/chicory/testing/InterpreterFallbackTest.testSilentInterpreterFallback-indirect.approved.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-com.dylibso.chicory.testing.Test3MachineShaded.callHostFunction
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.func_0
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.func_1
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.call_1
-com.dylibso.chicory.testing.Test3MachineMachineCall.call
-com.dylibso.chicory.testing.Test3Machine.call
-com.dylibso.chicory.runtime.InterpreterMachine.CALL_INDIRECT
-com.dylibso.chicory.runtime.InterpreterMachine.eval
-com.dylibso.chicory.runtime.InterpreterMachine.call
-com.dylibso.chicory.runtime.internal.CompilerInterpreterMachine.call
-com.dylibso.chicory.runtime.InterpreterMachine.call
-com.dylibso.chicory.testing.Test3Machine.call
-com.dylibso.chicory.testing.Test3MachineShaded.callIndirect
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.func_2
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.func_3
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.call_3
-com.dylibso.chicory.testing.Test3MachineMachineCall.call
-com.dylibso.chicory.testing.Test3Machine.call
-com.dylibso.chicory.runtime.Instance$Exports.lambda$function$0
\ No newline at end of file
diff --git a/compiler-tests/src/test/resources/com/dylibso/chicory/testing/InterpreterFallbackTest.testSilentInterpreterFallback.approved.txt b/compiler-tests/src/test/resources/com/dylibso/chicory/testing/InterpreterFallbackTest.testSilentInterpreterFallback.approved.txt
deleted file mode 100644
index b01c5440e..000000000
--- a/compiler-tests/src/test/resources/com/dylibso/chicory/testing/InterpreterFallbackTest.testSilentInterpreterFallback.approved.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-com.dylibso.chicory.testing.Test3MachineShaded.callHostFunction
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.func_0
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.func_1
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.call_1
-com.dylibso.chicory.testing.Test3MachineMachineCall.call
-com.dylibso.chicory.testing.Test3Machine.call
-com.dylibso.chicory.runtime.internal.CompilerInterpreterMachine.CALL
-com.dylibso.chicory.runtime.InterpreterMachine.eval
-com.dylibso.chicory.runtime.InterpreterMachine.call
-com.dylibso.chicory.runtime.internal.CompilerInterpreterMachine.call
-com.dylibso.chicory.runtime.InterpreterMachine.call
-com.dylibso.chicory.testing.Test3Machine.call
-com.dylibso.chicory.testing.Test3MachineShaded.callIndirect
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.func_2
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.func_3
-com.dylibso.chicory.testing.Test3MachineFuncGroup_0.call_3
-com.dylibso.chicory.testing.Test3MachineMachineCall.call
-com.dylibso.chicory.testing.Test3Machine.call
-com.dylibso.chicory.runtime.Instance$Exports.lambda$function$0
\ No newline at end of file
diff --git a/compiler-tests/src/test/resources/com/dylibso/chicory/testing/MethodTooLargeTest.testBigFunc.approved.txt b/compiler-tests/src/test/resources/com/dylibso/chicory/testing/MethodTooLargeTest.testBigFunc.approved.txt
deleted file mode 100644
index 9d155aa8a..000000000
--- a/compiler-tests/src/test/resources/com/dylibso/chicory/testing/MethodTooLargeTest.testBigFunc.approved.txt
+++ /dev/null
@@ -1,28 +0,0 @@
-private final Lcom/dylibso/chicory/runtime/Instance; instance
-
- private final Lcom/dylibso/chicory/runtime/internal/CompilerInterpreterMachine; compilerInterpreterMachine
-}
-
- private final static Z memCopyWorkaround
-}
-
-final class com/dylibso/chicory/$gen/CompiledMachineFuncGroup_0 {
-
- public static func_2(ILcom/dylibso/chicory/runtime/Memory;Lcom/dylibso/chicory/runtime/Instance;)I
- ICONST_1
- NEWARRAY T_LONG
- DUP
- ICONST_0
- ILOAD 0
- I2L
- LASTORE
- ICONST_2
- ALOAD 2
- INVOKESTATIC com/dylibso/chicory/$gen/CompiledMachineShaded.callIndirect ([JILcom/dylibso/chicory/runtime/Instance;)[J
- ICONST_0
- LALOAD
- L2I
- IRETURN
-}
-
-}
diff --git a/compiler-tests/src/test/resources/run/endive/testing/InterpreterFallbackTest.testSilentInterpreterFallback-indirect.approved.txt b/compiler-tests/src/test/resources/run/endive/testing/InterpreterFallbackTest.testSilentInterpreterFallback-indirect.approved.txt
new file mode 100644
index 000000000..e378ab761
--- /dev/null
+++ b/compiler-tests/src/test/resources/run/endive/testing/InterpreterFallbackTest.testSilentInterpreterFallback-indirect.approved.txt
@@ -0,0 +1,19 @@
+run.endive.testing.Test3MachineShaded.callHostFunction
+run.endive.testing.Test3MachineFuncGroup_0.func_0
+run.endive.testing.Test3MachineFuncGroup_0.func_1
+run.endive.testing.Test3MachineFuncGroup_0.call_1
+run.endive.testing.Test3MachineMachineCall.call
+run.endive.testing.Test3Machine.call
+run.endive.runtime.InterpreterMachine.CALL_INDIRECT
+run.endive.runtime.InterpreterMachine.eval
+run.endive.runtime.InterpreterMachine.call
+run.endive.runtime.internal.CompilerInterpreterMachine.call
+run.endive.runtime.InterpreterMachine.call
+run.endive.testing.Test3Machine.call
+run.endive.testing.Test3MachineShaded.callIndirect
+run.endive.testing.Test3MachineFuncGroup_0.func_2
+run.endive.testing.Test3MachineFuncGroup_0.func_3
+run.endive.testing.Test3MachineFuncGroup_0.call_3
+run.endive.testing.Test3MachineMachineCall.call
+run.endive.testing.Test3Machine.call
+run.endive.runtime.Instance$Exports.lambda$function$0
\ No newline at end of file
diff --git a/compiler-tests/src/test/resources/run/endive/testing/InterpreterFallbackTest.testSilentInterpreterFallback.approved.txt b/compiler-tests/src/test/resources/run/endive/testing/InterpreterFallbackTest.testSilentInterpreterFallback.approved.txt
new file mode 100644
index 000000000..a68c3e51e
--- /dev/null
+++ b/compiler-tests/src/test/resources/run/endive/testing/InterpreterFallbackTest.testSilentInterpreterFallback.approved.txt
@@ -0,0 +1,19 @@
+run.endive.testing.Test3MachineShaded.callHostFunction
+run.endive.testing.Test3MachineFuncGroup_0.func_0
+run.endive.testing.Test3MachineFuncGroup_0.func_1
+run.endive.testing.Test3MachineFuncGroup_0.call_1
+run.endive.testing.Test3MachineMachineCall.call
+run.endive.testing.Test3Machine.call
+run.endive.runtime.internal.CompilerInterpreterMachine.CALL
+run.endive.runtime.InterpreterMachine.eval
+run.endive.runtime.InterpreterMachine.call
+run.endive.runtime.internal.CompilerInterpreterMachine.call
+run.endive.runtime.InterpreterMachine.call
+run.endive.testing.Test3Machine.call
+run.endive.testing.Test3MachineShaded.callIndirect
+run.endive.testing.Test3MachineFuncGroup_0.func_2
+run.endive.testing.Test3MachineFuncGroup_0.func_3
+run.endive.testing.Test3MachineFuncGroup_0.call_3
+run.endive.testing.Test3MachineMachineCall.call
+run.endive.testing.Test3Machine.call
+run.endive.runtime.Instance$Exports.lambda$function$0
\ No newline at end of file
diff --git a/compiler-tests/src/test/resources/run/endive/testing/MethodTooLargeTest.testBigFunc.approved.txt b/compiler-tests/src/test/resources/run/endive/testing/MethodTooLargeTest.testBigFunc.approved.txt
new file mode 100644
index 000000000..58922d89c
--- /dev/null
+++ b/compiler-tests/src/test/resources/run/endive/testing/MethodTooLargeTest.testBigFunc.approved.txt
@@ -0,0 +1,28 @@
+private final Lrun/endive/runtime/Instance; instance
+
+ private final Lrun/endive/runtime/internal/CompilerInterpreterMachine; compilerInterpreterMachine
+}
+
+ private final static Z memCopyWorkaround
+}
+
+final class run/endive/$gen/CompiledMachineFuncGroup_0 {
+
+ public static func_2(ILrun/endive/runtime/Memory;Lrun/endive/runtime/Instance;)I
+ ICONST_1
+ NEWARRAY T_LONG
+ DUP
+ ICONST_0
+ ILOAD 0
+ I2L
+ LASTORE
+ ICONST_2
+ ALOAD 2
+ INVOKESTATIC run/endive/$gen/CompiledMachineShaded.callIndirect ([JILrun/endive/runtime/Instance;)[J
+ ICONST_0
+ LALOAD
+ L2I
+ IRETURN
+}
+
+}
diff --git a/compiler/pom.xml b/compiler/pom.xml
index fe3c70a1f..f59d81546 100644
--- a/compiler/pom.xml
+++ b/compiler/pom.xml
@@ -3,26 +3,18 @@
4.0.0
- com.dylibso.chicory
- chicory
+ run.endive
+ endive999-SNAPSHOT../pom.xmlcompilerjar
- Chicory - Compiler
+ Endive - CompilerWasm to Java bytecode compiler
-
- com.dylibso.chicory
- runtime
-
-
- com.dylibso.chicory
- wasm
- org.ow2.asmasm
@@ -36,13 +28,16 @@
asm-util
- com.approvaltests
- approvaltests
- test
+ run.endive
+ runtime
- com.dylibso.chicory
- wasm-corpus
+ run.endive
+ wasm
+
+
+ com.approvaltests
+ approvalteststest
@@ -60,6 +55,11 @@
junit-jupiter-enginetest
+
+ run.endive
+ wasm-corpus
+ test
+
diff --git a/compiler/src/main/java/module-info.java b/compiler/src/main/java/module-info.java
index 5946b91fc..98a1059d2 100644
--- a/compiler/src/main/java/module-info.java
+++ b/compiler/src/main/java/module-info.java
@@ -1,11 +1,11 @@
-module com.dylibso.chicory.compiler {
- requires transitive com.dylibso.chicory.runtime;
- requires transitive com.dylibso.chicory.wasm;
+module run.endive.compiler {
+ requires transitive run.endive.runtime;
+ requires transitive run.endive.wasm;
requires org.objectweb.asm;
requires org.objectweb.asm.commons;
requires org.objectweb.asm.util;
- exports com.dylibso.chicory.compiler;
- exports com.dylibso.chicory.compiler.internal;
- exports com.dylibso.chicory.experimental.aot;
+ exports run.endive.compiler;
+ exports run.endive.compiler.internal;
+ exports run.endive.experimental.aot;
}
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/Cache.java b/compiler/src/main/java/run/endive/compiler/Cache.java
similarity index 93%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/Cache.java
rename to compiler/src/main/java/run/endive/compiler/Cache.java
index 75e47793d..efc44fdaf 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/Cache.java
+++ b/compiler/src/main/java/run/endive/compiler/Cache.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.compiler;
+package run.endive.compiler;
import java.io.IOException;
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/InterpreterFallback.java b/compiler/src/main/java/run/endive/compiler/InterpreterFallback.java
similarity index 93%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/InterpreterFallback.java
rename to compiler/src/main/java/run/endive/compiler/InterpreterFallback.java
index 79a046117..e0445c64f 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/InterpreterFallback.java
+++ b/compiler/src/main/java/run/endive/compiler/InterpreterFallback.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.compiler;
+package run.endive.compiler;
/**
* Enum representing the fallback behavior for when the compiler needs to fallback to using
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/MachineFactoryCompiler.java b/compiler/src/main/java/run/endive/compiler/MachineFactoryCompiler.java
similarity index 93%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/MachineFactoryCompiler.java
rename to compiler/src/main/java/run/endive/compiler/MachineFactoryCompiler.java
index a1adc17d3..1fb842dc9 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/MachineFactoryCompiler.java
+++ b/compiler/src/main/java/run/endive/compiler/MachineFactoryCompiler.java
@@ -1,11 +1,5 @@
-package com.dylibso.chicory.compiler;
-
-import com.dylibso.chicory.compiler.internal.ClassLoadingCollector;
-import com.dylibso.chicory.compiler.internal.MachineFactory;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Machine;
-import com.dylibso.chicory.wasm.ChicoryException;
-import com.dylibso.chicory.wasm.WasmModule;
+package run.endive.compiler;
+
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
@@ -18,6 +12,12 @@
import java.util.jar.JarEntry;
import java.util.jar.JarInputStream;
import java.util.jar.JarOutputStream;
+import run.endive.compiler.internal.ClassLoadingCollector;
+import run.endive.compiler.internal.MachineFactory;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Machine;
+import run.endive.wasm.WasmEngineException;
+import run.endive.wasm.WasmModule;
/**
* Compiles WASM function bodies to JVM byte code that can be used as a machine factory for {@link Instance}'s.
@@ -84,12 +84,12 @@ public static Builder builder(WasmModule module) {
public static final class Builder {
private final WasmModule module;
- private final com.dylibso.chicory.compiler.internal.Compiler.Builder compilerBuilder;
+ private final run.endive.compiler.internal.Compiler.Builder compilerBuilder;
private Cache cache;
private Builder(WasmModule module) {
this.module = module;
- this.compilerBuilder = com.dylibso.chicory.compiler.internal.Compiler.builder(module);
+ this.compilerBuilder = run.endive.compiler.internal.Compiler.builder(module);
}
public Builder withClassName(String className) {
@@ -145,7 +145,7 @@ public Function compile() {
return new MachineFactory(module, collector.machineFactory());
} catch (IOException e) {
- throw new ChicoryException(e);
+ throw new WasmEngineException(e);
}
}
}
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/ByteClassCollector.java b/compiler/src/main/java/run/endive/compiler/internal/ByteClassCollector.java
similarity index 96%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/ByteClassCollector.java
rename to compiler/src/main/java/run/endive/compiler/internal/ByteClassCollector.java
index 592deb568..213c65555 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/ByteClassCollector.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/ByteClassCollector.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
import java.util.Collections;
import java.util.HashMap;
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/ClassCollector.java b/compiler/src/main/java/run/endive/compiler/internal/ClassCollector.java
similarity index 92%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/ClassCollector.java
rename to compiler/src/main/java/run/endive/compiler/internal/ClassCollector.java
index 249be60e7..335a7bf37 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/ClassCollector.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/ClassCollector.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
import java.util.Map;
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/ClassLoadingCollector.java b/compiler/src/main/java/run/endive/compiler/internal/ClassLoadingCollector.java
similarity index 94%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/ClassLoadingCollector.java
rename to compiler/src/main/java/run/endive/compiler/internal/ClassLoadingCollector.java
index be07824a7..e593d382c 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/ClassLoadingCollector.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/ClassLoadingCollector.java
@@ -1,11 +1,8 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
import static java.lang.invoke.MethodHandleProxies.asInterfaceInstance;
import static java.lang.invoke.MethodHandles.publicLookup;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Machine;
-import com.dylibso.chicory.wasm.ChicoryException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Collections;
@@ -15,6 +12,9 @@
import java.util.function.Function;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.util.CheckClassAdapter;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Machine;
+import run.endive.wasm.WasmEngineException;
/**
* A {@link ClassCollector} that stores the classes in an ordered map.
@@ -103,7 +103,7 @@ private Function createMachineFactory(String name) {
Function function = asInterfaceInstance(Function.class, handle);
return function;
} catch (ReflectiveOperationException e) {
- throw new ChicoryException(e);
+ throw new WasmEngineException(e);
}
}
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/Compiler.java b/compiler/src/main/java/run/endive/compiler/internal/Compiler.java
similarity index 92%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/Compiler.java
rename to compiler/src/main/java/run/endive/compiler/internal/Compiler.java
index 6420a5139..f3d3f4696 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/Compiler.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/Compiler.java
@@ -1,43 +1,5 @@
-package com.dylibso.chicory.compiler.internal;
-
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.asmType;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.callDispatchMethodName;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.callIndirectMethodName;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.callIndirectMethodType;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.callMethodName;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.classNameForCallIndirect;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.classNameForDispatch;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.defaultValue;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.emitInvokeFunction;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.emitInvokeStatic;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.emitInvokeVirtual;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.emitJvmToLong;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.emitLongToJvm;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.hasTooManyParameters;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.internalClassName;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.jvmReturnType;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.localType;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.methodNameForFunc;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.methodTypeFor;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.rawMethodTypeFor;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.slotCount;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.valueMethodName;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.valueMethodType;
-import static com.dylibso.chicory.compiler.internal.EmitterMap.EMITTERS;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.AOT_INTERPRETER_MACHINE_CALL;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.CALL_HOST_FUNCTION;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.CALL_INDIRECT;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.CALL_INDIRECT_ON_INTERPRETER;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.CHECK_INTERRUPTION;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.INSTANCE_MEMORY;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.INSTANCE_TABLE;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.TABLE_INSTANCE;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.TABLE_REQUIRED_REF;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.THROW_CALL_STACK_EXHAUSTED;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.THROW_INDIRECT_CALL_TYPE_MISMATCH;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.THROW_UNKNOWN_FUNCTION;
-import static com.dylibso.chicory.compiler.internal.Shader.createShadedClass;
-import static com.dylibso.chicory.compiler.internal.Shader.shadedClassRemapper;
+package run.endive.compiler.internal;
+
import static java.lang.Math.max;
import static java.lang.Math.min;
import static java.lang.invoke.MethodType.methodType;
@@ -52,20 +14,45 @@
import static org.objectweb.asm.Type.getMethodDescriptor;
import static org.objectweb.asm.Type.getType;
import static org.objectweb.asm.commons.InstructionAdapter.OBJECT_TYPE;
+import static run.endive.compiler.internal.CompilerUtil.asmType;
+import static run.endive.compiler.internal.CompilerUtil.callDispatchMethodName;
+import static run.endive.compiler.internal.CompilerUtil.callIndirectMethodName;
+import static run.endive.compiler.internal.CompilerUtil.callIndirectMethodType;
+import static run.endive.compiler.internal.CompilerUtil.callMethodName;
+import static run.endive.compiler.internal.CompilerUtil.classNameForCallIndirect;
+import static run.endive.compiler.internal.CompilerUtil.classNameForDispatch;
+import static run.endive.compiler.internal.CompilerUtil.defaultValue;
+import static run.endive.compiler.internal.CompilerUtil.emitInvokeFunction;
+import static run.endive.compiler.internal.CompilerUtil.emitInvokeStatic;
+import static run.endive.compiler.internal.CompilerUtil.emitInvokeVirtual;
+import static run.endive.compiler.internal.CompilerUtil.emitJvmToLong;
+import static run.endive.compiler.internal.CompilerUtil.emitLongToJvm;
+import static run.endive.compiler.internal.CompilerUtil.hasTooManyParameters;
+import static run.endive.compiler.internal.CompilerUtil.internalClassName;
+import static run.endive.compiler.internal.CompilerUtil.jvmReturnType;
+import static run.endive.compiler.internal.CompilerUtil.localType;
+import static run.endive.compiler.internal.CompilerUtil.methodNameForFunc;
+import static run.endive.compiler.internal.CompilerUtil.methodTypeFor;
+import static run.endive.compiler.internal.CompilerUtil.rawMethodTypeFor;
+import static run.endive.compiler.internal.CompilerUtil.slotCount;
+import static run.endive.compiler.internal.CompilerUtil.valueMethodName;
+import static run.endive.compiler.internal.CompilerUtil.valueMethodType;
+import static run.endive.compiler.internal.EmitterMap.EMITTERS;
+import static run.endive.compiler.internal.ShadedRefs.AOT_INTERPRETER_MACHINE_CALL;
+import static run.endive.compiler.internal.ShadedRefs.CALL_HOST_FUNCTION;
+import static run.endive.compiler.internal.ShadedRefs.CALL_INDIRECT;
+import static run.endive.compiler.internal.ShadedRefs.CALL_INDIRECT_ON_INTERPRETER;
+import static run.endive.compiler.internal.ShadedRefs.CHECK_INTERRUPTION;
+import static run.endive.compiler.internal.ShadedRefs.INSTANCE_MEMORY;
+import static run.endive.compiler.internal.ShadedRefs.INSTANCE_TABLE;
+import static run.endive.compiler.internal.ShadedRefs.TABLE_INSTANCE;
+import static run.endive.compiler.internal.ShadedRefs.TABLE_REQUIRED_REF;
+import static run.endive.compiler.internal.ShadedRefs.THROW_CALL_STACK_EXHAUSTED;
+import static run.endive.compiler.internal.ShadedRefs.THROW_INDIRECT_CALL_TYPE_MISMATCH;
+import static run.endive.compiler.internal.ShadedRefs.THROW_UNKNOWN_FUNCTION;
+import static run.endive.compiler.internal.Shader.createShadedClass;
+import static run.endive.compiler.internal.Shader.shadedClassRemapper;
-import com.dylibso.chicory.compiler.InterpreterFallback;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Machine;
-import com.dylibso.chicory.runtime.Memory;
-import com.dylibso.chicory.runtime.WasmException;
-import com.dylibso.chicory.runtime.internal.CompilerInterpreterMachine;
-import com.dylibso.chicory.wasm.ChicoryException;
-import com.dylibso.chicory.wasm.WasmModule;
-import com.dylibso.chicory.wasm.types.ExternalType;
-import com.dylibso.chicory.wasm.types.FunctionBody;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.OpCode;
-import com.dylibso.chicory.wasm.types.ValType;
import java.lang.invoke.MethodType;
import java.util.ArrayList;
import java.util.HashMap;
@@ -84,10 +71,23 @@
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
import org.objectweb.asm.commons.InstructionAdapter;
+import run.endive.compiler.InterpreterFallback;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Machine;
+import run.endive.runtime.Memory;
+import run.endive.runtime.WasmException;
+import run.endive.runtime.internal.CompilerInterpreterMachine;
+import run.endive.wasm.WasmEngineException;
+import run.endive.wasm.WasmModule;
+import run.endive.wasm.types.ExternalType;
+import run.endive.wasm.types.FunctionBody;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.OpCode;
+import run.endive.wasm.types.ValType;
public final class Compiler {
- public static final String DEFAULT_CLASS_NAME = "com.dylibso.chicory.$gen.CompiledMachine";
+ public static final String DEFAULT_CLASS_NAME = "run.endive.$gen.CompiledMachine";
private static final Type LONG_ARRAY_TYPE = Type.getType(long[].class);
private static final Type INT_ARRAY_TYPE = Type.getType(int[].class);
private static final Type AOT_INTERPRETER_MACHINE_TYPE =
@@ -102,8 +102,7 @@ public final class Compiler {
// C2 JIT's HugeMethodLimit (default 8KB) — methods exceeding this get degraded optimization.
// Dispatch chunks are sized to stay under this limit for full C2 compilation.
- private static final int HUGE_METHOD_LIMIT =
- Integer.getInteger("chicory.hugeMethodLimit", 8000);
+ private static final int HUGE_METHOD_LIMIT = Integer.getInteger("endive.hugeMethodLimit", 8000);
// Estimated upper bound: tableswitch offset (4) + label + invokestatic (~5) + areturn (1) +
// overhead
private static final int ESTIMATED_BYTES_PER_DISPATCH_ENTRY = 40;
@@ -337,7 +336,7 @@ private void compileExtraClasses() {
"Warning: using interpreted mode for " + functionDescription);
break;
case FAIL:
- throw new ChicoryException(
+ throw new WasmEngineException(
"WASM function size exceeds the Java method size limits and"
+ " cannot be compiled to Java bytecode. It can only be run"
+ " in the interpreter. Either reduce the size of the"
@@ -623,7 +622,7 @@ private static RuntimeException handleMethodTooLarge(
name += " (" + function + ")";
}
}
- return new ChicoryException(
+ return new WasmEngineException(
String.format(
"JVM bytecode too large for WASM method: %s size=%d",
name, e.getCodeSize()),
@@ -1442,7 +1441,7 @@ private void compileFunction(
break;
case IFEQ:
if (visitedTargets.contains(ins.operand(0))) {
- throw new ChicoryException("Unexpected backward jump");
+ throw new WasmEngineException("Unexpected backward jump");
}
asm.ifeq(labels.get(ins.operand(0)));
break;
@@ -1480,7 +1479,7 @@ private void compileFunction(
default:
var emitter = EMITTERS.get(ins.opcode());
if (emitter == null) {
- throw new ChicoryException("Unhandled opcode: " + ins.opcode());
+ throw new WasmEngineException("Unhandled opcode: " + ins.opcode());
}
emitter.emit(ctx, ins, asm);
}
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerInstruction.java b/compiler/src/main/java/run/endive/compiler/internal/CompilerInstruction.java
similarity index 96%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerInstruction.java
rename to compiler/src/main/java/run/endive/compiler/internal/CompilerInstruction.java
index e8a62e331..382b78c65 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerInstruction.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/CompilerInstruction.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
import java.util.Arrays;
import java.util.stream.LongStream;
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerOpCode.java b/compiler/src/main/java/run/endive/compiler/internal/CompilerOpCode.java
similarity index 99%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerOpCode.java
rename to compiler/src/main/java/run/endive/compiler/internal/CompilerOpCode.java
index 63f4f1920..77193307e 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerOpCode.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/CompilerOpCode.java
@@ -1,9 +1,9 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
-import com.dylibso.chicory.wasm.types.OpCode;
import java.util.EnumMap;
import java.util.Map;
import java.util.Optional;
+import run.endive.wasm.types.OpCode;
enum CompilerOpCode {
LABEL,
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerResult.java b/compiler/src/main/java/run/endive/compiler/internal/CompilerResult.java
similarity index 93%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerResult.java
rename to compiler/src/main/java/run/endive/compiler/internal/CompilerResult.java
index 72bd975d9..680fa4763 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerResult.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/CompilerResult.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
import java.util.Map;
import java.util.Set;
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerUtil.java b/compiler/src/main/java/run/endive/compiler/internal/CompilerUtil.java
similarity index 96%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerUtil.java
rename to compiler/src/main/java/run/endive/compiler/internal/CompilerUtil.java
index ade8cdd7e..ef6f8d878 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/CompilerUtil.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/CompilerUtil.java
@@ -1,6 +1,5 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
-import static com.dylibso.chicory.wasm.types.Value.REF_NULL_VALUE;
import static java.lang.invoke.MethodType.methodType;
import static java.util.stream.Collectors.joining;
import static org.objectweb.asm.Type.DOUBLE_TYPE;
@@ -9,13 +8,8 @@
import static org.objectweb.asm.Type.LONG_TYPE;
import static org.objectweb.asm.Type.getInternalName;
import static org.objectweb.asm.Type.getMethodDescriptor;
+import static run.endive.wasm.types.Value.REF_NULL_VALUE;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Memory;
-import com.dylibso.chicory.wasm.types.FunctionBody;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.ValType;
-import com.dylibso.chicory.wasm.types.Value;
import java.lang.invoke.MethodType;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
@@ -24,6 +18,12 @@
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.Type;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Memory;
+import run.endive.wasm.types.FunctionBody;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.ValType;
+import run.endive.wasm.types.Value;
final class CompilerUtil {
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/Context.java b/compiler/src/main/java/run/endive/compiler/internal/Context.java
similarity index 90%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/Context.java
rename to compiler/src/main/java/run/endive/compiler/internal/Context.java
index 90ca45e7f..465fd5e1f 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/Context.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/Context.java
@@ -1,19 +1,19 @@
-package com.dylibso.chicory.compiler.internal;
-
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.hasTooManyParameters;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.slotCount;
-
-import com.dylibso.chicory.wasm.WasmModule;
-import com.dylibso.chicory.wasm.types.ExternalType;
-import com.dylibso.chicory.wasm.types.FunctionBody;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.TagImport;
-import com.dylibso.chicory.wasm.types.TypeSection;
-import com.dylibso.chicory.wasm.types.ValType;
+package run.endive.compiler.internal;
+
+import static run.endive.compiler.internal.CompilerUtil.hasTooManyParameters;
+import static run.endive.compiler.internal.CompilerUtil.slotCount;
+
import java.util.ArrayList;
import java.util.List;
import java.util.function.IntFunction;
import java.util.stream.Collectors;
+import run.endive.wasm.WasmModule;
+import run.endive.wasm.types.ExternalType;
+import run.endive.wasm.types.FunctionBody;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.TagImport;
+import run.endive.wasm.types.TypeSection;
+import run.endive.wasm.types.ValType;
/**
* Class for tracking context relevant to compiling a single function
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/EmitterMap.java b/compiler/src/main/java/run/endive/compiler/internal/EmitterMap.java
similarity index 99%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/EmitterMap.java
rename to compiler/src/main/java/run/endive/compiler/internal/EmitterMap.java
index b7c6bb189..dc14c99b2 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/EmitterMap.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/EmitterMap.java
@@ -1,7 +1,7 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
-import com.dylibso.chicory.runtime.OpcodeImpl;
import java.util.Map;
+import run.endive.runtime.OpcodeImpl;
final class EmitterMap {
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/Emitters.java b/compiler/src/main/java/run/endive/compiler/internal/Emitters.java
similarity index 97%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/Emitters.java
rename to compiler/src/main/java/run/endive/compiler/internal/Emitters.java
index f50fd098b..40e768259 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/Emitters.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/Emitters.java
@@ -1,22 +1,5 @@
-package com.dylibso.chicory.compiler.internal;
-
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.asmType;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.callIndirectMethodName;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.callIndirectMethodType;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.emitInvokeFunction;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.emitInvokeStatic;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.emitInvokeVirtual;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.emitJvmToLong;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.emitLongToJvm;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.emitPop;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.hasTooManyParameters;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.jvmReturnType;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.localType;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.slotCount;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.valueMethodName;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.valueMethodType;
-import static com.dylibso.chicory.compiler.internal.ShadedRefs.EXCEPTION_MATCHES;
-import static com.dylibso.chicory.wasm.types.Value.REF_NULL_VALUE;
+package run.endive.compiler.internal;
+
import static java.lang.Double.longBitsToDouble;
import static java.lang.Float.intBitsToFloat;
import static org.objectweb.asm.Type.INT_TYPE;
@@ -25,12 +8,24 @@
import static org.objectweb.asm.Type.getMethodDescriptor;
import static org.objectweb.asm.Type.getType;
import static org.objectweb.asm.commons.InstructionAdapter.OBJECT_TYPE;
+import static run.endive.compiler.internal.CompilerUtil.asmType;
+import static run.endive.compiler.internal.CompilerUtil.callIndirectMethodName;
+import static run.endive.compiler.internal.CompilerUtil.callIndirectMethodType;
+import static run.endive.compiler.internal.CompilerUtil.emitInvokeFunction;
+import static run.endive.compiler.internal.CompilerUtil.emitInvokeStatic;
+import static run.endive.compiler.internal.CompilerUtil.emitInvokeVirtual;
+import static run.endive.compiler.internal.CompilerUtil.emitJvmToLong;
+import static run.endive.compiler.internal.CompilerUtil.emitLongToJvm;
+import static run.endive.compiler.internal.CompilerUtil.emitPop;
+import static run.endive.compiler.internal.CompilerUtil.hasTooManyParameters;
+import static run.endive.compiler.internal.CompilerUtil.jvmReturnType;
+import static run.endive.compiler.internal.CompilerUtil.localType;
+import static run.endive.compiler.internal.CompilerUtil.slotCount;
+import static run.endive.compiler.internal.CompilerUtil.valueMethodName;
+import static run.endive.compiler.internal.CompilerUtil.valueMethodType;
+import static run.endive.compiler.internal.ShadedRefs.EXCEPTION_MATCHES;
+import static run.endive.wasm.types.Value.REF_NULL_VALUE;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.OpCodeIdentifier;
-import com.dylibso.chicory.runtime.WasmException;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.ValType;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.util.EnumMap;
@@ -40,6 +35,11 @@
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.commons.InstructionAdapter;
+import run.endive.runtime.Instance;
+import run.endive.runtime.OpCodeIdentifier;
+import run.endive.runtime.WasmException;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.ValType;
final class Emitters {
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/MachineFactory.java b/compiler/src/main/java/run/endive/compiler/internal/MachineFactory.java
similarity index 86%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/MachineFactory.java
rename to compiler/src/main/java/run/endive/compiler/internal/MachineFactory.java
index ebbb6364c..532699694 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/MachineFactory.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/MachineFactory.java
@@ -1,10 +1,10 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
-import com.dylibso.chicory.runtime.CompiledModule;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Machine;
-import com.dylibso.chicory.wasm.WasmModule;
import java.util.function.Function;
+import run.endive.runtime.CompiledModule;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Machine;
+import run.endive.wasm.WasmModule;
/**
* Machine factory implementation that AOT compiles function bodies.
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/Shaded.java b/compiler/src/main/java/run/endive/compiler/internal/Shaded.java
similarity index 97%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/Shaded.java
rename to compiler/src/main/java/run/endive/compiler/internal/Shaded.java
index 6738ae857..38107d097 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/Shaded.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/Shaded.java
@@ -1,26 +1,26 @@
-package com.dylibso.chicory.compiler.internal;
-
-import static com.dylibso.chicory.runtime.MemCopyWorkaround.shouldUseMemWorkaround;
-import static com.dylibso.chicory.wasm.types.Value.REF_NULL_VALUE;
-
-import com.dylibso.chicory.runtime.ChicoryInterruptedException;
-import com.dylibso.chicory.runtime.ConstantEvaluators;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.MemCopyWorkaround;
-import com.dylibso.chicory.runtime.Memory;
-import com.dylibso.chicory.runtime.OpcodeImpl;
-import com.dylibso.chicory.runtime.TableInstance;
-import com.dylibso.chicory.runtime.TrapException;
-import com.dylibso.chicory.runtime.WasmArray;
-import com.dylibso.chicory.runtime.WasmException;
-import com.dylibso.chicory.runtime.WasmI31Ref;
-import com.dylibso.chicory.runtime.WasmRuntimeException;
-import com.dylibso.chicory.runtime.WasmStruct;
-import com.dylibso.chicory.wasm.ChicoryException;
-import com.dylibso.chicory.wasm.InvalidException;
-import com.dylibso.chicory.wasm.types.ValType;
-import com.dylibso.chicory.wasm.types.Value;
+package run.endive.compiler.internal;
+
+import static run.endive.runtime.MemCopyWorkaround.shouldUseMemWorkaround;
+import static run.endive.wasm.types.Value.REF_NULL_VALUE;
+
import java.util.Arrays;
+import run.endive.runtime.ConstantEvaluators;
+import run.endive.runtime.Instance;
+import run.endive.runtime.MemCopyWorkaround;
+import run.endive.runtime.Memory;
+import run.endive.runtime.OpcodeImpl;
+import run.endive.runtime.TableInstance;
+import run.endive.runtime.TrapException;
+import run.endive.runtime.WasmArray;
+import run.endive.runtime.WasmException;
+import run.endive.runtime.WasmI31Ref;
+import run.endive.runtime.WasmInterruptedException;
+import run.endive.runtime.WasmRuntimeException;
+import run.endive.runtime.WasmStruct;
+import run.endive.wasm.InvalidException;
+import run.endive.wasm.WasmEngineException;
+import run.endive.wasm.types.ValType;
+import run.endive.wasm.types.Value;
/**
* This class will get shaded into the compiled code.
@@ -58,7 +58,7 @@ public static void setTailCallIndirect(
int funcId = table.requiredRef(funcTableIdx);
Instance refInstance = table.instance(funcTableIdx);
if (refInstance != null && refInstance != instance) {
- throw new ChicoryException(
+ throw new WasmEngineException(
"Indirect tail-call to a different Machine implementation is not supported");
}
int actualTypeIdx = instance.functionType(funcId);
@@ -136,7 +136,7 @@ public static int i32_ge_u(int a, int b) {
private static final boolean memCopyWorkaround;
static {
- var prop = System.getProperty("chicory.memCopyWorkaround");
+ var prop = System.getProperty("endive.memCopyWorkaround");
if (prop != null) {
memCopyWorkaround = Boolean.valueOf(prop);
@@ -341,11 +341,11 @@ public static int getAddr(int base, int offset) {
}
public static RuntimeException throwCallStackExhausted(StackOverflowError e) {
- throw new ChicoryException("call stack exhausted", e);
+ throw new WasmEngineException("call stack exhausted", e);
}
public static RuntimeException throwIndirectCallTypeMismatch() {
- return new ChicoryException("indirect call type mismatch");
+ return new WasmEngineException("indirect call type mismatch");
}
public static RuntimeException throwOutOfBoundsMemoryAccess() {
@@ -366,7 +366,7 @@ public static RuntimeException throwUnknownFunction(int index) {
public static void checkInterruption() {
if (Thread.currentThread().isInterrupted()) {
- throw new ChicoryInterruptedException("Thread interrupted");
+ throw new WasmInterruptedException("Thread interrupted");
}
}
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/ShadedRefs.java b/compiler/src/main/java/run/endive/compiler/internal/ShadedRefs.java
similarity index 99%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/ShadedRefs.java
rename to compiler/src/main/java/run/endive/compiler/internal/ShadedRefs.java
index e5a6ffa58..89b5420b0 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/ShadedRefs.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/ShadedRefs.java
@@ -1,12 +1,12 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Memory;
-import com.dylibso.chicory.runtime.TableInstance;
-import com.dylibso.chicory.runtime.WasmException;
-import com.dylibso.chicory.runtime.internal.CompilerInterpreterMachine;
-import com.dylibso.chicory.wasm.types.Element;
import java.lang.reflect.Method;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Memory;
+import run.endive.runtime.TableInstance;
+import run.endive.runtime.WasmException;
+import run.endive.runtime.internal.CompilerInterpreterMachine;
+import run.endive.wasm.types.Element;
public final class ShadedRefs {
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/Shader.java b/compiler/src/main/java/run/endive/compiler/internal/Shader.java
similarity index 91%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/Shader.java
rename to compiler/src/main/java/run/endive/compiler/internal/Shader.java
index c52113b7d..7bdede4d1 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/Shader.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/Shader.java
@@ -1,9 +1,8 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.internalClassName;
import static org.objectweb.asm.Type.getInternalName;
+import static run.endive.compiler.internal.CompilerUtil.internalClassName;
-import com.dylibso.chicory.wasm.ChicoryException;
import java.io.IOException;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
@@ -11,6 +10,7 @@
import org.objectweb.asm.Opcodes;
import org.objectweb.asm.commons.ClassRemapper;
import org.objectweb.asm.commons.Remapper;
+import run.endive.wasm.WasmEngineException;
/**
* The Shader class is responsible for creating a shaded version of the Shaded class.
@@ -75,7 +75,7 @@ static byte[] getBytecode(Class> clazz) {
}
return in.readAllBytes();
} catch (IOException e) {
- throw new ChicoryException("Could not load bytecode for " + clazz, e);
+ throw new WasmEngineException("Could not load bytecode for " + clazz, e);
}
}
}
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/TypeStack.java b/compiler/src/main/java/run/endive/compiler/internal/TypeStack.java
similarity index 87%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/TypeStack.java
rename to compiler/src/main/java/run/endive/compiler/internal/TypeStack.java
index 60bb8d390..f5fc264bd 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/TypeStack.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/TypeStack.java
@@ -1,16 +1,16 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
-import static com.dylibso.chicory.wasm.types.Instruction.EMPTY_OPERANDS;
+import static run.endive.wasm.types.Instruction.EMPTY_OPERANDS;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.Instruction;
-import com.dylibso.chicory.wasm.types.OpCode;
-import com.dylibso.chicory.wasm.types.TypeSection;
-import com.dylibso.chicory.wasm.types.ValType;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.HashMap;
import java.util.Map;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.Instruction;
+import run.endive.wasm.types.OpCode;
+import run.endive.wasm.types.TypeSection;
+import run.endive.wasm.types.ValType;
final class TypeStack {
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/WasmAnalyzer.java b/compiler/src/main/java/run/endive/compiler/internal/WasmAnalyzer.java
similarity index 98%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/WasmAnalyzer.java
rename to compiler/src/main/java/run/endive/compiler/internal/WasmAnalyzer.java
index 15b42c196..6c8522384 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/WasmAnalyzer.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/WasmAnalyzer.java
@@ -1,29 +1,13 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.hasTooManyParameters;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.localType;
-import static com.dylibso.chicory.compiler.internal.CompilerUtil.slotCount;
-import static com.dylibso.chicory.compiler.internal.TypeStack.FUNCTION_SCOPE;
import static java.util.Collections.reverse;
import static java.util.stream.Collectors.toCollection;
import static java.util.stream.Collectors.toUnmodifiableList;
+import static run.endive.compiler.internal.CompilerUtil.hasTooManyParameters;
+import static run.endive.compiler.internal.CompilerUtil.localType;
+import static run.endive.compiler.internal.CompilerUtil.slotCount;
+import static run.endive.compiler.internal.TypeStack.FUNCTION_SCOPE;
-import com.dylibso.chicory.wasm.ChicoryException;
-import com.dylibso.chicory.wasm.WasmModule;
-import com.dylibso.chicory.wasm.types.AnnotatedInstruction;
-import com.dylibso.chicory.wasm.types.CatchOpCode;
-import com.dylibso.chicory.wasm.types.ExternalType;
-import com.dylibso.chicory.wasm.types.FieldType;
-import com.dylibso.chicory.wasm.types.FunctionBody;
-import com.dylibso.chicory.wasm.types.FunctionImport;
-import com.dylibso.chicory.wasm.types.FunctionType;
-import com.dylibso.chicory.wasm.types.Global;
-import com.dylibso.chicory.wasm.types.GlobalImport;
-import com.dylibso.chicory.wasm.types.Instruction;
-import com.dylibso.chicory.wasm.types.OpCode;
-import com.dylibso.chicory.wasm.types.Table;
-import com.dylibso.chicory.wasm.types.TableImport;
-import com.dylibso.chicory.wasm.types.ValType;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
@@ -35,6 +19,22 @@
import java.util.stream.IntStream;
import java.util.stream.LongStream;
import java.util.stream.Stream;
+import run.endive.wasm.WasmEngineException;
+import run.endive.wasm.WasmModule;
+import run.endive.wasm.types.AnnotatedInstruction;
+import run.endive.wasm.types.CatchOpCode;
+import run.endive.wasm.types.ExternalType;
+import run.endive.wasm.types.FieldType;
+import run.endive.wasm.types.FunctionBody;
+import run.endive.wasm.types.FunctionImport;
+import run.endive.wasm.types.FunctionType;
+import run.endive.wasm.types.Global;
+import run.endive.wasm.types.GlobalImport;
+import run.endive.wasm.types.Instruction;
+import run.endive.wasm.types.OpCode;
+import run.endive.wasm.types.Table;
+import run.endive.wasm.types.TableImport;
+import run.endive.wasm.types.ValType;
final class WasmAnalyzer {
@@ -1595,7 +1595,7 @@ private void analyzeSimple(
.build());
break;
default:
- throw new ChicoryException("Unhandled opcode: " + ins.opcode());
+ throw new WasmEngineException("Unhandled opcode: " + ins.opcode());
}
out.add(new CompilerInstruction(CompilerOpCode.of(ins.opcode()), ins.operands()));
}
diff --git a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/WasmClassLoader.java b/compiler/src/main/java/run/endive/compiler/internal/WasmClassLoader.java
similarity index 88%
rename from compiler/src/main/java/com/dylibso/chicory/compiler/internal/WasmClassLoader.java
rename to compiler/src/main/java/run/endive/compiler/internal/WasmClassLoader.java
index 831974486..a9cade21a 100644
--- a/compiler/src/main/java/com/dylibso/chicory/compiler/internal/WasmClassLoader.java
+++ b/compiler/src/main/java/run/endive/compiler/internal/WasmClassLoader.java
@@ -1,4 +1,4 @@
-package com.dylibso.chicory.compiler.internal;
+package run.endive.compiler.internal;
import org.objectweb.asm.ClassReader;
diff --git a/compiler/src/main/java/com/dylibso/chicory/experimental/aot/AotMachine.java b/compiler/src/main/java/run/endive/experimental/aot/AotMachine.java
similarity index 58%
rename from compiler/src/main/java/com/dylibso/chicory/experimental/aot/AotMachine.java
rename to compiler/src/main/java/run/endive/experimental/aot/AotMachine.java
index e88e53adf..a473a7bb0 100644
--- a/compiler/src/main/java/com/dylibso/chicory/experimental/aot/AotMachine.java
+++ b/compiler/src/main/java/run/endive/experimental/aot/AotMachine.java
@@ -1,16 +1,16 @@
-package com.dylibso.chicory.experimental.aot;
+package run.endive.experimental.aot;
-import com.dylibso.chicory.compiler.internal.MachineFactory;
-import com.dylibso.chicory.runtime.Instance;
-import com.dylibso.chicory.runtime.Machine;
-import com.dylibso.chicory.wasm.ChicoryException;
+import run.endive.compiler.internal.MachineFactory;
+import run.endive.runtime.Instance;
+import run.endive.runtime.Machine;
+import run.endive.wasm.WasmEngineException;
/**
* Machine implementation that compiles WASM function bodies to JVM byte code.
* All compilation is done in a single compile phase during instantiation.
*
* This class is deprecated and will be removed in a future version. Please use
- * the {@link com.dylibso.chicory.compiler.MachineFactoryCompiler} instead.
+ * the {@link run.endive.compiler.MachineFactoryCompiler} instead.
*/
@Deprecated(since = "1.4.0")
public final class AotMachine implements Machine {
@@ -20,7 +20,7 @@ public final class AotMachine implements Machine {
/**
* Creates a new AOT machine instance.
*