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

Deprecate some wasm-related types and functions in runtime package #477

Closed
chrispcampbell opened this issue May 3, 2024 · 2 comments
Closed

Comments

@chrispcampbell
Copy link
Contributor

While working on the refactoring in #471, I improved some APIs in the runtime package, but to keep the changes easier to review (and to minimize impact on existing users), I kept most of the API additions hidden in the docs and left the existing types and functions in place.

I'm filing this separate issue that will un-hide those new APIs and mark the existing ones as deprecated. The deprecated ones will be removed in a future release, but this approach will give users time to update to the new code.

Most of these changes are below the radar and not typically used directly by users, so there should be limited impact anyway. The changes mostly impact the template code.

@chrispcampbell
Copy link
Contributor Author

Summary of the changes:

  • Add (unhide) RunnableModel interface
  • Add (unhide) createSynchronousModelRunner
  • Deprecate createWasmModelRunner (use createSynchronousModelRunner instead)
  • (As of the changes in Refactor runtime and runtime-async packages to allocate/grow buffers on demand #471, WasmModel now implements RunnableModel, so this will be made clear once RunnableModel is unhidden)
  • Remove WasmBuffer from public API (it is now an implementation detail and isn't something that users would work directly with anyway, so no need to deprecate)
  • Add (unhide) initWasmModel
  • Deprecate initWasmModelAndBuffers (use initWasmModel instead; the worker code in runtime-async has already been updated to deal with either return type)

@chrispcampbell
Copy link
Contributor Author

I am in the middle of merging a few large branches to main (for issues #471, #437, #479) so that they can be tested together as a whole before npm publishing them. I decided while working on these issues that it is easier to remove (rather than deprecate) those APIs since they are below the radar for most users, and it's not worth trying to maintain the old versions any longer. The proposed list from above has been implemented already (as removals rather than deprecations), see #437 and #479 for more details on the latests API changes.

Closing.

@chrispcampbell chrispcampbell closed this as not planned Won't fix, can't repro, duplicate, stale May 28, 2024
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

1 participant