You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's difficult to use cardano-ledger as a library from languages other than Haskell.
It could be done via FFI, but that also has its challenges.
This feature request is to add a supported webasm library target for cardano-ledger.
This would allow any language that has a wasm runtime to load the ledger and use it as a library, without requiring FFI bindings.
I believe it would improve the re-usability of the core ledger.
If possible, it would be even better if the library supported the wasm component model: https://component-model.bytecodealliance.org/
As this would allow cardano-ledgerwit files to universally define the interface to the library, for easy machine generated interfacing with other languages, and lower overall maintenance. This would also help track any breaking changes in the library interface, as the wit interface would change, and this would help prevent consuming projects using incompatible versions of the library.
The text was updated successfully, but these errors were encountered:
stevenj
changed the title
Feature Request: Add capability to target building a WASM library for cardano-ledger
Feature Request: Add capability to target building a WASM library from cardano-ledger
Dec 18, 2024
stevenj
changed the title
Feature Request: Add capability to target building a WASM library from cardano-ledger
[FR]: Add capability to target building a WASM library from cardano-ledger
Dec 18, 2024
There is a WASM backend in GHC, so it is theoretically possible to target WAS when compiling ledger, I suspect. There was an issue with template-haskell and the fact that Plutus libraries, which Ledger depends on, use quite a bit of it. WASM backend historically did not support template-haskell, which would have prevented us from targeting WASM. However, the most recent release of ghc-9.12.1, that happened two days ago, now has support for template-haskell when targeting WASM.
So, this means that people should be able to compile Ledger as a library into WASM. I am far from an expert on this topic, since I try to stay away from web development as possible. But, if there is real desire for this feature and it gets approved by Intersect, then I am all in favor of trying to figure it out.
It's difficult to use
cardano-ledger
as a library from languages other than Haskell.It could be done via FFI, but that also has its challenges.
This feature request is to add a supported webasm library target for
cardano-ledger
.This would allow any language that has a wasm runtime to load the ledger and use it as a library, without requiring FFI bindings.
I believe it would improve the re-usability of the core ledger.
If possible, it would be even better if the library supported the wasm component model: https://component-model.bytecodealliance.org/
As this would allow
cardano-ledger
wit
files to universally define the interface to the library, for easy machine generated interfacing with other languages, and lower overall maintenance. This would also help track any breaking changes in the library interface, as thewit
interface would change, and this would help prevent consuming projects using incompatible versions of the library.The text was updated successfully, but these errors were encountered: