Introduction to Wave v0.1.1-pre-beta: Inline Assembly, Pointer Chain, and Array Support
Hello! I'm LunaStev, the developer of Wave.
We are excited to announce Wave v0.1.1-pre-beta
—
This update introduces inline assembly (asm {}
) support, enabling you to write low-level system code directly in Wave, such as making syscalls with direct register manipulation.
Additionally, Wave now fully supports pointer chaining (ptr<ptr<i32>>
) and array types (array<T, N>
), including index access, address-of operations, and validation of literal lengths — expanding Wave's capability for systems-level and memory-safe programming.
These improvements bring Wave closer to its vision as a low-level but expressive programming language.
✅ Added Features
⚙️ Inline Assembly (asm { ... }
) Support
-
Introduced
asm { ... }
block syntax to embed raw assembly instructions directly within Wave code. -
Supports instruction strings (e.g.,
"syscall"
) and explicit register constraints viain("reg") var
andout("reg") var
. -
Variables used in
in(...)
are passed into specified registers; variables inout(...)
receive output from registers. -
Supports passing literal constants directly to registers (e.g.,
in("rax") 60
). -
Pointer values (e.g.,
ptr<i8>
) are correctly passed to registers such asrsi
, enabling low-level syscalls likewrite
. -
Internally leverages LLVM's inline assembly mechanism using Intel syntax.
-
Currently supports single-output only; multiple
out(...)
constraints will overwrite each other. -
Does not yet support clobber lists or advanced constraint combinations.
-
Provides essential capability for system-level programming (e.g., making direct syscalls, writing device-level code).
⚠️ This is not a fully general-purpose inline ASM facility yet, but it enables practical low-level operations within Wave. Full support is planned for later phases.
⚙️ Make pointer chain explicit
-
Nested parsing like
ptr<i32>
,ptr<ptr<i32>>
-
Can create
ptr<T>
for any type (no restrictions onT
) -
Support for consecutive
deref
operations (e.g.,deref deref deref
)
⚙️ Array type complete
-
IndexAccess (
numbers[0]
) handling -
ArrayLiteral → Parse into AST and validate length
-
AddressOf → Support array literals with address-of values (e.g.,
[&a, &b]
) -
Confirmed that
array<T, N>
supports any type as T
✨ Other Changes
🧠 Library and Binary 2 Coexist
- Add lib.rs for easy package manager creation, development, and easy access.