Ivan Enderlin
0023eea275
feat(interface-types) Implement the record.lower
instruction.
2020-04-02 12:06:27 +02:00
Ivan Enderlin
11687c57ca
feat(interface-types) Encodes/decodes the record.lower
instruction.
2020-04-02 12:05:22 +02:00
Ivan Enderlin
b8ef82d1d0
test(interface-types) Rename test cases.
2020-04-02 11:59:35 +02:00
Ivan Enderlin
a1551b52af
test(interface-types) Rename a test case.
2020-04-02 11:58:05 +02:00
Ivan Enderlin
aab82c122d
feat(interface-types) Implement From<&Vec<InterfaceValue>>
for RecordType
.
2020-04-02 11:55:54 +02:00
Ivan Enderlin
3411ac7a1c
feat(interface-types) Move serde::InterfaceTypeIterator
into values::FlattenInterfaceValueIterator
.
2020-04-02 11:55:20 +02:00
Ivan Enderlin
5ba6fda1c9
chore(interface-types) Improve code readibility of string
instructions.
2020-04-02 11:51:34 +02:00
Ivan Enderlin
1a17cbb17e
test(interface-types) Deserialize WIT record to Rust struct.
2020-03-31 14:44:04 +02:00
Ivan Enderlin
02b7e21345
feat(interface-types) Implement the record.lift
instruction.
2020-03-31 12:34:32 +02:00
Ivan Enderlin
0af1076eee
feat(interface-types) Encodes/decodes the record.lift
instruction.
2020-03-31 08:17:52 +02:00
Ivan Enderlin
3655ef8bb7
chore(interface-types) Reorganize the serde module.
2020-03-31 08:02:46 +02:00
Ivan Enderlin
ee57b47770
feat(interface-types) Improve the Deserializer
API.
2020-03-31 07:47:54 +02:00
Ivan Enderlin
c87c2ef33b
feat(interface-values) Improve the TypeMismatch
error.
2020-03-31 07:47:15 +02:00
Ivan Enderlin
154dcba42c
feat(interface-types) Implement Serde deserializing for WIT records to Rust values.
...
WIT values are native Rust values. But records are represented as a
vector of WIT values. In order to provide a super neat API to the
user, Serde is used to deserialize this vector of WIT values to a
large variety of Rust values.
2020-03-30 15:42:35 +02:00
Ivan Enderlin
a99ae6bdb2
feat(interface-types) Add the Record
WIT value.
2020-03-30 08:32:31 +02:00
Ivan Enderlin
bd9226eb68
feat(interface-types) Introduce RecordType
for InterfaceType
and Type
.
...
The `Type::Record` variant now is defined by `RecordType`. In
addition, `InterfaceType` has a new variant: `Record`, that is also
defined by `RecordType`. Encoders and decoders are updated to consider
`RecordType`, which removes code duplication and simplify code.
2020-03-26 13:35:24 +01:00
Ivan Enderlin
3c02c501ed
chore(interface-types) Move the instruction.rs
module in instructions/mod.rs
.
2020-03-26 11:24:10 +01:00
Ivan Enderlin
734795c1f4
test(interface-types) Test Type::Record
.
2020-03-26 11:18:24 +01:00
Ivan Enderlin
bbb4f1fc0f
feat(interface-types) Introduce the record type.
...
This patch updates the `Type` type to be an enum with 2 variants:
`Function` and `Record`, resp. to represent:
1. `(@interface type (func (param i32 i32) (result string)))`
2. `(@interface type (record string i32))`
This patch updates the binary encoder and decoder, along with the WAT
encoder and decoder.
2020-03-26 10:54:58 +01:00
Ivan Enderlin
ffe7f765a2
doc(interface-types) Add strign.size
in the list of supported instructions.
2020-03-24 15:35:01 +01:00
Ivan Enderlin
38f62392ff
feat(interface-types) Implement the string.size
instruction.
2020-03-24 15:33:42 +01:00
Ivan Enderlin
daef7b0bfd
feat(interface-types) Add the Stackable::peek1
method.
...
This method allows to peek the last item on the stack (if any) by
reference.
2020-03-24 15:32:54 +01:00
Ivan Enderlin
7f2273b32b
doc(interface-types) Add string.*
instructions.
2020-03-24 13:29:38 +01:00
Ivan Enderlin
ec7aebe7e1
feat(interface-types) Implement the string.(lift|lower)_memory
instructions.
...
The `string.lift_memory` instruction replaces `memory-to-string`, and
`string.lower_memory` replaces `string-to-memory`.
2020-03-24 13:25:06 +01:00
Ivan Enderlin
afbeb5d230
feat(interface-types) Rename lowering_lifting
module to numbers
.
2020-03-24 13:10:21 +01:00
Ivan Enderlin
6fcd45bce3
doc(interface-types) Add links to WIT instructions.
2020-03-24 12:48:33 +01:00
Ivan Enderlin
cd58af2633
doc(interface-types) Update supported instructions.
2020-03-24 12:47:39 +01:00
Ivan Enderlin
50201a5e0b
feat(interface-types) Implement [siu](NN|MM).from_*
instructions.
...
Basically the `x-to-y` instructions have been renamed `y.from_x`. This
patch updates the instruction. The binary representation isn't
specified yet, so it's just arbitrary values.
2020-03-24 12:43:57 +01:00
Ivan Enderlin
a1f0a556e5
fix(interface-types) Use same stack order than Wasm invocation rule.
2020-03-23 14:34:57 +01:00
Ivan Enderlin
693b210638
fix(interface-types) Stack pops items in the same order than Wasm invocation rule.
2020-03-23 14:32:26 +01:00
Syrus Akbary
c01afac783
Merge pull request #1298 from Hywan/doc-interface-types
...
doc(interface-types) Update the state of supported instructions
2020-03-12 09:00:53 -07:00
Ivan Enderlin
03910a51fb
Merge branch 'master' into feat-interface-types-better-error
2020-03-12 14:52:15 +01:00
Ivan Enderlin
b78a6f47ab
chore(interface-types) Simplify code.
2020-03-12 14:51:18 +01:00
Ivan Enderlin
f46099c67b
feat(interface-types) Implement Error
on errors.
2020-03-12 14:49:43 +01:00
Ivan Enderlin
64729aa8f4
feat(interface-types) Use include ranges to read the memory.
2020-03-12 14:39:15 +01:00
Ivan Enderlin
20085e84a6
doc(interface-types) Update the state of supported instructions.
2020-03-12 13:57:57 +01:00
Mark McCaskey
fffdba395d
Prepare for 0.16.2 release
2020-03-11 19:15:31 -07:00
Mark McCaskey
dc9cc3292c
Prepare for 0.16.1 release
2020-03-11 16:00:21 -07:00
Mark McCaskey
d7d5f5b894
Prepare for 0.16.0 release
2020-03-11 11:15:07 -07:00
Ivan Enderlin
7d6bc577b7
feat(interface-types) Reformat the instructions.
2020-03-10 17:49:35 +01:00
Ivan Enderlin
f0c97a1b81
feat(interface-types) Use better errors.
...
The new `errors` module contains structure to represent errors,
instead of using basic strings. The first usage is in the interpreter
itself.
2020-03-10 17:49:35 +01:00
Ivan Enderlin
52312ff0ad
feat(interface-types) Remove the 'input
lifetime on Instruction
.
2020-03-10 10:37:09 +01:00
Ivan Enderlin
717914f82b
Merge branch 'master' into feat-interface-types-instructions-string-and-memory
2020-03-10 10:33:56 +01:00
Ivan Enderlin
1b0bda82dd
feat(interface-types) Rename write-utf8
to string-to-memory
.
2020-03-10 10:25:58 +01:00
bors[bot]
674d18ed66
Merge #1281
...
1281: feat(interface-types) Rename `call` to `call-core`, and remove `call-export` r=syrusakbary a=Hywan
The latest standard removes `call-export` and has a single `call-core` instruction.
Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-03-09 18:03:28 +00:00
Ivan Enderlin
39d491e465
feat(interface-types) read-utf8
is renamed memory-to-string
.
2020-03-09 15:06:35 +01:00
Ivan Enderlin
3cc4c6142c
doc(interface-types) Improve the README.md
.
2020-03-09 14:53:11 +01:00
Ivan Enderlin
637ff1e316
feat(interface-types) Rename call
to call-core
, and remove call-export
.
2020-03-09 14:33:17 +01:00
Mark McCaskey
c295adbaa8
Prepare for 0.15.0 release
2020-03-04 12:26:19 -08:00
Ivan Enderlin
de53659ee7
feat(interface-types) Implement s64-to-i32x
and u64-to-i32x
...
Actually, `s64-to-i32` and `u64-to-i32` already error when overflow
happens.
2020-03-03 17:17:26 +01:00