From db3c132c0cf9f02ad354ec396e22267f5d69539a Mon Sep 17 00:00:00 2001 From: Anthony Sansone Date: Tue, 26 Dec 2023 15:06:29 -0600 Subject: [PATCH] Remove PATH instructions for Linux install (#5409) Fixes #4609 --- src/get-dart/_linux.md | 15 --------------- src/tools/dartaotruntime.md | 30 +++++++++++++++++++++++++----- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/get-dart/_linux.md b/src/get-dart/_linux.md index 94853111b2..3e8e7ba3d9 100644 --- a/src/get-dart/_linux.md +++ b/src/get-dart/_linux.md @@ -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 -``` diff --git a/src/tools/dartaotruntime.md b/src/tools/dartaotruntime.md index 2c82056152..70fc9f0ad8 100644 --- a/src/tools/dartaotruntime.md +++ b/src/tools/dartaotruntime.md @@ -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 ``` -