Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(component): rust component model support (#128)
* feat(component): wip component model support - upgrade to wasmtime>=13, wasmtime_wasi>=13 - the component model necessitated splitting the adapter setup into two parts: first creating the adapter so it can be associated with the state, then telling the linker how to get from the incoming state to the adapter. WASI also has this split. - change the c bindings in observe-api: 1. "_" is an illegal character! switch to "-". 2. change the module name from "dylibso_observe" to "dylibso:observe/api" * feat(component): rename core module imports Align core module instrumentation naming with component model naming. This relies on corresponding (undeployed, private) changes to the observe http api [1]. [1]: dylibso/wasm-instr#69 * feat(component): move from AsMut to ObserveSdkView This also removes the WIT `dylibso:observe` world since we don't *really* need it. * fix(corpus): rename 00-component-instr-{reactor → command} * feat(component): add an example of depending on an instr'd component * doc: add component model integration guide * fix(component): fix broken CI Update vendored instrumented wasm modules to match new naming. Additionally: switch github workflow from `npm i` to the (much faster) `npm ci`. * fix: bump WASM_INSTR_VERSION_MINOR * fix: error out when module and observe-sdk versions are not compatible * chore: improve messsaging with incompat wasm-instr versions * feat: detect and error out on all modules (incl observe api) that use dylibso_observe namespace * fix: observe sdk compat with observe api * chore: update go-sdk message for incompatible wasm-instr * fix: go-sdk import function names, don't hang on unknown name * chore: remove go/test/count_vowels.instr.wasm it was outdated Please use test files in the `test` directory in the root of the project instead * feat: js-sdk support old api too * chore: js-sdk warn on discovery of deprecated namespace dylibso_observe * feat: remove checks on version globals in rust-sdk * feat: support modules instrumented with deprecrated namespace dylibso_observe, with warning. Error on modules instrumented with observe_api * feat: error out when observe api is used on go and js sdks * docs: add SDK-API-VERSIONING.md to document how to do api changes * fix: error out on when even new observe api is used on go and js sdks * chore: readd go changes * fix: new versions of WIT require semicolons * fix,docs: component building and running, add instructions to README * ci: add testing components * ci: install just, use action to install rust cli * chore: bin versions * chore: update to wasmtime 17, move off cargo-component-bindings: bytecodealliance/cargo-component@5cf73a6 --------- Co-authored-by: Gavin Hayes <[email protected]>
- Loading branch information