Commit Graph

1359 Commits

Author SHA1 Message Date
bitfl0wer 97fc99354a add warning lint for usage of todo!() 2023-12-03 13:13:57 +01:00
bitfl0wer c66cc9b16c move WellKnownResponse to src/types/ 2023-12-03 13:04:17 +01:00
bitfl0wer 25a09c3980 Create domains_config, create Domains struct 2023-12-03 13:04:02 +01:00
bitfl0wer 9bec639634 clean up imports 2023-12-03 12:51:34 +01:00
bitfl0wer ceac04201c impl from_root_domain for UrlBundle 2023-12-03 12:49:22 +01:00
bitfl0wer 99155d1e5b impl From reqwest::Error for ChorusError 2023-12-03 12:49:07 +01:00
bitfl0wer 5f41f57e77 impl PartialEq for ChorusUser 2023-12-02 20:30:04 +01:00
Flori 741b6d6978 More derives and impls (#448)
Add some sensible implementations for PartialEq, Eq, etc. where I found
them to be necessary
2023-12-02 17:52:31 +01:00
bitfl0wer 67cbe5efeb Mark code blocks as no-run 2023-12-02 17:44:24 +01:00
bitfl0wer e6c09e44eb fix import order 2023-12-02 17:36:36 +01:00
bitfl0wer 7ef61eb317 Add Default, Hash, etc. where needed 2023-12-02 17:35:47 +01:00
Flori 73772ed43e Update README.md 2023-11-25 13:26:24 +01:00
bitfl0wer 4cfeee8d86 Add README information into lib.rs 2023-11-24 22:21:57 +01:00
bitfl0wer 9a84e7109f Change text passages for better clarity 2023-11-24 21:37:30 +01:00
bitfl0wer 83b8d7a6cd Remove "prettyfyme" -> solved 2023-11-22 20:54:51 +01:00
Flori 84981544ef Coverage, change register/login (#447)
Register and login, for some reason, required ownership of the
`Instance` object. This was not necessary and has been changed in this
PR. The PR also includes some extra tests, like logging in, logging in
with a token, etc.
2023-11-22 19:41:29 +01:00
bitfl0wer dd01ef0c35 Add tests for coverage 2023-11-22 18:48:44 +01:00
bitfl0wer e06edada1e Change: register/login no longer require ownership
Register/login used to require ownership of `instance`. This wasn't really necessary and has been changed.
2023-11-22 18:48:37 +01:00
bitfl0wer 9ad01cd227 Token login test 2023-11-22 18:38:23 +01:00
bitfl0wer b03b703c22 Update reqwest dependency to version 0.11.22 2023-11-22 17:32:22 +01:00
Flori 9dd66767bf 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 84f8fc0fa4 Update branch filter for push event 2023-11-22 16:43:48 +01:00
bitfl0wer f973c55952 Prevent CI from running twice on PR to main 2023-11-22 16:43:03 +01:00
bitfl0wer c5e6c0b800 Add tests for GatewayMessage to increase coverage 2023-11-22 16:34:43 +01:00
bitfl0wer e828c3cada Bump version, explain why custom `reqwest` 2023-11-22 16:14:47 +01:00
bitfl0wer ace9b57d69 Update supported compilation target for Chorus to
versions 0.12.0 and up
2023-11-22 16:14:33 +01:00
Flori e9a260cdb7 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 56e02960ea Split up wasm-tests into 3 seperate tests 2023-11-22 15:13:26 +01:00
bitfl0wer 4e182c1430 Update supported platforms in README 2023-11-22 15:01:51 +01:00
bitfl0wer bdb505218c Add fixme note about tests requiring std::fs 2023-11-22 14:52:49 +01:00
bitfl0wer 38c95255c5 Replace #[tokio::test] w/ wasm-ok macro calls 2023-11-22 14:39:32 +01:00
bitfl0wer 0cae35e592 Remove broken test code 2023-11-22 14:24:10 +01:00
bitfl0wer 8a588892b2 Add wasm-bindgen-futures 2023-11-22 14:24:01 +01:00
bitfl0wer 022bf9f320 add wasm friendly task spawning 2023-11-22 14:23:36 +01:00
bitfl0wer f8979b7feb Remove 'handle', add wasm friendly task spawning 2023-11-22 14:23:33 +01:00
bitfl0wer 93c12fff63 Add build instructions, especially for wasm 2023-11-22 14:20:45 +01:00
bitfl0wer e629334f3f Add FIXME comments for wasm compatibility 2023-11-21 17:10:19 +01:00
bitfl0wer 5bd4b627c5 Revert "Spawn local gateway task on wasm32"
This reverts commit 3c419e8310.
2023-11-20 15:14:34 +01:00
bitfl0wer 509733bfb8 Revert "Refactor heartbeat task to support WebAssembly"
This reverts commit 8c2364b8d0.
2023-11-20 15:14:28 +01:00
bitfl0wer 8c2364b8d0 Refactor heartbeat task to support WebAssembly 2023-11-20 14:57:45 +01:00
bitfl0wer 3c419e8310 Spawn local gateway task on wasm32 2023-11-20 14:47:13 +01:00
bitfl0wer 69f726af0e Fix formatting in test functions 2023-11-20 14:36:00 +01:00
bitfl0wer 37f3bcde94 Rename test function to
generate_general_configuration_schema_wasm
2023-11-20 14:22:00 +01:00
bitfl0wer cfe4078639 Remove unnecessary code 2023-11-20 14:15:23 +01:00
bitfl0wer 0cdb76bcf3 remove all .await from wasm tests 2023-11-20 14:11:56 +01:00
bitfl0wer 472c3ae135 Merge branch 'dev' into feature/wasm32-unknown 2023-11-20 14:03:52 +01:00
bitfl0wer bd7bb90baf Add tests for WASM 2023-11-20 14:03:06 +01:00
Flori 06f3046134 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 fb46ab83ac.

* Revert "Try out combined coverage report"

This reverts commit d34a813d8a.
2023-11-20 13:40:55 +01:00
bitfl0wer c7ff1724e6 Revert "Try out combined coverage report"
This reverts commit d34a813d8a.
2023-11-20 13:33:45 +01:00
bitfl0wer 07c8c16496 Revert "try different strategy to skip coverage on forks"
This reverts commit fb46ab83ac.
2023-11-20 13:33:40 +01:00