Skip to content
Discussion options

You must be logged in to vote

There are several options:

  1. Use a SharedValue, which is like a synchronous Resource: if you create it in App, it will read the YAML file on the server, and serialize the value as JSON to the client. (Note: this adds some overhead in terms of WASM binary size and HTML page size.)
  2. Use a macro to parse your YAML file at compile time, so that the route definitions are included in the binary rather than being loaded at runtime.
  3. Define routes normally in your code.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@therealhieu
Comment options

@gbj
Comment options

gbj Apr 25, 2025
Maintainer

Answer selected by therealhieu
@therealhieu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants