Closed Michael-F-Bryan closed 2 years ago
Define the WIT file:
// calculator-v2.wit resource calculator { static new: func(initial-value: f32) -> calculator current-value: func() -> f32 add: func(value: f32) multiply: func(value: f32) divide: func(value: f32) }
Implement the guest:
Use the bindings:
pytest
regex
Intro
Body
Define the WIT file:
Implement the guest:
Use the bindings:
pytest
to test the calculator is correctConclusion
regex
crate