10 Commits

Author SHA1 Message Date
伊欧
84b7548bf7
Add WASI support for server-side rendering. (#3534)
* Try to add wasi feature to avoid browser's ABI.

* Add async render for single-threaded env.

* Temporarily enable my own patch branch.
It would be modified later
after the corresponding library branches are merged.

* add example for WASI SSR.

* Ready to run WASI on wasmtime.

* complete the example

* fix fmt

* fix fmt

* I made a mistake..sry

* add yew-router suites for demo

* fix typo

* Make the async render stream function public

* Use target_os instead of feature.

* Renew gloo-history's patch.

* Exclude WASI example to avoid web-sys.

* Try to add CI for WASI example.

* Fix CI.

* Fix CI that requires compiler 1.67 or newer.

* Use CLI's flag instead of exclude example.
https://github.com/bytecodealliance/wasmtime/pull/4312

* Remove patchs.

* Use LocalServerRenderer instead of ServerRenderer.
https://github.com/yewstack/prokio/pull/11#issuecomment-1847979933

* Remove unused exports.

* Add description about `LocalServerRenderer`.

* fix fmt

* fix fmt

* Update Cargo.lock

* Bump rust compiler's version to 1.67...

* Exclude WASI on yew-router browser interfaces.

* fix fmt

* Wait for gloo's PR dealed.

* Rollback to rust compiler 1.64.
cc https://github.com/rustwasm/gloo/pull/423#issuecomment-1848353295

* Fix lock file.

* Downgrade `toml_datetime` version.

* Fix enum for `gloo-history`.

* Well, it seems there is no way to avoid the MSRV upgrade....

* fix: Replace feature = "wasi" to target_os = "wasi".

* Remove tips for rust version.

* Bump `gloo` to 0.11.

* Try to test yew-macro on compiler 1.67.

* Try to use compiler 1.68 instead.

* Try to use compiler 1.69 instead......

* Revert MSRV back

* Pin the oldest Cargo.lock.

* Downgrade deps for MSRV.

* Bump benchmark tool's tokio to 1.35

* Try to write WASI CI.

* Rollback the quotes

* Combine CI files...

* Rollback the use that gloo-history has fixed it.

* fix

* Bump gloo-history version.

* Block raw html update tests on WASI.

* Rollback indexmap's version.

* fix CI

* fix CI

* Update some SSR test suites that replace ServerRender instead of LocalServerRender.

* Remove yew-router's cfg macro

* Fix fmt

* Try to fix CI

* Update examples/wasi_ssr_module/README.md

Co-authored-by: Elina <imelina@elina.website>

* Revert back some unnecessary changes.

* Clippy

* fmt

* Fix CI.

* Fix CI.

* Try to fix clippy.

* Fix `ToString` trait.

* Remove pin version of WASI CI test.

* Pin the newer version.

* Fix typo.

* Bump `wasm-bindgen`.

* Fix SSR example.

* Fix typo.

* Try to support non-browser environments.

* Update wasm-bindgen-test to 0.3.43

refer to rustwasm/wasm-bindgen#4083

* fix doc test running on nightly

* Update website/docs/advanced-topics/server-side-rendering.md

Co-authored-by: WorldSEnder <WorldSEnder@users.noreply.github.com>

* Update WASI CI.

* Remove WASI test for rustc 1.76.

* Try to let `wasmtime` CLI can be executed.

* Limit the function `decode_base64` that it shouldn't runnable in non-browser environment.

* Remove WASI example test for rustc 1.76.

* Revert changes.

* Fix CI

* Fix Cargo.lock

* Remove unused deps

* Undo the formatting changes.

* Undo the formatting changes.

---------

Co-authored-by: Elina <imelina@elina.website>
Co-authored-by: Martin Molzer <WorldSEnder@users.noreply.github.com>
2024-10-21 23:20:30 +08:00
Kaede Hoshikawa
08f4fd3032
Fix Dependabot and GitHub Actions (#3111) 2023-03-05 07:03:10 +09:00
Muhammad Hamza
2e4a919679
Split the huge workspace into smaller & improve CI (#2774)
* Split repository into multiple workspaces, update CI

* pull_request_target for build-website workflow

This should allow the workflow to read secrets instead of requiring a different, publish-website workflow to be needed to publish the side

* pull_request_target for build-api-docs workflow

This should allow the workflow to read secrets instead of requiring a different, publish-api-docs workflow to be needed to publish the side

* use `paths` instead of `path_ignore` for examples

* cleanup main-checks.yml

* it's rustfmt, not fmt

* correct paths for workflow files

* it's rustfmt, not fmt: part 2 electric bolgoo

* me idiot: part infinity

* ???

* main checks should be the same then?

* ??? part 2

* it should work now

* more fixes

* checkout before using file, actually use stable for wasm-bindgen-cli

* Revert "pull_request_target for build-api-docs workflow"

This reverts commit 38977292c87f4f5b55a09eb458f9acb083158570.

* Revert "pull_request_target for build-website workflow"

This reverts commit 1638a0cd241f1cd195afae27405714f5111819e7.

* Benchmark workflow uses pull_request event

* pull_request for size-cmp
2022-07-07 00:17:03 +05:00
Muhammad Hamza
31594245ef
Update examples and their builds in CI (#2652)
- Remove agents example
- Agents example is replaced by web_worker_fib as they both serve the same purpose now that trunk 0.15 has been released
- Clean up CI setup and ensure that examples are deployed in publish-examples.yml as they're built in size-cmp.yml
2022-05-03 16:08:05 +05:00
Muhammad Hamza
8d9ecf2d20
Wasm doc tests (#2651)
* don't use wasm-pack for wasm tests

* use proper version of wasm-bindgen-cli

* also run with chrome driver

* use cargo pkgid

* wasm doc tests

* setup web drivers

* temp workaround

* fix failures

* remove debug info

* don't be dumb

* specific ref for benchmark workflow so it doesn't fail

* Revert "specific ref for benchmark workflow so it doesn't fail"

This reverts commit c32ad8264fbb4a182892f52f789dbd9822015849.

This should be no longer needed: https://github.com/krausest/js-framework-benchmark/issues/1032#issuecomment-1114303988
2022-05-02 16:10:36 +05:00
Philip Peterson
5fc4387dc5
Rip out stdweb (#1697)
* feat: Remove usage of stdweb

* Cleanup Cargo.toml

* yew-services fixes

* fix doc test

Co-authored-by: Justin Starry <justin.starry@icloud.com>
2021-01-24 00:14:15 +08:00
Justin Starry
f3f52906e8
Remove default build target because it breaks trybuild tests (#876) 2020-01-15 19:07:49 +08:00
Justin Starry
99220f542f
Update wasm-bindgen and fix cargo config (#853)
* Update wasm-bindgen and fix cargo config

* clippy
2020-01-08 15:08:32 +08:00
Justin Starry
6fdf17757f Use wasm32-unknown-unknown as the default build target (#702)
* Use wasm32-unknown-unknown as the default build target

* Print rustup installed targets

* Add doc_test alias
2019-10-14 15:05:51 -04:00
Justin Starry
bd7f4be4a5 Support building wasm targets without cargo-web using wasm-bindgen 2019-06-29 10:23:52 -04:00