3 ms·
> Rust addresses this gap with the same “0b” prefix as found in some non-standard C compiler extensions. In C++ that’s part of C++/14 standard, well-specified.
by Const-me 6y ago
> Rust addresses this gap with the same “0b” prefix as found in some non-standard C compiler extensions.
In C++ that’s part of C++/14 standard, well-specified.
> we have u8, u16, u32, u64, etc
It’s indeed nice to have fundamental types like that, but <stdint.h> header is required by the standard since C99, in C++ since C++/11. It provides typedefs like uint32_t and the rest of them, thus the same UX.
> DWARF support
Yeah, but no PDB. Ship a Windows program written in Rust, and when it crashes or hangs on end-user’s PC you’re pretty much screwed. You need WinDBG to analyze these memory dumps written by the OS, and for that you need pdb symbols as opposed to dwarf.
- Diggsey 6y agoRust generates PDB files by default when using the MSVC toolchain...
- shepmaster 6y ago> Yeah, but no PDB Can you expand on this? C:\rust>cargo new demo Created binary (application) `demo` package C:\rust>cd demo C:\rust\demo>cargo build Compiling demo v0.1.0 (C:\rust\demo) Finished dev [unoptimized + debuginfo] target(s) in 2.28s C:\rust\demo>dir target\debug Volume in drive C is Windows 10 Volume Serial Number is B4A6-FEC6 Directory of C:\rust\demo\target\debug 10/11/2020 02:03 PM <DIR> . 10/11/2020 02:03 PM <DIR> .. 10/11/2020 02:03 PM 0 .cargo-lock 10/11/2020 02:03 PM <DIR> .fingerprint 10/11/2020 02:03 PM <DIR> build 10/11/2020 02:03 PM 61 demo.d 10/11/2020 02:03 PM 152,064 demo.exe 10/11/2020 02:03 PM 1,101,824 demo.pdb 10/11/2020 02:03 PM <DIR> deps 10/11/2020 02:03 PM <DIR> examples 10/11/2020 02:03 PM <DIR> incremental 4 File(s) 1,253,949 bytes 7 Dir(s) 15,995,387,904 bytes free `demo.pdb` is readily available.
- loeg 6y ago> It’s indeed nice to have fundamental types like that, but <stdint.h> header is required by the standard since C99. ... It provides typedefs like uint32_t and the rest of them, thus the same UX. C99 requires stdint.h, but does not require that fixed-width types exist; they're optional. In practice, every architecture you'd care to write C on (amd64, aarch64, ...) has fixed-width types.