code-transpiler 0.1.0

Pure-Rust incremental port of the Code-Transpiler semantic/UAST engine
Documentation
  • Coverage
  • 1.17%
    5 out of 427 items documented0 out of 10 items with examples
  • Size
  • Source code size: 263.9 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.6 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 8s Average build duration of successful builds.
  • all releases: 8s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • tarekwasfy01/Code-Transpiler
    7 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • tarekwasfy01

code-transpiler

A pure-Rust, dependency-light incremental port of Code-Transpiler. It contains no Go fallback, DLL, bundled external compiler, or r2many process.

What works now

Native source frontends:

  • Go
  • Julia
  • typed Python subset
  • Semantic Exchange (SE/1) as an interchange input

Native output targets currently exposed by the route matrix:

  • Rust
  • Python
  • Julia
  • C
  • C++
  • Semantic Exchange (SE/1)

Not every source supports every target yet. The GUI only enables routes that are actually implemented.

Semantic Exchange

Select Semantic Exchange (alias se) as the target to get a deterministic SE/1 document containing semantic JSON and a canonical Julia pivot. SE can be fed back into the transpiler and emitted to Rust/Python/Julia/C/C++.

Example:

code-transpiler transpile go se input.go program.se
code-transpiler transpile se rust program.se output.rs

GUI

cargo run -- gui 8765

Open http://127.0.0.1:8765/.

The GUI is fully English. All known source languages remain visible, but the target selector only enables native routes for the selected source. Go, Julia, Python and Semantic Exchange currently have outbound native routes.

Verification

v7 was verified with Rust 1.98.1 x86_64:

  • 29/29 tests passed
  • cargo clippy --all-targets --all-features -- -D warnings passed
  • cargo fmt --check passed
  • end-to-end generated Rust executables were run for Julia, Python and SE input
  • cargo package verified the publishable crate

See VERIFIED_BUILD.md and PORTING_STATUS.md.