Skip to content

v0.4.0

Compare
Choose a tag to compare
@ttytm ttytm released this 29 Aug 18:23
· 81 commits to main since this release

Introduces a new API for V an JS interoperability

Example:

// v0.3
fn my_v_func(event_id &char, raw_args &char, mut app App) {
  hello_from_js_arg := json.decode([]string, unsafe { raw_args.vstring() }) or { return }[0]
  app.w.result(event_id, .value, json.encode(hello_from_js_arg + ' Hello back from V!'))
}

// v0.4
fn my_v_func(e &webview.Event) {
  hello_from_js_arg := e.string(0)
  e.@return(hello_from_js_arg + ' Hello back from V!')
}

The goal of this release is to extend the libraries capabilities and make it simpler to use.
Examples are updated and simplified as well as the documentation is updated to reflect the usage.