0.9.0
What's Changed
- Kotlin 2.0.20 by @CharlieTap in #23
- Public API and Imports/Host Function DSL by @CharlieTap in #25
Breaking Changes
This version begins the stabilisation of a public api for chasm and hide its internals from downstream consumers. For this reason a layer of indirection has been introduced and all necessary public types are duplicated in chasm's public module.
A short summary of changes and basic migration guide are as follows:
- Creation of a store is now only possible using the factory method (previously you could call construct on the runtimes own store):
// The type will now be io.github.charlietap.chasm.embedding.shapes.Store
val store = store()
- Classes referenced in the chasms ast and runtime modules should now use the corresponding classes of the same name in the package io.github.charlietap.chasm.embedding.shapes.*
For example
// function
io.github.charlietap.chasm.embedding.shapes.Function
Other changes
There is also an experimental DSL builder api for defining imports and host functions, for now this will be undocumented as it may change as we develop a WASI layer on top of it. But as a sneak peak...
fun WasiPreview1(store: Store, memory: Memory) = imports(store) {
function {
moduleName = "wasi_preview_"
entityName = "fd_write"
type = functionType {
params { i32() }
results { i32() }
}
reference(fdWrite(memory))
}
}
Full Changelog: 0.7.1...0.9.0