You shouldn't do that. There is absolutely no guarantee relative to which path it will evaluate. Ir may be relative to the directory in which rustc was invoked or it may be relative to a temporary directory to which the assembly could be written before passing it to an assembler. Rustc doesn't have any way to specify the search path. As alternative you can use the concat!() and include_str!() rust macros to build a string you can pass to the asm!() macro.