Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
java-version: [11, 21]
java-version: [11, 25]
steps:
- uses: actions/checkout@v7
- name: Set up Java
Expand All @@ -33,6 +33,8 @@ jobs:
git clone --depth 1 https://github.com/bytecodealliance/endive.git /tmp/endive
cd /tmp/endive
mvn -B -Dquickly install
- name: Prepare wast files
run: ./update-spec-tests.sh
- name: Build and test
run: mvn -B install
- name: Publish Test Report
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ target/
.DS_Store

.claude
/parser/src/test/resources/spec-tests/
8 changes: 8 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ The long-term goal is to bring full Component Model support to Endive:

## Current Status

Initial work is in progress on the component type model (`types` module), binary parser (`parser` module), and
supporting infrastructure including initial `wasm-tools component` command support (`wasm-tools` module).

The repository includes a `wit-parser` module that wraps the
[wasm-tools](https://github.com/bytecodealliance/wasm-tools) `component wit` command,
using the same pattern as the
Expand Down Expand Up @@ -65,8 +68,13 @@ mvn -Dquickly

Then build endive-cm:

The tests of the `parser` module rely upon downloading a local copy of the .wast tests from the Component Model spec
repository. A shell script is provided that fetches the most recent copy of the .wast tests.

To build endive-cm:
```sh
cd endive-cm
./update-spec-tests.sh
mvn clean install
```

Expand Down
2 changes: 1 addition & 1 deletion docs/phases/00-type-model.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Phase 0: Type Model Foundation

**Status**: Not started
**Status**: In progress

## Goal

Expand Down
5 changes: 4 additions & 1 deletion docs/phases/01-binary-parser.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Phase 1: Binary Parser

**Status**: Not started
**Status**: In progress
**Depends on**: Phase 0 (Type Model)

## Goal
Expand Down Expand Up @@ -81,6 +81,9 @@ and immutable fields for all sections.

## Testing

- **Component Model spec tests**: sync .wast tests from the [Component Model spec tests](https://github.com/WebAssembly/component-model/tree/main/test)
and use `wasm-tools json-from-wast` to extract and execute tests, parse with `ComponentParser`, and verify the .wast
assertions
- **Round-trip with wasm-tools**: produce component binaries via
`wasm-tools component new`, parse with `ComponentParser`, verify structure
- **Error paths**: truncated input, wrong magic, wrong layer, malformed
Expand Down
2 changes: 1 addition & 1 deletion docs/phases/02-wasm-tools.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Phase 2: wasm-tools Integration (Component Commands)

**Status**: Not started
**Status**: In progress
**Depends on**: None (independent, but Phase 1 testing benefits from it)

## Goal
Expand Down
88 changes: 88 additions & 0 deletions parser/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>run.endive.cm</groupId>
<artifactId>endive-cm</artifactId>
<version>999-SNAPSHOT</version>
</parent>
<artifactId>parser</artifactId>
<packaging>jar</packaging>

<name>Endive CM - Binary Component Model Parser</name>
<description>Binary parser for Endive Component Model</description>

<dependencies>
<dependency>
<groupId>run.endive</groupId>
<artifactId>wasm</artifactId>
</dependency>
<dependency>
<groupId>run.endive.cm</groupId>
<artifactId>types</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.roastedroot</groupId>
<artifactId>zerofs</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>run.endive</groupId>
<artifactId>log</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>run.endive</groupId>
<artifactId>runtime</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>run.endive</groupId>
<artifactId>wasi</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>run.endive</groupId>
<artifactId>wasm-tools</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>run.endive.cm</groupId>
<artifactId>wasm-tools</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>16</source>
<target>16</target>
</configuration>
</plugin>
</plugins>
</build>

</project>
Loading
Loading