Skip to content
/ widl-go Public

WebAssembly Interface Definition Language (WIDL) parser for Golang

Notifications You must be signed in to change notification settings

wapc/widl-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

WebAssembly Interface Definition Language (WIDL) for Golang

WIDL is a schema format for describing waPC modules and used by the CLI to generate code for the supported guest languages. It heavily resembles GraphQL schema but with some variations to fit better in the WebAssembly ecosystem.

  • Built-in WebAssembly numeric types (i8-64, i8-64, f32, f64) - no scalars required
  • Scalars explicitly alias a known type
  • Functions can return void instead of returning Boolean as a workaround
  • Fields are required by default instead of optional and ? is used after the field name to denote that it is optional
  • Support for maps
  • Operations are defined in a single interface instead of separating query and mutation operations
  • Removed the concepts that do not apply from GraphQL schema (e.g. Queries vs. Mutations, Field arguments, Variables, Fragments)

Everything in this package was borrowed and retrofitted from the awesome Golang GraphQL library. We thank the 70+ contributors to this project! It has enabled us to provide a succinct interface definition language to our users with minimal effort.

About

WebAssembly Interface Definition Language (WIDL) parser for Golang

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages