Hi!
I'm running the following code in my main function, before rendering the yew app. So maybe this isn't the right place to ask, but I don't really now where else I'd post.
let job_results_str = include_str!("../../cached/job_results.json");
log!(format!("job results str: {}", job_results_str));
let default_job_results: FinishedJobState = serde_json::from_str(job_results_str).expect("Error parsing job_results.json file!");
log!(format!("default job results: {:#?}", &default_job_results));
The first log! statement is reached, the second isn't. Instead, the browser (firefox-dev-edition) prints the following error message:
Uncaught (in promise) RuntimeError: unreachable executed
finalizeInit http://localhost:3000/assets/frontend-4410b92347e1e5e6.js:1236
init http://localhost:3000/assets/frontend-4410b92347e1e5e6.js:1268
async* http://localhost:3000/profiling:19
frontend-4410b92347e1e5e6_bg.wasm:6635320:1
init http://localhost:3000/assets/frontend-4410b92347e1e5e6.js:1269
InterpretGeneratorResume self-hosted:1359
AsyncFunctionNext self-hosted:756
(Async: async)
<anonymous> http://localhost:3000/profiling:19
The file I'm include_str!'ing is 12k lines of json. When I make the file smaller (tested about 1,5k lines), the error doesn't appear.
Is this a bug in serde_json or a general limitation of the wasm platform?
I'd be very happy if somebody could tell me whether I should report this as a bug somewhere.