RoyalIcing / Orb

Write WebAssembly with Elixir
https://useorb.dev
BSD 3-Clause "New" or "Revised" License
174 stars 1 forks source link

Remove `wasm do` #13

Closed RoyalIcing closed 4 weeks ago

RoyalIcing commented 5 months ago

In an early version of Orb, most things were wrapped in wasm do which setup a scope with the Orb DSL (disabling Elixir.Kernel) and inside you placed func do, (data) etc.

Now instead I’ve transitioned away from that wrapper. Instead you use defw do and so now you don’t have to remember which part needs to be be in wasm do and which does not. Let’s simplify by just getting rid of this layer.

Should only use defw, global do, Memory.initial_data! etc directly at the module scope.

RoyalIcing commented 4 months ago

As a partial step, wasm has been renamed to __append_body and various things migrated away so it should only be used in very niche scenarios. Soon this function will be removed and the migration away complete.