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

Support Node #31

Open
sinui0 opened this issue Mar 7, 2024 · 2 comments
Open

Support Node #31

sinui0 opened this issue Mar 7, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sinui0
Copy link
Member

sinui0 commented Mar 7, 2024

tlsn-js is tightly coupled to the browser environment, but people may want to use it in node such as an electron app. Provide a build config which supports node.

@sinui0 sinui0 added enhancement New feature or request good first issue Good for newcomers labels Mar 7, 2024
@waddaboo
Copy link

Hi @sinui0, when I was working on this issue I found out that the use of wasm_bindgen_rayon::init_thread_pool in lib and prover is preventing wasm-pack to build with --target nodejs.

It will return the error "wasm_bindgen::module is currently only supported with --target no-modules and --target web", which is stated to be one of the current limitations of wasm_bindgen_rayon. Reference: https://docs.rs/wasm-bindgen-rayon/latest/wasm_bindgen_rayon/#building-rust-code

How would you like this to proceed? Is it ok for the line to be removed?

@sinui0
Copy link
Member Author

sinui0 commented May 27, 2024

It is possible to run the protocol single threaded, but it will be quite slow. To try it out you can patch in this branch for the tlsn-utils-aio dependency and enable the single-threaded feature to remove the use of rayon: tlsnotary/tlsn-utils@3cb9cfb

Our next release will include the ability to force single threaded execution. I haven't looked into how else to support multi-threading when running in a node runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants