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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ updates:
patterns:
- "*"
- package-ecosystem: 'maven'
directory: '/java-wasm'
directory: '/java/wasm'
schedule:
interval: 'weekly'
groups:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ jobs:
- name: Check C coverage
run: doxygen Doxyfile
- name: Check Java coverage
run: javadoc -Xdoclint:all,-missing -d ../doc/java -subpackages *
working-directory: java
run: javadoc -Xdoclint:all,-missing -d doc/java -sourcepath java/api/target/generated-sources/java/:java/api/src/main/java org.ruby_lang.prism
- name: Generate Rust documentation
run: |
bundle exec rake cargo:build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: doxygen Doxyfile
- name: Build with JavaDoc
run: javadoc -Xdoclint:all,-missing -d ../doc/java -subpackages *
working-directory: java
working-directory: java/api
- name: Build with rustdoc
run: |
bundle exec rake cargo:build
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/java-wasm-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- "src/"
- "*akefile*"
- "java/"
- "java-wasm/"
- "java/wasm/"
branches:
- main
- ruby-4.0
Expand Down Expand Up @@ -44,11 +44,15 @@ jobs:
java-version: '21'
cache: maven

- name: Run the tests
run: mvn -B install
working-directory: java-wasm
- name: Build the Java artifacts
run: mvn -ntp install
working-directory: java

- name: Run the tests from the WASM module
run: mvn -ntp test
working-directory: java

- uses: actions/upload-artifact@v7
with:
name: prism.wasm
path: java-wasm/src/test/resources/prism.wasm
path: java/wasm/src/test/resources/prism.wasm
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ out.svg
/java/org/ruby_lang/prism/AbstractNodeVisitor.java
/java/org/ruby_lang/prism/Loader.java
/java/org/ruby_lang/prism/Nodes.java
/java-wasm/src/test/resources/prism.wasm
/java/wasm/src/test/resources/prism.wasm
/lib/prism/compiler.rb
/lib/prism/dispatcher.rb
/lib/prism/dot_visitor.rb
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ all: shared static
shared: build/libprism.$(SOEXT)
static: build/libprism.a
wasm: javascript/src/prism.wasm
java-wasm: java-wasm/src/test/resources/prism.wasm
java-wasm: java/wasm/src/test/resources/prism.wasm

build/libprism.$(SOEXT): $(SHARED_OBJECTS)
$(ECHO) "linking $@ with $(CC)"
Expand All @@ -51,7 +51,7 @@ javascript/src/prism.wasm: Makefile $(SOURCES) $(HEADERS)
-Oz -g0 -flto -fdata-sections -ffunction-sections \
-o $@ $(SOURCES)

java-wasm/src/test/resources/prism.wasm: Makefile $(SOURCES) $(HEADERS)
java/wasm/src/test/resources/prism.wasm: Makefile $(SOURCES) $(HEADERS)
$(ECHO) "building $@"
$(Q) $(MAKEDIRS) $(@D)
$(Q) $(WASI_SDK_PATH)/bin/clang \
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ The repository contains the infrastructure for both a shared library (libprism)
├── include
│   ├── prism header files for the shared library
│   └── prism.h main header file for the shared library
├── java Java bindings for the shared library
├── java-wasm Java WASM bindings for the shared library
├── java
| ├── api Java API for Prism
| ├── native Java native bindings for the shared library
| └── wasm Java WASM bindings for the shared library
├── javascript JavaScript WASM bindings for the shared library
├── lib
│   ├── prism Ruby library files
Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ elsif RUBY_ENGINE == "jruby"
# This compiles java to make sure any templating changes produces valid code.
Rake::JavaExtensionTask.new(:compile) do |ext|
ext.name = "prism"
ext.ext_dir = "java"
ext.ext_dir = "java/api"
ext.lib_dir = "tmp"
ext.release = "21"
ext.gem_spec = Gem::Specification.load("prism.gemspec")
Expand All @@ -54,7 +54,7 @@ end
CLOBBER.concat(Prism::Template::TEMPLATES)
CLOBBER.concat(["build"])
CLOBBER << "lib/prism/prism.#{RbConfig::CONFIG["DLEXT"]}"
CLOBBER << "java-wasm/src/main/resources/prism.wasm"
CLOBBER << "java/wasm/src/main/resources/prism.wasm"

Prism::Template::TEMPLATES.each do |filepath|
desc "Generate #{filepath}"
Expand Down
6 changes: 3 additions & 3 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ A lot of code in prism's repository is templated from a single configuration fil
* `include/prism/node_new.h` - for defining the functions that create the nodes in C
* `javascript/src/deserialize.js` - for defining how to deserialize the nodes in JavaScript
* `javascript/src/nodes.js` - for defining the nodes in JavaScript
* `java/org/ruby_lang/prism/AbstractNodeVisitor.java` - for defining the visitor interface for the nodes in Java
* `java/org/ruby_lang/prism/Loader.java` - for defining how to deserialize the nodes in Java
* `java/org/ruby_lang/prism/Nodes.java` - for defining the nodes in Java
* `java/api/target/generated-sources/java/org/ruby_lang/prism/AbstractNodeVisitor.java` - for defining the visitor interface for the nodes in Java
* `java/api/target/generated-sources/java/org/ruby_lang/prism/Loader.java` - for defining how to deserialize the nodes in Java
* `java/api/target/generated-sources/java/org/ruby_lang/prism/Nodes.java` - for defining the nodes in Java
* `lib/prism/compiler.rb` - for defining the compiler for the nodes in Ruby
* `lib/prism/dispatcher.rb` - for defining the dispatch visitors for the nodes in Ruby
* `lib/prism/dot_visitor.rb` - for defining the dot visitor for the nodes in Ruby
Expand Down
29 changes: 0 additions & 29 deletions java-wasm/README.md

This file was deleted.

236 changes: 0 additions & 236 deletions java-wasm/pom.xml

This file was deleted.

4 changes: 4 additions & 0 deletions java/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
api/target
native/target
wasm/target
.idea
Loading