Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
390 commits
Select commit Hold shift + click to select a range
1442779
Use cabi_ prefix instead of _ and use _ instead if - in post-return f…
lukewagner Jul 26, 2022
23d6e1e
Add 'outer' case to <core:alias> to match Binary.md
lukewagner Jul 27, 2022
c7823c0
More spaces in the name mangling scheme
lukewagner Jul 27, 2022
f065ad3
Merge pull request #73 from WebAssembly/fix-core-outer-alias
lukewagner Jul 29, 2022
723ce72
Fix size_flags for the zero-flags case
lukewagner Jul 29, 2022
e06f269
Merge pull request #76 from WebAssembly/fix-size_flags
lukewagner Jul 29, 2022
92173ef
Add some missing trap cases
lukewagner Aug 2, 2022
7b65e73
But no space before func opening paren to match convention
lukewagner Aug 2, 2022
ca2851c
Merge pull request #81 from WebAssembly/fix-traps
lukewagner Aug 4, 2022
748a1dd
Merge pull request #69 from WebAssembly/multi-return
lukewagner Aug 4, 2022
d334e4d
Merge pull request #71 from WebAssembly/canonical-abi
lukewagner Aug 4, 2022
cd75cf9
Respect `MAX_FLAT_RESULTS` in Explainer.md
Liamolucko Aug 10, 2022
4d412d9
Merge pull request #85 from Liamolucko/patch-1
Aug 10, 2022
7caeccb
Fix example which used one-level imports in a core module type
pl-semiotics Aug 15, 2022
21666e2
Add explicit result arity to start definitions
lukewagner Aug 16, 2022
b4e513e
Merge pull request #91 from pl-semiotics/explainer-example-two-level-…
lukewagner Aug 16, 2022
49ce648
Tweak variant/result mangling to produce valid wit
lukewagner Aug 16, 2022
0591a1c
Sync CanonicalABI.md
lukewagner Aug 16, 2022
da97679
Fix inline aliases used in 'memory' canonopt
lukewagner Aug 16, 2022
6d5d8c0
Add a bunch of missing 'core' prefixes to SharedEverythingDynamicLink…
lukewagner Aug 17, 2022
00b5d7a
Remove component-level core aliases
lukewagner Aug 17, 2022
08f2ea6
Add JS API notes about variants
lukewagner Aug 17, 2022
4d6e519
Merge pull request #92 from WebAssembly/start-arity
lukewagner Aug 17, 2022
1916715
Fix inline aliases used in 'memory' canonopt
lukewagner Aug 16, 2022
4a09867
Add a bunch of missing 'core' prefixes to SharedEverythingDynamicLink…
lukewagner Aug 17, 2022
7ea933a
Merge pull request #94 from WebAssembly/fix-alias-sugar-examples
lukewagner Aug 17, 2022
7339630
Tweak variant JS value example to be more like TypeScript/wit-bindgen
lukewagner Aug 18, 2022
05bc3d6
Only despecialize problematic options/unions
lukewagner Aug 18, 2022
f76b64a
Merge pull request #96 from WebAssembly/add-webidl-variant-note
lukewagner Aug 18, 2022
faf42c9
Merge pull request #93 from WebAssembly/produce-valid-wit
lukewagner Aug 18, 2022
b9be93e
Merge pull request #95 from WebAssembly/kill-component-level-core-ali…
lukewagner Aug 19, 2022
11604e2
Add whitespace to reduce noise in next patch
lukewagner Aug 23, 2022
0caf4a0
Remove the `async` keyword from WIT.md.
sunfishcode Aug 29, 2022
064f320
Remove a space from a canonical ABI mangling example.
sunfishcode Aug 31, 2022
e4d5311
Merge pull request #99 from sunfishcode/sunfishcode/trivial-space
lukewagner Aug 31, 2022
472a87d
Add subsection headers for the mangling documentation.
sunfishcode Sep 12, 2022
b6c55cb
Update design/mvp/CanonicalABI.md
sunfishcode Sep 13, 2022
20659af
Update design/mvp/CanonicalABI.md
sunfishcode Sep 13, 2022
60627f6
Update design/mvp/CanonicalABI.md
sunfishcode Sep 13, 2022
3e93c27
Add a subsection header for value type mangling.
sunfishcode Sep 13, 2022
3611a1c
Merge pull request #105 from sunfishcode/sunfishcode/docs
lukewagner Sep 13, 2022
3ee3b98
Merge pull request #98 from sunfishcode/main
lukewagner Sep 13, 2022
9bea0ad
Make all function parameters named
lukewagner Sep 16, 2022
ed90add
Merge pull request #108 from WebAssembly/param-name
lukewagner Sep 20, 2022
e7a22d8
Split import/export names into kebab-case name + optional URL fields
lukewagner Aug 19, 2022
b105035
Fill in some JS Embedding details
lukewagner Sep 22, 2022
50c0f0f
Fix typo
lukewagner Sep 26, 2022
1f7d009
Sync prose with code snippet
lukewagner Sep 26, 2022
eafc45f
Change 'implementing' to 'supporting' as word for what a host does wi…
lukewagner Sep 26, 2022
cbae8d7
Fix RLBox link
lukewagner Sep 27, 2022
f70a67f
Fix links to SharedEverythingDynamicLinking.md.
sunfishcode Sep 28, 2022
94f1f8f
Merge pull request #111 from sunfishcode/main
lukewagner Sep 28, 2022
cc63724
Use 'https:' not 'http:' in example
lukewagner Sep 29, 2022
e0cf952
Remove `handle` as a keyword
kulakowski-wasm Oct 3, 2022
aa563a1
Merge pull request #112 from kulakowski-wasm/remove-handle
lukewagner Oct 5, 2022
f099487
Back out Canonical ABI mangling scheme in preparation for future alte…
lukewagner Oct 6, 2022
b8a2bf2
Merge pull request #109 from WebAssembly/kebab-case
lukewagner Oct 7, 2022
5754989
Merge pull request #114 from WebAssembly/rm-mangling
lukewagner Oct 7, 2022
30720ab
WIT Syntax: interface
fibonacci1729 Oct 10, 2022
0730891
Add extra Canonical ABI note and variant clarification
lukewagner Oct 31, 2022
9d0a345
Add a custom `name` section specification
alexcrichton Nov 8, 2022
8e94d38
Simplify with just a `sort:<sort>`
alexcrichton Nov 8, 2022
2200307
Have the size of each section listed
alexcrichton Nov 8, 2022
85166b9
Add a component name subsection
alexcrichton Nov 8, 2022
7b9c9a9
Give components a unique custom section name
alexcrichton Nov 8, 2022
f281506
Fix some formatting
alexcrichton Nov 8, 2022
111a408
Merge pull request #123 from WebAssembly/cabi-enum-note
lukewagner Nov 8, 2022
983f01c
Review comments
alexcrichton Nov 8, 2022
9784159
Merge pull request #124 from alexcrichton/name-section
lukewagner Nov 11, 2022
ded219e
Merge pull request #116 from fibonacci1729/interface
fibonacci1729 Nov 15, 2022
8a5669d
Document proposed `WIT` to enable component Worlds
fibonacci1729 Aug 4, 2022
a9f4989
Update WIT.md
patrickhuber Nov 22, 2022
b458b00
Merge pull request #131 from patrickhuber/patch-1
lukewagner Nov 22, 2022
7005516
Update WIT.md
patrickhuber Nov 22, 2022
d536387
Merge pull request #133 from patrickhuber/patch-2
lukewagner Nov 23, 2022
6417d2c
Wrap the 'opts' param in a 'cx' param in preparation for resource typ…
lukewagner Dec 1, 2022
8d89078
Move the component instance into the context
lukewagner Dec 3, 2022
c489282
Reorder Context definitions to present top-down
lukewagner Dec 3, 2022
e80a1de
Move called_as_export into Context
lukewagner Dec 3, 2022
0d96673
Fix typo
lukewagner Dec 6, 2022
52c6a0f
Tweak wording, align bullets
lukewagner Dec 6, 2022
c9e383d
Merge pull request #83 from fibonacci1729/profiles
fibonacci1729 Dec 6, 2022
a26ee99
Add resource and initial handle types
lukewagner Nov 17, 2022
3de9426
Modernize the WIT.md description
alexcrichton Dec 6, 2022
e425309
Add `in` keyword
alexcrichton Dec 7, 2022
6b2b01c
Update world syntax:
alexcrichton Dec 7, 2022
95a21b4
Fix some typos
alexcrichton Dec 7, 2022
89724c3
Add 5th list-list-string example
lukewagner Dec 8, 2022
08cbd80
Fix typo
lukewagner Dec 8, 2022
fafa1f2
Clarify type equality for handles and lists of handles
lukewagner Dec 8, 2022
253dfd7
Remove confusing sentence
lukewagner Dec 8, 2022
475c855
Fix existential elim example
lukewagner Dec 8, 2022
60df3c7
Maybe clarify the existential intro rule (we'll see)
lukewagner Dec 8, 2022
a85fe11
Remove technically-inaccurate sentence
lukewagner Dec 8, 2022
62a94bb
Rewrite the final 'nominal?' section based on Rossberg's comment
lukewagner Dec 8, 2022
116cd50
Fix exportdecl validation rule and sync with export
lukewagner Dec 8, 2022
bfc2ba7
Fix typo in example
lukewagner Dec 8, 2022
778297e
Fix grammar
lukewagner Dec 8, 2022
1eb69c1
Call resource types 'abstract', not 'concrete'
lukewagner Dec 9, 2022
50dda75
Update with recent discussion from Luke
alexcrichton Dec 9, 2022
ff8bd9e
Remove markdown section
alexcrichton Dec 9, 2022
98f348f
Use a different syntax for `use`
alexcrichton Dec 12, 2022
08e7f69
Typos
alexcrichton Dec 13, 2022
e2cfe7b
Remove de-duplicative behavior of borrows in canon lower
lukewagner Dec 14, 2022
f53ffb3
Fix some typos
alexcrichton Dec 14, 2022
d6ed94a
Merge pull request #129 from WebAssembly/add-resource-types
lukewagner Dec 16, 2022
5b5d284
Remove broken links from CanonicalABI.md
Liamolucko Dec 19, 2022
e2c25bd
Merge pull request #143 from Liamolucko/patch-1
lukewagner Dec 19, 2022
8daf12a
Fix grammar
lukewagner Dec 20, 2022
0013acd
Add typo in CABI Python
lukewagner Jan 4, 2023
006b97c
Sync CanonicalABI.md and canonical-abi/definitions.py
lukewagner Jan 4, 2023
07e1079
Fix syntax error in example and expand with the other case
lukewagner Dec 20, 2022
88513d1
Loosen type-export validation requirements
lukewagner Dec 20, 2022
a78eaba
Move type tag from Resource to Handle
lukewagner Jan 4, 2023
819cce7
Update examples with output of current implementation
alexcrichton Jan 10, 2023
a8fe6db
Merge remote-tracking branch 'origin/main' into update-wit
alexcrichton Jan 10, 2023
aab97d1
Merge pull request #144 from WebAssembly/fix-example
lukewagner Jan 13, 2023
f65f4ac
Merge pull request #145 from WebAssembly/loosen-export-rules
lukewagner Jan 13, 2023
4c0ce2b
Merge pull request #147 from WebAssembly/fix-dynamic-cast
lukewagner Jan 13, 2023
80510d4
Catch destructor reentrance
lukewagner Jan 4, 2023
cb922fb
Review comments
alexcrichton Jan 18, 2023
85cf4d5
Merge pull request #149 from WebAssembly/fix-reentrancy
lukewagner Jan 19, 2023
cf3750c
Fix core-prefix and hyphen typos in Binary.md
lukewagner Jan 24, 2023
be0c9fc
Add optional export type ascription
lukewagner Jan 24, 2023
af42006
Fix a typo
alexcrichton Feb 1, 2023
891c41c
Merge pull request #141 from alexcrichton/udpate-wit
alexcrichton Feb 3, 2023
7598adc
Fix binary encoding of externdesc to match sortidx codes
lukewagner Feb 3, 2023
72d061c
Merge pull request #159 from WebAssembly/fix-externdesc-binary-encoding
lukewagner Feb 3, 2023
e9f4ab3
Merge pull request #155 from WebAssembly/extend-exports
lukewagner Feb 3, 2023
2742292
Tweak type ascription validation rules to check subtyping, not type e…
lukewagner Feb 6, 2023
3db1b22
Merge pull request #161 from WebAssembly/tweak-ascription
lukewagner Feb 7, 2023
08de342
Move definition of `Flags`
esoterra Feb 11, 2023
1ffc0bd
Switch to using @dataclass in canonical-abi/definitions.py
lukewagner Feb 11, 2023
5b4ce41
Refactor canonical-abi/definitions.py handle Python code
lukewagner Feb 12, 2023
7b3d5ad
Prepare binary format to avoid breaking changes with future additions
lukewagner Feb 1, 2023
8bc065a
Fix type annotation in CanonicalABI.md
lukewagner Feb 12, 2023
a58ae86
Merge pull request #160 from WebAssembly/future-proof-binary-format
lukewagner Feb 12, 2023
91c73cb
Sync CanonicalABI.md with canonical-abi/definitions.py
lukewagner Feb 12, 2023
d6af626
Tighten up type annotation in FuncType in canonical-abi/definitions.py
lukewagner Feb 12, 2023
fa9ecc5
Refactor canonical-abi/definitions.py to not reuse Context objects
lukewagner Feb 12, 2023
c0ee0ce
Merge pull request #163 from Kylebrown9/variant-flag-order
lukewagner Feb 13, 2023
ca2ab99
Tighten validation to require uniqueness between import and export ke…
lukewagner Feb 14, 2023
11d5b5e
Rename 'i32_to_char' to 'convert_i32_to_char'
lukewagner Feb 18, 2023
c366536
Fix 'm*' typo in Binary.md
lukewagner Feb 22, 2023
1d2a7df
format: Change EBNF codeblock syntax highlighting to `ebnf`
huwaireb Feb 24, 2023
8803b54
format: Make comments as whitespace
huwaireb Feb 24, 2023
778ab60
format: Relax reserved keywords
huwaireb Feb 24, 2023
4a5b493
Merge pull request #156 from r-muhairi/wit/whitespace-comments-and-mo…
lukewagner Feb 24, 2023
edb5489
format: Clarify what `nil` represents
huwaireb Feb 25, 2023
3051192
Merge pull request #170 from r-muhairi/format/empty-string
lukewagner Feb 27, 2023
b43881a
Merge pull request #164 from WebAssembly/unique-imports-and-exports
lukewagner Feb 27, 2023
8defaa8
Fix some examples of resources
alexcrichton Feb 28, 2023
e97d22a
Merge pull request #173 from alexcrichton/fix-some-examples
lukewagner Feb 28, 2023
379a2e7
Re-sync CanonicalABI.md with canonical-abi/definitions.py
lukewagner Mar 14, 2023
f25a7db
Inline rep into handles, remove explicit Resource object in CABI
lukewagner Mar 14, 2023
b1d3d02
Pass rep directly to borrow when component implements the resource type
lukewagner Mar 14, 2023
2e716b6
Switch to having a separate handle table per resource type
lukewagner Mar 15, 2023
ba5ce25
Refactor handle logic, no change in behavior
lukewagner Mar 30, 2023
4b7e5f5
Make multiple exports of the same type definition equal by default
lukewagner Apr 10, 2023
0f5a93f
s/remove/remove_or_drop/ in CanonicalABI.md
lukewagner Apr 10, 2023
994085a
Rename 'remove' to 'transfer' in CABI and remove dead paragraph
lukewagner Apr 11, 2023
80987f1
Update prose in CanonicalABI.md to match code
lukewagner Apr 11, 2023
1df910c
Update stale resource type explainer wording
lukewagner Apr 11, 2023
d7438d4
Add missing paren
rylev Apr 22, 2023
79c0614
Merge pull request #188 from rylev/fix-missing-paren
lukewagner Apr 24, 2023
dc515fe
Refine annotated name validation rules in Binary.md
lukewagner Apr 25, 2023
1ddf5d7
Merge pull request #190 from WebAssembly/fix-validation
lukewagner Apr 26, 2023
710de39
Add note about Preview 2 / 3 to README.md
lukewagner Apr 26, 2023
20e98fd
Merge pull request #191 from WebAssembly/add-preview-2-3-note
lukewagner Apr 27, 2023
8304ec2
Add new section heading for 'Canonical ABI' and add introductory blur…
lukewagner May 2, 2023
b209328
Update WIT and binary import/export syntax
alexcrichton May 17, 2023
6a31e68
Add a `string` production in the binary format
alexcrichton May 17, 2023
b16027f
Fix a typo
alexcrichton May 17, 2023
be7cda7
Update version binary syntax
alexcrichton May 17, 2023
a966643
Review comments
alexcrichton May 17, 2023
adadd5b
s/wit:demo/local:demo/
alexcrichton May 19, 2023
4ebc4bb
Review comments
alexcrichton May 22, 2023
49ce239
Allow full semver in versions
alexcrichton May 22, 2023
f84735b
Fix typo in Type Checking section
danbev May 29, 2023
093579d
Merge pull request #202 from danbev/explainer-type-checking-typo
lukewagner May 30, 2023
2d0d243
added include statement
Mossaka Mar 3, 2023
56f6bc2
added semantic description of `include` statement
Mossaka Mar 7, 2023
988f5ea
added deduplication
Mossaka Mar 9, 2023
8ab01f5
address comments
Mossaka May 4, 2023
1173c28
fixed path to interfaces
Mossaka May 8, 2023
1bd1266
Merge pull request #198 from alexcrichton/import-export-changes
alexcrichton Jun 15, 2023
d613b19
Update Explainer.md to match Wit interface id changes in Binary.md
lukewagner Jun 16, 2023
e718f98
Add Wit.md section for resource items
lukewagner Jun 16, 2023
91b6257
Fix interface grammar in top-level use
cardoso Jun 17, 2023
10346b5
Add introductory text about own/borrow handles in resource section
lukewagner Jun 19, 2023
08c60a4
Merge pull request #206 from WebAssembly/add-resources-to-wit
lukewagner Jun 19, 2023
05cef2e
Refactor Canonical ABI code and explainer (no change in behavior)
lukewagner Jun 18, 2023
e0ae7a9
Only increment the lend_count of own handles
lukewagner Jun 18, 2023
a6e5f04
Fix non-reentrance check in resource.drop
lukewagner Jun 18, 2023
c983be3
Change resource.drop to take a <typeidx>
lukewagner Jun 18, 2023
8fe4277
Merge pull request #209 from WebAssembly/tweak-handles
lukewagner Jun 20, 2023
aab0910
Merge pull request #205 from WebAssembly/fill-out-explainer
lukewagner Jun 20, 2023
121a376
Fix broken module-linking links
yamt Jun 21, 2023
517cab4
Merge pull request #211 from yamt/url
lukewagner Jun 21, 2023
adaf406
Merge branch 'WebAssembly:main' into patch-1
cardoso Jun 22, 2023
8a65664
Update version to valid-semver in interface grammar
cardoso Jun 22, 2023
9b1034c
Merge pull request #207 from cardoso/patch-1
lukewagner Jun 22, 2023
4b5b7dc
Merge remote-tracking branch 'upstream/main' into union
Mossaka Jun 23, 2023
7007b26
Changed the WIT syntax to the newest package syntax.
Mossaka Jun 23, 2023
be76067
Update design/mvp/WIT.md
Mossaka Jun 23, 2023
926e73f
Add more comments on the deduplication and name conflicts
Mossaka Jun 23, 2023
327f3fa
Update design/mvp/WIT.md
Mossaka Jun 23, 2023
0a607ba
Update design/mvp/WIT.md
Mossaka Jun 23, 2023
2d7e6f2
made the following case "include <ID> with {...}" invalid
Mossaka Jun 23, 2023
5f4f5e0
Update design/mvp/WIT.md
Mossaka Jun 23, 2023
0820d22
Update design/mvp/WIT.md
Mossaka Jun 23, 2023
3a1d715
Merge pull request #174 from Mossaka/union
lukewagner Jun 26, 2023
abeb3a9
Add the missing closing backticks
Mossaka Jun 27, 2023
114a0c5
Merge pull request #212 from Mossaka/fix-typo
lukewagner Jun 27, 2023
0a1797a
Fix lifting an own handle from a borrow handle
alexcrichton Jul 11, 2023
72f6f5b
Update definitions.py as well
alexcrichton Jul 11, 2023
d445b5a
Merge pull request #214 from alexcrichton/fix-lift-own
lukewagner Jul 11, 2023
fccf7d1
Refactor Python definitions related to `borrow` handles
alexcrichton Jul 11, 2023
0b5888f
Merge pull request #215 from alexcrichton/refactor-resource-methods
lukewagner Jul 11, 2023
ee6e78e
Update definitions.py
patrickhuber Jul 12, 2023
defbacb
Update CanonicalABI.md
patrickhuber Jul 12, 2023
d1d52de
Merge pull request #216 from patrickhuber/patch-3
lukewagner Jul 12, 2023
e6d50af
In the Canonical ABI, disallow empty types. (#218)
sunfishcode Jul 24, 2023
cf8c769
Clarify validation rules for borrow (#221)
lukewagner Jul 26, 2023
07479f0
Allow imports to name implementations (#222)
lukewagner Aug 12, 2023
67fa785
Update SharedEverythingDynamicLinking.md (#227)
yowl Aug 14, 2023
c7cbe7f
Remove duplicated word (#228)
ishayhil Aug 14, 2023
1472627
fix typo (#230)
liigo Aug 16, 2023
a380d77
Rename one more `expected` to `result`. (#232)
sunfishcode Aug 17, 2023
8f0a917
Remove 'union' types (#237)
lann Aug 24, 2023
14bae8c
Fix typo in UseCases.md (#240)
sachaos Sep 6, 2023
a2fc2bd
Fix wrong item number in Goals.md (#241)
sachaos Sep 6, 2023
f3002fe
Adjust indentation in Goals.md (#242)
sachaos Sep 6, 2023
fb99bcb
Point users towards the documentation (#244)
merlijn-sebrechts Sep 10, 2023
080845b
add use-path grammar (#245)
cardoso Sep 13, 2023
33e09a5
Factor out Component Model Documentation link
lukewagner Sep 13, 2023
673d5c4
Update WIT.md package ids to match #222 (#246)
lukewagner Sep 15, 2023
cdae165
Add some language identifier to enable syntax highlighting (#250)
sachaos Sep 22, 2023
01ebd9e
Use semicolons as delimiters in WIT text format (#249)
alexcrichton Sep 25, 2023
9fde369
Clarify what's in Preview 2 (#255)
lukewagner Sep 28, 2023
d6ba326
Require semicolons after `package` too (#257)
alexcrichton Sep 28, 2023
5a11e36
Relax the uniqueness requirements on kebab-names (#259)
lukewagner Sep 28, 2023
e945a85
Don't force deterministic NaN canonicalization (#260)
lukewagner Oct 8, 2023
d7a2c26
Add subsection describing Index Spaces (#264)
lukewagner Oct 19, 2023
cc60a35
Change encoding of WIT definitions into Component Model types (#248)
lukewagner Oct 19, 2023
9c43f51
Disallow outer aliases of core module type from inside core module ty…
lukewagner Oct 23, 2023
fdc4997
Fix double-semicolon grammar on resource methods (#268)
alexcrichton Oct 27, 2023
823beba
Move structured import/export name information into the import/export…
lukewagner Oct 27, 2023
9a1ee9f
Fix typo in example
lukewagner Oct 27, 2023
d1f4756
Use 'package name' more consistently in docs (#270)
lukewagner Nov 10, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI

on:
push:
pull_request:

jobs:
canonical_abi:
name: Run Canonical ABI Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '>= 3.10.0'
- run: python design/mvp/canonical-abi/run_tests.py
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Component Model design and specification

This repository is where the component model is being standardized. For a more user-focussed explanation, take a look at the **[Component Model Documentation]**.

This repository describes the high-level [goals], [use cases], [design choices]
and [FAQ] of the component model as well as a more-detailed [assembly-level explainer], [IDL],
[binary format] and [ABI] covering the initial Minimum Viable Product (MVP)
release.

In the future, this repository will additionally contain a [formal spec],
reference interpreter and test suite.

## Milestones

The Component Model is currently being incrementally developed and stabilized
as part of [WASI Preview 2]. The subsequent "Preview 3" milestone will be
primarily concerned with the addition of [async support].

## Contributing

All Component Model work is done as part of the [W3C WebAssembly Community Group].
To contribute to any of these repositories, see the Community Group's
[Contributing Guidelines].

[Component Model Documentation]: https://component-model.bytecodealliance.org/
[goals]: design/high-level/Goals.md
[use cases]: design/high-level/UseCases.md
[design choices]: design/high-level/Choices.md
[FAQ]: design/high-level/FAQ.md
[assembly-level explainer]: design/mvp/Explainer.md
[IDL]: design/mvp/WIT.md
[binary format]: design/mvp/Binary.md
[ABI]: design/mvp/CanonicalABI.md
[formal spec]: spec/
[W3C WebAssembly Community Group]: https://www.w3.org/community/webassembly/
[Contributing Guidelines]: https://webassembly.org/community/contributing/
[WASI Preview 2]: https://github.com/WebAssembly/WASI/tree/main/preview2
[Async Support]: https://docs.google.com/presentation/d/1MNVOZ8hdofO3tI0szg_i-Yoy0N2QPU2C--LzVuoGSlE/edit?usp=share_link
202 changes: 202 additions & 0 deletions design/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

1 change: 1 addition & 0 deletions design/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See the [parent README](../README.md).
34 changes: 34 additions & 0 deletions design/high-level/Choices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Component Model High-Level Design Choices

Based on the [goals](Goals.md) and [use cases](UseCases.md), the component
model makes several high-level design choices that permeate the rest of the
component model.

1. The component model adopts a shared-nothing architecture in which component
instances fully encapsulate their linear memories, tables, globals and, in
the future, GC memory. Component interfaces contain only immutable copied
values, opaque typed handles and immutable uninstantiated modules/components.
While handles and imports can be used as an indirect form of sharing, the
[dependency use cases](UseCases.md#component-dependencies) enable this degree
of sharing to be finely controlled.

2. The component model introduces no global singletons, namespaces, registries,
locator services or frameworks through which components are configured or
linked. Instead, all related use cases are addressed through explicit
parametrization of components via imports (of data, functions, and types)
with every client of a component having the option to independently
instantiate the component with its own chosen import values.

3. The component model assumes no global inter-component garbage or cycle
collector that is able to trace through cross-component cycles. Instead
resources have lifetimes and require explicit acyclic ownership through
handles. The explicit lifetimes allow resources to have destructors that are
called deterministically and can be used to release linear memory
allocations in non-garbage-collected languages.

4. The component model assumes that Just-In-Time compilation is not available
at runtime and thus only provides declarative linking features that admit
Ahead-of-Time compilation, optimization and analysis. While component instances
can be created at runtime, the components being instantiated as well as their
dependencies and clients are known before execution begins.
(See also [this slide](https://docs.google.com/presentation/d/1PSC3Q5oFsJEaYyV5lNJvVgh-SNxhySWUqZ6puyojMi8/edit#slide=id.gceaf867ebf_0_10).)
26 changes: 26 additions & 0 deletions design/high-level/FAQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# FAQ

### How does WASI relate to the Component Model?

[WASI] is layered on top of the Component Model, with the Component Model
providing the foundational building blocks used to define WASI's interfaces,
including:
* the grammar of types that can be used in WASI interfaces;
* the linking functionality that WASI can assume is used to compose separate
modules of code, isolate their capabilities and virtualize WASI interfaces;
* the core wasm ABI that core wasm toolchains can compile against when targeting WASI.

By way of comparison to traditional Operating Systems, the Component Model
fills the role of an OS's process model (defining how processes start up and
communicate with each other) while WASI fills the role of an OS's many I/O
interfaces.

Use of WASI does not force the client to target the Component Model, however.
Any core wasm producer can simply target the core wasm ABI defined by the
Component Model for a given WASI interface's signature. This approach reopens
many questions that are answered by the Component Model, particularly when more
than one wasm module is involved, but for single-module scenarios or highly
custom scenarios, this might be appropriate.


[WASI]: https://github.com/WebAssembly/WASI/blob/main/README.md
55 changes: 55 additions & 0 deletions design/high-level/Goals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Component Model High-Level Goals

(For comparison, see WebAssembly's [original High-Level Goals].)

1. Define a portable, load- and run-time-efficient binary format for
separately-compiled components built from WebAssembly core modules that
enable portable, cross-language composition.
2. Support the definition of portable, virtualizable, statically-analyzable,
capability-safe, language-agnostic interfaces, especially those being
defined by [WASI].
3. Maintain and enhance WebAssembly's unique value proposition:
* *Language neutrality*: avoid biasing the component model toward just one
language or family of languages.
* *Embeddability*: design components to be embedded in a diverse set of
host execution environments, including browsers, servers, intermediaries,
small devices and data-intensive systems.
* *Optimizability*: maximize the static information available to
Ahead-of-Time compilers to minimize the cost of instantiation and
startup.
* *Formal semantics*: define the component model within the same semantic
framework as core wasm.
* *Web platform integration*: ensure components can be natively supported
in browsers by extending the existing WebAssembly integration points: the
[JS API], [Web API] and [ESM-integration]. Before native support is
implemented, ensure components can be polyfilled in browsers via
Ahead-of-Time compilation to currently-supported browser functionality.
4. Define the component model *incrementally*: starting from a set of
[initial use cases] and expanding the set of use cases over time,
prioritized by feedback and experience.

## Non-goals

1. Don't attempt to solve 100% of WebAssembly embedding scenarios.
* Some scenarios will require features in conflict with the above-mentioned goal.
* With the layered approach to specification, unsupported embedding
scenarios can be solved via alternative layered specifications or by
directly embedding the existing WebAssembly core specification.
2. Don't attempt to solve problems that are better solved by some combination
of the toolchain, the platform or higher layer specifications, including:
* package management and version control;
* deployment and live upgrade / dynamic reconfiguration;
* persistence and storage; and
* distributed computing and partial failure.
3. Don't specify a set of "component services".
* Specifying services that may be implemented by a host and exposed to
components is the domain of WASI and out of scope of the component model.
* See also the [WASI FAQ entry](FAQ.md#how-does-wasi-relate-to-the-component-model).


[original High-Level Goals]: https://github.com/WebAssembly/design/blob/main/HighLevelGoals.md
[WASI]: https://github.com/WebAssembly/WASI/blob/main/README.md
[JS API]: https://webassembly.github.io/spec/js-api/index.html
[Web API]: https://webassembly.github.io/spec/web-api/index.html
[ESM-integration]: https://github.com/WebAssembly/esm-integration/tree/main/proposals/esm-integration
[initial use cases]: UseCases.md#Initial-MVP
Loading