Skip to content

Add support to DotNet - #14

Closed
buzzer-re wants to merge 4 commits into
mainfrom
dev
Closed

buzzer-re wants to merge 4 commits into
mainfrom
dev

Conversation

@buzzer-re

Copy link
Copy Markdown
Owner

No description provided.

buzzer-re and others added 4 commits September 20, 2026 20:19
Add the MIT LICENSE file and ship it in the wheel, fill in authors, URLs,
keywords, and classifiers, and read the version from tocode.__version__
so it is defined once. `uv build` produces an sdist and a wheel that pass
`twine check`; the wheel contains only the tocode package.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The PyPI distribution is tocode-cli; assert the installed command stays
`tocode` so a rename cannot slip through.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`tocode App.dll` (also .exe, apphost launchers, single-file bundles, and
.nupkg packages, detected by content) now exports managed code without
dnSpy/ILSpy installed: dnlib and ICSharpCode.Decompiler (MIT, vendored in
backends/dotnet_lib with provenance) are loaded through pythonnet, so only
a .NET 9+ runtime is needed.

- src/raw/<Assembly>/<Namespace>/.../<Type>.cs per top-level type, with a
  matching .il that keeps the bytecode (RVA, raw bytes, metadata tokens),
  plus Properties/AssemblyInfo.cs, Manifest.il, and a .csproj per assembly.
- Per-method C# and IL line ranges; lambdas, local functions, and
  async/iterator state machines are linked to the method that owns them.
- assemblies.json, types.json, functions.json, function-index.json,
  strings.json (user strings with ldstr xrefs), imports.json
  (cross-assembly members and P/Invoke), exports.json, reachable.json,
  namespace-graph.json, resources.json (+ decoded .resources),
  container.json, and triage.json.
- Native code (mixed-mode images, bundled native libraries, P/Invoke
  targets next to the input) goes through the native runner like APK .so
  files; framework/runtime parts of bundles and packages are listed but
  only decompiled with --include-framework. --as-native keeps the old path.
- PE/CLR/bundle parsing and the IL token scan are pure Python (validated
  against dnlib on every opcode); decompilation runs in recycled worker
  processes and a crashing or hanging type fails alone.

The native memory floor is now TOCODE_NATIVE_MIN_FREE_MB (the APK name
still works) and the waiting state shows in the heartbeat.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NativeAOT symbols (mangled generic instantiations) and long C++ template
names exceed the 255-byte path component limit, so exporting a NativeAOT
binary crashed while writing the checkpoint record of a cluster named after
such a function. Names longer than 120 characters are now truncated and
suffixed with a short hash so they stay unique.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@buzzer-re buzzer-re closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant