Skip to content

Commit

Permalink
export olin symbols (#95)
Browse files Browse the repository at this point in the history
* export olin symbols

* fix
  • Loading branch information
Xe authored Nov 19, 2019
1 parent d6c8776 commit 0ae0943
Show file tree
Hide file tree
Showing 56 changed files with 25 additions and 23 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ WORKDIR /olin
COPY . .
COPY --from=rust-wasm-tools /olin/cwagi.wasm ./cmd/cwa-cgi/testdata/test.wasm
COPY --from=rust-wasm-tools /olin/cwa-tests.wasm ./cmd/cwa/testdata/test.wasm
RUN GOARCH=wasm GOOS=js go build -o ./cmd/cwa/testdata/go.wasm ./internal/abi/wasmgo/testdata/nothing.go
RUN GOARCH=wasm GOOS=js go build -o ./cmd/cwa/testdata/go.wasm ./abi/wasmgo/testdata/nothing.go
RUN go test -v ./cmd/... ./internal/...
RUN GOBIN=/usr/local/bin go install ./cmd/cwa-cgi
RUN GOBIN=/usr/local/bin go install ./cmd/cwa

FROM xena/zig:0.4.0-0f8fc3b9 AS zig
FROM xena/zig:0.5.0 AS zig
WORKDIR /olin
COPY ./zig .
COPY --from=go /usr/local/bin/cwa /usr/local/bin/cwa
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/abi/cwa/core.go → abi/cwa/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os"

"github.com/perlin-network/life/exec"
"within.website/olin/internal/abi"
"within.website/olin/abi"
)

// NewProcess creates a new process with the given name, arguments and environment.
Expand Down
2 changes: 1 addition & 1 deletion internal/abi/cwa/core_test.go → abi/cwa/core_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package cwa

import "within.website/olin/internal/abi"
import "within.website/olin/abi"

var (
_ abi.ABI = &Process{}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/abi/cwa/io.go → abi/cwa/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package cwa
import (
"math/rand"

"within.website/olin/internal/fileresolver"
"within.website/olin/fileresolver"
)

func (p *Process) IOGetStdin() int32 {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions internal/abi/cwa/resource.go → abi/cwa/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/url"
"os"

"within.website/olin/internal/abi"
"within.website/olin/internal/fileresolver"
"within.website/olin/abi"
"within.website/olin/fileresolver"
)

func (p *Process) ResourceOpen(urlPtr, urlLen uint32) (int32, error) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions internal/abi/dagger/process.go → abi/dagger/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"strconv"

"github.com/perlin-network/life/exec"
"within.website/olin/internal/abi"
"within.website/olin/internal/fileresolver"
"within.website/olin/abi"
"within.website/olin/fileresolver"
)

// Process is a higher level wrapper around a set of files for dagger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"github.com/perlin-network/life/compiler"
"github.com/perlin-network/life/exec"
"within.website/olin/internal/fileresolver"
"within.website/olin/fileresolver"
)

func getFunctionName(i interface{}) string {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions internal/abi/wasmgo/wasmgo.go → abi/wasmgo/wasmgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"time"

"github.com/perlin-network/life/exec"
"within.website/olin/internal/abi/cwa"
"within.website/olin/internal/fileresolver"
"within.website/olin/abi/cwa"
"within.website/olin/fileresolver"
)

type WasmGo struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/cwa-cgi/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/perlin-network/life/exec"
"within.website/ln"
"within.website/ln/opname"
"within.website/olin/internal/abi/cwa"
"within.website/olin/abi/cwa"
)

type vmServer struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/cwa/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (

"github.com/perlin-network/life/compiler"
"github.com/perlin-network/life/exec"
"within.website/olin/internal/abi/cwa"
"within.website/olin/internal/abi/wasmgo"
"within.website/olin/abi/cwa"
"within.website/olin/abi/wasmgo"
)

var (
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/fileresolver/http.go → fileresolver/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/url"
"os"

"within.website/olin/internal/abi"
"within.website/olin/abi"
)

// HTTP creates a new HTTP transport that pretends to be a file. A process can
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/fileresolver/log.go → fileresolver/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io"
"log"

"within.website/olin/internal/abi"
"within.website/olin/abi"
)

// Log returns a file that redirects all write calls to a standard library logger
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/fileresolver/null.go → fileresolver/null.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fileresolver

import "within.website/olin/internal/abi"
import "within.website/olin/abi"

// Null is a file that emulates /dev/null on Linux.
//
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/fileresolver/osfile.go → fileresolver/osfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package fileresolver
import (
"syscall"

"within.website/olin/internal/abi"
"within.website/olin/abi"
)

// OSFile implements File backed by a raw operating system file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"io"

"within.website/olin/internal/abi"
"within.website/olin/abi"
)

// Errors exposed by partial.go
Expand Down
2 changes: 1 addition & 1 deletion internal/fileresolver/random.go → fileresolver/random.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package fileresolver
import (
"crypto/rand"

"within.website/olin/internal/abi"
"within.website/olin/abi"
)

// Random returns a file that reads cryptographically random data.
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion internal/fileresolver/zero.go → fileresolver/zero.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package fileresolver

import "within.website/olin/internal/abi"
import "within.website/olin/abi"

// Zero is a file that does nothing.
//
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ require (
github.com/prometheus/client_golang v1.1.0
within.website/ln v0.6.0
)

go 1.13
2 changes: 1 addition & 1 deletion internal/cwagi/cwagi.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/prometheus/client_golang/prometheus/promauto"
"within.website/ln"
"within.website/ln/opname"
"within.website/olin/internal/abi/cwa"
"within.website/olin/abi/cwa"
)

var (
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 0ae0943

Please sign in to comment.