diff --git a/Readme.md b/Readme.md index 966e2f71..74063968 100644 --- a/Readme.md +++ b/Readme.md @@ -26,10 +26,10 @@ The Orca command-line tools must be installed to your system in order to use the ### Requirements - Windows 10 or later, or Mac 13 or later (Linux is not yet supported) -- Clang (version 11.0 or newer) +- Clang version 11.0 or newer - **Windows users:** `clang` can be installed via the Visual Studio installer. Search for "C++ Clang Compiler". - **Mac users:** Apple's built-in `clang` does not support WebAssembly. We recommend installing `clang` via [Homebrew](https://brew.sh/) with `brew install llvm`. -- When targeting WebAssembly, `clang` relies on builtins found in `libclang_rt.builtins-wasm32`, but most distributions of `clang` don't ship with this file. If `clang` complains that it can't find this file you will need to download it from [https://github.com/WebAssembly/wasi-sdk/releases](https://github.com/WebAssembly/wasi-sdk/releases). +- **Clang runtime builtins.** When targeting WebAssembly, `clang` relies on builtins found in `libclang_rt.builtins-wasm32`, but most distributions of `clang` don't ship with this file. To know where `clang` expects to find this file, you can run `clang --target=wasm32 -print-libgcc-file-name`. If this file doesn't exist you will need to download it from [https://github.com/WebAssembly/wasi-sdk/releases](https://github.com/WebAssembly/wasi-sdk/releases). ### Installation Instructions @@ -121,6 +121,10 @@ We currently use [wasm3](https://github.com/wasm3/wasm3) for our interpreter. We Please ensure that you have installed Orca to your system per the installation instructions above. Please also ensure that the Orca install directory is on your PATH. +**I am getting errors from wasm-ld saying libclang_rt.builtins-wasm32.a is not found.** + +Please ensure that you downloaded and installed `libclang_rt.builtins-wasm32.a` into clang's library directory as per the requirements instructions above. + ## License Orca is distributed under the terms of the MIT license or the Apache License version 2.0, at your option. Copyright and License details can be found in [LICENSE.txt](./LICENSE.txt) diff --git a/doc/QuickStart.md b/doc/QuickStart.md index 50cf82da..4a6fef9f 100644 --- a/doc/QuickStart.md +++ b/doc/QuickStart.md @@ -13,10 +13,13 @@ This is a short introduction to developing an application that can be run by the An Orca app is a WebAssembly module designed for the Orca runtime. Your app interacts with the Orca runtime via WebAssembly imports and exports. For example, you can import functions from the Orca runtime to get user input, and export functions to the Orca runtime to draw to the screen. -Orca also ships with a core library, written in C, which facilitates interaction with the Orca runtime and provides features like UI. It also ships with a C standard library implementation designed to work on WebAssembly. These libraries should be linked to your app as part of producing your WebAssembly module. - You can, in principle, write an Orca app in any programming language that supports WebAssembly. However, at this early stage, C is the only officially supported language. +Orca also ships with a core library which facilitates interaction with the Orca runtime and provides features like UI. It also ships with a C standard library implementation designed to work on WebAssembly. These libraries should be linked to your app as part of producing your WebAssembly module. You can get the paths to these libraries by running `orca sdk-path`: + +- The Orca core library is located in `$(orca sdk-path)/bin` +- The Orca lib C root is located in `$(orca sdk-path)/orca-libc` + ![Basic structure of a C app](images/app_c.png) For example, here's how we build the WebAssembly module for our Breakout example app: