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

add basic JS support by using custom Tensor replacement #62

Merged
merged 13 commits into from
Feb 19, 2024

Conversation

Vindaar
Copy link
Member

@Vindaar Vindaar commented Feb 15, 2024

The replacement is just a seq[T].

This should be split into multiple commits ideally. Also the changes to parseNumber are a bit weird. I just made it work quickly and I don't fully understand what's going on. Are strings on the JS backend not zero terminated maybe?

There is a new test case testdf_js_simple, which removes some stuff to make it run. But it passes using nodejs on my machine:

nim js -r tests/testdf_js_simple.nim

CI failure is expected, because I was not exactly careful to not break anything right now.

@Vindaar Vindaar mentioned this pull request Feb 15, 2024
Vindaar and others added 10 commits February 19, 2024 13:26
Run and compile (using node JS), but should also work in a browser if
properly embedded in a file:

`nim js -r tests/testdf_js_simple.nim`
a rank proc was required but missing when I tried running the simple test.
This is to match the parsing behavior of C backend strings
For some reason the `unittest` logic of nested templates breaks
these. Works fine on devel though (with JS)
@Vindaar Vindaar merged commit d2030a6 into master Feb 19, 2024
9 checks passed
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 this pull request may close these issues.

2 participants