Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

datetime.today() fails with panicked at std/src/sys/pal/wasm/../unsupported/time.rs:31:9: time not implemented on this platform #613

Closed
aszenz opened this issue Dec 9, 2024 · 0 comments · Fixed by #624

Comments

@aszenz
Copy link

aszenz commented Dec 9, 2024

Describe the bug

When the template includes datetime.today() it fails with the error:

VM2852 wasm-pack-shim-JR56DANV.js:822 panicked at std/src/sys/pal/wasm/../unsupported/time.rs:31:9:
time not implemented on this platform

After removing this code, it still fails with:

Error: recursive use of an object detected which would lead to unsafe aliasing in rust

To Reproduce

Use datetime.today() function https://typst.app/docs/reference/foundations/datetime/#definitions-today

Expected behavior

Return the datetime, if that's not possible with wasm, improve the error handling so that it doesn't panice

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Chromium
  • Version 131.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant