Skip to content

Commit

Permalink
Merge branch 'main' into fix-create-canvas-width-height-zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn authored Feb 5, 2024
2 parents c40171c + 6fe6e21 commit d05ee82
Show file tree
Hide file tree
Showing 42 changed files with 1,507 additions and 1,621 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "link-args=/NODEFAULTLIB:libcmt.lib"]
rustflags = ["-C", "link-args=/NODEFAULTLIB:libcmt.lib", "-C", "target-feature=+crt-static"]

[target.aarch64-apple-darwin]
rustflags = ["-C", "target-cpu=apple-a14"]
Expand Down
38 changes: 38 additions & 0 deletions .github/actions/setup-rust/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 'Setup rust'
description: 'Rust setup, including cache configuration'
inputs:
targets:
description: 'Cargo target'
required: true
components:
description: 'Rustup components'
required: false
default: ''
runs:
using: 'composite'
steps:
- name: Print rustup toolchain version
shell: bash
id: rustup-version
run: |
export RUST_TOOLCHAIN_VERSION="$(grep 'channel' rust-toolchain.toml | head -1 | awk -F '"' '{print $2}')"
echo "Rust toolchain version: $RUST_TOOLCHAIN_VERSION"
echo "RUST_TOOLCHAIN_VERSION=$RUST_TOOLCHAIN_VERSION" >> "$GITHUB_OUTPUT"
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: '${{ steps.rustup-version.outputs.RUST_TOOLCHAIN_VERSION }}'
targets: ${{ inputs.targets }}
components: ${{ inputs.components }}
env:
CARGO_INCREMENTAL: '1'

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/
~/.cargo/git/db/
~/.napi-rs
target/${{ inputs.target }}
key: ${{ steps.rustup-version.outputs.RUST_TOOLCHAIN_VERSION }}-${{ inputs.target }}-cargo-cache
Loading

0 comments on commit d05ee82

Please sign in to comment.