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

base16ct-1.0.0-transcript.txt · 28 lines · 1.2 KBText Blame HistoryRaw
Scaffold rustnim: Rust->Nim transpiler, type mapping 1a218c2 nandi 17h ago1Crate: base16ct 1.0.0 (crates.io), 613 LOC, pure Rust, no_std
2Command: r2many transpile -from rust -to nim <file>.rs -o <file>.nim
3Build: CGO_ENABLED=0 go build ./cmd/r2many (succeeds)
4
5src/lib.rs unmatched delimiter ")" at 3346 -> no file written
6src/error.rs unterminated string at 411 -> no file written
7src/display.rs unmatched delimiter ")" at 174 -> no file written
8src/lower.rs unmatched delimiter ")" at 815 -> no file written
9src/upper.rs unmatched delimiter "(" at 817 -> no file written
10src/mixed.rs <no error, exit 0> -> mixed.nim (see below)
11
12Every failing offset lands on a lifetime:
13 error.rs:411 fmt::Formatter<'_>
14 display.rs:174 pub struct HexDisplay<'a>(pub &'a [u8]);
15 lower.rs:815 pub fn encode<'a>(src: &[u8], dst: &'a mut [u8])
16
17mixed.rs contains three functions (decode, decode_vec, decode_nibble).
18The complete emitted Nim program was:
19
20 {
21 }
22
23Flag behaviour on the same input:
24 -native -> strict native frontend for "rust" is not implemented
25 -no-runtime -> 1/1 translations failed: [{nim DIRECT_NATIVE_UNAVAILABLE (stage=direct)}]
26 (default) -> exit 0, empty program written
27
28Control: R -> Nim on the project's original source language does emit real code.