Kobzol / cargo-pgo

Cargo subcommand for optimizing Rust binaries/libraries with PGO and BOLT.
MIT License
563 stars 11 forks source link

Does not allow for optimizations for WASM targets #42

Closed GeeWee closed 10 months ago

GeeWee commented 10 months ago

I have a WASM server-side project I'd love to try out PGO on. Unfortunately it does not seem to work. E.g. running the command

cargo pgo instrument build -- --bin my-binary--release --target wasm32-wasi

results in the error

error[E0463]: can't find crate for `profiler_builtins`

however, the same command without the --target does not provoke the same error.

I do not necessarily think this is anything cargo-pgo can do anything about - I believe the underlying issue is this one. I figured I'd create an issue anyways, in case I was wrong, or anyone else came looking for the same information.

Kobzol commented 10 months ago

Yeah, this is not related to this crate. That error simply means that this specific target is not distributed with support for PGO. Either because this target doesn't support it, or simply because we just don't build and ship it on CI via rustup.

GeeWee commented 10 months ago

That makes sense. Feel free to close, but just wanted to point this out if someone else came searching for it :)