This repository translates 46 selected files in the size-ranked Rust/TypeScript sources of
l0ng-ai/openidea at commit
37e2e250e935cbf0f8db9d00535bae027d5045f3
to native V. The exact selected sources and ranks are listed below.
Together they contain 129,714 source lines. Their native modules are
bindings, agentmanager, pluginapi, lspmanager, maven, pluginhost,
windowmanager, sdkapply, projecthost, withost, lsphost, pluginruntime,
vcscommands, coresettings, dapmanager, tomcatrun, vcsrepo, dbmanager,
vfswatch, vcswrite, sdkhost, sdkdiscover, dbconn, jdtls, dbsql,
gradlemodel, childprocess, languageregistry, runimport, toolregistry,
gitcli, pluginsandbox, javacbuild, toolsmanager, javacompile, agentworktree, pluginsdk, javasdk, workspacesettings, pluginuipoints, agentmemory, dbclickhouse, agenthost.
All require v -ownership. Browser-only WebKit/WebView2 setup from rank 7
is explicitly excluded under the native ui2 requirement; its original comments
remain in the audit. Imported modules that have not been ported have explicit
native dependency interfaces and placeholders. A functioning full IDE still
requires those integrations and the remaining source files.
Coverage against the pinned top100.txt ranking:
| Measure | Represented by the completed ports | Share |
|---|---|---|
| All ranked files | 46 / 100 | 46.0% |
| Rust files in the ranking | 45 / 72 | 62.5% |
| All ranked source lines | 129,714 / 224,607 | 57.8% |
| Rust source lines in the ranking | 113,238 / 157,086 | 72.1% |
These figures measure source translation coverage. They do not measure end-to-end IDE readiness: the documented imported-service integrations, native UI work and remaining files are separate work. Reviewed browser-only exclusions remain recorded in the source maps.
top100.txt contains exactly 100 tab-separated records:
rank bytes lines upstream-relative-path
Files are sorted by byte size descending, with path ascending to break ties.
Git-tracked .rs, .ts, .tsx, .mts, and .cts files are eligible,
including generated files and declarations. Tests are excluded, together
with test fixtures, mocks, doctest helpers, benchmarks, and evaluation/smoke
harnesses. The pinned checkout has 2,886 eligible files after excluding
2,155 test/support files from the original 5,041 sources. The translated ranked files are:
| Rank | Bytes | Lines | Source |
|---|---|---|---|
| 1 | 792,845 | 16,476 | src/bindings.ts |
| 2 | 290,104 | 6,716 | crates/ide-agent/src/lib.rs |
| 3 | 252,503 | 5,788 | crates/ide-host/src/plugins/api.rs |
| 4 | 212,297 | 4,788 | crates/ide-lsp/src/lib.rs |
| 5 | 198,141 | 4,518 | crates/ide-build/src/maven.rs |
| 6 | 170,331 | 4,027 | crates/ide-host/src/plugins/mod.rs |
| 7 | 159,712 | 3,761 | src-tauri/src/windows.rs |
| 8 | 158,693 | 3,291 | crates/ide-sdk/src/apply.rs |
| 9 | 143,150 | 3,044 | crates/ide-host/src/project.rs |
| 10 | 140,911 | 3,454 | crates/ide-plugin/src/wit_host.rs |
| 11 | 136,988 | 3,330 | crates/ide-host/src/ops/lsp.rs |
| 12 | 136,203 | 3,154 | crates/ide-plugin/src/runtime.rs |
| 13 | 123,955 | 3,450 | crates/ide-host/src/ops/vcs/commands.rs |
| 14 | 120,074 | 2,792 | crates/ide-core/src/settings.rs |
| 15 | 114,616 | 2,618 | crates/ide-dap/src/lib.rs |
| 16 | 113,839 | 2,420 | crates/ide-run/src/tomcat.rs |
| 19 | 111,110 | 2,723 | crates/ide-vcs/src/lib.rs |
| 20 | 109,734 | 2,527 | crates/ide-db/src/lib.rs |
| 21 | 109,640 | 2,347 | crates/ide-vfs/src/watch.rs |
| 22 | 108,916 | 2,622 | crates/ide-vcs/src/write.rs |
| 24 | 98,150 | 2,424 | sdk/rust/openidea-plugin/src/host.rs |
| 25 | 93,390 | 2,103 | crates/ide-sdk/src/discover.rs |
| 26 | 92,295 | 2,202 | crates/ide-db/src/conn.rs |
| 27 | 91,685 | 1,941 | crates/ide-lsp/src/jdtls.rs |
| 28 | 91,422 | 2,165 | crates/ide-build/src/compile/mod.rs |
| 31 | 87,914 | 1,981 | crates/ide-tools/src/lib.rs |
| 33 | 87,285 | 1,947 | crates/ide-agent/src/worktree.rs |
| 34 | 87,182 | 1,870 | crates/ide-sdk/src/java.rs |
| 35 | 85,061 | 1,789 | crates/ide-workspace/src/settings.rs |
| 36 | 84,912 | 1,568 | crates/ide-db/src/sql.rs |
| 39 | 83,459 | 1,836 | sdk/rust/openidea-plugin/src/lib.rs |
| 40 | 81,973 | 1,878 | crates/ide-host/src/plugins/ui_points.rs |
| 41 | 81,948 | 2,039 | crates/ide-agent/src/memory.rs |
| 42 | 81,004 | 1,741 | crates/ide-db/src/clickhouse.rs |
| 43 | 80,737 | 2,070 | crates/ide-host/src/ops/agent.rs |
| 57 | 72,606 | 1,746 | crates/ide-lsp/src/convert.rs |
| 60 | 71,467 | 1,751 | crates/ide-build/src/gradle.rs |
| 65 | 69,109 | 1,561 | crates/ide-core/src/process.rs |
| 67 | 68,963 | 1,525 | crates/ide-language/src/registry.rs |
| 69 | 68,395 | 1,520 | crates/ide-agent/src/skills.rs |
| 75 | 66,105 | 1,414 | crates/ide-run/src/import/jetbrains.rs |
| 80 | 63,271 | 1,598 | crates/ide-tools/src/registry.rs |
| 87 | 59,267 | 1,442 | crates/ide-lsp/src/server.rs |
| 89 | 57,295 | 1,445 | crates/ide-vcs/src/cli.rs |
| 94 | 55,716 | 1,205 | crates/ide-plugin/src/sandbox.rs |
| 97 | 54,988 | 1,107 | crates/ide-build/src/compile/single.rs |
The exclusion rules are recorded in source.json and enforced by both the
ranker and the independent auditor. They use exact directory, filename, and
helper-path rules. Production test-running features and files with embedded
Rust unit tests remain eligible; the word test alone does not exclude a file.
To regenerate the ranking from the same pinned checkout:
python3 scripts/rank_sources.py /path/to/openidea-upstreamsource.json records the commit, file hash, size, and ranking
rules. reference/bindings.ts is an unchanged snapshot
for repeatable generation and independent audits.
| File | Responsibility |
|---|---|
bindings/commands.v |
All 963 typed native command methods and the error-envelope logic |
bindings/types.v |
All 1,304 exported source types, plus named inline records and variants |
bindings/types_codec.v |
Explicit JSON encoders and decoders for the exact wire shapes |
bindings/runtime.v |
Native host interface, missing-module placeholder, ownership containers, typed event channels, and async scheduling |
bindings/source_comments.v |
Every one of the 4,011 original comments, in source order |
translation.json |
Source-to-V type and command inventory |
cmd/check_bindings |
Executable ownership-build smoke check |
cmd/openidea |
Optional native demonstration using the real V ui2 module |
agentmanager/ |
Agent lifecycle, persistence, sessions, permissions and VCS from rank 2, plus skill discovery, policy and staging from rank 69 |
pluginapi/ |
Plugin host/workspace API, storage/secrets, process streaming, prompts, events and native UI boundaries from rank 3 |
lspmanager/ |
Language server/document lifecycle, merged requests, navigation, virtual documents and reconfiguration from rank 4, plus protocol conversion and server state from ranks 57 and 87 |
maven/ |
POM parsing, parent/BOM/property resolution, reactor discovery, plugin goals, dependency trees and navigation from rank 5 |
pluginhost/ |
Plugin discovery, consent, installation, activation, actor calls, events, crash recovery and native UI data from rank 6 |
windowmanager/ |
Project and auxiliary-window launch routing, lifecycle, geometry, focus and coordinated close from rank 7, using native ui2 service boundaries |
sdkapply/ |
Interpreter/toolchain selection, language-server settings, Maven/Gradle policy, run configuration and shell activation from rank 8 |
projecthost/ |
Project construction, roots, repository routing, document observers, settings and filesystem-event coordination from rank 9 |
withost/ |
WIT host imports, capability checks, resource lifetimes, task budgets, projects, files, transports and native UI data from rank 10 |
lsphost/ |
LSP request lifecycle, completions, navigation, rename and code-action edits, formatter execution and project confinement from rank 11 |
pluginruntime/ |
Plugin engine/store lifecycle, component caching and linking, call budgets, cancellation, provider conversions and view data from rank 12 |
vcscommands/ |
Repository and external-log routing, remote and history operations, patch and shelf coordination, cancellation and command trust policy from rank 13 |
coresettings/ |
Complete settings data and defaults, strict JSON codecs, tolerant field readers, theme migration, tool and formatter lookup, Maven options and project exclusions from rank 14 |
dapmanager/ |
Debugger launch and configuration, owner-scoped breakpoints, session lifecycle and cancellation, stack and variable requests, stepping, memory and JVM service coordination from rank 15 |
tomcatrun/ |
Tomcat installation discovery, isolated runtime preparation, XML configuration, WAR deployment and incremental updates from rank 16 |
vcsrepo/ |
Repository facade, execution scopes, signature caching, patch and conflict coordination, and typed Git dependency boundaries from rank 19 |
dbmanager/ |
Database source and credential management, catalog conversion, query routing, cursors and transaction coordination from rank 20 |
vfswatch/ |
Debounced filesystem events, rule invalidation, directory registration, Linux inotify and polling fallback from rank 21 |
vcswrite/ |
Index and commit writes, partial selections, branch receipts, blame, merge/rebase, stash and push coordination from rank 22 |
sdkhost/ |
Plugin-facing SDK host APIs, typed ABI conversions, editor selection retries, settings, resource ownership and stream transfer from rank 24 |
dbconn/ |
Connection setup and pooling, paged row decoding, cancellation, session context and transaction coordination from rank 26 |
jdtls/ |
Java server configuration, launch classpaths, build coordination, diagnostic scoping and debugger setup from rank 27 |
sdkdiscover/ |
Installed interpreter and toolchain discovery, environment naming, ordered native probes and project pin preference from rank 25 |
dbsql/ |
Dialect-specific database catalog queries, completion, pagination, row edits and DDL from rank 36 |
gradlemodel/ |
Gradle build discovery, project linkage, script parsing and sync model data from rank 60 |
childprocess/ |
Child environments, executable detection, Unix process groups and Windows process trees and jobs from rank 65 |
languageregistry/ |
Embedded language definitions, file type detection, framework markers, and the revisioned plugin language overlay from rank 67 |
runimport/ |
JetBrains run-configuration discovery, conversion and diagnostics from rank 75 |
toolregistry/ |
Installable tool declarations, release asset selection, fallback methods and bundled artifacts from rank 80 |
gitcli/ |
Git command preparation, cancellation, binary capture, streaming, index handling and path batching from rank 89 |
pluginsandbox/ |
Plugin filesystem capability checks, project path confinement, and bounded reads from rank 94 |
javacbuild/ |
Single-file Java compilation plans and classpath resolution for Maven and Gradle from rank 97 |
toolsmanager/ |
Managed-tool discovery, joined installations, installer command planning, verified downloads and uninstall coordination from rank 31 |
javacompile/ |
Build-system detection and planning, cancellable execution, diagnostic coordinates and launch-build coordination from rank 28 |
agentworktree/ |
Agent worktree lifecycle, nested-repository changes, guarded acceptance, saved snapshots and turn rollback from rank 33 |
pluginsdk/ |
Native plugin traits, retained registration, typed export dispatch and plugin API boundary conversions from rank 39 |
javasdk/ |
Installed JDK discovery and probe caches, JDTLS runtime configuration, plugin bundles and JUnit selection from rank 34 |
workspacesettings/ |
Layered defaults, user and project settings; comment-preserving TOML edits; locale initialization; settings bundles and JetBrains imports from rank 35 |
pluginuipoints/ |
Plugin contribution validation, ordered typed settings schemas, API and capability gates, and view, editor, asset and locale metadata from rank 40 |
agentmemory/ |
Instruction, rule and auto-memory discovery; workspace trust and policy resolution; provider delivery staging; memory creation, promotion, deletion and reset from rank 41 |
dbclickhouse/ |
ClickHouse session setup, request construction, bounded streaming row decoding, cancellation, error handling and workspace reads from rank 42 |
agenthost/ |
Agent command routing, trust checks, login sessions, provider operations, task coordination, memory and skill host APIs from rank 43 |
rust_ports.json |
Exact Rust function/declaration/comment inventory and source provenance |
translation.json in each Rust module and agentmanager/agentskills_translation.json |
Source-to-V function mappings, reviewed browser-only exclusions and external placeholders |
Each Rust module’s cmd/check_<module> |
Native ownership build entry points |
The binding port includes the 894 typedError command wrappers, the
69 direct invocations, original command names, original argument keys, channel
parameters, and the typedError success/rejection/native-failure distinction.
Comments remain in English, as in the original; relevant comments also appear
beside generated V declarations. The complete comment ledger includes upstream
TypeScript generation directives as documentation, not executable V directives.
Rank 2 contains 260 named functions (256 bodies and four abstract trait methods);
rank 3 contains 354 (345 bodies and nine abstract methods). Their complete V
comment ledgers preserve all 524 and 310 source comments. Dedicated test files
remain excluded from top100.txt; embedded tests inside each selected
implementation remain part of its translation and audit. Ranks 4–6 add 515
function bodies and 1,089 comments. Ranks 7–9 add 470 named functions and 967
comments. Ranks 10–12 add 605 named functions/signatures and 518 comments.
The completed ports at ranks 13, 14, 15 add 359 named functions and
931 comments. Ranks 36, 67 and 80 add 136 named functions and 232 comments. Ranks
60, 94 and 97 add 182 functions and 315 comments. Ranks 65 and 69 add 154
functions and 354 comments. Ranks 75 and 89 add 148 functions and 242 comments.
Ranks 57 and 87 add 180 functions and 193 comments. Ranks 16, 19 and 20 add 368
functions and 675 comments. Ranks 21, 22 and 24 add 560 function bodies and 745 comments.
Ranks 25, 26, 27 add 301 function bodies and 447 comments.
Rank 31 adds 86 function bodies and 189 comments.
Rank 28 adds 81 function bodies and 113 comments.
Rank 33 adds 89 function bodies and 175 comments.
Rank 39 adds 108 named functions/signatures and 77 comments.
Rank 34 adds 87 named functions/signatures and 159 comments.
Rank 35 adds 68 function bodies and 108 comments.
Rank 40 adds 61 function bodies and 171 comments.
Rank 41 adds 64 function bodies and 79 comments.
Rank 42 adds 67 function bodies and 22 comments.
Rank 43 adds 114 function bodies and 141 comments.
The Rust inventory contains
5,417 named functions/signatures and 8,776 comments.
Twelve browser-only functions/tests
from rank 7 are documented UI exclusions; they are not counted as translated
bodies. Four WebKit-only helper declarations are excluded on the same basis.
The implementations use real sync.arc.Arc/Weak, locks or owned channel state,
explicit borrows, and resource cleanup. Native subprocesses and socket probes
do not depend on a Rust runtime. UI operations produce native typed events for
the V ui2 integration. No browser UI or HTML renderer is introduced.
See RUST_PORTS.md for the scope, dependency boundaries, source mapping, and regression checks, and RUST_VALIDATION.md for the observed build, runtime and ownership results. To build and verify the new modules:
make rust-build V=/path/to/v VFLAGS='-cc gcc'
make rust-test V=/path/to/v VFLAGS='-cc gcc'
make rust-ownership-check V=/path/to/v VFLAGS='-cc gcc'
make rust-auditrust-build compiles all functions with -ownership -no-skip-unused, then
runs all registered native smoke programs. rust-test discovers native test files in
all registered Rust modules. rust-ownership-check requires positive fixtures to run and checks
specific rejection diagnostics for ownership violations. The reports and native
build logs are written to the ignored bin/rust_ports directory.
Two returned-borrow inference probes are reported separately as known compiler
limitations; see OWNERSHIP.md.
The port uses V structs, enums, sum types, aliases, arrays and maps. It does not
replace the entire API with untyped JSON. Original unknown fields use
json2.Any, where the source intentionally permits arbitrary JSON.
The codecs preserve camelCase and quoted property names, string discriminants,
heterogeneous tuples as JSON arrays, and serialize/deserialize distinctions.
Optional never properties in Specta intersections become forbidden-property
validation. Literal unions are checked, and invalid tuple lengths are rejected.
Where union variants overlap, the decoder prefers an exact structural round
trip and otherwise the variant retaining the most input structure.
NullableString, for example, means explicit JSON null or a string.
OptionalNullableString means an omitted property, explicit null, or a string.
The generator emits concrete containers for each payload type. Their payloads
are safely boxed in zero-or-one-element owned arrays, avoiding recursive DTO
cycles and nested-generic code-generation defects in the current V compiler.
Use the generated make_nullable_string(value) and
make_optional_nullable_string(value) constructors; a populated container has
value.len == 1. Other payload types have equivalent generated constructors.
TypeScript number remains V f64, including numeric ID aliases, so the
translation preserves the source's JavaScript number semantics instead of
guessing underlying Rust integer widths.
Host.invoke is the replacement boundary for the imported Tauri invoke.
MissingHost implements that boundary and returns an explicit
native host command "…" is not translated yet error for every command.
The missing native modules are not silently simulated with successful defaults.
Supply a Host implementation as each corresponding module is translated.
An invocation can produce:
CallResult[T]{status: .ok, data: …}for a successful wrapped command.CallResult[T]{status: .error, error: …, raw_error: …}for a typed IDE rejection. The raw rejection is always retained, even if it is not a validIdeError, matching the source helper'sas anybehavior.- A V
!error for a native/transport failure, corresponding to a thrown JavaScriptError.
Direct commands return !T without a CallResult envelope. A rejected JSON
value is retained in RejectedValueError.
Commands use a synchronous native boundary. spawn_call[T] schedules a call on
a V worker and returns thread !T; .wait() or { return err } retrieves its
result inside a fallible function while retaining ownership tracking. Transfer a
worker's host/client into its closure and keep blocking work off the ui2 event
thread. No browser, JavaScript runtime, Promise polyfill or webview is used.
Channel[T] retains the typed callback and serializes its original channel
marker. Commands register their channels with Commands.channels; the native
host delivers events with dispatch(id, &json_value). Call unregister(id) when
a subscription ends. Unknown or closed channels return an explicit error.
Use a current V compiler with -ownership, apostrophe lifetime syntax, and
json2. The current checkout was validated with V 0.5.2 at
675daad7e308485b49b6dee6b499df8dc628dcc0.
make build V=/path/to/v
./bin/check_bindings
make test V=/path/to/v
make ownership-check V=/path/to/v
make check-all V=/path/to/v VFLAGS="-cc gcc" # emit and link all wrappers/codecsEquivalent core build:
v -ownership -o bin/check_bindings cmd/check_bindingsThe selected source is TypeScript generated from Rust interfaces. There are no
Rust implementation bodies in this first file to translate. The V port still
uses actual ownership checking: command arguments and replies own their data,
codecs borrow through &T, copied JSON data is cloned explicitly, and registered
callbacks own their endpoints. No ownership checks are disabled in the port.
Importing the bindings without ownership mode now fails at compile time. The
ownership-check target checks the actual API:
valid clones and borrows must compile and run; reusing moved command arguments,
aggregates or decoded results, moving a borrowed value, and compiling without
ownership mode must fail with the expected diagnostic.
Generated decoders and channel delivery use explicit or { return err } error
handling to retain move tracking for fallible strings, arrays and maps. Use an
explicit or { ... } branch at calling sites too. The validated V revision's
! shorthand has an upstream ownership-inference limitation; the contract suite
keeps and reports three reproducers. The supported calling form and the
limitation are documented in the ownership notes.
See OWNERSHIP.md for the concrete ownership mapping and its
comparison with the V ownership guide.
The optional demo imports the real
vlang/ui2 module. It displays translation status
using native labels, not HTML. Install ui2 and build separately:
git clone --depth 1 https://github.com/vlang/ui2 /path/to/ui2
ln -s /path/to/ui2 ~/.vmodules/ui2
make ui-check V=/path/to/v
make ui V=/path/to/v
./bin/openideaAt ui2 commit
066b1e95295d9d72004bf7bdf9b95d35afe9b390,
the native demo passes ordinary V type checking. Full native linking requires
Linux X11/OpenGL/EGL development dependencies, which were absent in the build
environment. The current upstream ui2 module also reports ownership errors;
therefore it is excluded from the ownership-checked API build and uses a
separate ordinary V build target. Neither ui2 nor the compiler was patched to
hide these limitations.
Node and TypeScript are development-only dependencies for the translation generator and audit. They are not used by the compiled native code.
npm ci
make generate V=/path/to/v
make auditThe generator fails on unsupported TypeScript syntax. The independent auditor
parses both source and generated declarations and checks all command signatures,
wire names, argument keys and values, type coverage, source hash, ranking, and
the complete comment inventory. Executable regression tests cover runtime and
codec behavior; see VALIDATION.md for the observed results.
Apache-2.0, retaining the upstream LICENSE and NOTICE.
Generated V files prominently identify the translation and source commit.
The upstream third-party notice inventory is retained in
THIRD_PARTY_LICENSES.md; the IDE's assets and
third-party application dependencies are not bundled by this first-file port.