Commit Graph

1236 Commits

Author SHA1 Message Date
Flori a2e1567ecf
wasm support, bugfixes (#446)
This PR fixes #430 and enables full support for the
`wasm32-unknown-unknown` compilation target, making chorus the first(?)
Rust Discord-API implementation to support this target.
2023-11-22 17:30:20 +01:00
bitfl0wer fe5acc6e10
Update branch filter for push event 2023-11-22 16:43:48 +01:00
bitfl0wer b8b1a10c8b
Prevent CI from running twice on PR to main 2023-11-22 16:43:03 +01:00
bitfl0wer e756999828
Add tests for GatewayMessage to increase coverage 2023-11-22 16:34:43 +01:00
bitfl0wer 8a5537606a
Bump version, explain why custom `reqwest` 2023-11-22 16:14:47 +01:00
bitfl0wer f78af695d3
Update supported compilation target for Chorus to
versions 0.12.0 and up
2023-11-22 16:14:33 +01:00
Flori b7d4ff2f06
Full wasm support with `wasm-bindgen-futures` (#445)
This PR applies the necessary patches to correctly pass (all but two)
tests when compiling for wasm32-unknown-unknown.

2 tests have been disabled for wasm at the moment: test
messages::search_messages and test messages::send_message_attachment.
These two tests currently rely on `std::fs` to grab a file to
send/search for using chorus. This is not possible on wasm32-unknown,
because this target does not have a Filesystem, and does not emulate on
either. These two tests should be patched, but this should be good
enough for now.
2023-11-22 16:09:43 +01:00
bitfl0wer 14bbeb328a
Split up wasm-tests into 3 seperate tests 2023-11-22 15:13:26 +01:00
bitfl0wer 889db105da
Update supported platforms in README 2023-11-22 15:01:51 +01:00
bitfl0wer 60419473e2
Add fixme note about tests requiring std::fs 2023-11-22 14:52:49 +01:00
bitfl0wer 8bf28012e4
Replace #[tokio::test] w/ wasm-ok macro calls 2023-11-22 14:39:32 +01:00
bitfl0wer 383f1cafea
Remove broken test code 2023-11-22 14:24:10 +01:00
bitfl0wer 1c7e318201
Add wasm-bindgen-futures 2023-11-22 14:24:01 +01:00
bitfl0wer 233a89c6c5
add wasm friendly task spawning 2023-11-22 14:23:36 +01:00
bitfl0wer f63881dbd4
Remove 'handle', add wasm friendly task spawning 2023-11-22 14:23:33 +01:00
bitfl0wer e6417d8ddd
Add build instructions, especially for wasm 2023-11-22 14:20:45 +01:00
bitfl0wer 9ddf8dde1d
Add FIXME comments for wasm compatibility 2023-11-21 17:10:19 +01:00
bitfl0wer 1ad93e2c01
Revert "Spawn local gateway task on wasm32"
This reverts commit 325c3d324b.
2023-11-20 15:14:34 +01:00
bitfl0wer 0ff02447fc
Revert "Refactor heartbeat task to support WebAssembly"
This reverts commit f0a4fe62eb.
2023-11-20 15:14:28 +01:00
bitfl0wer f0a4fe62eb
Refactor heartbeat task to support WebAssembly 2023-11-20 14:57:45 +01:00
bitfl0wer 325c3d324b
Spawn local gateway task on wasm32 2023-11-20 14:47:13 +01:00
bitfl0wer 0acf3fb5f7
Fix formatting in test functions 2023-11-20 14:36:00 +01:00
bitfl0wer 42d512e4a1
Rename test function to
generate_general_configuration_schema_wasm
2023-11-20 14:22:00 +01:00
bitfl0wer ebb414cc8c
Remove unnecessary code 2023-11-20 14:15:23 +01:00
bitfl0wer 8eee0c816c
remove all .await from wasm tests 2023-11-20 14:11:56 +01:00
bitfl0wer c9858821ec
Merge branch 'dev' into feature/wasm32-unknown 2023-11-20 14:03:52 +01:00
bitfl0wer 4288455aec
Add tests for WASM 2023-11-20 14:03:06 +01:00
Flori 79353731b6
initial wasm32 'support' (#443)
* Give tungstenite types distinct names

* reorganize files

* Better feature locking, add wasm.rs

* Implement wasm Backend

* add wasm-bindgen-test

* Build & Test for wasm

* Add macos safari wasm test

* Add wasm32 target

* Add wasm.rs test

* Move wasm-pack installation before test execution

* Fix build on wasm32

* Fix examples depending on tokio::time

* fix clippy warn

* Add example wasm bindgen test

* Add wasm-bindgen to Cargo.toml

* Add wasm test configuration

* Install wasm-bindgen-cli on linux

* Add  wasm-bindgen-cli to macos

* Correct "vers" to "version"

* Attempt to locate correct geckodriver

* Run wasm tests first

* maybe this will fix ci :clueless:

* Move wasm-bindgen-cli install

* Add cargo-binstall installation script for
wasm-bindgen-cli

* Try using only one browser

* remove geckodriver

* Move all wasm related tests to macos

* Rename macOS test step for clarity

* Try out combined coverage report

* try different strategy to skip coverage on forks

* Revert "try different strategy to skip coverage on forks"

This reverts commit cae64ae5a4.

* Revert "Try out combined coverage report"

This reverts commit 584fd21076.
2023-11-20 13:40:55 +01:00
bitfl0wer 5e20d77bf0
Revert "Try out combined coverage report"
This reverts commit 584fd21076.
2023-11-20 13:33:45 +01:00
bitfl0wer 06574c2708
Revert "try different strategy to skip coverage on forks"
This reverts commit cae64ae5a4.
2023-11-20 13:33:40 +01:00
bitfl0wer cae64ae5a4
try different strategy to skip coverage on forks 2023-11-20 13:22:23 +01:00
bitfl0wer 584fd21076
Try out combined coverage report 2023-11-20 13:16:49 +01:00
bitfl0wer 31136ada29
Rename macOS test step for clarity 2023-11-20 12:51:55 +01:00
bitfl0wer 79d97a1a7a
Move all wasm related tests to macos 2023-11-20 12:38:39 +01:00
bitfl0wer c492f85235
remove geckodriver 2023-11-20 12:32:48 +01:00
bitfl0wer 608629a874
Try using only one browser 2023-11-20 12:29:20 +01:00
bitfl0wer 7e4f60b161
Add cargo-binstall installation script for
wasm-bindgen-cli
2023-11-20 12:11:30 +01:00
bitfl0wer 7862c5f222
Move wasm-bindgen-cli install 2023-11-20 12:08:40 +01:00
bitfl0wer 083f4386f3
maybe this will fix ci :clueless: 2023-11-20 12:04:56 +01:00
bitfl0wer a2834b2251
Run wasm tests first 2023-11-20 11:59:37 +01:00
bitfl0wer 401249b3d1
Attempt to locate correct geckodriver 2023-11-20 11:57:31 +01:00
bitfl0wer a52dd1edc8
Correct "vers" to "version" 2023-11-20 11:46:10 +01:00
bitfl0wer 7f94b8e3f3
Add wasm-bindgen-cli to macos 2023-11-20 11:43:08 +01:00
bitfl0wer c9d4ecda18
Install wasm-bindgen-cli on linux 2023-11-20 11:42:07 +01:00
bitfl0wer 62e9123adc
Add wasm test configuration 2023-11-20 11:41:46 +01:00
bitfl0wer c456d65c2f
Add wasm-bindgen to Cargo.toml 2023-11-20 11:41:32 +01:00
bitfl0wer a8110316a8
Add example wasm bindgen test 2023-11-20 00:27:27 +01:00
bitfl0wer 3e2152df12
Merge branch 'dev' into feature/wasm32-unknown 2023-11-20 00:25:26 +01:00
bitfl0wer 25434279dd
fix clippy warn 2023-11-20 00:25:18 +01:00
bitfl0wer 0782f257e8
Fix examples depending on tokio::time 2023-11-20 00:13:32 +01:00