Skip to content

Commit

Permalink
fixed conflicts for merging
Browse files Browse the repository at this point in the history
  • Loading branch information
bradwich committed Sep 15, 2023
1 parent 05b45ee commit 07308be
Show file tree
Hide file tree
Showing 15 changed files with 417 additions and 462 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ RUN go${GOLANG_VERSION_HOST} install github.com/sqlc-dev/sqlc/cmd/[email protected]
RUN go${GOLANG_VERSION_HOST} install github.com/princjef/gomarkdoc/cmd/gomarkdoc@latest
RUN go${GOLANG_VERSION_HOST} install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
RUN go${GOLANG_VERSION_HOST} install github.com/tetratelabs/wazero/cmd/[email protected]

RUN go${GOLANG_VERSION_HOST} install github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc@latest
#RUN go${GOLANG_VERSION_HOST} install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v${PROTOC_GRPC_VERSION}
#RUN go${GOLANG_VERSION_HOST} install github.com/onsi/ginkgo/v2/ginkgo

Expand Down
2 changes: 1 addition & 1 deletion example/helloworld/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GO_VERSION=1.21.0
.PHONY: test
test:
GOROOT=/home/parigot/deps/go${GO_VERSION} GOOS=wasip1 GOARCH=wasm go${GO_VERSION} test -c -o tester ./greeting
wasmtime -- tester -test.v
wazero run tester -test.v

# first WASM file, compiled with GOOS and GOARCH set
.PHONY: hello.p.wasm
Expand Down
4 changes: 2 additions & 2 deletions example/helloworld/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Quickstart:

* This is for people that know golang.
* Create a codespace.
* Make sure you are in the `helloworld` directory, not `parigot-example`.
* Create a codespace on github.
* Make sure you are in the `helloworld` directory, not the root of the repo.

#### The most important files
* `main.go`: the hello world program that calls the greeting service
Expand Down
2 changes: 2 additions & 0 deletions example/helloworld/build/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.p.wasm

Binary file modified example/helloworld/tester
Binary file not shown.
Binary file added site/content/en/codespaces-scap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions site/content/en/docs/Examples/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ the `atlanta-0.3` version of parigot.

{{% alert title="Repo" color="warning" %}}

You can see all the code of the examples in the
[parigot-examples](https://github.com/iansmith/parigot-examples) repository.
You can see all the code of the examples in the [example](https://github.com/iansmith/parigot/tree/master/example)
directory of the repository.

{{% /alert %}}
157 changes: 77 additions & 80 deletions site/content/en/docs/Examples/helloworld.md

Large diffs are not rendered by default.

64 changes: 52 additions & 12 deletions site/content/en/docs/Getting started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,68 @@ environment" or "IDE") and the editor knows how to work with the dev container
for doing things like running programs, launching the debugger, using the
shell *inside* the container.

#### The quick and mostly easy way
### What to try

Here is a [video](https://youtu.be/gJEEHfl-n6I) that can show you some things
to try in the dev container, like running the hello world example.


* What do your users need to do to start using your project? This could include downloading/installation instructions, including any prerequisites or system requirements.
### Github codespaces

* Introductory “Hello World” example, if appropriate. More complex tutorials should live in the Tutorials section.
You can launch a complete editor and working shell in your browser with parigot's
tooling already configured. You can do this with the `codespaces` tab under
the code button on the github repository.

Consider using the headings below for your getting started page. You can delete any that are not applicable to your project.
[Example screencap](/codespaces-scap.png)

## Prerequisites
Althought this is convenient, the machines that back codespace are quite slow,
and it can take several minutes to do the launch of a codespace.

Are there any system requirements for using your project? What languages are supported (if any)? Do users need to already have any software or tools installed?
### Github classic way

## Installation
* Clone the repo (`https://github.com/iansmith/parigot`) using git
* Launch vscode on our configured workspace, `parigot.code-workspace` at the
root of the repo. If you have vscode installed in the normal way, you
can use `code parigot.code-workspace` at the root of the repo.
* When you get the popup in the lower right of vscode that says "reopen in
dev container" click "Reopen in Container" or other affirmative button.
* You will be given your copy of the repo's code, plus a shell that is
pre-configured to work with parigot, as in the video above.

Where can your user find your project code? How can they install it (binaries, installable package, build from source)? Are there multiple options/versions they can install and how should they choose the right one for them?
[Screencap of VS Code startup](/vscode-scap.png)

## Setup
### Other editors

Is there any initial setup users need to do after installation to try your project?
First, VSCode is the recommended way to edit code in parigot simply because it
is so much easier.

## Try it out!
If you are wanting to use another editor that understands containers, the
Dockerfile that builds the dev container is in `.devcontainer/Dockerfile` and
should build on your local copy of Docker. From this point, you'll have a properly
set up image you can use in your editor.

Can your users test their installation, for example by running a command or deploying a Hello World example?
In the past, we have demonstrated that this method works with [goland](https://www.jetbrains.com/go/) and that one can have an environment much like the VSCode one.

You can also build and run the container image from a terminal shell. To build the image, run:

```
docker build -t iansmith/parigot .devcontainer
```

Once you built the image, you will want to start the image by binding the `parigot`
root folder to the path `/workspaces/parigot`, and start the shell:

```
docker run --rm -it -v "$(pwd)":/workspaces/parigot iansmith/parigot
```

From there, you can run the `helloworld` example by running `make` in both the
root and `examples/helloworld`:

```
# In the docker container
make
cd examples/helloworld
make
runner helloworld.toml
```
Loading

0 comments on commit 07308be

Please sign in to comment.