-
Notifications
You must be signed in to change notification settings - Fork 41
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
popm/wasm: improve and tidy up Go code #144
Merged
Merged
Commits on Jun 7, 2024
-
popm/wasm: improve and tidy up Go code
This splits the web/popminer/popminer.go file into 5 files: - dispatch.go: Contains all methods that can be dispatched from JS - network.go: Contains network settings - network_local.go: Contains localnet settings (behind build tag) - popminer.go: Contains the main function and core - util.go: Contains utilities for working with JS This contains a lot of miscellaneous improvements, however the notable ones are: - Invoke Promise resolve function with js.Value instead of marshaled JSON, meaning that the result can be used directly without the need to encode/decode JSON. - All errors use a common format containing the error message, a timestamp, and the debug stack, allowing for easier debugging. - Replace 'wasmPing' with 'version' - wasmPing is not very useful and was only used for testing the connection between JS and WASM. version returns useful version information and allows the same testing. - Add "Object" type that can be used to easily create JS Objects from Go. Calling Object.Value() will create a js.Value representing the object, converting each contained value to a js.Value. This also has the benefit of breaking the build if a key changes, preventing breaks in the JS API. - Move network configurations into a separate file and use constants. I think this is cleaner than the previous solution, and allows localnet to only be available when built with the 'hemi_localnet' build tag.
Configuration menu - View commit details
-
Copy full SHA for a10c9bc - Browse repository at this point
Copy the full SHA a10c9bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for d110ec4 - Browse repository at this point
Copy the full SHA d110ec4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29cb3f3 - Browse repository at this point
Copy the full SHA 29cb3f3View commit details
Commits on Jun 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 6b03f79 - Browse repository at this point
Copy the full SHA 6b03f79View commit details
Commits on Jun 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 5826501 - Browse repository at this point
Copy the full SHA 5826501View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34052a9 - Browse repository at this point
Copy the full SHA 34052a9View commit details
Commits on Jun 14, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 396b6ea - Browse repository at this point
Copy the full SHA 396b6eaView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.