profile
viewpoint

bytecodealliance/wasmtime 3938

Standalone JIT-style runtime for WebAssembly, using Cranelift

bytecodealliance/cranelift 2481

Cranelift code generator

bytecodealliance/wasmparser 176

A simple event-driven library for parsing WebAssembly binary files

fitzgen/bindgen-tutorial-bzip2-sys 47

A tutorial/example crate for generating C/C++ bindings on-the-fly with libbindgen

CraneStation/wasmtime-wasi 24

WASI suppport for wasmtime

fitzgen/associative-cache 9

A generic, fixed-size, associative cache

fitzgen/ada-scheme 5

Following along with Peter Michaux's Scheme from Scratch series (http://peter.michaux.ca/articles/scheme-from-scratch-introduction) in Ada

bytecodealliance/subscribe-to-label-action 4

A GitHub action that allows users to subscribe to a label and automatically get @'d when the label is applied

push eventbytecodealliance/wasm-tools

Alex Crichton

commit sha ebae1741372f0603e85aabba4fffa2fd85098e07

wasm-smith: Implement reference types support This commit implements the reference types proposal for the wasm-smith crate, generating modules which use reference types. It covers the new instructions, multiple-tables, and new kinds of element segments. Support is gated through `Config::max_tables` and `Config::reference_types_enabled`.

view details

Nick Fitzgerald

commit sha bbaa3cf5e921ceecf816e235a36970e40d2afe10

Merge pull request #124 from alexcrichton/reference-types wasm-smith: Implement reference types support

view details

push time in a day

PR merged bytecodealliance/wasm-tools

wasm-smith: Implement reference types support

This commit implements the reference types proposal for the wasm-smith crate, generating modules which use reference types. It covers the new instructions, multiple-tables, and new kinds of element segments. Support is gated through Config::max_tables and Config::reference_types_enabled.

+727 -97

2 comments

7 changed files

alexcrichton

pr closed time in a day

PullRequestReviewEvent

delete branch fitzgen/wasmtime

delete branch : fix-peepmatic-ci

delete time in 2 days

PR opened bytecodealliance/wasmtime

Reviewers
CI: fix rebuilding peepmatic peephole optimizers

The test that triggers the rebuild of the peephole optimizers is in the cranelift-codegen crate, not the umbrella cranelift crate. This was previously successfully running zero tests, and then successfully reporting no git diff because no peephole optimizers were ever rebuilt.

This change fixes it so that we run the correct test that triggers the rebuilding of the peephole optimizers.

<!--

Please ensure that the following steps are all taken care of before submitting the PR.

  • [ ] This has been discussed in issue #..., or if not, please tell us why here.
  • [ ] A short description of what this does, why it is needed; if the description becomes long, the matter should probably be discussed in an issue first.
  • [ ] This PR contains test cases, if meaningful.
  • [ ] A reviewer from the core maintainer team has been assigned for this PR. If you don't know who could review this, please indicate so. The list of suggested reviewers on the right can help you.

Please ensure all communication adheres to the code of conduct. -->

+2 -2

0 comment

1 changed file

pr created time in 3 days

create barnchfitzgen/wasmtime

branch : fix-peepmatic-ci

created branch time in 3 days

push eventbytecodealliance/wasmtime

Johan Andersson

commit sha 9820c5c3dd0cdc40163927494c1e82aee79bb927

Replace unmaintained directories crate Fixes RUSTSEC-2020-0054 warning from cargo-audit/cargo-deny, follows the recommendation to switch to the new maintained `directories-next` crate fork Only affects the cache directory determination for the environment and was a simple search'n'replace to this fork so don't think behavior has changed. https://rustsec.org/advisories/RUSTSEC-2020-0054

view details

Nick Fitzgerald

commit sha c5a2bd32150be705531a388300d006cd7ef92944

Merge pull request #2298 from EmbarkStudios/directories-next2 Replace unmaintained directories crate - RUSTSEC-2020-0054

view details

push time in 3 days

PR merged bytecodealliance/wasmtime

Replace unmaintained directories crate - RUSTSEC-2020-0054

Fixes RUSTSEC-2020-0054 warning from cargo-audit/cargo-deny, follows the recommendation to switch to the new maintained directories-next crate fork

Only affects the cache directory determination for the environment and was a simple search'n'replace to this fork so don't think behavior has changed.

+46 -29

0 comment

3 changed files

repi

pr closed time in 3 days

PullRequestReviewEvent

push eventbytecodealliance/wasmtime

Alex Crichton

commit sha 04e85b044e395f11b7774d72156f7ec5ba0aa8ba

Don't store `Arc<VMInterrupts>` in instances Similar to other data structures owned by the `Store` there's no need for `Instance` to have a strong `Arc` reference, instead it's sufficient for `Store` to have the owning reference.

view details

Nick Fitzgerald

commit sha 1532834f3e2235f2ee167ae06a92edafb97787c3

Merge pull request #2305 from alexcrichton/no-arc Don't store `Arc<VMInterrupts>` in instances

view details

push time in 3 days

PR merged bytecodealliance/wasmtime

Don't store `Arc<VMInterrupts>` in instances wasmtime:api

Similar to other data structures owned by the Store there's no need for Instance to have a strong Arc reference, instead it's sufficient for Store to have the owning reference.

This is hopefully a slight improvement with https://github.com/bytecodealliance/wasmtime/issues/2295

+9 -14

1 comment

6 changed files

alexcrichton

pr closed time in 3 days

PullRequestReviewEvent

push eventbytecodealliance/wasmtime

Alex Crichton

commit sha 461ed42772d198cc4c6741d5abc8ce2715e816ce

Remove the `finished_functions` field in `Instance` Turns out we don't actually need it anywhere any more! This removes an allocation when instantiating.

view details

Nick Fitzgerald

commit sha aa04917ddf2f5eadc9297bab57b5cf38516758ff

Merge pull request #2306 from alexcrichton/no-finished-functions Remove the `finished_functions` field in `Instance`

view details

push time in 3 days

PR merged bytecodealliance/wasmtime

Remove the `finished_functions` field in `Instance` wasmtime:api

Turns out we don't actually need it anywhere any more! This removes an allocation when instantiating.

This is hopefully a slight improvement with https://github.com/bytecodealliance/wasmtime/issues/2295

+8 -14

1 comment

3 changed files

alexcrichton

pr closed time in 3 days

PullRequestReviewEvent

push eventbytecodealliance/wasm-tools

Alex Crichton

commit sha 5bf5d9d035898783827d63810f522a398de359f2

Fix another integer overflow in wasmprinter's nesting Don't decrease the current nesting level past where we started in the case that there's multiple `end` instructions.

view details

Nick Fitzgerald

commit sha e8fc421a9f666130d03ec7fd15773803c2e7ef1c

Merge pull request #123 from alexcrichton/fix-overflow Fix another integer overflow in wasmprinter's nesting

view details

push time in 3 days

PR merged bytecodealliance/wasm-tools

Fix another integer overflow in wasmprinter's nesting

Don't decrease the current nesting level past where we started in the case that there's multiple end instructions.

+11 -1

0 comment

2 changed files

alexcrichton

pr closed time in 3 days

PullRequestReviewEvent

push eventbytecodealliance/wasm-tools

Alex Crichton

commit sha 6d851f6d8941ed96d4bc91b17b76b702b7de5725

Fix multi-memory resolution with new simd instrs Accidentally forgot to add them to resolving their memory immediates!

view details

Nick Fitzgerald

commit sha 4b1970eb20f9b9ef4ee9597abf1a26df44d832c7

Merge pull request #121 from alexcrichton/fix-new-simd-instrs Fix multi-memory resolution with new simd instrs

view details

push time in 3 days

PR merged bytecodealliance/wasm-tools

Fix multi-memory resolution with new simd instrs

Accidentally forgot to add them to resolving their memory immediates!

+4 -0

0 comment

2 changed files

alexcrichton

pr closed time in 3 days

PullRequestReviewEvent
IssuesEvent

push eventfitzgen/wasm-smith

Nick Fitzgerald

commit sha fd5fbf2de3b223e4bba8100f879fe003de2e849a

wasm-smith moved into to bytecodealliance/wasm-tools!

view details

push time in 3 days

push eventfitzgen/wasm-smith

Nick Fitzgerald

commit sha aae94de1aef1418de40acf321af19271e029e0be

wasm-smith moved into to bytecodealliance/wasm-tools!

view details

push time in 3 days

push eventbytecodealliance/wasm-tools

Nick Fitzgerald

commit sha 9af141c4fb34d32a7ab963823993f580c1e6ce77

wasm-smith is a WebAssembly test case generator!

view details

Nick Fitzgerald

commit sha b9e407224e211234457e205e9a65fe370f9bbf4d

Add a `wasm-smith` CLI tool

view details

Nick Fitzgerald

commit sha 0737c667ef0922362dd9607dd9b3cd816c5e4d2e

Expand README some more

view details

Nick Fitzgerald

commit sha 203daf4eefb797f185bff3c94ac619f1944a76bc

Add github actions CI

view details

Nick Fitzgerald

commit sha af02e5b1dc958960d8d995c448c99c48c627e807

Add badges and table of contents to README

view details

Nick Fitzgerald

commit sha bbf991ed11349e245da836a12fbfb387404d2f2c

README: Fix table of contents link

view details

Nick Fitzgerald

commit sha 1336f23b248497cc1d6f798387ed69957e7d0200

Add note about wasm language support to readme

view details

Nick Fitzgerald

commit sha 6fbae307948ba5e73b4840c0344ed7e20826891e

Do not allow mutable globals in initializer expressions

view details

Nick Fitzgerald

commit sha b173dbff892b79a8fdaa9304c67046d916d5b570

Update `wasmparser` dependency to 0.62.0

view details

Nick Fitzgerald

commit sha d7cee36f8203f1edd542689cc71b34e65968a0d1

cli: Do not pad input seed with zeros D'oh.

view details

Nick Fitzgerald

commit sha c06318ae18237066e175f8b00132ea3552ec20b4

Update `arbitrary` dependency to 0.4.6

view details

Nick Fitzgerald

commit sha d6bd863c3e10102ea4b3f9d8a31773a1f44a927c

Add license and metadata to Cargo.toml

view details

Nick Fitzgerald

commit sha b55ab491c7329e3cb80f22b66996ae0e632cc946

Move `arbitrary_locals` to its own method

view details

Nick Fitzgerald

commit sha f7b885e503a8c8791664e4b244a015d7619b4ee7

Rename methods for generating the code section

view details

Nick Fitzgerald

commit sha e4be9fd10c4acb40f49c7eed6c06ee8ab88dc440

Small clean ups for `CodeBuilder`

view details

Nick Fitzgerald

commit sha 2a7a43edc46f6d3a8d486914b33e2e579b32bebd

Split encoding out to its own module

view details

Nick Fitzgerald

commit sha 0323e682333bfb73a90b9085b66672b49e90df5f

Add a method to ensure the generated Wasm module's termination Fixes #6

view details

Nick Fitzgerald

commit sha 4643aa6e966b9f3c403b94f0ba6af316b50fc314

Add new fuzz target to CI

view details

Nick Fitzgerald

commit sha 3522fe8e487b9ff4e18f1af696ad34567fe6991d

Fix CI

view details

Nick Fitzgerald

commit sha 2f1e5e3e74bae91b638c071f252eb646ad40932e

Add some more documentation for `Module`

view details

push time in 3 days

delete branch fitzgen/wasm-tools

delete branch : wasm-smith

delete time in 3 days

issue closedbytecodealliance/wasm-tools

Implement `Hash` on types

Currently even data enums and structs (e.g. Type, FuncType, NameEntry, etc.), are missing Hash implementation, which makes it hard to use them in a HashMap for caching.

Would it be possible to add simple #[derive(Hash)] to all non-builder structs?

closed time in 3 days

RReverser

PR merged bytecodealliance/wasm-tools

Merge `wasm-smith` into the `wasm-tools` repo

It makes sense for wasm-smith to live here, since it is a Wasm tool :-p

More seriously, for the same reason it is nice to update all the rest of the tools in lockstep when adding new Wasm features and doing releases together, it makes sense to do this with wasm-smith as well. For example, see the annoying developer overhead caused by reporting bugs in wasmparser's validator that were fixed in main but we just didn't have the versions updated together yet.

This PR was made by

  • creating a new, orphan branch for wasm-smith
  • pulling fitzgen/wasm-smith#main
  • moving wasm-smith in that branch into crates/wasm-smith
  • and then merging bytecodealliance/wasm-tools#main

This way we should retain wasm-smith's full history.

+6805 -2

0 comment

1931 changed files

fitzgen

pr closed time in 3 days

push eventfitzgen/wasm-tools

Nick Fitzgerald

commit sha bfea4d21a27a5b6b1f67eb2b8573778334de151e

Don't specify local crate version so version bumps are easier

view details

Nick Fitzgerald

commit sha 74b24e9b3303119298e903793995b54cff6964d6

Update `wasm-smith` repo in `Cargo.toml`

view details

Nick Fitzgerald

commit sha d344d829bee0fefd828821039bd55ca8cf032ddd

List `wasm-smith` in the top-level README

view details

push time in 3 days

PR opened bytecodealliance/wasm-tools

Reviewers
Merge `wasm-smith` into the `wasm-tools` repo

It makes sense for wasm-smith to live here, since it is a Wasm tool :-p

More seriously, for the same reason it is nice to update all the rest of the tools in lockstep when adding new Wasm features and doing releases together, it makes sense to do this with wasm-smith as well. For example, see the annoying developer overhead caused by reporting bugs in wasmparser's validator that were fixed in main but we just didn't have the versions updated together yet.

This PR was made by

  • creating a new, orphan branch for wasm-smith
  • pulling fitzgen/wasm-smith#main
  • moving wasm-smith in that branch into crates/wasm-smith
  • and then merging bytecodealliance/wasm-tools#main

This way we should retain wasm-smith's full history.

+6804 -2

0 comment

1930 changed files

pr created time in 3 days

push eventfitzgen/wasm-tools

Yury Delendik

commit sha 1be4b3fb112ec26665da91d6978fb420aec9f29f

Initial translation of wasmparser to Rust.

view details

Yury Delendik

commit sha 26d2a1db6494dd920b3010f409df17b7a586ab4e

Add meta information

view details

Yury Delendik

commit sha 2b7773582fbdf1d5dc289195d3dfdf2da8f30445

Export ParserState

view details

Yury Delendik

commit sha bfde4f5a25ef21ca32ebaad31d024c649cc9b49e

More parser exports.

view details

Yury Delendik

commit sha b9db958ccf46f820ee7d85b2805927855e204498

Readme

view details

Dan Gohman

commit sha f7b8dd19f0c62b3e11036c23a25e857dc1b99537

Add the example as an example test program. Putting it in the examples directory makes it be automatically built as part of `cargo test`.

view details

Yury Delendik

commit sha 586d6a4af39c6bec9c6bd09d7fc3aad271e1a899

Merge pull request #1 from sunfishcode/master Add the example as an example test program.

view details

Dan Gohman

commit sha 15daa97ab463bf92dc45239c149b727385aa7f01

Run rustfmt on source files and check in related build scripts. This adds scripts for running rustfmt and building documentation, derived from the infrastructure in the cretonne tree.

view details

Yury Delendik

commit sha 6b47cf570f7ed966dbdc36b9d0e1d14109d0990e

Merge pull request #2 from sunfishcode/master Run rustfmt on source files and check in related build scripts.

view details

Yury Delendik

commit sha cbf4670b366d78657336fa9e9787fc1c6332134a

Use Result for parse operations

view details

Yury Delendik

commit sha 3be4af9e8eacbf6397ec2a57af24442e66b4ae29

Adds support for reloc and linking sections.

view details

Michael Bebenita

commit sha ff03d03d64bb6dbafa5e5fd5a4191675dbd2df3b

Add description.

view details

Yury Delendik

commit sha 168e4c79cf346732d69715421e4c3f7c188a8788

Merge pull request #4 from mbebenita/master Add description.

view details

Yury Delendik

commit sha c05bb9d0017e77914c06174c6513833461cdaec9

Avoiding tuples in the enums.

view details

Yury Delendik

commit sha 5cea1a4aaad5143a0d2cecb15c999d4859469556

Update README.md

view details

Dan Gohman

commit sha e3d4a5e5b600408c8ba1881113e53490c69e2811

Format with rustfmt.

view details

Dan Gohman

commit sha dbecdcb2f609a5aa2c48a5b3471f972deb154665

Merge pull request #9 from sunfishcode/rustfmt Format with rustfmt.

view details

Dan Gohman

commit sha 88829c17ac364e2c4dcf30675c7e1752bde2d02b

Replace the monolithic spec.wasm with one-module-per-file tests.

view details

Dan Gohman

commit sha 2959cdb72c5092c9b50854ff84c670a6dc346b9e

Remove support for concatenated modules. The spec testsuite now tests that concatenated modules be rejected: https://github.com/WebAssembly/testsuite/blob/master/custom_section.wast#L105 This also simplifies the read function to return a plain &ParserState rather than an Option<&ParserState> since ParserState already has EndWasm and Error to indicate that parsing should terminate.

view details

Yury Delendik

commit sha 945db4417e4b083f6fca59f6dfcf02b9833fd6f6

Merge pull request #10 from sunfishcode/no-concat Remove support for concatenated modules.

view details

push time in 3 days

create barnchfitzgen/wasm-tools

branch : wasm-smith

created branch time in 4 days

push eventfitzgen/wasm-tools

Yury Delendik

commit sha fd7904e597952a13abd9d945f1210d1deeacf5ac

Fixes poly-stack for the if

view details

Nick Fitzgerald

commit sha 2135608375d8dbbd7ff5e6c28083434cccd7101d

Merge pull request #91 from yurydelendik/if-multi-unreach Fixes poly-stack for the if

view details

Nick Fitzgerald

commit sha a9b48ed6dcb5bb49067d5b37ec099353995bb501

Add a fuzz target for validating `wasm-smith`-generated modules

view details

Nick Fitzgerald

commit sha 0302f84c7b6b00d1f9b979c699d92d8fd73af019

Add a fuzz target for printing valid modules with `wasm-smith`

view details

Nick Fitzgerald

commit sha 47a114f9dd5c4f585f0501ed396932dc9c3da720

Add a fuzz target for round tripping valid modules

view details

Nick Fitzgerald

commit sha 7128be79319cd8cb30e2b35ba3f5a5c1542ee3e4

Merge pull request #92 from fitzgen/add-wasm-smith-fuzz-targets Add fuzz targets that use wasm-smith

view details

Alex Crichton

commit sha 77a95a0b8574d0b1186f899338472deeda8f6799

Weed out `@custom` annotations in roundtrip fuzzer (#93) We don't print those so it's expected that text modules with `@custom` won't round-trip right now.

view details

Darin Morrison

commit sha b761e7cd38295c486f483e63ba6c3fbe7f45edf8

Expose some internals of wast::Error (#95) Co-authored-by: Darin Morrison <darinmorrison@users.noreply.github.com>

view details

Alex Crichton

commit sha 8cba0f12d9cc44e8a69f8a189314a339c161fbf8

Bump wasmprinter to 0.2.9

view details

Alex Crichton

commit sha ae35128016a04eccdf3a4e7bb0e2897c5eb12c76

Validate minimum table size against entries limit (#96) * Validate minimum table size against entries limit * simplify block-w-params-unreachable.wat test Co-authored-by: Yury Delendik <ydelendik@mozilla.com>

view details

Alex Crichton

commit sha c243098c5b4ec8c2f55849a32a5d8d07160e6216

Update wabt submodule (#97) Tweak a few test directives and allows and such

view details

Alex Crichton

commit sha 9817dbf619ede2da6a9421ffd317f3738c3c0570

Start reducing memory overhead of the parser (#98) We've got a fuzz bug on Wasmtime right now where the wasm module generated, when converted to text and then parsed, blows the memory limit on the fuzz infrastructure. The memory usage and performance of `wast` hasn't ever really been too too much of a concern, so this picks off a low-hanging-fruit which is the size of the `Source` enum. Before this commit `Source` was 136 bytes. The way the parser works right now is that it lexes the entire source and creates a list of tokens to parse, storing them into a `Vec`. This commit shrinks the size of this element from 136 bytes to 24 (and flattens `Source` into one `Token` enum). This drastically reduces the amount of memory allocated to store the tokens of what we're parsing. Unfortunately the parser is still hanging on to too much memory, so I'll be adding a few follow-up PRs as well to handle further memory improvements.

view details

Alex Crichton

commit sha 7c5d2bace2831a378ac16c7e86d5f201ae42de75

Store some fields as `Box<[_]>` instead of `Vec<_>` (#99) In the fuzz OOM case we're running into found on Wasmtime's OSS-Fuzz integration a lot of allocations are pointing to function types and expressions, and switching to `Box<[_]>` looks to improve memory by only allocating precise chunks of memory instead of having an over-allocated `Vec<_>` which is never actually used.

view details

Alex Crichton

commit sha 7811832a5be385f63f7465bb20137471576a378f

Rewrite handling of blocks in the operator validator (#101) This commit rewrites how blocks are handled in the `OperatorValidator` type, primarily motivated by the various bugs we've had recently around the handling of `unreachable` instructions (#100 being the most recent). The goal of this refactoring is to update the validator to match, almost exactly, the [online appendix for the validation algorithm][appendix], namely around how blocks and `unreachable` are handled. This also should hopefully make the code a bit easier to read since the trickiness is handled in a relatively subtle way where the "naive interpretation" ends up being correct. I've done some quick benchmarking and this doesn't appear to either regress or improve performance (yay?), but this does... Closes #100 [appendix]: https://webassembly.github.io/spec/core/appendix/algorithm.html

view details

Darin Morrison

commit sha 81569de3716ff6f99451adaf802988442e1b35d0

Bump version to 24.0.0 (#102) Co-authored-by: Darin Morrison <darinmorrison@users.noreply.github.com>

view details

Alex Crichton

commit sha dec44fe924a0ce86251891754407341eb9d6f803

Bump wat to 1.0.25

view details

Alex Crichton

commit sha 131bb064f01cc355e26827b85e6fa047dbb22a71

Fixup version requirement

view details

Alex Crichton

commit sha 0318b57a41c5a2cbabe9bd635d91fc64b5eff1dd

Fix a panic with malformed `let` blocks (#103) When resolving we don't pop label scopes when we see an `else` block, so don't pop local scopes as well. It's technically invalid to have an `else` inside of a `let` anyway, but let's hobble along in the text parser and let the binary validator figure that out.

view details

Ömer Sinan Ağacan

commit sha e32627b60fd5f336f66a10348fbf88a319c10c26

wasmparser: Fix OperatorsReader link in Validator docs (#109)

view details

Darin Morrison

commit sha 8ec7af4a1934de8bb6cbb2df83e349d7abc99e58

WIP: Update SIMD instructions (#105) * Update testsuite submodule * Update the upstream testsuite to the current master branch * Update wabt to the current master branch * Get the test suite working with SIMD/memory64 changes (mostly just ignoring memory64 and simd with wabt) * Add LaneArg; reject lane indices prefixed with + * Update simd instructions Co-authored-by: Darin Morrison <darinmorrison@users.noreply.github.com>

view details

push time in 4 days

delete branch fitzgen/wasm-tools

delete branch : stack-height

delete time in 5 days

push eventbytecodealliance/wasm-tools

Alex Crichton

commit sha 3a9eecb6c553e1c9b2f1ba1180d1210cd2ae84aa

Fix handling of indentation printing invalid modules This commit fixes a panic on integer overflow in the `wasmprinter` crate where when an invalid module was printed it could confuse the indentation handling logic. Instead the logic is refactored to be handled in just one place and better handles invalid modules.

view details

Nick Fitzgerald

commit sha 51c78e506fbf234a530ddd42cc7918960e152873

Merge pull request #118 from alexcrichton/fix-dangling-else-panic Fix handling of indentation printing invalid modules

view details

push time in 6 days

PR merged bytecodealliance/wasm-tools

Fix handling of indentation printing invalid modules

This commit fixes a panic on integer overflow in the wasmprinter crate where when an invalid module was printed it could confuse the indentation handling logic. Instead the logic is refactored to be handled in just one place and better handles invalid modules.

+51 -22

0 comment

2 changed files

alexcrichton

pr closed time in 6 days

PullRequestReviewEvent

push eventbytecodealliance/wasmtime

Alex Crichton

commit sha 4a82f17d91978ba6739d00740f54a3285ccf97f9

Don't allocate a new ISA for each `Func::wrap` Instead we can reuse the existing one in `Store`.

view details

Nick Fitzgerald

commit sha 76998f0404d83f1c303887c5fd207e14a07dcf4c

Merge pull request #2300 from alexcrichton/no-allocate-isa Don't allocate a new ISA for each `Func::wrap`

view details

push time in 6 days

PR merged bytecodealliance/wasmtime

Don't allocate a new ISA for each `Func::wrap` wasmtime:api

Instead we can reuse the existing one in Store.

+3 -9

1 comment

1 changed file

alexcrichton

pr closed time in 6 days

PullRequestReviewEvent

push eventbytecodealliance/wasmtime

Alex Crichton

commit sha b8794448b01c8e3d2f54fc893dd990c2f398f5e0

Avoid allocations in trampoline shims There's no need to name each export since each synthetic instance we're creating only has one export, so let's use the empty string which doesn't require any allocations.

view details

Nick Fitzgerald

commit sha 1a0a2bc2599a2f53c7a1b3200d95e5f9a27ecf11

Merge pull request #2301 from alexcrichton/no-name-alloc Avoid allocations in trampoline shims

view details

push time in 6 days

PR merged bytecodealliance/wasmtime

Avoid allocations in trampoline shims wasmtime:api

There's no need to name each export since each synthetic instance we're creating only has one export, so let's use the empty string which doesn't require any allocations.

+11 -11

1 comment

5 changed files

alexcrichton

pr closed time in 6 days

PullRequestReviewEvent

push eventfitzgen/wasm-tools

Nick Fitzgerald

commit sha db40297e83ee681e8f77c009eb4eb1abe2900411

Merge pull request #116 from alexcrichton/fuzz-multi-memory Fuzz with multi-memory on CI

view details

Nick Fitzgerald

commit sha 5c006a4b7d41b8ea9f87bf2da9401c6a65218f04

Expose the height of the operand stack from `FuncValidator`

view details

Nick Fitzgerald

commit sha f28f9b53e76639723b5fd524bc4fa7e51c3617e4

Fix compiler warning about renamed compiler warning

view details

push time in 8 days

push eventfitzgen/wasm-tools

Yury Delendik

commit sha fd7904e597952a13abd9d945f1210d1deeacf5ac

Fixes poly-stack for the if

view details

Nick Fitzgerald

commit sha 2135608375d8dbbd7ff5e6c28083434cccd7101d

Merge pull request #91 from yurydelendik/if-multi-unreach Fixes poly-stack for the if

view details

Nick Fitzgerald

commit sha a9b48ed6dcb5bb49067d5b37ec099353995bb501

Add a fuzz target for validating `wasm-smith`-generated modules

view details

Nick Fitzgerald

commit sha 0302f84c7b6b00d1f9b979c699d92d8fd73af019

Add a fuzz target for printing valid modules with `wasm-smith`

view details

Nick Fitzgerald

commit sha 47a114f9dd5c4f585f0501ed396932dc9c3da720

Add a fuzz target for round tripping valid modules

view details

Nick Fitzgerald

commit sha 7128be79319cd8cb30e2b35ba3f5a5c1542ee3e4

Merge pull request #92 from fitzgen/add-wasm-smith-fuzz-targets Add fuzz targets that use wasm-smith

view details

Alex Crichton

commit sha 77a95a0b8574d0b1186f899338472deeda8f6799

Weed out `@custom` annotations in roundtrip fuzzer (#93) We don't print those so it's expected that text modules with `@custom` won't round-trip right now.

view details

Darin Morrison

commit sha b761e7cd38295c486f483e63ba6c3fbe7f45edf8

Expose some internals of wast::Error (#95) Co-authored-by: Darin Morrison <darinmorrison@users.noreply.github.com>

view details

Alex Crichton

commit sha 8cba0f12d9cc44e8a69f8a189314a339c161fbf8

Bump wasmprinter to 0.2.9

view details

Alex Crichton

commit sha ae35128016a04eccdf3a4e7bb0e2897c5eb12c76

Validate minimum table size against entries limit (#96) * Validate minimum table size against entries limit * simplify block-w-params-unreachable.wat test Co-authored-by: Yury Delendik <ydelendik@mozilla.com>

view details

Alex Crichton

commit sha c243098c5b4ec8c2f55849a32a5d8d07160e6216

Update wabt submodule (#97) Tweak a few test directives and allows and such

view details

Alex Crichton

commit sha 9817dbf619ede2da6a9421ffd317f3738c3c0570

Start reducing memory overhead of the parser (#98) We've got a fuzz bug on Wasmtime right now where the wasm module generated, when converted to text and then parsed, blows the memory limit on the fuzz infrastructure. The memory usage and performance of `wast` hasn't ever really been too too much of a concern, so this picks off a low-hanging-fruit which is the size of the `Source` enum. Before this commit `Source` was 136 bytes. The way the parser works right now is that it lexes the entire source and creates a list of tokens to parse, storing them into a `Vec`. This commit shrinks the size of this element from 136 bytes to 24 (and flattens `Source` into one `Token` enum). This drastically reduces the amount of memory allocated to store the tokens of what we're parsing. Unfortunately the parser is still hanging on to too much memory, so I'll be adding a few follow-up PRs as well to handle further memory improvements.

view details

Alex Crichton

commit sha 7c5d2bace2831a378ac16c7e86d5f201ae42de75

Store some fields as `Box<[_]>` instead of `Vec<_>` (#99) In the fuzz OOM case we're running into found on Wasmtime's OSS-Fuzz integration a lot of allocations are pointing to function types and expressions, and switching to `Box<[_]>` looks to improve memory by only allocating precise chunks of memory instead of having an over-allocated `Vec<_>` which is never actually used.

view details

Alex Crichton

commit sha 7811832a5be385f63f7465bb20137471576a378f

Rewrite handling of blocks in the operator validator (#101) This commit rewrites how blocks are handled in the `OperatorValidator` type, primarily motivated by the various bugs we've had recently around the handling of `unreachable` instructions (#100 being the most recent). The goal of this refactoring is to update the validator to match, almost exactly, the [online appendix for the validation algorithm][appendix], namely around how blocks and `unreachable` are handled. This also should hopefully make the code a bit easier to read since the trickiness is handled in a relatively subtle way where the "naive interpretation" ends up being correct. I've done some quick benchmarking and this doesn't appear to either regress or improve performance (yay?), but this does... Closes #100 [appendix]: https://webassembly.github.io/spec/core/appendix/algorithm.html

view details

Darin Morrison

commit sha 81569de3716ff6f99451adaf802988442e1b35d0

Bump version to 24.0.0 (#102) Co-authored-by: Darin Morrison <darinmorrison@users.noreply.github.com>

view details

Alex Crichton

commit sha dec44fe924a0ce86251891754407341eb9d6f803

Bump wat to 1.0.25

view details

Alex Crichton

commit sha 131bb064f01cc355e26827b85e6fa047dbb22a71

Fixup version requirement

view details

Alex Crichton

commit sha 0318b57a41c5a2cbabe9bd635d91fc64b5eff1dd

Fix a panic with malformed `let` blocks (#103) When resolving we don't pop label scopes when we see an `else` block, so don't pop local scopes as well. It's technically invalid to have an `else` inside of a `let` anyway, but let's hobble along in the text parser and let the binary validator figure that out.

view details

Ömer Sinan Ağacan

commit sha e32627b60fd5f336f66a10348fbf88a319c10c26

wasmparser: Fix OperatorsReader link in Validator docs (#109)

view details

Darin Morrison

commit sha 8ec7af4a1934de8bb6cbb2df83e349d7abc99e58

WIP: Update SIMD instructions (#105) * Update testsuite submodule * Update the upstream testsuite to the current master branch * Update wabt to the current master branch * Get the test suite working with SIMD/memory64 changes (mostly just ignoring memory64 and simd with wabt) * Add LaneArg; reject lane indices prefixed with + * Update simd instructions Co-authored-by: Darin Morrison <darinmorrison@users.noreply.github.com>

view details

push time in 8 days

push eventfitzgen/wasmtime

Nick Fitzgerald

commit sha 008ff8f39de5ca68d40715ff446d0dc1639ef19b

souper-harvest: ensure that `select` conditions are of type `i1`

view details

push time in 8 days

issue commentgoogle/souper

EBNF-style grammar for Souper's text format?

Thanks for your help!

First few LHSes are:

;; Harvested from `v40` in `u0:192`
%3:i1 = var
%4:i32 = var
%5:i32 = select %3, -1:i32, %4
infer %5

;; Harvested from `v45` in `u0:177`
%0:i32 = var
%1:i64 = zext %0
%2:i64 = mul %1, 4:i64
infer %2

;; Harvested from `v31` in `u0:204`
%0:i32 = var
%1:i64 = zext %0
%2:i64 = mul %1, 4:i64
infer %2

Full files:

fitzgen

comment created time in 8 days

issue commentgoogle/souper

EBNF-style grammar for Souper's text format?

Does this not support parsing multiple LHSes from one file?

$  ~/souper/obj/souper-check --souper-no-infer --souper-external-cache ~/scratch/markdown-lhs-candidates.souper
/home/fitzgen/scratch/markdown-lhs-candidates.souper:11:7: Not expecting a second 'infer'
fitzgen

comment created time in 8 days

issue commentgoogle/souper

EBNF-style grammar for Souper's text format?

I've got everything parsing okay now -- how can I verify whether souper is successfully populating redis?

This is the first time I've ever used redis, but I would expect that the keys column printed below would be non-zero after populating it with LHSes:

fitzgen@big-beefy :: (souper-no-assign-constant) :: ~/wasmtime/cranelift
    $  ~/souper/obj/souper-check --souper-external-cache --parse-lhs-only ~/scratch/markdown-lhs-candidates.souper
; parsing successful

fitzgen@big-beefy :: (souper-no-assign-constant) :: ~/wasmtime/cranelift
    $ redis-cli --stat
------- data ------ --------------------- load -------------------- - child -
keys       mem      clients blocked requests            connections          
0          839.02K  1       0       30 (+0)             6           
0          839.02K  1       0       31 (+1)             6           
0          839.02K  1       0       32 (+1)             6           
  C-c C-c
fitzgen

comment created time in 8 days

push eventfitzgen/wasmtime

Nick Fitzgerald

commit sha 4f7db33c5fe6ba883e6fd9939729a5b1a3533dd5

souper-harvest: ensure that `select` conditions are of type `i1`

view details

push time in 8 days

created tagfitzgen/souper-ir

tag2.1.0

A library for manipulating Souper IR

created time in 8 days

push eventfitzgen/souper-ir

Nick Fitzgerald

commit sha 2cca450af49b3de95de670d08b7aed28313e204d

Add `LhsBuilder::get_value` to get previously defined assignments

view details

Nick Fitzgerald

commit sha 0ed2b8005bf9c0dfaec6a2136f57704e78d4ce4a

Bump to version 2.1.0

view details

push time in 8 days

pull request commentbytecodealliance/wasm-tools

Expose the height of the value stack from the validator

Out of curiosity, what's the use case for this?

I was using this in my template JIT to compute offsets for locals within the current frame.

Should this also return the height of the stack of the whole function or just the current block?

The function's whole stack.

fitzgen

comment created time in 8 days

create barnchfitzgen/wasm-tools

branch : stack-height

created branch time in 9 days

issue commentbytecodealliance/wasmtime

Instantiation performance improvement

Resetting memories, globals, and tables shouldn't be too hard as long as there aren't any frames on the stack. This way we wouldn't need to reset the stack, which has bigger implications (like spec deviance, for one).

bkolobara

comment created time in 9 days

issue commentfitzgen/wasm-smith

Support toggling wasm proposals on/off

  • [ ] turn multi-value on/off via Config::multi_value_enabled
  • [ ] turn multi-memory on/off via Config::multi_memory_enabled (can use max_memories but it would be nice to be consistent with other proposals)
fitzgen

comment created time in 9 days

push eventfitzgen/wasm-smith

Alex Crichton

commit sha ebdbd73c1007c4b268758c36b617b5007d8e2373

Add a config option to encode over-long ulebs This is hopefully going to help expose various holes in encoders if they expect an immediate byte but actually a uleb can be specified.

view details

Nick Fitzgerald

commit sha 6d6893c3042eef4b2e96ecb2841fb78548e8409e

Merge pull request #25 from alexcrichton/overlong-uleb Add a config option to encode over-long ulebs

view details

push time in 9 days

PR merged fitzgen/wasm-smith

Add a config option to encode over-long ulebs

This is hopefully going to help expose various holes in encoders if they expect an immediate byte but actually a uleb can be specified.

+22 -0

0 comment

2 changed files

alexcrichton

pr closed time in 9 days

PullRequestReviewEvent

Pull request review commentfitzgen/wasm-smith

Add support for memory-related bulk-memory instructions

 pub trait Config: Arbitrary + Default {     fn memory_offset_choices(&self) -> (u32, u32, u32) {         (75, 24, 1)     }++    /// Determines whether the bulk memory proposal is enabled for generating+    /// insructions.
    /// Determines whether the bulk memory proposal is enabled for generating
    /// insructions. Defaults to `false`.
alexcrichton

comment created time in 9 days

Pull request review commentfitzgen/wasm-smith

Add support for memory-related bulk-memory instructions

 impl Arbitrary for SwarmConfig {             max_elements: u.int_in_range(0..=MAX_MAXIMUM)?,             max_data_segments: u.int_in_range(0..=MAX_MAXIMUM)?,             max_instructions: u.int_in_range(0..=MAX_MAXIMUM)?,-            max_memories: u.int_in_range(0..=(MAX_MAXIMUM as u32))?,+            max_memories: u.int_in_range(0..=10)?,

Do you want to make it match wasmparser's max of 100? Doesn't make sense to constrain generation narrower than wasmparser can handle.

alexcrichton

comment created time in 9 days

Pull request review commentfitzgen/wasm-smith

Add support for memory-related bulk-memory instructions

 fn memory_grow<C: Config>(     Ok(Instruction::MemoryGrow(memory_index(u, builder)?)) } +#[inline]+fn memory_init_valid<C: Config>(+    module: &ConfiguredModule<C>,+    builder: &mut CodeBuilder<C>,+) -> bool {+    have_memory(module, builder)+        && have_data(module, builder)+        && module.config.bulk_memory_enabled()+        && builder.types_on_stack(&[ValType::I32, ValType::I32, ValType::I32])+}++fn memory_init<C: Config>(+    u: &mut Unstructured,+    module: &ConfiguredModule<C>,+    builder: &mut CodeBuilder<C>,+) -> Result<Instruction> {+    let mem = memory_index(u, builder)?;+    let data = data_index(u, module)?;+    builder.pop_operands(&[ValType::I32, ValType::I32, ValType::I32]);+    Ok(Instruction::MemoryInit { mem, data })+}++#[inline]+fn memory_fill_valid<C: Config>(+    module: &ConfiguredModule<C>,+    builder: &mut CodeBuilder<C>,+) -> bool {+    have_memory(module, builder)+        && module.config.bulk_memory_enabled()+        && builder.types_on_stack(&[ValType::I32, ValType::I32, ValType::I32])+}++fn memory_fill<C: Config>(+    u: &mut Unstructured,+    _module: &ConfiguredModule<C>,+    builder: &mut CodeBuilder<C>,+) -> Result<Instruction> {+    let mem = memory_index(u, builder)?;+    builder.pop_operands(&[ValType::I32, ValType::I32, ValType::I32]);+    Ok(Instruction::MemoryFill(mem))+}++#[inline]+fn memory_copy_valid<C: Config>(+    module: &ConfiguredModule<C>,+    builder: &mut CodeBuilder<C>,+) -> bool {+    memory_fill_valid(module, builder)+}++fn memory_copy<C: Config>(+    u: &mut Unstructured,+    _module: &ConfiguredModule<C>,+    builder: &mut CodeBuilder<C>,+) -> Result<Instruction> {+    let src = memory_index(u, builder)?;+    let dst = memory_index(u, builder)?;+    builder.pop_operands(&[ValType::I32, ValType::I32, ValType::I32]);+    Ok(Instruction::MemoryCopy { dst, src })+}++#[inline]+fn data_drop_valid<C: Config>(module: &ConfiguredModule<C>, builder: &mut CodeBuilder<C>) -> bool {+    have_data(module, builder) && module.config.bulk_memory_enabled()+}+fn data_drop<C: Config>(

Nitpick: missing a newline here.


fn data_drop<C: Config>(
alexcrichton

comment created time in 9 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventbytecodealliance/wasm-tools

Alex Crichton

commit sha f6fffe175f0f3bfb300fe391f66b34bcf7c4f91c

Fuzz with multi-memory on CI

view details

Nick Fitzgerald

commit sha db40297e83ee681e8f77c009eb4eb1abe2900411

Merge pull request #116 from alexcrichton/fuzz-multi-memory Fuzz with multi-memory on CI

view details

push time in 9 days

PullRequestReviewEvent

push eventfitzgen/wasmtime

bjorn3

commit sha b1187b5507a68af67444f5b0c08e719ee4b91320

Merge ModuleNamespace and ModuleContents

view details

bjorn3

commit sha 6161acfba50d2c3d748f32d375282772f41c808a

Minor simplification

view details

bjorn3

commit sha 7dcfb1b47bbeb93927c98740a76603479f0b3621

Move some error checking out of the define_* functions

view details

bjorn3

commit sha 4483c3740a7f045b59648b5e37249c8e1fc66653

Remove get_finalized_*

view details

bjorn3

commit sha 7608749647d3fd4adbce405cdfdb1ebbca0ecb51

Merge finalize_definitions into finish

view details

bjorn3

commit sha 59f95083b14f045745e4a4991239af9dbd38bfb3

Remove write_data_funcaddr and write_data_dataaddr They are unimplemented by all backends

view details

bjorn3

commit sha 405b9e28753db5d5681ddf6fb9099612ff64621e

Remove finalize_* from the Backend trait Instead let the `finish` method perform finalization

view details

Anton Kirilov

commit sha d18de69e5ad1a8d7d2e124e9debf368dccda0fac

AArch64: Add test cases for callee-saved SIMD & FP registers Copyright (c) 2020, Arm Limited.

view details

bjorn3

commit sha 588a4be0b31bf679ae153e929853623894184c63

Store Compiled* in the backend instead of Module

view details

bjorn3

commit sha 80f4ecf9b511c3767c65e5657775e154ae5fe1fa

Move almost all logic out of Module

view details

bjorn3

commit sha c2ffcdc6d098642a7a697d5c01207c8bad73c892

Move logic out of more Module methods

view details

bjorn3

commit sha 7a6e909efe9a72f94a9aac3acceb0325e25a1236

Move a bit more logic out of Module

view details

bjorn3

commit sha b44c5bb2bef5c6567c96aca6acc529ccd9e866ff

Move ModuleDeclarations to backends

view details

bjorn3

commit sha 84c6ec32148307716edecf48e2a32710be7387b7

Move alignment config from declare_data to define_data

view details

bjorn3

commit sha d84ca235d2a627ce674738a47a10841c59a777e8

Remove Backend trait and turn Module into a trait

view details

bjorn3

commit sha 9ccf8370926ffd6094076b4b83c437ff41476ea6

Fix SimpleJIT tests

view details

Chris Fallin

commit sha 835db11beaf914b19a5c70a21c8da4cfbe3311d6

Support for SpiderMonkey's "Wasm ABI 2020". As part of a Wasm JIT update, SpiderMonkey is changing its internal WebAssembly function ABI. The new ABI's frame format includes "caller TLS" and "callee TLS" slots. The details of where these come from are not important; from Cranelift's point of view, the only relevant requirement is that we have two on-stack args that are always present (offsetting other on-stack args), and that we define special argument purposes so that we can supply values for these slots. Note that this adds a *new* ABI (a variant of the Baldrdash ABI) because we do not want to tightly couple the landing of this PR to the landing of the changes in SpiderMonkey; it's better if both the old and new behavior remain available in Cranelift, so SpiderMonkey can continue to vendor Cranelift even if it does not land (or backs out) the ABI change. Furthermore, note that this needs to be a Cranelift-level change (i.e. cannot be done purely from the translator environment implementation) because the special TLS arguments must always go on the stack, which would not otherwise happen with the usual argument-placement logic; and there is no primitive to push a value directly in CLIF code (the notion of a stack frame is a lower-level concept).

view details

Chris Fallin

commit sha b8f0dc429f2b886e7423122223393b2c7ee3cd4f

Merge pull request #2223 from cfallin/baldrdash-2020 Support for SpiderMonkey's "Wasm ABI 2020" in general and on AArch64.

view details

Nick Fitzgerald

commit sha 81ce92b7ef289121bee123aa2ac6cc500d7e59c0

Add reminder to tag releases to publish script (#2250)

view details

bjorn3

commit sha b061694491d1d4f39eb25944232dfeeeaa9301f7

Rustfmt and update docs

view details

push time in 9 days

PR opened bytecodealliance/wasmtime

Reviewers
souper-harvest: Do not generate assignments of constants

It turns out that Souper does not allow a constant to be assigned to a variable, they may only be used as operands. The 2.0.0 version of the souper-ir crate correctly reflects this. In the cranelift_codegen::souper_harvest module, we need to modify our Souper IR harvester so that it delays converting iconst and bconst into Souper IR until their values are used as operands. Finally, some unit tests in the peepmatic-souper crate need some small updates as well.

@iximeow could you take a look at this? Thanks!

<!--

Please ensure that the following steps are all taken care of before submitting the PR.

  • [ ] This has been discussed in issue #..., or if not, please tell us why here.
  • [ ] A short description of what this does, why it is needed; if the description becomes long, the matter should probably be discussed in an issue first.
  • [ ] This PR contains test cases, if meaningful.
  • [ ] A reviewer from the core maintainer team has been assigned for this PR. If you don't know who could review this, please indicate so. The list of suggested reviewers on the right can help you.

Please ensure all communication adheres to the code of conduct. -->

+60 -35

0 comment

5 changed files

pr created time in 9 days

create barnchfitzgen/wasmtime

branch : souper-no-assign-constant

created branch time in 9 days

created tagfitzgen/souper-ir

tag1.0.0

A library for manipulating Souper IR

created time in 9 days

created tagfitzgen/souper-ir

tag2.0.0

A library for manipulating Souper IR

created time in 9 days

push eventfitzgen/souper-ir

Nick Fitzgerald

commit sha 52772a69599f33e5cd8eaf2e7efa371ffd954292

Fix souper grammar's `<replacement>` production

view details

Nick Fitzgerald

commit sha b1905c7d33b03e6585e1aa80a6e1cad2d4a552d6

Souper actually does not allow constants as an assignment's RHS

view details

Nick Fitzgerald

commit sha c6c826729af22710c230e80f474970de4ca4b50b

Bump to version 2.0.0

view details

push time in 9 days

issue commentgoogle/souper

EBNF-style grammar for Souper's text format?

Not too hard, I think I actually have it working already. Will need to publish a breaking change of the souper-ir crate too, but that's no biggie since AFAIK I'm the only user :-p

fitzgen

comment created time in 9 days

push eventbytecodealliance/wasmtime

Andrew Brown

commit sha f36ceac010cea21fcf6aab96aec4924349e229f7

Fix typo

view details

Nick Fitzgerald

commit sha 2dad74f9d05c413c5d926981e7057ebcd35ecd10

Merge pull request #2292 from abrown/fix-typo Fix typo

view details

push time in 9 days

PR merged bytecodealliance/wasmtime

Reviewers
Fix typo wasmtime:api

<!--

Please ensure that the following steps are all taken care of before submitting the PR.

  • [ ] This has been discussed in issue #..., or if not, please tell us why here.
  • [ ] A short description of what this does, why it is needed; if the description becomes long, the matter should probably be discussed in an issue first.
  • [ ] This PR contains test cases, if meaningful.
  • [ ] A reviewer from the core maintainer team has been assigned for this PR. If you don't know who could review this, please indicate so. The list of suggested reviewers on the right can help you.

Please ensure all communication adheres to the code of conduct. -->

+1 -1

1 comment

1 changed file

abrown

pr closed time in 9 days

PullRequestReviewEvent

issue commentgoogle/souper

EBNF-style grammar for Souper's text format?

The grammar I originally wrote here allows lines like this:

%0:i32 = 1234
...

specifically because it has the production

<assignment-rhs> ::= <constant>
                   | ...

but it seems that souper doesn't actually allow lines where you assign a constant value to a variable.

Would this be difficult to support?

fitzgen

comment created time in 9 days

pull request commentEFLS/zetteldeft

Introduce `zetteldeft-list-prefix` for customizing list items

Note: I didn't update zetteldeft.el, since I'm not sure how to do that

fitzgen

comment created time in 10 days

PR opened EFLS/zetteldeft

Introduce `zetteldeft-list-prefix` for customizing list items

For example, if you are using zetteldeft with markdown, you can set this variable to "* ". This allows you to make it so that zetteldeft creates lists like this:

* [[id]] foo
* [[id]] bar

Rather than the default of " - ", which creates lists like this:

 - [[id]] foo
 - [[id]] bar

Fixes #85

+16 -1

0 comment

2 changed files

pr created time in 10 days

create barnchfitzgen/zetteldeft

branch : zetteldeft-list-prefix

created branch time in 10 days

fork fitzgen/zetteldeft

A Zettelkasten system! Or rather, some functions on top of the emacs deft package.

https://efls.github.io/zetteldeft

fork in 10 days

issue commentEFLS/zetteldeft

Feature request: customize list syntax used by `zetteldeft-insert-list-links[-missing]`

I was imagining a variable that would be a list prefix string, and by default would be " -". Does that sound reasonable?

fitzgen

comment created time in 10 days

issue openedEFLS/zetteldeft

Feature request: customize list syntax used by `zetteldeft-insert-list-links[-missing]`

Right now it always produces lists with <code> -</code> as the list syntax, e.g.:

 - [[id]] one
 - [[id]] two

I'm using zetteldeft with markdown files, and while the above works, it is (a) generally more idiomatic for markdown to either have zero or two spaces before the - and (b) I also happen to prefer to use * for lists although I've frequently seen both in the wild.

Would you be open to supporting a variable that customizes the list syntax? If so, I can try whipping up a PR.

created time in 10 days

created tagfitzgen/wasm-smith

tag0.1.8

A WebAssembly test case generator

created time in 10 days

push eventfitzgen/wasm-smith

Nick Fitzgerald

commit sha ae53e73c0f8be1d4983bfaae6a8f297a39c96664

Bump to version 0.1.8

view details

push time in 10 days

push eventprove-rs/z3.rs

Benedikt Radtke

commit sha 646d09f34fbbc3696a9b0a232d84e623078bddae

lib is not prepended on windows automatically, so to dynamically link a z3 install we must have an explicit libz3 link

view details

Benedikt Radtke

commit sha b23da2e44fbb222d2a9072cba25d90cf019e7f51

Remove renaming black magic on windows

view details

Benedikt Radtke

commit sha 44ed3636e61f7684ba0063b3e3068c96b60ca566

Set correct link on windows

view details

Nick Fitzgerald

commit sha 2309a6f9408b0016da94057a5f19fda198602204

Merge pull request #97 from Trolldemorted/dynlink lib is not prepended on windows automatically, so to dynamically link…

view details

push time in 10 days

PR merged prove-rs/z3.rs

lib is not prepended on windows automatically, so to dynamically link…

… a z3 install we must have an explicit libz3 link

Should fix #96, I tested it locally with a dynamically linked, self built z3

+12 -13

1 comment

2 changed files

Trolldemorted

pr closed time in 10 days

issue closedprove-rs/z3.rs

Dynamic linking doesn't work on windows

Your code expects a z3.lib and z3.dll:

https://github.com/prove-rs/z3.rs/blob/3c6ab61482c64b083e79e6ccf550a5fb1e87b0a9/z3-sys/src/lib.rs#L1562-L1563

But building z3 outputs a libz3.lib and libz3.dll.

I checked how debian packs libz3, and they ship a libz3.so, not a z3.so. Why do you try to link against z3 instead of libz3, and on what platforms does that work?

closed time in 10 days

Trolldemorted

Pull request review commentprove-rs/z3.rs

lib is not prepended on windows automatically, so to dynamically link…

 extern "C" {     /// Best-effort quantifier elimination     pub fn Z3_qe_lite(c: Z3_context, vars: Z3_ast_vector, body: Z3_ast) -> Z3_ast; }++#[cfg(not(windows))]+#[link(name = "z3")]+extern "C" {}++#[cfg(windows)]+#[link(name = "libz3")]+extern "C" {}

Ah, good catch. You're correct.

Trolldemorted

comment created time in 10 days

PullRequestReviewEvent

push eventrust-fuzz/arbitrary

Nick Fitzgerald

commit sha ab4adcf12045858148e93e70b85a93559ae6e214

Bump to version 0.4.7

view details

push time in 10 days

push eventfitzgen/rust_arbitrary

Manish Goregaokar

commit sha 87bf5462bc617943bee3548c9bccb3167f78d044

Another broken derive path

view details

Manish Goregaokar

commit sha dfa9927a64bf64068f655cfb7933eb185ec0b88e

Add regression test

view details

Manish Goregaokar

commit sha 80f46684b6fffb1d57cf928b09123b3ed293a618

Bump to 0.4.4, add nick&me as authors

view details

Manish Goregaokar

commit sha 48c821fe28fdc97574b1e2465630ef39d2fb8c37

Merge pull request #42 from rust-fuzz/derive-path Another broken derive path

view details

Igor Raits

commit sha 6f8b77471a8d6cfb0ccf76fbc0db2c1bd9e24ea1

chmod -x *.rs Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>

view details

Nick Fitzgerald

commit sha 1c339b7efab4d76365797e4279d8a414e6b8cb95

Merge pull request #45 from ignatenkobrain/master chmod -x *.rs

view details

Caio

commit sha 4478a72e7b743cac3a37ff07cc47bd41af2082f6

Impl Arbitrary for [T; 0]

view details

Manish Goregaokar

commit sha 7392124a57f998e49c9cfb7773336c354fc22ab2

Merge pull request #46 from c410-f3r/array Impl Arbitrary for [T; 0]

view details

Jakub Wieczorek

commit sha b1c31dbe0960da7e01abe658c3b4df9af47abb20

Implement `Arbitrary` for [`std::ops::Range`]

view details

Manish Goregaokar

commit sha 109ceeb837c39bdf2fc30fc8cefed268d4be55ff

Merge pull request #47 from jakubadamw/std-ops-range Implement `Arbitrary` for [`std::ops::Range`]

view details

Caio

commit sha eff2e38dd699869d63562b67ef78b581eaec4cbc

Impl Arbitrary for RangeInclusive

view details

Nick Fitzgerald

commit sha 10303bd0b1ab8df03f82979e58869418c1292e0e

Merge pull request #48 from c410-f3r/ranges Impl Arbitrary for RangeInclusive

view details

Nick Fitzgerald

commit sha 448faffc4e12a7a17e12ec0bcf962744e753ef38

Bump to version 0.4.5

view details

Caio

commit sha 47bccb63a624b4be59c720193feee2bcfb70fb81

Impl Arbitrary for unbounded ranges

view details

Caio

commit sha 988fdbd934be62b703d382e55b55304c82423e44

Fix size_hint

view details

Nick Fitzgerald

commit sha 76ac448fa1f18adde70f7f268fe486374912d859

Merge pull request #49 from c410-f3r/ranges Impl Arbitrary for unbounded ranges

view details

Corey Farwell

commit sha 1d09971a7ee4c7b47aaecac2b8255e99fd5301a6

Update README.md

view details

Nick Fitzgerald

commit sha 10d68cf3752c0e0585068b35fc17875c2b915ac8

Use a "continuation bit" to build collections, not a length Rather than doing the equivalent of ```rust let mut collection = Collection::new(); let n = u.arbitrary_len()?; for _ in 0..n { collection.insert(u.arbitrary()?); } ``` to create a collection, we now do this: ```rust let mut collection = Collection::new(); loop { let keep_going = u.arbitrary::<bool>().unwrap_or(false); if !keep_going { break; } collection.insert(u.arbitrary()?); } ``` [This paper](https://drmaciver.github.io/papers/reduction-via-generation-preview.pdf) found this second approach to make test case reduction much more effective, and I've verified this locally [with `wasm-smith`'s `Arbitrary` implementation](https://github.com/fitzgen/wasm-smith). Fixes #52

view details

Nick Fitzgerald

commit sha 1d2f65360f634968b5525f4d6430a88a376277f0

Avoid returning errors where possible We were previously unsure whether it was better to return an error and exit the fuzz target early, or to append "fake" data (like all zeros) when an `Arbitrary` implementation requested more data than the fuzzer gave us. We originally chose to exit early, and this commit is the first step in reversing that decision. We didn't have any data to motivate either choice when we originally made the decision to exit early. What we had was an intuition that we shouldn't repeatedly waste time on test cases that are very similar to each other because they are all padded with the same fake data at the end. If we exited early, our thinking went, we would yield our time back to the fuzzer, letting it more efficiently explore the state space. In practice, it has worked out okay, but not great. What we've been missing out on are chance mutations that cause us to explore new code paths. A random mutation made by the fuzzer that would otherwise take us to a new code path happens to have an invalid UTF-8 code point or not quite enough data, and then we return an error and exit early. If we avoided returning errors, then that random mutation would have led us to new code paths. A corollary is that test case reduction is more efficient as well, since the reduced input bytes are also more likely to succeed in generating a valid instance of the `Arbitrary` type. In summary, exiting early yields time back to the fuzzer, giving it more chances to try new mutations, while avoiding early exits is more forgiving to random mutations, making them more likely to succeed at finding new code paths. This is a trade off, and we can't have both in the limit. My local, not-super-rigorous experiments are telling me that we made the wrong trade off originally, and that being forgiving with mutations to find new code paths easier is the better choice. Next breaking release that we make, I think we can remove the fallibility from the `Arbitrary` trait and all the `Unstructured` methods. The only tricky one is `Unstructured::get_bytes`, but I think we can either loosen its contract so that it doesn't always return a slice of length `size`, or remove the method completely in favor of `Unstructured::fill_buffer`.

view details

Nick Fitzgerald

commit sha 3a79f14e577d5b1f4634d330893d7888f23f3ec1

Add the `Unstructured::peek_bytes` method And refactor `String`'s `Arbitrary` implementation to use it.

view details

push time in 10 days

created tagrust-fuzz/arbitrary

tag0.4.7

The Arbitrary trait

created time in 10 days

delete branch fitzgen/rust_arbitrary

delete branch : dont-waste-entropy

delete time in 10 days

startedwingo/walloc

started time in 10 days

more