-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
Goal: Highlight polyglot experience
|
Suggested steps:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nitpicks and copy editing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple changes, mostly relating to removing the registry
Build it | ||
`npm run build`{{execute}} | ||
|
||
Sign it | ||
`wash claims sign calculator.wasm --http_server --name "calculator" --ver 0.1.0 --rev 0`{{execute}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for some reason "sign it" shows up on the same line as the build it script, is that due to indents? (not a big deal)
|
||
- How wasmCloud leverages the polyglot power of WebAssembly | ||
- Signing a wasm module with `wash` | ||
- Pushing a signed wasmCloud module to an OCI compliant registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove the OCI compliant registry part
- You can use `wash` to give you the actor ID of your actor | ||
`wash claims inspect localhost:5000/calc:0.1.0 --insecure`{{execute}} | ||
- You can use the environmental variable to override the current ID | ||
`export CLIENT_ACTOR=$(wash claims inspect localhost:5000/calc:0.1.0 --insecure -o json | jq -r '.module')`{{execute}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change this to wash claims inspect
with the signed wasm module (you may need to put this in a polyglot section, apologies)
|
||
`cargo build --release`{{execute interrupt T1}} | ||
|
||
`wash claims sign target/wasm32-unknown-unknown/release/calculator.wasm -c wasmcloud:httpserver --name "calculator" --ver 0.1.0 --rev 0`{{execute T1}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's change -c wasmcloud:httpserver
to --http_server
|
||
`mkdir -p build && tinygo build -o build/calculator.wasm -target wasm -no-debug main.go`{{execute interrupt T1}} | ||
|
||
`wash claims sign build/calculator.wasm -c wasmcloud:httpserver --name "calculator" --ver 0.1.0 --rev 0`{{execute T1}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's change -c wasmcloud:httpserver
to --http_server
|
||
`npm run build`{{execute interrupt T1}} | ||
|
||
`wash claims sign calculator.wasm -q --name "calculator" --ver 0.1.0 --rev 0`{{execute T1}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's change -q
to --http_server
> Note: We prefaced the registry push with a `wash drain all` which cleared the OCI cache. We did this since we are reusing the same tag. | ||
|
||
And now lets start `wasmcloud` with our `manifest.yaml`! | ||
`wasmcloud --allowed-insecure localhost:5000 -m manifest.yaml`{{execute interrupt T1}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can remove --allowed-insecure localhost:5000
<pre class="file" data-filename="rust/src/lib.rs" data-target="insert" data-marker="// TODO: add multiplication"> | ||
|
||
Open the file: | ||
|
||
`rust/src/lib.rs`{{open}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open the file:
`rust/src/lib.rs`{{open}}
this section is also copied to the editor, I think it should be outside the <pre>
tag
Remaining line items to be completed in new PR
https://www.katacoda.com/cjrash/courses/02-dev_apps/first-actor