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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,8 +51,8 @@ jobs:

- run: cargo fmt --all -- --check
- run: cargo clippy --all -- -D warnings
# test_utils requires tokio rt-multi-thread, which does not compile on wasm
- run: cargo clippy --workspace --exclude test_utils --target wasm32-unknown-unknown -- -D warnings
# test-utils requires tokio rt-multi-thread, which does not compile on wasm
- run: cargo clippy --workspace --exclude test-utils --target wasm32-unknown-unknown -- -D warnings
- run: cargo test --all

# docs-only lock (AGENTS.md "Round Worklog") — one runner, not the 6-cell matrix
Expand Down
15 changes: 8 additions & 7 deletions AGENTS.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,11 +21,12 @@

## Project Structure
- `jvm/` - Core JVM implementation (`#![no_std]`)
- `jvm_rust/` - Rust-based JVM interpreter
- `java_runtime/` - Java standard library implementations
- `jvm-bytecode/` - JVM class and bytecode implementation
- `rustjava-runtime/` - Java standard library implementations
- `classfile/` - Class file parser
- `java_class_proto/` - Java class prototypes
- `test_utils/` - Shared test utilities
- `jvm-class-proto/` - Java class prototypes
- `jvm-types/` - Shared JVM metadata types
- `test-utils/` - Shared test utilities

## Round Worklog `docs/worklog/` — human `.md` + machine `.json`, always a pair
When a round leaves follow-up proposals or their disposition, drop **two files with the same
Expand DownExpand Up@@ -80,9 +81,9 @@ print('open cards:',p-a)"
- ⒝ **< 5** ⇒ 의무화해도 카드가 늘지 않았다는 뜻이므로 **의무 자체를 재검토**하라.
Baseline measured 2026-09-04: 9 proposals − 4 disposed = **5 open**. So ⒝ means "fewer than today".
## Testing Boundaries
- Keep `java_runtime/tests/classes` limited to Java standard library class and API behavior.
- Test JVM and interpreter semantics, including class initialization, bytecode execution, and monitor behavior, with compiled Java fixtures under `test_data/src` and expected output under `test_data`, executed by `tests/test_class.rs`.
- Do not place JVM core behavior tests in the `java_runtime` standard library test tree.
- Keep `rustjava-runtime/tests/classes` limited to Java standard library class and API behavior.
- Test JVM and interpreter semantics, including class initialization, bytecode execution, and monitor behavior, with compiled Java fixtures under `test-data/src` and expected output under `test-data`, executed by `tests/test_class.rs`.
- Do not place JVM core behavior tests in the `rustjava-runtime` standard library test tree.

## Compatibility Sources
- Implement Java compatibility from public specifications, Javadocs, and observable behavior tests. Do not consult or reproduce OpenJDK or other Java runtime implementation source code; keep the implementation independent to avoid licensing and provenance concerns.
124 changes: 62 additions & 62 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 22 additions & 14 deletions Cargo.toml
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
[workspace]
members = ["classfile", "java_runtime", "jvm", "jvm_rust", "test_utils"]
members = ["classfile", "jvm", "jvm-bytecode", "jvm-class-proto", "jvm-types", "rustjava-runtime"]

[workspace.package]
version = "0.0.1"
version = "0.1.1"
edition = "2024"
license = "MIT"
repository = "https://github.com/dlunch/RustJava"

[workspace.dependencies]
anyhow = { version = "^1.0", default-features = false }
Expand All@@ -20,22 +21,29 @@ tracing = { version = "^0.1", default-features = false }

tokio = { version = "^1.52", features = ["macros"] }

classfile = { path = "classfile" }
java_class_proto = { path = "java_class_proto" }
java_constants = { path = "java_constants" }
java_runtime = { path = "java_runtime" }
jvm = { path = "jvm" }
jvm_rust = { path = "jvm_rust" }
test_utils = { path = "test_utils" }
classfile = { path = "classfile", version = "0.1.1" }
jvm = { path = "jvm", version = "0.1.1" }
jvm-bytecode = { path = "jvm-bytecode", version = "0.1.1" }
jvm-class-proto = { path = "jvm-class-proto", version = "0.1.1" }
jvm-types = { path = "jvm-types", version = "0.1.1" }
rustjava-runtime = { path = "rustjava-runtime", version = "0.1.1" }
test-utils = { path = "test-utils" }

[package]
name = "rust_java"
name = "RustJava"
description = "An embeddable JVM and Java runtime implemented in Rust"
exclude = ["docs"]
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[lib]
name = "rust_java"

[[bin]]
name = "rust_java"
path = "src/main.rs"

[dependencies]
async-trait = { workspace = true }
Expand All@@ -46,12 +54,12 @@ tracing = { workspace = true }
tracing-subscriber = { version = "^0.3", features = ["env-filter"] }

jvm = { workspace = true }
jvm_rust = { workspace = true }
java_class_proto = { workspace = true }
java_runtime = { workspace = true }
jvm-bytecode = { workspace = true }
jvm-class-proto = { workspace = true }
rustjava-runtime = { workspace = true }

[dev-dependencies]
test_utils = { workspace = true }
test-utils = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { workspace = true, features = ["rt-multi-thread", "time"] }
Expand Down
29 changes: 29 additions & 0 deletions REPORT.md
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,34 @@
# REPORT

## [2026-09-04] upstream 동기 S8 — 컷 `bd42427` 개명 스윕 · ★**behind 0** (rustjava-upstream-sync-s8-rename-sweep-decision)
- 무엇을: upstream `bd42427` 까지 **12커밋**(crates.io 공개 준비 개명 스윕)을 `--merge` 로 흡수하고 충돌 **8건**을 해소했다.
★★**`merge-base` `ba5797b` → `bd42427` · behind `12` → ★`0`** · 부모 **2개**
⇒ ★★★**upstream 을 «완전히» 따라잡았다**(2026-08-16 계획 착수 시 behind 33 → 오늘 0).
- 왜: 운영자 채택 제안 `2026-09-03-upstream-sync-s5-s7-remeasure#p0` — 「개명이 우리 픽스처를 **조용히 지울 수 있다**」.
★**이 회차의 산출은 코드가 아니라 «판정»**이었다: 어느 픽스처가 어디로 가는가.
- 사용자 영향: **크레이트 이름이 공개용으로 바뀐다**(`java_runtime`→`rustjava-runtime` · `jvm_rust`→`jvm-bytecode` ·
`java_class_proto`→`jvm-class-proto` · `java_constants`→`jvm-types` · `test_utils`→`test-utils` ·
`test_data/`→`test-data/`). ★**런타임 동작 변경 0** · 우리 자산 전수 생존.
- 검증: stable 4종 + ★beta 2종 rc=0 · `cargo test --all` **554 / 0 / 1** · beta 도 **554 동수** ·
★증감 0 이고 그것이 맞다(upstream 테스트 함수도 **547 → 547** — 개명 스윕이라 추가 0) ·
`#[ignore]` **1 → 1** · 우리 테스트 함수 **558 → 558**.
- ★★**두려워한 형태(modify/delete)가 «0건»이었다.** git 이 `CONFLICT (file location)` + `AU` 로 처리해
우리 고유 **6건**을 새 경로로 **이미 옮겨** 두고 «이동 확인»만 요구했다 ⇒ 처분은 **「간다」 전건**이고
★**`origin/main` 블롭 ↔ 새 경로 해시가 6건 전부 동일**(바이트 보존) · ★**픽스처 수 5 → 5**.
★「남는다/버린다」는 **0** — 여섯 다 우리 것이고 upstream 판본으로 **대체된 것이 없다**.
- ★★**대신 개명이 «우리 자산 2건»을 낡게 만들었다 — 「우리 자산이 낡는」 5회째이고 «대상»이 처음이다**:
⑴`.github/workflows/rust.yml` 의 `--exclude test_utils` 가 **옛 크레이트 이름**이라 wasm32 셀이 깨진다
(★실측: 옛 이름 **rc=101** ↔ 새 이름 **rc=0**) ⑵`tests/test_class_format.rs`(PR #3)의 `"test_data/"` **4곳**.
★**둘 다 «우리 파일»이라 충돌이 «날 수가 없다»** — 개명 대응표를 그대로 적용했고 upstream 코드는 무접촉.
⇒ ★**이제 이 형태의 방향이 셋이다**: ⑴upstream 신규 파일 ⑵공용 API 변경 ⑶★**개명**.
★**⑶은 컴파일이 «절반만» 잡는다** — 경로 문자열은 런타임, CI 설정은 **CI 에서만** 드러난다.
- ★**`Cargo.lock` 하강을 차단했다**(계약6⒞가 «또» 잡았다): `--theirs`+build 가 `tracing` **0.1.44 → 0.1.41** ·
`tracing-subscriber` · `syn` 을 내렸다. ★**`tracing` 하강은 PR #4(언프리즈)를 되돌리는 것**이라
S5 와 같은 처방(`origin/main` lock 에서 재생성)으로 ★**내려간 것 0 · `tracing` 0.1.44 유지**.
- 후속 추천: ⑴**게이트③은 반드시 `--merge`**(등재 repo). ⑵★**behind 0 이 됐으므로 다음 동기 회차는
«upstream 이 움직일 때»다** — 정기 축이 필요하면 별건 판정. ⑶★**「우리 자산이 낡는」 축의 계약화**가
이제 **다섯 회차 미처분**이고, 이번에 **세 번째 방향(개명)**이 드러났다.

## [2026-09-04] upstream 동기 S7 — 컷 `ba5797b` 머지 + §5 서식에 «델타/누적» 축 (rustjava-upstream-sync-s7-and-fix-the-conflict-count-format)
- 무엇을: upstream `ba5797b`(#201 가상 디스패치 해석 · **1커밋** · 319파일 +20,118/−5,729)을 `--merge` 로
흡수하고 충돌 **1건**을 해소했다. 함께 ★**§5 「충돌 수」 정본 서식을
Expand Down
18 changes: 18 additions & 0 deletions STATE.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,6 +23,24 @@
(25번째 run, 앞선 24건 전부 red). **PR 대기 — 게이트③ 미착지.**

## 완료
- [rustjava-upstream-sync-s8-rename-sweep-decision] ★★**upstream 컷 `bd42427`(개명 스윕 · 12커밋) 머지 —
★★★`merge-base` `ba5797b` → `bd42427` · behind ★**12 → 0** · 부모 2개 ⇒ ★★**upstream 을 «완전히» 따라잡았다.**
착수 재측정(신 서식): **누적 8 · 델타 +8**(base `3fb08a8` · merge-base `ba5797b`) — 「재서 8 이었다」.
★**개명 대응표**(upstream 이력 실측 · A/D **0** · 전건 R): `java_runtime`→**`rustjava-runtime`**(2홉 · 379건 R079) ·
`test_data`→**`test-data`**(243 R083) · `jvm_rust`→`jvm-bytecode` · `java_class_proto`→`jvm-class-proto` ·
`java_constants`→`jvm-types` · `test_utils`→`test-utils`.
★★**modify/delete = «0건»** — 두려워한 형태가 안 나왔다. git 이 `CONFLICT (file location)`+`AU` 로
우리 고유 6건을 새 경로로 **이미 옮겨** 두고 이동 확인만 요구했다 ⇒ 처분 「간다」 전건 ·
★**`origin/main` 블롭 대조로 6건 «바이트 동일» 확인** · ★**픽스처 5 → 5**.
★★**개명이 «우리 자산 2건»을 낡게 만들었다(5회째 · 대상은 처음 — CI·경로)**:
`rust.yml` 의 `--exclude test_utils`(옛 크레이트명 ⇒ wasm32 셀 red · 실측 rc=101↔0) → `test-utils` ·
`tests/test_class_format.rs` 의 `"test_data/"` 4곳 → `test-data/`. ★둘 다 «우리 파일»이라 충돌이 날 수 없다.
★**`Cargo.lock` 하강 차단**: `--theirs`+build 가 `tracing` **0.1.44 → 0.1.41**(=PR #4 언프리즈 되돌림) ·
`tracing-subscriber`·`syn` 도 내렸다 ⇒ S5 처방(main lock 에서 재생성)으로 **내려간 것 0**.
green: stable 4종 + beta 2종 rc=0 · **554/0/1**(baseline 554 · 증감 0 이고 맞다 — upstream 도 547→547).
★게이트③ 완료: PR #24 — ★★**`--merge` 착지**(★`--squash` 아님 · 등재 repo). 머지커밋 sha 는 회신 `merged:` 참조.
★★★**이 착지가 «캠페인 종료»다 — 2026-08-16 착수 시 behind 33 → 오늘 «0».** S1~S8 컷 조상 8/8.
★**다음 동기는 «계획된 컷»이 아니라 «upstream 이 움직일 때»다** — 정기 축 여부는 별건 판정(워크로그 `proposals[1]`).
- [rustjava-upstream-sync-s7-and-fix-the-conflict-count-format] ★**upstream 컷 `ba5797b`(가상 디스패치 해석 ·
1커밋 · 319파일) 머지 — 충돌 1 해소** + ★**§5 「충돌 수」 정본 서식에 «델타/누적» 축을 넣었다.**
★**`merge-base` `95ebc5c` → `ba5797b` · behind 13 → 12 · 부모 2개** ⇒ ★★**계획 7회차(S1~S7) 완주.**
Expand Down
4 changes: 3 additions & 1 deletion classfile/Cargo.toml
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
[package]
name = "classfile"
description = "A no_std parser and validator for Java class files"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true

[dependencies]
nom = { workspace = true }

java_constants = { workspace = true }
jvm-types = { workspace = true }
2 changes: 1 addition & 1 deletion classfile/src/class.rs
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@ use nom::{
number::complete::{be_u16, be_u32},
};

use java_constants::ClassAccessFlags;
use jvm_types::ClassAccessFlags;

use crate::{
ClassFileError, attribute::AttributeInfo, constant_pool::ConstantPoolItem, field::FieldInfo, interface::parse_interface, method::MethodInfo,
Expand Down
2 changes: 1 addition & 1 deletion classfile/src/field.rs
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@ use nom::{
number::complete::be_u16,
};

use java_constants::FieldAccessFlags;
use jvm_types::FieldAccessFlags;

use crate::{attribute::AttributeInfo, constant_pool::ConstantPoolItem};

Expand Down
Loading