lmcode-java-sample
lmcode-java-sample is the Java 21 and GraalVM Native Image reference Shop and Ledger host embedding lmcode-java and passing the canonical sample suite. It compiles with zero external Maven dependencies, preserves raw byte strings in VmString, dispatches R49 rule entries, and frames LMCODE_RETURN results.
Quick reference
git clone https://github.com/lmctl-ai/lmcode-java-sample.git
cd lmcode-java-sample
python3 scripts/sync.py check
./build.sh
./test.sh
| Aspect | Value | Role |
|---|---|---|
| Language & toolchain | Java 21 (JVM & GraalVM Native Image) | Reference host implementation embedding lmcode-java (vendor/lmcode-java) |
| Domain schema | 45 host signatures | Shop, Items, Money, Ledger, Currency enum, operators, and Adjuster/Score interfaces |
| Standard catalog | lmcode_std_v3 | Preloaded standard catalog plus opt-in print and assert_close testing helpers |
| --lmcode-schema [--json] | Discovery flag | Print human summary or exact embedded dsl.schema: 2 JSON bytes (exit 0) |
| --lmcode-signatures | Discovery flag | Print sorted canonical host and standard signatures (exit 0) |
| --lmcode / --first / --last | Execution flags | Run one or more compiled DSLB v6 chunks, dispatch @item/@total entries, and frame results |
./bin/lmcode-java-sample --version
./bin/lmcode-java-sample --lmcode-schema --json
./bin/lmcode-java-sample --lmcode-signatures
./bin/lmcode-java-sample --lmcode sample-suite/bytecode/001-literals.dslb