nandi/rustnimpublic Fork 0
1a218c2a103c5c2dec0bdbf9b197a7265bfa8e8b
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.

Scaffold rustnim: Rust->Nim transpiler, type mapping 1a218c2 · on 1a218c2a103c5c2dec0bdbf9b197a7265bfa8e8b · nandi · 8h ago
repro.sh · 35 lines · 1.2 KBBash Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env bash
# Reproduce every finding. Requires Go 1.26+ and network access.
set -u
here=$(cd "$(dirname "$0")" && pwd)
work=${1:-$here/.work}
mkdir -p "$work" && cd "$work"

[ -d Code-Transpiler ] || git clone --depth 1 https://github.com/tarekwasfy01/Code-Transpiler
cd Code-Transpiler
export TMPDIR=$PWD/.tmp && mkdir -p .tmp

echo "=== Building CLI ==="
CGO_ENABLED=0 go build -o "$work/r2many" ./cmd/r2many || exit 1

echo
echo "=== CLI: rust -> nim (exit code, then stderr tail) ==="
for f in "$here"/cases/*.rs; do
  out=$work/$(basename "$f" .rs).nim
  rm -f "$out"
  msg=$("$work/r2many" transpile -from rust -to nim "$f" -o "$out" 2>&1)
  code=$?
  printf '%-24s exit=%s  %s' "$(basename "$f")" "$code" "$(printf '%s' "$msg" | tail -1)"
  [ -n "$msg" ] || printf '<no error>'
  if [ -f "$out" ]; then printf '       emitted: %s' "$(tr -s '\n' ' ' < "$out")"; fi
  printf '\n'
done

echo
echo "=== Frontend prober: UAST node kinds actually produced ==="
mkdir -p cmd/dbg && cp "$here/prober/main.go" cmd/dbg/main.go
for f in "$here"/cases/*.rs; do
  printf '%-24s ' "$(basename "$f")"; go run ./cmd/dbg rust "$f" 2>&1 | tail -1
done
printf '%-24s ' "05-equivalent.R"
go run ./cmd/dbg r "$here/cases/05-equivalent.R" 2>&1 | tail -1