diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..658e992 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,34 @@ +name: Build docs +on: + push: + branches: ["main"] +env: + CARGO_TERM_COLOR: always +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build + run: cargo build --verbose + - name: Build Docs + run: cargo doc + - name: Add redirect + run: echo '' > target/doc/index.html + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: target/doc + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/README.md b/README.md index 649e118..715c27c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,35 @@ [Hermes](https://hermesengine.dev) JavaScript engine wrapper for Rust programming language. +> Note: Currently only supports on Linux and macOS. Adding Windows support should be trivial. + Crates: -- [`rusty_hermes`] - High-level wrapper for libhermesabi-sys (WIP). +- [`rusty_hermes`](./) - High-level wrapper for libhermesabi-sys (WIP). - [`libhermesabi-sys`](./libhermesabi-sys) - Hermes C ABI bindings using bindgen. + +Install the required dependencies: + +**Ubuntu** + +``` +apt install cmake git ninja-build libicu-dev python zip libreadline-dev +``` + +**Arch** + +``` +pacman -S cmake git ninja icu python zip readline +``` + +**macOS via Homebrew** + +``` +brew install cmake git ninja +``` + +Add to your **Cargo.toml**: + +``` +rusty_hermes = { git = "https://github.com/rust-hermes/rusty_hermes", branch = "main" } +```