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
3 changes: 2 additions & 1 deletion .github/workflows/aot-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ jobs:

- uses: graalvm/setup-graalvm@v1
with:
version: '25.4'
java-version: '25'
distribution: 'graalvm'
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ jobs:

- uses: graalvm/setup-graalvm@v1
with:
version: '25.4'
java-version: '25'
distribution: 'graalvm'
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
native-image-job-reports: 'true'

Expand Down
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,31 @@ jelly-cli rdf from-jelly input.jelly --out-format=ttl > output.ttl
You can specify most well-known formats supported by Apache Jena, but also the custom `jelly-text` format.
`jelly-text` is a human-readable translation of Jelly binary. It's not meant for machine consumption. It is useful for debugging and inspecting Jelly files.

### Jelly-RDF versions

`jelly-cli` writes Jelly-RDF 1.2 by default, and reads all versions of Jelly-RDF. Jelly-RDF 1.2 is much faster and better compressed than 1.1, so you are encouraged to upgrade your files to the new version.

To upgrade your old Jelly-RDF 1.1 file to 1.2, run:

```shell
jelly-cli rdf to-jelly input.jelly > output.jelly
```

If you need files for a reader that only supports Jelly-RDF 1.1, use `--opt.jelly-version=1.1`:

```shell
jelly-cli rdf to-jelly input.ttl --opt.jelly-version=1.1 > output.jelly
```

### Transcode Jelly files

The `rdf transcode` command turns one or more input Jelly streams into a single output stream. It's extremely fast, using a dedicated transcoding algorithm. This algorithm has a limitation: the lookup sizes of the output stream must be greater than or equal to the lookup sizes of the input streams.
The `rdf transcode` command turns one or more input Jelly streams into a single output stream. It's extremely fast, using a dedicated transcoding algorithm. This algorithm has a limitation: the lookup sizes of the output stream must be greater than or equal to the lookup sizes of the input streams. It only works with Jelly-RDF 1.2 streams.

```shell
jelly-cli rdf transcode input.jelly > output.jelly
```

If you need other options than that, use `rdf to-jelly` with Jelly input instead. It fully decodes and re-encodes the stream, so it's slower, but you can set any `--opt.*` options. The same works for Jelly-SPARQL with `sparql to-jelly --in-format jelly-sparql`.
If you need other options than that, or want to turn a Jelly-RDF 1.1 file into 1.2, use `rdf to-jelly` with Jelly input instead. It fully decodes and re-encodes the stream, so it's slower, but you can set any `--opt.*` options. The same works for Jelly-SPARQL with `sparql to-jelly --in-format jelly-sparql`.

```shell
jelly-cli rdf to-jelly input.jelly --opt.max-name-table-size=256 > output.jelly
Expand Down
7 changes: 3 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ resolvers +=
"Sonatype OSS Snapshots" at "https://central.sonatype.com/repository/maven-snapshots"

lazy val jenaV = "6.2.0"
lazy val jellyV = "3.7.3+80-0f51136f-SNAPSHOT"
lazy val jellyV = "3.7.3+85-45406b30-SNAPSHOT"
lazy val graalvmV = "25.4.4.1.1"

addCommandAlias("fixAll", "scalafixAll; scalafmtAll")
Expand All @@ -23,8 +23,8 @@ def isDevBuild: Boolean =

lazy val graalOptions = Seq(
// Do a fast build if it's a dev build
// For the release build, optimize for speed and make a build report
if (isDevBuild) Seq("-Ob") else Seq("-O3", "--emit build-report"),
// For the release build, optimize for speed
if (isDevBuild) Seq("-Ob") else Seq("-O3"),
).flatten ++ Seq(
// If using dependencies on Scala <3.8 and JDK >=24, we need to allow unsafe memory access.
// Otherwise, we get annoying warnings on startup.
Expand All @@ -42,7 +42,6 @@ lazy val graalOptions = Seq(
"--initialize-at-build-time=org.glassfish.json.UnicodeDetectingInputStream",
"-H:+TrackPrimitiveValues", // SkipFlow optimization
"-H:+UsePredicates", // SkipFlow optimization
"-H:+MLCallCountProfileInference", // ML inference for hot/cold method detection
// Make sure we don't include stuff that should be unreachable in the native image
"-H:AbortOnMethodReachable=*UUID.randomUUID*",
// Include XML error messages
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -343,6 +348,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -356,6 +366,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -372,6 +387,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -388,6 +408,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -404,6 +429,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -420,6 +450,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -436,6 +471,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -452,6 +492,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -468,6 +513,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -484,6 +534,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand Down Expand Up @@ -522,6 +577,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -538,6 +598,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand All @@ -554,6 +619,11 @@
"boolean"
]
}
],
"fields": [
{
"name": "FACTORY"
}
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions src/main/scala/eu/neverblink/jelly/cli/JellyCommand.scala
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ abstract class JellyCommand[T <: HasJellyCommandOptions: {Parser, Help}] extends
else System.in

final def setStdIn(data: InputStream): Unit =
// Entering the test mode resets the input, so do it before setting it
if !isTest then testMode(true)
in = data

final def getOutStream: OutputStream =
Expand Down
Loading
Loading