Skip to content

Commit

Permalink
Remove PATH instructions for Linux install (dart-lang#5409)
Browse files Browse the repository at this point in the history
  • Loading branch information
atsansone authored Dec 26, 2023
1 parent 755a0f5 commit b705a82
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
15 changes: 0 additions & 15 deletions src/get-dart/_linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,3 @@ $ sudo apt-get install dart

Alternatively, download Dart SDK [as a Debian package](#){:.debian-link-stable}
in the `.deb` package format.

#### Modify PATH for access to all Dart binaries

After installing the SDK, **add its `bin` directory to your `PATH`**. For example,
use the following command to change `PATH` in your active terminal session:

```terminal
$ export PATH="$PATH:/usr/lib/dart/bin"
```

To change the PATH for future terminal sessions, use a command like this:

```terminal
$ echo 'export PATH="$PATH:/usr/lib/dart/bin"' >> ~/.profile
```
30 changes: 25 additions & 5 deletions src/tools/dartaotruntime.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,45 @@ description: Command-line tool for running AOT-compiled snapshots of Dart code.
toc: false
---

Use the `dartaotruntime` command to run AOT (ahead-of-time) compiled programs
called **AOT snapshots**.
This tool is supported on Windows, macOS, and Linux.
With Dart, you can create pre-compiled Dart applications called *AOT snapshots*.

## Create AOT snapshot app

To produce AOT snapshots, use the `aot-snapshot` subcommand of the
[`dart compile` command][dart compile].

## Run AOT snapshot app

To run AOT programs, use the `dartaotruntime` command.
This tool supports Windows, macOS, and Linux.

{{site.alert.note}}
To run use the `dartaotruntime` command,
add the path to your Dart `bin` directory to your `PATH` environment variable.
{{site.alert.end}}

[dart compile]: /tools/dart-compile

## Review an example

Here's an example of creating and running an AOT snapshot:

```terminal
$ dart compile aot-snapshot bin/myapp.dart
```

```terminal
Generated: /Users/me/simpleapp/bin/myapp.aot
```

```terminal
$ dartaotruntime bin/simpleapp.aot
```

For information on command-line options, use the `--help` flag:
## Learn more options

To learn more about command-line options, use the `--help` flag:

```terminal
$ dartaotruntime --help
```

0 comments on commit b705a82

Please sign in to comment.