summaryrefslogtreecommitdiffstats
path: root/magic/Magdir/rust
blob: b1bbd9d9702ccc9fa20973d9b0a74fdb2ae472d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#------------------------------------------------------------------------------
# $File: rust,v 1.2 2022/11/18 15:58:15 christos Exp $
# Magic for Rust and related languages programs
#

# Rust compiler metadata
# From: Alexandre Iooss <erdnaxe@crans.org>
# URL: https://github.com/rust-lang/rust/blob/1.64.0/compiler/rustc_metadata/src/rmeta/mod.rs
0	string		rust\x00\x00\x00
>12	string		\014rustc\x20		Rust compiler metadata
!:ext	rmeta
>>7	byte		x			\b, version %d

# Rust incremental compilation metadata
# From: Alexandre Iooss <erdnaxe@crans.org>
# URL: https://github.com/rust-lang/rust/blob/1.64.0/compiler/rustc_incremental/src/persist/file_format.rs
0	string		RSIC
>4	uleshort	=0			Rust incremental compilation metadata
!:ext	bin
>>6	pstring		x			\b, rustc %s