Skip to content

Releases: Juici/wchar-rs

0.11.0

09 Aug 12:14
0.11.0
4bd0b10
Compare
Choose a tag to compare

Updated minimum required rustc version to 1.53.0.

Bug Fixes

  • Fix issues with platform wchar_t when compiling for a different platform.

0.10.1

14 May 12:19
34671d6
Compare
Choose a tag to compare

Features

  • Add support for character literals in wch macro.

    The wch macro now accepts character literals and outputs single wide characters.

    use wchar::{wch, wchar_t};
    
    const A: wchar_t = wch!('A');
    const B: u16 = wch!(u16, 'B');
    const C: u32 = wch!(u32, 'C');
    const D: i16 = wch!(i16, 'D');
    const E: i32 = wch!(i32, 'E');
  • Add include_wch and include_wchz macros.

    These macros function similarly to the include_bytes macro. The macros read UTF-8 encoded files and generate a slice of wide characters.

    use wchar::include_wch;
    
    // Include a UTF-8 encoded file as a UTF-16 encoded u16 slice.
    const FILE_AS_UTF16: &[u16] = include_wch!(u16, "/path/to/file.txt");

    Unstable: Currently this limited to absolute paths, in order to use relative paths the unstable feature is required.

0.8.0

05 May 10:00
0.8.0
7661ec4
Compare
Choose a tag to compare

Breaking changes

  • Renamed wch_c macro to wchz.

    This brings the macro more inline with nul-terminated string terminology, such as .ascii and .asciiz in assembly.

  • Default to target platform wchar_t for macro output.

    To make the macros more usable the output wide character type when not specified in the macro will default to the wchar_t type of the target platform. This is instead of the previous default of u16.

    The crate also exports a type alias to the default target platform wchar_t, this can be used as such:

    use wchar::{wchz, wchar_t};
    
    const RUST: &[wchar_t] = wchz!("Rust");

0.7.0

17 Apr 10:01
0.7.0
00c42da
Compare
Choose a tag to compare
  • Allow the wchar type to be specified as an optional first argument to the macro, available types:

    • u16
    • u32
    • i16
    • i32
  • Update compiler support to require rustc 1.45+

0.6.1

27 Aug 16:44
0.6.1
b941fa5
Compare
Choose a tag to compare
  • Fixed links in docs
  • Fixed failing unit tests

Thanks to @Josh015

0.6.0

04 Nov 16:44
0.6.0
dc8edec
Compare
Choose a tag to compare
  • Declare as no_std crate.
  • Update dependencies.
  • Use only required features from syn.

0.5.0

22 Jul 12:03
0.5.0
d2bbe07
Compare
Choose a tag to compare

Release for stable using proc-macro-hack.