avanhatt / wasmtime

Standalone JIT-style runtime for WebAssembly, using Cranelift
https://wasmtime.dev/
Apache License 2.0
0 stars 1 forks source link

Better way to annotate enum variants #60

Closed avanhatt closed 11 months ago

avanhatt commented 1 year ago

e.g.,

(type ALUOp
  (enum
    (Add)
    (Sub)
    ...

Right now, we have to do something like this:


;;@ (spec (sig (args) (ret)) (assume  (= (0i8:bv8) (ret))))
;;decl ALUOp.Add

Ideally, we could just specify the the intended bitwidth to model as and have the enum values auto-generated.

avanhatt commented 11 months ago

Resolved with https://github.com/avanhatt/wasmtime/commit/6e0a601361ac92db65de1413afab97e036cbed98