commit | 2b1f43703322b66f1e24e265451e7003045f451c | [log] [tgz] |
---|---|---|
author | Alexander Biggs <akbiggs@google.com> | Wed May 04 20:22:18 2022 +0000 |
committer | Alexander Biggs <akbiggs@google.com> | Wed May 04 20:22:18 2022 +0000 |
tree | a57d1baa698030e62d8dd7789103c6472a718716 | |
parent | 954ea6452692deccfbd1d9434facf327a8bb03ef [diff] |
[embedder] Update to match fortune-teller workflow. - Deleted bazelisk vendor/tools in favor of `sudo apt-get install bazel`. - Copied over infra scripts (but not used yet). - Updated sdk-integration. - Updated build rules. - Deleted basic_package. hello_world will also get deleted once we copy over the embedder code. - Add gtest (but not used yet). Bug: 46971 Change-Id: I429dd5deb19bde79507eaa298cf1e93fb2bc1032
The Flutter & Dart embedders (FDE) repo holds the source code for building the Fuchsia-specific Flutter & Dart embedders outside of fuchsia.git.
This repository is a work in progress and should be considered experimental.
Install a Bazel version no older than the one defined in the WORKSPACE.bazel file, by following the instructions at https://bazel.build/install. In some Linux distributions, sudo apt-get install bazel
should be enough.
Make sure this repository has the required submodules:
git submodule update --recursive --init
Ensure that there are Fuchsia SSH keys in your host machine. You will need them for running the Fuchsia emulator.
[[ -f "${HOME}/.ssh/fuchsia_ed25519" ]] || ssh-keygen -P "" -t ed25519 -f "${HOME}/.ssh/fuchsia_ed25519" -C "${USER}@$(hostname -f) Shared SSH Key for Fuchsia" [[ -f "${HOME}/.ssh/fuchsia_authorized_keys" ]] || ssh-keygen -y -f "${HOME}/.ssh/fuchsia_ed25519" > "${HOME}/.ssh/fuchsia_authorized_keys"
Now the repository is ready to build the sample.
Fetch an emulator image and start an emulator
tools/ffx product-bundle get workstation.qemu-x64 tools/ffx emu start --headless workstation.qemu-x64
(optional) watch the device log in a separate window
tools/ffx log
Run the hello world component
bazel run --config=fuchsia_x64 //src/examples/hello_world_cpp:hello_world_cpp_pkg.component
Watch that “Hello, World!” is printed in the log.