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

Stabilize Web Animations API functions #3988

Open
luxalpa opened this issue Jun 16, 2024 · 1 comment
Open

Stabilize Web Animations API functions #3988

luxalpa opened this issue Jun 16, 2024 · 1 comment

Comments

@luxalpa
Copy link

luxalpa commented Jun 16, 2024

Motivation

I am not entirely sure what the process is for removing cfg(web_sys_unstable_apis) or how the WebIDL works, but according to MDN, parts of the Web Animations API such as animate are in Baseline since 1.5 years ago and not experimental.

Proposed Solution

Remove #[cfg(web_sys_unstable_apis)] from the supposedly stable Web Animations API functions such as animate and KeyframeOptions

Alternatives

I am currently using these functions with the unstable flag, but the flag itself is a big hassle to deal with, resulting in bugs from rust-analyzer on VSCode, RustRover and Cranelift. While this is more of a problem of those respective tools, I'd like to avoid having to deal with those issues if I can.

Additional Context

I'm using these for building a crate for Animation components for the Leptos web framework.

@daxpedda
Copy link
Collaborator

I don't think we can really stabilize this, the spec still has a lot of movement.

There might some more baseline spec out there I'm not aware of that is more stable. Alternatively we could explore stabilizing only certain parts we can be quite sure won't change.

I'm happy to review a PR doing that and outlining why some APIs are unlikely to change.

I am not entirely sure what the process is for removing cfg(web_sys_unstable_apis)

Moving the relevant file to the enabled folder and regenerating the APIs.

I am currently using these functions with the unstable flag, but the flag itself is a big hassle to deal with, resulting in bugs from rust-analyzer on VSCode, RustRover and Cranelift.

I'm not familiar with RustRover, but Rust Analyzer should be easy to solve. You could either use .cargo/config.tomls build.rustflags or tell Rust Analyzer to add the flag in its configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants