yuyang-ok opened issue #4232:
I want to test riscv64 backend, but the build is just to slow.
https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/docs/testing.mdcargo
root@debian:~/projects/wasmtime# cargo version
cargo 1.63.0-nightly (38472bc19 2022-05-31)
qemu
yuyang@yuyang-vmwarevirtualplatform:~/debian-rv64/artifacts$ qemu-system-riscv64 --version
QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
I don't know how to speed up the test.
cfallin commented on issue #4232:
Hi @yuyang-ok, for clarity, are you running the compiler (
cargo test
command) inside a RISC-V emulated virtual machine? Or are you using the qemu emulator just to run the compiled binary, after cross-compiling?There is some documentation here about how to cross-compile Wasmtime/Cranelift and set the right environment variables so that
cargo test
running on your native system can invoke just the test binaries under emulation.That said, this isn't really an issue with Wasmtime -- emulation is known to be slow, and it's kind of a fundamental downside of the approach compared to native hardware -- so I'm going to close this issue now.
cfallin closed issue #4232:
I want to test riscv64 backend, but the build is just to slow.
https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/docs/testing.mdcargo
root@debian:~/projects/wasmtime# cargo version
cargo 1.63.0-nightly (38472bc19 2022-05-31)
qemu
yuyang@yuyang-vmwarevirtualplatform:~/debian-rv64/artifacts$ qemu-system-riscv64 --version
QEMU emulator version 6.2.0 (Debian 1:6.2+dfsg-2ubuntu6)
Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
I don't know how to speed up the test.
yuyang-ok commented on issue #4232:
I am just running the compiler (cargo test command) inside a RISC-V emulated.
alexcrichton commented on issue #4232:
One other thing to watch out for when running Wasmtime tests is that Wasmtime makes very large virtual address space reservations by default and if emulation doesn't do the right thing then this can be excessively slow. We do some tricks in CI to make this faster which if you're trying to run in emulation you may be interested in mirroring.
Last updated: Dec 23 2024 at 12:05 UTC