- Install the
wit-bindgen-cli
crate viacargo install wit-bindgen-cli
. - Check out the wasi:cli repo.
- Run
wit-bindgen c --world command wit
in thewasi-cli
directory.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code generated by wit-bindgen-go. DO NOT EDIT. | |
// Package types represents the interface "wasi:filesystem/[email protected]". | |
// | |
// WASI filesystem is a filesystem API primarily intended to let users run WASI | |
// programs that access their files on their existing filesystems, without | |
// significant overhead. | |
// | |
// It is intended to be roughly portable between Unix-family platforms and | |
// Windows, though it does not hide many of the major differences. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package poll | |
import ( | |
"unsafe" | |
"github.com/ydnar/wasm-tools-go/wasm/cm" | |
) | |
// Interface implements WIT interface "wasi:io/poll". | |
type Interface interface { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package platform | |
import ( | |
"os" | |
"path/filepath" | |
) | |
// ExecutableDir returns the directory containing the current executable, | |
// or when an error occurs, the current working directory. | |
func ExecutableDir() (string, error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
func main() { | |
var s string | |
var _ = s == nil // true | |
var i int | |
var _ = i == nil // true | |
var v struct { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package priority | |
import ( | |
"context" | |
"sync/atomic" | |
) | |
type Priority int | |
const ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// swift-tools-version:5.3 | |
import PackageDescription | |
let package = Package( | |
name: "Packages", | |
platforms: [ | |
.macOS(.v10_15), | |
.iOS(.v13), | |
], | |
products: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
"flag" | |
"fmt" | |
"os" | |
"path/filepath" | |
"strings" | |
"unicode" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"net" | |
"os" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Swift | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- ".github/workflows/swift.yaml" | |
- "**.swift" | |
- "**/Package.resolved" |
NewerOlder