Skip to content

Commit

Permalink
fix: workaround for Swatinem/rust-cache#204
Browse files Browse the repository at this point in the history
  • Loading branch information
r4ai committed Dec 23, 2024
1 parent e521b53 commit 078dea4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@9bc0ba964d12bf4c034d65ce732726a2b1a8d9df # v1.10.17
- name: Install cargo-make
run: cargo binstall cargo-make
run: cargo binstall cargo-make --force
- name: Check formatting
run: cargo make format

Expand All @@ -53,7 +53,7 @@ jobs:
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@9bc0ba964d12bf4c034d65ce732726a2b1a8d9df # v1.10.17
- name: Install cargo-make
run: cargo binstall cargo-make
run: cargo binstall cargo-make --force
- name: Check linting
run: cargo make lint

Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@9bc0ba964d12bf4c034d65ce732726a2b1a8d9df # v1.10.17
- name: Install cargo-make
run: cargo binstall cargo-make
run: cargo binstall cargo-make --force
- name: Install target
run: rustup target add ${{ matrix.target }}
- name: Build
Expand All @@ -102,7 +102,7 @@ jobs:
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@9bc0ba964d12bf4c034d65ce732726a2b1a8d9df # v1.10.17
- name: Install cargo-make
run: cargo binstall cargo-make
run: cargo binstall cargo-make --force
- name: Test
run: cargo make test

Expand All @@ -118,7 +118,7 @@ jobs:
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@9bc0ba964d12bf4c034d65ce732726a2b1a8d9df # v1.10.17
- name: Install cargo-make
run: cargo binstall cargo-make
run: cargo binstall cargo-make --force
- name: Run machete
run: cargo make machete

Expand Down Expand Up @@ -158,9 +158,9 @@ jobs:
- name: Install Rust toolchain
run: rustup toolchain install stable
- name: Install cargo-binstall
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
uses: cargo-bins/cargo-binstall@9bc0ba964d12bf4c034d65ce732726a2b1a8d9df # v1.10.17
- name: Install cargo-component
run: cargo binstall cargo-component
run: cargo binstall cargo-component --force
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Check build
Expand Down
2 changes: 2 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,12 @@ crate_name = "cargo-machete"
binary = "machete"
test_arg = ["--help"]
install_command = "binstall"
force = true


[tasks.setup-llvm-cov.install_crate]
crate_name = "cargo-llvm-cov"
binary = "llvm-cov"
test_arg = ["--version"]
install_command = "binstall"
force = true
9 changes: 2 additions & 7 deletions crates/tools/src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,15 @@ impl std::error::Error for Error {}
#[doc(hidden)]
#[allow(non_snake_case)]
pub unsafe fn _export_compile_cabi<T: Guest>(arg0: *mut u8, arg1: usize) -> *mut u8 {
#[cfg(target_arch = "wasm32")]
_rt::run_ctors_once();
#[cfg(target_arch = "wasm32")] _rt::run_ctors_once();
let len0 = arg1;
let bytes0 = _rt::Vec::from_raw_parts(arg0.cast(), len0, len0);
let result1 = T::compile(_rt::string_lift(bytes0));
let ptr2 = _RET_AREA.0.as_mut_ptr().cast::<u8>();
match result1 {
Ok(e) => {
*ptr2.add(0).cast::<u8>() = (0i32) as u8;
let Output {
tokens: tokens3,
ast: ast3,
wasm: wasm3,
} = e;
let Output { tokens: tokens3, ast: ast3, wasm: wasm3 } = e;
let vec4 = (tokens3.into_bytes()).into_boxed_slice();
let ptr4 = vec4.as_ptr().cast::<u8>();
let len4 = vec4.len();
Expand Down

0 comments on commit 078dea4

Please sign in to comment.