bytecodealliance / bytecodealliance/sightglass

Native benchmarks rely on hard-coded path

Open
#259 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
WebAssembly
Stars
88
Forks
37
Avg merge
5h 5m
Merged PRs (30d)
1

Description

When running a native benchmark that is not named `benchmark.so`, the native engine will fail due to this hard-coded address:

https://github.com/bytecodealliance/sightglass/blob/04546548e60dcce4b6691f8ddb75442c4d251ad9/engines/native/libengine/src/lib.rs#L285

Previously this was just a paper cut, only affecting in-development benchmarks (one would expect the native engine to open `your-benchmark-path.so` but it would not) but now that multiple benchmarks can live in a single directory, the path given to the `sightglass-cli benchmark` command should be the one communicated to the native engine. (Some thoughts: (a) add a new field to the `WasmBenchConfig` passed in to the native engine in `wasm_bench_create`, (b) hack the `wasm_bytes` passed to `wasm_bench_compile` to contain something like `NATIVE_PATH###/path/passed/to/sightglass.so` instead of the bytes of the shared library, which are useless.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.