23 Commits

Author SHA1 Message Date
TheGreatRambler
2ba3025e67 Add cmake compatibility to c-api (#4369)
* Add cmake compatibility to c-api

* Add CMake documentation to wasmtime.h

* Add CMake instructions in examples

* Modify CI for CMake support

* Use correct rust in CI

* Trigger build

* Refactor run-examples

* Reintroduce example_to_run in run-examples

* Replace run-examples crate with cmake

* Fix markdown formatting in examples readme

* Fix cmake test quotes

* Build rust wasm before cmake tests

* Pass CTEST_OUTPUT_ON_FAILURE

* Another cmake test

* Handle os differences in cmake test

* Fix bugs in memory and multimemory examples
2022-07-22 10:22:36 -07:00
Alex Crichton
978070c020 Verify crates are publish-able on CI (#2036)
This commit updates our CI to verify that all crates are publish-able at
all times on every commit. During the 0.19.0 release we found another
case where the crates as they live in this repository weren't
publish-able, so the hope is that this no longer comes up again!

The script added in this commit also takes the time/liberty to remove
the existing bump/publish scripts and instead replace them with one Rust
script originally sourced from wasm-bindgen. The intention of this
script is that it has three modes:

* `./publish bump` - bumps version numbers which are sent as a PR to get
  reviewed (probably with a changelog as well)

* `./publish verify` - run on CI on every commit, builds every crate we
  publish as if it's being published to crates.io, notably without raw
  access to other crates in the repository.

* `./publish publish` - publishes all crates to crates.io, passing the
  `--no-verify` flag to make this a much speedier process than it is
  today.
2020-07-17 16:19:35 -05:00
Nick Fitzgerald
22d6b68795 gitignore: Ignore the foo file
It is created by the `run-examples` crate.
2020-07-10 13:53:05 -07:00
Nick Fitzgerald
090d1c2d32 cranelift: Port most of simple_preopt.rs over to the peepmatic DSL
This ports all of the identity, no-op, simplification, and canonicalization
related optimizations over from being hand-coded to the `peepmatic` DSL. This
does not handle the branch-to-branch optimizations or most of the
divide-by-constant optimizations.
2020-05-14 07:52:23 -07:00
Alex Crichton
701b419a12 Merge gitignore files 2020-02-28 09:16:05 -08:00
Peter Huene
ae0b4090ce Implement WASI C API.
This commit implements an initial WASI C API that can be used to instantiate
and configure a WASI instance from C.

This also implements a `WasiBuilder` for the C# API enabling .NET hosts to bind
to Wasmtime's WASI implementation.
2020-02-24 17:42:44 -08:00
Dan Gohman
3e4a6510f1 Commit Cargo.lock. (#705)
* Commit Cargo.lock.

The Cargo documentation recommends packages which produce end-user
programs, which wasmtime-cli is, to check in their Cargo.lock files:

https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries

* Use Cargo's newer less-conflicting lockfile format
2019-12-13 17:29:36 +01:00
Alex Crichton
bf526b62d3 Add book documentation skeleton and auto-publish from CI (#435)
This commit adds the skeleton of a new set of documentation for
`wasmtime` in the existing `docs` directory. This documentation is
organized and compiled with [mdbook] which the Rust project uses for
most of its own documentation as well. At a previous meeting we
brainstormed a rough skeleton of what the documentation in this book
would look like, and I've transcribed that here for an example of how
this is rendered and how it can be laid out. No actual documentation is
written yet.

This commit also additionally adds necessary support to auto-publish
both this book documentation and API documentation every time a commit
is pushed to the `master` branch. All HTML will be automatically pushed
to the `gh-pages` branch so long as the CI passes, and this should get
deployed to https://cranestation.github.io/wasmtime.

I've done a few dry-runs and I think this'll all work, but we'll likely
tweak a few things here and there after running this through CI to make
sure everything looks just as we'd like. My hope though is that after
this lands we can start actually filling out all the documentation and
being able to review it as well.

[mdbook]: https://crates.io/crates/mdbook
2019-10-29 15:55:51 +01:00
Dan Gohman
27c2f82628 Add Emacs backup and autosave files to .gitignore. 2018-12-05 11:30:05 -05:00
Dan Gohman
bb2589c63f Remove python code artifacts. 2018-08-03 16:00:41 -07:00
Dan Gohman
2608dd0c47 Update to cranelift 0.16.1, target-lexicon 0.0.3, faerie 0.4.4. 2018-07-21 06:46:19 -07:00
Dan Gohman
a2f70a3544 Update to cranelift's formatting and testing scripts. 2018-07-20 20:48:34 -07:00
Dan Gohman
8f6957296e Merge commit '051bc08d23df0930be5e959645c50dd0cdf411d4' 2017-08-29 07:12:47 -07:00
Dan Gohman
344fbed77a Initial commit 2017-08-29 07:01:55 -07:00
Dan Gohman
83cc08a457 Add rusty-tags.* to .gitignore. 2017-06-23 09:36:21 -07:00
Jakob Stoklund Olesen
7a1ba057e4 Ignore .mypy_cache
A recent mypy update started writing the .mypy_cache directory which we
don't want under version control. The cache is only used by the
experimental "mypy --incremental" mode which we don't use, but it is
always written anyway.
2017-05-08 13:28:49 -07:00
Jakob Stoklund Olesen
210530da9c Add a primitive debug tracing facility.
When the CRETONNE_DBG environment variable is set, send debug messages
to a file named cretonne.dbg.*.

The trace facility is only enabled when debug assertions are on.
2017-03-15 11:32:01 -07:00
Jakob Stoklund Olesen
3c4d54c4bd Implement value affinities for register allocation.
An SSA value is usually biased towards a specific register class or a
stack slot, depending on the constraints of the instructions using it.

Represent this bias as an Affinity enum, and implement a merging
algorithm for updating an affinity to satisfy a new constraint.

Affinities will be computed as part of the liveness analysis. This is
not implemented yet.
2017-01-27 10:22:50 -08:00
Jakob Stoklund Olesen
67abb2d2f6 Create a phantom workspace manifest for all crates.
Share a single Cargo.lock and target directory at the repo top-level.
2016-10-10 10:52:48 -07:00
Morgan Phillips
84357c3402 Ignore cargo-fmt and vim related files 2016-07-12 13:59:27 -07:00
Jakob Stoklund Olesen
7bf4570ba1 Add a RISC-V target.
Flesh out the directory structure for defining target instruction set
architectures. Use RISC-V as a startgin point because it is so simple.
2016-04-06 12:00:35 -07:00
Jakob Stoklund Olesen
82e05bcbc9 Implement type representation in Rust.
Start the Cretonne library as a Rust crate.
2016-03-11 15:54:28 -08:00
Jakob Olesen
c8f20534d3 Add a Cretonne domain for Sphinx.
Include roles for documenting IL instructions and types, including
index cross references.
2016-01-19 19:54:27 -08:00