Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(extension) Try to support Windows #101

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@ name: Greetings
on: [pull_request, issues]

jobs:
greeting:
greetings:
name: Greetings

runs-on: ubuntu-latest

steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: |-
Hello dear new contributor!

Thank you very much for opening your first issue. We will take a look at it very soon!
pr-message: |-
Hello dear new contributor!

Thank you very much for submitting your first PR. We will take a look at it very soon!
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: |-
Hello dear new contributor!
Thank you very much for opening your first issue. We will take a look at it very soon!
pr-message: |-
Hello dear new contributor!
Thank you very much for submitting your first PR. We will take a look at it very soon!
22 changes: 20 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build and Test

on: [push]
on: [push, pull_request]

jobs:
# The `test` job.
Expand Down Expand Up @@ -31,11 +31,29 @@ jobs:
run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y

- name: Cache Cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}

- name: Cache Cargo bin
uses: actions/cache@v1
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}

- name: Cache Cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}

- name: Set up just
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
cargo install just
test -f $HOME/.cargo/bin/just || cargo install just

- name: Build the runtime
shell: bash
Expand Down
6 changes: 6 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ build-runtime:
rm -f wasmer/${shared_library}
ln -s "../${shared_library_path}" wasmer/${shared_library}

case "{{os()}}" in
"windows")
ldd "${shared_library_path}"
;;
esac

# Link `src/wasmer.h`.
rm -f wasmer/wasmer.h
ln -s \
Expand Down
13 changes: 7 additions & 6 deletions wasmer/test/imports.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package wasmertest

// #include <stdint.h>
// #include <stdlib.h>
//
// extern int sum(void *context, int x, int y);
// extern int32_t sum(void *context, int32_t x, int32_t y);
// extern long long sum_i64(void *context, long long x, long long y);
// extern float sum_f32(void *context, float x, float y);
// extern double sum_f64(void *context, double x, double y);
// extern int missingContext();
// extern int badInstanceContext(int x);
// extern int badInput(void *context, char x);
// extern int32_t missingContext();
// extern int32_t badInstanceContext(int32_t x);
// extern int32_t badInput(void *context, char x);
// extern char badOutput(void *context);
// extern void logMessage(void *context, int pointer, int length);
// extern void logMessageWithContextData(void *context, int pointer, int length);
// extern void logMessage(void *context, int32_t point32_ter, int32_t length);
// extern void logMessageWithContextData(void *context, int32_t point32_ter, int32_t length);
import "C"
import (
"github.com/stretchr/testify/assert"
Expand Down