Zaplib/zaplib

Better way of sending JS objects to Rust, and back

janpaul123 opened this issue · 0 comments

Right now we JSON-serialize on both sides. It would be nice if we can add some basic functions around this mechanism. Some considerations:

  • In JS the convention is camelCase, in Rust it is snake_case. We should probably avoid magically converting though, since that makes it hard to grep for variable names.
  • It would be nice if the interface can be enforced through typescript type generation (or Rust struct generation).
  • Maybe this is a separate ticket, but it would be nice if we don't have to copy stuff back and forth, and can keep referring to such data structures through e.g. proxy objects.