Commit Graph

5038 Commits

Author SHA1 Message Date
6514e57b6f Merge #760
760: Add Publish_Docs stage, make it push to a fake gh-pages branch for testing whenever master is updated. r=syrusakbary a=nlewycky

bors r-

Co-authored-by: Nick Lewycky <nick@wasmer.io>
Co-authored-by: Syrus <me@syrusakbary.com>
Co-authored-by: Azure Pipelines <azuredevops@microsoft.com>
2020-01-15 12:58:13 +00:00
e84753eec2 Removed circleci-clean from makefile 2020-01-15 13:57:08 +01:00
a99d0c209d Fixed based on feedback 2020-01-15 13:21:14 +01:00
02dc47297f Changed from rust to crates 2020-01-15 13:21:05 +01:00
2a2a3585d7 Merge pull request #1148 from Hywan/fix-runtime-c-api-error-message
fix(runtime-c-api) Fix error message.
2020-01-15 12:53:05 +01:00
7a16828e6e fix(runtime-c-api) Fix error message. 2020-01-15 12:50:18 +01:00
991a777f72 Only commit if there are files to commit 2020-01-15 12:43:58 +01:00
84beb446d9 Make docs only build and publish on master 2020-01-15 12:41:21 +01:00
5a6afe4e68 Fixed makefile 2020-01-15 12:32:27 +01:00
943dc7d868 Fixed mkdir 2020-01-15 11:04:00 +01:00
d343cd1d2d Improved C-API documentation links 2020-01-15 11:01:48 +01:00
47d38c9759 Trying to debug the issue 2020-01-15 11:01:22 +01:00
ab77433128 Fixed redirect url 2020-01-15 10:45:47 +01:00
892c95ef57 Added git user config to pass commit 2020-01-15 09:56:48 +01:00
50acd8ba98 Merge #1133
1133: feat(runtime-c-api) Implement `wasmer_trap` r=Hywan a=Hywan

Idea is to provide an API to get fallible host function by calling `wasmer_trap` to run the Wasmer trapping API.

This is probably the easiest solution to not break the existing API, and not add a lot of complexity in the code.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-01-15 07:50:32 +00:00
fb06ee33e3 test(runtime-c-api) Rename wasmer_import_trap to wasmer_trap. 2020-01-15 08:47:52 +01:00
f4ae606006 doc(changelog) Update #1133. 2020-01-15 08:46:12 +01:00
ce3fb49b21 Merge branch 'master' into feat-runtime-c-api-import-trap 2020-01-15 08:44:56 +01:00
cd16a7d1a7 chore(runtime-c-api) Update C/C++ headers. 2020-01-15 08:42:17 +01:00
bcbde69694 doc(runtime-core) Fix a typo. 2020-01-15 08:41:37 +01:00
4cdf868a0b doc(runtime-c-api) Explain why code is unreachable in wasmer_trap. 2020-01-15 08:40:36 +01:00
c0b439e66a feat(runtime-c-api) Rename wasmer_import_trap to wasmer_trap. 2020-01-15 08:37:20 +01:00
d350613f0c Merge #1147
1147: Update logging to use `log`, add command line flag to toggle it r=MarkMcCaskey a=MarkMcCaskey

This PR:
- ports our logging to the [`log`](https://crates.io/crates/log) crate which is the de-facto standard way to do logging in Rust (it defines a trait which logging backends can implement (we can also implement our own at a later date using these traits)).  Another benefit of using the standard logging utilities is that we can now allow users of our libraries to filter and display log messages from Wasmer in a more natural way.
- adds a command line flag to enable/disable logging
- updates the `debug` and `trace` features to pass the correct static toggles to the `log` crate; judging by the `log` documentation these features need to only be set once
- copies and slightly modifies our `fern` configuration from wapm
- updates the makefile so that `make release` compiles out all log statements
- TODO: update CI to not print with color (may not be necessary actually)

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Here's some example output:

```
[1579035881.809 DEBUG wasmer_wasi::state] wasi::fs::inodes
[1579035881.809 DEBUG wasmer_wasi::state] wasi::fs::preopen_dirs
[1579035881.809 DEBUG wasmer_wasi::state] wasi::fs::mapped_dirs
[1579035881.809 DEBUG wasmer_wasi::state] wasi::fs::end
[1579035881.810 DEBUG wasmer_wasi::syscalls] wasi::fd_prestat_get: fd=3
[1579035881.810 DEBUG wasmer_wasi::state] in prestat_fd Fd { rights: 536870911, rights_inheriting: 536870911, flags: 0, offset: 0, open_flags: 1, inode: Index { index: 3, generation: 0 } }
[1579035881.810 DEBUG wasmer_wasi::syscalls] wasi::fd_prestat_dir_name: fd=3, path_len=2
[1579035881.810 DEBUG wasmer_wasi::syscalls] => result: "/"
[1579035881.810 DEBUG wasmer_wasi::syscalls] wasi::fd_fdstat_get: fd=3, buf_ptr=1048536
[1579035881.810 DEBUG wasmer_wasi::state] fdstat: Fd { rights: 536870911, rights_inheriting: 536870911, flags: 0, offset: 0, open_flags: 1, inode: Index { index: 3, generation: 0 } }
[1579035881.810 DEBUG wasmer_wasi::syscalls] wasi::fd_prestat_get: fd=4
[1579035881.810 DEBUG wasmer_wasi::syscalls] wasi::environ_sizes_get
[1579035881.810 DEBUG wasmer_wasi::syscalls] env_var_count: 0, env_buf_size: 0
[1579035881.810 DEBUG wasmer_wasi::syscalls] wasi::args_sizes_get
[1579035881.810 DEBUG wasmer_wasi::syscalls] => argc=3, argv_buf_size=92
[1579035881.810 DEBUG wasmer_wasi::syscalls] wasi::args_get
[1579035881.810 DEBUG wasmer_wasi::syscalls] => args:
                   0: /Users/mark/.wasmer/globals/wapm_packages/mark/rust-example@0.1.11/wasi-example.wasm
                   1: -e
                   2: HQ+
[1579035881.810 DEBUG wasmer_wasi::syscalls] wasi::args_sizes_get
[1579035881.811 DEBUG wasmer_wasi::syscalls] => argc=3, argv_buf_size=92
[1579035881.811 DEBUG wasmer_wasi::syscalls] wasi::args_get
[1579035881.811 DEBUG wasmer_wasi::syscalls] => args:
                   0: /Users/mark/.wasmer/globals/wapm_packages/mark/rust-example@0.1.11/wasi-example.wasm
                   1: -e
                   2: HQ+
[1579035881.811 DEBUG wasmer_wasi::syscalls] wasi::random_get buf_len: 16
[1579035881.811 DEBUG wasmer_wasi::syscalls] wasi::fd_write: fd=1
Hello, world!

[1579035881.811 DEBUG wasmer_wasi::syscalls] wasi::fd_write: fd=1
HQ+
```


Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-01-14 21:53:54 +00:00
39025d0205 Check if printing to a terminal for color output 2020-01-14 13:50:48 -08:00
286e5db370 Remove vestigial debug features from various crates 2020-01-14 13:03:19 -08:00
12f7416a85 Update logging to use log, add command line flag to toggle it 2020-01-14 12:41:46 -08:00
a933e10e5f Use api-docs proper path 2020-01-14 20:04:07 +01:00
a54b95e3f4 Fix copying files 2020-01-14 19:32:00 +01:00
d2097aa92d trying more 2020-01-14 18:58:02 +01:00
5403b9822b Fixed makefile 2020-01-14 18:54:11 +01:00
d0e9161104 Trying to test docs 2020-01-14 18:51:26 +01:00
ed96f32e58 Fix publish dir 2020-01-14 16:50:01 +01:00
52f45455f3 Try cargo doc all 2020-01-14 16:38:23 +01:00
46b6601488 Fixed cargo doc to document only local packages 2020-01-14 16:31:44 +01:00
6dfd5916c2 Improve error message on exception. 2020-01-14 20:56:34 +08:00
34e01bbf0b Trying to fix api-docs publishing 2020-01-14 13:49:20 +01:00
a45cbd6bbc Merge remote-tracking branch 'origin/master' into feature/unified-exceptions 2020-01-14 20:47:14 +08:00
5c5bf311ce Trying to fix building docs 2020-01-14 13:35:06 +01:00
41ab3fd5b4 Fixed azure issue 2020-01-14 13:20:41 +01:00
220bbc9563 Trying to improve docs build pipeline 2020-01-14 13:17:47 +01:00
dc8c1d825a Publishing GitHub Pages ***CI*** 2020-01-14 12:34:12 +01:00
13de911759 Merge branch 'master' into feature/auto-doc-update
# Conflicts:
#	Makefile
2020-01-14 12:10:10 +01:00
a8ed5b9d1a Update README.md 2020-01-14 12:06:32 +01:00
9a0f51f621 Merge branch 'master' into blake3 2020-01-14 10:33:13 +01:00
1cd198a5a5 Use a 32 byte array instead of 64 one 2020-01-14 10:32:32 +01:00
4099cc1984 Merge #1142
1142: doc(runtime-c-api) Setup Doxygen r=syrusakbary a=Hywan

With @MarkMcCaskey, we discussed generating the documentation of `wasmer-runtime-c-api` with [Doxygen](http://www.doxygen.nl/).

This patch does the following:

1. Set up a `doxyfile`, which is the configuration file for Doxygen.
2. Set up a `doc/header.html` and `doc/footer.html` files, because Doxygen HTML output is… well, not a master piece 😉.
3. Set up a `doc/css/wasmer.css` stylesheet. I tried to mimic Wasmer color scheme. Usually, I'm not a bad designer, but Doxygen HTML output is so “alembic-ed” that it makes customizing the CSS a real challenge for the very short period of time I've.

Anyway, I believe it's an acceptable first step.

To generate the documentation:

```sh
$ doxygen doxyfile
```

And then open `doc/html/index.html`.

It looks like this:

![Screen Shot 2020-01-13 at 15 20 09](https://user-images.githubusercontent.com/946104/72263046-692ea100-3618-11ea-9feb-6dfd3244d375.png)
![Screen Shot 2020-01-13 at 15 20 25](https://user-images.githubusercontent.com/946104/72263072-70ee4580-3618-11ea-941d-fa652bd7f14e.png)
![Screen Shot 2020-01-13 at 15 20 35](https://user-images.githubusercontent.com/946104/72263082-7481cc80-3618-11ea-81e7-f4da7b71d665.png)
![Screen Shot 2020-01-13 at 15 20 57](https://user-images.githubusercontent.com/946104/72263098-78155380-3618-11ea-9cfc-16b7695c9e89.png)

The next step is to publish the documentation on Github Pages, thoughts @syrusakbary?

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-01-14 08:08:06 +00:00
220ad08337 Merge #1145
1145: Update io device file name r=MarkMcCaskey a=MarkMcCaskey

Small update

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-01-14 02:03:20 +00:00
3fd1408cbc Update io device file name 2020-01-13 17:56:46 -08:00
88d0dc5626 Merge pull request #1144 from Hywan/fix-runtime-c-api-build
fix(runtime-c-api) Remove duplicated line
2020-01-13 18:01:56 +01:00
6dbfa9d4a2 fix(runtime-c-api) Remove duplicated line.
A copy-paste error has been spotted!
2020-01-13 17:11:12 +01:00