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!: decouple wasmer from Marine, replace it with generic backend interface #219

Merged
merged 187 commits into from
Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from 101 commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
5e7dae9
start moving marine-runtime to generic wasm backend
ValeryAntopol Feb 25, 2022
b960135
add ImportObject
ValeryAntopol Feb 26, 2022
6c94964
compilable state with Exports and Memory/MemoryView
ValeryAntopol Feb 28, 2022
daaa626
wrap DynFunc
ValeryAntopol Mar 1, 2022
4bd9958
wrap vm::Ctx (with more std::memory::transmute calls)
ValeryAntopol Mar 2, 2022
2d93770
code with errors
ValeryAntopol Mar 3, 2022
d9f9288
add get_func_no_args to Exports trait
ValeryAntopol Mar 5, 2022
7fdb10b
getting rid of wasmer's Type, Value and function-related types
ValeryAntopol Mar 14, 2022
dc643c3
implement get_func for ExportContext
ValeryAntopol Mar 15, 2022
dbdb55c
Replace errors with defined in backend traits
ValeryAntopol Mar 16, 2022
96e6605
use generic wasm backend in faas and app-service +fmt
ValeryAntopol Mar 17, 2022
ccf004b
get rid of wasmer-wasi dependenccy in generic wasm backend
ValeryAntopol Mar 18, 2022
c406376
organizing code in generic wasm backend
ValeryAntopol Mar 29, 2022
79d4e5f
Merge branch 'master' into marine-web-milestone2
ValeryAntopol Sep 19, 2022
c28f2d4
almost fixed build
ValeryAntopol Sep 21, 2022
ae146cf
fix something
ValeryAntopol Sep 27, 2022
40cb5f3
reach successful compilation
ValeryAntopol Sep 27, 2022
cde9b8f
marine-runtime tests passing
ValeryAntopol Sep 27, 2022
1b54653
marine-core tests are passing
ValeryAntopol Sep 27, 2022
c9fcf7f
fix cli build
ValeryAntopol Sep 27, 2022
4cd6abe
fmt
ValeryAntopol Sep 27, 2022
6834c3f
fix build with all features
ValeryAntopol Sep 27, 2022
d9d6b39
wip
ValeryAntopol Sep 30, 2022
d765d81
wip
ValeryAntopol Oct 7, 2022
50e438c
revert import_object change
ValeryAntopol Oct 24, 2022
5fe5d2a
Revert "wip"
ValeryAntopol Oct 24, 2022
6e3ba60
refactor short type names to long names, group types
ValeryAntopol Oct 24, 2022
4646d9c
move import traits to a separate file
ValeryAntopol Oct 25, 2022
a1cb208
add skeleton of js wasm backend for marine
ValeryAntopol Oct 27, 2022
2d7d78e
start implementing wasmtime backend + simplify wasm traits a little bit
ValeryAntopol Oct 28, 2022
b51f62a
remove unused code
ValeryAntopol Oct 28, 2022
a8f5545
wip: intoduce Store, start adding it to signatures, update wasmer bac…
ValeryAntopol Oct 30, 2022
3e0a131
switch do dyn ExportContext, get rid of some 'static requirements
ValeryAntopol Oct 30, 2022
546d7b4
more stores, impl functions for wasmtime
ValeryAntopol Oct 31, 2022
b113bbb
try embed Rc<RefCell<Store>> everywhere, without success
ValeryAntopol Oct 31, 2022
20d0331
get rid of Rc for Store, move interface-types deps to workspace
ValeryAntopol Dec 12, 2022
d023bd9
WIP just state stored
ValeryAntopol Dec 20, 2022
c6146ea
finally wasmer tests are passing
ValeryAntopol Dec 21, 2022
d36012d
Wasmtime version builds (but has todo!() in it)
ValeryAntopol Dec 21, 2022
c0e3a6c
fmt
ValeryAntopol Dec 21, 2022
e2522ba
implemented all todo!() in wasmtime, trying to get it to work
ValeryAntopol Dec 25, 2022
b00f666
[wip] making all required structs threadsafe
ValeryAntopol Dec 28, 2022
99b4da7
[wip] refactoring the refactoring: updating wasmer to 3.1.0, organizi…
ValeryAntopol Dec 29, 2022
faa8e0e
fmt
ValeryAntopol Dec 29, 2022
eda2878
wasm 3.1 backend implementation some progress
ValeryAntopol Dec 30, 2022
83eb155
wasm 3.1 backend implementation some progress (2) + fmt
ValeryAntopol Jan 5, 2023
25d61fe
WIP implementing typed func creation
ValeryAntopol Jan 8, 2023
fc924a4
Use only i32 instead of generic arguments for typed functions, looks …
ValeryAntopol Jan 11, 2023
671fb8b
replace more rc with arc, fix wasmer-wasi compilation issue
ValeryAntopol Jan 11, 2023
e82c8bd
wasmer backend almost works - only host imports and wasi tests fail, …
ValeryAntopol Jan 11, 2023
14fc429
catching wasmtime impl state to wasmer impl state, still does not com…
ValeryAntopol Jan 11, 2023
c1fc835
wasmtime impl in progress
ValeryAntopol Jan 11, 2023
1ff6389
most of the wasmtime tests are passing, call_parameters one hangs
ValeryAntopol Jan 12, 2023
cb3c64a
Fill wasi for wasmtime, fix mutex issue
ValeryAntopol Jan 16, 2023
46637a9
update comment/WasmBackend requirements
ValeryAntopol Jan 16, 2023
50ff2d1
get rid of edition = {workspace = true}
ValeryAntopol Jan 16, 2023
fd30b36
fmt
ValeryAntopol Jan 16, 2023
a350f8e
Wasmer memory passing try
ValeryAntopol Jan 17, 2023
2378c7e
wip
ValeryAntopol Jan 18, 2023
4089d9d
fisrt round of improving wasmtime error handlink completed
ValeryAntopol Jan 18, 2023
397a223
finalizing API, names, etc
ValeryAntopol Jan 20, 2023
fd39d70
patrial cargo fix
ValeryAntopol Jan 20, 2023
2e7f01e
fix warnings
ValeryAntopol Jan 20, 2023
ec25498
cargo fix wasmtime backend
ValeryAntopol Jan 20, 2023
2c30c91
fix more warnings
ValeryAntopol Jan 20, 2023
ad3b93a
add default marine-core and marine-runtime + fmt
ValeryAntopol Jan 20, 2023
6f4ee5a
add default marine-core and marine-runtime + fmt
ValeryAntopol Jan 20, 2023
99602bb
remove js backend template
ValeryAntopol Jan 20, 2023
ecd9f92
fix marine-js build
ValeryAntopol Jan 20, 2023
b3940bc
marge with master
ValeryAntopol Jan 20, 2023
07ec45c
fmt
ValeryAntopol Jan 20, 2023
ee42340
fix wasmer-backend build + use default backend from faas in repl
ValeryAntopol Jan 20, 2023
d845567
fmt
ValeryAntopol Jan 20, 2023
e99635d
remove all-features feature from CI
ValeryAntopol Jan 20, 2023
a645a89
fix warnings
ValeryAntopol Jan 20, 2023
147c943
Add basic documentation for the traits
ValeryAntopol Jan 24, 2023
b0e9737
Fix style, add copyrights and some comments
ValeryAntopol Jan 26, 2023
548c033
Merge branch 'master' into marine-web-milestone2
ValeryAntopol Jan 26, 2023
f0f4670
fix clippy warnings
ValeryAntopol Jan 30, 2023
a59cadc
fmt
ValeryAntopol Jan 30, 2023
382a56e
Merge branch 'master' into marine-web-milestone2
ValeryAntopol Jan 30, 2023
e554b33
update Cargo.lock
ValeryAntopol Jan 30, 2023
af8550b
handle wasi errors in wasmtime
ValeryAntopol Jan 30, 2023
0b6bac7
cleanup comments
ValeryAntopol Jan 30, 2023
30c8ff0
bump paste crate version
ValeryAntopol Feb 1, 2023
17ca103
use paster 1.0.9
ValeryAntopol Feb 2, 2023
81f896f
add a non-default constructor of WasmBackend
ValeryAntopol Feb 8, 2023
65cc2bc
fix u32 overflow
ValeryAntopol Feb 8, 2023
42e7bff
fix wasi preopens/mapped_dirs
ValeryAntopol Feb 8, 2023
53386c7
disable debug info in wasmtime
ValeryAntopol Feb 8, 2023
e028199
fix dirs in wasi
ValeryAntopol Feb 9, 2023
38bb379
fmt
ValeryAntopol Feb 9, 2023
856bef3
wrap mutex.lock() with block of code + add logs
ValeryAntopol Feb 10, 2023
332b155
remove unused import
ValeryAntopol Feb 10, 2023
0fbeada
use published interface-types
ValeryAntopol Feb 14, 2023
5d50c71
fix wasmmer backend impl
ValeryAntopol Feb 14, 2023
d466129
fix clippy warnings
ValeryAntopol Feb 14, 2023
cf69428
increase stack size for wasms produced
ValeryAntopol Feb 14, 2023
7263164
improve MarineCore docs
ValeryAntopol Feb 14, 2023
08bf9a7
update package-lock.json
ValeryAntopol Feb 16, 2023
ab07be0
remove From<()> for MError
ValeryAntopol Feb 17, 2023
bf4b3bd
pr fixes
ValeryAntopol Feb 17, 2023
9ce4066
pr fixes
ValeryAntopol Feb 17, 2023
a4fa939
pr fixes
ValeryAntopol Feb 17, 2023
acc4dab
pr fixes
ValeryAntopol Feb 17, 2023
3e5913d
pr fixes
ValeryAntopol Feb 17, 2023
599289f
fix imports
ValeryAntopol Feb 17, 2023
aa698e2
fix service default mapped dirs
ValeryAntopol Feb 20, 2023
7369271
pr fixes
ValeryAntopol Feb 20, 2023
3a22704
pr fixes
ValeryAntopol Feb 20, 2023
a4e8106
make all todos uppercase
ValeryAntopol Feb 20, 2023
ebd32c3
move wasi params into struct
ValeryAntopol Feb 20, 2023
631e7f6
diallow unused wasm_instance
ValeryAntopol Feb 20, 2023
368d327
newline
ValeryAntopol Feb 20, 2023
924d69a
remove a comment
ValeryAntopol Feb 20, 2023
2706771
move feature-dependent import to imprts group
ValeryAntopol Feb 20, 2023
272f6d6
pr fixes, clippy fixes
ValeryAntopol Mar 6, 2023
1723fc2
use parking_lot mutex
ValeryAntopol Mar 6, 2023
e3c148d
pr fixes
ValeryAntopol Mar 6, 2023
ab3e6aa
pr fixes
ValeryAntopol Mar 6, 2023
94d2169
pr fixes
ValeryAntopol Mar 6, 2023
661474e
Merge branch 'master' into marine-web-milestone2
ValeryAntopol Mar 6, 2023
be448f6
fix after merge
ValeryAntopol Mar 6, 2023
21c1cf4
remove wasmer backend
ValeryAntopol Mar 6, 2023
d97a9d8
fix comment
ValeryAntopol Mar 6, 2023
83d5cfb
pr fixes
ValeryAntopol Mar 6, 2023
63cd83b
remove resolver = 2
ValeryAntopol Mar 6, 2023
86ca569
flatten use statements everywhere
ValeryAntopol Mar 6, 2023
bff731a
pr fixes
ValeryAntopol Mar 6, 2023
4f30622
pr fixes
ValeryAntopol Mar 6, 2023
eba5ec5
fmt
ValeryAntopol Mar 6, 2023
5c8bc77
remove wasm backend parameter from public AppService interface
ValeryAntopol Mar 7, 2023
0a09336
Add memory index constant
ValeryAntopol Mar 7, 2023
a4db7db
Use RefCell for Store in MarineCore
ValeryAntopol Mar 7, 2023
a88ea23
Apply suggestions from code review
ValeryAntopol Mar 7, 2023
df09ac6
update comment
ValeryAntopol Mar 7, 2023
761b8e8
pr fixes
ValeryAntopol Mar 7, 2023
da556e8
pr fixes
ValeryAntopol Mar 7, 2023
a16aa18
pr fixes
ValeryAntopol Mar 7, 2023
037ee23
pr fixes
ValeryAntopol Mar 7, 2023
d6887bc
pr fixes
ValeryAntopol Mar 7, 2023
b6316bf
pr fixes
ValeryAntopol Mar 7, 2023
7d0fe18
make WasmBackend::new and Module::new return correct errors
ValeryAntopol Mar 8, 2023
0824034
use checked_add in memory operations
ValeryAntopol Mar 8, 2023
b719f5d
PR fixes
ValeryAntopol Mar 8, 2023
3c42887
pr fixes
ValeryAntopol Mar 8, 2023
7ac7195
pr fixes
ValeryAntopol Mar 8, 2023
7c0dbe4
pr fixes
ValeryAntopol Mar 8, 2023
3070c61
simplify custom sections api
ValeryAntopol Mar 8, 2023
33fe5fb
document code
ValeryAntopol Mar 8, 2023
4dbdc73
remove WasiVersion from API
ValeryAntopol Mar 8, 2023
2ab7485
refactor wasi in wasmtime
ValeryAntopol Mar 8, 2023
a753d3a
fix host imports after signature check introduced & clippy fixes
ValeryAntopol Mar 8, 2023
9155e5c
Merge branch 'master' into marine-web-milestone2
ValeryAntopol Mar 8, 2023
fcd4118
rename new_with_ctx -> new_with_caller
ValeryAntopol Mar 8, 2023
2f512d7
improve call_parameters fix
ValeryAntopol Mar 9, 2023
ded4136
PR fixes
ValeryAntopol Mar 9, 2023
23ac379
fix tests
ValeryAntopol Mar 9, 2023
b19e1c0
remove "wasmtime" feature
ValeryAntopol Mar 9, 2023
6dea82d
pr fixes
ValeryAntopol Mar 9, 2023
bf3d5c8
try to not export everything from marine-wasm-backend-traits
ValeryAntopol Mar 9, 2023
a28b26c
document `WasmBackend` trait
ValeryAntopol Mar 10, 2023
6886264
Revert "try to not export everything from marine-wasm-backend-traits"
ValeryAntopol Mar 10, 2023
c273030
make new crates publishable
ValeryAntopol Mar 13, 2023
87b15b9
fix imports
ValeryAntopol Mar 13, 2023
50746f9
Add Store docs
ValeryAntopol Mar 13, 2023
654c5b8
refactor default backend api in marine-runtime and marine-core
ValeryAntopol Mar 13, 2023
344e5a5
refactor public crate-level interface
ValeryAntopol Mar 13, 2023
7e85da5
make clippy happy
ValeryAntopol Mar 13, 2023
8c90d0e
fix build
ValeryAntopol Mar 13, 2023
c1120ff
fix CI
ValeryAntopol Mar 13, 2023
520d691
remove publish=true to fix e2e
ValeryAntopol Mar 14, 2023
b57406a
update wasmtime 4.0.0 -> 6.0.1
ValeryAntopol Mar 14, 2023
1962149
make clippy happy
ValeryAntopol Mar 14, 2023
e89d5e6
remove wasmer dependency
ValeryAntopol Mar 14, 2023
61e738a
make clippy happy
ValeryAntopol Mar 14, 2023
3088357
return all-features call into ci
ValeryAntopol Mar 14, 2023
bbd09cc
remove wasmer deps
ValeryAntopol Mar 14, 2023
18c94f6
remove raw-module-api feature from marine=core
ValeryAntopol Mar 14, 2023
b6d8009
fix comment
ValeryAntopol Mar 14, 2023
d7efe7e
some more self-review fixes
ValeryAntopol Mar 14, 2023
42ccaeb
move stack size config to particular test dir
ValeryAntopol Mar 14, 2023
f4c3187
Update core/src/marine_core.rs
ValeryAntopol Mar 14, 2023
f4e0b0c
Update core/src/module/marine_module.rs
ValeryAntopol Mar 14, 2023
ad9a22e
pr fix
ValeryAntopol Mar 14, 2023
41f92cd
fix cargo config
ValeryAntopol Mar 14, 2023
b0b2feb
pr fixes
ValeryAntopol Mar 14, 2023
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
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
[registries]
fluence = { index = "git://crates.fluence.dev/index" }

[target.wasm32-wasi]
rustflags = [
"-C", "link-args=-zstack-size=52428800",
ValeryAntopol marked this conversation as resolved.
Show resolved Hide resolved
]
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:

- name: Run cargo check
run: |
cargo check -v --all-features \
cargo check -v --features "wasmtime raw-module-api" \
ValeryAntopol marked this conversation as resolved.
Show resolved Hide resolved
-p marine-core \
-p marine \
-p fluence-app-service \
Expand All @@ -76,7 +76,7 @@ jobs:

- name: Run cargo test
run: |
cargo test --release -v --all-features \
cargo test --release -v --features "wasmtime raw-module-api" \
-p marine-core \
-p marine \
-p fluence-app-service \
Expand Down
2 changes: 1 addition & 1 deletion .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
edition = "2018"
edition = "2021"

reorder_imports = false
reorder_modules = false
Loading