Skip to content

Commit

Permalink
Merge branch '2983-align-headers-on-all-sites' of github.com:winglang…
Browse files Browse the repository at this point in the history
…/docsite into 2983-align-headers-on-all-sites
  • Loading branch information
polamoros committed Jun 30, 2023
2 parents d4abac7 + b1ce1ae commit f257c0c
Show file tree
Hide file tree
Showing 27 changed files with 489 additions and 1,110 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ to know to help out with the Wing project.
There are many ways to contribute to Wing:

* Reporting bugs through a [GitHub issue](https://github.com/winglang/wing/issues)
* Writing [documentation and guides](https://github.com/winglang/wing/issues?q=is:issue+is:open+sort:updated-desc+label:documentation) or adding [examples](docs)
* Setting up your [development environment](./development) and working on the code
* Submitting [pull requests](./pull_requests) for new features or helping with [reviews](https://github.com/winglang/wing/pulls)
* Picking up a [good first issue](https://github.com/winglang/wing/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+no%3Aassignee+sort%3Aupdated-desc+) to work on
* Reporting and fixing [bugs](./bugs)
* Contributing to the [Wing SDK (standard library)](./wingsdk)
* Find solutions to common issues in our [troubleshooting guide](./troubleshooting)
* Commenting on [RFCs](/category/rfcs) or submitting one for major features
* Writing [documentation and guides](https://github.com/winglang/wing/issues?q=is:issue+is:open+sort:updated-desc+label:documentation) or adding [examples](/contributing/start-here/docs#%EF%B8%8F-how-do-i-add-an-example)
* Setting up your [development environment](/contributing/start-here/development) and working on the code
* Submitting [pull requests](/contributing/start-here/pull_requests) for new features or helping with [reviews](https://github.com/winglang/wing/pulls)
* Picking up a [good first issue](https://github.com/winglang/wing/issues?q=is%3Aissue+is%3Aopen+label%3A%221%EF%B8%8F%E2%83%A3+good+first+issue%22+no%3Aassignee+sort%3Aupdated-desc) to work on
* Reporting and fixing [bugs](/contributing/start-here/bugs)
* Contributing to the [Wing SDK (standard library)](/contributing/start-here/wingsdk)
* Find solutions to common issues in our [troubleshooting guide](/contributing/start-here/troubleshooting)
* Commenting on [RFCs](/contributing/category/rfcs) or submitting one for major features
* Asking and answering questions in the [Wing Slack](https://t.winglang.io/slack)
* Posting or answering questions in [Wing Discussions](https://github.com/winglang/wing/discussions)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ The [insta](https://marketplace.visualstudio.com/items?itemName=mitsuhiko.insta)
To debug the Rust compiler on VSCode, first you need to install the [CodeLLDB extension](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb).<br/>
Next, you can use the `Debug Wing Compiler` launch configuration available on our [launch.json](https://github.com/winglang/wing/blob/main/.vscode/launch.json).

Hit F5 to start debugging. You'll be prompted to insert the path to the `.w` file you want to debug.<br/>You can use the `${workspaceFolder}/examples/tests/valid/hello.w` file for example.
Open the `.w` file you wish to debug compilation for (e.g. `${workspaceFolder}/examples/tests/valid/hello.w`) and hit F5 to start debugging.

## How do I make changes to the Wing grammar?

Expand Down
27 changes: 5 additions & 22 deletions versioned_docs/version-latest/01-start-here/02-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ The toolchain includes three tools:

1. **Wing CLI** - the compiler toolchain
2. **Wing VSCode Extension** - IDE support for Wing
3. **Wing Console** - a desktop app for interacting with your Wing programs.
3. **Wing Console** - a web application for viewing and interacting with your Wing programs.

To install Wing, you will need the following setup:

* [Node.js](https://nodejs.org/en/) (v18 or later)
* We recommend [volta](https://volta.sh) to manage node tools
* We recommend [volta](https://volta.sh) to manage node tools
* [VSCode]
* Not required, but currently supported with an [extension](#wing-ide-extension)
* Not required, but currently supported with an [extension](#wing-ide-extension)

## Wing CLI

Expand Down Expand Up @@ -83,26 +83,9 @@ to use it, but it's great. It's available through the VSCode Marketplace [here](

## Wing Console

:::caution Wing Console doesn't support Linux yet

Click :thumbsup: on [this issue](https://github.com/winglang/wing/issues/723) to indicate that you
are looking for Linux support.

:::


The Wing Console is a desktop application that allows you to interact with your
Wing applications running locally on the cloud simulator.

1. Download the latest version of the **Wing Console**:
* [macOS](https://wing-console.s3.amazonaws.com/wing-console.dmg)
* [macOS arm64](https://wing-console.s3.amazonaws.com/wing-console-arm64.dmg)
* [Windows](https://wing-console.s3.amazonaws.com/wing-console.exe)
2. Accept the license agreement.
3. In macOS: drag the Wing Console app into **Applications**

![Drag the Wing Console app into Applications](./console-install.png 'Wing Console app installation')
The Wing Console is a web application that provides a developer-friendly interface for viewing, exploring, and interacting with your Wing applications running on the local cloud simulator.

The Wing Console is included as part of the Wing CLI package. There is no need to install it separately. Once the Wing CLI is successfully installed, you can directly access the Wing Console and begin utilizing its features.

[AWS account]: https://portal.aws.amazon.com/billing/signup
[AWS CLI]: https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html
Expand Down
43 changes: 17 additions & 26 deletions versioned_docs/version-latest/01-start-here/04-run-locally.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ id: local
keywords: [Wing Local, Wing testing, Wing Console installation, Wing Console usage, Wing Console setup]
---

The Wing Console is a graphical user interface that can be used to interact with
Wing applications on the local machine.
The Wing Console is a web application that provides a developer-friendly interface that can be used to view, explore, and interact with Wing applications running on your local machine.

## Opening your app in the console

Expand All @@ -14,12 +13,9 @@ Wing applications on the local machine.
Make sure you have [installed](./installation#wing-console) the Wing Console on your system
before getting started with this step.

If you are unable to install the Wing Console (e.g. you are running on Linux), you can
also test your application against the [Wing simulator](../concepts/simulator) or [deploy it to AWS](./aws).

:::

We can use the Wing CLI to start the console with our newly created Wing source file:
Use the Wing CLI to start the console with our newly created Wing source file:

```sh
wing it hello.w
Expand All @@ -30,46 +26,41 @@ and load the application.

> The console will "hot reload" your app on each change in the source file parent directory.
Wing Console desktop application will show the following view of you application:
In your Wing Console you will see the following view of you application:

![Wing Console desktop application view](./console-app.png 'Wing Console')

You are now able to run your IDE and the Wing Console side-by-side and watch how changes to your code update your application.

## The console view
## The Wing Console view

In the main view you'll see two resources: a **Queue** and a **Function**.
You'll also notice that the function is connected to the queue through the
`message` event.
In the console [map view](../tools/wing-console#view-and-explore-your-wing-application) you'll see three resources: a **Queue**, a **Function** and a **Bucket**.
The Queue and the Bucket are connected through the Function resource, which serves as a message handler and is set as the consumer for the Queue.

Once you click on the queue resource, the console will navigate into the queue
resource. The inspector pane on the right will show information about your
queue, as well as any relationships (in our case, an outbound relationship to
the function that handles messages).
Click on the Queue resource and pay attention to the right hand panel. This is the [resource interaction panel](../tools/wing-console#interact-with-your-wing-application).

![Queue resource view in Wing Console](./console-queue.png 'Queue resource')

## Sending a message to the queue
## Push a message to the Queue

In the center you should be able to type in a message and send it to the queue.
Type `Wing` and hit **Send Message**.
On the right side interaction panel view, Type a message in the `Push Message` text area (let's say `Wing it`) and hit **Push** in order to push it to the queue.

## Viewing the file
## View the file in the Bucket

On the left sidebar click on the Bucket, you will see the following view:
Now, click on the Bucket in the Console map view. Notice that the interaction panel has changed and now shows the Bucket's interaction view.

![Bucket resource view in Wing Console](./console-bucket-1.png 'Bucket resource')
Check out the `wing.txt` file, click on it and see it's preview.

Now, check the `wing.txt` file and download it, using the download button
![Bucket resource view in Wing Console](./console-bucket-1.png 'Bucket resource')

![Download bucket files in Wing Console](./console-bucket-2.png 'Download bucket files')
You can also download the file, using the **download** button.

The downloaded file should contain `Hello, Wing` text
The downloaded file should contain `Hello, Wing it` text (as you already saw in the preview).

## Congrats! :clap:

You have just written and tested your first Wing program!
You have just written and ran your first Wing program!

---

Now, after you have tested your application, lets deploy it to AWS.
Now, after you have made sure your application works, lets deploy it to AWS.
Binary file modified versioned_docs/version-latest/01-start-here/console-app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file modified versioned_docs/version-latest/01-start-here/console-queue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ These targets contain a combination of provisioning engine and cloud environment

## Portability

Wing's [cloud library](docs/docs/04-standard-librarylibrary/01-cloud) has several classes representing abstracted cloud resources, whose APIs are not specific to a single cloud provider. This allows you to write code that can be deployed to any supported cloud environment or provisioning engine.
Wing's [cloud library](/docs/standard-library/cloud/api-reference) has several classes representing abstracted cloud resources, whose APIs are not specific to a single cloud provider. This allows you to write code that can be deployed to any supported cloud environment or provisioning engine.

Here's an example of a portable code snippet:

Expand All @@ -44,7 +44,7 @@ let bucket = new cloud.Bucket();
```

Each resource needs a dedicated implementation to work on a given compiler target.
A catalog of which resources are supported on each cloud can be found [here](docs/docs/04-standard-library/03-winglang-support-matrix).
A catalog of which resources are supported on each cloud can be found [here](/docs/standard-library/compatibility-matrix).

### Provisioning engines

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Checking for equality is performed with the `==` operator. It returns `true` if
Equality in Wing is a symmetric and transitive relationship - that is, (1) if `a == b`, then `b == a`, and (2) if `a == b` and `b == c`, then `a == c`.

The execution phase ([preflight or inflight](../02-core-concepts/01-preflight-and-inflight.md)) that a value was created in does not affect its equality. For example, a value created in preflight can be equal to a value created in inflight.
The execution phase ([preflight or inflight](/docs/concepts/inflights)) that a value was created in does not affect its equality. For example, a value created in preflight can be equal to a value created in inflight.

Some types are compared *by value*, which means that two values are equal if their contents are equivalent. For example, two `str` values are equal if they have the same characters in the same order, even if they are stored in different places in memory.

Expand Down
Loading

0 comments on commit f257c0c

Please sign in to comment.