@@ -46,25 +46,25 @@ use multiboot2_header::{HeaderTagFlag, HeaderTagISA, MbiTagType, RelocatableHead
4646
4747/// Small example that creates a Multiboot2 header and parses it afterwards.
4848fn main () {
49- // We create a Multiboot2 header during runtime here. A practical example is that your
50- // program gets the header from a file and parses it afterwards.
51- let mb2_hdr_bytes = Multiboot2HeaderBuilder :: new (HeaderTagISA :: I386 )
52- . relocatable_tag (RelocatableHeaderTag :: new (
53- HeaderTagFlag :: Required ,
54- 0x1337 ,
55- 0xdeadbeef ,
56- 4096 ,
57- RelocatableHeaderTagPreference :: None ,
58- ))
59- . information_request_tag (
60- InformationRequestHeaderTagBuilder :: new (HeaderTagFlag :: Required )
61- . add_irs (& [MbiTagType :: Cmdline , MbiTagType :: BootLoaderName ]),
62- )
63- . build ();
64-
65- // Cast bytes in vector to Multiboot2 information structure
66- let mb2_hdr = unsafe { Multiboot2Header :: from_addr (mb2_hdr_bytes . as_ptr (). cast ()) };
67- println! (" {:#?}" , mb2_hdr );
49+ // We create a Multiboot2 header during runtime here. A practical example is that your
50+ // program gets the header from a file and parses it afterwards.
51+ let mb2_hdr_bytes = Multiboot2HeaderBuilder :: new (HeaderTagISA :: I386 )
52+ . relocatable_tag (RelocatableHeaderTag :: new (
53+ HeaderTagFlag :: Required ,
54+ 0x1337 ,
55+ 0xdeadbeef ,
56+ 4096 ,
57+ RelocatableHeaderTagPreference :: None ,
58+ ))
59+ . information_request_tag (
60+ InformationRequestHeaderTagBuilder :: new (HeaderTagFlag :: Required )
61+ . add_irs (& [MbiTagType :: Cmdline , MbiTagType :: BootLoaderName ]),
62+ )
63+ . build ();
64+
65+ // Cast bytes in vector to Multiboot2 information structure
66+ let mb2_hdr = unsafe { Multiboot2Header :: from_addr (mb2_hdr_bytes . as_ptr (). cast ()) };
67+ println! (" {:#?}" , mb2_hdr );
6868}
6969```
7070
@@ -85,7 +85,7 @@ bytes of the ELF. See Multiboot2 specification.
8585
8686## MSRV
8787
88- The MSRV is 1.81 .0 stable.
88+ The MSRV is 1.85 .0 stable.
8989
9090## License & Contribution
9191
0 commit comments