nandi/rustnimpublic Fork 0
ae9f986fc43d0fc9ab029946e2c7a25cdc72b4ed
Commits
Clone
git clone https://git.rickub.com/nandi/rustnim.git
git clone ssh://git@rickub.com/nandi/rustnim.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

repro.sh · 35 lines · 1.2 KBBash Blame HistoryRaw
Scaffold rustnim: Rust->Nim transpiler, type mapping 1a218c2 nandi 15h ago1#!/usr/bin/env bash
2# Reproduce every finding. Requires Go 1.26+ and network access.
3set -u
4here=$(cd "$(dirname "$0")" && pwd)
5work=${1:-$here/.work}
6mkdir -p "$work" && cd "$work"
7
8[ -d Code-Transpiler ] || git clone --depth 1 https://github.com/tarekwasfy01/Code-Transpiler
9cd Code-Transpiler
10export TMPDIR=$PWD/.tmp && mkdir -p .tmp
11
12echo "=== Building CLI ==="
13CGO_ENABLED=0 go build -o "$work/r2many" ./cmd/r2many || exit 1
14
15echo
16echo "=== CLI: rust -> nim (exit code, then stderr tail) ==="
17for f in "$here"/cases/*.rs; do
18 out=$work/$(basename "$f" .rs).nim
19 rm -f "$out"
20 msg=$("$work/r2many" transpile -from rust -to nim "$f" -o "$out" 2>&1)
21 code=$?
22 printf '%-24s exit=%s %s' "$(basename "$f")" "$code" "$(printf '%s' "$msg" | tail -1)"
23 [ -n "$msg" ] || printf '<no error>'
24 if [ -f "$out" ]; then printf ' emitted: %s' "$(tr -s '\n' ' ' < "$out")"; fi
25 printf '\n'
26done
27
28echo
29echo "=== Frontend prober: UAST node kinds actually produced ==="
30mkdir -p cmd/dbg && cp "$here/prober/main.go" cmd/dbg/main.go
31for f in "$here"/cases/*.rs; do
32 printf '%-24s ' "$(basename "$f")"; go run ./cmd/dbg rust "$f" 2>&1 | tail -1
33done
34printf '%-24s ' "05-equivalent.R"
35go run ./cmd/dbg r "$here/cases/05-equivalent.R" 2>&1 | tail -1