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 611 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
611 commits
Select commit Hold shift + click to select a range
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
1d8d440
compiling with functionality added, todo in 987 hit
cpetig Dec 11, 2024
61e9b20
Stream new needs implementation
cpetig Dec 11, 2024
d5d419a
stream new impl
cpetig Dec 29, 2024
7b8b5fe
should the futures be Send?
cpetig Dec 30, 2024
caa2e50
read is now called
cpetig Jan 2, 2025
16e7399
read implemented
cpetig Jan 2, 2025
c7ab163
read implementation
cpetig Jan 2, 2025
431b90f
revise event design
cpetig Jan 2, 2025
265f4ed
proper blocking
cpetig Jan 2, 2025
72af9d1
add poor man's tracing
cpetig Jan 3, 2025
f0c3968
more meaningful tracing
cpetig Jan 3, 2025
d5ca598
sending numbers work
cpetig Jan 3, 2025
406495d
event subscriptions can only be used once for registration ...
cpetig Jan 3, 2025
54746f1
the problem is with wait_on
cpetig Jan 4, 2025
60bcdea
wait on should consume the object
cpetig Jan 4, 2025
2ef5e13
preparation for more clean design
cpetig Jan 4, 2025
543ad8c
memory leak fixed, cleaner code
cpetig Jan 4, 2025
c89ced5
fully working again (main read in progress)
cpetig Jan 4, 2025
19bca45
first two stream values arrive in main
cpetig Jan 4, 2025
95febdf
prepare for reset
cpetig Jan 4, 2025
13b99ee
reset implementation
cpetig Jan 4, 2025
9e5eef9
clean up subscription logic
cpetig Jan 4, 2025
8aac26a
still blocked somewhere
cpetig Jan 4, 2025
6943ab7
not properly cleaning up, but the data arrives
cpetig Jan 4, 2025
d8af6cb
avoid overly registering callbacks
cpetig Jan 5, 2025
e6dbfdb
wow, the streaming example works
cpetig Jan 5, 2025
120e594
plug one memory leak and clean up
cpetig Jan 5, 2025
73884fb
remove vtable
cpetig Jan 5, 2025
17ffb99
stream is half abstracted
cpetig Jan 5, 2025
7d5cfd3
fully abstracted but sill unsafe stream operations
cpetig Jan 5, 2025
d3873c8
more nicely encapsulated
cpetig Jan 5, 2025
7729012
code simplification
cpetig Jan 5, 2025
f2ffac3
more attempts removed
cpetig Jan 5, 2025
b6ccc9a
memory leak is fixed
cpetig Jan 5, 2025
fe42b8d
revise atomic and shorten path
cpetig Jan 5, 2025
c8779b5
fix warning
cpetig Jan 5, 2025
2034281
document and simplify the async calling convention
cpetig Jan 7, 2025
a281ce3
apply async calling simplification to stream example
cpetig Jan 7, 2025
e4eccb0
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jan 8, 2025
c717537
post merge fixes
cpetig Jan 8, 2025
2bc07ef
update wasm-tools
cpetig Jan 8, 2025
5aa3659
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindgen
cpetig Jan 9, 2025
c4b35cd
update wasm-tools
cpetig Jan 9, 2025
09bd794
simplify code by leveraging Joels latest changes
cpetig Jan 9, 2025
6b04c5c
Merge remote-tracking branch 'origin'
cpetig Jan 11, 2025
abd6833
adapt to new version, simplify
cpetig Jan 11, 2025
06af93e
start moving stream impl into shared object
cpetig Jan 11, 2025
823cb01
simplify the dependencies
cpetig Jan 11, 2025
703c5f4
Buffer implementation
cpetig Jan 11, 2025
1af9f22
needs more thought
cpetig Jan 11, 2025
a49a152
work in progress to use a WIT interface
cpetig Jan 12, 2025
85c45b0
linking needs some more tricks
cpetig Jan 12, 2025
123cf64
needs more implementation but links
cpetig Jan 12, 2025
e2a1afc
simplify interface
cpetig Jan 12, 2025
0de6876
fix crash
cpetig Jan 12, 2025
a850d15
besides tear down everything works
cpetig Jan 12, 2025
1ef3ddb
better eof handling, but not yet good
cpetig Jan 12, 2025
f19d9d2
proper EOF implementation
cpetig Jan 12, 2025
c9f748a
clean up
cpetig Jan 12, 2025
1f88139
start C++ nightmare experiment
cpetig Jan 12, 2025
392ba14
partially working C++ example
cpetig Jan 13, 2025
e0a2654
ignore
cpetig Jan 13, 2025
97d5c39
correct waiting time
cpetig Jan 13, 2025
6ee1647
oncelock implementation
cpetig Jan 14, 2025
f7e0376
Option works equally well
cpetig Jan 14, 2025
5ce3513
fully operational C++ async example
cpetig Jan 15, 2025
ee6df24
feat: add support for `stream` with no `<T>`
rvolosatovs Jan 17, 2025
1705cc2
test: return `future` in future return test WIT
rvolosatovs Jan 17, 2025
484cea3
build: update wasm-tools
rvolosatovs Jan 17, 2025
01a9ad0
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindge…
cpetig Jan 21, 2025
adbde38
dependency update (needs more)
cpetig Jan 21, 2025
f1e6d81
Merge remote-tracking branch 'dicej/feat/stream-unit' into work-in-pr…
cpetig Jan 21, 2025
3398ecf
fix compilation after merge
cpetig Jan 21, 2025
5c290a1
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindge…
cpetig Jan 22, 2025
fd745c0
initial future prototype
cpetig Jan 22, 2025
985ebf9
small correction
cpetig Jan 22, 2025
06d8438
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindge…
cpetig Jan 31, 2025
a8555cb
update wasm-tools
cpetig Jan 31, 2025
38cb692
initial future impl, still Send trouble
cpetig Jan 31, 2025
0511f6a
this solves the Send problem
cpetig Feb 1, 2025
cb6ba7e
clean up stream example, initial future impl
cpetig Feb 1, 2025
da20a27
more implementation
cpetig Feb 1, 2025
50f9ad8
future impl
cpetig Feb 1, 2025
bf26bbc
future works fine
cpetig Feb 1, 2025
d7cddb7
fix the endless wait in the stream example
cpetig Feb 2, 2025
94ca086
fix compilation with wamr
cpetig Feb 5, 2025
c0f4728
Merge remote-tracking branch 'origin/main' into work-in-progress
cpetig Feb 10, 2025
4ff1fe3
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindge…
cpetig Mar 9, 2025
e7e90c5
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindge…
cpetig Mar 9, 2025
253ad8d
fix compilation after large merge
cpetig Mar 9, 2025
a833dc9
regenerate
cpetig Mar 9, 2025
8f12fd8
better alignment with latest codegen
cpetig Mar 9, 2025
97db7e3
a function returning a stream is likely not async
cpetig Mar 9, 2025
93b91e1
make create non-async
cpetig Mar 9, 2025
0a3d251
fix c++ name
cpetig Mar 9, 2025
b3bba17
introduce from_handle (closer to canonical code)
cpetig Mar 9, 2025
9704aa1
stream code generation for symmetric
cpetig Mar 9, 2025
c2edf55
fix compilation
cpetig Mar 9, 2025
00e8ed7
fully operational generator
cpetig Mar 9, 2025
5313d16
Merge branch 'main' of https://github.com/bytecodealliance/wit-bindge…
cpetig Mar 16, 2025
68ce1b7
fix return pointer usage
cpetig Mar 16, 2025
827a35d
remove merge artifacts to shrink the difference to main
cpetig Mar 16, 2025
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
Prev Previous commit
Next Next commit
…into work-in-progress
  • Loading branch information
cpetig committed Mar 16, 2025
commit 5313d16de6e750581bd9fab9bc9a56bad2252f37
5 changes: 4 additions & 1 deletion .github/actions/install-wasi-sdk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ runs:
uses: bytecodealliance/actions/wasm-tools/setup@v1
with:
version: "1.215.0"
github_token: ${{ github.token }}
- name: Setup `wasmtime`
uses: bytecodealliance/actions/wasmtime/setup@v1
with:
version: "30.0.1"
38 changes: 16 additions & 22 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,24 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
# moonbit removed from language matrix for now - causing CI failures
lang: [c, rust, teavm-java, go, csharp]
lang: [c, rust, csharp]
exclude:
# For now csharp doesn't work on macos, so exclude it from testing.
- os: macos-latest
lang: csharp
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Rust
run: rustup update stable --no-self-update && rustup default stable
- run: rustup target add wasm32-wasip1
- run: rustup target add wasm32-wasip1 wasm32-wasip2

- run: rustup target add wasm32-unknown-unknown
if: matrix.lang == 'rust'

- uses: ./.github/actions/install-wasi-sdk
if: matrix.lang == 'c' || (matrix.lang == 'csharp' && matrix.os == 'windows-latest')

- name: Setup .NET
uses: actions/setup-dotnet@v4
Expand All @@ -95,29 +98,21 @@ jobs:
shell: powershell
if: matrix.os == 'windows-latest' && matrix.lang == 'moonbit'

- run: ci/download-teavm.sh
if: matrix.lang == 'teavm-java'
- uses: actions/setup-java@v4
if: matrix.lang == 'teavm-java'
with:
java-version: '18'
distribution: 'adopt'

- uses: actions/setup-go@v4
if: matrix.lang == 'go'
with:
go-version: '1.20'
- uses: acifani/setup-tinygo@v2
if: matrix.lang == 'go'
with:
tinygo-version: 0.31.0

- run: |
cargo test \
-p wit-bindgen-cli \
-p wit-bindgen-${{ matrix.lang }} \
--no-default-features \
--features ${{ matrix.lang }}
--features ${{ matrix.lang }} \
--release
- run: |
cargo run test --languages rust,${{ matrix.lang }} tests/codegen \
--artifacts target/artifacts \
--rust-wit-bindgen-path ./crates/guest-rust
- run: |
cargo run test --languages rust,${{ matrix.lang }} tests/runtime-new \
--artifacts target/artifacts \
--rust-wit-bindgen-path ./crates/guest-rust

test_unit:
name: Crate Unit Tests
Expand Down Expand Up @@ -156,7 +151,6 @@ jobs:
- run: cargo build --no-default-features
- run: cargo build --no-default-features --features rust
- run: cargo build --no-default-features --features c
- run: cargo build --no-default-features --features teavm-java
- run: cargo build --no-default-features --features go
- run: cargo build --no-default-features --features csharp
- run: cargo build --no-default-features --features markdown
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.