Skip to content

albertoaer/sapphire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sapphire

Experimental WebAssembly targeted programming language

Sapphire parser is fully independent of the WASM compiler, allowing new compilation targets in the future

Hello World

Sapphire strings are encoded into the WebAssembly Memory meanwhile Js console.log expects a Js string. In order to print "Hello World!", Sapphire must convert it string into a reference.

ensured def console
  log(ref): void;
end

export def main()
  console.log("Hello World!":str_ref)
end

Instead of loading the console.log function, a newer introduction is the kernel.echo function

export def main()
  "Hello World!":str_ref:echo
end

Documentation

The Language Documentation with syntaxis, features and technical description

About

WebAssembly targeted programming language

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published