Skip to content

MendyBerger/webidl-wit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WIP WebIDL to wit conversion.

This code was written in a hacky way, plans to improve it soon.

Side effects of reading this code may include facepalming, mouth drops, and a strong desire to rewrite all of it. Proceed at your own risk.

Conversions from WebIDL to wit types.

NOTE: This does not represent what's currently implemented, this only shows future plans.

If you have any thoughts, please use the discussion about this table to chime in.

WebIDL type wit type
any
undefined just leave it out
boolean bool
byte s8
octet u8
short s16
unsigned short u16
long s32
unsigned long u32
long long s64
unsigned long long u64
float float32
unrestricted float float32
double float64
unrestricted double float64
bigint
DOMString string
ByteString string
USVString string
object
symbol
interface resource
callback interface
dictionary record
enum enum
callback func
constructor constructor
T? (optional) option<T>
sequence<T> list<T>
record<K, V>
Promise<T>
or (union) variant
Buffer types (e.g. Int8Array)
FrozenArray<T> ❓ (maybe list<T>?)
ObservableArray<T>
setlike<T>
maplike<K, V>
namespace
typedef type

❓ = Not yet sure how to deal with this type.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%