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

Draft: Planning for merging some important parts of my fork upstream #1098

Draft
wants to merge 509 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
509 commits
Select commit Hold shift + click to select a range
cd1db36
fix guest import borrow
cpetig May 9, 2024
aa7f4d0
get two more guest resource usages right
cpetig May 9, 2024
7753930
fix exported consuming funcs
cpetig May 9, 2024
2cbd72e
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig May 10, 2024
02cca33
bring native reference closer to generated code
cpetig May 10, 2024
04e4398
proper release of resources returned
cpetig May 12, 2024
3498f46
mostly working host resource codegen
cpetig May 12, 2024
78d2a2f
fix small glitch
cpetig May 12, 2024
15ba304
generated code isn't that pretty but it works
cpetig May 12, 2024
d1a3d88
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig May 17, 2024
0197779
add future and stream support
dicej May 2, 2024
02c7762
bridge skeleton
cpetig May 19, 2024
573b111
initial bridge output
cpetig May 19, 2024
49b3bce
function names
cpetig May 19, 2024
f3b5e59
prologue
cpetig May 19, 2024
713377c
custom name
cpetig May 19, 2024
f3ebc95
work in progress
cpetig May 19, 2024
0be350a
initial w2c2 example
cpetig May 20, 2024
064929d
initial w2c2 prototype
cpetig May 20, 2024
25a8005
fmt
cpetig May 20, 2024
0c229c8
more complex than expected, but solveable
cpetig May 20, 2024
67b7701
oh, the to be generated code is quite complex due to 32bit vs 64bit
cpetig May 20, 2024
7899b4a
add a readme and point out incomplete code generation
cpetig May 20, 2024
ec9fb8b
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig May 23, 2024
da94a03
implement initial splitting prototype
cpetig May 23, 2024
cc0c055
separate files for resources
cpetig May 23, 2024
32c35e9
support `task.wait`
dicej May 28, 2024
4c57c30
more of the mesh skeleton
cpetig May 29, 2024
98efeb8
proper prefix
cpetig May 29, 2024
25f5e4c
mesh example
cpetig May 29, 2024
a76be92
remove backup file
cpetig May 31, 2024
7352f6b
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig May 31, 2024
fa09681
fix compilation with latest upstream changes
cpetig May 31, 2024
ed631cd
more extensive type documentation
cpetig May 31, 2024
257842f
make clean + forwarder start
cpetig Jun 1, 2024
028b546
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jun 6, 2024
7ea34eb
fix memory leak
cpetig Jun 6, 2024
aebac65
clang format
cpetig Jun 6, 2024
0b35385
fix crash hidden by leak
cpetig Jun 6, 2024
e5d11f2
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jun 8, 2024
91e4982
correct object destruction logic and fix wrong address
cpetig Jun 8, 2024
90082e5
proper code fix, no leak in Rust, double free in C++
cpetig Jun 8, 2024
1fe949b
fix double free problem in the C++ guest (éxported resources)
cpetig Jun 9, 2024
0faf9bf
properly delete the object, only one leak remaining
cpetig Jun 9, 2024
72e0eb2
here is the second part of the necessary change, no leaks anymore
cpetig Jun 9, 2024
41f5ea0
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jun 14, 2024
078c06f
add wamr example
cpetig Jun 15, 2024
a1807ed
add more wamr parts
cpetig Jun 15, 2024
afb1cb7
fully complete wamr example
cpetig Jun 15, 2024
6e96c84
Update readme
cpetig Jun 15, 2024
5338716
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jun 20, 2024
a5b54ef
smallvec hash correction
cpetig Jun 20, 2024
0669d9b
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jun 22, 2024
254ee77
adapt to new interface signature
cpetig Jun 22, 2024
c3c6d93
first example of meshless resource usage
cpetig Jun 23, 2024
d0ede2b
explain meshless folder
cpetig Jun 23, 2024
be3ac11
initial version of meshless strings, still wrong handling of malloc/free
cpetig Jun 23, 2024
76bafd9
fully working meshless strings
cpetig Jun 25, 2024
7951143
readme update
cpetig Jun 25, 2024
ee1e8f2
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jun 29, 2024
143ac3c
meshless: easy part with imported resources in Rust
cpetig Jul 2, 2024
58e67f6
update
cpetig Jul 2, 2024
845b284
meshless/symmetric strings with Rust
cpetig Jul 2, 2024
397b8ed
initial prototype for exported resource in Rust
cpetig Jul 6, 2024
164aec0
fully working rust example
cpetig Jul 6, 2024
949edf0
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jul 9, 2024
5107e65
introduce symmetric option, support empty with for Rust
cpetig Jul 9, 2024
4aa0c49
first steps towards symmetric calling convention
cpetig Jul 9, 2024
c9e5a24
imperfect cabi_post call
cpetig Jul 9, 2024
08820f6
proper cabi_post calls
cpetig Jul 9, 2024
410cd32
quite accurate code generation for symmetric string
cpetig Jul 10, 2024
ef0d4fd
symmetric code generation for strings works (only prefix missing)
cpetig Jul 10, 2024
33dbde7
regenerated code
cpetig Jul 10, 2024
a7b79bf
fix resource import
cpetig Jul 11, 2024
77bfa5e
using pointers in import probably works to omit a resource table
cpetig Jul 11, 2024
c93ae05
symmetric with address seems to work just fine
cpetig Jul 11, 2024
f1b8ef8
correct the types of the resource functions
cpetig Jul 11, 2024
eb09bf1
cargo fmt
cpetig Jul 11, 2024
3658850
replace dtor by res-drop (still wrong contents)
cpetig Jul 12, 2024
ffd06f5
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jul 12, 2024
dae55ed
work in progress
cpetig Jul 12, 2024
a166ddb
fully working symmetric C++ codegen
cpetig Jul 12, 2024
e05bcdd
prepare for pointers as id
cpetig Jul 12, 2024
a2c77a8
restructure for using pointers, still has a leak in R::drop
cpetig Jul 12, 2024
7330c92
this implementation of the dtor feels inelegant but it works fine
cpetig Jul 13, 2024
7fe9f8d
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jul 16, 2024
c49fd70
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jul 17, 2024
7618224
fix crash generating fusion
cpetig Jul 17, 2024
5887d50
second thought: Allocate ret_buf by the caller, first half
cpetig Jul 18, 2024
fc24a0d
revised symmetric code generation
cpetig Jul 18, 2024
b33aafe
generated code is now correct again
cpetig Jul 18, 2024
6c46c39
Merge remote-tracking branch 'dicej/async' into async
cpetig Jul 20, 2024
df5bbea
Merge branch 'async'
cpetig Jul 20, 2024
f4ce621
fix tests and return value
cpetig Jul 20, 2024
6fb498d
make async argument optional
cpetig Jul 20, 2024
aa46b69
initial support for automatic pointer width code
cpetig Jul 21, 2024
1833302
properly implement portable size and align expressions
cpetig Jul 21, 2024
68bb99c
fix Rust and C codegen
cpetig Jul 21, 2024
4067e8f
regenerate symmetric strings, enable symmetric mode
cpetig Jul 21, 2024
01037f9
dependency update
cpetig Jul 21, 2024
3def618
proper support for option<handle> lifting
cpetig Jul 21, 2024
7d12a44
fix(markdown): update primary link to match behavior from #818 (#1008)
lachieh Jul 23, 2024
69d3ced
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jul 25, 2024
4a57daf
beginning of symmetric support
cpetig Jul 25, 2024
01b4216
proper cabi_post prefix
cpetig Jul 25, 2024
be953c1
fully functional Rust code generation for symmetric strings example
cpetig Jul 26, 2024
5e8a2e3
format the Rust code
cpetig Jul 26, 2024
57b6b33
first half of ptr sized handles
cpetig Jul 26, 2024
a3128b7
remove some casts
cpetig Jul 26, 2024
1dbfd83
add some compatibility casts, meshless res import fully functional
cpetig Jul 26, 2024
860b1d3
first fully working symmetric resource generation
cpetig Jul 28, 2024
d1f7e15
Merge remote-tracking branch 'origin/main'
cpetig Jul 29, 2024
8d764ad
merge from origin main
cpetig Aug 1, 2024
df019cf
small merge fix and dependency update
cpetig Aug 1, 2024
a2d05a7
simplify the logic by using owned results
cpetig Aug 1, 2024
888d8a7
symmetric C++ code matches new convention
cpetig Aug 1, 2024
3b47e3a
proper Rust code generation for symmetric
cpetig Aug 1, 2024
a63d226
Merge remote-tracking branch 'origin'
cpetig Aug 3, 2024
2b747f1
use the new SizeAlign64 type intended for upstream
cpetig Aug 3, 2024
0f2c647
fix storing of u8 and u16 types
cpetig Aug 3, 2024
cbba000
Merge remote-tracking branch 'origin/main'
cpetig Aug 10, 2024
317ab27
properly guard wit-guest against multiple inclusion
cpetig Aug 25, 2024
fec5e49
adapt to newer wamr version
cpetig Aug 25, 2024
51dc044
Merge remote-tracking branch 'origin/main'
cpetig Aug 26, 2024
4b5121b
fix post-merge conflicts
cpetig Aug 26, 2024
3eea267
size and alignment fixes
cpetig Aug 27, 2024
ee038e1
example for symmetric API
cpetig Aug 28, 2024
512b955
fix warnings
cpetig Aug 28, 2024
fe7816f
fix another warning
cpetig Aug 28, 2024
a46c041
new symmetric API for strings
cpetig Aug 28, 2024
e9d9c4e
regenerate
cpetig Aug 28, 2024
5f0ec6c
symmetric API
cpetig Aug 28, 2024
3d79f54
Initial (failing) symmetric smoke test
cpetig Aug 31, 2024
e724874
correct root function export/import for smoke test in symmetric
cpetig Aug 31, 2024
4610935
force linking, needs RUSTFLAGS as well
cpetig Aug 31, 2024
05da87b
fully operational symmetric smoke test
cpetig Aug 31, 2024
b9ede95
symmetric c++ test
cpetig Aug 31, 2024
9688771
report more errors
cpetig Aug 31, 2024
a4c7bd2
failing strings example
cpetig Aug 31, 2024
068eb7c
numbers test
cpetig Aug 31, 2024
ca5b357
fix lifting of empty strings (symmetric)
cpetig Sep 1, 2024
7fde681
fix warning in test case
cpetig Sep 1, 2024
84286db
lists symmetric test
cpetig Sep 1, 2024
a2f5cd7
oh, the errors for symmetric lists cancelled each other out
cpetig Sep 1, 2024
166460f
test both canonical and non-canonical lists
cpetig Sep 1, 2024
034e7c6
symmetric list memory fixes
cpetig Sep 1, 2024
44a5a1e
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Sep 2, 2024
6061442
emergency fix
ChristofPetig Sep 2, 2024
ea8ba2d
require less than Rust 1.81
cpetig Sep 2, 2024
2fbe979
fix creation of the directory
cpetig Sep 2, 2024
a0864a6
more elaborate explanation
cpetig Sep 2, 2024
fe95f9d
test the new API
cpetig Sep 2, 2024
b9ee2fa
fix the memory leak with new API and canonical ABI
cpetig Sep 2, 2024
797ca6c
register the Rust strings test and exercise new API symmetric tests
cpetig Sep 2, 2024
f661f88
quick fix to remove the leak from symmetric calls
cpetig Sep 3, 2024
43e8f63
Merge remote-tracking branch 'origin/main'
cpetig Sep 5, 2024
fc5839c
failing flavorful test
cpetig Sep 5, 2024
8c2033f
C++ vector example (in progress)
cpetig Sep 8, 2024
8b0a128
Merge remote-tracking branch 'origin/main'
cpetig Sep 8, 2024
3f127a4
more C++ functionality
cpetig Sep 8, 2024
22c90a2
Merge remote-tracking branch 'origin/main'
cpetig Sep 9, 2024
75754fb
more testcode
cpetig Sep 9, 2024
960d2af
Merge remote-tracking branch 'origin/main'
cpetig Sep 11, 2024
66b86f2
more vector preparation
cpetig Sep 11, 2024
efe2007
wit vector construction in memory
cpetig Sep 11, 2024
816d99b
comparison implementations
cpetig Sep 11, 2024
f6405c5
fix compilation with newest wasm-tools
cpetig Sep 11, 2024
5e9d573
first round of C++ vector fixes
cpetig Sep 11, 2024
068a918
arguments as view
cpetig Sep 11, 2024
b94280a
promising vector element reconstruction
cpetig Sep 11, 2024
16700dd
fully linking c++ lists example (with codegen modifications)
cpetig Sep 12, 2024
0c2dd18
fix cabi_post symbol
cpetig Sep 12, 2024
5d2bfb8
nearly perfect on lists
cpetig Sep 12, 2024
ccaf0ca
deallocate arguments in canonical ABI
cpetig Sep 12, 2024
da06159
properly free vector contents
cpetig Sep 13, 2024
f0ac515
fix native compilation
cpetig Sep 13, 2024
28e88c0
correct symmetric new-api lists
cpetig Sep 13, 2024
9378435
ignore more
cpetig Sep 13, 2024
e6b0b68
leak if necessary
cpetig Sep 13, 2024
85b7e73
prefix import and export if both used in symmetric
cpetig Sep 14, 2024
5ccecf8
implement import prefix
cpetig Sep 14, 2024
fb670b1
implement direction disambiguation for C++, fixes #28
cpetig Sep 14, 2024
c922f58
more correct interaction with Rust
cpetig Sep 14, 2024
05a6951
half complete list fix
cpetig Sep 14, 2024
53d0579
fix lists in symmetric mode
cpetig Sep 14, 2024
e5e1f9f
fix many symmetric tests
cpetig Sep 14, 2024
1935b68
flavorful example works
cpetig Sep 14, 2024
2ad3cc3
options test (work in progress)
cpetig Sep 15, 2024
fa5993f
options test
cpetig Sep 15, 2024
6f8cd9b
fix option test
cpetig Sep 17, 2024
844f7fa
the new API works better
cpetig Sep 17, 2024
c126746
more tests
cpetig Sep 17, 2024
47c935b
working records test
cpetig Sep 17, 2024
5eb93d9
another test ready
cpetig Sep 17, 2024
add926f
results test
cpetig Sep 17, 2024
91b69ab
work in progress
cpetig Sep 17, 2024
ab12734
Merge remote-tracking branch 'origin'
cpetig Sep 19, 2024
516265b
fix merge mistake
cpetig Sep 19, 2024
ee1d0c2
Merge remote-tracking branch 'origin'
cpetig Sep 25, 2024
ad27e9c
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Oct 7, 2024
57ab9c0
post merge fixes
cpetig Oct 7, 2024
835c213
implement symmetric tests as a single workspace
cpetig Oct 8, 2024
3ba5572
first draft of async lift/lower for Rust generator
dicej Mar 22, 2024
d4e6f42
Merge remote-tracking branch 'origin/main'
cpetig Nov 1, 2024
00845f8
update wasm-tools dependency
cpetig Nov 2, 2024
e6d11f0
Merge remote-tracking branch 'dicej/async'
cpetig Nov 2, 2024
59b14a8
small fix
cpetig Nov 2, 2024
a73e05e
fix compilation after merge
cpetig Nov 2, 2024
2f305f1
fix symmetric testing
cpetig Nov 2, 2024
79565c6
fix test generation
cpetig Nov 2, 2024
3cf333f
fix strings test (both old and new API)
cpetig Nov 2, 2024
8ebfc1e
Add support for async/streams/futures to Rust generator
dicej Mar 22, 2024
2f37f79
add `async: true` case to Rust `codegen_tests`
dicej Nov 19, 2024
66bec93
Merge remote-tracking branch 'origin/main'
cpetig Nov 19, 2024
7c27b23
tools update
cpetig Nov 19, 2024
97a5f16
Merge remote-tracking branch 'dicej/async'
cpetig Nov 20, 2024
456e995
Add support for async/streams/futures to Rust generator
dicej Mar 22, 2024
bac91e9
Merge remote-tracking branch 'origin/main'
cpetig Nov 20, 2024
38649cf
Merge remote-tracking branch 'dicej/async'
cpetig Nov 20, 2024
85702e7
post merge cleanup
cpetig Nov 20, 2024
bbbe3bc
fix test generation
cpetig Nov 20, 2024
df459f7
remove async_support::poll_future
dicej Nov 27, 2024
048bfc6
Merge remote-tracking branch 'dicej/async'
cpetig Nov 27, 2024
883fd9a
Merge remote-tracking branch 'origin/main'
cpetig Nov 27, 2024
43c22c9
Merge remote-tracking branch 'origin/main'
cpetig Dec 3, 2024
9e6ebb8
wasm-tools update (doesn't fix test failure)
cpetig Dec 3, 2024
d3afd51
add stream/future read/write cancellation support
dicej Dec 5, 2024
74f436d
Merge remote-tracking branch 'origin/main'
cpetig Dec 7, 2024
9dc5739
Merge remote-tracking branch 'dicej/async'
cpetig Dec 7, 2024
c2da9a9
symmetric executor skeleton
cpetig Dec 7, 2024
0eeacb1
initial sleep trigger implementation
cpetig Dec 7, 2024
e498eb6
async module skeleton
cpetig Dec 7, 2024
0d1408e
incomplete main implementation
cpetig Dec 7, 2024
f10ed05
module implementation start
cpetig Dec 7, 2024
7da80c8
more implementation
cpetig Dec 8, 2024
3de2d9b
more poll impl
cpetig Dec 8, 2024
f9c50fc
poll logic
cpetig Dec 8, 2024
3d823f4
fix linking and full main implementation
cpetig Dec 8, 2024
8b001bc
timeout creation
cpetig Dec 8, 2024
9ca80e0
implement wait_for
cpetig Dec 8, 2024
41776f3
event creation
cpetig Dec 8, 2024
4c19fbd
subscribe
cpetig Dec 8, 2024
dddc8cd
implement register (incomplete)
cpetig Dec 8, 2024
1a71fcf
move subscription object out
cpetig Dec 8, 2024
200a8c7
implement wait and triggering
cpetig Dec 8, 2024
c64b08e
fix crash, still some leaks
cpetig Dec 8, 2024
fdbac20
note problem and fix warnings
cpetig Dec 8, 2024
9924843
native stream test, work in progress
cpetig Dec 8, 2024
289d2f8
more stream prototype implementation
cpetig Dec 9, 2024
685cdd9
ongoing transition to symmetric ABI
cpetig Dec 9, 2024
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
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "tests/codegen/wasi-clocks"]
path = tests/codegen/wasi-clocks
url = https://github.com/WebAssembly/wasi-clocks
[submodule "crates/cpp/tests/wasm-micro-runtime"]
path = crates/cpp/tests/wasm-micro-runtime
url = https://github.com/bytecodealliance/wasm-micro-runtime.git
Loading
Loading