Skip to content

Instantly share code, notes, and snippets.

@chriso
chriso / http.go
Last active September 9, 2023 17:16
// Go HTTP Hello World Server + non-blocking I/O test.
//
// This requires gotip (https://pkg.go.dev/golang.org/dl/gotip) for:
// - https://github.com/golang/go/commit/41893389
// - https://github.com/golang/go/commit/c5c21845
// - https://github.com/golang/go/commit/a17de43e
//
// Compile http.wasm:
//
// $ GOOS=wasip1 GOARCH=wasm gotip build -o http.wasm http.go
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdictions that recognize copyright laws, the author or authors
* of this software dedicate any and all copyright interest in the