Skip to content

Commit a184916

Browse files
avi-starkwareclaude
andcommitted
apollo_compile_to_native: document instrumented-binary requirement for libfunc profiling
The with-libfunc-profiling feature only enables profiling in the linked cairo-native library; the profiler symbol that run_with_libfunc_profile resolves is emitted by the compiler binary. Document that starknet-native-compile must itself be built with with-libfunc-profiling (and that compiler_binary_path can point at such a binary), otherwise every profiled native call fails on a missing symbol. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent f0077f2 commit a184916

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

crates/apollo_compile_to_native/Cargo.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ workspace = true
1313
# Enables `SierraToNativeCompiler::compile_with_program`, which returns the
1414
# AOT executor paired with the Sierra program required by cairo-native's
1515
# libfunc profiler.
16+
#
17+
# This only enables profiling in the linked cairo-native library. The profiler
18+
# symbol that `run_with_libfunc_profile` looks up is emitted by the compiler, so
19+
# the `starknet-native-compile` binary must itself be built with its
20+
# `with-libfunc-profiling` feature; a default-built binary yields `.so`s with no
21+
# profiler symbol and every profiled call then fails. Point
22+
# `SierraCompilationConfig.compiler_binary_path` at an instrumented binary.
1623
with-libfunc-profiling = ["cairo-native/with-libfunc-profiling"]
1724

1825
[dependencies]

0 commit comments

Comments
 (0)