Closed xander42280 closed 3 months ago
my hello_world.go
package main import ( "fmt" "os" "strconv" ) func main() { fmt.Printf("%#v\n", os.Args) if len(os.Args) < 2 { fmt.Printf("input a, b\n") return } a, _ := strconv.Atoi(os.Args[0]) b, _ := strconv.Atoi(os.Args[1]) result := a * b fmt.Printf("result %d\n", result) }
GOOS=linux GOARCH=mips GOMIPS=softfloat go build -o hello_world_mips1.22 hello_world.go
run example:
ubuntu@ip-172-31-0-75:/mnt/data/xander/zkm$ BASEDIR=test-vectors RUST_LOG=info ELF_PATH=/mnt/data/xander/test/test_proof/hello_world_mips1.22 SEG_OUTPUT=/tmp/output SEG_SIZE=262144 ARGS="123456 321" cargo run --release --example zkmips split warning: both `/home/ubuntu/.cargo/config` and `/home/ubuntu/.cargo/config.toml` exist. Using `/home/ubuntu/.cargo/config` Finished `release` profile [optimized] target(s) in 0.25s Running `target/release/examples/zkmips split` runtime: unexpected error while checking standard file descriptor 0, errno=-1 fatal error: cannot open standard fds runtime stack: runtime.throw({0xe8140, 0x18}) /usr/local/go/src/runtime/panic.go:1023 +0x54 fp=0x7fffcf78 sp=0x7fffcf64 pc=0x56310 runtime.checkfds() /usr/local/go/src/runtime/fds_unix.go:34 +0x330 fp=0x7fffcfac sp=0x7fffcf78 pc=0x1ab5c runtime.schedinit() /usr/local/go/src/runtime/proc.go:803 +0x278 fp=0x7fffcff0 sp=0x7fffcfac pc=0x5b8b4 runtime.rt0_go() /usr/local/go/src/runtime/asm_mipsx.s:62 +0xac fp=0x7fffd000 sp=0x7fffcff0 pc=0x95cb8 [2024-06-04T10:58:45Z INFO zkmips] Split done
my hello_world.go
run example: