Filling out missing Introductory Documentation #1272
Comments
|
I could take a stab at this: "Step-by-step tutorial to create and run hello-world.wasm" |
|
I'm working on a number of the examples bullets, mostly around organizing them and bringing C on par with Rust. Also CI! |
|
I'll write some content for the Sandboxing section. |
* Fill out API docs on `wasmtime::Module` Part of #1272 * Apply suggestions from code review Co-Authored-By: Nick Fitzgerald <fitzgen@gmail.com> Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>
|
I can work on getting the python examples illustrated in the documentation. I think the demo video on the wasmtime home page is pretty comprehensive, so I'll probably just add some more details for project setup with pipenv and the like https://youtu.be/Qn_4F3foB3Q @alexcrichton do you think this is a good approach? Also just saw #677, do you think I can still document the python support as of v0.12.0, or should I wait until interface types are more stable? The issue makes it seem like the interface shouldn't change much for module users. |
|
@jjsullivan5196 sounds great to me! I do think we should still at least document what we have which should work well for integers and such, but yeah the exact video won't work any more because strings are no longer supported. |
|
@alexcrichton I'll write the markdown parser for the book |
* Bitcast vectors immediately before a return * Bitcast vectors immediately before a block end * Use helper function for bitcasting arguments * Add FuncTranslationState::peekn_mut; allows mutating of peeked values * Bitcast values in place, avoiding an allocation Also, retrieves the correct EBB header types for bitcasting on Operator::End. * Bitcast values of a function with no explicit Wasm return instruction * Add Signature::return_types method This eliminates some duplicate code and avoids extra `use`s of `Vec`. * Add Signature::param_types method; only collect normal parameters in both this and Signature::return_types * Move normal_args to Signature::num_normal_params method This matches the organization of the other Signature::num_*_params methods. * Bitcast values of Operator::Call and Operator::CallIndirect * Add DataFlowGraph::ebb_param_types * Bitcast values of Operator::Br and Operator::BrIf * Bitcast values of Operator::BrTable
Try to thoroughly document unsafety of `Memory` and how it can be used safely. cc bytecodealliance#1272
Try to thoroughly document unsafety of `Memory` and how it can be used safely. cc bytecodealliance#1272
Try to thoroughly document unsafety of `Memory` and how it can be used safely. cc #1272
This commit adds two example programs, one for linking two modules together and one for instantiating WASI. The linkage example additionally uses WASI to get some meaningful output at this time. cc bytecodealliance#1272
This commit adds two example programs, one for linking two modules together and one for instantiating WASI. The linkage example additionally uses WASI to get some meaningful output at this time. cc bytecodealliance#1272
* Add examples of linking and WASI This commit adds two example programs, one for linking two modules together and one for instantiating WASI. The linkage example additionally uses WASI to get some meaningful output at this time. cc #1272 * Add examples to the book as well * More links! * Ignore examples from rustdoc testsing * More example updates * More ignored
|
Hi there Shivam here. I can try on working "Documentation of using wasm from Rust" @alexcrichton . |


I'd like to use this issue as a tracking issue for filling out gaps in
wasmtime's introductory documentation. This includes our book (rendered), API documentation (rendered), and examples. (or anything else others can think of as well!)Below I'm gonna fill out a bunch of checkmarks and checkboxes for what is currently missing at this time. If you'd like to help in and document things, please feel free to do so! If you leave a comment on this issue along with what you'd like to help fill in, we'll edit your name into the description here to know that it's claimed. Any and all help here is greatly appreciated!
Book Documentation
As a precursor I'll say that this is organized largely page-by-page in the book. The current organization of the book was an initial proposal from awhile ago and thinking back on it some of it may be a little redundant. Please feel free to also discuss the layout of the book and what documentation would best go where!
wasmtimeCLI to execute a Rust-generated WebAssembly file - @nocultureAPI Documentation
Moduletype should have at least one example somewhere.Instancetype should have at least one example.Storetype needs more documentation about what it is, although this is somewhat up for debate in other issues as well.Memorytype needs examples of safe usage, and double-checks on wording about unsafe usage.Functype could use an example on thegetfamily of methods.Examples
I think we want an overhaul of how our examples work. Here's my proposal for what we need to do:
examplesdirectory - @alexcrichtonexamplesdirectory too - @alexcrichtoncargo run --example foogcc examples/foo.c -I crates/c-api/include -o foo && ./foo(ish)*.watstringexamples/name/main.rswith a correspondingexamples/name/wasm/Cargo.tomlwhich is a Rust project compiled to wasm. (orexamples/name/wasm.cif we want to show off a C-compiled wasm example)examples/foo.rswe have a correspondingexamples/foo.cexamples/foo/main.rswe have a correspondingexamples/foo/main.cThe text was updated successfully, but these errors were encountered: