title: CGO library build to JS WASM file
body: <p>I wanna write JS script using webassembly library builded from Golang.
  But I need to use C library and use it through CGO.</p>
  
  <p>In short my code looks like this (just example of loading C libraries):</p>
  
  <pre><code>package main
  
  /*
  #include &lt;stdlib.h&gt;
  */
  import "C"
  
  func main() {
      println("Hello")
  }
  </code></pre>
  
  <p>But when I wanna build it as in tutorial with command bellow I have error.</p>
  
  <p>Command: </p>
  
  <pre><code>GOARCH=wasm GOOS=js go build -o lib.wasm test.go
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>can't load package: package main: build constraints exclude all Go files in [Project path]
  </code></pre>
  
  <p>So my question is more if it's even possible to build something like this.</p>
  
  <p>Thank you.</p>