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: Reb00t #48

Merged
merged 83 commits into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
1530315
feat: Reb00t.
Hywan Apr 27, 2021
f1f6791
feat: Implement `Module.new`.
Hywan Apr 27, 2021
c6f4832
feat: Update the `rubyclass` procedural macro.
Hywan Apr 27, 2021
6260703
feat: Implement `Module.validate`.
Hywan Apr 27, 2021
ee691f4
feat: Implement `Module.name` and `Module.name=`.
Hywan Apr 27, 2021
a9bef82
feat: Split `ruby-derive` into a submodule.
Hywan Apr 27, 2021
938f5fb
feat: Implement the `#[rubymethods]` proc macro.
Hywan Apr 27, 2021
707ff8f
feat: Implement methods with a `self` receiver in `#[rubymethods]`.
Hywan Apr 27, 2021
d404c08
feat: Simplify `unwrap` and `unwrap_mut`.
Hywan Apr 27, 2021
3031cc0
feat: Rename `ruby-derive` to `rutie-derive`.
Hywan Apr 27, 2021
8a0d0f1
chore: Improve `Cargo.toml` of `rutie-derive`.
Hywan Apr 27, 2021
80f46ee
feat: Attempt to implement auto-casting from class to ruby-class.
Hywan Apr 29, 2021
227af4d
feat: Attempt to implement auto-casting from class to ruby-class for …
Hywan Apr 29, 2021
cf94d28
feat: Forgot to add the new `rutie-derive` directory.
Hywan Apr 29, 2021
caae966
feat: Removing and simplifying code.
Hywan Apr 29, 2021
69fb1e2
feat: Rename `<Class>::wrap` to `::ruby_new`.
Hywan Apr 29, 2021
0087da4
feat: Simplify `Module::new` to take only a `RString`.
Hywan Apr 29, 2021
3c1db04
doc: Add some (small) code documentation.
Hywan Apr 29, 2021
9017c22
Implement customt traits for most Ruby native types.
Hywan Apr 29, 2021
46025dc
feat: Implement `Module.custom_sections`.
Hywan Apr 29, 2021
38980e5
feat: Implement `Module.serialize`.
Hywan Apr 29, 2021
17b1440
feat: Move `lazy_static` inside the prelude.
Hywan Apr 29, 2021
6aab2c7
feat: Implement `Type`.
Hywan Apr 29, 2021
c6a9bfa
feat: Fix `rutie::wrappable_struct!`.
Hywan Apr 29, 2021
cb9258a
feat: Create one Rust module per Ruby class to avoid name clashing.
Hywan Apr 29, 2021
8bf199c
feat: Implement `FunctionType`.
Hywan Apr 29, 2021
bf2f739
feat: Implement `MemoryType`.
Hywan Apr 29, 2021
efe1406
feat: Rename `type` to `types`.
Hywan Apr 29, 2021
fec95e4
feat: Create a macro to simplify class/methods definitions.
Hywan Apr 29, 2021
cf0604b
feat: Implement `GlobalType`.
Hywan Apr 30, 2021
1e1e3fd
feat: Implement `TableType`.
Hywan Apr 30, 2021
b6d5f17
feat: Implement `ExportType`.
Hywan Apr 30, 2021
57f0b0b
test: Add one more testcase for `ExportType.new`.
Hywan Apr 30, 2021
9b74b5e
feat: Implement `ImportType`.
Hywan Apr 30, 2021
959588f
feat: Implement `Module.exports`.
Hywan Apr 30, 2021
37bd91f
feat: Implement `Module.imports`.
Hywan Apr 30, 2021
f5d73a8
feat: Implement `Module.deserialize`.
Hywan Apr 30, 2021
00fab1d
feat: Implement `Instance`, `Exports` and `Function`.
Hywan May 3, 2021
23e8aad
feat: Declare `Exports.method_missing`.
Hywan May 4, 2021
1c32b73
feat: Implement `Memory`.
Hywan May 4, 2021
753a624
feat: Implement `Value`.
Hywan May 4, 2021
a96bf22
feat: Implement `Global`.
Hywan May 4, 2021
3728ae7
feat: Implement `Table`.
Hywan May 4, 2021
6ca2517
feat: Raise a `NameError` when `Exports.<name>` is unknown.
Hywan May 4, 2021
a5dfa11
test: Simplify one test.
Hywan May 4, 2021
4f6a9f4
feat: Implement `Exports.length`.
Hywan May 4, 2021
f7a89c6
feat: Define `Wasmer::VERSION` in Rust directly.
Hywan May 4, 2021
098c8c4
feat: Rename `GlobalType.mutable` to `.mutable?` and `MemoryType.shar…
Hywan May 4, 2021
9dcb9d2
feat: Implement `Global.mutable?`, `.value` and `.type`.
Hywan May 4, 2021
d0886f5
feat: Implement `Global.value=`.
Hywan May 4, 2021
0d7cf16
test: Add more test cases for `Global`.
Hywan May 6, 2021
2bf1711
feat: Disallow passing more than one argument to `Exports.method_miss…
Hywan May 6, 2021
1095c44
feat: Implement `Function.call` and `Function.type`.
Hywan May 6, 2021
d04c6d1
test: Add missing test case for `Global`.
Hywan May 6, 2021
90f8480
feat: Implement upcast stuff for `rutie::Proc`.
Hywan May 6, 2021
21b78b9
feat: Start implementing `ImportObject`.
Hywan May 6, 2021
1008691
feat: Finish implementing `Function` when Wasm is calling it.
Hywan May 6, 2021
9cbf646
feat: Fully implement `ImportObject`.
Hywan May 6, 2021
e3ceee8
test: Add test case for `Global` in `ImportObject`.
Hywan May 6, 2021
23bab5b
feat: Implement `Memory.type`, `.size`, `.data_size` and `.grow`.
Hywan May 6, 2021
f2bd03c
feat: Allow types contained within invisible delimiters.
Hywan May 6, 2021
6a61e3e
feat: Implement memory views.
Hywan May 6, 2021
40b9a11
feat: Add `<Views>::BYTES_PER_ELEMENT` constant, and simplify code.
Hywan May 6, 2021
285a78b
test: Add test cases for memory views.
Hywan May 6, 2021
e7503a0
feat: Raise `IndexError` for out of bounds access in memory views.
Hywan May 7, 2021
cc84681
test: Add test case for `MemoryView.each`.
Hywan May 7, 2021
37881f2
feat: Implement `Enumerable` on memory views.
Hywan May 7, 2021
16c9e9b
test: Support more Ruby versions.
Hywan May 7, 2021
7529813
test: Fix PATH, run events, versions etc.
Hywan May 7, 2021
1479c61
test: Test imported memory in `ImportObject`.
Hywan May 7, 2021
c7de024
test: Test early exit in host function.
Hywan May 7, 2021
b528403
feat: Implement `Wasmer::Wasi::Version`.
Hywan May 7, 2021
25da73f
feat: Allow to declare nested module with `#[rubyclass(module = "Oute…
Hywan May 7, 2021
1d5d123
feat: Allow to return “`Self`” by returning `Ok(_ruby_self)`.
Hywan May 7, 2021
8d5400b
feat: Start implementing `Wasi::StateBuilder`.
Hywan May 7, 2021
8b81b39
feat: Implement `Wasmer::Wasi::Environment`.
Hywan May 10, 2021
5749ae3
feat: Implement `#[rubyfunction]` and `Wasi::get_version`.
Hywan May 10, 2021
a9b155a
fix: Remove unused imports.
Hywan May 10, 2021
dfc2551
test: Test `Wasi::StateBuilder.finalize`.
Hywan May 10, 2021
2c74f6d
test: Add WASI test cases.
Hywan May 10, 2021
81e984b
feat: Implement `wat2wasm` and `wasm2wat`.
Hywan May 10, 2021
83cfc59
doc: Write documentation in Rust.
Hywan May 10, 2021
e175802
Merge branch 'master' into feat-1.0
Hywan May 10, 2021
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
80 changes: 43 additions & 37 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,83 @@
name: Build and Test

on: [push]
on:
push:
branches:
- master
- staging
- trying
- 'prepare-*'
pull_request:
branches:
- '**'

jobs:
# The `test` job.
test:
name: Test
name: Build and Test

strategy:
matrix:
# The job runs on 2 different OS.
os: [ubuntu-latest] # , macos-latest, removed temporarily
ruby: [2.6.7, 2.7.3, 3.0.1]
target:
- id: 'linux-amd64'
os: 'ubuntu-latest'
target-name: 'x86_64-unknown-linux-gnu'
rust-toolchain: 'stable'

- id: 'darwin-amd64'
os: 'macos-latest'
target-name: 'x86_64-apple-darwin'
rust-toolchain: 'stable'

# As soon as one job fails in the matrix, all the other
# in-progress jobs are canceled.
fail-fast: true

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.target.os }}

steps:
- name: Check out code
uses: actions/checkout@v2

- name: Set up Rust
shell: bash
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
uses: actions-rs/toolchain@v1
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}
toolchain: ${{ matrix.target.rust-toolchain }}
default: true
override: true
target: ${{ matrix.target.target-name }}

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

- name: Cache Ruby versions
uses: actions/cache@v1
with:
path: ~/.rbenv/
key: ${{ runner.os }}-rbenv-versions

- name: Set up `rbenv` (with `rbenv-installer`)
if: matrix.os == 'ubuntu-latest'
- name: Set up `rbenv`
if: matrix.target.id == 'linux-amd64'
shell: bash
run: |
export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="$HOME/.rbenv/shims:$PATH"
sudo apt-get install -y libreadline-dev
test -d $HOME/.rbenv/bin || curl -fsSL https://github.com/rbenv/rbenv-installer/raw/master/bin/rbenv-installer | bash
sudo apt-get install rubygems
sudo apt install rbenv
sudo apt install rubygems

- name: Set up `rbenv` (with `brew`)
if: matrix.os == 'macos-latest'
- name: Set up `rbenv`
if: matrix.target.id == 'darwin-amd64'
shell: bash
run: |
export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="$HOME/.rbenv/shims:$PATH"
test -d $HOME/.rbenv/bin || brew install rbenv

- name: Set up Ruby
- name: Set up Ruby ${{ matrix.ruby }}
shell: bash
run: |
export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="$HOME/.rbenv/shims:$PATH"
test -d $HOME/.rbenv/versions/2.6.5/ || rbenv install 2.6.5
export PATH="$HOME/.rbenv/bin:$PATH"
rbenv install --skip-existing ${{ matrix.ruby }}

- name: Set up just
shell: bash
Expand All @@ -84,8 +88,10 @@ jobs:
- name: Compile the library
shell: bash
run: |
export PATH="$HOME/.rbenv/shims:$PATH"
export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="$HOME/.rbenv/versions/${{ matrix.ruby }}/bin:$PATH"
export PATH="$HOME/.cargo/bin:$PATH"
export PATH="$HOME/.rbenv/versions/2.6.5/bin:$PATH"
export GEM_HOME="$HOME/.gem"
gem install rake
gem install bundler
Expand All @@ -95,6 +101,6 @@ jobs:
shell: bash
run: |
export PATH="$HOME/.cargo/bin:$PATH"
export PATH="$HOME/.rbenv/versions/2.6.5/bin:$PATH"
export PATH="$HOME/.rbenv/versions/${{ matrix.ruby }}/bin:$PATH"
export GEM_HOME="$HOME/.gem"
just test
Loading