-
Notifications
You must be signed in to change notification settings - Fork 27
Description
Great work on shumai! I'm very new to bun specifically and javascript in general, but I love the idea.
I am trying to import shumai into an html page I'm building and am curious how all the pieces work together.
I have @shumai/shumai installed via bun and can import it using ES6 syntax into a .js file no problem.
I run bun bun which generates a node_modules.bun which can be copied into node_modules.js by running ./node_modules.bun > node_modules.js
I can then import a script module <script type="module" src="node_modules.js">...</script> which seems to work.
However, as is intended by bun, hashes are exported instead of the modules holding the same structure. So now importing and using sm doesn't expose the same API and randn or tensor for example aren't available.
In your time working with bun, have you figured out a supported way to do this? How would you suggest using shumai in a web page?
I appreciate your help