When running a native benchmark that is not named benchmark.so, the native engine will fail due to this hard-coded address:
|
let native_lib = self.working_dir.join("./benchmark.so"); |
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.)
When running a native benchmark that is not named
benchmark.so, the native engine will fail due to this hard-coded address:sightglass/engines/native/libengine/src/lib.rs
Line 285 in 0454654
Previously this was just a paper cut, only affecting in-development benchmarks (one would expect the native engine to open
your-benchmark-path.sobut it would not) but now that multiple benchmarks can live in a single directory, the path given to thesightglass-cli benchmarkcommand should be the one communicated to the native engine. (Some thoughts: (a) add a new field to theWasmBenchConfigpassed in to the native engine inwasm_bench_create, (b) hack thewasm_bytespassed towasm_bench_compileto contain something likeNATIVE_PATH###/path/passed/to/sightglass.soinstead of the bytes of the shared library, which are useless.)