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

demo_gen: Add support for custom demonstration functions #653

Open
ambiguousname opened this issue Aug 22, 2024 · 0 comments · May be fixed by #671
Open

demo_gen: Add support for custom demonstration functions #653

ambiguousname opened this issue Aug 22, 2024 · 0 comments · May be fixed by #671
Labels
B-demo_gen Demo_Gen backend

Comments

@ambiguousname
Copy link
Member

ambiguousname commented Aug 22, 2024

Don't have time to do this, but here's what I'd do:

Add to DemoInfo in core/hir/attrs.rs, specifically a custom_func() attribute, where it:

  1. Points to a Javascript file.
  2. Lists all of the primitive inputs that the function takes.

Then under demo_gen/mod.rs, for every function you find with that attribute, copy the Javascript file to the output folder. Then add the function and parameter information to RenderInfo

This would be really nice to set up the Segmenter in ICU4X.

@ambiguousname ambiguousname added the B-demo_gen Demo_Gen backend label Aug 22, 2024
@ambiguousname ambiguousname linked a pull request Sep 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-demo_gen Demo_Gen backend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant