xref: /freebsd/contrib/file/magic/Magdir/rust (revision 7899f917b1c0ea178f1d2be0cfb452086d079d23)
1
2#------------------------------------------------------------------------------
3# $File: rust,v 1.2 2022/11/18 15:58:15 christos Exp $
4# Magic for Rust and related languages programs
5#
6
7# Rust compiler metadata
8# From: Alexandre Iooss <erdnaxe@crans.org>
9# URL: https://github.com/rust-lang/rust/blob/1.64.0/compiler/rustc_metadata/src/rmeta/mod.rs
100	string		rust\x00\x00\x00
11>12	string		\014rustc\x20		Rust compiler metadata
12!:ext	rmeta
13>>7	byte		x			\b, version %d
14
15# Rust incremental compilation metadata
16# From: Alexandre Iooss <erdnaxe@crans.org>
17# URL: https://github.com/rust-lang/rust/blob/1.64.0/compiler/rustc_incremental/src/persist/file_format.rs
180	string		RSIC
19>4	uleshort	=0			Rust incremental compilation metadata
20!:ext	bin
21>>6	pstring		x			\b, rustc %s
22