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