Skip to content

Releases: garritfra/qbe-rs

v3.0.0

19 Feb 11:47
d6050cd

Choose a tag to compare

[3.0.0] - 2026-02-19

Added

  • Add Neg and Xor instructions (#46)

Changed

  • BREAKING: Phi instruction now accepts Vec(String, Value) to support multiple arguments (#48)
  • BREAKING: Support for opaque and union types (#39)

Internal

  • Update Rust toolchain to 1.89 (#44)

Migrating from v2.x to v3.0.0

This version introduces potentially breaking changes.

Phi instruction

The Phi instruction now accepts a Vec<(String, Value)> instead of two fixed label-value pairs, allowing for any number of arguments:

// Before
Instr::Phi("ift".into(), Value::Const(2), "iff".into(), Value::Temporary("3".into()))

// After
Instr::Phi(vec![
    ("ift".into(), Value::Const(2)),
    ("iff".into(), Value::Temporary("3".into())),
])

Aggregate types

Aggregate types now use a new TypeDef::Regular enum variant instead of the old TypeDef struct to allow for support of opaque and union types:

let my_aggregate_type = TypeDef {
    name: "SomeType".into(),
    align: None,
    items: vec![(Type::Long, 1), (Type::Word, 2), (Type::Byte, 1)]   
};

// Becomes
let my_aggregate_type = TypeDef::Regular {
    ident: "SomeType".into(),
    align: None,
    items: vec![(Type::Long, 1), (Type::Word, 2), (Type::Byte, 1)]   
};

New Contributors

Full Changelog: v2.5.1...v3.0.0

v2.5.1

08 Sep 09:48
332918e

Choose a tag to compare

[2.5.1] - 2025-08-08

Added

  • Pin Rust toolchain to 1.88 in rust-toolchain.toml (#37)
  • Made Module fields public (#41)

Fixed

  • assign_instr coercing aggregate types to l for calls (#36)

v2.5.0

14 Apr 07:00
5f3260a

Choose a tag to compare

[2.5.0] - 2025-04-14

Added

  • Code documentation examples
  • Alignment calculation for type definition (#33)
  • Phi instruction (#34)

Fixed

  • Correct size calculation for type definition (#33)

New Contributors

Full Changelog: v2.4.0...v2.5.0

v2.4.0

28 Feb 10:46
a3c5a37

Choose a tag to compare

[2.4.0] - 2025-02-28

Added

  • Additional comparison operators: ordered (O), unordered (UO), and unsigned integer comparisons (Ult, Ule, Ugt, Uge)
  • Bitwise shifting instructions: Sar, Shr, and Shl
  • Unsigned arithmetic instructions: Udiv and Urem
  • Type conversion instructions:
    • Cast instruction for converting between integers and floating points
    • Extension operations: Extsw, Extuw, Extsh, Extuh, Extsb, Extub
    • Float precision conversion: Exts, Truncd
    • Float-integer conversions: Stosi, Stoui, Dtosi, Dtoui, Swtof, Uwtof, Sltof, Ultof
  • Variadic function support with Vastart and Vaarg instructions
  • Program termination instruction Hlt
  • Thread-local storage support in Linkage with convenience constructors
  • Zero-initialized data support with DataItem::Zero

Full Changelog: v2.3.1...v2.4.0

v2.3.1

28 Feb 09:32
84c83cc

Choose a tag to compare

[2.3.1] - 2025-02-28

Fixed

  • Fixed type definition ordering in Module::fmt::Display to ensure type definitions appear before function definitions, which is required by QBE for aggregate types (#31).

New Contributors

Full Changelog: v2.3.0...v2.3.1

v2.3.0

13 Jan 08:54
8e154da

Choose a tag to compare

[2.3.0] - 2025-01-13

Added

  • New Block::add_comment API to add comments inside blocks; Block::items is now Vec<BlockItem> instead of Vec<Statement> (#25).
  • New Type::Zero for internal zero-sized type representation. (#27)
  • Debug instruction support with Instr::DbgFile and Instr::DbgLoc for source mapping. (#27)

Changed

  • BREAKING: New field Option<u64> inside Instr::Call to specify variadic arguments (#24).

New Contributors

Full Changelog: v2.2.0...v2.3.0

v2.2.0

28 Oct 08:52
37e31c7

Choose a tag to compare

What's Changed

  • Change function args from String to Into<String> by @icefoxen in #15
  • build(deps): bump actions/checkout from 2 to 3 by @dependabot in #21
  • build(deps): bump actions/checkout from 3 to 4 by @dependabot in #22
  • Add unsigned and signed variants of sub-word types by @lleyton in #23

New Contributors

Full Changelog: v2.1.0...v2.2.0

v2.1.0

15 Dec 11:06
025e447

Choose a tag to compare

[2.1.0] - 2022-12-15

This release prepares the lib for the upcoming QBE 1.1.

Added

  • Type::size() can now correctly calculate the size of aggregate types
    (#12).
  • Function::add_block() returns a reference to the created block (#18)
  • Add blit instruction, in preparation for QBE release 1.1 (#20).

Changed

  • Type::Aggregate now takes a TypeDef instead of the name of a type
    (#12).
  • Deprecated Function::last_block() (#18)

v2.0.0

10 Mar 13:58
v2.0.0
5f679a0

Choose a tag to compare

Changelog

Added

  • Function and DataDef now have a new constructor
  • Module now implements common traits (Debug, Clone, Eq, PartialEq,
    Ord, PartialOrd, Hash, Default and Copy)

Changed

  • Module::add_function, Module::add_type and Module::add_data now consume
    their corresponding structs, instead of constructing them

v1.0.0

11 Feb 14:25
v1.0.0
704a6fa

Choose a tag to compare

Changelog

Added

  • Data types now implement common traits (Debug, Clone, Eq, PartialEq,
    Ord, PartialOrd, Hash, Default and Copy) where applicable
  • Added Linkage data type (see Linkage)
  • Added a Module data type that houses functions and data definitions

Changed

  • Remove Qbe prefix from data structures. QbeValue becomes qbe::Value
  • The exported flag of a Function has been replaced with Linkage