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

wit: Migrate from float32/float64 to f32/f64 #1361

Open
2 of 5 tasks
sunfishcode opened this issue Jan 9, 2024 · 4 comments
Open
2 of 5 tasks

wit: Migrate from float32/float64 to f32/f64 #1361

sunfishcode opened this issue Jan 9, 2024 · 4 comments
Labels
component-model Issues related to the implementation of the component model wit related to the `*.wit` text format

Comments

@sunfishcode
Copy link
Member

sunfishcode commented Jan 9, 2024

Per the discussion in WebAssembly/component-model#277, there seems to be consensus for migrating the names of the types float32 and float64 to f32 and f64.

A plan for f32/f64 is:

  • Make wit-parser accept f32 and f64 as aliases for float32 and float64. Accept f32/f64 as aliases for float32/float64. #1356
  • Wait until that's in a release and the major tools have updated.
  • Update Wit files, documentation, pretty-printers, etc. to f32/f64.
  • After some time, add a deprecation warning for float32/float64 pointing users to f32/f64
  • After some time, remove float32/float64
@sunfishcode sunfishcode added component-model Issues related to the implementation of the component model wit related to the `*.wit` text format labels Jan 9, 2024
@alexcrichton
Copy link
Member

#1364 implemented WIT_REQUIRE_F32_F64 as an env-var-based control for this, off-by-default for now.

@alexcrichton
Copy link
Member

One perhaps unexpected piece of fallout in bytecodealliance/wit-bindgen#810 is that f32 is being promoted to a keyword with this change which means it's no longer valid to use as a function argument name. Not major, but figured I'd note it here.

@sunfishcode
Copy link
Member Author

Ok, the wit-parser changes to accept f32/f64 have been in for a few months now, and wit-bindgen and other major tools have been updated and released, so we can now start on the next step, update Wit files, documentation, pretty-printers, etc. to f32/f64.

@alexcrichton
Copy link
Member

Sounds good to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-model Issues related to the implementation of the component model wit related to the `*.wit` text format
Projects
None yet
Development

No branches or pull requests

2 participants