Which VSCode plugin or any other code editors can highlight module-level assembly for x86?

I am talking about this feature.
Suppose I put global_asm!(include_str!("code.asm")) in Rust code. Which VSCode plugin or any other code editors can properly highlight code.asm file?

From what I observed for x86:

  • The assembly code looks like Intel's syntax with MASM flavor (e.g.: keywords like qword ptr).
  • It is not MASM. (It uses // to comment, not ;)

I'd also like to find more detailed manuals for writing "module-level inline assembly".

I'm not an expert at this (I have only ever used inline assembly from C with GCC many years ago) but I assume global assembly and normal inline assembly use the same syntax.

Inline assembly - The Rust Reference says

Currently, all supported targets follow the assembly code syntax used by LLVM’s internal assembler which usually corresponds to that of the GNU assembler (GAS). On x86, the .intel_syntax noprefix mode of GAS is used by default. On ARM, the .syntax unified mode is used. These targets impose an additional restriction on the assembly code: any assembler state (e.g. the current section which can be changed with .section) must be restored to its original value at the end of the asm string. Assembly code that does not conform to the GAS syntax will result in assembler-specific behavior.

That might help with what syntax is used, and hopefully you can find some syntax highlighting plugin that works with that.