diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000000..863121594596 --- /dev/null +++ b/.nojekyll @@ -0,0 +1 @@ +This file makes sure that Github Pages doesn't process mdBook's output. \ No newline at end of file diff --git a/FontAwesome/css/font-awesome.css b/FontAwesome/css/font-awesome.css new file mode 100644 index 000000000000..540440ce89f2 --- /dev/null +++ b/FontAwesome/css/font-awesome.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.7.0');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.7.0') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.7.0') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.7.0') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-resistance:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-pied-piper:before{content:"\f2ae"}.fa-first-order:before{content:"\f2b0"}.fa-yoast:before{content:"\f2b1"}.fa-themeisle:before{content:"\f2b2"}.fa-google-plus-circle:before,.fa-google-plus-official:before{content:"\f2b3"}.fa-fa:before,.fa-font-awesome:before{content:"\f2b4"}.fa-handshake-o:before{content:"\f2b5"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-o:before{content:"\f2b7"}.fa-linode:before{content:"\f2b8"}.fa-address-book:before{content:"\f2b9"}.fa-address-book-o:before{content:"\f2ba"}.fa-vcard:before,.fa-address-card:before{content:"\f2bb"}.fa-vcard-o:before,.fa-address-card-o:before{content:"\f2bc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-circle-o:before{content:"\f2be"}.fa-user-o:before{content:"\f2c0"}.fa-id-badge:before{content:"\f2c1"}.fa-drivers-license:before,.fa-id-card:before{content:"\f2c2"}.fa-drivers-license-o:before,.fa-id-card-o:before{content:"\f2c3"}.fa-quora:before{content:"\f2c4"}.fa-free-code-camp:before{content:"\f2c5"}.fa-telegram:before{content:"\f2c6"}.fa-thermometer-4:before,.fa-thermometer:before,.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-3:before,.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-thermometer-2:before,.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-1:before,.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-0:before,.fa-thermometer-empty:before{content:"\f2cb"}.fa-shower:before{content:"\f2cc"}.fa-bathtub:before,.fa-s15:before,.fa-bath:before{content:"\f2cd"}.fa-podcast:before{content:"\f2ce"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-times-rectangle:before,.fa-window-close:before{content:"\f2d3"}.fa-times-rectangle-o:before,.fa-window-close-o:before{content:"\f2d4"}.fa-bandcamp:before{content:"\f2d5"}.fa-grav:before{content:"\f2d6"}.fa-etsy:before{content:"\f2d7"}.fa-imdb:before{content:"\f2d8"}.fa-ravelry:before{content:"\f2d9"}.fa-eercast:before{content:"\f2da"}.fa-microchip:before{content:"\f2db"}.fa-snowflake-o:before{content:"\f2dc"}.fa-superpowers:before{content:"\f2dd"}.fa-wpexplorer:before{content:"\f2de"}.fa-meetup:before{content:"\f2e0"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/FontAwesome/fonts/FontAwesome.ttf b/FontAwesome/fonts/FontAwesome.ttf new file mode 100644 index 000000000000..35acda2fa119 Binary files /dev/null and b/FontAwesome/fonts/FontAwesome.ttf differ diff --git a/FontAwesome/fonts/fontawesome-webfont.eot b/FontAwesome/fonts/fontawesome-webfont.eot new file mode 100644 index 000000000000..e9f60ca953f9 Binary files /dev/null and b/FontAwesome/fonts/fontawesome-webfont.eot differ diff --git a/FontAwesome/fonts/fontawesome-webfont.svg b/FontAwesome/fonts/fontawesome-webfont.svg new file mode 100644 index 000000000000..855c845e538b --- /dev/null +++ b/FontAwesome/fonts/fontawesome-webfont.svg @@ -0,0 +1,2671 @@ + + + + +Created by FontForge 20120731 at Mon Oct 24 17:37:40 2016 + By ,,, +Copyright Dave Gandy 2016. All rights reserved. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/FontAwesome/fonts/fontawesome-webfont.ttf b/FontAwesome/fonts/fontawesome-webfont.ttf new file mode 100644 index 000000000000..35acda2fa119 Binary files /dev/null and b/FontAwesome/fonts/fontawesome-webfont.ttf differ diff --git a/FontAwesome/fonts/fontawesome-webfont.woff b/FontAwesome/fonts/fontawesome-webfont.woff new file mode 100644 index 000000000000..400014a4b06e Binary files /dev/null and b/FontAwesome/fonts/fontawesome-webfont.woff differ diff --git a/FontAwesome/fonts/fontawesome-webfont.woff2 b/FontAwesome/fonts/fontawesome-webfont.woff2 new file mode 100644 index 000000000000..4d13fc60404b Binary files /dev/null and b/FontAwesome/fonts/fontawesome-webfont.woff2 differ diff --git a/api/.lock b/api/.lock new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/api/COPYRIGHT.txt b/api/COPYRIGHT.txt new file mode 100644 index 000000000000..af77776cca43 --- /dev/null +++ b/api/COPYRIGHT.txt @@ -0,0 +1,45 @@ +These documentation pages include resources by third parties. This copyright +file applies only to those resources. The following third party resources are +included, and carry their own copyright notices and license terms: + +* Fira Sans (FiraSans-Regular.woff, FiraSans-Medium.woff): + + Copyright (c) 2014, Mozilla Foundation https://mozilla.org/ + with Reserved Font Name Fira Sans. + + Copyright (c) 2014, Telefonica S.A. + + Licensed under the SIL Open Font License, Version 1.1. + See FiraSans-LICENSE.txt. + +* rustdoc.css, main.js, and playpen.js: + + Copyright 2015 The Rust Developers. + Licensed under the Apache License, Version 2.0 (see LICENSE-APACHE.txt) or + the MIT license (LICENSE-MIT.txt) at your option. + +* normalize.css: + + Copyright (c) Nicolas Gallagher and Jonathan Neal. + Licensed under the MIT license (see LICENSE-MIT.txt). + +* Source Code Pro (SourceCodePro-Regular.woff, SourceCodePro-Semibold.woff): + + Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), + with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark + of Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceCodePro-LICENSE.txt. + +* Source Serif Pro (SourceSerifPro-Regular.ttf.woff, + SourceSerifPro-Bold.ttf.woff, SourceSerifPro-It.ttf.woff): + + Copyright 2014 Adobe Systems Incorporated (http://www.adobe.com/), with + Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of + Adobe Systems Incorporated in the United States and/or other countries. + + Licensed under the SIL Open Font License, Version 1.1. + See SourceSerifPro-LICENSE.txt. + +This copyright file is intended to be distributed with rustdoc output. diff --git a/api/FiraSans-LICENSE.txt b/api/FiraSans-LICENSE.txt new file mode 100644 index 000000000000..d444ea92b6f1 --- /dev/null +++ b/api/FiraSans-LICENSE.txt @@ -0,0 +1,94 @@ +Digitized data copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. +with Reserved Font Name < Fira >, + +This Font Software is licensed under the SIL Open Font License, Version 1.1. +This license is copied below, and is also available with a FAQ at: +http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api/FiraSans-Medium.woff b/api/FiraSans-Medium.woff new file mode 100644 index 000000000000..7d742c5fb7d4 Binary files /dev/null and b/api/FiraSans-Medium.woff differ diff --git a/api/FiraSans-Regular.woff b/api/FiraSans-Regular.woff new file mode 100644 index 000000000000..d8e0363f4e1a Binary files /dev/null and b/api/FiraSans-Regular.woff differ diff --git a/api/LICENSE-APACHE.txt b/api/LICENSE-APACHE.txt new file mode 100644 index 000000000000..16fe87b06e80 --- /dev/null +++ b/api/LICENSE-APACHE.txt @@ -0,0 +1,201 @@ + 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. diff --git a/api/LICENSE-MIT.txt b/api/LICENSE-MIT.txt new file mode 100644 index 000000000000..31aa79387f27 --- /dev/null +++ b/api/LICENSE-MIT.txt @@ -0,0 +1,23 @@ +Permission is hereby granted, free of charge, to any +person obtaining a copy of this software and associated +documentation files (the "Software"), to deal in the +Software without restriction, including without +limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software +is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions +of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED +TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT +SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR +IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. diff --git a/api/SourceCodePro-LICENSE.txt b/api/SourceCodePro-LICENSE.txt new file mode 100644 index 000000000000..07542572e33b --- /dev/null +++ b/api/SourceCodePro-LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api/SourceCodePro-Regular.woff b/api/SourceCodePro-Regular.woff new file mode 100644 index 000000000000..5576670903ae Binary files /dev/null and b/api/SourceCodePro-Regular.woff differ diff --git a/api/SourceCodePro-Semibold.woff b/api/SourceCodePro-Semibold.woff new file mode 100644 index 000000000000..ca972a11dc42 Binary files /dev/null and b/api/SourceCodePro-Semibold.woff differ diff --git a/api/SourceSerifPro-Bold.ttf.woff b/api/SourceSerifPro-Bold.ttf.woff new file mode 100644 index 000000000000..ca254318fe9e Binary files /dev/null and b/api/SourceSerifPro-Bold.ttf.woff differ diff --git a/api/SourceSerifPro-It.ttf.woff b/api/SourceSerifPro-It.ttf.woff new file mode 100644 index 000000000000..a287bbe6ed3f Binary files /dev/null and b/api/SourceSerifPro-It.ttf.woff differ diff --git a/api/SourceSerifPro-LICENSE.md b/api/SourceSerifPro-LICENSE.md new file mode 100644 index 000000000000..22cb755f2f1d --- /dev/null +++ b/api/SourceSerifPro-LICENSE.md @@ -0,0 +1,93 @@ +Copyright 2014-2018 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries. + +This Font Software is licensed under the SIL Open Font License, Version 1.1. + +This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL + + +----------------------------------------------------------- +SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 +----------------------------------------------------------- + +PREAMBLE +The goals of the Open Font License (OFL) are to stimulate worldwide +development of collaborative font projects, to support the font creation +efforts of academic and linguistic communities, and to provide a free and +open framework in which fonts may be shared and improved in partnership +with others. + +The OFL allows the licensed fonts to be used, studied, modified and +redistributed freely as long as they are not sold by themselves. The +fonts, including any derivative works, can be bundled, embedded, +redistributed and/or sold with any software provided that any reserved +names are not used by derivative works. The fonts and derivatives, +however, cannot be released under any other type of license. The +requirement for fonts to remain under this license does not apply +to any document created using the fonts or their derivatives. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this license and clearly marked as such. This may +include source files, build scripts and documentation. + +"Reserved Font Name" refers to any names specified as such after the +copyright statement(s). + +"Original Version" refers to the collection of Font Software components as +distributed by the Copyright Holder(s). + +"Modified Version" refers to any derivative made by adding to, deleting, +or substituting -- in part or in whole -- any of the components of the +Original Version, by changing formats or by porting the Font Software to a +new environment. + +"Author" refers to any designer, engineer, programmer, technical +writer or other person who contributed to the Font Software. + +PERMISSION & CONDITIONS +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Font Software, to use, study, copy, merge, embed, modify, +redistribute, and sell modified and unmodified copies of the Font +Software, subject to the following conditions: + +1) Neither the Font Software nor any of its individual components, +in Original or Modified Versions, may be sold by itself. + +2) Original or Modified Versions of the Font Software may be bundled, +redistributed and/or sold with any software, provided that each copy +contains the above copyright notice and this license. These can be +included either as stand-alone text files, human-readable headers or +in the appropriate machine-readable metadata fields within text or +binary files as long as those fields can be easily viewed by the user. + +3) No Modified Version of the Font Software may use the Reserved Font +Name(s) unless explicit written permission is granted by the corresponding +Copyright Holder. This restriction only applies to the primary font name as +presented to the users. + +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font +Software shall not be used to promote, endorse or advertise any +Modified Version, except to acknowledge the contribution(s) of the +Copyright Holder(s) and the Author(s) or with their explicit written +permission. + +5) The Font Software, modified or unmodified, in part or in whole, +must be distributed entirely under this license, and must not be +distributed under any other license. The requirement for fonts to +remain under this license does not apply to any document created +using the Font Software. + +TERMINATION +This license becomes null and void if any of the above conditions are +not met. + +DISCLAIMER +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE +COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL +DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM +OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/api/SourceSerifPro-Regular.ttf.woff b/api/SourceSerifPro-Regular.ttf.woff new file mode 100644 index 000000000000..a3d55cfdf255 Binary files /dev/null and b/api/SourceSerifPro-Regular.ttf.woff differ diff --git a/api/aliases.js b/api/aliases.js new file mode 100644 index 000000000000..4b175d4e5e2e --- /dev/null +++ b/api/aliases.js @@ -0,0 +1,18 @@ +var ALIASES = {}; +ALIASES["lightbeam"] = {}; +ALIASES["wasi_common"] = {}; +ALIASES["wasmtime"] = {}; +ALIASES["wasmtime_debug"] = {}; +ALIASES["wasmtime_environ"] = {}; +ALIASES["wasmtime_fuzzing"] = {}; +ALIASES["wasmtime_interface_types"] = {}; +ALIASES["wasmtime_jit"] = {}; +ALIASES["wasmtime_obj"] = {}; +ALIASES["wasmtime_runtime"] = {}; +ALIASES["wasmtime_rust"] = {}; +ALIASES["wasmtime_rust_macro"] = {}; +ALIASES["wasmtime_wasi"] = {}; +ALIASES["wasmtime_wast"] = {}; +ALIASES["wig"] = {}; +ALIASES["winx"] = {}; +ALIASES["yanix"] = {}; diff --git a/api/brush.svg b/api/brush.svg new file mode 100644 index 000000000000..ea266e856a9d --- /dev/null +++ b/api/brush.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api/dark.css b/api/dark.css new file mode 100644 index 000000000000..ef659d757e61 --- /dev/null +++ b/api/dark.css @@ -0,0 +1 @@ +body{background-color:#353535;color:#ddd;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:#ddd;}h1.fqn{border-bottom-color:#d2d2d2;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#d2d2d2;}.in-band{background-color:#353535;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#2A2A2A;}pre{background-color:#2A2A2A;}.sidebar{background-color:#505050;}.sidebar .current{background-color:#333;}.source .sidebar{background-color:#353535;}.sidebar .location{border-color:#fff;background:#575757;color:#DDD;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#444;}.line-numbers span{color:#3B91E2;}.line-numbers .line-highlighted{background-color:#0a042f !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#DDD;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#ddd;}.content .highlighted{color:#eee !important;background-color:#616161;}.content .highlighted a,.content .highlighted span{color:#eee !important;}.content .highlighted.trait{background-color:#013191;}.content .highlighted.traitalias{background-color:#013191;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.mod{background-color:#803a1b;}.content .highlighted.externcrate{background-color:#396bac;}.content .highlighted.enum{background-color:#5b4e68;}.content .highlighted.struct{background-color:#194e9f;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#4950ed;}.content .highlighted.type{background-color:#38902c;}.content .highlighted.foreigntype{background-color:#b200d6;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#217d1c;}.content .highlighted.constant,.content .highlighted.static{background-color:#0063cc;}.content .highlighted.primitive{background-color:#00708a;}.content .highlighted.keyword{background-color:#884719;}.content .stability::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#82b089;}.content span.struct,.content a.struct,.block a.current.struct{color:#2dbfb8;}.content span.type,.content a.type,.block a.current.type{color:#ff7f00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#dd7de8;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#09bd00;}.content span.union,.content a.union,.block a.current.union{color:#a6ae37;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#82a5c9;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#43aec7;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#bda000;}.content span.trait,.content a.trait,.block a.current.trait{color:#b78cf2;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#b397da;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#2BAB63;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8d8d8b;}pre.rust .doccomment{color:#8ca375;}nav:not(.sidebar){border-bottom-color:#4e4e4e;}nav.main .current{border-top-color:#eee;border-bottom-color:#eee;}nav.main .separator{border-color:#eee;}a{color:#ddd;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.stability a{color:#D2991D;}.stab.internal a{color:#304FFE;}a.test-arrow{color:#dedede;}.collapse-toggle{color:#999;}#crate-search{color:#111;background-color:#f0f0f0;border-color:#000;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input{color:#111;background-color:#f0f0f0;box-shadow:0 0 0 1px #000,0 0 0 2px transparent;}.search-input:focus{border-color:#008dfd;}.search-focus:disabled{background-color:#c5c4c4;}#crate-search+.search-input:focus{box-shadow:0 0 8px 4px #078dd8;}.module-item .stab{color:#ddd;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;color:#2f2f2f;}.stab.internal{background:#FFB9B3;border-color:#B71C1C;color:#2f2f2f;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;color:#2f2f2f;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;color:#2f2f2f;}.stab.portability>code{color:#ddd;}#help>div{background:#4d4d4d;border-color:#bfbfbf;}#help dt{border-color:#bfbfbf;background:rgba(0,0,0,0);color:black;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:#ddd;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#ab8ac1;}pre.rust .kw-2,pre.rust .prelude-ty{color:#769acb;}pre.rust .number,pre.rust .string{color:#83a300;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#ee6868;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#d97f26;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#4a4949;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background-color:#494a3d;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.6);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.6);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.6);}.information>.compile_fail:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.6);}.information>.ignore:hover{color:rgba(255,142,0,1);}.search-failed a{color:#0089ff;}.tooltip .tooltiptext{background-color:black;color:#fff;}.tooltip .tooltiptext::after{border-color:transparent black transparent transparent;}.important-traits .tooltip .tooltiptext{background-color:white;color:black;border-color:black;}#titles>div:not(.selected){background-color:#252525;border-top-color:#252525;}#titles>div:hover,#titles>div.selected{border-top-color:#0089ff;}#titles>div>div.count{color:#888;}.modal{background-color:rgba(0,0,0,0.3);}.modal-content{background-color:#272727;border-color:#999;}.modal-content>.close{background-color:#272727;border-color:#999;}.modal-content>.close:hover{background-color:#ff1f1f;color:white;}.modal-content>.whiter{background-color:#272727;}.modal-content>.close:hover+.whiter{background-color:#ff1f1f;}@media (max-width:700px){.sidebar-menu{background-color:#505050;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#505050;border-right-color:#000;}#sidebar-filler{background-color:#505050;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu{border-color:#e0e0e0;background:#f0f0f0;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus{border-color:#ffb900;}#theme-choices{border-color:#e0e0e0;background-color:#353535;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#4e4e4e;}@media (max-width:700px){#theme-picker{background:#f0f0f0;}}#all-types{background-color:#505050;}#all-types:hover{background-color:#606060;}.search-results td span.alias{color:#fff;}.search-results td span.grey{color:#ccc;}#sidebar-toggle{background-color:#565656;}#sidebar-toggle:hover{background-color:#676767;}#source-sidebar{background-color:#565656;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#444;}div.files>.selected{background-color:#333;}.setting-line>.title{border-bottom-color:#ddd;} \ No newline at end of file diff --git a/api/down-arrow.svg b/api/down-arrow.svg new file mode 100644 index 000000000000..35437e77a710 --- /dev/null +++ b/api/down-arrow.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api/favicon.ico b/api/favicon.ico new file mode 100644 index 000000000000..b8ad23769ac8 Binary files /dev/null and b/api/favicon.ico differ diff --git a/api/implementors/arbitrary/trait.Arbitrary.js b/api/implementors/arbitrary/trait.Arbitrary.js new file mode 100644 index 000000000000..505219bffe42 --- /dev/null +++ b/api/implementors/arbitrary/trait.Arbitrary.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_fuzzing"] = [{"text":"impl Arbitrary for ApiCall","synthetic":false,"types":["wasmtime_fuzzing::generators::api::ApiCall"]},{"text":"impl Arbitrary for ApiCalls","synthetic":false,"types":["wasmtime_fuzzing::generators::api::ApiCalls"]},{"text":"impl Arbitrary for WasmOptTtf","synthetic":false,"types":["wasmtime_fuzzing::generators::WasmOptTtf"]},{"text":"impl Arbitrary for DifferentialConfig","synthetic":false,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/clone/trait.Clone.js b/api/implementors/core/clone/trait.Clone.js new file mode 100644 index 000000000000..4629c97af2d5 --- /dev/null +++ b/api/implementors/core/clone/trait.Clone.js @@ -0,0 +1,11 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl Clone for ExecutionError","synthetic":false,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl Clone for FileType","synthetic":false,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl Clone for Metadata","synthetic":false,"types":["wasi_common::fs::metadata::Metadata"]},{"text":"impl Clone for Permissions","synthetic":false,"types":["wasi_common::fs::permissions::Permissions"]},{"text":"impl Clone for __wasi_dirent_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl Clone for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl Clone for __wasi_filestat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl Clone for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Clone for __wasi_event_u_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_u_t"]},{"text":"impl Clone for __wasi_event_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_t"]},{"text":"impl Clone for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl Clone for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Clone for __wasi_subscription_u_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_u_t"]},{"text":"impl Clone for __wasi_subscription_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_t"]},{"text":"impl Clone for __wasi_iovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl Clone for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl Clone for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Clone for __wasi_prestat_u_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_u_t"]},{"text":"impl Clone for __wasi_prestat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_t"]},{"text":"impl Clone for __wasi_dirent_t","synthetic":false,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl Clone for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl Clone for __wasi_filestat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl Clone for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Clone for __wasi_event_u_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_u_t"]},{"text":"impl Clone for __wasi_event_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_t"]},{"text":"impl Clone for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl Clone for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Clone for __wasi_subscription_u_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_u_t"]},{"text":"impl Clone for __wasi_subscription_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_t"]},{"text":"impl Clone for __wasi_iovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl Clone for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl Clone for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Clone for __wasi_prestat_u_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_u_t"]},{"text":"impl Clone for __wasi_prestat_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_t"]}]; +implementors["wasmtime"] = [{"text":"impl Clone for Extern","synthetic":false,"types":["wasmtime::externals::Extern"]},{"text":"impl Clone for Global","synthetic":false,"types":["wasmtime::externals::Global"]},{"text":"impl Clone for Table","synthetic":false,"types":["wasmtime::externals::Table"]},{"text":"impl Clone for Memory","synthetic":false,"types":["wasmtime::externals::Memory"]},{"text":"impl Clone for Func","synthetic":false,"types":["wasmtime::func::Func"]},{"text":"impl Clone for Instance","synthetic":false,"types":["wasmtime::instance::Instance"]},{"text":"impl Clone for Module","synthetic":false,"types":["wasmtime::module::Module"]},{"text":"impl Clone for AnyRef","synthetic":false,"types":["wasmtime::ref::AnyRef"]},{"text":"impl<T> Clone for HostRef<T>","synthetic":false,"types":["wasmtime::ref::HostRef"]},{"text":"impl Clone for Config","synthetic":false,"types":["wasmtime::runtime::Config"]},{"text":"impl Clone for Strategy","synthetic":false,"types":["wasmtime::runtime::Strategy"]},{"text":"impl Clone for OptLevel","synthetic":false,"types":["wasmtime::runtime::OptLevel"]},{"text":"impl Clone for Engine","synthetic":false,"types":["wasmtime::runtime::Engine"]},{"text":"impl Clone for Store","synthetic":false,"types":["wasmtime::runtime::Store"]},{"text":"impl Clone for Trap","synthetic":false,"types":["wasmtime::trap::Trap"]},{"text":"impl Clone for Mutability","synthetic":false,"types":["wasmtime::types::Mutability"]},{"text":"impl Clone for Limits","synthetic":false,"types":["wasmtime::types::Limits"]},{"text":"impl Clone for ValType","synthetic":false,"types":["wasmtime::types::ValType"]},{"text":"impl Clone for ExternType","synthetic":false,"types":["wasmtime::types::ExternType"]},{"text":"impl Clone for FuncType","synthetic":false,"types":["wasmtime::types::FuncType"]},{"text":"impl Clone for GlobalType","synthetic":false,"types":["wasmtime::types::GlobalType"]},{"text":"impl Clone for TableType","synthetic":false,"types":["wasmtime::types::TableType"]},{"text":"impl Clone for MemoryType","synthetic":false,"types":["wasmtime::types::MemoryType"]},{"text":"impl Clone for ImportType","synthetic":false,"types":["wasmtime::types::ImportType"]},{"text":"impl Clone for ExportType","synthetic":false,"types":["wasmtime::types::ExportType"]},{"text":"impl Clone for Val","synthetic":false,"types":["wasmtime::values::Val"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Clone for InstructionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl Clone for FunctionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl Clone for ModuleMemoryOffset","synthetic":false,"types":["wasmtime_environ::address_map::ModuleMemoryOffset"]},{"text":"impl Clone for ModuleVmctxInfo","synthetic":false,"types":["wasmtime_environ::address_map::ModuleVmctxInfo"]},{"text":"impl Clone for CompiledFunctionUnwindInfoReloc","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl Clone for CompiledFunctionUnwindInfo","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl Clone for CompiledFunction","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl Clone for Relocation","synthetic":false,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl Clone for RelocationTarget","synthetic":false,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl Clone for TableElements","synthetic":false,"types":["wasmtime_environ::module::TableElements"]},{"text":"impl Clone for Export","synthetic":false,"types":["wasmtime_environ::module::Export"]},{"text":"impl Clone for MemoryStyle","synthetic":false,"types":["wasmtime_environ::module::MemoryStyle"]},{"text":"impl Clone for MemoryPlan","synthetic":false,"types":["wasmtime_environ::module::MemoryPlan"]},{"text":"impl Clone for TableStyle","synthetic":false,"types":["wasmtime_environ::module::TableStyle"]},{"text":"impl Clone for TablePlan","synthetic":false,"types":["wasmtime_environ::module::TablePlan"]},{"text":"impl Clone for DataInitializerLocation","synthetic":false,"types":["wasmtime_environ::module_environ::DataInitializerLocation"]},{"text":"impl Clone for Tunables","synthetic":false,"types":["wasmtime_environ::tunables::Tunables"]},{"text":"impl Clone for TargetSharedSignatureIndex","synthetic":false,"types":["wasmtime_environ::vmoffsets::TargetSharedSignatureIndex"]},{"text":"impl Clone for CacheConfig","synthetic":false,"types":["wasmtime_environ::cache::config::CacheConfig"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl Clone for ApiCall","synthetic":false,"types":["wasmtime_fuzzing::generators::api::ApiCall"]},{"text":"impl Clone for WasmOptTtf","synthetic":false,"types":["wasmtime_fuzzing::generators::WasmOptTtf"]},{"text":"impl Clone for DifferentialConfig","synthetic":false,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]}]; +implementors["wasmtime_interface_types"] = [{"text":"impl Clone for Value","synthetic":false,"types":["wasmtime_interface_types::value::Value"]}]; +implementors["wasmtime_jit"] = [{"text":"impl Clone for CompilationStrategy","synthetic":false,"types":["wasmtime_jit::compiler::CompilationStrategy"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl Clone for Export","synthetic":false,"types":["wasmtime_runtime::export::Export"]},{"text":"impl Clone for Imports","synthetic":false,"types":["wasmtime_runtime::imports::Imports"]},{"text":"impl Clone for InstanceHandle","synthetic":false,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl Clone for TrapRegistration","synthetic":false,"types":["wasmtime_runtime::trap_registry::TrapRegistration"]},{"text":"impl Clone for TrapDescription","synthetic":false,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl Clone for VMFunctionImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMFunctionImport"]},{"text":"impl Clone for VMTableImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMTableImport"]},{"text":"impl Clone for VMMemoryImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMMemoryImport"]},{"text":"impl Clone for VMGlobalImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMGlobalImport"]},{"text":"impl Clone for VMMemoryDefinition","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMMemoryDefinition"]},{"text":"impl Clone for VMTableDefinition","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMTableDefinition"]},{"text":"impl Clone for VMGlobalDefinition","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMGlobalDefinition"]},{"text":"impl Clone for VMSharedSignatureIndex","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]},{"text":"impl Clone for VMCallerCheckedAnyfunc","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMCallerCheckedAnyfunc"]},{"text":"impl Clone for VMInvokeArgument","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMInvokeArgument"]}]; +implementors["yanix"] = [{"text":"impl Clone for ClockId","synthetic":false,"types":["yanix::clock::ClockId"]},{"text":"impl Clone for Dir","synthetic":false,"types":["yanix::dir::Dir"]},{"text":"impl Clone for Entry","synthetic":false,"types":["yanix::dir::Entry"]},{"text":"impl Clone for SeekLoc","synthetic":false,"types":["yanix::dir::SeekLoc"]},{"text":"impl Clone for FileType","synthetic":false,"types":["yanix::dir::FileType"]},{"text":"impl Clone for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl Clone for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl Clone for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl Clone for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl Clone for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl Clone for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]},{"text":"impl Clone for PollFd","synthetic":false,"types":["yanix::poll::PollFd"]},{"text":"impl Clone for SockType","synthetic":false,"types":["yanix::socket::SockType"]},{"text":"impl Clone for Errno","synthetic":false,"types":["yanix::errno::Errno"]},{"text":"impl Clone for PosixFadviseAdvice","synthetic":false,"types":["yanix::sys::linux::fadvise::PosixFadviseAdvice"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/cmp/trait.Eq.js b/api/implementors/core/cmp/trait.Eq.js new file mode 100644 index 000000000000..46aa98ca7c98 --- /dev/null +++ b/api/implementors/core/cmp/trait.Eq.js @@ -0,0 +1,9 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl Eq for ExecutionError","synthetic":false,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl Eq for FileType","synthetic":false,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl Eq for Permissions","synthetic":false,"types":["wasi_common::fs::permissions::Permissions"]},{"text":"impl Eq for __wasi_dirent_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl Eq for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl Eq for __wasi_filestat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl Eq for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Eq for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl Eq for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Eq for __wasi_iovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl Eq for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl Eq for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Eq for __wasi_dirent_t","synthetic":false,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl Eq for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl Eq for __wasi_filestat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl Eq for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Eq for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl Eq for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Eq for __wasi_iovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl Eq for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl Eq for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]}]; +implementors["wasmtime"] = [{"text":"impl Eq for ValType","synthetic":false,"types":["wasmtime::types::ValType"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Eq for InstructionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl Eq for FunctionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl Eq for CompiledFunctionUnwindInfoReloc","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl Eq for CompiledFunctionUnwindInfo","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl Eq for CompiledFunction","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl Eq for Compilation","synthetic":false,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl Eq for Relocation","synthetic":false,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl Eq for RelocationTarget","synthetic":false,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl Eq for TrapInformation","synthetic":false,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl Eq for Export","synthetic":false,"types":["wasmtime_environ::module::Export"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl Eq for DifferentialConfig","synthetic":false,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl Eq for InstanceHandle","synthetic":false,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl Eq for VMSharedSignatureIndex","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]}]; +implementors["yanix"] = [{"text":"impl Eq for Dir","synthetic":false,"types":["yanix::dir::Dir"]},{"text":"impl Eq for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl Eq for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl Eq for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl Eq for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl Eq for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl Eq for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]},{"text":"impl Eq for PollFd","synthetic":false,"types":["yanix::poll::PollFd"]},{"text":"impl Eq for Errno","synthetic":false,"types":["yanix::errno::Errno"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/cmp/trait.Ord.js b/api/implementors/core/cmp/trait.Ord.js new file mode 100644 index 000000000000..1693de94428c --- /dev/null +++ b/api/implementors/core/cmp/trait.Ord.js @@ -0,0 +1,4 @@ +(function() {var implementors = {}; +implementors["wasmtime_environ"] = [{"text":"impl Ord for Export","synthetic":false,"types":["wasmtime_environ::module::Export"]}]; +implementors["yanix"] = [{"text":"impl Ord for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl Ord for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl Ord for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl Ord for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl Ord for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl Ord for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/cmp/trait.PartialEq.js b/api/implementors/core/cmp/trait.PartialEq.js new file mode 100644 index 000000000000..5609fa6f557d --- /dev/null +++ b/api/implementors/core/cmp/trait.PartialEq.js @@ -0,0 +1,9 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl PartialEq<ExecutionError> for ExecutionError","synthetic":false,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl PartialEq<FileType> for FileType","synthetic":false,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl PartialEq<Permissions> for Permissions","synthetic":false,"types":["wasi_common::fs::permissions::Permissions"]},{"text":"impl PartialEq<__wasi_dirent_t> for __wasi_dirent_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl PartialEq<__wasi_fdstat_t> for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl PartialEq<__wasi_filestat_t> for __wasi_filestat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl PartialEq<__wasi_event_fd_readwrite_t> for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl PartialEq<__wasi_subscription_clock_t> for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl PartialEq<__wasi_subscription_fd_readwrite_t> for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl PartialEq<__wasi_iovec_t> for __wasi_iovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl PartialEq<__wasi_ciovec_t> for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl PartialEq<__wasi_prestat_dir_t> for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl PartialEq<__wasi_dirent_t> for __wasi_dirent_t","synthetic":false,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl PartialEq<__wasi_fdstat_t> for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl PartialEq<__wasi_filestat_t> for __wasi_filestat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl PartialEq<__wasi_event_fd_readwrite_t> for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl PartialEq<__wasi_subscription_clock_t> for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl PartialEq<__wasi_subscription_fd_readwrite_t> for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl PartialEq<__wasi_iovec_t> for __wasi_iovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl PartialEq<__wasi_ciovec_t> for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl PartialEq<__wasi_prestat_dir_t> for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]}]; +implementors["wasmtime"] = [{"text":"impl PartialEq<Mutability> for Mutability","synthetic":false,"types":["wasmtime::types::Mutability"]},{"text":"impl PartialEq<ValType> for ValType","synthetic":false,"types":["wasmtime::types::ValType"]}]; +implementors["wasmtime_environ"] = [{"text":"impl PartialEq<InstructionAddressMap> for InstructionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl PartialEq<FunctionAddressMap> for FunctionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl PartialEq<CompiledFunctionUnwindInfoReloc> for CompiledFunctionUnwindInfoReloc","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl PartialEq<CompiledFunctionUnwindInfo> for CompiledFunctionUnwindInfo","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl PartialEq<CompiledFunction> for CompiledFunction","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl PartialEq<Compilation> for Compilation","synthetic":false,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl PartialEq<Relocation> for Relocation","synthetic":false,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl PartialEq<RelocationTarget> for RelocationTarget","synthetic":false,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl PartialEq<TrapInformation> for TrapInformation","synthetic":false,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl PartialEq<Export> for Export","synthetic":false,"types":["wasmtime_environ::module::Export"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl PartialEq<DifferentialConfig> for DifferentialConfig","synthetic":false,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl PartialEq<InstanceHandle> for InstanceHandle","synthetic":false,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl PartialEq<TrapDescription> for TrapDescription","synthetic":false,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl PartialEq<VMSharedSignatureIndex> for VMSharedSignatureIndex","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]}]; +implementors["yanix"] = [{"text":"impl PartialEq<Dir> for Dir","synthetic":false,"types":["yanix::dir::Dir"]},{"text":"impl PartialEq<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl PartialEq<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl PartialEq<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl PartialEq<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl PartialEq<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl PartialEq<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]},{"text":"impl PartialEq<PollFd> for PollFd","synthetic":false,"types":["yanix::poll::PollFd"]},{"text":"impl PartialEq<Errno> for Errno","synthetic":false,"types":["yanix::errno::Errno"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/cmp/trait.PartialOrd.js b/api/implementors/core/cmp/trait.PartialOrd.js new file mode 100644 index 000000000000..281b040f31d6 --- /dev/null +++ b/api/implementors/core/cmp/trait.PartialOrd.js @@ -0,0 +1,4 @@ +(function() {var implementors = {}; +implementors["wasmtime_environ"] = [{"text":"impl PartialOrd<Export> for Export","synthetic":false,"types":["wasmtime_environ::module::Export"]}]; +implementors["yanix"] = [{"text":"impl PartialOrd<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl PartialOrd<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl PartialOrd<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl PartialOrd<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl PartialOrd<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl PartialOrd<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/convert/trait.From.js b/api/implementors/core/convert/trait.From.js new file mode 100644 index 000000000000..6a68610ae7bc --- /dev/null +++ b/api/implementors/core/convert/trait.From.js @@ -0,0 +1,9 @@ +(function() {var implementors = {}; +implementors["wasi_common"] = [{"text":"impl From<Error> for Error","synthetic":false,"types":["wasi_common::error::Error"]},{"text":"impl From<YanixError> for Error","synthetic":false,"types":["wasi_common::error::Error"]},{"text":"impl From<TryFromIntError> for Error","synthetic":false,"types":["wasi_common::error::Error"]},{"text":"impl From<Infallible> for Error","synthetic":false,"types":["wasi_common::error::Error"]},{"text":"impl From<Utf8Error> for Error","synthetic":false,"types":["wasi_common::error::Error"]},{"text":"impl From<NulError> for Error","synthetic":false,"types":["wasi_common::error::Error"]},{"text":"impl<'_> From<&'_ NulError> for Error","synthetic":false,"types":["wasi_common::error::Error"]},{"text":"impl From<Errno> for Error","synthetic":false,"types":["wasi_common::old::snapshot_0::Error"]},{"text":"impl From<Errno> for Error","synthetic":false,"types":["wasi_common::error::Error"]}]; +implementors["wasmtime"] = [{"text":"impl From<Func> for Extern","synthetic":false,"types":["wasmtime::externals::Extern"]},{"text":"impl From<Global> for Extern","synthetic":false,"types":["wasmtime::externals::Extern"]},{"text":"impl From<Memory> for Extern","synthetic":false,"types":["wasmtime::externals::Extern"]},{"text":"impl From<Table> for Extern","synthetic":false,"types":["wasmtime::externals::Extern"]},{"text":"impl From<i32> for Val","synthetic":false,"types":["wasmtime::values::Val"]},{"text":"impl From<i64> for Val","synthetic":false,"types":["wasmtime::values::Val"]},{"text":"impl From<f32> for Val","synthetic":false,"types":["wasmtime::values::Val"]},{"text":"impl From<f64> for Val","synthetic":false,"types":["wasmtime::values::Val"]},{"text":"impl From<AnyRef> for Val","synthetic":false,"types":["wasmtime::values::Val"]},{"text":"impl From<Func> for Val","synthetic":false,"types":["wasmtime::values::Val"]}]; +implementors["wasmtime_environ"] = [{"text":"impl From<WasmError> for CompileError","synthetic":false,"types":["wasmtime_environ::compilation::CompileError"]}]; +implementors["wasmtime_interface_types"] = [{"text":"impl From<String> for Value","synthetic":false,"types":["wasmtime_interface_types::value::Value"]},{"text":"impl From<i32> for Value","synthetic":false,"types":["wasmtime_interface_types::value::Value"]},{"text":"impl From<u32> for Value","synthetic":false,"types":["wasmtime_interface_types::value::Value"]},{"text":"impl From<i64> for Value","synthetic":false,"types":["wasmtime_interface_types::value::Value"]},{"text":"impl From<u64> for Value","synthetic":false,"types":["wasmtime_interface_types::value::Value"]},{"text":"impl From<f32> for Value","synthetic":false,"types":["wasmtime_interface_types::value::Value"]},{"text":"impl From<f64> for Value","synthetic":false,"types":["wasmtime_interface_types::value::Value"]},{"text":"impl<'a> From<&'a str> for Value","synthetic":false,"types":["wasmtime_interface_types::value::Value"]}]; +implementors["wasmtime_jit"] = [{"text":"impl From<CompileError> for SetupError","synthetic":false,"types":["wasmtime_jit::instantiate::SetupError"]},{"text":"impl From<InstantiationError> for SetupError","synthetic":false,"types":["wasmtime_jit::instantiate::SetupError"]},{"text":"impl From<Error> for SetupError","synthetic":false,"types":["wasmtime_jit::instantiate::SetupError"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl From<LinkError> for InstantiationError","synthetic":false,"types":["wasmtime_runtime::instance::InstantiationError"]}]; +implementors["yanix"] = [{"text":"impl From<Errno> for YanixError","synthetic":false,"types":["yanix::YanixError"]},{"text":"impl From<NulError> for YanixError","synthetic":false,"types":["yanix::YanixError"]},{"text":"impl From<TryFromIntError> for YanixError","synthetic":false,"types":["yanix::YanixError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/convert/trait.TryFrom.js b/api/implementors/core/convert/trait.TryFrom.js new file mode 100644 index 000000000000..10a1690ee111 --- /dev/null +++ b/api/implementors/core/convert/trait.TryFrom.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_interface_types"] = [{"text":"impl TryFrom<Value> for String","synthetic":false,"types":["alloc::string::String"]},{"text":"impl TryFrom<Value> for i32","synthetic":false,"types":[]},{"text":"impl TryFrom<Value> for u32","synthetic":false,"types":[]},{"text":"impl TryFrom<Value> for i64","synthetic":false,"types":[]},{"text":"impl TryFrom<Value> for u64","synthetic":false,"types":[]},{"text":"impl TryFrom<Value> for f32","synthetic":false,"types":[]},{"text":"impl TryFrom<Value> for f64","synthetic":false,"types":[]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/default/trait.Default.js b/api/implementors/core/default/trait.Default.js new file mode 100644 index 000000000000..f1669198a58c --- /dev/null +++ b/api/implementors/core/default/trait.Default.js @@ -0,0 +1,6 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl Default for TranslatedModule","synthetic":false,"types":["lightbeam::module::TranslatedModule"]}]; +implementors["wasmtime"] = [{"text":"impl Default for Config","synthetic":false,"types":["wasmtime::runtime::Config"]},{"text":"impl Default for Engine","synthetic":false,"types":["wasmtime::runtime::Engine"]},{"text":"impl Default for Store","synthetic":false,"types":["wasmtime::runtime::Store"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Default for Tunables","synthetic":false,"types":["wasmtime_environ::tunables::Tunables"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl Default for TrapRegistry","synthetic":false,"types":["wasmtime_runtime::trap_registry::TrapRegistry"]},{"text":"impl Default for VMSharedSignatureIndex","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]},{"text":"impl Default for VMCallerCheckedAnyfunc","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMCallerCheckedAnyfunc"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/fmt/trait.Binary.js b/api/implementors/core/fmt/trait.Binary.js new file mode 100644 index 000000000000..8d9dde06b923 --- /dev/null +++ b/api/implementors/core/fmt/trait.Binary.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl Binary for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl Binary for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl Binary for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl Binary for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl Binary for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl Binary for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/fmt/trait.Debug.js b/api/implementors/core/fmt/trait.Debug.js new file mode 100644 index 000000000000..97d3264b4fa8 --- /dev/null +++ b/api/implementors/core/fmt/trait.Debug.js @@ -0,0 +1,12 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl Debug for ExecutionError","synthetic":false,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl Debug for WasiCtx","synthetic":false,"types":["wasi_common::ctx::WasiCtx"]},{"text":"impl Debug for Error","synthetic":false,"types":["wasi_common::error::Error"]},{"text":"impl Debug for WasiCtx","synthetic":false,"types":["wasi_common::old::snapshot_0::ctx::WasiCtx"]},{"text":"impl Debug for __wasi_dirent_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl Debug for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl Debug for __wasi_filestat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl Debug for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Debug for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl Debug for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Debug for __wasi_iovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl Debug for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl Debug for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Debug for __wasi_dirent_t","synthetic":false,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl Debug for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl Debug for __wasi_filestat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl Debug for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Debug for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl Debug for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Debug for __wasi_iovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl Debug for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl Debug for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]}]; +implementors["wasmtime"] = [{"text":"impl Debug for FrameInfo","synthetic":false,"types":["wasmtime::frame_info::FrameInfo"]},{"text":"impl Debug for Func","synthetic":false,"types":["wasmtime::func::Func"]},{"text":"impl Debug for AnyRef","synthetic":false,"types":["wasmtime::ref::AnyRef"]},{"text":"impl<T: Debug> Debug for HostRef<T>","synthetic":false,"types":["wasmtime::ref::HostRef"]},{"text":"impl Debug for Config","synthetic":false,"types":["wasmtime::runtime::Config"]},{"text":"impl Debug for Strategy","synthetic":false,"types":["wasmtime::runtime::Strategy"]},{"text":"impl Debug for OptLevel","synthetic":false,"types":["wasmtime::runtime::OptLevel"]},{"text":"impl Debug for Trap","synthetic":false,"types":["wasmtime::trap::Trap"]},{"text":"impl Debug for Mutability","synthetic":false,"types":["wasmtime::types::Mutability"]},{"text":"impl Debug for Limits","synthetic":false,"types":["wasmtime::types::Limits"]},{"text":"impl Debug for ValType","synthetic":false,"types":["wasmtime::types::ValType"]},{"text":"impl Debug for ExternType","synthetic":false,"types":["wasmtime::types::ExternType"]},{"text":"impl Debug for FuncType","synthetic":false,"types":["wasmtime::types::FuncType"]},{"text":"impl Debug for GlobalType","synthetic":false,"types":["wasmtime::types::GlobalType"]},{"text":"impl Debug for TableType","synthetic":false,"types":["wasmtime::types::TableType"]},{"text":"impl Debug for MemoryType","synthetic":false,"types":["wasmtime::types::MemoryType"]},{"text":"impl Debug for ImportType","synthetic":false,"types":["wasmtime::types::ImportType"]},{"text":"impl Debug for ExportType","synthetic":false,"types":["wasmtime::types::ExportType"]},{"text":"impl Debug for Val","synthetic":false,"types":["wasmtime::values::Val"]}]; +implementors["wasmtime_debug"] = [{"text":"impl Debug for WasmFileInfo","synthetic":false,"types":["wasmtime_debug::read_debuginfo::WasmFileInfo"]},{"text":"impl<'a> Debug for DebugInfoData<'a>","synthetic":false,"types":["wasmtime_debug::read_debuginfo::DebugInfoData"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Debug for InstructionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl Debug for FunctionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl Debug for ModuleMemoryOffset","synthetic":false,"types":["wasmtime_environ::address_map::ModuleMemoryOffset"]},{"text":"impl Debug for ModuleVmctxInfo","synthetic":false,"types":["wasmtime_environ::address_map::ModuleVmctxInfo"]},{"text":"impl Debug for CompiledFunctionUnwindInfoReloc","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl Debug for CompiledFunctionUnwindInfo","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl Debug for CompiledFunction","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl Debug for Compilation","synthetic":false,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl Debug for Relocation","synthetic":false,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl Debug for RelocationTarget","synthetic":false,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl Debug for TrapInformation","synthetic":false,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl Debug for CompileError","synthetic":false,"types":["wasmtime_environ::compilation::CompileError"]},{"text":"impl Debug for TableElements","synthetic":false,"types":["wasmtime_environ::module::TableElements"]},{"text":"impl Debug for Export","synthetic":false,"types":["wasmtime_environ::module::Export"]},{"text":"impl Debug for MemoryStyle","synthetic":false,"types":["wasmtime_environ::module::MemoryStyle"]},{"text":"impl Debug for MemoryPlan","synthetic":false,"types":["wasmtime_environ::module::MemoryPlan"]},{"text":"impl Debug for TableStyle","synthetic":false,"types":["wasmtime_environ::module::TableStyle"]},{"text":"impl Debug for TablePlan","synthetic":false,"types":["wasmtime_environ::module::TablePlan"]},{"text":"impl Debug for Module","synthetic":false,"types":["wasmtime_environ::module::Module"]},{"text":"impl Debug for TargetSharedSignatureIndex","synthetic":false,"types":["wasmtime_environ::vmoffsets::TargetSharedSignatureIndex"]},{"text":"impl Debug for CacheConfig","synthetic":false,"types":["wasmtime_environ::cache::config::CacheConfig"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl Debug for ApiCall","synthetic":false,"types":["wasmtime_fuzzing::generators::api::ApiCall"]},{"text":"impl Debug for ApiCalls","synthetic":false,"types":["wasmtime_fuzzing::generators::api::ApiCalls"]},{"text":"impl Debug for WasmOptTtf","synthetic":false,"types":["wasmtime_fuzzing::generators::WasmOptTtf"]},{"text":"impl Debug for DifferentialConfig","synthetic":false,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]},{"text":"impl Debug for DummyFunc","synthetic":false,"types":["wasmtime_fuzzing::oracles::dummy::DummyFunc"]}]; +implementors["wasmtime_interface_types"] = [{"text":"impl Debug for Value","synthetic":false,"types":["wasmtime_interface_types::value::Value"]}]; +implementors["wasmtime_jit"] = [{"text":"impl Debug for CompilationStrategy","synthetic":false,"types":["wasmtime_jit::compiler::CompilationStrategy"]},{"text":"impl Debug for SetupError","synthetic":false,"types":["wasmtime_jit::instantiate::SetupError"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl Debug for Export","synthetic":false,"types":["wasmtime_runtime::export::Export"]},{"text":"impl Debug for LinkError","synthetic":false,"types":["wasmtime_runtime::instance::LinkError"]},{"text":"impl Debug for InstantiationError","synthetic":false,"types":["wasmtime_runtime::instance::InstantiationError"]},{"text":"impl Debug for Mmap","synthetic":false,"types":["wasmtime_runtime::mmap::Mmap"]},{"text":"impl Debug for SignatureRegistry","synthetic":false,"types":["wasmtime_runtime::sig_registry::SignatureRegistry"]},{"text":"impl Debug for TrapDescription","synthetic":false,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl Debug for Trap","synthetic":false,"types":["wasmtime_runtime::traphandlers::Trap"]},{"text":"impl Debug for VMFunctionImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMFunctionImport"]},{"text":"impl Debug for VMTableImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMTableImport"]},{"text":"impl Debug for VMMemoryImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMMemoryImport"]},{"text":"impl Debug for VMGlobalImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMGlobalImport"]},{"text":"impl Debug for VMMemoryDefinition","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMMemoryDefinition"]},{"text":"impl Debug for VMTableDefinition","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMTableDefinition"]},{"text":"impl Debug for VMGlobalDefinition","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMGlobalDefinition"]},{"text":"impl Debug for VMSharedSignatureIndex","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]},{"text":"impl Debug for VMCallerCheckedAnyfunc","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMCallerCheckedAnyfunc"]},{"text":"impl Debug for VMInvokeArgument","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMInvokeArgument"]},{"text":"impl Debug for VMContext","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMContext"]}]; +implementors["yanix"] = [{"text":"impl Debug for ClockId","synthetic":false,"types":["yanix::clock::ClockId"]},{"text":"impl Debug for Dir","synthetic":false,"types":["yanix::dir::Dir"]},{"text":"impl Debug for Entry","synthetic":false,"types":["yanix::dir::Entry"]},{"text":"impl Debug for SeekLoc","synthetic":false,"types":["yanix::dir::SeekLoc"]},{"text":"impl Debug for FileType","synthetic":false,"types":["yanix::dir::FileType"]},{"text":"impl<T: Debug + Deref<Target = Dir>> Debug for DirIter<T>","synthetic":false,"types":["yanix::dir::DirIter"]},{"text":"impl Debug for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl Debug for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl Debug for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl Debug for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl Debug for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl Debug for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]},{"text":"impl Debug for PollFd","synthetic":false,"types":["yanix::poll::PollFd"]},{"text":"impl Debug for SockType","synthetic":false,"types":["yanix::socket::SockType"]},{"text":"impl Debug for Errno","synthetic":false,"types":["yanix::errno::Errno"]},{"text":"impl Debug for PosixFadviseAdvice","synthetic":false,"types":["yanix::sys::linux::fadvise::PosixFadviseAdvice"]},{"text":"impl Debug for YanixError","synthetic":false,"types":["yanix::YanixError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/fmt/trait.Display.js b/api/implementors/core/fmt/trait.Display.js new file mode 100644 index 000000000000..7e6e288b7f8a --- /dev/null +++ b/api/implementors/core/fmt/trait.Display.js @@ -0,0 +1,10 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl Display for ExecutionError","synthetic":false,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl Display for Error","synthetic":false,"types":["wasi_common::error::Error"]}]; +implementors["wasmtime"] = [{"text":"impl Display for Trap","synthetic":false,"types":["wasmtime::trap::Trap"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Display for CompileError","synthetic":false,"types":["wasmtime_environ::compilation::CompileError"]}]; +implementors["wasmtime_interface_types"] = [{"text":"impl Display for Value","synthetic":false,"types":["wasmtime_interface_types::value::Value"]}]; +implementors["wasmtime_jit"] = [{"text":"impl Display for SetupError","synthetic":false,"types":["wasmtime_jit::instantiate::SetupError"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl Display for LinkError","synthetic":false,"types":["wasmtime_runtime::instance::LinkError"]},{"text":"impl Display for InstantiationError","synthetic":false,"types":["wasmtime_runtime::instance::InstantiationError"]},{"text":"impl Display for TrapDescription","synthetic":false,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl Display for Trap","synthetic":false,"types":["wasmtime_runtime::traphandlers::Trap"]}]; +implementors["yanix"] = [{"text":"impl Display for Errno","synthetic":false,"types":["yanix::errno::Errno"]},{"text":"impl Display for YanixError","synthetic":false,"types":["yanix::YanixError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/fmt/trait.LowerHex.js b/api/implementors/core/fmt/trait.LowerHex.js new file mode 100644 index 000000000000..991eb1271065 --- /dev/null +++ b/api/implementors/core/fmt/trait.LowerHex.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl LowerHex for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl LowerHex for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl LowerHex for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl LowerHex for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl LowerHex for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl LowerHex for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/fmt/trait.Octal.js b/api/implementors/core/fmt/trait.Octal.js new file mode 100644 index 000000000000..2ade2f34d282 --- /dev/null +++ b/api/implementors/core/fmt/trait.Octal.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl Octal for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl Octal for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl Octal for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl Octal for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl Octal for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl Octal for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/fmt/trait.UpperHex.js b/api/implementors/core/fmt/trait.UpperHex.js new file mode 100644 index 000000000000..21ff8d6c87f2 --- /dev/null +++ b/api/implementors/core/fmt/trait.UpperHex.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl UpperHex for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl UpperHex for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl UpperHex for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl UpperHex for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl UpperHex for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl UpperHex for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/hash/trait.Hash.js b/api/implementors/core/hash/trait.Hash.js new file mode 100644 index 000000000000..ebd2bfdaefab --- /dev/null +++ b/api/implementors/core/hash/trait.Hash.js @@ -0,0 +1,7 @@ +(function() {var implementors = {}; +implementors["wasi_common"] = [{"text":"impl Hash for FileType","synthetic":false,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl Hash for __wasi_dirent_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl Hash for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl Hash for __wasi_filestat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl Hash for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Hash for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl Hash for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Hash for __wasi_iovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl Hash for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl Hash for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Hash for __wasi_dirent_t","synthetic":false,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl Hash for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl Hash for __wasi_filestat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl Hash for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Hash for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl Hash for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Hash for __wasi_iovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl Hash for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl Hash for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Hash for TableElements","synthetic":false,"types":["wasmtime_environ::module::TableElements"]},{"text":"impl Hash for Export","synthetic":false,"types":["wasmtime_environ::module::Export"]},{"text":"impl Hash for MemoryStyle","synthetic":false,"types":["wasmtime_environ::module::MemoryStyle"]},{"text":"impl Hash for MemoryPlan","synthetic":false,"types":["wasmtime_environ::module::MemoryPlan"]},{"text":"impl Hash for TableStyle","synthetic":false,"types":["wasmtime_environ::module::TableStyle"]},{"text":"impl Hash for TablePlan","synthetic":false,"types":["wasmtime_environ::module::TablePlan"]},{"text":"impl<'a> Hash for FunctionBodyData<'a>","synthetic":false,"types":["wasmtime_environ::module_environ::FunctionBodyData"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl Hash for DifferentialConfig","synthetic":false,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl Hash for InstanceHandle","synthetic":false,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl Hash for VMSharedSignatureIndex","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]}]; +implementors["yanix"] = [{"text":"impl Hash for Dir","synthetic":false,"types":["yanix::dir::Dir"]},{"text":"impl Hash for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl Hash for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl Hash for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl Hash for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl Hash for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl Hash for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]},{"text":"impl Hash for PollFd","synthetic":false,"types":["yanix::poll::PollFd"]},{"text":"impl Hash for Errno","synthetic":false,"types":["yanix::errno::Errno"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/iter/traits/collect/trait.Extend.js b/api/implementors/core/iter/traits/collect/trait.Extend.js new file mode 100644 index 000000000000..537ec9bbc6ee --- /dev/null +++ b/api/implementors/core/iter/traits/collect/trait.Extend.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl Extend<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl Extend<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl Extend<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl Extend<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl Extend<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl Extend<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/iter/traits/collect/trait.FromIterator.js b/api/implementors/core/iter/traits/collect/trait.FromIterator.js new file mode 100644 index 000000000000..b1f49c64d642 --- /dev/null +++ b/api/implementors/core/iter/traits/collect/trait.FromIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl FromIterator<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl FromIterator<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl FromIterator<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl FromIterator<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl FromIterator<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl FromIterator<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/iter/traits/collect/trait.IntoIterator.js b/api/implementors/core/iter/traits/collect/trait.IntoIterator.js new file mode 100644 index 000000000000..0c85f366bb51 --- /dev/null +++ b/api/implementors/core/iter/traits/collect/trait.IntoIterator.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_environ"] = [{"text":"impl<'a> IntoIterator for &'a Compilation","synthetic":false,"types":["wasmtime_environ::compilation::Compilation"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/iter/traits/iterator/trait.Iterator.js b/api/implementors/core/iter/traits/iterator/trait.Iterator.js new file mode 100644 index 000000000000..41c9a317f9fd --- /dev/null +++ b/api/implementors/core/iter/traits/iterator/trait.Iterator.js @@ -0,0 +1,4 @@ +(function() {var implementors = {}; +implementors["wasi_common"] = [{"text":"impl Iterator for ReadDir","synthetic":false,"types":["wasi_common::fs::readdir::ReadDir"]}]; +implementors["yanix"] = [{"text":"impl<T> Iterator for DirIter<T> where
    T: Deref<Target = Dir>, 
","synthetic":false,"types":["yanix::dir::DirIter"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/marker/trait.Copy.js b/api/implementors/core/marker/trait.Copy.js new file mode 100644 index 000000000000..465d75d31886 --- /dev/null +++ b/api/implementors/core/marker/trait.Copy.js @@ -0,0 +1,9 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl Copy for ExecutionError","synthetic":false,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl Copy for FileType","synthetic":false,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl Copy for __wasi_dirent_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl Copy for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl Copy for __wasi_filestat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl Copy for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Copy for __wasi_event_u_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_u_t"]},{"text":"impl Copy for __wasi_event_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_t"]},{"text":"impl Copy for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl Copy for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Copy for __wasi_subscription_u_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_u_t"]},{"text":"impl Copy for __wasi_subscription_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_t"]},{"text":"impl Copy for __wasi_iovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl Copy for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl Copy for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Copy for __wasi_prestat_u_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_u_t"]},{"text":"impl Copy for __wasi_prestat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_t"]},{"text":"impl Copy for __wasi_dirent_t","synthetic":false,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl Copy for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl Copy for __wasi_filestat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl Copy for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Copy for __wasi_event_u_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_u_t"]},{"text":"impl Copy for __wasi_event_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_t"]},{"text":"impl Copy for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl Copy for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Copy for __wasi_subscription_u_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_u_t"]},{"text":"impl Copy for __wasi_subscription_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_t"]},{"text":"impl Copy for __wasi_iovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl Copy for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl Copy for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Copy for __wasi_prestat_u_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_u_t"]},{"text":"impl Copy for __wasi_prestat_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_t"]}]; +implementors["wasmtime"] = [{"text":"impl Copy for Mutability","synthetic":false,"types":["wasmtime::types::Mutability"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Copy for RelocationTarget","synthetic":false,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl Copy for TargetSharedSignatureIndex","synthetic":false,"types":["wasmtime_environ::vmoffsets::TargetSharedSignatureIndex"]}]; +implementors["wasmtime_jit"] = [{"text":"impl Copy for CompilationStrategy","synthetic":false,"types":["wasmtime_jit::compiler::CompilationStrategy"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl Copy for TrapDescription","synthetic":false,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl Copy for VMFunctionImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMFunctionImport"]},{"text":"impl Copy for VMTableImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMTableImport"]},{"text":"impl Copy for VMMemoryImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMMemoryImport"]},{"text":"impl Copy for VMGlobalImport","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMGlobalImport"]},{"text":"impl Copy for VMMemoryDefinition","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMMemoryDefinition"]},{"text":"impl Copy for VMTableDefinition","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMTableDefinition"]},{"text":"impl Copy for VMGlobalDefinition","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMGlobalDefinition"]},{"text":"impl Copy for VMSharedSignatureIndex","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]},{"text":"impl Copy for VMInvokeArgument","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMInvokeArgument"]}]; +implementors["yanix"] = [{"text":"impl Copy for ClockId","synthetic":false,"types":["yanix::clock::ClockId"]},{"text":"impl Copy for Entry","synthetic":false,"types":["yanix::dir::Entry"]},{"text":"impl Copy for SeekLoc","synthetic":false,"types":["yanix::dir::SeekLoc"]},{"text":"impl Copy for FileType","synthetic":false,"types":["yanix::dir::FileType"]},{"text":"impl Copy for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl Copy for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl Copy for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl Copy for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl Copy for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl Copy for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]},{"text":"impl Copy for PollFd","synthetic":false,"types":["yanix::poll::PollFd"]},{"text":"impl Copy for SockType","synthetic":false,"types":["yanix::socket::SockType"]},{"text":"impl Copy for Errno","synthetic":false,"types":["yanix::errno::Errno"]},{"text":"impl Copy for PosixFadviseAdvice","synthetic":false,"types":["yanix::sys::linux::fadvise::PosixFadviseAdvice"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/marker/trait.Freeze.js b/api/implementors/core/marker/trait.Freeze.js new file mode 100644 index 000000000000..480fb31bdd07 --- /dev/null +++ b/api/implementors/core/marker/trait.Freeze.js @@ -0,0 +1,14 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl<'module, M> Freeze for CodeGenSession<'module, M>","synthetic":true,"types":["lightbeam::backend::CodeGenSession"]},{"text":"impl Freeze for ExecutableModule","synthetic":true,"types":["lightbeam::module::ExecutableModule"]},{"text":"impl Freeze for TranslatedModule","synthetic":true,"types":["lightbeam::module::TranslatedModule"]},{"text":"impl Freeze for ExecutionError","synthetic":true,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl Freeze for WasiCtx","synthetic":true,"types":["wasi_common::ctx::WasiCtx"]},{"text":"impl Freeze for WasiCtxBuilder","synthetic":true,"types":["wasi_common::ctx::WasiCtxBuilder"]},{"text":"impl Freeze for Error","synthetic":true,"types":["wasi_common::error::Error"]},{"text":"impl<'ctx> Freeze for Dir<'ctx>","synthetic":true,"types":["wasi_common::fs::dir::Dir"]},{"text":"impl Freeze for DirBuilder","synthetic":true,"types":["wasi_common::fs::dir_builder::DirBuilder"]},{"text":"impl Freeze for DirEntry","synthetic":true,"types":["wasi_common::fs::dir_entry::DirEntry"]},{"text":"impl<'ctx> Freeze for File<'ctx>","synthetic":true,"types":["wasi_common::fs::file::File"]},{"text":"impl Freeze for FileType","synthetic":true,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl Freeze for Metadata","synthetic":true,"types":["wasi_common::fs::metadata::Metadata"]},{"text":"impl Freeze for OpenOptions","synthetic":true,"types":["wasi_common::fs::open_options::OpenOptions"]},{"text":"impl Freeze for Permissions","synthetic":true,"types":["wasi_common::fs::permissions::Permissions"]},{"text":"impl Freeze for ReadDir","synthetic":true,"types":["wasi_common::fs::readdir::ReadDir"]},{"text":"impl Freeze for WasiCtx","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtx"]},{"text":"impl Freeze for WasiCtxBuilder","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtxBuilder"]},{"text":"impl Freeze for __wasi_dirent_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl Freeze for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl Freeze for __wasi_filestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl Freeze for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Freeze for __wasi_event_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_t"]},{"text":"impl Freeze for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl Freeze for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Freeze for __wasi_subscription_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_t"]},{"text":"impl Freeze for __wasi_event_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_u_t"]},{"text":"impl Freeze for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_u_t"]},{"text":"impl Freeze for __wasi_iovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl Freeze for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl Freeze for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Freeze for __wasi_prestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_t"]},{"text":"impl Freeze for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_u_t"]},{"text":"impl Freeze for __wasi_dirent_t","synthetic":true,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl Freeze for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl Freeze for __wasi_filestat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl Freeze for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Freeze for __wasi_event_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_t"]},{"text":"impl Freeze for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl Freeze for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Freeze for __wasi_subscription_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_t"]},{"text":"impl Freeze for __wasi_event_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_u_t"]},{"text":"impl Freeze for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_u_t"]},{"text":"impl Freeze for __wasi_iovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl Freeze for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl Freeze for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Freeze for __wasi_prestat_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_t"]},{"text":"impl Freeze for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_u_t"]}]; +implementors["wasmtime"] = [{"text":"impl Freeze for Global","synthetic":true,"types":["wasmtime::externals::Global"]},{"text":"impl Freeze for Table","synthetic":true,"types":["wasmtime::externals::Table"]},{"text":"impl Freeze for Memory","synthetic":true,"types":["wasmtime::externals::Memory"]},{"text":"impl Freeze for FrameInfo","synthetic":true,"types":["wasmtime::frame_info::FrameInfo"]},{"text":"impl Freeze for Func","synthetic":true,"types":["wasmtime::func::Func"]},{"text":"impl Freeze for Instance","synthetic":true,"types":["wasmtime::instance::Instance"]},{"text":"impl Freeze for Module","synthetic":true,"types":["wasmtime::module::Module"]},{"text":"impl<T> Freeze for HostRef<T>","synthetic":true,"types":["wasmtime::ref::HostRef"]},{"text":"impl Freeze for Config","synthetic":true,"types":["wasmtime::runtime::Config"]},{"text":"impl Freeze for Engine","synthetic":true,"types":["wasmtime::runtime::Engine"]},{"text":"impl Freeze for Store","synthetic":true,"types":["wasmtime::runtime::Store"]},{"text":"impl Freeze for Trap","synthetic":true,"types":["wasmtime::trap::Trap"]},{"text":"impl Freeze for Limits","synthetic":true,"types":["wasmtime::types::Limits"]},{"text":"impl Freeze for FuncType","synthetic":true,"types":["wasmtime::types::FuncType"]},{"text":"impl Freeze for GlobalType","synthetic":true,"types":["wasmtime::types::GlobalType"]},{"text":"impl Freeze for TableType","synthetic":true,"types":["wasmtime::types::TableType"]},{"text":"impl Freeze for MemoryType","synthetic":true,"types":["wasmtime::types::MemoryType"]},{"text":"impl Freeze for ImportType","synthetic":true,"types":["wasmtime::types::ImportType"]},{"text":"impl Freeze for ExportType","synthetic":true,"types":["wasmtime::types::ExportType"]},{"text":"impl Freeze for Extern","synthetic":true,"types":["wasmtime::externals::Extern"]},{"text":"impl Freeze for AnyRef","synthetic":true,"types":["wasmtime::ref::AnyRef"]},{"text":"impl Freeze for OptLevel","synthetic":true,"types":["wasmtime::runtime::OptLevel"]},{"text":"impl Freeze for Strategy","synthetic":true,"types":["wasmtime::runtime::Strategy"]},{"text":"impl Freeze for Mutability","synthetic":true,"types":["wasmtime::types::Mutability"]},{"text":"impl Freeze for ValType","synthetic":true,"types":["wasmtime::types::ValType"]},{"text":"impl Freeze for ExternType","synthetic":true,"types":["wasmtime::types::ExternType"]},{"text":"impl Freeze for Val","synthetic":true,"types":["wasmtime::values::Val"]}]; +implementors["wasmtime_debug"] = [{"text":"impl<'a> Freeze for DebugInfoData<'a>","synthetic":true,"types":["wasmtime_debug::read_debuginfo::DebugInfoData"]},{"text":"impl Freeze for WasmFileInfo","synthetic":true,"types":["wasmtime_debug::read_debuginfo::WasmFileInfo"]},{"text":"impl Freeze for ResolvedSymbol","synthetic":true,"types":["wasmtime_debug::write_debuginfo::ResolvedSymbol"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Freeze for FunctionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl Freeze for InstructionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl Freeze for ModuleVmctxInfo","synthetic":true,"types":["wasmtime_environ::address_map::ModuleVmctxInfo"]},{"text":"impl Freeze for CacheConfig","synthetic":true,"types":["wasmtime_environ::cache::config::CacheConfig"]},{"text":"impl Freeze for Compilation","synthetic":true,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl Freeze for CompiledFunction","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl Freeze for CompiledFunctionUnwindInfoReloc","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl Freeze for Relocation","synthetic":true,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl Freeze for TrapInformation","synthetic":true,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl Freeze for BuiltinFunctionIndex","synthetic":true,"types":["wasmtime_environ::func_environ::BuiltinFunctionIndex"]},{"text":"impl Freeze for MemoryPlan","synthetic":true,"types":["wasmtime_environ::module::MemoryPlan"]},{"text":"impl Freeze for Module","synthetic":true,"types":["wasmtime_environ::module::Module"]},{"text":"impl Freeze for TableElements","synthetic":true,"types":["wasmtime_environ::module::TableElements"]},{"text":"impl Freeze for TablePlan","synthetic":true,"types":["wasmtime_environ::module::TablePlan"]},{"text":"impl<'data> Freeze for DataInitializer<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializer"]},{"text":"impl Freeze for DataInitializerLocation","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializerLocation"]},{"text":"impl<'a> Freeze for FunctionBodyData<'a>","synthetic":true,"types":["wasmtime_environ::module_environ::FunctionBodyData"]},{"text":"impl<'data> Freeze for ModuleEnvironment<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleEnvironment"]},{"text":"impl<'data> Freeze for ModuleTranslation<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleTranslation"]},{"text":"impl Freeze for Tunables","synthetic":true,"types":["wasmtime_environ::tunables::Tunables"]},{"text":"impl Freeze for TargetSharedSignatureIndex","synthetic":true,"types":["wasmtime_environ::vmoffsets::TargetSharedSignatureIndex"]},{"text":"impl Freeze for VMOffsets","synthetic":true,"types":["wasmtime_environ::vmoffsets::VMOffsets"]},{"text":"impl Freeze for ModuleMemoryOffset","synthetic":true,"types":["wasmtime_environ::address_map::ModuleMemoryOffset"]},{"text":"impl Freeze for CompileError","synthetic":true,"types":["wasmtime_environ::compilation::CompileError"]},{"text":"impl Freeze for CompiledFunctionUnwindInfo","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl Freeze for RelocationTarget","synthetic":true,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl Freeze for Export","synthetic":true,"types":["wasmtime_environ::module::Export"]},{"text":"impl Freeze for MemoryStyle","synthetic":true,"types":["wasmtime_environ::module::MemoryStyle"]},{"text":"impl Freeze for TableStyle","synthetic":true,"types":["wasmtime_environ::module::TableStyle"]},{"text":"impl Freeze for RelocSink","synthetic":true,"types":["wasmtime_environ::cranelift::RelocSink"]},{"text":"impl Freeze for Cranelift","synthetic":true,"types":["wasmtime_environ::cranelift::Cranelift"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl Freeze for WasmOptTtf","synthetic":true,"types":["wasmtime_fuzzing::generators::WasmOptTtf"]},{"text":"impl Freeze for DifferentialConfig","synthetic":true,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]},{"text":"impl Freeze for ApiCalls","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCalls"]},{"text":"impl Freeze for ApiCall","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCall"]},{"text":"impl Freeze for DummyFunc","synthetic":true,"types":["wasmtime_fuzzing::oracles::dummy::DummyFunc"]}]; +implementors["wasmtime_interface_types"] = [{"text":"impl Freeze for ModuleData","synthetic":true,"types":["wasmtime_interface_types::ModuleData"]},{"text":"impl<'a> Freeze for ExportBinding<'a>","synthetic":true,"types":["wasmtime_interface_types::ExportBinding"]},{"text":"impl Freeze for Value","synthetic":true,"types":["wasmtime_interface_types::value::Value"]}]; +implementors["wasmtime_jit"] = [{"text":"impl Freeze for CodeMemory","synthetic":true,"types":["wasmtime_jit::code_memory::CodeMemory"]},{"text":"impl !Freeze for Compiler","synthetic":true,"types":["wasmtime_jit::compiler::Compiler"]},{"text":"impl Freeze for CompiledModule","synthetic":true,"types":["wasmtime_jit::instantiate::CompiledModule"]},{"text":"impl Freeze for NullResolver","synthetic":true,"types":["wasmtime_jit::resolver::NullResolver"]},{"text":"impl Freeze for CompilationStrategy","synthetic":true,"types":["wasmtime_jit::compiler::CompilationStrategy"]},{"text":"impl Freeze for SetupError","synthetic":true,"types":["wasmtime_jit::instantiate::SetupError"]},{"text":"impl Freeze for TrampolineRelocSink","synthetic":true,"types":["wasmtime_jit::trampoline::binemit::TrampolineRelocSink"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl Freeze for Imports","synthetic":true,"types":["wasmtime_runtime::imports::Imports"]},{"text":"impl Freeze for InstanceHandle","synthetic":true,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl Freeze for LinkError","synthetic":true,"types":["wasmtime_runtime::instance::LinkError"]},{"text":"impl Freeze for GdbJitImageRegistration","synthetic":true,"types":["wasmtime_runtime::jit_int::GdbJitImageRegistration"]},{"text":"impl Freeze for Mmap","synthetic":true,"types":["wasmtime_runtime::mmap::Mmap"]},{"text":"impl !Freeze for SignatureRegistry","synthetic":true,"types":["wasmtime_runtime::sig_registry::SignatureRegistry"]},{"text":"impl Freeze for TrapDescription","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl Freeze for TrapRegistration","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistration"]},{"text":"impl Freeze for TrapRegistry","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistry"]},{"text":"impl Freeze for VMCallerCheckedAnyfunc","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMCallerCheckedAnyfunc"]},{"text":"impl Freeze for VMContext","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMContext"]},{"text":"impl Freeze for VMFunctionBody","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionBody"]},{"text":"impl Freeze for VMFunctionImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionImport"]},{"text":"impl Freeze for VMGlobalDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalDefinition"]},{"text":"impl Freeze for VMGlobalImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalImport"]},{"text":"impl Freeze for VMInvokeArgument","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMInvokeArgument"]},{"text":"impl Freeze for VMMemoryDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryDefinition"]},{"text":"impl Freeze for VMMemoryImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryImport"]},{"text":"impl Freeze for VMSharedSignatureIndex","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]},{"text":"impl Freeze for VMTableDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableDefinition"]},{"text":"impl Freeze for VMTableImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableImport"]},{"text":"impl Freeze for Export","synthetic":true,"types":["wasmtime_runtime::export::Export"]},{"text":"impl Freeze for InstantiationError","synthetic":true,"types":["wasmtime_runtime::instance::InstantiationError"]},{"text":"impl Freeze for Trap","synthetic":true,"types":["wasmtime_runtime::traphandlers::Trap"]}]; +implementors["wasmtime_wasi"] = [{"text":"impl Freeze for Wasi","synthetic":true,"types":["wasmtime_wasi::Wasi"]},{"text":"impl Freeze for Wasi","synthetic":true,"types":["wasmtime_wasi::old::snapshot_0::Wasi"]}]; +implementors["wasmtime_wast"] = [{"text":"impl Freeze for WastContext","synthetic":true,"types":["wasmtime_wast::wast::WastContext"]}]; +implementors["yanix"] = [{"text":"impl Freeze for Errno","synthetic":true,"types":["yanix::errno::Errno"]},{"text":"impl Freeze for YanixError","synthetic":true,"types":["yanix::YanixError"]},{"text":"impl Freeze for ClockId","synthetic":true,"types":["yanix::clock::ClockId"]},{"text":"impl Freeze for Dir","synthetic":true,"types":["yanix::dir::Dir"]},{"text":"impl Freeze for Entry","synthetic":true,"types":["yanix::dir::Entry"]},{"text":"impl Freeze for SeekLoc","synthetic":true,"types":["yanix::dir::SeekLoc"]},{"text":"impl<T> Freeze for DirIter<T> where
    T: Freeze, 
","synthetic":true,"types":["yanix::dir::DirIter"]},{"text":"impl Freeze for FileType","synthetic":true,"types":["yanix::dir::FileType"]},{"text":"impl Freeze for FdFlag","synthetic":true,"types":["yanix::file::FdFlag"]},{"text":"impl Freeze for AtFlag","synthetic":true,"types":["yanix::file::AtFlag"]},{"text":"impl Freeze for Mode","synthetic":true,"types":["yanix::file::Mode"]},{"text":"impl Freeze for OFlag","synthetic":true,"types":["yanix::file::OFlag"]},{"text":"impl Freeze for SFlag","synthetic":true,"types":["yanix::file::SFlag"]},{"text":"impl Freeze for PollFlags","synthetic":true,"types":["yanix::poll::PollFlags"]},{"text":"impl Freeze for PollFd","synthetic":true,"types":["yanix::poll::PollFd"]},{"text":"impl Freeze for SockType","synthetic":true,"types":["yanix::socket::SockType"]},{"text":"impl Freeze for PosixFadviseAdvice","synthetic":true,"types":["yanix::sys::linux::fadvise::PosixFadviseAdvice"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/marker/trait.Send.js b/api/implementors/core/marker/trait.Send.js new file mode 100644 index 000000000000..e5775c74fd9b --- /dev/null +++ b/api/implementors/core/marker/trait.Send.js @@ -0,0 +1,14 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl<'module, M> !Send for CodeGenSession<'module, M>","synthetic":true,"types":["lightbeam::backend::CodeGenSession"]},{"text":"impl Send for ExecutableModule","synthetic":true,"types":["lightbeam::module::ExecutableModule"]},{"text":"impl Send for TranslatedModule","synthetic":true,"types":["lightbeam::module::TranslatedModule"]},{"text":"impl Send for ExecutionError","synthetic":true,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl Send for WasiCtx","synthetic":true,"types":["wasi_common::ctx::WasiCtx"]},{"text":"impl Send for WasiCtxBuilder","synthetic":true,"types":["wasi_common::ctx::WasiCtxBuilder"]},{"text":"impl Send for Error","synthetic":true,"types":["wasi_common::error::Error"]},{"text":"impl<'ctx> Send for Dir<'ctx>","synthetic":true,"types":["wasi_common::fs::dir::Dir"]},{"text":"impl Send for DirBuilder","synthetic":true,"types":["wasi_common::fs::dir_builder::DirBuilder"]},{"text":"impl Send for DirEntry","synthetic":true,"types":["wasi_common::fs::dir_entry::DirEntry"]},{"text":"impl<'ctx> Send for File<'ctx>","synthetic":true,"types":["wasi_common::fs::file::File"]},{"text":"impl Send for FileType","synthetic":true,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl Send for Metadata","synthetic":true,"types":["wasi_common::fs::metadata::Metadata"]},{"text":"impl Send for OpenOptions","synthetic":true,"types":["wasi_common::fs::open_options::OpenOptions"]},{"text":"impl Send for Permissions","synthetic":true,"types":["wasi_common::fs::permissions::Permissions"]},{"text":"impl Send for ReadDir","synthetic":true,"types":["wasi_common::fs::readdir::ReadDir"]},{"text":"impl Send for WasiCtx","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtx"]},{"text":"impl Send for WasiCtxBuilder","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtxBuilder"]},{"text":"impl Send for __wasi_dirent_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl Send for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl Send for __wasi_filestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl Send for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Send for __wasi_event_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_t"]},{"text":"impl Send for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl Send for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Send for __wasi_subscription_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_t"]},{"text":"impl Send for __wasi_event_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_u_t"]},{"text":"impl Send for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_u_t"]},{"text":"impl Send for __wasi_iovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl Send for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl Send for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Send for __wasi_prestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_t"]},{"text":"impl Send for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_u_t"]},{"text":"impl Send for __wasi_dirent_t","synthetic":true,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl Send for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl Send for __wasi_filestat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl Send for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Send for __wasi_event_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_t"]},{"text":"impl Send for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl Send for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Send for __wasi_subscription_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_t"]},{"text":"impl Send for __wasi_event_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_u_t"]},{"text":"impl Send for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_u_t"]},{"text":"impl Send for __wasi_iovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl Send for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl Send for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Send for __wasi_prestat_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_t"]},{"text":"impl Send for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_u_t"]}]; +implementors["wasmtime"] = [{"text":"impl !Send for Global","synthetic":true,"types":["wasmtime::externals::Global"]},{"text":"impl !Send for Table","synthetic":true,"types":["wasmtime::externals::Table"]},{"text":"impl !Send for Memory","synthetic":true,"types":["wasmtime::externals::Memory"]},{"text":"impl Send for FrameInfo","synthetic":true,"types":["wasmtime::frame_info::FrameInfo"]},{"text":"impl !Send for Func","synthetic":true,"types":["wasmtime::func::Func"]},{"text":"impl !Send for Instance","synthetic":true,"types":["wasmtime::instance::Instance"]},{"text":"impl !Send for Module","synthetic":true,"types":["wasmtime::module::Module"]},{"text":"impl<T> !Send for HostRef<T>","synthetic":true,"types":["wasmtime::ref::HostRef"]},{"text":"impl Send for Config","synthetic":true,"types":["wasmtime::runtime::Config"]},{"text":"impl Send for Engine","synthetic":true,"types":["wasmtime::runtime::Engine"]},{"text":"impl !Send for Store","synthetic":true,"types":["wasmtime::runtime::Store"]},{"text":"impl Send for Trap","synthetic":true,"types":["wasmtime::trap::Trap"]},{"text":"impl Send for Limits","synthetic":true,"types":["wasmtime::types::Limits"]},{"text":"impl Send for FuncType","synthetic":true,"types":["wasmtime::types::FuncType"]},{"text":"impl Send for GlobalType","synthetic":true,"types":["wasmtime::types::GlobalType"]},{"text":"impl Send for TableType","synthetic":true,"types":["wasmtime::types::TableType"]},{"text":"impl Send for MemoryType","synthetic":true,"types":["wasmtime::types::MemoryType"]},{"text":"impl Send for ImportType","synthetic":true,"types":["wasmtime::types::ImportType"]},{"text":"impl Send for ExportType","synthetic":true,"types":["wasmtime::types::ExportType"]},{"text":"impl !Send for Extern","synthetic":true,"types":["wasmtime::externals::Extern"]},{"text":"impl !Send for AnyRef","synthetic":true,"types":["wasmtime::ref::AnyRef"]},{"text":"impl Send for OptLevel","synthetic":true,"types":["wasmtime::runtime::OptLevel"]},{"text":"impl Send for Strategy","synthetic":true,"types":["wasmtime::runtime::Strategy"]},{"text":"impl Send for Mutability","synthetic":true,"types":["wasmtime::types::Mutability"]},{"text":"impl Send for ValType","synthetic":true,"types":["wasmtime::types::ValType"]},{"text":"impl Send for ExternType","synthetic":true,"types":["wasmtime::types::ExternType"]},{"text":"impl !Send for Val","synthetic":true,"types":["wasmtime::values::Val"]}]; +implementors["wasmtime_debug"] = [{"text":"impl<'a> Send for DebugInfoData<'a>","synthetic":true,"types":["wasmtime_debug::read_debuginfo::DebugInfoData"]},{"text":"impl Send for WasmFileInfo","synthetic":true,"types":["wasmtime_debug::read_debuginfo::WasmFileInfo"]},{"text":"impl Send for ResolvedSymbol","synthetic":true,"types":["wasmtime_debug::write_debuginfo::ResolvedSymbol"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Send for FunctionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl Send for InstructionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl Send for ModuleVmctxInfo","synthetic":true,"types":["wasmtime_environ::address_map::ModuleVmctxInfo"]},{"text":"impl Send for CacheConfig","synthetic":true,"types":["wasmtime_environ::cache::config::CacheConfig"]},{"text":"impl Send for Compilation","synthetic":true,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl Send for CompiledFunction","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl Send for CompiledFunctionUnwindInfoReloc","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl Send for Relocation","synthetic":true,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl Send for TrapInformation","synthetic":true,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl Send for BuiltinFunctionIndex","synthetic":true,"types":["wasmtime_environ::func_environ::BuiltinFunctionIndex"]},{"text":"impl Send for MemoryPlan","synthetic":true,"types":["wasmtime_environ::module::MemoryPlan"]},{"text":"impl Send for Module","synthetic":true,"types":["wasmtime_environ::module::Module"]},{"text":"impl Send for TableElements","synthetic":true,"types":["wasmtime_environ::module::TableElements"]},{"text":"impl Send for TablePlan","synthetic":true,"types":["wasmtime_environ::module::TablePlan"]},{"text":"impl<'data> Send for DataInitializer<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializer"]},{"text":"impl Send for DataInitializerLocation","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializerLocation"]},{"text":"impl<'a> Send for FunctionBodyData<'a>","synthetic":true,"types":["wasmtime_environ::module_environ::FunctionBodyData"]},{"text":"impl<'data> Send for ModuleEnvironment<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleEnvironment"]},{"text":"impl<'data> Send for ModuleTranslation<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleTranslation"]},{"text":"impl Send for Tunables","synthetic":true,"types":["wasmtime_environ::tunables::Tunables"]},{"text":"impl Send for TargetSharedSignatureIndex","synthetic":true,"types":["wasmtime_environ::vmoffsets::TargetSharedSignatureIndex"]},{"text":"impl Send for VMOffsets","synthetic":true,"types":["wasmtime_environ::vmoffsets::VMOffsets"]},{"text":"impl Send for ModuleMemoryOffset","synthetic":true,"types":["wasmtime_environ::address_map::ModuleMemoryOffset"]},{"text":"impl Send for CompileError","synthetic":true,"types":["wasmtime_environ::compilation::CompileError"]},{"text":"impl Send for CompiledFunctionUnwindInfo","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl Send for RelocationTarget","synthetic":true,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl Send for Export","synthetic":true,"types":["wasmtime_environ::module::Export"]},{"text":"impl Send for MemoryStyle","synthetic":true,"types":["wasmtime_environ::module::MemoryStyle"]},{"text":"impl Send for TableStyle","synthetic":true,"types":["wasmtime_environ::module::TableStyle"]},{"text":"impl Send for RelocSink","synthetic":true,"types":["wasmtime_environ::cranelift::RelocSink"]},{"text":"impl Send for Cranelift","synthetic":true,"types":["wasmtime_environ::cranelift::Cranelift"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl Send for WasmOptTtf","synthetic":true,"types":["wasmtime_fuzzing::generators::WasmOptTtf"]},{"text":"impl Send for DifferentialConfig","synthetic":true,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]},{"text":"impl Send for ApiCalls","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCalls"]},{"text":"impl Send for ApiCall","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCall"]},{"text":"impl Send for DummyFunc","synthetic":true,"types":["wasmtime_fuzzing::oracles::dummy::DummyFunc"]}]; +implementors["wasmtime_interface_types"] = [{"text":"impl Send for ModuleData","synthetic":true,"types":["wasmtime_interface_types::ModuleData"]},{"text":"impl<'a> Send for ExportBinding<'a>","synthetic":true,"types":["wasmtime_interface_types::ExportBinding"]},{"text":"impl Send for Value","synthetic":true,"types":["wasmtime_interface_types::value::Value"]}]; +implementors["wasmtime_jit"] = [{"text":"impl Send for CodeMemory","synthetic":true,"types":["wasmtime_jit::code_memory::CodeMemory"]},{"text":"impl !Send for Compiler","synthetic":true,"types":["wasmtime_jit::compiler::Compiler"]},{"text":"impl !Send for CompiledModule","synthetic":true,"types":["wasmtime_jit::instantiate::CompiledModule"]},{"text":"impl Send for NullResolver","synthetic":true,"types":["wasmtime_jit::resolver::NullResolver"]},{"text":"impl Send for CompilationStrategy","synthetic":true,"types":["wasmtime_jit::compiler::CompilationStrategy"]},{"text":"impl Send for SetupError","synthetic":true,"types":["wasmtime_jit::instantiate::SetupError"]},{"text":"impl Send for TrampolineRelocSink","synthetic":true,"types":["wasmtime_jit::trampoline::binemit::TrampolineRelocSink"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl !Send for Imports","synthetic":true,"types":["wasmtime_runtime::imports::Imports"]},{"text":"impl !Send for InstanceHandle","synthetic":true,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl Send for LinkError","synthetic":true,"types":["wasmtime_runtime::instance::LinkError"]},{"text":"impl !Send for GdbJitImageRegistration","synthetic":true,"types":["wasmtime_runtime::jit_int::GdbJitImageRegistration"]},{"text":"impl Send for Mmap","synthetic":true,"types":["wasmtime_runtime::mmap::Mmap"]},{"text":"impl Send for SignatureRegistry","synthetic":true,"types":["wasmtime_runtime::sig_registry::SignatureRegistry"]},{"text":"impl Send for TrapDescription","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl Send for TrapRegistration","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistration"]},{"text":"impl Send for TrapRegistry","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistry"]},{"text":"impl !Send for VMCallerCheckedAnyfunc","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMCallerCheckedAnyfunc"]},{"text":"impl Send for VMContext","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMContext"]},{"text":"impl Send for VMFunctionBody","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionBody"]},{"text":"impl !Send for VMFunctionImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionImport"]},{"text":"impl Send for VMGlobalDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalDefinition"]},{"text":"impl !Send for VMGlobalImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalImport"]},{"text":"impl Send for VMInvokeArgument","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMInvokeArgument"]},{"text":"impl !Send for VMMemoryDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryDefinition"]},{"text":"impl !Send for VMMemoryImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryImport"]},{"text":"impl Send for VMSharedSignatureIndex","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]},{"text":"impl !Send for VMTableDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableDefinition"]},{"text":"impl !Send for VMTableImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableImport"]},{"text":"impl !Send for Export","synthetic":true,"types":["wasmtime_runtime::export::Export"]},{"text":"impl Send for InstantiationError","synthetic":true,"types":["wasmtime_runtime::instance::InstantiationError"]},{"text":"impl Send for Trap","synthetic":true,"types":["wasmtime_runtime::traphandlers::Trap"]}]; +implementors["wasmtime_wasi"] = [{"text":"impl !Send for Wasi","synthetic":true,"types":["wasmtime_wasi::Wasi"]},{"text":"impl !Send for Wasi","synthetic":true,"types":["wasmtime_wasi::old::snapshot_0::Wasi"]}]; +implementors["wasmtime_wast"] = [{"text":"impl !Send for WastContext","synthetic":true,"types":["wasmtime_wast::wast::WastContext"]}]; +implementors["yanix"] = [{"text":"impl Send for Errno","synthetic":true,"types":["yanix::errno::Errno"]},{"text":"impl Send for YanixError","synthetic":true,"types":["yanix::YanixError"]},{"text":"impl Send for ClockId","synthetic":true,"types":["yanix::clock::ClockId"]},{"text":"impl Send for Entry","synthetic":true,"types":["yanix::dir::Entry"]},{"text":"impl Send for SeekLoc","synthetic":true,"types":["yanix::dir::SeekLoc"]},{"text":"impl<T> Send for DirIter<T> where
    T: Send
","synthetic":true,"types":["yanix::dir::DirIter"]},{"text":"impl Send for FileType","synthetic":true,"types":["yanix::dir::FileType"]},{"text":"impl Send for FdFlag","synthetic":true,"types":["yanix::file::FdFlag"]},{"text":"impl Send for AtFlag","synthetic":true,"types":["yanix::file::AtFlag"]},{"text":"impl Send for Mode","synthetic":true,"types":["yanix::file::Mode"]},{"text":"impl Send for OFlag","synthetic":true,"types":["yanix::file::OFlag"]},{"text":"impl Send for SFlag","synthetic":true,"types":["yanix::file::SFlag"]},{"text":"impl Send for PollFlags","synthetic":true,"types":["yanix::poll::PollFlags"]},{"text":"impl Send for PollFd","synthetic":true,"types":["yanix::poll::PollFd"]},{"text":"impl Send for SockType","synthetic":true,"types":["yanix::socket::SockType"]},{"text":"impl Send for PosixFadviseAdvice","synthetic":true,"types":["yanix::sys::linux::fadvise::PosixFadviseAdvice"]},{"text":"impl Send for Dir","synthetic":false,"types":["yanix::dir::Dir"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/marker/trait.StructuralEq.js b/api/implementors/core/marker/trait.StructuralEq.js new file mode 100644 index 000000000000..b8dbbff7730c --- /dev/null +++ b/api/implementors/core/marker/trait.StructuralEq.js @@ -0,0 +1,9 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl StructuralEq for ExecutionError","synthetic":false,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl StructuralEq for FileType","synthetic":false,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl StructuralEq for Permissions","synthetic":false,"types":["wasi_common::fs::permissions::Permissions"]},{"text":"impl StructuralEq for __wasi_dirent_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl StructuralEq for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl StructuralEq for __wasi_filestat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl StructuralEq for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl StructuralEq for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl StructuralEq for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl StructuralEq for __wasi_iovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl StructuralEq for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl StructuralEq for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl StructuralEq for __wasi_dirent_t","synthetic":false,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl StructuralEq for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl StructuralEq for __wasi_filestat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl StructuralEq for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl StructuralEq for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl StructuralEq for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl StructuralEq for __wasi_iovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl StructuralEq for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl StructuralEq for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]}]; +implementors["wasmtime"] = [{"text":"impl StructuralEq for ValType","synthetic":false,"types":["wasmtime::types::ValType"]}]; +implementors["wasmtime_environ"] = [{"text":"impl StructuralEq for InstructionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl StructuralEq for FunctionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl StructuralEq for CompiledFunctionUnwindInfoReloc","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl StructuralEq for CompiledFunctionUnwindInfo","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl StructuralEq for CompiledFunction","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl StructuralEq for Compilation","synthetic":false,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl StructuralEq for Relocation","synthetic":false,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl StructuralEq for RelocationTarget","synthetic":false,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl StructuralEq for TrapInformation","synthetic":false,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl StructuralEq for Export","synthetic":false,"types":["wasmtime_environ::module::Export"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl StructuralEq for DifferentialConfig","synthetic":false,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl StructuralEq for InstanceHandle","synthetic":false,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl StructuralEq for VMSharedSignatureIndex","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]}]; +implementors["yanix"] = [{"text":"impl StructuralEq for Dir","synthetic":false,"types":["yanix::dir::Dir"]},{"text":"impl StructuralEq for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl StructuralEq for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl StructuralEq for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl StructuralEq for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl StructuralEq for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl StructuralEq for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]},{"text":"impl StructuralEq for PollFd","synthetic":false,"types":["yanix::poll::PollFd"]},{"text":"impl StructuralEq for Errno","synthetic":false,"types":["yanix::errno::Errno"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/marker/trait.StructuralPartialEq.js b/api/implementors/core/marker/trait.StructuralPartialEq.js new file mode 100644 index 000000000000..cdc9ea517aed --- /dev/null +++ b/api/implementors/core/marker/trait.StructuralPartialEq.js @@ -0,0 +1,9 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl StructuralPartialEq for ExecutionError","synthetic":false,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl StructuralPartialEq for FileType","synthetic":false,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl StructuralPartialEq for Permissions","synthetic":false,"types":["wasi_common::fs::permissions::Permissions"]},{"text":"impl StructuralPartialEq for __wasi_dirent_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl StructuralPartialEq for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl StructuralPartialEq for __wasi_filestat_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl StructuralPartialEq for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl StructuralPartialEq for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl StructuralPartialEq for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl StructuralPartialEq for __wasi_iovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl StructuralPartialEq for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl StructuralPartialEq for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl StructuralPartialEq for __wasi_dirent_t","synthetic":false,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl StructuralPartialEq for __wasi_fdstat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl StructuralPartialEq for __wasi_filestat_t","synthetic":false,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl StructuralPartialEq for __wasi_event_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl StructuralPartialEq for __wasi_subscription_clock_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl StructuralPartialEq for __wasi_subscription_fd_readwrite_t","synthetic":false,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl StructuralPartialEq for __wasi_iovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl StructuralPartialEq for __wasi_ciovec_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl StructuralPartialEq for __wasi_prestat_dir_t","synthetic":false,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]}]; +implementors["wasmtime"] = [{"text":"impl StructuralPartialEq for Mutability","synthetic":false,"types":["wasmtime::types::Mutability"]},{"text":"impl StructuralPartialEq for ValType","synthetic":false,"types":["wasmtime::types::ValType"]}]; +implementors["wasmtime_environ"] = [{"text":"impl StructuralPartialEq for InstructionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl StructuralPartialEq for FunctionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl StructuralPartialEq for CompiledFunctionUnwindInfoReloc","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl StructuralPartialEq for CompiledFunctionUnwindInfo","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl StructuralPartialEq for CompiledFunction","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl StructuralPartialEq for Compilation","synthetic":false,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl StructuralPartialEq for Relocation","synthetic":false,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl StructuralPartialEq for RelocationTarget","synthetic":false,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl StructuralPartialEq for TrapInformation","synthetic":false,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl StructuralPartialEq for Export","synthetic":false,"types":["wasmtime_environ::module::Export"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl StructuralPartialEq for DifferentialConfig","synthetic":false,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl StructuralPartialEq for InstanceHandle","synthetic":false,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl StructuralPartialEq for TrapDescription","synthetic":false,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl StructuralPartialEq for VMSharedSignatureIndex","synthetic":false,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]}]; +implementors["yanix"] = [{"text":"impl StructuralPartialEq for Dir","synthetic":false,"types":["yanix::dir::Dir"]},{"text":"impl StructuralPartialEq for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl StructuralPartialEq for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl StructuralPartialEq for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl StructuralPartialEq for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl StructuralPartialEq for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl StructuralPartialEq for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]},{"text":"impl StructuralPartialEq for PollFd","synthetic":false,"types":["yanix::poll::PollFd"]},{"text":"impl StructuralPartialEq for Errno","synthetic":false,"types":["yanix::errno::Errno"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/marker/trait.Sync.js b/api/implementors/core/marker/trait.Sync.js new file mode 100644 index 000000000000..6235c54c9cd6 --- /dev/null +++ b/api/implementors/core/marker/trait.Sync.js @@ -0,0 +1,14 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl<'module, M> !Sync for CodeGenSession<'module, M>","synthetic":true,"types":["lightbeam::backend::CodeGenSession"]},{"text":"impl Sync for ExecutableModule","synthetic":true,"types":["lightbeam::module::ExecutableModule"]},{"text":"impl Sync for TranslatedModule","synthetic":true,"types":["lightbeam::module::TranslatedModule"]},{"text":"impl Sync for ExecutionError","synthetic":true,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl Sync for WasiCtx","synthetic":true,"types":["wasi_common::ctx::WasiCtx"]},{"text":"impl Sync for WasiCtxBuilder","synthetic":true,"types":["wasi_common::ctx::WasiCtxBuilder"]},{"text":"impl Sync for Error","synthetic":true,"types":["wasi_common::error::Error"]},{"text":"impl<'ctx> Sync for Dir<'ctx>","synthetic":true,"types":["wasi_common::fs::dir::Dir"]},{"text":"impl Sync for DirBuilder","synthetic":true,"types":["wasi_common::fs::dir_builder::DirBuilder"]},{"text":"impl Sync for DirEntry","synthetic":true,"types":["wasi_common::fs::dir_entry::DirEntry"]},{"text":"impl<'ctx> Sync for File<'ctx>","synthetic":true,"types":["wasi_common::fs::file::File"]},{"text":"impl Sync for FileType","synthetic":true,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl Sync for Metadata","synthetic":true,"types":["wasi_common::fs::metadata::Metadata"]},{"text":"impl Sync for OpenOptions","synthetic":true,"types":["wasi_common::fs::open_options::OpenOptions"]},{"text":"impl Sync for Permissions","synthetic":true,"types":["wasi_common::fs::permissions::Permissions"]},{"text":"impl Sync for ReadDir","synthetic":true,"types":["wasi_common::fs::readdir::ReadDir"]},{"text":"impl Sync for WasiCtx","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtx"]},{"text":"impl Sync for WasiCtxBuilder","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtxBuilder"]},{"text":"impl Sync for __wasi_dirent_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl Sync for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl Sync for __wasi_filestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl Sync for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Sync for __wasi_event_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_t"]},{"text":"impl Sync for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl Sync for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Sync for __wasi_subscription_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_t"]},{"text":"impl Sync for __wasi_event_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_u_t"]},{"text":"impl Sync for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_u_t"]},{"text":"impl Sync for __wasi_iovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl Sync for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl Sync for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Sync for __wasi_prestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_t"]},{"text":"impl Sync for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_u_t"]},{"text":"impl Sync for __wasi_dirent_t","synthetic":true,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl Sync for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl Sync for __wasi_filestat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl Sync for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Sync for __wasi_event_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_t"]},{"text":"impl Sync for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl Sync for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Sync for __wasi_subscription_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_t"]},{"text":"impl Sync for __wasi_event_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_u_t"]},{"text":"impl Sync for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_u_t"]},{"text":"impl Sync for __wasi_iovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl Sync for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl Sync for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Sync for __wasi_prestat_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_t"]},{"text":"impl Sync for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_u_t"]}]; +implementors["wasmtime"] = [{"text":"impl !Sync for Global","synthetic":true,"types":["wasmtime::externals::Global"]},{"text":"impl !Sync for Table","synthetic":true,"types":["wasmtime::externals::Table"]},{"text":"impl !Sync for Memory","synthetic":true,"types":["wasmtime::externals::Memory"]},{"text":"impl Sync for FrameInfo","synthetic":true,"types":["wasmtime::frame_info::FrameInfo"]},{"text":"impl !Sync for Func","synthetic":true,"types":["wasmtime::func::Func"]},{"text":"impl !Sync for Instance","synthetic":true,"types":["wasmtime::instance::Instance"]},{"text":"impl !Sync for Module","synthetic":true,"types":["wasmtime::module::Module"]},{"text":"impl<T> !Sync for HostRef<T>","synthetic":true,"types":["wasmtime::ref::HostRef"]},{"text":"impl Sync for Config","synthetic":true,"types":["wasmtime::runtime::Config"]},{"text":"impl Sync for Engine","synthetic":true,"types":["wasmtime::runtime::Engine"]},{"text":"impl !Sync for Store","synthetic":true,"types":["wasmtime::runtime::Store"]},{"text":"impl Sync for Trap","synthetic":true,"types":["wasmtime::trap::Trap"]},{"text":"impl Sync for Limits","synthetic":true,"types":["wasmtime::types::Limits"]},{"text":"impl Sync for FuncType","synthetic":true,"types":["wasmtime::types::FuncType"]},{"text":"impl Sync for GlobalType","synthetic":true,"types":["wasmtime::types::GlobalType"]},{"text":"impl Sync for TableType","synthetic":true,"types":["wasmtime::types::TableType"]},{"text":"impl Sync for MemoryType","synthetic":true,"types":["wasmtime::types::MemoryType"]},{"text":"impl Sync for ImportType","synthetic":true,"types":["wasmtime::types::ImportType"]},{"text":"impl Sync for ExportType","synthetic":true,"types":["wasmtime::types::ExportType"]},{"text":"impl !Sync for Extern","synthetic":true,"types":["wasmtime::externals::Extern"]},{"text":"impl !Sync for AnyRef","synthetic":true,"types":["wasmtime::ref::AnyRef"]},{"text":"impl Sync for OptLevel","synthetic":true,"types":["wasmtime::runtime::OptLevel"]},{"text":"impl Sync for Strategy","synthetic":true,"types":["wasmtime::runtime::Strategy"]},{"text":"impl Sync for Mutability","synthetic":true,"types":["wasmtime::types::Mutability"]},{"text":"impl Sync for ValType","synthetic":true,"types":["wasmtime::types::ValType"]},{"text":"impl Sync for ExternType","synthetic":true,"types":["wasmtime::types::ExternType"]},{"text":"impl !Sync for Val","synthetic":true,"types":["wasmtime::values::Val"]}]; +implementors["wasmtime_debug"] = [{"text":"impl<'a> Sync for DebugInfoData<'a>","synthetic":true,"types":["wasmtime_debug::read_debuginfo::DebugInfoData"]},{"text":"impl Sync for WasmFileInfo","synthetic":true,"types":["wasmtime_debug::read_debuginfo::WasmFileInfo"]},{"text":"impl Sync for ResolvedSymbol","synthetic":true,"types":["wasmtime_debug::write_debuginfo::ResolvedSymbol"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Sync for FunctionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl Sync for InstructionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl Sync for ModuleVmctxInfo","synthetic":true,"types":["wasmtime_environ::address_map::ModuleVmctxInfo"]},{"text":"impl Sync for CacheConfig","synthetic":true,"types":["wasmtime_environ::cache::config::CacheConfig"]},{"text":"impl Sync for Compilation","synthetic":true,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl Sync for CompiledFunction","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl Sync for CompiledFunctionUnwindInfoReloc","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl Sync for Relocation","synthetic":true,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl Sync for TrapInformation","synthetic":true,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl Sync for BuiltinFunctionIndex","synthetic":true,"types":["wasmtime_environ::func_environ::BuiltinFunctionIndex"]},{"text":"impl Sync for MemoryPlan","synthetic":true,"types":["wasmtime_environ::module::MemoryPlan"]},{"text":"impl Sync for Module","synthetic":true,"types":["wasmtime_environ::module::Module"]},{"text":"impl Sync for TableElements","synthetic":true,"types":["wasmtime_environ::module::TableElements"]},{"text":"impl Sync for TablePlan","synthetic":true,"types":["wasmtime_environ::module::TablePlan"]},{"text":"impl<'data> Sync for DataInitializer<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializer"]},{"text":"impl Sync for DataInitializerLocation","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializerLocation"]},{"text":"impl<'a> Sync for FunctionBodyData<'a>","synthetic":true,"types":["wasmtime_environ::module_environ::FunctionBodyData"]},{"text":"impl<'data> Sync for ModuleEnvironment<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleEnvironment"]},{"text":"impl<'data> Sync for ModuleTranslation<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleTranslation"]},{"text":"impl Sync for Tunables","synthetic":true,"types":["wasmtime_environ::tunables::Tunables"]},{"text":"impl Sync for TargetSharedSignatureIndex","synthetic":true,"types":["wasmtime_environ::vmoffsets::TargetSharedSignatureIndex"]},{"text":"impl Sync for VMOffsets","synthetic":true,"types":["wasmtime_environ::vmoffsets::VMOffsets"]},{"text":"impl Sync for ModuleMemoryOffset","synthetic":true,"types":["wasmtime_environ::address_map::ModuleMemoryOffset"]},{"text":"impl Sync for CompileError","synthetic":true,"types":["wasmtime_environ::compilation::CompileError"]},{"text":"impl Sync for CompiledFunctionUnwindInfo","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl Sync for RelocationTarget","synthetic":true,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl Sync for Export","synthetic":true,"types":["wasmtime_environ::module::Export"]},{"text":"impl Sync for MemoryStyle","synthetic":true,"types":["wasmtime_environ::module::MemoryStyle"]},{"text":"impl Sync for TableStyle","synthetic":true,"types":["wasmtime_environ::module::TableStyle"]},{"text":"impl Sync for RelocSink","synthetic":true,"types":["wasmtime_environ::cranelift::RelocSink"]},{"text":"impl Sync for Cranelift","synthetic":true,"types":["wasmtime_environ::cranelift::Cranelift"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl Sync for WasmOptTtf","synthetic":true,"types":["wasmtime_fuzzing::generators::WasmOptTtf"]},{"text":"impl Sync for DifferentialConfig","synthetic":true,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]},{"text":"impl Sync for ApiCalls","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCalls"]},{"text":"impl Sync for ApiCall","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCall"]},{"text":"impl Sync for DummyFunc","synthetic":true,"types":["wasmtime_fuzzing::oracles::dummy::DummyFunc"]}]; +implementors["wasmtime_interface_types"] = [{"text":"impl Sync for ModuleData","synthetic":true,"types":["wasmtime_interface_types::ModuleData"]},{"text":"impl<'a> Sync for ExportBinding<'a>","synthetic":true,"types":["wasmtime_interface_types::ExportBinding"]},{"text":"impl Sync for Value","synthetic":true,"types":["wasmtime_interface_types::value::Value"]}]; +implementors["wasmtime_jit"] = [{"text":"impl Sync for CodeMemory","synthetic":true,"types":["wasmtime_jit::code_memory::CodeMemory"]},{"text":"impl !Sync for Compiler","synthetic":true,"types":["wasmtime_jit::compiler::Compiler"]},{"text":"impl !Sync for CompiledModule","synthetic":true,"types":["wasmtime_jit::instantiate::CompiledModule"]},{"text":"impl Sync for NullResolver","synthetic":true,"types":["wasmtime_jit::resolver::NullResolver"]},{"text":"impl Sync for CompilationStrategy","synthetic":true,"types":["wasmtime_jit::compiler::CompilationStrategy"]},{"text":"impl Sync for SetupError","synthetic":true,"types":["wasmtime_jit::instantiate::SetupError"]},{"text":"impl Sync for TrampolineRelocSink","synthetic":true,"types":["wasmtime_jit::trampoline::binemit::TrampolineRelocSink"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl !Sync for Imports","synthetic":true,"types":["wasmtime_runtime::imports::Imports"]},{"text":"impl !Sync for InstanceHandle","synthetic":true,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl Sync for LinkError","synthetic":true,"types":["wasmtime_runtime::instance::LinkError"]},{"text":"impl !Sync for GdbJitImageRegistration","synthetic":true,"types":["wasmtime_runtime::jit_int::GdbJitImageRegistration"]},{"text":"impl Sync for Mmap","synthetic":true,"types":["wasmtime_runtime::mmap::Mmap"]},{"text":"impl Sync for SignatureRegistry","synthetic":true,"types":["wasmtime_runtime::sig_registry::SignatureRegistry"]},{"text":"impl Sync for TrapDescription","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl Sync for TrapRegistration","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistration"]},{"text":"impl Sync for TrapRegistry","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistry"]},{"text":"impl !Sync for VMCallerCheckedAnyfunc","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMCallerCheckedAnyfunc"]},{"text":"impl Sync for VMContext","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMContext"]},{"text":"impl Sync for VMFunctionBody","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionBody"]},{"text":"impl !Sync for VMFunctionImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionImport"]},{"text":"impl Sync for VMGlobalDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalDefinition"]},{"text":"impl !Sync for VMGlobalImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalImport"]},{"text":"impl Sync for VMInvokeArgument","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMInvokeArgument"]},{"text":"impl !Sync for VMMemoryDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryDefinition"]},{"text":"impl !Sync for VMMemoryImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryImport"]},{"text":"impl Sync for VMSharedSignatureIndex","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]},{"text":"impl !Sync for VMTableDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableDefinition"]},{"text":"impl !Sync for VMTableImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableImport"]},{"text":"impl !Sync for Export","synthetic":true,"types":["wasmtime_runtime::export::Export"]},{"text":"impl Sync for InstantiationError","synthetic":true,"types":["wasmtime_runtime::instance::InstantiationError"]},{"text":"impl Sync for Trap","synthetic":true,"types":["wasmtime_runtime::traphandlers::Trap"]}]; +implementors["wasmtime_wasi"] = [{"text":"impl !Sync for Wasi","synthetic":true,"types":["wasmtime_wasi::Wasi"]},{"text":"impl !Sync for Wasi","synthetic":true,"types":["wasmtime_wasi::old::snapshot_0::Wasi"]}]; +implementors["wasmtime_wast"] = [{"text":"impl !Sync for WastContext","synthetic":true,"types":["wasmtime_wast::wast::WastContext"]}]; +implementors["yanix"] = [{"text":"impl Sync for Errno","synthetic":true,"types":["yanix::errno::Errno"]},{"text":"impl Sync for YanixError","synthetic":true,"types":["yanix::YanixError"]},{"text":"impl Sync for ClockId","synthetic":true,"types":["yanix::clock::ClockId"]},{"text":"impl !Sync for Dir","synthetic":true,"types":["yanix::dir::Dir"]},{"text":"impl Sync for Entry","synthetic":true,"types":["yanix::dir::Entry"]},{"text":"impl Sync for SeekLoc","synthetic":true,"types":["yanix::dir::SeekLoc"]},{"text":"impl<T> Sync for DirIter<T> where
    T: Sync
","synthetic":true,"types":["yanix::dir::DirIter"]},{"text":"impl Sync for FileType","synthetic":true,"types":["yanix::dir::FileType"]},{"text":"impl Sync for FdFlag","synthetic":true,"types":["yanix::file::FdFlag"]},{"text":"impl Sync for AtFlag","synthetic":true,"types":["yanix::file::AtFlag"]},{"text":"impl Sync for Mode","synthetic":true,"types":["yanix::file::Mode"]},{"text":"impl Sync for OFlag","synthetic":true,"types":["yanix::file::OFlag"]},{"text":"impl Sync for SFlag","synthetic":true,"types":["yanix::file::SFlag"]},{"text":"impl Sync for PollFlags","synthetic":true,"types":["yanix::poll::PollFlags"]},{"text":"impl Sync for PollFd","synthetic":true,"types":["yanix::poll::PollFd"]},{"text":"impl Sync for SockType","synthetic":true,"types":["yanix::socket::SockType"]},{"text":"impl Sync for PosixFadviseAdvice","synthetic":true,"types":["yanix::sys::linux::fadvise::PosixFadviseAdvice"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/marker/trait.Unpin.js b/api/implementors/core/marker/trait.Unpin.js new file mode 100644 index 000000000000..9447e7c83ec8 --- /dev/null +++ b/api/implementors/core/marker/trait.Unpin.js @@ -0,0 +1,14 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl<'module, M> Unpin for CodeGenSession<'module, M>","synthetic":true,"types":["lightbeam::backend::CodeGenSession"]},{"text":"impl Unpin for ExecutableModule","synthetic":true,"types":["lightbeam::module::ExecutableModule"]},{"text":"impl Unpin for TranslatedModule","synthetic":true,"types":["lightbeam::module::TranslatedModule"]},{"text":"impl Unpin for ExecutionError","synthetic":true,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl Unpin for WasiCtx","synthetic":true,"types":["wasi_common::ctx::WasiCtx"]},{"text":"impl Unpin for WasiCtxBuilder","synthetic":true,"types":["wasi_common::ctx::WasiCtxBuilder"]},{"text":"impl Unpin for Error","synthetic":true,"types":["wasi_common::error::Error"]},{"text":"impl<'ctx> Unpin for Dir<'ctx>","synthetic":true,"types":["wasi_common::fs::dir::Dir"]},{"text":"impl Unpin for DirBuilder","synthetic":true,"types":["wasi_common::fs::dir_builder::DirBuilder"]},{"text":"impl Unpin for DirEntry","synthetic":true,"types":["wasi_common::fs::dir_entry::DirEntry"]},{"text":"impl<'ctx> Unpin for File<'ctx>","synthetic":true,"types":["wasi_common::fs::file::File"]},{"text":"impl Unpin for FileType","synthetic":true,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl Unpin for Metadata","synthetic":true,"types":["wasi_common::fs::metadata::Metadata"]},{"text":"impl Unpin for OpenOptions","synthetic":true,"types":["wasi_common::fs::open_options::OpenOptions"]},{"text":"impl Unpin for Permissions","synthetic":true,"types":["wasi_common::fs::permissions::Permissions"]},{"text":"impl Unpin for ReadDir","synthetic":true,"types":["wasi_common::fs::readdir::ReadDir"]},{"text":"impl Unpin for WasiCtx","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtx"]},{"text":"impl Unpin for WasiCtxBuilder","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtxBuilder"]},{"text":"impl Unpin for __wasi_dirent_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl Unpin for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl Unpin for __wasi_filestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl Unpin for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Unpin for __wasi_event_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_t"]},{"text":"impl Unpin for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl Unpin for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Unpin for __wasi_subscription_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_t"]},{"text":"impl Unpin for __wasi_event_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_u_t"]},{"text":"impl Unpin for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_u_t"]},{"text":"impl Unpin for __wasi_iovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl Unpin for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl Unpin for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Unpin for __wasi_prestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_t"]},{"text":"impl Unpin for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_u_t"]},{"text":"impl Unpin for __wasi_dirent_t","synthetic":true,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl Unpin for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl Unpin for __wasi_filestat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl Unpin for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl Unpin for __wasi_event_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_t"]},{"text":"impl Unpin for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl Unpin for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl Unpin for __wasi_subscription_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_t"]},{"text":"impl Unpin for __wasi_event_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_u_t"]},{"text":"impl Unpin for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_u_t"]},{"text":"impl Unpin for __wasi_iovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl Unpin for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl Unpin for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]},{"text":"impl Unpin for __wasi_prestat_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_t"]},{"text":"impl Unpin for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_u_t"]}]; +implementors["wasmtime"] = [{"text":"impl Unpin for Global","synthetic":true,"types":["wasmtime::externals::Global"]},{"text":"impl Unpin for Table","synthetic":true,"types":["wasmtime::externals::Table"]},{"text":"impl Unpin for Memory","synthetic":true,"types":["wasmtime::externals::Memory"]},{"text":"impl Unpin for FrameInfo","synthetic":true,"types":["wasmtime::frame_info::FrameInfo"]},{"text":"impl Unpin for Func","synthetic":true,"types":["wasmtime::func::Func"]},{"text":"impl Unpin for Instance","synthetic":true,"types":["wasmtime::instance::Instance"]},{"text":"impl Unpin for Module","synthetic":true,"types":["wasmtime::module::Module"]},{"text":"impl<T> Unpin for HostRef<T>","synthetic":true,"types":["wasmtime::ref::HostRef"]},{"text":"impl Unpin for Config","synthetic":true,"types":["wasmtime::runtime::Config"]},{"text":"impl Unpin for Engine","synthetic":true,"types":["wasmtime::runtime::Engine"]},{"text":"impl Unpin for Store","synthetic":true,"types":["wasmtime::runtime::Store"]},{"text":"impl Unpin for Trap","synthetic":true,"types":["wasmtime::trap::Trap"]},{"text":"impl Unpin for Limits","synthetic":true,"types":["wasmtime::types::Limits"]},{"text":"impl Unpin for FuncType","synthetic":true,"types":["wasmtime::types::FuncType"]},{"text":"impl Unpin for GlobalType","synthetic":true,"types":["wasmtime::types::GlobalType"]},{"text":"impl Unpin for TableType","synthetic":true,"types":["wasmtime::types::TableType"]},{"text":"impl Unpin for MemoryType","synthetic":true,"types":["wasmtime::types::MemoryType"]},{"text":"impl Unpin for ImportType","synthetic":true,"types":["wasmtime::types::ImportType"]},{"text":"impl Unpin for ExportType","synthetic":true,"types":["wasmtime::types::ExportType"]},{"text":"impl Unpin for Extern","synthetic":true,"types":["wasmtime::externals::Extern"]},{"text":"impl Unpin for AnyRef","synthetic":true,"types":["wasmtime::ref::AnyRef"]},{"text":"impl Unpin for OptLevel","synthetic":true,"types":["wasmtime::runtime::OptLevel"]},{"text":"impl Unpin for Strategy","synthetic":true,"types":["wasmtime::runtime::Strategy"]},{"text":"impl Unpin for Mutability","synthetic":true,"types":["wasmtime::types::Mutability"]},{"text":"impl Unpin for ValType","synthetic":true,"types":["wasmtime::types::ValType"]},{"text":"impl Unpin for ExternType","synthetic":true,"types":["wasmtime::types::ExternType"]},{"text":"impl Unpin for Val","synthetic":true,"types":["wasmtime::values::Val"]}]; +implementors["wasmtime_debug"] = [{"text":"impl<'a> Unpin for DebugInfoData<'a>","synthetic":true,"types":["wasmtime_debug::read_debuginfo::DebugInfoData"]},{"text":"impl Unpin for WasmFileInfo","synthetic":true,"types":["wasmtime_debug::read_debuginfo::WasmFileInfo"]},{"text":"impl Unpin for ResolvedSymbol","synthetic":true,"types":["wasmtime_debug::write_debuginfo::ResolvedSymbol"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Unpin for FunctionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl Unpin for InstructionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl Unpin for ModuleVmctxInfo","synthetic":true,"types":["wasmtime_environ::address_map::ModuleVmctxInfo"]},{"text":"impl Unpin for CacheConfig","synthetic":true,"types":["wasmtime_environ::cache::config::CacheConfig"]},{"text":"impl Unpin for Compilation","synthetic":true,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl Unpin for CompiledFunction","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl Unpin for CompiledFunctionUnwindInfoReloc","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl Unpin for Relocation","synthetic":true,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl Unpin for TrapInformation","synthetic":true,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl Unpin for BuiltinFunctionIndex","synthetic":true,"types":["wasmtime_environ::func_environ::BuiltinFunctionIndex"]},{"text":"impl Unpin for MemoryPlan","synthetic":true,"types":["wasmtime_environ::module::MemoryPlan"]},{"text":"impl Unpin for Module","synthetic":true,"types":["wasmtime_environ::module::Module"]},{"text":"impl Unpin for TableElements","synthetic":true,"types":["wasmtime_environ::module::TableElements"]},{"text":"impl Unpin for TablePlan","synthetic":true,"types":["wasmtime_environ::module::TablePlan"]},{"text":"impl<'data> Unpin for DataInitializer<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializer"]},{"text":"impl Unpin for DataInitializerLocation","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializerLocation"]},{"text":"impl<'a> Unpin for FunctionBodyData<'a>","synthetic":true,"types":["wasmtime_environ::module_environ::FunctionBodyData"]},{"text":"impl<'data> Unpin for ModuleEnvironment<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleEnvironment"]},{"text":"impl<'data> Unpin for ModuleTranslation<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleTranslation"]},{"text":"impl Unpin for Tunables","synthetic":true,"types":["wasmtime_environ::tunables::Tunables"]},{"text":"impl Unpin for TargetSharedSignatureIndex","synthetic":true,"types":["wasmtime_environ::vmoffsets::TargetSharedSignatureIndex"]},{"text":"impl Unpin for VMOffsets","synthetic":true,"types":["wasmtime_environ::vmoffsets::VMOffsets"]},{"text":"impl Unpin for ModuleMemoryOffset","synthetic":true,"types":["wasmtime_environ::address_map::ModuleMemoryOffset"]},{"text":"impl Unpin for CompileError","synthetic":true,"types":["wasmtime_environ::compilation::CompileError"]},{"text":"impl Unpin for CompiledFunctionUnwindInfo","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl Unpin for RelocationTarget","synthetic":true,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl Unpin for Export","synthetic":true,"types":["wasmtime_environ::module::Export"]},{"text":"impl Unpin for MemoryStyle","synthetic":true,"types":["wasmtime_environ::module::MemoryStyle"]},{"text":"impl Unpin for TableStyle","synthetic":true,"types":["wasmtime_environ::module::TableStyle"]},{"text":"impl Unpin for RelocSink","synthetic":true,"types":["wasmtime_environ::cranelift::RelocSink"]},{"text":"impl Unpin for Cranelift","synthetic":true,"types":["wasmtime_environ::cranelift::Cranelift"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl Unpin for WasmOptTtf","synthetic":true,"types":["wasmtime_fuzzing::generators::WasmOptTtf"]},{"text":"impl Unpin for DifferentialConfig","synthetic":true,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]},{"text":"impl Unpin for ApiCalls","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCalls"]},{"text":"impl Unpin for ApiCall","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCall"]},{"text":"impl Unpin for DummyFunc","synthetic":true,"types":["wasmtime_fuzzing::oracles::dummy::DummyFunc"]}]; +implementors["wasmtime_interface_types"] = [{"text":"impl Unpin for ModuleData","synthetic":true,"types":["wasmtime_interface_types::ModuleData"]},{"text":"impl<'a> Unpin for ExportBinding<'a>","synthetic":true,"types":["wasmtime_interface_types::ExportBinding"]},{"text":"impl Unpin for Value","synthetic":true,"types":["wasmtime_interface_types::value::Value"]}]; +implementors["wasmtime_jit"] = [{"text":"impl Unpin for CodeMemory","synthetic":true,"types":["wasmtime_jit::code_memory::CodeMemory"]},{"text":"impl Unpin for Compiler","synthetic":true,"types":["wasmtime_jit::compiler::Compiler"]},{"text":"impl Unpin for CompiledModule","synthetic":true,"types":["wasmtime_jit::instantiate::CompiledModule"]},{"text":"impl Unpin for NullResolver","synthetic":true,"types":["wasmtime_jit::resolver::NullResolver"]},{"text":"impl Unpin for CompilationStrategy","synthetic":true,"types":["wasmtime_jit::compiler::CompilationStrategy"]},{"text":"impl Unpin for SetupError","synthetic":true,"types":["wasmtime_jit::instantiate::SetupError"]},{"text":"impl Unpin for TrampolineRelocSink","synthetic":true,"types":["wasmtime_jit::trampoline::binemit::TrampolineRelocSink"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl Unpin for Imports","synthetic":true,"types":["wasmtime_runtime::imports::Imports"]},{"text":"impl Unpin for InstanceHandle","synthetic":true,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl Unpin for LinkError","synthetic":true,"types":["wasmtime_runtime::instance::LinkError"]},{"text":"impl Unpin for GdbJitImageRegistration","synthetic":true,"types":["wasmtime_runtime::jit_int::GdbJitImageRegistration"]},{"text":"impl Unpin for Mmap","synthetic":true,"types":["wasmtime_runtime::mmap::Mmap"]},{"text":"impl Unpin for SignatureRegistry","synthetic":true,"types":["wasmtime_runtime::sig_registry::SignatureRegistry"]},{"text":"impl Unpin for TrapDescription","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl Unpin for TrapRegistration","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistration"]},{"text":"impl Unpin for TrapRegistry","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistry"]},{"text":"impl Unpin for VMCallerCheckedAnyfunc","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMCallerCheckedAnyfunc"]},{"text":"impl Unpin for VMContext","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMContext"]},{"text":"impl Unpin for VMFunctionBody","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionBody"]},{"text":"impl Unpin for VMFunctionImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionImport"]},{"text":"impl Unpin for VMGlobalDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalDefinition"]},{"text":"impl Unpin for VMGlobalImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalImport"]},{"text":"impl Unpin for VMInvokeArgument","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMInvokeArgument"]},{"text":"impl Unpin for VMMemoryDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryDefinition"]},{"text":"impl Unpin for VMMemoryImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryImport"]},{"text":"impl Unpin for VMSharedSignatureIndex","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]},{"text":"impl Unpin for VMTableDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableDefinition"]},{"text":"impl Unpin for VMTableImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableImport"]},{"text":"impl Unpin for Export","synthetic":true,"types":["wasmtime_runtime::export::Export"]},{"text":"impl Unpin for InstantiationError","synthetic":true,"types":["wasmtime_runtime::instance::InstantiationError"]},{"text":"impl Unpin for Trap","synthetic":true,"types":["wasmtime_runtime::traphandlers::Trap"]}]; +implementors["wasmtime_wasi"] = [{"text":"impl Unpin for Wasi","synthetic":true,"types":["wasmtime_wasi::Wasi"]},{"text":"impl Unpin for Wasi","synthetic":true,"types":["wasmtime_wasi::old::snapshot_0::Wasi"]}]; +implementors["wasmtime_wast"] = [{"text":"impl Unpin for WastContext","synthetic":true,"types":["wasmtime_wast::wast::WastContext"]}]; +implementors["yanix"] = [{"text":"impl Unpin for Errno","synthetic":true,"types":["yanix::errno::Errno"]},{"text":"impl Unpin for YanixError","synthetic":true,"types":["yanix::YanixError"]},{"text":"impl Unpin for ClockId","synthetic":true,"types":["yanix::clock::ClockId"]},{"text":"impl Unpin for Dir","synthetic":true,"types":["yanix::dir::Dir"]},{"text":"impl Unpin for Entry","synthetic":true,"types":["yanix::dir::Entry"]},{"text":"impl Unpin for SeekLoc","synthetic":true,"types":["yanix::dir::SeekLoc"]},{"text":"impl<T> Unpin for DirIter<T> where
    T: Unpin
","synthetic":true,"types":["yanix::dir::DirIter"]},{"text":"impl Unpin for FileType","synthetic":true,"types":["yanix::dir::FileType"]},{"text":"impl Unpin for FdFlag","synthetic":true,"types":["yanix::file::FdFlag"]},{"text":"impl Unpin for AtFlag","synthetic":true,"types":["yanix::file::AtFlag"]},{"text":"impl Unpin for Mode","synthetic":true,"types":["yanix::file::Mode"]},{"text":"impl Unpin for OFlag","synthetic":true,"types":["yanix::file::OFlag"]},{"text":"impl Unpin for SFlag","synthetic":true,"types":["yanix::file::SFlag"]},{"text":"impl Unpin for PollFlags","synthetic":true,"types":["yanix::poll::PollFlags"]},{"text":"impl Unpin for PollFd","synthetic":true,"types":["yanix::poll::PollFd"]},{"text":"impl Unpin for SockType","synthetic":true,"types":["yanix::socket::SockType"]},{"text":"impl Unpin for PosixFadviseAdvice","synthetic":true,"types":["yanix::sys::linux::fadvise::PosixFadviseAdvice"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/ops/arith/trait.Sub.js b/api/implementors/core/ops/arith/trait.Sub.js new file mode 100644 index 000000000000..0554abacd893 --- /dev/null +++ b/api/implementors/core/ops/arith/trait.Sub.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl Sub<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl Sub<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl Sub<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl Sub<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl Sub<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl Sub<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/ops/arith/trait.SubAssign.js b/api/implementors/core/ops/arith/trait.SubAssign.js new file mode 100644 index 000000000000..ab0ae2cfc7c3 --- /dev/null +++ b/api/implementors/core/ops/arith/trait.SubAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl SubAssign<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl SubAssign<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl SubAssign<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl SubAssign<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl SubAssign<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl SubAssign<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/ops/bit/trait.BitAnd.js b/api/implementors/core/ops/bit/trait.BitAnd.js new file mode 100644 index 000000000000..d61d0d1a78f1 --- /dev/null +++ b/api/implementors/core/ops/bit/trait.BitAnd.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl BitAnd<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl BitAnd<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl BitAnd<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl BitAnd<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl BitAnd<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl BitAnd<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/ops/bit/trait.BitAndAssign.js b/api/implementors/core/ops/bit/trait.BitAndAssign.js new file mode 100644 index 000000000000..7276362074da --- /dev/null +++ b/api/implementors/core/ops/bit/trait.BitAndAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl BitAndAssign<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl BitAndAssign<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl BitAndAssign<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl BitAndAssign<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl BitAndAssign<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl BitAndAssign<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/ops/bit/trait.BitOr.js b/api/implementors/core/ops/bit/trait.BitOr.js new file mode 100644 index 000000000000..ca264409156d --- /dev/null +++ b/api/implementors/core/ops/bit/trait.BitOr.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl BitOr<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl BitOr<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl BitOr<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl BitOr<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl BitOr<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl BitOr<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/ops/bit/trait.BitOrAssign.js b/api/implementors/core/ops/bit/trait.BitOrAssign.js new file mode 100644 index 000000000000..1d7cb7b114fd --- /dev/null +++ b/api/implementors/core/ops/bit/trait.BitOrAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl BitOrAssign<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl BitOrAssign<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl BitOrAssign<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl BitOrAssign<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl BitOrAssign<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl BitOrAssign<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/ops/bit/trait.BitXor.js b/api/implementors/core/ops/bit/trait.BitXor.js new file mode 100644 index 000000000000..4f0209ac38fc --- /dev/null +++ b/api/implementors/core/ops/bit/trait.BitXor.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl BitXor<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl BitXor<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl BitXor<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl BitXor<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl BitXor<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl BitXor<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/ops/bit/trait.BitXorAssign.js b/api/implementors/core/ops/bit/trait.BitXorAssign.js new file mode 100644 index 000000000000..edfa173882ff --- /dev/null +++ b/api/implementors/core/ops/bit/trait.BitXorAssign.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl BitXorAssign<FdFlag> for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl BitXorAssign<AtFlag> for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl BitXorAssign<Mode> for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl BitXorAssign<OFlag> for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl BitXorAssign<SFlag> for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl BitXorAssign<PollFlags> for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/ops/bit/trait.Not.js b/api/implementors/core/ops/bit/trait.Not.js new file mode 100644 index 000000000000..b254a5f1f3b8 --- /dev/null +++ b/api/implementors/core/ops/bit/trait.Not.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl Not for FdFlag","synthetic":false,"types":["yanix::file::FdFlag"]},{"text":"impl Not for AtFlag","synthetic":false,"types":["yanix::file::AtFlag"]},{"text":"impl Not for Mode","synthetic":false,"types":["yanix::file::Mode"]},{"text":"impl Not for OFlag","synthetic":false,"types":["yanix::file::OFlag"]},{"text":"impl Not for SFlag","synthetic":false,"types":["yanix::file::SFlag"]},{"text":"impl Not for PollFlags","synthetic":false,"types":["yanix::poll::PollFlags"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/core/ops/drop/trait.Drop.js b/api/implementors/core/ops/drop/trait.Drop.js new file mode 100644 index 000000000000..19d1744fff63 --- /dev/null +++ b/api/implementors/core/ops/drop/trait.Drop.js @@ -0,0 +1,5 @@ +(function() {var implementors = {}; +implementors["wasi_common"] = [{"text":"impl<'ctx> Drop for Dir<'ctx>","synthetic":false,"types":["wasi_common::fs::dir::Dir"]},{"text":"impl<'ctx> Drop for File<'ctx>","synthetic":false,"types":["wasi_common::fs::file::File"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl Drop for InstanceHandle","synthetic":false,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl Drop for GdbJitImageRegistration","synthetic":false,"types":["wasmtime_runtime::jit_int::GdbJitImageRegistration"]},{"text":"impl Drop for Mmap","synthetic":false,"types":["wasmtime_runtime::mmap::Mmap"]},{"text":"impl Drop for TrapRegistration","synthetic":false,"types":["wasmtime_runtime::trap_registry::TrapRegistration"]}]; +implementors["yanix"] = [{"text":"impl Drop for Dir","synthetic":false,"types":["yanix::dir::Dir"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/cranelift_codegen/binemit/memorysink/trait.RelocSink.js b/api/implementors/cranelift_codegen/binemit/memorysink/trait.RelocSink.js new file mode 100644 index 000000000000..49df49a4dd57 --- /dev/null +++ b/api/implementors/cranelift_codegen/binemit/memorysink/trait.RelocSink.js @@ -0,0 +1,4 @@ +(function() {var implementors = {}; +implementors["wasmtime_environ"] = [{"text":"impl RelocSink for RelocSink","synthetic":false,"types":["wasmtime_environ::cranelift::RelocSink"]}]; +implementors["wasmtime_jit"] = [{"text":"impl RelocSink for TrampolineRelocSink","synthetic":false,"types":["wasmtime_jit::trampoline::binemit::TrampolineRelocSink"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/cranelift_wasm/environ/spec/trait.ModuleEnvironment.js b/api/implementors/cranelift_wasm/environ/spec/trait.ModuleEnvironment.js new file mode 100644 index 000000000000..5f476fdb712e --- /dev/null +++ b/api/implementors/cranelift_wasm/environ/spec/trait.ModuleEnvironment.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_environ"] = [{"text":"impl<'data> ModuleEnvironment<'data> for ModuleEnvironment<'data>","synthetic":false,"types":["wasmtime_environ::module_environ::ModuleEnvironment"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/cranelift_wasm/environ/spec/trait.TargetEnvironment.js b/api/implementors/cranelift_wasm/environ/spec/trait.TargetEnvironment.js new file mode 100644 index 000000000000..f912e73fefdc --- /dev/null +++ b/api/implementors/cranelift_wasm/environ/spec/trait.TargetEnvironment.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_environ"] = [{"text":"impl<'data> TargetEnvironment for ModuleEnvironment<'data>","synthetic":false,"types":["wasmtime_environ::module_environ::ModuleEnvironment"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/lightbeam/trait.Signature.js b/api/implementors/lightbeam/trait.Signature.js new file mode 100644 index 000000000000..04256ada0d58 --- /dev/null +++ b/api/implementors/lightbeam/trait.Signature.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/serde/de/trait.Deserialize.js b/api/implementors/serde/de/trait.Deserialize.js new file mode 100644 index 000000000000..eb944529c032 --- /dev/null +++ b/api/implementors/serde/de/trait.Deserialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_environ"] = [{"text":"impl<'de> Deserialize<'de> for InstructionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl<'de> Deserialize<'de> for FunctionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl<'de> Deserialize<'de> for CompiledFunctionUnwindInfoReloc","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl<'de> Deserialize<'de> for CompiledFunctionUnwindInfo","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl<'de> Deserialize<'de> for CompiledFunction","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl<'de> Deserialize<'de> for Compilation","synthetic":false,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl<'de> Deserialize<'de> for Relocation","synthetic":false,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl<'de> Deserialize<'de> for RelocationTarget","synthetic":false,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl<'de> Deserialize<'de> for TrapInformation","synthetic":false,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl<'de> Deserialize<'de> for CacheConfig","synthetic":false,"types":["wasmtime_environ::cache::config::CacheConfig"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/serde/ser/trait.Serialize.js b/api/implementors/serde/ser/trait.Serialize.js new file mode 100644 index 000000000000..119e12d3f4e0 --- /dev/null +++ b/api/implementors/serde/ser/trait.Serialize.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_environ"] = [{"text":"impl Serialize for InstructionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl Serialize for FunctionAddressMap","synthetic":false,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl Serialize for CompiledFunctionUnwindInfoReloc","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl Serialize for CompiledFunctionUnwindInfo","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl Serialize for CompiledFunction","synthetic":false,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl Serialize for Compilation","synthetic":false,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl Serialize for Relocation","synthetic":false,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl Serialize for RelocationTarget","synthetic":false,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl Serialize for TrapInformation","synthetic":false,"types":["wasmtime_environ::compilation::TrapInformation"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/std/error/trait.Error.js b/api/implementors/std/error/trait.Error.js new file mode 100644 index 000000000000..e1d948bcb594 --- /dev/null +++ b/api/implementors/std/error/trait.Error.js @@ -0,0 +1,9 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl Error for ExecutionError","synthetic":false,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl Error for Error","synthetic":false,"types":["wasi_common::error::Error"]}]; +implementors["wasmtime"] = [{"text":"impl Error for Trap","synthetic":false,"types":["wasmtime::trap::Trap"]}]; +implementors["wasmtime_environ"] = [{"text":"impl Error for CompileError","synthetic":false,"types":["wasmtime_environ::compilation::CompileError"]}]; +implementors["wasmtime_jit"] = [{"text":"impl Error for SetupError","synthetic":false,"types":["wasmtime_jit::instantiate::SetupError"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl Error for LinkError","synthetic":false,"types":["wasmtime_runtime::instance::LinkError"]},{"text":"impl Error for InstantiationError","synthetic":false,"types":["wasmtime_runtime::instance::InstantiationError"]},{"text":"impl Error for Trap","synthetic":false,"types":["wasmtime_runtime::traphandlers::Trap"]}]; +implementors["yanix"] = [{"text":"impl Error for Errno","synthetic":false,"types":["yanix::errno::Errno"]},{"text":"impl Error for YanixError","synthetic":false,"types":["yanix::YanixError"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/std/io/trait.Read.js b/api/implementors/std/io/trait.Read.js new file mode 100644 index 000000000000..942189e63c1a --- /dev/null +++ b/api/implementors/std/io/trait.Read.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasi_common"] = [{"text":"impl<'ctx> Read for File<'ctx>","synthetic":false,"types":["wasi_common::fs::file::File"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/std/panic/trait.RefUnwindSafe.js b/api/implementors/std/panic/trait.RefUnwindSafe.js new file mode 100644 index 000000000000..8f20d860662d --- /dev/null +++ b/api/implementors/std/panic/trait.RefUnwindSafe.js @@ -0,0 +1,14 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl<'module, M> !RefUnwindSafe for CodeGenSession<'module, M>","synthetic":true,"types":["lightbeam::backend::CodeGenSession"]},{"text":"impl !RefUnwindSafe for ExecutableModule","synthetic":true,"types":["lightbeam::module::ExecutableModule"]},{"text":"impl !RefUnwindSafe for TranslatedModule","synthetic":true,"types":["lightbeam::module::TranslatedModule"]},{"text":"impl RefUnwindSafe for ExecutionError","synthetic":true,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl RefUnwindSafe for WasiCtx","synthetic":true,"types":["wasi_common::ctx::WasiCtx"]},{"text":"impl RefUnwindSafe for WasiCtxBuilder","synthetic":true,"types":["wasi_common::ctx::WasiCtxBuilder"]},{"text":"impl !RefUnwindSafe for Error","synthetic":true,"types":["wasi_common::error::Error"]},{"text":"impl<'ctx> RefUnwindSafe for Dir<'ctx>","synthetic":true,"types":["wasi_common::fs::dir::Dir"]},{"text":"impl RefUnwindSafe for DirBuilder","synthetic":true,"types":["wasi_common::fs::dir_builder::DirBuilder"]},{"text":"impl RefUnwindSafe for DirEntry","synthetic":true,"types":["wasi_common::fs::dir_entry::DirEntry"]},{"text":"impl<'ctx> RefUnwindSafe for File<'ctx>","synthetic":true,"types":["wasi_common::fs::file::File"]},{"text":"impl RefUnwindSafe for FileType","synthetic":true,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl RefUnwindSafe for Metadata","synthetic":true,"types":["wasi_common::fs::metadata::Metadata"]},{"text":"impl RefUnwindSafe for OpenOptions","synthetic":true,"types":["wasi_common::fs::open_options::OpenOptions"]},{"text":"impl RefUnwindSafe for Permissions","synthetic":true,"types":["wasi_common::fs::permissions::Permissions"]},{"text":"impl RefUnwindSafe for ReadDir","synthetic":true,"types":["wasi_common::fs::readdir::ReadDir"]},{"text":"impl RefUnwindSafe for WasiCtx","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtx"]},{"text":"impl RefUnwindSafe for WasiCtxBuilder","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtxBuilder"]},{"text":"impl RefUnwindSafe for __wasi_dirent_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl RefUnwindSafe for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl RefUnwindSafe for __wasi_filestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl RefUnwindSafe for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl RefUnwindSafe for __wasi_event_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_t"]},{"text":"impl RefUnwindSafe for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl RefUnwindSafe for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl RefUnwindSafe for __wasi_subscription_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_t"]},{"text":"impl RefUnwindSafe for __wasi_event_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_u_t"]},{"text":"impl RefUnwindSafe for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_u_t"]},{"text":"impl RefUnwindSafe for __wasi_iovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl RefUnwindSafe for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl RefUnwindSafe for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl RefUnwindSafe for __wasi_prestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_t"]},{"text":"impl RefUnwindSafe for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_u_t"]},{"text":"impl RefUnwindSafe for __wasi_dirent_t","synthetic":true,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl RefUnwindSafe for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl RefUnwindSafe for __wasi_filestat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl RefUnwindSafe for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl RefUnwindSafe for __wasi_event_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_t"]},{"text":"impl RefUnwindSafe for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl RefUnwindSafe for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl RefUnwindSafe for __wasi_subscription_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_t"]},{"text":"impl RefUnwindSafe for __wasi_event_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_u_t"]},{"text":"impl RefUnwindSafe for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_u_t"]},{"text":"impl RefUnwindSafe for __wasi_iovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl RefUnwindSafe for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl RefUnwindSafe for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]},{"text":"impl RefUnwindSafe for __wasi_prestat_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_t"]},{"text":"impl RefUnwindSafe for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_u_t"]}]; +implementors["wasmtime"] = [{"text":"impl !RefUnwindSafe for Global","synthetic":true,"types":["wasmtime::externals::Global"]},{"text":"impl !RefUnwindSafe for Table","synthetic":true,"types":["wasmtime::externals::Table"]},{"text":"impl !RefUnwindSafe for Memory","synthetic":true,"types":["wasmtime::externals::Memory"]},{"text":"impl RefUnwindSafe for FrameInfo","synthetic":true,"types":["wasmtime::frame_info::FrameInfo"]},{"text":"impl !RefUnwindSafe for Func","synthetic":true,"types":["wasmtime::func::Func"]},{"text":"impl !RefUnwindSafe for Instance","synthetic":true,"types":["wasmtime::instance::Instance"]},{"text":"impl !RefUnwindSafe for Module","synthetic":true,"types":["wasmtime::module::Module"]},{"text":"impl<T> !RefUnwindSafe for HostRef<T>","synthetic":true,"types":["wasmtime::ref::HostRef"]},{"text":"impl RefUnwindSafe for Config","synthetic":true,"types":["wasmtime::runtime::Config"]},{"text":"impl RefUnwindSafe for Engine","synthetic":true,"types":["wasmtime::runtime::Engine"]},{"text":"impl !RefUnwindSafe for Store","synthetic":true,"types":["wasmtime::runtime::Store"]},{"text":"impl RefUnwindSafe for Trap","synthetic":true,"types":["wasmtime::trap::Trap"]},{"text":"impl RefUnwindSafe for Limits","synthetic":true,"types":["wasmtime::types::Limits"]},{"text":"impl RefUnwindSafe for FuncType","synthetic":true,"types":["wasmtime::types::FuncType"]},{"text":"impl RefUnwindSafe for GlobalType","synthetic":true,"types":["wasmtime::types::GlobalType"]},{"text":"impl RefUnwindSafe for TableType","synthetic":true,"types":["wasmtime::types::TableType"]},{"text":"impl RefUnwindSafe for MemoryType","synthetic":true,"types":["wasmtime::types::MemoryType"]},{"text":"impl RefUnwindSafe for ImportType","synthetic":true,"types":["wasmtime::types::ImportType"]},{"text":"impl RefUnwindSafe for ExportType","synthetic":true,"types":["wasmtime::types::ExportType"]},{"text":"impl !RefUnwindSafe for Extern","synthetic":true,"types":["wasmtime::externals::Extern"]},{"text":"impl !RefUnwindSafe for AnyRef","synthetic":true,"types":["wasmtime::ref::AnyRef"]},{"text":"impl RefUnwindSafe for OptLevel","synthetic":true,"types":["wasmtime::runtime::OptLevel"]},{"text":"impl RefUnwindSafe for Strategy","synthetic":true,"types":["wasmtime::runtime::Strategy"]},{"text":"impl RefUnwindSafe for Mutability","synthetic":true,"types":["wasmtime::types::Mutability"]},{"text":"impl RefUnwindSafe for ValType","synthetic":true,"types":["wasmtime::types::ValType"]},{"text":"impl RefUnwindSafe for ExternType","synthetic":true,"types":["wasmtime::types::ExternType"]},{"text":"impl !RefUnwindSafe for Val","synthetic":true,"types":["wasmtime::values::Val"]}]; +implementors["wasmtime_debug"] = [{"text":"impl<'a> RefUnwindSafe for DebugInfoData<'a>","synthetic":true,"types":["wasmtime_debug::read_debuginfo::DebugInfoData"]},{"text":"impl RefUnwindSafe for WasmFileInfo","synthetic":true,"types":["wasmtime_debug::read_debuginfo::WasmFileInfo"]},{"text":"impl RefUnwindSafe for ResolvedSymbol","synthetic":true,"types":["wasmtime_debug::write_debuginfo::ResolvedSymbol"]}]; +implementors["wasmtime_environ"] = [{"text":"impl RefUnwindSafe for FunctionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl RefUnwindSafe for InstructionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl RefUnwindSafe for ModuleVmctxInfo","synthetic":true,"types":["wasmtime_environ::address_map::ModuleVmctxInfo"]},{"text":"impl RefUnwindSafe for CacheConfig","synthetic":true,"types":["wasmtime_environ::cache::config::CacheConfig"]},{"text":"impl RefUnwindSafe for Compilation","synthetic":true,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl RefUnwindSafe for CompiledFunction","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl RefUnwindSafe for CompiledFunctionUnwindInfoReloc","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl RefUnwindSafe for Relocation","synthetic":true,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl RefUnwindSafe for TrapInformation","synthetic":true,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl RefUnwindSafe for BuiltinFunctionIndex","synthetic":true,"types":["wasmtime_environ::func_environ::BuiltinFunctionIndex"]},{"text":"impl RefUnwindSafe for MemoryPlan","synthetic":true,"types":["wasmtime_environ::module::MemoryPlan"]},{"text":"impl RefUnwindSafe for Module","synthetic":true,"types":["wasmtime_environ::module::Module"]},{"text":"impl RefUnwindSafe for TableElements","synthetic":true,"types":["wasmtime_environ::module::TableElements"]},{"text":"impl RefUnwindSafe for TablePlan","synthetic":true,"types":["wasmtime_environ::module::TablePlan"]},{"text":"impl<'data> RefUnwindSafe for DataInitializer<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializer"]},{"text":"impl RefUnwindSafe for DataInitializerLocation","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializerLocation"]},{"text":"impl<'a> RefUnwindSafe for FunctionBodyData<'a>","synthetic":true,"types":["wasmtime_environ::module_environ::FunctionBodyData"]},{"text":"impl<'data> RefUnwindSafe for ModuleEnvironment<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleEnvironment"]},{"text":"impl<'data> RefUnwindSafe for ModuleTranslation<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleTranslation"]},{"text":"impl RefUnwindSafe for Tunables","synthetic":true,"types":["wasmtime_environ::tunables::Tunables"]},{"text":"impl RefUnwindSafe for TargetSharedSignatureIndex","synthetic":true,"types":["wasmtime_environ::vmoffsets::TargetSharedSignatureIndex"]},{"text":"impl RefUnwindSafe for VMOffsets","synthetic":true,"types":["wasmtime_environ::vmoffsets::VMOffsets"]},{"text":"impl RefUnwindSafe for ModuleMemoryOffset","synthetic":true,"types":["wasmtime_environ::address_map::ModuleMemoryOffset"]},{"text":"impl RefUnwindSafe for CompileError","synthetic":true,"types":["wasmtime_environ::compilation::CompileError"]},{"text":"impl RefUnwindSafe for CompiledFunctionUnwindInfo","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl RefUnwindSafe for RelocationTarget","synthetic":true,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl RefUnwindSafe for Export","synthetic":true,"types":["wasmtime_environ::module::Export"]},{"text":"impl RefUnwindSafe for MemoryStyle","synthetic":true,"types":["wasmtime_environ::module::MemoryStyle"]},{"text":"impl RefUnwindSafe for TableStyle","synthetic":true,"types":["wasmtime_environ::module::TableStyle"]},{"text":"impl RefUnwindSafe for RelocSink","synthetic":true,"types":["wasmtime_environ::cranelift::RelocSink"]},{"text":"impl RefUnwindSafe for Cranelift","synthetic":true,"types":["wasmtime_environ::cranelift::Cranelift"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl RefUnwindSafe for WasmOptTtf","synthetic":true,"types":["wasmtime_fuzzing::generators::WasmOptTtf"]},{"text":"impl RefUnwindSafe for DifferentialConfig","synthetic":true,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]},{"text":"impl RefUnwindSafe for ApiCalls","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCalls"]},{"text":"impl RefUnwindSafe for ApiCall","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCall"]},{"text":"impl RefUnwindSafe for DummyFunc","synthetic":true,"types":["wasmtime_fuzzing::oracles::dummy::DummyFunc"]}]; +implementors["wasmtime_interface_types"] = [{"text":"impl !RefUnwindSafe for ModuleData","synthetic":true,"types":["wasmtime_interface_types::ModuleData"]},{"text":"impl<'a> RefUnwindSafe for ExportBinding<'a>","synthetic":true,"types":["wasmtime_interface_types::ExportBinding"]},{"text":"impl RefUnwindSafe for Value","synthetic":true,"types":["wasmtime_interface_types::value::Value"]}]; +implementors["wasmtime_jit"] = [{"text":"impl RefUnwindSafe for CodeMemory","synthetic":true,"types":["wasmtime_jit::code_memory::CodeMemory"]},{"text":"impl !RefUnwindSafe for Compiler","synthetic":true,"types":["wasmtime_jit::compiler::Compiler"]},{"text":"impl !RefUnwindSafe for CompiledModule","synthetic":true,"types":["wasmtime_jit::instantiate::CompiledModule"]},{"text":"impl RefUnwindSafe for NullResolver","synthetic":true,"types":["wasmtime_jit::resolver::NullResolver"]},{"text":"impl RefUnwindSafe for CompilationStrategy","synthetic":true,"types":["wasmtime_jit::compiler::CompilationStrategy"]},{"text":"impl !RefUnwindSafe for SetupError","synthetic":true,"types":["wasmtime_jit::instantiate::SetupError"]},{"text":"impl RefUnwindSafe for TrampolineRelocSink","synthetic":true,"types":["wasmtime_jit::trampoline::binemit::TrampolineRelocSink"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl !RefUnwindSafe for Imports","synthetic":true,"types":["wasmtime_runtime::imports::Imports"]},{"text":"impl !RefUnwindSafe for InstanceHandle","synthetic":true,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl RefUnwindSafe for LinkError","synthetic":true,"types":["wasmtime_runtime::instance::LinkError"]},{"text":"impl RefUnwindSafe for GdbJitImageRegistration","synthetic":true,"types":["wasmtime_runtime::jit_int::GdbJitImageRegistration"]},{"text":"impl RefUnwindSafe for Mmap","synthetic":true,"types":["wasmtime_runtime::mmap::Mmap"]},{"text":"impl RefUnwindSafe for SignatureRegistry","synthetic":true,"types":["wasmtime_runtime::sig_registry::SignatureRegistry"]},{"text":"impl RefUnwindSafe for TrapDescription","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl RefUnwindSafe for TrapRegistration","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistration"]},{"text":"impl RefUnwindSafe for TrapRegistry","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistry"]},{"text":"impl RefUnwindSafe for VMCallerCheckedAnyfunc","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMCallerCheckedAnyfunc"]},{"text":"impl RefUnwindSafe for VMContext","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMContext"]},{"text":"impl RefUnwindSafe for VMFunctionBody","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionBody"]},{"text":"impl RefUnwindSafe for VMFunctionImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionImport"]},{"text":"impl RefUnwindSafe for VMGlobalDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalDefinition"]},{"text":"impl RefUnwindSafe for VMGlobalImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalImport"]},{"text":"impl RefUnwindSafe for VMInvokeArgument","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMInvokeArgument"]},{"text":"impl RefUnwindSafe for VMMemoryDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryDefinition"]},{"text":"impl RefUnwindSafe for VMMemoryImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryImport"]},{"text":"impl RefUnwindSafe for VMSharedSignatureIndex","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]},{"text":"impl RefUnwindSafe for VMTableDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableDefinition"]},{"text":"impl RefUnwindSafe for VMTableImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableImport"]},{"text":"impl RefUnwindSafe for Export","synthetic":true,"types":["wasmtime_runtime::export::Export"]},{"text":"impl !RefUnwindSafe for InstantiationError","synthetic":true,"types":["wasmtime_runtime::instance::InstantiationError"]},{"text":"impl !RefUnwindSafe for Trap","synthetic":true,"types":["wasmtime_runtime::traphandlers::Trap"]}]; +implementors["wasmtime_wasi"] = [{"text":"impl !RefUnwindSafe for Wasi","synthetic":true,"types":["wasmtime_wasi::Wasi"]},{"text":"impl !RefUnwindSafe for Wasi","synthetic":true,"types":["wasmtime_wasi::old::snapshot_0::Wasi"]}]; +implementors["wasmtime_wast"] = [{"text":"impl !RefUnwindSafe for WastContext","synthetic":true,"types":["wasmtime_wast::wast::WastContext"]}]; +implementors["yanix"] = [{"text":"impl RefUnwindSafe for Errno","synthetic":true,"types":["yanix::errno::Errno"]},{"text":"impl RefUnwindSafe for YanixError","synthetic":true,"types":["yanix::YanixError"]},{"text":"impl RefUnwindSafe for ClockId","synthetic":true,"types":["yanix::clock::ClockId"]},{"text":"impl RefUnwindSafe for Dir","synthetic":true,"types":["yanix::dir::Dir"]},{"text":"impl RefUnwindSafe for Entry","synthetic":true,"types":["yanix::dir::Entry"]},{"text":"impl RefUnwindSafe for SeekLoc","synthetic":true,"types":["yanix::dir::SeekLoc"]},{"text":"impl<T> RefUnwindSafe for DirIter<T> where
    T: RefUnwindSafe
","synthetic":true,"types":["yanix::dir::DirIter"]},{"text":"impl RefUnwindSafe for FileType","synthetic":true,"types":["yanix::dir::FileType"]},{"text":"impl RefUnwindSafe for FdFlag","synthetic":true,"types":["yanix::file::FdFlag"]},{"text":"impl RefUnwindSafe for AtFlag","synthetic":true,"types":["yanix::file::AtFlag"]},{"text":"impl RefUnwindSafe for Mode","synthetic":true,"types":["yanix::file::Mode"]},{"text":"impl RefUnwindSafe for OFlag","synthetic":true,"types":["yanix::file::OFlag"]},{"text":"impl RefUnwindSafe for SFlag","synthetic":true,"types":["yanix::file::SFlag"]},{"text":"impl RefUnwindSafe for PollFlags","synthetic":true,"types":["yanix::poll::PollFlags"]},{"text":"impl RefUnwindSafe for PollFd","synthetic":true,"types":["yanix::poll::PollFd"]},{"text":"impl RefUnwindSafe for SockType","synthetic":true,"types":["yanix::socket::SockType"]},{"text":"impl RefUnwindSafe for PosixFadviseAdvice","synthetic":true,"types":["yanix::sys::linux::fadvise::PosixFadviseAdvice"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/std/panic/trait.UnwindSafe.js b/api/implementors/std/panic/trait.UnwindSafe.js new file mode 100644 index 000000000000..7e032d48c540 --- /dev/null +++ b/api/implementors/std/panic/trait.UnwindSafe.js @@ -0,0 +1,14 @@ +(function() {var implementors = {}; +implementors["lightbeam"] = [{"text":"impl<'module, M> !UnwindSafe for CodeGenSession<'module, M>","synthetic":true,"types":["lightbeam::backend::CodeGenSession"]},{"text":"impl !UnwindSafe for ExecutableModule","synthetic":true,"types":["lightbeam::module::ExecutableModule"]},{"text":"impl !UnwindSafe for TranslatedModule","synthetic":true,"types":["lightbeam::module::TranslatedModule"]},{"text":"impl UnwindSafe for ExecutionError","synthetic":true,"types":["lightbeam::module::ExecutionError"]}]; +implementors["wasi_common"] = [{"text":"impl UnwindSafe for WasiCtx","synthetic":true,"types":["wasi_common::ctx::WasiCtx"]},{"text":"impl UnwindSafe for WasiCtxBuilder","synthetic":true,"types":["wasi_common::ctx::WasiCtxBuilder"]},{"text":"impl !UnwindSafe for Error","synthetic":true,"types":["wasi_common::error::Error"]},{"text":"impl<'ctx> !UnwindSafe for Dir<'ctx>","synthetic":true,"types":["wasi_common::fs::dir::Dir"]},{"text":"impl UnwindSafe for DirBuilder","synthetic":true,"types":["wasi_common::fs::dir_builder::DirBuilder"]},{"text":"impl UnwindSafe for DirEntry","synthetic":true,"types":["wasi_common::fs::dir_entry::DirEntry"]},{"text":"impl<'ctx> !UnwindSafe for File<'ctx>","synthetic":true,"types":["wasi_common::fs::file::File"]},{"text":"impl UnwindSafe for FileType","synthetic":true,"types":["wasi_common::fs::file_type::FileType"]},{"text":"impl UnwindSafe for Metadata","synthetic":true,"types":["wasi_common::fs::metadata::Metadata"]},{"text":"impl UnwindSafe for OpenOptions","synthetic":true,"types":["wasi_common::fs::open_options::OpenOptions"]},{"text":"impl UnwindSafe for Permissions","synthetic":true,"types":["wasi_common::fs::permissions::Permissions"]},{"text":"impl UnwindSafe for ReadDir","synthetic":true,"types":["wasi_common::fs::readdir::ReadDir"]},{"text":"impl UnwindSafe for WasiCtx","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtx"]},{"text":"impl UnwindSafe for WasiCtxBuilder","synthetic":true,"types":["wasi_common::old::snapshot_0::ctx::WasiCtxBuilder"]},{"text":"impl UnwindSafe for __wasi_dirent_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_dirent_t"]},{"text":"impl UnwindSafe for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t"]},{"text":"impl UnwindSafe for __wasi_filestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_filestat_t"]},{"text":"impl UnwindSafe for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl UnwindSafe for __wasi_event_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_t"]},{"text":"impl UnwindSafe for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t"]},{"text":"impl UnwindSafe for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl UnwindSafe for __wasi_subscription_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_t"]},{"text":"impl UnwindSafe for __wasi_event_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_event_u_t"]},{"text":"impl UnwindSafe for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi::__wasi_subscription_u_t"]},{"text":"impl UnwindSafe for __wasi_iovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t"]},{"text":"impl UnwindSafe for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t"]},{"text":"impl UnwindSafe for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t"]},{"text":"impl UnwindSafe for __wasi_prestat_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_t"]},{"text":"impl UnwindSafe for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::old::snapshot_0::wasi32::__wasi_prestat_u_t"]},{"text":"impl UnwindSafe for __wasi_dirent_t","synthetic":true,"types":["wasi_common::wasi::__wasi_dirent_t"]},{"text":"impl UnwindSafe for __wasi_fdstat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_fdstat_t"]},{"text":"impl UnwindSafe for __wasi_filestat_t","synthetic":true,"types":["wasi_common::wasi::__wasi_filestat_t"]},{"text":"impl UnwindSafe for __wasi_event_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_fd_readwrite_t"]},{"text":"impl UnwindSafe for __wasi_event_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_t"]},{"text":"impl UnwindSafe for __wasi_subscription_clock_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_clock_t"]},{"text":"impl UnwindSafe for __wasi_subscription_fd_readwrite_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_fd_readwrite_t"]},{"text":"impl UnwindSafe for __wasi_subscription_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_t"]},{"text":"impl UnwindSafe for __wasi_event_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_event_u_t"]},{"text":"impl UnwindSafe for __wasi_subscription_u_t","synthetic":true,"types":["wasi_common::wasi::__wasi_subscription_u_t"]},{"text":"impl UnwindSafe for __wasi_iovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_iovec_t"]},{"text":"impl UnwindSafe for __wasi_ciovec_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_ciovec_t"]},{"text":"impl UnwindSafe for __wasi_prestat_dir_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_dir_t"]},{"text":"impl UnwindSafe for __wasi_prestat_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_t"]},{"text":"impl UnwindSafe for __wasi_prestat_u_t","synthetic":true,"types":["wasi_common::wasi32::__wasi_prestat_u_t"]}]; +implementors["wasmtime"] = [{"text":"impl !UnwindSafe for Global","synthetic":true,"types":["wasmtime::externals::Global"]},{"text":"impl !UnwindSafe for Table","synthetic":true,"types":["wasmtime::externals::Table"]},{"text":"impl !UnwindSafe for Memory","synthetic":true,"types":["wasmtime::externals::Memory"]},{"text":"impl UnwindSafe for FrameInfo","synthetic":true,"types":["wasmtime::frame_info::FrameInfo"]},{"text":"impl !UnwindSafe for Func","synthetic":true,"types":["wasmtime::func::Func"]},{"text":"impl !UnwindSafe for Instance","synthetic":true,"types":["wasmtime::instance::Instance"]},{"text":"impl !UnwindSafe for Module","synthetic":true,"types":["wasmtime::module::Module"]},{"text":"impl<T> !UnwindSafe for HostRef<T>","synthetic":true,"types":["wasmtime::ref::HostRef"]},{"text":"impl UnwindSafe for Config","synthetic":true,"types":["wasmtime::runtime::Config"]},{"text":"impl UnwindSafe for Engine","synthetic":true,"types":["wasmtime::runtime::Engine"]},{"text":"impl !UnwindSafe for Store","synthetic":true,"types":["wasmtime::runtime::Store"]},{"text":"impl UnwindSafe for Trap","synthetic":true,"types":["wasmtime::trap::Trap"]},{"text":"impl UnwindSafe for Limits","synthetic":true,"types":["wasmtime::types::Limits"]},{"text":"impl UnwindSafe for FuncType","synthetic":true,"types":["wasmtime::types::FuncType"]},{"text":"impl UnwindSafe for GlobalType","synthetic":true,"types":["wasmtime::types::GlobalType"]},{"text":"impl UnwindSafe for TableType","synthetic":true,"types":["wasmtime::types::TableType"]},{"text":"impl UnwindSafe for MemoryType","synthetic":true,"types":["wasmtime::types::MemoryType"]},{"text":"impl UnwindSafe for ImportType","synthetic":true,"types":["wasmtime::types::ImportType"]},{"text":"impl UnwindSafe for ExportType","synthetic":true,"types":["wasmtime::types::ExportType"]},{"text":"impl !UnwindSafe for Extern","synthetic":true,"types":["wasmtime::externals::Extern"]},{"text":"impl !UnwindSafe for AnyRef","synthetic":true,"types":["wasmtime::ref::AnyRef"]},{"text":"impl UnwindSafe for OptLevel","synthetic":true,"types":["wasmtime::runtime::OptLevel"]},{"text":"impl UnwindSafe for Strategy","synthetic":true,"types":["wasmtime::runtime::Strategy"]},{"text":"impl UnwindSafe for Mutability","synthetic":true,"types":["wasmtime::types::Mutability"]},{"text":"impl UnwindSafe for ValType","synthetic":true,"types":["wasmtime::types::ValType"]},{"text":"impl UnwindSafe for ExternType","synthetic":true,"types":["wasmtime::types::ExternType"]},{"text":"impl !UnwindSafe for Val","synthetic":true,"types":["wasmtime::values::Val"]}]; +implementors["wasmtime_debug"] = [{"text":"impl<'a> UnwindSafe for DebugInfoData<'a>","synthetic":true,"types":["wasmtime_debug::read_debuginfo::DebugInfoData"]},{"text":"impl UnwindSafe for WasmFileInfo","synthetic":true,"types":["wasmtime_debug::read_debuginfo::WasmFileInfo"]},{"text":"impl UnwindSafe for ResolvedSymbol","synthetic":true,"types":["wasmtime_debug::write_debuginfo::ResolvedSymbol"]}]; +implementors["wasmtime_environ"] = [{"text":"impl UnwindSafe for FunctionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::FunctionAddressMap"]},{"text":"impl UnwindSafe for InstructionAddressMap","synthetic":true,"types":["wasmtime_environ::address_map::InstructionAddressMap"]},{"text":"impl UnwindSafe for ModuleVmctxInfo","synthetic":true,"types":["wasmtime_environ::address_map::ModuleVmctxInfo"]},{"text":"impl UnwindSafe for CacheConfig","synthetic":true,"types":["wasmtime_environ::cache::config::CacheConfig"]},{"text":"impl UnwindSafe for Compilation","synthetic":true,"types":["wasmtime_environ::compilation::Compilation"]},{"text":"impl UnwindSafe for CompiledFunction","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunction"]},{"text":"impl UnwindSafe for CompiledFunctionUnwindInfoReloc","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfoReloc"]},{"text":"impl UnwindSafe for Relocation","synthetic":true,"types":["wasmtime_environ::compilation::Relocation"]},{"text":"impl UnwindSafe for TrapInformation","synthetic":true,"types":["wasmtime_environ::compilation::TrapInformation"]},{"text":"impl UnwindSafe for BuiltinFunctionIndex","synthetic":true,"types":["wasmtime_environ::func_environ::BuiltinFunctionIndex"]},{"text":"impl UnwindSafe for MemoryPlan","synthetic":true,"types":["wasmtime_environ::module::MemoryPlan"]},{"text":"impl UnwindSafe for Module","synthetic":true,"types":["wasmtime_environ::module::Module"]},{"text":"impl UnwindSafe for TableElements","synthetic":true,"types":["wasmtime_environ::module::TableElements"]},{"text":"impl UnwindSafe for TablePlan","synthetic":true,"types":["wasmtime_environ::module::TablePlan"]},{"text":"impl<'data> UnwindSafe for DataInitializer<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializer"]},{"text":"impl UnwindSafe for DataInitializerLocation","synthetic":true,"types":["wasmtime_environ::module_environ::DataInitializerLocation"]},{"text":"impl<'a> UnwindSafe for FunctionBodyData<'a>","synthetic":true,"types":["wasmtime_environ::module_environ::FunctionBodyData"]},{"text":"impl<'data> UnwindSafe for ModuleEnvironment<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleEnvironment"]},{"text":"impl<'data> UnwindSafe for ModuleTranslation<'data>","synthetic":true,"types":["wasmtime_environ::module_environ::ModuleTranslation"]},{"text":"impl UnwindSafe for Tunables","synthetic":true,"types":["wasmtime_environ::tunables::Tunables"]},{"text":"impl UnwindSafe for TargetSharedSignatureIndex","synthetic":true,"types":["wasmtime_environ::vmoffsets::TargetSharedSignatureIndex"]},{"text":"impl UnwindSafe for VMOffsets","synthetic":true,"types":["wasmtime_environ::vmoffsets::VMOffsets"]},{"text":"impl UnwindSafe for ModuleMemoryOffset","synthetic":true,"types":["wasmtime_environ::address_map::ModuleMemoryOffset"]},{"text":"impl UnwindSafe for CompileError","synthetic":true,"types":["wasmtime_environ::compilation::CompileError"]},{"text":"impl UnwindSafe for CompiledFunctionUnwindInfo","synthetic":true,"types":["wasmtime_environ::compilation::CompiledFunctionUnwindInfo"]},{"text":"impl UnwindSafe for RelocationTarget","synthetic":true,"types":["wasmtime_environ::compilation::RelocationTarget"]},{"text":"impl UnwindSafe for Export","synthetic":true,"types":["wasmtime_environ::module::Export"]},{"text":"impl UnwindSafe for MemoryStyle","synthetic":true,"types":["wasmtime_environ::module::MemoryStyle"]},{"text":"impl UnwindSafe for TableStyle","synthetic":true,"types":["wasmtime_environ::module::TableStyle"]},{"text":"impl UnwindSafe for RelocSink","synthetic":true,"types":["wasmtime_environ::cranelift::RelocSink"]},{"text":"impl UnwindSafe for Cranelift","synthetic":true,"types":["wasmtime_environ::cranelift::Cranelift"]}]; +implementors["wasmtime_fuzzing"] = [{"text":"impl UnwindSafe for WasmOptTtf","synthetic":true,"types":["wasmtime_fuzzing::generators::WasmOptTtf"]},{"text":"impl UnwindSafe for DifferentialConfig","synthetic":true,"types":["wasmtime_fuzzing::generators::DifferentialConfig"]},{"text":"impl UnwindSafe for ApiCalls","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCalls"]},{"text":"impl UnwindSafe for ApiCall","synthetic":true,"types":["wasmtime_fuzzing::generators::api::ApiCall"]},{"text":"impl UnwindSafe for DummyFunc","synthetic":true,"types":["wasmtime_fuzzing::oracles::dummy::DummyFunc"]}]; +implementors["wasmtime_interface_types"] = [{"text":"impl !UnwindSafe for ModuleData","synthetic":true,"types":["wasmtime_interface_types::ModuleData"]},{"text":"impl<'a> UnwindSafe for ExportBinding<'a>","synthetic":true,"types":["wasmtime_interface_types::ExportBinding"]},{"text":"impl UnwindSafe for Value","synthetic":true,"types":["wasmtime_interface_types::value::Value"]}]; +implementors["wasmtime_jit"] = [{"text":"impl UnwindSafe for CodeMemory","synthetic":true,"types":["wasmtime_jit::code_memory::CodeMemory"]},{"text":"impl !UnwindSafe for Compiler","synthetic":true,"types":["wasmtime_jit::compiler::Compiler"]},{"text":"impl UnwindSafe for CompiledModule","synthetic":true,"types":["wasmtime_jit::instantiate::CompiledModule"]},{"text":"impl UnwindSafe for NullResolver","synthetic":true,"types":["wasmtime_jit::resolver::NullResolver"]},{"text":"impl UnwindSafe for CompilationStrategy","synthetic":true,"types":["wasmtime_jit::compiler::CompilationStrategy"]},{"text":"impl !UnwindSafe for SetupError","synthetic":true,"types":["wasmtime_jit::instantiate::SetupError"]},{"text":"impl UnwindSafe for TrampolineRelocSink","synthetic":true,"types":["wasmtime_jit::trampoline::binemit::TrampolineRelocSink"]}]; +implementors["wasmtime_runtime"] = [{"text":"impl !UnwindSafe for Imports","synthetic":true,"types":["wasmtime_runtime::imports::Imports"]},{"text":"impl !UnwindSafe for InstanceHandle","synthetic":true,"types":["wasmtime_runtime::instance::InstanceHandle"]},{"text":"impl UnwindSafe for LinkError","synthetic":true,"types":["wasmtime_runtime::instance::LinkError"]},{"text":"impl UnwindSafe for GdbJitImageRegistration","synthetic":true,"types":["wasmtime_runtime::jit_int::GdbJitImageRegistration"]},{"text":"impl UnwindSafe for Mmap","synthetic":true,"types":["wasmtime_runtime::mmap::Mmap"]},{"text":"impl UnwindSafe for SignatureRegistry","synthetic":true,"types":["wasmtime_runtime::sig_registry::SignatureRegistry"]},{"text":"impl UnwindSafe for TrapDescription","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapDescription"]},{"text":"impl UnwindSafe for TrapRegistration","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistration"]},{"text":"impl UnwindSafe for TrapRegistry","synthetic":true,"types":["wasmtime_runtime::trap_registry::TrapRegistry"]},{"text":"impl UnwindSafe for VMCallerCheckedAnyfunc","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMCallerCheckedAnyfunc"]},{"text":"impl UnwindSafe for VMContext","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMContext"]},{"text":"impl UnwindSafe for VMFunctionBody","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionBody"]},{"text":"impl UnwindSafe for VMFunctionImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMFunctionImport"]},{"text":"impl UnwindSafe for VMGlobalDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalDefinition"]},{"text":"impl UnwindSafe for VMGlobalImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMGlobalImport"]},{"text":"impl UnwindSafe for VMInvokeArgument","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMInvokeArgument"]},{"text":"impl UnwindSafe for VMMemoryDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryDefinition"]},{"text":"impl UnwindSafe for VMMemoryImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMMemoryImport"]},{"text":"impl UnwindSafe for VMSharedSignatureIndex","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMSharedSignatureIndex"]},{"text":"impl UnwindSafe for VMTableDefinition","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableDefinition"]},{"text":"impl UnwindSafe for VMTableImport","synthetic":true,"types":["wasmtime_runtime::vmcontext::VMTableImport"]},{"text":"impl UnwindSafe for Export","synthetic":true,"types":["wasmtime_runtime::export::Export"]},{"text":"impl !UnwindSafe for InstantiationError","synthetic":true,"types":["wasmtime_runtime::instance::InstantiationError"]},{"text":"impl !UnwindSafe for Trap","synthetic":true,"types":["wasmtime_runtime::traphandlers::Trap"]}]; +implementors["wasmtime_wasi"] = [{"text":"impl !UnwindSafe for Wasi","synthetic":true,"types":["wasmtime_wasi::Wasi"]},{"text":"impl !UnwindSafe for Wasi","synthetic":true,"types":["wasmtime_wasi::old::snapshot_0::Wasi"]}]; +implementors["wasmtime_wast"] = [{"text":"impl !UnwindSafe for WastContext","synthetic":true,"types":["wasmtime_wast::wast::WastContext"]}]; +implementors["yanix"] = [{"text":"impl UnwindSafe for Errno","synthetic":true,"types":["yanix::errno::Errno"]},{"text":"impl UnwindSafe for YanixError","synthetic":true,"types":["yanix::YanixError"]},{"text":"impl UnwindSafe for ClockId","synthetic":true,"types":["yanix::clock::ClockId"]},{"text":"impl UnwindSafe for Dir","synthetic":true,"types":["yanix::dir::Dir"]},{"text":"impl UnwindSafe for Entry","synthetic":true,"types":["yanix::dir::Entry"]},{"text":"impl UnwindSafe for SeekLoc","synthetic":true,"types":["yanix::dir::SeekLoc"]},{"text":"impl<T> UnwindSafe for DirIter<T> where
    T: UnwindSafe
","synthetic":true,"types":["yanix::dir::DirIter"]},{"text":"impl UnwindSafe for FileType","synthetic":true,"types":["yanix::dir::FileType"]},{"text":"impl UnwindSafe for FdFlag","synthetic":true,"types":["yanix::file::FdFlag"]},{"text":"impl UnwindSafe for AtFlag","synthetic":true,"types":["yanix::file::AtFlag"]},{"text":"impl UnwindSafe for Mode","synthetic":true,"types":["yanix::file::Mode"]},{"text":"impl UnwindSafe for OFlag","synthetic":true,"types":["yanix::file::OFlag"]},{"text":"impl UnwindSafe for SFlag","synthetic":true,"types":["yanix::file::SFlag"]},{"text":"impl UnwindSafe for PollFlags","synthetic":true,"types":["yanix::poll::PollFlags"]},{"text":"impl UnwindSafe for PollFd","synthetic":true,"types":["yanix::poll::PollFd"]},{"text":"impl UnwindSafe for SockType","synthetic":true,"types":["yanix::socket::SockType"]},{"text":"impl UnwindSafe for PosixFadviseAdvice","synthetic":true,"types":["yanix::sys::linux::fadvise::PosixFadviseAdvice"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/std/sys/unix/ext/io/trait.AsRawFd.js b/api/implementors/std/sys/unix/ext/io/trait.AsRawFd.js new file mode 100644 index 000000000000..543b033f29f4 --- /dev/null +++ b/api/implementors/std/sys/unix/ext/io/trait.AsRawFd.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = [{"text":"impl AsRawFd for Dir","synthetic":false,"types":["yanix::dir::Dir"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/wasmtime/callable/trait.Callable.js b/api/implementors/wasmtime/callable/trait.Callable.js new file mode 100644 index 000000000000..0be85cae24ee --- /dev/null +++ b/api/implementors/wasmtime/callable/trait.Callable.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_fuzzing"] = [{"text":"impl Callable for DummyFunc","synthetic":false,"types":["wasmtime_fuzzing::oracles::dummy::DummyFunc"]}]; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/wasmtime/trait.WasmRet.js b/api/implementors/wasmtime/trait.WasmRet.js new file mode 100644 index 000000000000..5264149c7f95 --- /dev/null +++ b/api/implementors/wasmtime/trait.WasmRet.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/wasmtime/trait.WasmTy.js b/api/implementors/wasmtime/trait.WasmTy.js new file mode 100644 index 000000000000..5264149c7f95 --- /dev/null +++ b/api/implementors/wasmtime/trait.WasmTy.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/wasmtime/unix/trait.InstanceExt.js b/api/implementors/wasmtime/unix/trait.InstanceExt.js new file mode 100644 index 000000000000..5264149c7f95 --- /dev/null +++ b/api/implementors/wasmtime/unix/trait.InstanceExt.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/wasmtime_environ/entity/trait.EntityRef.js b/api/implementors/wasmtime_environ/entity/trait.EntityRef.js new file mode 100644 index 000000000000..b37af8d7eb7e --- /dev/null +++ b/api/implementors/wasmtime_environ/entity/trait.EntityRef.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_environ"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/wasmtime_environ/settings/trait.Configurable.js b/api/implementors/wasmtime_environ/settings/trait.Configurable.js new file mode 100644 index 000000000000..b37af8d7eb7e --- /dev/null +++ b/api/implementors/wasmtime_environ/settings/trait.Configurable.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_environ"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/wasmtime_environ/trait.Compiler.js b/api/implementors/wasmtime_environ/trait.Compiler.js new file mode 100644 index 000000000000..b37af8d7eb7e --- /dev/null +++ b/api/implementors/wasmtime_environ/trait.Compiler.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_environ"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/wasmtime_jit/trait.Resolver.js b/api/implementors/wasmtime_jit/trait.Resolver.js new file mode 100644 index 000000000000..6c7f7fd2a518 --- /dev/null +++ b/api/implementors/wasmtime_jit/trait.Resolver.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_jit"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/wasmtime_jit/trampoline/binemit/trait.TrapSink.js b/api/implementors/wasmtime_jit/trampoline/binemit/trait.TrapSink.js new file mode 100644 index 000000000000..6c7f7fd2a518 --- /dev/null +++ b/api/implementors/wasmtime_jit/trampoline/binemit/trait.TrapSink.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_jit"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/wasmtime_jit/trampoline/ir/trait.InstBuilder.js b/api/implementors/wasmtime_jit/trampoline/ir/trait.InstBuilder.js new file mode 100644 index 000000000000..6c7f7fd2a518 --- /dev/null +++ b/api/implementors/wasmtime_jit/trampoline/ir/trait.InstBuilder.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["wasmtime_jit"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/implementors/yanix/dir/trait.EntryExt.js b/api/implementors/yanix/dir/trait.EntryExt.js new file mode 100644 index 000000000000..ffdfb7b43ea2 --- /dev/null +++ b/api/implementors/yanix/dir/trait.EntryExt.js @@ -0,0 +1,3 @@ +(function() {var implementors = {}; +implementors["yanix"] = []; +if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})() \ No newline at end of file diff --git a/api/light.css b/api/light.css new file mode 100644 index 000000000000..5d03b7a446d0 --- /dev/null +++ b/api/light.css @@ -0,0 +1 @@ + body{background-color:white;color:black;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){color:black;}h1.fqn{border-bottom-color:#D5D5D5;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod){border-bottom-color:#DDDDDD;}.in-band{background-color:white;}.invisible{background:rgba(0,0,0,0);}.docblock code,.docblock-short code{background-color:#F5F5F5;}pre{background-color:#F5F5F5;}.sidebar{background-color:#F1F1F1;}.sidebar .current{background-color:#fff;}.source .sidebar{background-color:#fff;}.sidebar .location{border-color:#000;background-color:#fff;color:#333;}.sidebar .version{border-bottom-color:#DDD;}.sidebar-title{border-top-color:#777;border-bottom-color:#777;}.block a:hover{background:#F5F5F5;}.line-numbers span{color:#c67e2d;}.line-numbers .line-highlighted{background-color:#f6fdb0 !important;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom-color:#ddd;}.docblock table,.docblock table td,.docblock table th{border-color:#ddd;}.content .method .where,.content .fn .where,.content .where.fmt-newline{color:#4E4C4C;}.content .highlighted{color:#000 !important;background-color:#ccc;}.content .highlighted a,.content .highlighted span{color:#000 !important;}.content .highlighted.trait{background-color:#c7b6ff;}.content .highlighted.traitalias{background-color:#c7b6ff;}.content .highlighted.mod,.content .highlighted.externcrate{background-color:#afc6e4;}.content .highlighted.enum{background-color:#b4d1b9;}.content .highlighted.struct{background-color:#e7b1a0;}.content .highlighted.union{background-color:#b7bd49;}.content .highlighted.fn,.content .highlighted.method,.content .highlighted.tymethod{background-color:#c6afb3;}.content .highlighted.type{background-color:#ffc891;}.content .highlighted.foreigntype{background-color:#f5c4ff;}.content .highlighted.attr,.content .highlighted.derive,.content .highlighted.macro{background-color:#8ce488;}.content .highlighted.constant,.content .highlighted.static{background-color:#c3e0ff;}.content .highlighted.primitive{background-color:#9aecff;}.content .highlighted.keyword{background-color:#f99650;}.content .stability::before{color:#ccc;}.content span.enum,.content a.enum,.block a.current.enum{color:#508157;}.content span.struct,.content a.struct,.block a.current.struct{color:#ad448e;}.content span.type,.content a.type,.block a.current.type{color:#ba5d00;}.content span.foreigntype,.content a.foreigntype,.block a.current.foreigntype{color:#cd00e2;}.content span.attr,.content a.attr,.block a.current.attr,.content span.derive,.content a.derive,.block a.current.derive,.content span.macro,.content a.macro,.block a.current.macro{color:#068000;}.content span.union,.content a.union,.block a.current.union{color:#767b27;}.content span.constant,.content a.constant,.block a.current.constant,.content span.static,.content a.static,.block a.current.static{color:#546e8a;}.content span.primitive,.content a.primitive,.block a.current.primitive{color:#2c8093;}.content span.externcrate,.content span.mod,.content a.mod,.block a.current.mod{color:#4d76ae;}.content span.trait,.content a.trait,.block a.current.trait{color:#7c5af3;}.content span.traitalias,.content a.traitalias,.block a.current.traitalias{color:#6841f1;}.content span.fn,.content a.fn,.block a.current.fn,.content span.method,.content a.method,.block a.current.method,.content span.tymethod,.content a.tymethod,.block a.current.tymethod,.content .fnname{color:#9a6e31;}.content span.keyword,.content a.keyword,.block a.current.keyword{color:#de5249;}pre.rust .comment{color:#8E908C;}pre.rust .doccomment{color:#4D4D4C;}nav:not(.sidebar){border-bottom-color:#e0e0e0;}nav.main .current{border-top-color:#000;border-bottom-color:#000;}nav.main .separator{border:1px solid #000;}a{color:#000;}.docblock:not(.type-decl) a:not(.srclink):not(.test-arrow),.docblock-short a:not(.srclink):not(.test-arrow),.stability a{color:#3873AD;}.stab.internal a{color:#304FFE;}a.test-arrow{color:#f5f5f5;}.collapse-toggle{color:#999;}#crate-search{color:#555;background-color:white;border-color:#e0e0e0;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input{color:#555;background-color:white;box-shadow:0 0 0 1px #e0e0e0,0 0 0 2px transparent;}.search-input:focus{border-color:#66afe9;}.search-focus:disabled{background-color:#e6e6e6;}#crate-search+.search-input:focus{box-shadow:0 0 8px #078dd8;}.module-item .stab{color:#000;}.stab.unstable{background:#FFF5D6;border-color:#FFC600;}.stab.internal{background:#FFB9B3;border-color:#B71C1C;}.stab.deprecated{background:#F3DFFF;border-color:#7F0087;}.stab.portability{background:#C4ECFF;border-color:#7BA5DB;}.stab.portability>code{color:#000;}#help>div{background:#e9e9e9;border-color:#bfbfbf;}.since{color:grey;}tr.result span.primitive::after,tr.result span.keyword::after{color:black;}.line-numbers :target{background-color:transparent;}pre.rust .kw{color:#8959A8;}pre.rust .kw-2,pre.rust .prelude-ty{color:#4271AE;}pre.rust .number,pre.rust .string{color:#718C00;}pre.rust .self,pre.rust .bool-val,pre.rust .prelude-val,pre.rust .attribute,pre.rust .attribute .ident{color:#C82829;}pre.rust .macro,pre.rust .macro-nonterminal{color:#3E999F;}pre.rust .lifetime{color:#B76514;}pre.rust .question-mark{color:#ff9011;}.example-wrap>pre.line-number{border-color:#c7c7c7;}a.test-arrow{background-color:rgba(78,139,202,0.2);}a.test-arrow:hover{background-color:#4e8bca;}.toggle-label{color:#999;}:target>code,:target>.in-band{background:#FDFFD3;}pre.compile_fail{border-left:2px solid rgba(255,0,0,.4);}pre.compile_fail:hover,.information:hover+pre.compile_fail{border-left:2px solid #f00;}pre.ignore{border-left:2px solid rgba(255,142,0,.4);}pre.ignore:hover,.information:hover+pre.ignore{border-left:2px solid #ff9200;}.tooltip.compile_fail{color:rgba(255,0,0,.3);}.information>.compile_fail:hover{color:#f00;}.tooltip.ignore{color:rgba(255,142,0,.3);}.information>.ignore:hover{color:rgba(255,142,0,1);}.search-failed a{color:#0089ff;}.tooltip .tooltiptext{background-color:black;color:#fff;}.tooltip .tooltiptext::after{border-color:transparent black transparent transparent;}.important-traits .tooltip .tooltiptext{background-color:white;color:black;border-color:black;}#titles>div:not(.selected){background-color:#e6e6e6;border-top-color:#e6e6e6;}#titles>div:hover,#titles>div.selected{border-top-color:#0089ff;}#titles>div>div.count{color:#888;}.modal{background-color:rgba(0,0,0,0.3);}.modal-content{background-color:#eee;border-color:#999;}.modal-content>.close{background-color:#eee;border-color:#999;}.modal-content>.close:hover{background-color:#ff1f1f;color:white;}.modal-content>.whiter{background-color:#eee;}.modal-content>.close:hover+.whiter{background-color:#ff1f1f;}@media (max-width:700px){.sidebar-menu{background-color:#F1F1F1;border-bottom-color:#e0e0e0;border-right-color:#e0e0e0;}.sidebar-elems{background-color:#F1F1F1;border-right-color:#000;}#sidebar-filler{background-color:#F1F1F1;border-bottom-color:#e0e0e0;}}kbd{color:#000;background-color:#fafbfc;border-color:#d1d5da;border-bottom-color:#c6cbd1;box-shadow-color:#c6cbd1;}#theme-picker,#settings-menu{border-color:#e0e0e0;background-color:#fff;}#theme-picker:hover,#theme-picker:focus,#settings-menu:hover,#settings-menu:focus{border-color:#717171;}#theme-choices{border-color:#ccc;background-color:#fff;}#theme-choices>button:not(:first-child){border-top-color:#e0e0e0;}#theme-choices>button:hover,#theme-choices>button:focus{background-color:#eee;}@media (max-width:700px){#theme-picker{background:#fff;}}#all-types{background-color:#fff;}#all-types:hover{background-color:#f9f9f9;}.search-results td span.alias{color:#000;}.search-results td span.grey{color:#999;}#sidebar-toggle{background-color:#F1F1F1;}#sidebar-toggle:hover{background-color:#E0E0E0;}#source-sidebar{background-color:#F1F1F1;}#source-sidebar>.title{border-bottom-color:#ccc;}div.files>a:hover,div.name:hover{background-color:#E0E0E0;}div.files>.selected{background-color:#fff;}.setting-line>.title{border-bottom-color:#D5D5D5;} \ No newline at end of file diff --git a/api/lightbeam/all.html b/api/lightbeam/all.html new file mode 100644 index 000000000000..7caeefffacc2 --- /dev/null +++ b/api/lightbeam/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Enums

Traits

Functions

\ No newline at end of file diff --git a/api/lightbeam/backend/struct.CodeGenSession.html b/api/lightbeam/backend/struct.CodeGenSession.html new file mode 100644 index 000000000000..4d1d3f2fb4ac --- /dev/null +++ b/api/lightbeam/backend/struct.CodeGenSession.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../lightbeam/struct.CodeGenSession.html...

+ + + \ No newline at end of file diff --git a/api/lightbeam/enum.ExecutionError.html b/api/lightbeam/enum.ExecutionError.html new file mode 100644 index 000000000000..a23200bf9bab --- /dev/null +++ b/api/lightbeam/enum.ExecutionError.html @@ -0,0 +1,33 @@ +lightbeam::ExecutionError - Rust

[][src]Enum lightbeam::ExecutionError

pub enum ExecutionError {
+    FuncIndexOutOfBounds,
+    TypeMismatch,
+}

+ Variants

+
FuncIndexOutOfBounds
TypeMismatch

Trait Implementations

impl Clone for ExecutionError[src]

impl Copy for ExecutionError[src]

impl Debug for ExecutionError[src]

impl Display for ExecutionError[src]

impl Eq for ExecutionError[src]

impl Error for ExecutionError[src]

impl PartialEq<ExecutionError> for ExecutionError[src]

impl StructuralEq for ExecutionError[src]

impl StructuralPartialEq for ExecutionError[src]

Auto Trait Implementations

impl RefUnwindSafe for ExecutionError

impl Send for ExecutionError

impl Sync for ExecutionError

impl Unpin for ExecutionError

impl UnwindSafe for ExecutionError

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<T> UnsafeAny for T where
    T: Any

\ No newline at end of file diff --git a/api/lightbeam/fn.translate.html b/api/lightbeam/fn.translate.html new file mode 100644 index 000000000000..5e8d3d3a57d3 --- /dev/null +++ b/api/lightbeam/fn.translate.html @@ -0,0 +1 @@ +lightbeam::translate - Rust

[][src]Function lightbeam::translate

pub fn translate(data: &[u8]) -> Result<ExecutableModule, Error>
\ No newline at end of file diff --git a/api/lightbeam/fn.translate_function.html b/api/lightbeam/fn.translate_function.html new file mode 100644 index 000000000000..fe64ac8e73d9 --- /dev/null +++ b/api/lightbeam/fn.translate_function.html @@ -0,0 +1 @@ +lightbeam::translate_function - Rust

[][src]Function lightbeam::translate_function

pub fn translate_function<M>(
    session: &mut CodeGenSession<M>,
    reloc_sink: &mut dyn RelocSink,
    func_idx: u32,
    body: &FunctionBody
) -> Result<(), Error> where
    M: ModuleContext,
    &'any M::Signature: Into<OpSig>, 
\ No newline at end of file diff --git a/api/lightbeam/function_body/fn.translate_wasm.html b/api/lightbeam/function_body/fn.translate_wasm.html new file mode 100644 index 000000000000..bf0620a85b59 --- /dev/null +++ b/api/lightbeam/function_body/fn.translate_wasm.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../lightbeam/fn.translate_function.html...

+ + + \ No newline at end of file diff --git a/api/lightbeam/index.html b/api/lightbeam/index.html new file mode 100644 index 000000000000..753f1c3bf851 --- /dev/null +++ b/api/lightbeam/index.html @@ -0,0 +1,5 @@ +lightbeam - Rust

[][src]Crate lightbeam

Structs

+
CodeGenSession
ExecutableModule
TranslatedModule

Enums

+
ExecutionError

Traits

+
ModuleContext
Signature

Functions

+
translate
translate_function
\ No newline at end of file diff --git a/api/lightbeam/module/enum.ExecutionError.html b/api/lightbeam/module/enum.ExecutionError.html new file mode 100644 index 000000000000..b073dea99f98 --- /dev/null +++ b/api/lightbeam/module/enum.ExecutionError.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../lightbeam/enum.ExecutionError.html...

+ + + \ No newline at end of file diff --git a/api/lightbeam/module/fn.translate.html b/api/lightbeam/module/fn.translate.html new file mode 100644 index 000000000000..e31e0e0826cc --- /dev/null +++ b/api/lightbeam/module/fn.translate.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../lightbeam/fn.translate.html...

+ + + \ No newline at end of file diff --git a/api/lightbeam/module/struct.ExecutableModule.html b/api/lightbeam/module/struct.ExecutableModule.html new file mode 100644 index 000000000000..ea1e0b9990ac --- /dev/null +++ b/api/lightbeam/module/struct.ExecutableModule.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../lightbeam/struct.ExecutableModule.html...

+ + + \ No newline at end of file diff --git a/api/lightbeam/module/struct.TranslatedModule.html b/api/lightbeam/module/struct.TranslatedModule.html new file mode 100644 index 000000000000..51243b5ae32e --- /dev/null +++ b/api/lightbeam/module/struct.TranslatedModule.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../lightbeam/struct.TranslatedModule.html...

+ + + \ No newline at end of file diff --git a/api/lightbeam/module/trait.ModuleContext.html b/api/lightbeam/module/trait.ModuleContext.html new file mode 100644 index 000000000000..2ee21ee27257 --- /dev/null +++ b/api/lightbeam/module/trait.ModuleContext.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../lightbeam/trait.ModuleContext.html...

+ + + \ No newline at end of file diff --git a/api/lightbeam/module/trait.Signature.html b/api/lightbeam/module/trait.Signature.html new file mode 100644 index 000000000000..2a2fa08abd90 --- /dev/null +++ b/api/lightbeam/module/trait.Signature.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../lightbeam/trait.Signature.html...

+ + + \ No newline at end of file diff --git a/api/lightbeam/sidebar-items.js b/api/lightbeam/sidebar-items.js new file mode 100644 index 000000000000..731382f2c938 --- /dev/null +++ b/api/lightbeam/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["ExecutionError",""]],"fn":[["translate",""],["translate_function",""]],"struct":[["CodeGenSession",""],["ExecutableModule",""],["TranslatedModule",""]],"trait":[["ModuleContext",""],["Signature",""]]}); \ No newline at end of file diff --git a/api/lightbeam/struct.CodeGenSession.html b/api/lightbeam/struct.CodeGenSession.html new file mode 100644 index 000000000000..aac27fda55ef --- /dev/null +++ b/api/lightbeam/struct.CodeGenSession.html @@ -0,0 +1,15 @@ +lightbeam::CodeGenSession - Rust

[][src]Struct lightbeam::CodeGenSession

pub struct CodeGenSession<'module, M> {
+    pub module_context: &'module M,
+    pub op_offset_map: Vec<(AssemblyOffset, Box<dyn Display + Send + Sync>)>,
+    // some fields omitted
+}

+ Fields

module_context: &'module Mop_offset_map: Vec<(AssemblyOffset, Box<dyn Display + Send + Sync>)>

Methods

impl<'module, M> CodeGenSession<'module, M>[src]

pub fn new(func_count: u32, module_context: &'module M) -> Self[src]

pub fn new_context<'this>(
    &'this mut self,
    func_idx: u32,
    reloc_sink: &'this mut dyn RelocSink
) -> Context<'this, M>
[src]

pub fn into_translated_code_section(
    self
) -> Result<TranslatedCodeSection, Error>
[src]

Auto Trait Implementations

impl<'module, M> !RefUnwindSafe for CodeGenSession<'module, M>

impl<'module, M> !Send for CodeGenSession<'module, M>

impl<'module, M> !Sync for CodeGenSession<'module, M>

impl<'module, M> Unpin for CodeGenSession<'module, M>

impl<'module, M> !UnwindSafe for CodeGenSession<'module, M>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<T> UnsafeAny for T where
    T: Any

\ No newline at end of file diff --git a/api/lightbeam/struct.ExecutableModule.html b/api/lightbeam/struct.ExecutableModule.html new file mode 100644 index 000000000000..d2d309cafb65 --- /dev/null +++ b/api/lightbeam/struct.ExecutableModule.html @@ -0,0 +1,14 @@ +lightbeam::ExecutableModule - Rust

[][src]Struct lightbeam::ExecutableModule

pub struct ExecutableModule { /* fields omitted */ }

Methods

impl ExecutableModule[src]

pub unsafe fn execute_func_unchecked<Args: FunctionArgs<T>, T>(
    &self,
    func_idx: u32,
    args: Args
) -> T
[src]

Executes the function identified by func_idx.

+

Safety

+

Executes the function without checking the argument types. +This can cause undefined memory to be accessed.

+

pub fn execute_func<Args: FunctionArgs<T> + TypeList, T: TypeList>(
    &self,
    func_idx: u32,
    args: Args
) -> Result<T, ExecutionError>
[src]

pub fn disassemble(&self)[src]

Auto Trait Implementations

impl !RefUnwindSafe for ExecutableModule

impl Send for ExecutableModule

impl Sync for ExecutableModule

impl Unpin for ExecutableModule

impl !UnwindSafe for ExecutableModule

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<T> UnsafeAny for T where
    T: Any

\ No newline at end of file diff --git a/api/lightbeam/struct.TranslatedModule.html b/api/lightbeam/struct.TranslatedModule.html new file mode 100644 index 000000000000..a115ec98e967 --- /dev/null +++ b/api/lightbeam/struct.TranslatedModule.html @@ -0,0 +1,11 @@ +lightbeam::TranslatedModule - Rust

[][src]Struct lightbeam::TranslatedModule

pub struct TranslatedModule { /* fields omitted */ }

Methods

impl TranslatedModule[src]

pub fn instantiate(self) -> ExecutableModule[src]

pub fn disassemble(&self)[src]

Trait Implementations

impl Default for TranslatedModule[src]

Auto Trait Implementations

impl !RefUnwindSafe for TranslatedModule

impl Send for TranslatedModule

impl Sync for TranslatedModule

impl Unpin for TranslatedModule

impl !UnwindSafe for TranslatedModule

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+

impl<T> UnsafeAny for T where
    T: Any

\ No newline at end of file diff --git a/api/lightbeam/trait.ModuleContext.html b/api/lightbeam/trait.ModuleContext.html new file mode 100644 index 000000000000..d611e03462ef --- /dev/null +++ b/api/lightbeam/trait.ModuleContext.html @@ -0,0 +1,41 @@ +lightbeam::ModuleContext - Rust

[][src]Trait lightbeam::ModuleContext

pub trait ModuleContext {
+    type Signature: Signature;
+    type GlobalType: SigType;
+    fn vmctx_vmglobal_definition(&self, index: u32) -> u32;
+
fn vmctx_vmglobal_import_from(&self, index: u32) -> u32; +
fn vmctx_vmmemory_import_from(&self, memory_index: u32) -> u32; +
fn vmctx_vmmemory_definition(&self, defined_memory_index: u32) -> u32; +
fn vmctx_vmmemory_definition_base(&self, defined_memory_index: u32) -> u32; +
fn vmctx_vmmemory_definition_current_length(
        &self,
        defined_memory_index: u32
    ) -> u32; +
fn vmmemory_definition_base(&self) -> u8; +
fn vmmemory_definition_current_length(&self) -> u8; +
fn vmctx_vmtable_import_from(&self, table_index: u32) -> u32; +
fn vmctx_vmtable_definition(&self, defined_table_index: u32) -> u32; +
fn vmctx_vmtable_definition_base(&self, defined_table_index: u32) -> u32; +
fn vmctx_vmtable_definition_current_elements(
        &self,
        defined_table_index: u32
    ) -> u32; +
fn vmctx_vmfunction_import_body(&self, func_index: u32) -> u32; +
fn vmctx_vmfunction_import_vmctx(&self, func_index: u32) -> u32; +
fn vmtable_definition_base(&self) -> u8; +
fn vmtable_definition_current_elements(&self) -> u8; +
fn vmctx_vmshared_signature_id(&self, signature_idx: u32) -> u32; +
fn vmcaller_checked_anyfunc_type_index(&self) -> u8; +
fn vmcaller_checked_anyfunc_func_ptr(&self) -> u8; +
fn vmcaller_checked_anyfunc_vmctx(&self) -> u8; +
fn size_of_vmcaller_checked_anyfunc(&self) -> u8; +
fn defined_table_index(&self, table_index: u32) -> Option<u32>; +
fn defined_memory_index(&self, index: u32) -> Option<u32>; +
fn defined_global_index(&self, global_index: u32) -> Option<u32>; +
fn global_type(&self, global_index: u32) -> &Self::GlobalType; +
fn func_type_index(&self, func_idx: u32) -> u32; +
fn signature(&self, index: u32) -> &Self::Signature; +
fn func_index(&self, defined_func_index: u32) -> u32; +
fn defined_func_index(&self, func_index: u32) -> Option<u32>; + + fn defined_func_type(&self, defined_func_idx: u32) -> &Self::Signature { ... } +
fn func_type(&self, func_idx: u32) -> &Self::Signature { ... } +
fn emit_memory_bounds_check(&self) -> bool { ... } +}
+

Associated Types

type Signature: Signature

type GlobalType: SigType

Loading content... +

Required methods

fn vmctx_vmglobal_definition(&self, index: u32) -> u32

fn vmctx_vmglobal_import_from(&self, index: u32) -> u32

fn vmctx_vmmemory_import_from(&self, memory_index: u32) -> u32

fn vmctx_vmmemory_definition(&self, defined_memory_index: u32) -> u32

fn vmctx_vmmemory_definition_base(&self, defined_memory_index: u32) -> u32

fn vmctx_vmmemory_definition_current_length(
    &self,
    defined_memory_index: u32
) -> u32

fn vmmemory_definition_base(&self) -> u8

fn vmmemory_definition_current_length(&self) -> u8

fn vmctx_vmtable_import_from(&self, table_index: u32) -> u32

fn vmctx_vmtable_definition(&self, defined_table_index: u32) -> u32

fn vmctx_vmtable_definition_base(&self, defined_table_index: u32) -> u32

fn vmctx_vmtable_definition_current_elements(
    &self,
    defined_table_index: u32
) -> u32

fn vmctx_vmfunction_import_body(&self, func_index: u32) -> u32

fn vmctx_vmfunction_import_vmctx(&self, func_index: u32) -> u32

fn vmtable_definition_base(&self) -> u8

fn vmtable_definition_current_elements(&self) -> u8

fn vmctx_vmshared_signature_id(&self, signature_idx: u32) -> u32

fn vmcaller_checked_anyfunc_type_index(&self) -> u8

fn vmcaller_checked_anyfunc_func_ptr(&self) -> u8

fn vmcaller_checked_anyfunc_vmctx(&self) -> u8

fn size_of_vmcaller_checked_anyfunc(&self) -> u8

fn defined_table_index(&self, table_index: u32) -> Option<u32>

fn defined_memory_index(&self, index: u32) -> Option<u32>

fn defined_global_index(&self, global_index: u32) -> Option<u32>

fn global_type(&self, global_index: u32) -> &Self::GlobalType

fn func_type_index(&self, func_idx: u32) -> u32

fn signature(&self, index: u32) -> &Self::Signature

fn func_index(&self, defined_func_index: u32) -> u32

fn defined_func_index(&self, func_index: u32) -> Option<u32>

Loading content... +

Provided methods

fn defined_func_type(&self, defined_func_idx: u32) -> &Self::Signature

fn func_type(&self, func_idx: u32) -> &Self::Signature

fn emit_memory_bounds_check(&self) -> bool

Loading content... +

Implementors

Loading content...
\ No newline at end of file diff --git a/api/lightbeam/trait.Signature.html b/api/lightbeam/trait.Signature.html new file mode 100644 index 000000000000..c8a5a614c7fd --- /dev/null +++ b/api/lightbeam/trait.Signature.html @@ -0,0 +1,9 @@ +lightbeam::Signature - Rust

[][src]Trait lightbeam::Signature

pub trait Signature {
+    type Type: SigType;
+    fn params(&self) -> &[Self::Type];
+
fn returns(&self) -> &[Self::Type]; +}
+

Associated Types

type Type: SigType

Loading content... +

Required methods

fn params(&self) -> &[Self::Type]

fn returns(&self) -> &[Self::Type]

Loading content... +

Implementations on Foreign Types

impl Signature for CraneliftSignature[src]

type Type = AbiParam

impl Signature for FuncType[src]

type Type = Type

Loading content... +

Implementors

Loading content...
\ No newline at end of file diff --git a/api/main.js b/api/main.js new file mode 100644 index 000000000000..312124ea00ed --- /dev/null +++ b/api/main.js @@ -0,0 +1,7 @@ +if(!String.prototype.startsWith){String.prototype.startsWith=function(searchString,position){position=position||0;return this.indexOf(searchString,position)===position}}if(!String.prototype.endsWith){String.prototype.endsWith=function(suffix,length){var l=length||this.length;return this.indexOf(suffix,l-suffix.length)!==-1}}if(!DOMTokenList.prototype.add){DOMTokenList.prototype.add=function(className){if(className&&!hasClass(this,className)){if(this.className&&this.className.length>0){this.className+=" "+className}else{this.className=className}}}}if(!DOMTokenList.prototype.remove){DOMTokenList.prototype.remove=function(className){if(className&&this.className){this.className=(" "+this.className+" ").replace(" "+className+" "," ").trim()}}}function getSearchInput(){return document.getElementsByClassName("search-input")[0]}function getSearchElement(){return document.getElementById("search")}(function(){"use strict";var itemTypes=["mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","primitive","associatedtype","constant","associatedconstant","union","foreigntype","keyword","existential","attr","derive","traitalias"];var disableShortcuts=getCurrentValue("rustdoc-disable-shortcuts")==="true";var search_input=getSearchInput();var currentTab=0;var titleBeforeSearch=document.title;function getPageId(){var id=document.location.href.split("#")[1];if(id){return id.split("?")[0].split("&")[0]}return null}function showSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){addClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];if(sidebar){addClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(!filler){var div=document.createElement("div");div.id="sidebar-filler";sidebar.appendChild(div)}}var themePickers=document.getElementsByClassName("theme-picker");if(themePickers&&themePickers.length>0){themePickers[0].style.display="none"}}function hideSidebar(){var elems=document.getElementsByClassName("sidebar-elems")[0];if(elems){removeClass(elems,"show-it")}var sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"mobile");var filler=document.getElementById("sidebar-filler");if(filler){filler.remove()}document.getElementsByTagName("body")[0].style.marginTop="";var themePickers=document.getElementsByClassName("theme-picker");if(themePickers&&themePickers.length>0){themePickers[0].style.display=null}}function showSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(main,"hidden");removeClass(search,"hidden")}function hideSearchResults(search){if(search===null||typeof search==='undefined'){search=getSearchElement()}addClass(search,"hidden");removeClass(main,"hidden")}var TY_PRIMITIVE=itemTypes.indexOf("primitive");var TY_KEYWORD=itemTypes.indexOf("keyword");function getQueryStringParams(){var params={};window.location.search.substring(1).split("&").map(function(s){var pair=s.split("=");params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function isHidden(elem){return elem.offsetHeight===0}var main=document.getElementById("main");var savedHash="";function handleHashes(ev){var search=getSearchElement();if(ev!==null&&search&&!hasClass(search,"hidden")&&ev.newURL){hideSearchResults(search);var hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(hash,"","?search=#"+hash)}var elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}if(savedHash!==window.location.hash){savedHash=window.location.hash;if(savedHash.length===0){return}var elem=document.getElementById(savedHash.slice(1));if(!elem||!isHidden(elem)){return}var parent=elem.parentNode;if(parent&&hasClass(parent,"impl-items")){onEachLazy(parent.getElementsByClassName("collapsed"),function(e){if(e.parentNode===parent){e.click();return true}});if(isHidden(elem)){if(hasClass(parent.lastElementChild,"collapse-toggle")){parent.lastElementChild.click()}}}}}function highlightSourceLines(match,ev){if(typeof match==="undefined"){hideSidebar();match=window.location.hash.match(/^#?(\d+)(?:-(\d+))?$/)}if(!match){return}var from=parseInt(match[1],10);var to=from;if(typeof match[2]!=="undefined"){to=parseInt(match[2],10)}if(to0){collapseDocs(collapses[0],"show")}}}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!="undefined"){return ev.key}var c=ev.charCode||ev.keyCode;if(c==27){return"Escape"}return String.fromCharCode(c)}function getHelpElement(){return document.getElementById("help")}function displayHelp(display,ev,help){var help=help?help:getHelpElement();if(display===true){if(hasClass(help,"hidden")){ev.preventDefault();removeClass(help,"hidden");addClass(document.body,"blur")}}else if(hasClass(help,"hidden")===false){ev.preventDefault();addClass(help,"hidden");removeClass(document.body,"blur")}}function handleEscape(ev){var help=getHelpElement();var search=getSearchElement();hideModal();if(hasClass(help,"hidden")===false){displayHelp(false,ev,help)}else if(hasClass(search,"hidden")===false){ev.preventDefault();hideSearchResults(search);document.title=titleBeforeSearch}defocusSearchBar()}function handleShortcut(ev){if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts===true){return}if(document.activeElement.tagName==="INPUT"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":displayHelp(false,ev);hideModal();ev.preventDefault();focusSearchBar();break;case"+":case"-":ev.preventDefault();toggleAllDocs();break;case"?":if(ev.shiftKey){hideModal();displayHelp(true,ev)}break}}}function findParentElement(elem,tagName){do{if(elem&&elem.tagName===tagName){return elem}elem=elem.parentNode}while(elem);return null}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);var handleSourceHighlight=(function(){var prev_line_id=0;var set_fragment=function(name){var x=window.scrollX,y=window.scrollY;if(browserSupportsHistoryApi()){history.replaceState(null,null,"#"+name);highlightSourceLines()}else{location.replace("#"+name)}window.scrollTo(x,y)};return function(ev){var cur_line_id=parseInt(ev.target.id,10);ev.preventDefault();if(ev.shiftKey&&prev_line_id){if(prev_line_id>cur_line_id){var tmp=prev_line_id;prev_line_id=cur_line_id;cur_line_id=tmp}set_fragment(prev_line_id+"-"+cur_line_id)}else{prev_line_id=cur_line_id;set_fragment(cur_line_id)}}})();document.addEventListener("click",function(ev){if(hasClass(ev.target,"collapse-toggle")){collapseDocs(ev.target,"toggle")}else if(hasClass(ev.target.parentNode,"collapse-toggle")){collapseDocs(ev.target.parentNode,"toggle")}else if(ev.target.tagName==="SPAN"&&hasClass(ev.target.parentNode,"line-numbers")){handleSourceHighlight(ev)}else if(hasClass(getHelpElement(),"hidden")===false){var help=getHelpElement();var is_inside_help_popup=ev.target!==help&&help.contains(ev.target);if(is_inside_help_popup===false){addClass(help,"hidden");removeClass(document.body,"blur")}}else{var a=findParentElement(ev.target,"A");if(a&&a.hash){expandSection(a.hash.replace(/^#/,""))}}});var x=document.getElementsByClassName("version-selector");if(x.length>0){x[0].onchange=function(){var i,match,url=document.location.href,stripped="",len=rootPath.match(/\.\.\//g).length+1;for(i=0;i-1){var obj=searchIndex[results[i].id];obj.lev=results[i].lev;if(isType!==true||obj.type){var res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=obj.displayPath+obj.name;obj.fullPath+="|"+obj.ty;obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}}return out}function sortResults(results,isType){var ar=[];for(var entry in results){if(results.hasOwnProperty(entry)){ar.push(results[entry])}}results=ar;var i;var nresults=results.length;for(i=0;ib?+1:-1)}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}if((aaa.item.ty===TY_PRIMITIVE&&bbb.item.ty!==TY_KEYWORD)||(aaa.item.ty===TY_KEYWORD&&bbb.item.ty!==TY_PRIMITIVE)){return-1}if((bbb.item.ty===TY_PRIMITIVE&&aaa.item.ty!==TY_PRIMITIVE)||(bbb.item.ty===TY_KEYWORD&&aaa.item.ty!==TY_KEYWORD)){return 1}a=(aaa.item.desc==="");b=(bbb.item.desc==="");if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});var length=results.length;for(i=0;i"));return{name:val.substring(0,val.indexOf("<")),generics:values.split(/\s*,\s*/),}}return{name:val,generics:[],}}function checkGenerics(obj,val){var lev_distance=MAX_LEV_DISTANCE+1;if(val.generics.length>0){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var total=0;var done=0;var vlength=val.generics.length;for(var y=0;yGENERICS_DATA&&obj[GENERICS_DATA].length>=val.generics.length){var elems=obj[GENERICS_DATA].slice(0);var allFound=true;for(var y=0;allFound===true&&yGENERICS_DATA&&obj[GENERICS_DATA].length!==0){var tmp_lev=checkGenerics(obj,val);if(tmp_lev<=MAX_LEV_DISTANCE){return tmp_lev}}else{return 0}}if(literalSearch===true){if(obj.length>GENERICS_DATA&&obj[GENERICS_DATA].length>0){var length=obj[GENERICS_DATA].length;for(x=0;xGENERICS_DATA&&obj[GENERICS_DATA].length>0){var olength=obj[GENERICS_DATA].length;for(x=0;x0){var length=obj.type[INPUTS_DATA].length;for(var i=0;iOUTPUT_DATA){var ret=obj.type[OUTPUT_DATA];if(!obj.type[OUTPUT_DATA].length){ret=[ret]}for(var x=0;xlength){return MAX_LEV_DISTANCE+1}for(var i=0;ilength){break}var lev_total=0;var aborted=false;for(var x=0;xMAX_LEV_DISTANCE){aborted=true;break}lev_total+=lev}if(aborted===false){ret_lev=Math.min(ret_lev,Math.round(lev_total/clength))}}return ret_lev}function typePassesFilter(filter,type){if(filter<0)return true;if(filter===type)return true;var name=itemTypes[type];switch(itemTypes[filter]){case"constant":return(name=="associatedconstant");case"fn":return(name=="method"||name=="tymethod");case"type":return(name=="primitive"||name=="keyword")}return false}function generateId(ty){if(ty.parent&&ty.parent.name){return itemTypes[ty.ty]+ty.path+ty.parent.name+ty.name}return itemTypes[ty.ty]+ty.path+ty.name}var nSearchWords=searchWords.length;var i;var ty;var fullId;var returned;var in_args;if((val.charAt(0)==="\""||val.charAt(0)==="'")&&val.charAt(val.length-1)===val.charAt(0)){val=extractGenerics(val.substr(1,val.length-2));for(i=0;i")>-1){var trimmer=function(s){return s.trim()};var parts=val.split("->").map(trimmer);var input=parts[0];var inputs=input.split(",").map(trimmer).sort();for(i=0;iOUTPUT_DATA?type[OUTPUT_DATA].name:"";returned=checkReturned(ty,output,true);if(output.name==="*"||returned===true){in_args=false;var is_module=false;if(input==="*"){is_module=true}else{var allFound=true;for(var it=0;allFound===true&&it1?paths.length-1:1);var lev;var lev_distance;for(j=0;j1){lev=checkPath(contains,paths[paths.length-1],ty);if(lev>MAX_LEV_DISTANCE){continue}else if(lev>0){lev_add=lev/10}}returned=MAX_LEV_DISTANCE+1;in_args=MAX_LEV_DISTANCE+1;var index=-1;lev=MAX_LEV_DISTANCE+1;fullId=generateId(ty);if(searchWords[j].indexOf(split[i])>-1||searchWords[j].indexOf(val)>-1||searchWords[j].replace(/_/g,"").indexOf(val)>-1){if(typePassesFilter(typeFilter,ty.ty)&&results[fullId]===undefined){index=searchWords[j].replace(/_/g,"").indexOf(val)}}if((lev=levenshtein(searchWords[j],val))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){lev=MAX_LEV_DISTANCE+1}else{lev+=1}}if((in_args=findArg(ty,valGenerics))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){in_args=MAX_LEV_DISTANCE+1}}if((returned=checkReturned(ty,valGenerics))<=MAX_LEV_DISTANCE){if(typePassesFilter(typeFilter,ty.ty)===false){returned=MAX_LEV_DISTANCE+1}}lev+=lev_add;if(lev>0&&val.length>3&&searchWords[j].indexOf(val)>-1){if(val.length<6){lev-=1}else{lev=0}}if(in_args<=MAX_LEV_DISTANCE){if(results_in_args[fullId]===undefined){results_in_args[fullId]={id:j,index:index,lev:in_args,}}results_in_args[fullId].lev=Math.min(results_in_args[fullId].lev,in_args)}if(returned<=MAX_LEV_DISTANCE){if(results_returned[fullId]===undefined){results_returned[fullId]={id:j,index:index,lev:returned,}}results_returned[fullId].lev=Math.min(results_returned[fullId].lev,returned)}if(index!==-1||lev<=MAX_LEV_DISTANCE){if(index!==-1&&paths.length<2){lev=0}if(results[fullId]===undefined){results[fullId]={id:j,index:index,lev:lev,}}results[fullId].lev=Math.min(results[fullId].lev,lev)}}}var ret={"in_args":sortResults(results_in_args,true),"returned":sortResults(results_returned,true),"others":sortResults(results),};if(ALIASES&&ALIASES[window.currentCrate]&&ALIASES[window.currentCrate][query.raw]){var aliases=ALIASES[window.currentCrate][query.raw];for(i=0;iMAX_RESULTS){ret.others.pop()}}}return ret}function validateResult(name,path,keys,parent){for(var i=0;i-1||path.indexOf(keys[i])>-1||(parent!==undefined&&parent.name!==undefined&&parent.name.toLowerCase().indexOf(keys[i])>-1)||levenshtein(name,keys[i])<=MAX_LEV_DISTANCE)){return false}}return true}function getQuery(raw){var matches,type,query;query=raw;matches=query.match(/^(fn|mod|struct|enum|trait|type|const|macro)\s*:\s*/i);if(matches){type=matches[1].replace(/^const$/,"constant");query=query.substring(matches[0].length)}return{raw:raw,query:query,type:type,id:query+type}}function initSearchNav(){var hoverTimeout;var click_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}var dst=e.target.getElementsByTagName("a");if(dst.length<1){return}dst=dst[0];if(window.location.pathname===dst.pathname){hideSearchResults();document.location.href=dst.href}};var mouseover_func=function(e){var el=e.target;while(el.tagName!=="TR"){el=el.parentNode}clearTimeout(hoverTimeout);hoverTimeout=setTimeout(function(){onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){removeClass(i_e,"highlighted")})});addClass(el,"highlighted")},20)};onEachLazy(document.getElementsByClassName("search-results"),function(e){onEachLazy(e.getElementsByClassName("result"),function(i_e){i_e.onclick=click_func;i_e.onmouseover=mouseover_func})});search_input.onkeydown=function(e){var actives=[[],[],[]];var current=0;onEachLazy(document.getElementById("results").childNodes,function(e){onEachLazy(e.getElementsByClassName("highlighted"),function(e){actives[current].push(e)});current+=1});if(e.which===38){if(!actives[currentTab].length||!actives[currentTab][0].previousElementSibling){return}addClass(actives[currentTab][0].previousElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}else if(e.which===40){if(!actives[currentTab].length){var results=document.getElementById("results").childNodes;if(results.length>0){var res=results[currentTab].getElementsByClassName("result");if(res.length>0){addClass(res[0],"highlighted")}}}else if(actives[currentTab][0].nextElementSibling){addClass(actives[currentTab][0].nextElementSibling,"highlighted");removeClass(actives[currentTab][0],"highlighted")}}else if(e.which===13){if(actives[currentTab].length){document.location.href=actives[currentTab][0].getElementsByTagName("a")[0].href}}else if(e.which===9){if(e.shiftKey){printTab(currentTab>0?currentTab-1:2)}else{printTab(currentTab>1?0:currentTab+1)}e.preventDefault()}else if(e.which===16){}else if(actives[currentTab].length>0){removeClass(actives[currentTab][0],"highlighted")}}}function buildHrefAndPath(item){var displayPath;var href;var type=itemTypes[item.ty];var name=item.name;var path=item.path;if(type==="mod"){displayPath=path+"::";href=rootPath+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="primitive"||type==="keyword"){displayPath="";href=rootPath+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=rootPath+name+"/index.html"}else if(item.parent!==undefined){var myparent=item.parent;var anchor="#"+type+"."+name;var parentType=itemTypes[myparent.ty];var pageType=parentType;var pageName=myparent.name;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){var splitPath=item.path.split("::");var enumName=splitPath.pop();path=splitPath.join("::");displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="#variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}href=rootPath+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html"+anchor}else{displayPath=item.path+"::";href=rootPath+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href]}function escape(content){var h1=document.createElement("h1");h1.textContent=content;return h1.innerHTML}function pathSplitter(path){var tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}function addTab(array,query,display){var extraStyle="";if(display===false){extraStyle=" style=\"display: none;\""}var output="";var duplicates={};var length=0;if(array.length>0){output="";array.forEach(function(item){var name,type;name=item.name;type=itemTypes[item.ty];if(item.is_alias!==true){if(duplicates[item.fullPath]){return}duplicates[item.fullPath]=true}length+=1;output+=""});output+="
"+""+(item.is_alias===true?(""+item.alias+"  - see "):"")+item.displayPath+""+name+""+""+""+escape(item.desc)+" 
"}else{output="
No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:
"}return[output,length]}function makeTabHeader(tabNb,text,nbElems){if(currentTab===tabNb){return"
"+text+"
("+nbElems+")
"}return"
"+text+"
("+nbElems+")
"}function showResults(results){if(results.others.length===1&&getCurrentValue("rustdoc-go-to-only-result")==="true"){var elem=document.createElement("a");elem.href=results.others[0].href;elem.style.display="none";document.body.appendChild(elem);elem.click()}var query=getQuery(search_input.value);currentResults=query.id;var ret_others=addTab(results.others,query);var ret_in_args=addTab(results.in_args,query,false);var ret_returned=addTab(results.returned,query,false);var output="

Results for "+escape(query.query)+(query.type?" (type: "+escape(query.type)+")":"")+"

"+"
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"+ret_others[0]+ret_in_args[0]+ret_returned[0]+"
";var search=getSearchElement();search.innerHTML=output;showSearchResults(search);var tds=search.getElementsByTagName("td");var td_width=0;if(tds.length>0){td_width=tds[0].offsetWidth}var width=search.offsetWidth-40-td_width;onEachLazy(search.getElementsByClassName("desc"),function(e){e.style.width=width+"px"});initSearchNav();var elems=document.getElementById("titles").childNodes;elems[0].onclick=function(){printTab(0)};elems[1].onclick=function(){printTab(1)};elems[2].onclick=function(){printTab(2)};printTab(currentTab)}function execSearch(query,searchWords,filterCrates){function getSmallest(arrays,positions,notDuplicates){var start=null;for(var it=0;itpositions[it]&&(start===null||start>arrays[it][positions[it]].lev)&&!notDuplicates[arrays[it][positions[it]].fullPath]){start=arrays[it][positions[it]].lev}}return start}function mergeArrays(arrays){var ret=[];var positions=[];var notDuplicates={};for(var x=0;xpositions[x]&&arrays[x][positions[x]].lev===smallest&&!notDuplicates[arrays[x][positions[x]].fullPath]){ret.push(arrays[x][positions[x]]);notDuplicates[arrays[x][positions[x]].fullPath]=true;positions[x]+=1}}}return ret}var queries=query.raw.split(",");var results={"in_args":[],"returned":[],"others":[],};for(var i=0;i1){return{"in_args":mergeArrays(results.in_args),"returned":mergeArrays(results.returned),"others":mergeArrays(results.others),}}else{return{"in_args":results.in_args[0],"returned":results.returned[0],"others":results.others[0],}}}function getFilterCrates(){var elem=document.getElementById("crate-search");if(elem&&elem.value!=="All crates"&&rawSearchIndex.hasOwnProperty(elem.value)){return elem.value}return undefined}function search(e,forced){var params=getQueryStringParams();var query=getQuery(search_input.value.trim());if(e){e.preventDefault()}if(query.query.length===0){return}if(forced!==true&&query.id===currentResults){if(query.query.length>0){putBackSearch(search_input)}return}document.title="Results for "+query.query+" - Rust";if(browserSupportsHistoryApi()){if(!history.state&&!params.search){history.pushState(query,"","?search="+encodeURIComponent(query.raw))}else{history.replaceState(query,"","?search="+encodeURIComponent(query.raw))}}var filterCrates=getFilterCrates();showResults(execSearch(query,index,filterCrates))}function buildIndex(rawSearchIndex){searchIndex=[];var searchWords=[];var i;for(var crate in rawSearchIndex){if(!rawSearchIndex.hasOwnProperty(crate)){continue}searchWords.push(crate);searchIndex.push({crate:crate,ty:1,name:crate,path:"",desc:rawSearchIndex[crate].doc,type:null,});var items=rawSearchIndex[crate].i;var paths=rawSearchIndex[crate].p;var len=paths.length;for(i=0;i0){search_input.value=params.search;search(e)}else{search_input.value="";hideSearchResults()}})}search()}index=buildIndex(rawSearchIndex);startSearch();if(rootPath==="../"||rootPath==="./"){var sidebar=document.getElementsByClassName("sidebar-elems")[0];if(sidebar){var div=document.createElement("div");div.className="block crate";div.innerHTML="

Crates

";var ul=document.createElement("ul");div.appendChild(ul);var crates=[];for(var crate in rawSearchIndex){if(!rawSearchIndex.hasOwnProperty(crate)){continue}crates.push(crate)}crates.sort();for(var i=0;i"+""+"
"+code.outerHTML+"
";list.appendChild(display)}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}function labelForToggleButton(sectionIsCollapsed){if(sectionIsCollapsed){return"+"}return"\u2212"}function onEveryMatchingChild(elem,className,func){if(elem&&className&&func){var length=elem.childNodes.length;var nodes=elem.childNodes;for(var i=0;i"+labelForToggleButton(sectionIsCollapsed)+"
]";return toggle}var toggle=createSimpleToggle(false);var hideMethodDocs=getCurrentValue("rustdoc-auto-hide-method-docs")==="true";var pageId=getPageId();var func=function(e){var next=e.nextElementSibling;if(!next){return}if(hasClass(next,"docblock")===true||(hasClass(next,"stability")===true&&hasClass(next.nextElementSibling,"docblock")===true)){var newToggle=toggle.cloneNode(true);insertAfter(newToggle,e.childNodes[e.childNodes.length-1]);if(hideMethodDocs===true&&hasClass(e,"method")===true){collapseDocs(newToggle,"hide",pageId)}}};var funcImpl=function(e){var next=e.nextElementSibling;if(next&&hasClass(next,"docblock")){next=next.nextElementSibling}if(!next){return}if(next.getElementsByClassName("method").length>0&&hasClass(e,"impl")){insertAfter(toggle.cloneNode(true),e.childNodes[e.childNodes.length-1])}};onEachLazy(document.getElementsByClassName("method"),func);onEachLazy(document.getElementsByClassName("associatedconstant"),func);onEachLazy(document.getElementsByClassName("impl"),funcImpl);var impl_call=function(){};if(hideMethodDocs===true){impl_call=function(e,newToggle,pageId){if(e.id.match(/^impl(?:-\d+)?$/)===null){if(hasClass(e,"impl")===true){collapseDocs(newToggle,"hide",pageId)}}}}var newToggle=document.createElement("a");newToggle.href="javascript:void(0)";newToggle.className="collapse-toggle hidden-default collapsed";newToggle.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items";function toggleClicked(){if(hasClass(this,"collapsed")){removeClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("hidden"),function(x){if(hasClass(x,"content")===false){removeClass(x,"hidden");addClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(false)+"] Hide undocumented items"}else{addClass(this,"collapsed");onEachLazy(this.parentNode.getElementsByClassName("x"),function(x){if(hasClass(x,"content")===false){addClass(x,"hidden");removeClass(x,"x")}},true);this.innerHTML="["+labelForToggleButton(true)+"] Show hidden undocumented items"}}onEachLazy(document.getElementsByClassName("impl-items"),function(e){onEachLazy(e.getElementsByClassName("associatedconstant"),func);var hiddenElems=e.getElementsByClassName("hidden");var needToggle=false;var hlength=hiddenElems.length;for(var i=0;i0){inner[0].innerHTML="+"}}if(extraClass){addClass(wrapper,extraClass)}wrapper.appendChild(mainToggle);return wrapper}var currentType=document.getElementsByClassName("type-decl")[0];var className=null;if(currentType){currentType=currentType.getElementsByClassName("rust")[0];if(currentType){currentType.classList.forEach(function(item){if(item!=="main"){className=item;return true}})}}var showItemDeclarations=getCurrentValue("rustdoc-auto-hide-"+className);if(showItemDeclarations===null){if(className==="enum"||className==="macro"){showItemDeclarations="false"}else if(className==="struct"||className==="union"||className==="trait"){showItemDeclarations="true"}else{showItemDeclarations=getCurrentValue("rustdoc-auto-hide-declarations")}}showItemDeclarations=showItemDeclarations==="false";function buildToggleWrapper(e){if(hasClass(e,"autohide")){var wrap=e.previousElementSibling;if(wrap&&hasClass(wrap,"toggle-wrapper")){var inner_toggle=wrap.childNodes[0];var extra=e.childNodes[0].tagName==="H3";e.style.display="none";addClass(wrap,"collapsed");onEachLazy(inner_toggle.getElementsByClassName("inner"),function(e){e.innerHTML=labelForToggleButton(true)});onEachLazy(inner_toggle.getElementsByClassName("toggle-label"),function(e){e.style.display="inline-block";if(extra===true){i_e.innerHTML=" Show "+e.childNodes[0].innerHTML}})}}if(e.parentNode.id==="main"){var otherMessage="";var fontSize;var extraClass;if(hasClass(e,"type-decl")){fontSize="20px";otherMessage=" Show declaration";if(showItemDeclarations===false){extraClass="collapsed"}}else if(hasClass(e,"sub-variant")){otherMessage=" Show fields"}else if(hasClass(e,"non-exhaustive")){otherMessage=" This ";if(hasClass(e,"non-exhaustive-struct")){otherMessage+="struct"}else if(hasClass(e,"non-exhaustive-enum")){otherMessage+="enum"}else if(hasClass(e,"non-exhaustive-variant")){otherMessage+="enum variant"}else if(hasClass(e,"non-exhaustive-type")){otherMessage+="type"}otherMessage+=" is marked as non-exhaustive"}else if(hasClass(e.childNodes[0],"impl-items")){extraClass="marg-left"}e.parentNode.insertBefore(createToggle(otherMessage,fontSize,extraClass,hasClass(e,"type-decl")===false||showItemDeclarations===true),e);if(hasClass(e,"type-decl")===true&&showItemDeclarations===true){collapseDocs(e.previousSibling.childNodes[0],"toggle")}if(hasClass(e,"non-exhaustive")===true){collapseDocs(e.previousSibling.childNodes[0],"toggle")}}}onEachLazy(document.getElementsByClassName("docblock"),buildToggleWrapper);onEachLazy(document.getElementsByClassName("sub-variant"),buildToggleWrapper);function createToggleWrapper(tog){var span=document.createElement("span");span.className="toggle-label";span.style.display="none";span.innerHTML=" Expand attributes";tog.appendChild(span);var wrapper=document.createElement("div");wrapper.className="toggle-wrapper toggle-attributes";wrapper.appendChild(tog);return wrapper}var itemAttributesFunc=function(){};if(getCurrentValue("rustdoc-auto-hide-attributes")!=="false"){itemAttributesFunc=function(x){collapseDocs(x.previousSibling.childNodes[0],"toggle")}}var attributesToggle=createToggleWrapper(createSimpleToggle(false));onEachLazy(main.getElementsByClassName("attributes"),function(i_e){var attr_tog=attributesToggle.cloneNode(true);if(hasClass(i_e,"top-attr")===true){addClass(attr_tog,"top-attr")}i_e.parentNode.insertBefore(attr_tog,i_e);itemAttributesFunc(i_e)});var lineNumbersFunc=function(){};if(getCurrentValue("rustdoc-line-numbers")==="true"){lineNumbersFunc=function(x){var count=x.textContent.split("\n").length;var elems=[];for(var i=0;i
✕"+"
"+content+"";document.getElementsByTagName("body")[0].appendChild(modal);document.getElementById("modal-close").onclick=hideModal;modal.onclick=hideModal}function hideModal(){var modal=document.getElementById("important");if(modal){modal.parentNode.removeChild(modal)}}onEachLazy(document.getElementsByClassName("important-traits"),function(e){e.onclick=function(){showModal(e.lastElementChild.innerHTML)}});function printTab(nb){if(nb===0||nb===1||nb===2){currentTab=nb}var nb_copy=nb;onEachLazy(document.getElementById("titles").childNodes,function(elem){if(nb_copy===0){addClass(elem,"selected")}else{removeClass(elem,"selected")}nb_copy-=1});onEachLazy(document.getElementById("results").childNodes,function(elem){if(nb===0){elem.style.display=""}else{elem.style.display="none"}nb-=1})}function putBackSearch(search_input){var search=getSearchElement();if(search_input.value!==""&&hasClass(search,"hidden")){showSearchResults(search);if(browserSupportsHistoryApi()){history.replaceState(search_input.value,"","?search="+encodeURIComponent(search_input.value))}}}if(search_input){search_input.onfocus=function(){putBackSearch(this)}}var params=getQueryStringParams();if(params&¶ms.search){var search=getSearchElement();search.innerHTML="

Loading search results...

";showSearchResults(search)}var sidebar_menu=document.getElementsByClassName("sidebar-menu")[0];if(sidebar_menu){sidebar_menu.onclick=function(){var sidebar=document.getElementsByClassName("sidebar")[0];if(hasClass(sidebar,"mobile")===true){hideSidebar()}else{showSidebar()}}}window.onresize=function(){hideSidebar()};autoCollapse(getPageId(),getCurrentValue("rustdoc-collapse")==="true");if(window.location.hash&&window.location.hash.length>0){expandSection(window.location.hash.replace(/^#/,""))}if(main){onEachLazy(main.getElementsByClassName("loading-content"),function(e){e.remove()});onEachLazy(main.childNodes,function(e){if(e.tagName==="H2"||e.tagName==="H3"){var nextTagName=e.nextElementSibling.tagName;if(nextTagName=="H2"||nextTagName=="H3"){e.nextElementSibling.style.display="flex"}else{e.nextElementSibling.style.display="block"}}})}function addSearchOptions(crates){var elem=document.getElementById("crate-search");if(!elem){return}var crates_text=[];if(Object.keys(crates).length>1){for(var crate in crates){if(crates.hasOwnProperty(crate)){crates_text.push(crate)}}}crates_text.sort(function(a,b){var lower_a=a.toLowerCase();var lower_b=b.toLowerCase();if(lower_alower_b){return 1}return 0});var savedCrate=getCurrentValue("rustdoc-saved-filter-crate");for(var i=0;i"
"+x[0]+"
"+x[1]+"
").join("");var div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";var infos=["Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given type.","Accepted types are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + * -> vec)","Search multiple things at once by splitting your query with comma (e.g., \ + str,u8 or String,struct:Vec,test)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;container.appendChild(div_shortcuts);container.appendChild(div_infos);popup.appendChild(container);insertAfter(popup,getSearchElement())}onHashChange(null);window.onhashchange=onHashChange;buildHelperPopup()}());function focusSearchBar(){getSearchInput().focus()}function defocusSearchBar(){getSearchInput().blur()} \ No newline at end of file diff --git a/api/normalize.css b/api/normalize.css new file mode 100644 index 000000000000..45b6cb263839 --- /dev/null +++ b/api/normalize.css @@ -0,0 +1,2 @@ +/*! normalize.css v3.0.0 | MIT License | git.io/normalize */ +html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height:auto}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:bold}table{border-collapse:collapse;border-spacing:0}td,th{padding:0} \ No newline at end of file diff --git a/api/noscript.css b/api/noscript.css new file mode 100644 index 000000000000..351b41cf8ed8 --- /dev/null +++ b/api/noscript.css @@ -0,0 +1 @@ +#main>h2+div,#main>h2+h3,#main>h3+div{display:block;}.loading-content{display:none;}#main>h2+div,#main>h3+div{display:block;}#main>h2+h3{display:flex;} \ No newline at end of file diff --git a/api/rust-logo.png b/api/rust-logo.png new file mode 100644 index 000000000000..74b4bd695045 Binary files /dev/null and b/api/rust-logo.png differ diff --git a/api/rustdoc.css b/api/rustdoc.css new file mode 100644 index 000000000000..43a109e53014 --- /dev/null +++ b/api/rustdoc.css @@ -0,0 +1 @@ + @font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular.woff") format('woff');}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:400;src:local('Source Serif Pro'),url("SourceSerifPro-Regular.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:italic;font-weight:400;src:local('Source Serif Pro Italic'),url("SourceSerifPro-It.ttf.woff") format('woff');}@font-face {font-family:'Source Serif Pro';font-style:normal;font-weight:700;src:local('Source Serif Pro Bold'),url("SourceSerifPro-Bold.ttf.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular.woff") format('woff');}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold.woff") format('woff');}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}html{content:"";}@media (prefers-color-scheme:light){html{content:"light";}}@media (prefers-color-scheme:dark){html{content:"dark";}}body{font:16px/1.4 "Source Serif Pro",serif;margin:0;position:relative;padding:10px 15px 20px 15px;-webkit-font-feature-settings:"kern","liga";-moz-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";}h1{font-size:1.5em;}h2{font-size:1.4em;}h3{font-size:1.3em;}h1,h2,h3:not(.impl):not(.method):not(.type):not(.tymethod):not(.important),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){font-weight:500;margin:20px 0 15px 0;padding-bottom:6px;}h1.fqn{border-bottom:1px dashed;margin-top:0;}h2,h3:not(.impl):not(.method):not(.type):not(.tymethod),h4:not(.method):not(.type):not(.tymethod):not(.associatedconstant){border-bottom:1px solid;}h3.impl,h3.method,h4.method,h3.type,h4.type,h4.associatedconstant{flex-basis:100%;font-weight:600;margin-top:16px;margin-bottom:10px;position:relative;}h3.impl,h3.method,h3.type{padding-left:15px;}h1,h2,h3,h4,.sidebar,a.source,.search-input,.content table :not(code)>a,.collapse-toggle,div.item-list .out-of-band,#source-sidebar,#sidebar-toggle{font-family:"Fira Sans",sans-serif;}ol,ul{padding-left:25px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.6em;}p{margin:0 0 .6em 0;}summary{outline:none;}code,pre,a.test-arrow{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.1em;}.docblock pre code,.docblock-short pre code,.docblock code.spotlight{padding:0;}.docblock code.spotlight :last-child{padding-bottom:0.6em;}pre{padding:14px;}.source .content pre{padding:20px;}img{max-width:100%;}li{position:relative;}.source .content{margin-top:50px;max-width:none;overflow:visible;margin-left:0px;min-width:70em;}nav.sub{font-size:16px;text-transform:uppercase;}.sidebar{width:200px;position:fixed;left:0;top:0;bottom:0;overflow:auto;}.sidebar .block>ul>li{margin-right:-10px;}.content,nav{max-width:960px;}.hidden{display:none !important;}.logo-container{height:100px;width:100px;position:relative;margin:20px auto;display:block;margin-top:10px;}.logo-container>img{max-width:100px;max-height:100px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block;}.sidebar .location{border:1px solid;font-size:17px;margin:30px 10px 20px 10px;text-align:center;word-wrap:break-word;}.sidebar .version{font-size:15px;text-align:center;border-bottom:1px solid;overflow-wrap:break-word;word-wrap:break-word;word-break:break-word;}.location:empty{border:none;}.location a:first-child{font-weight:500;}.block{padding:0;margin-bottom:14px;}.block h2,.block h3{margin-top:0;margin-bottom:8px;text-align:center;}.block ul,.block li{margin:0 10px;padding:0;list-style:none;}.block a{display:block;text-overflow:ellipsis;overflow:hidden;line-height:15px;padding:7px 5px;font-size:14px;font-weight:300;transition:border 500ms ease-out;}.sidebar-title{border-top:1px solid;border-bottom:1px solid;text-align:center;font-size:17px;margin-bottom:5px;}.sidebar-links{margin-bottom:15px;}.sidebar-links>a{padding-left:10px;width:100%;}.sidebar-menu{display:none;}.content{padding:15px 0;}.source .content pre.rust{white-space:pre;overflow:auto;padding-left:0;}.rustdoc:not(.source) .example-wrap{display:inline-flex;margin-bottom:10px;position:relative;}.example-wrap{width:100%;}.example-wrap>pre.line-number{overflow:initial;border:1px solid;border-top-left-radius:5px;border-bottom-left-radius:5px;padding:13px 8px;text-align:right;}.rustdoc:not(.source) .example-wrap>pre.rust{width:100%;overflow-x:auto;}.rustdoc:not(.source) .example-wrap>pre{margin:0;}#search{margin-left:230px;position:relative;}#results{position:absolute;right:0;left:0;overflow:auto;}#results>table{width:100%;table-layout:fixed;}.content pre.line-numbers{float:left;border:none;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.line-numbers span{cursor:pointer;}.docblock-short p{display:inline;}.docblock-short.nowrap{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}.docblock-short p{overflow:hidden;text-overflow:ellipsis;margin:0;}.docblock code,.docblock-short code{white-space:pre-wrap;}.docblock h1,.docblock h2,.docblock h3,.docblock h4,.docblock h5{border-bottom:1px solid;}#main>.docblock h1{font-size:1.3em;}#main>.docblock h2{font-size:1.15em;}#main>.docblock h3,#main>.docblock h4,#main>.docblock h5{font-size:1em;}#main>h2+div,#main>h2+h3,#main>h3+div{display:none;flex-wrap:wrap;}.docblock h1{font-size:1em;}.docblock h2{font-size:0.95em;}.docblock h3,.docblock h4,.docblock h5{font-size:0.9em;}.docblock{margin-left:24px;position:relative;}.content .out-of-band{float:right;font-size:23px;margin:0px;padding:0px;font-weight:normal;}h3.impl>.out-of-band{font-size:21px;}h4.method>.out-of-band{font-size:19px;}h4>code,h3>code,.invisible>code{max-width:calc(100% - 41px);display:block;}.invisible{width:100%;display:inline-block;}.content .in-band{margin:0px;padding:0px;}.in-band>code{display:inline-block;}#main{position:relative;}#main>.since{top:inherit;font-family:"Fira Sans",sans-serif;}.content table:not(.table-display){border-spacing:0 5px;}.content td{vertical-align:top;}.content td:first-child{padding-right:20px;}.content td p:first-child{margin-top:0;}.content td h1,.content td h2{margin-left:0;font-size:1.1em;}.content tr:first-child td{border-top:0;}.docblock table{margin:.5em 0;width:calc(100% - 2px);border:1px dashed;}.docblock table td{padding:.5em;border:1px dashed;}.docblock table th{padding:.5em;text-align:left;border:1px solid;}.fields+table{margin-bottom:1em;}.content .item-list{list-style-type:none;padding:0;}.content .multi-column{-moz-column-count:5;-moz-column-gap:2.5em;-webkit-column-count:5;-webkit-column-gap:2.5em;column-count:5;column-gap:2.5em;}.content .multi-column li{width:100%;display:inline-block;}.content .method{font-size:1em;position:relative;}.content .method .where,.content .fn .where,.content .where.fmt-newline{display:block;font-size:0.8em;}.content .methods>div:not(.important-traits){margin-left:40px;margin-bottom:15px;}.content .docblock>.impl-items{margin-left:20px;margin-top:-34px;}.content .docblock>.impl-items>h4{border-bottom:0;}.content .docblock>.impl-items .table-display{margin:0;}.content .docblock>.impl-items table td{padding:0;}.toggle-wrapper.marg-left>.collapse-toggle{left:-24px;}.content .docblock>.impl-items .table-display,.impl-items table td{border:none;}.content .stability code{font-size:90%;}.content .stability{position:relative;margin-left:33px;margin-top:-13px;}.sub-variant>div>.stability{margin-top:initial;}.content .stability::before{content:'⬑';font-size:25px;position:absolute;top:-6px;left:-19px;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{margin-left:20px;}.content .impl-items .docblock,.content .impl-items .stability{margin-bottom:.6em;}.content .impl-items>.stability{margin-left:40px;}.methods>.stability,.content .impl-items>.stability{margin-top:-8px;}.impl-items{flex-basis:100%;}#main>.stability{margin-top:0;}nav:not(.sidebar){border-bottom:1px solid;padding-bottom:10px;margin-bottom:10px;}nav.main{padding:20px 0;text-align:center;}nav.main .current{border-top:1px solid;border-bottom:1px solid;}nav.main .separator{border:1px solid;display:inline-block;height:23px;margin:0 20px;}nav.sum{text-align:right;}nav.sub form{display:inline;}nav.sub,.content{margin-left:230px;}a{text-decoration:none;background:transparent;}.small-section-header:hover>.anchor{display:initial;}.in-band:hover>.anchor{display:inline-block;position:absolute;}.anchor{display:none;position:absolute;left:-7px;}.anchor.field{left:-5px;}.small-section-header>.anchor{left:-28px;padding-right:10px;}.anchor:before{content:'\2002\00a7\2002';}.docblock a:not(.srclink):not(.test-arrow):hover,.docblock-short a:not(.srclink):not(.test-arrow):hover,.stability a{text-decoration:underline;}.invisible>.srclink,h4>code+.srclink{position:absolute;top:0;right:0;font-size:17px;font-weight:normal;}.block a.current.crate{font-weight:500;}.search-container{position:relative;}.search-container>div{display:inline-flex;width:calc(100% - 34px);}#crate-search{margin-top:5px;padding:6px;padding-right:19px;flex:none;border:0;border-right:0;border-radius:4px 0 0 4px;outline:none;cursor:pointer;border-right:1px solid;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;text-overflow:"";background-repeat:no-repeat;background-color:transparent;background-size:20px;background-position:calc(100% - 1px) 56%;}.search-container>.top-button{position:absolute;right:0;top:10px;}.search-input{-moz-box-sizing:border-box !important;box-sizing:border-box !important;outline:none;border:none;border-radius:1px;margin-top:5px;padding:10px 16px;font-size:17px;transition:border-color 300ms ease;transition:border-radius 300ms ease-in-out;transition:box-shadow 300ms ease-in-out;width:100%;}#crate-search+.search-input{border-radius:0 1px 1px 0;width:calc(100% - 32px);}.search-input:focus{border-radius:2px;border:0;outline:0;}.search-results .desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;display:block;}.search-results a{display:block;}.content .search-results td:first-child{padding-right:0;width:50%;}.content .search-results td:first-child a{padding-right:10px;}.content .search-results td:first-child a:after{clear:both;content:"";display:block;}.content .search-results td:first-child a span{float:left;}tr.result span.primitive::after{content:' (primitive type)';font-style:italic;}tr.result span.keyword::after{content:' (keyword)';font-style:italic;}body.blur>:not(#help){filter:blur(8px);-webkit-filter:blur(8px);opacity:.7;}#help{width:100%;height:100vh;position:fixed;top:0;left:0;display:flex;justify-content:center;align-items:center;}#help>div{flex:0 0 auto;box-shadow:0 0 6px rgba(0,0,0,.2);width:550px;height:auto;border:1px solid;}#help dt{float:left;clear:left;display:block;}#help dd{margin:5px 35px;}#help .infos{padding-left:0;}#help h1,#help h2{margin-top:0;}#help>div div{width:50%;float:left;padding:20px;padding-left:17px;}.stab{display:table;border-width:1px;border-style:solid;padding:3px;margin-bottom:5px;font-size:90%;}.stab p{display:inline;}.stab summary{display:list-item;}.stab .emoji{font-size:1.5em;}.module-item .stab{border-radius:3px;display:inline-block;font-size:80%;line-height:1.2;margin-bottom:0;margin-right:.3em;padding:2px;vertical-align:text-bottom;}.module-item.unstable{opacity:0.65;}.since{font-weight:normal;font-size:initial;position:absolute;right:0;top:0;}.impl-items .since,.impl .since{flex-grow:0;padding-left:12px;padding-right:2px;position:initial;}.impl-items .srclink,.impl .srclink{flex-grow:0;font-size:17px;font-weight:normal;}.impl-items code,.impl code{flex-grow:1;}.impl-items h4,h4.impl,h3.impl{display:flex;flex-basis:100%;font-size:16px;margin-bottom:12px;justify-content:space-between;}.variants_table{width:100%;}.variants_table tbody tr td:first-child{width:1%;}td.summary-column{width:100%;}.summary{padding-right:0px;}pre.rust .question-mark{font-weight:bold;}a.test-arrow{display:inline-block;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:130%;top:5px;right:5px;z-index:1;}a.test-arrow:hover{text-decoration:none;}.section-header:hover a:before{position:absolute;left:-25px;padding-right:10px;content:'\2002\00a7\2002';}.section-header:hover a{text-decoration:none;}.section-header a{color:inherit;}.collapse-toggle{font-weight:300;position:absolute;left:-23px;top:0;}h3>.collapse-toggle,h4>.collapse-toggle{font-size:0.8em;top:5px;}.toggle-wrapper>.collapse-toggle{left:-24px;margin-top:0px;}.toggle-wrapper{position:relative;margin-top:0;}.toggle-wrapper.collapsed{height:25px;transition:height .2s;margin-bottom:.6em;}.collapse-toggle>.inner{display:inline-block;width:1.2ch;text-align:center;}.collapse-toggle.hidden-default{position:relative;margin-left:20px;}.since+.srclink{display:table-cell;padding-left:10px;}.item-spacer{width:100%;height:12px;}.out-of-band>span.since{position:initial;font-size:20px;margin-right:5px;}.toggle-wrapper>.collapse-toggle{left:0;}.variant+.toggle-wrapper+.docblock>p{margin-top:5px;}.sub-variant,.sub-variant>h3{margin-top:1px !important;}#main>.sub-variant>h3{font-size:15px;margin-left:25px;margin-bottom:5px;}.sub-variant>div{margin-left:20px;margin-bottom:10px;}.sub-variant>div>span{display:block;position:relative;}.toggle-label{display:inline-block;margin-left:4px;margin-top:3px;}.enum>.toggle-wrapper+.docblock,.struct>.toggle-wrapper+.docblock{margin-left:30px;margin-bottom:20px;margin-top:5px;}.docblock>.section-header:first-child{margin-left:15px;margin-top:0;}.docblock>.section-header:first-child:hover>a:before{left:-10px;}.enum>.collapsed,.struct>.collapsed{margin-bottom:25px;}#main>.variant,#main>.structfield{display:block;}.attributes{display:block;margin-top:0px !important;margin-right:0px;margin-bottom:0px !important;margin-left:30px;}.toggle-attributes.collapsed{margin-bottom:0;}.impl-items>.toggle-attributes{margin-left:20px;}.impl-items .attributes{font-weight:500;}:target>code{opacity:1;}.information{position:absolute;left:-20px;margin-top:7px;z-index:1;}.tooltip{position:relative;display:inline-block;cursor:pointer;}.tooltip .tooltiptext{width:120px;display:none;text-align:center;padding:5px 3px;border-radius:6px;margin-left:5px;top:-5px;left:105%;z-index:10;}.tooltip:hover .tooltiptext{display:inline;}.tooltip .tooltiptext::after{content:" ";position:absolute;top:50%;left:11px;margin-top:-5px;border-width:5px;border-style:solid;}.important-traits .tooltip .tooltiptext{border:1px solid;}pre.rust{position:relative;tab-width:4;-moz-tab-width:4;}.search-failed{text-align:center;margin-top:20px;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#titles{height:35px;}#titles>div{float:left;width:33.3%;text-align:center;font-size:18px;cursor:pointer;border-top:2px solid;}#titles>div:not(:last-child){margin-right:1px;width:calc(33.3% - 1px);}#titles>div>div.count{display:inline-block;font-size:16px;}.important-traits{cursor:pointer;z-index:2;}h4>.important-traits{position:absolute;left:-44px;top:2px;}#all-types{text-align:center;border:1px solid;margin:0 10px;margin-bottom:10px;display:block;border-radius:7px;}#all-types>p{margin:5px 0;}#sidebar-toggle{position:fixed;top:30px;left:300px;z-index:10;padding:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;cursor:pointer;font-weight:bold;transition:left .5s;font-size:1.2em;border:1px solid;border-left:0;}#source-sidebar{position:fixed;top:0;bottom:0;left:0;width:300px;z-index:1;overflow:auto;transition:left .5s;border-right:1px solid;}#source-sidebar>.title{font-size:1.5em;text-align:center;border-bottom:1px solid;margin-bottom:6px;}.theme-picker{position:absolute;left:211px;top:19px;}.theme-picker button{outline:none;}#settings-menu{position:absolute;right:0;top:10px;outline:none;}#theme-picker,#settings-menu{padding:4px;width:27px;height:29px;border:1px solid;border-radius:3px;cursor:pointer;}#theme-choices{display:none;position:absolute;left:0;top:28px;border:1px solid;border-radius:3px;z-index:1;cursor:pointer;}#theme-choices>button{border:none;width:100%;padding:4px;text-align:center;background:rgba(0,0,0,0);}#theme-choices>button:not(:first-child){border-top:1px solid;}@media (max-width:700px){body{padding-top:0px;}.rustdoc>.sidebar{height:45px;min-height:40px;margin:0;margin-left:-15px;padding:0 15px;position:static;z-index:11;}.sidebar>.location{float:right;margin:0px;margin-top:2px;padding:3px 10px 1px 10px;min-height:39px;background:inherit;text-align:left;font-size:24px;}.sidebar .location:empty{padding:0;}.sidebar .logo-container{width:35px;height:35px;margin-top:5px;margin-bottom:5px;float:left;margin-left:50px;}.sidebar .logo-container>img{max-width:35px;max-height:35px;}.sidebar-menu{position:fixed;z-index:10;font-size:2rem;cursor:pointer;width:45px;left:0;text-align:center;display:block;border-bottom:1px solid;border-right:1px solid;height:45px;}.rustdoc.source>.sidebar>.sidebar-menu{display:none;}.sidebar-elems{position:fixed;z-index:1;left:0;top:45px;bottom:0;overflow-y:auto;border-right:1px solid;display:none;}.sidebar>.block.version{border-bottom:none;margin-top:12px;}nav.sub{width:calc(100% - 32px);float:right;}.content{margin-left:0px;}#main{margin-top:45px;padding:0;}.content .in-band{width:100%;}.content h4>.out-of-band{position:inherit;}.toggle-wrapper>.collapse-toggle{left:0px;}.toggle-wrapper{height:1.5em;}#search{margin-left:0;}.content .impl-items .method,.content .impl-items>.type,.impl-items>.associatedconstant{display:flex;}.anchor{display:none !important;}h1.fqn{overflow:initial;}.theme-picker{left:10px;top:54px;z-index:1;}h4>.important-traits{position:absolute;left:-22px;top:24px;}#titles>div>div.count{float:left;width:100%;}#titles{height:50px;}.sidebar.mobile{position:fixed;width:100%;margin-left:0;background-color:rgba(0,0,0,0);height:100%;}.sidebar{width:calc(100% + 30px);}.show-it{display:block;width:246px;}.show-it>.block.items{margin:8px 0;}.show-it>.block.items>ul{margin:0;}.show-it>.block.items>ul>li{text-align:center;margin:2px 0;}.show-it>.block.items>ul>li>a{font-size:21px;}#sidebar-filler{position:fixed;left:45px;width:calc(100% - 45px);top:0;height:45px;z-index:-1;border-bottom:1px solid;}.collapse-toggle{left:-20px;}.impl>.collapse-toggle{left:-10px;}#all-types{margin:10px;}#sidebar-toggle{top:100px;width:30px;font-size:1.5rem;text-align:center;padding:0;}#source-sidebar{z-index:11;}#main>.line-numbers{margin-top:0;}}@media print{nav.sub,.content .out-of-band,.collapse-toggle{display:none;}}@media (max-width:416px){#titles{height:73px;}#titles>div{height:73px;}}.modal{position:fixed;width:100vw;height:100vh;z-index:10000;top:0;left:0;}.modal-content{display:block;max-width:60%;min-width:200px;padding:8px;top:40%;position:absolute;left:50%;transform:translate(-50%,-40%);border:1px solid;border-radius:4px;border-top-right-radius:0;}.modal-content>.docblock{margin:0;}h3.important{margin:0;margin-bottom:13px;font-size:19px;}.modal-content>.docblock>code.content{margin:0;padding:0;font-size:20px;}.modal-content>.close{position:absolute;font-weight:900;right:-25px;top:-1px;font-size:18px;width:25px;padding-right:2px;border-top-right-radius:5px;border-bottom-right-radius:5px;text-align:center;border:1px solid;border-right:0;cursor:pointer;}.modal-content>.whiter{height:25px;position:absolute;width:3px;right:-2px;top:0px;}#main>div.important-traits{position:absolute;left:-24px;margin-top:16px;}.content>.methods>.method>div.important-traits{position:absolute;font-weight:400;left:-42px;margin-top:2px;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px;border-radius:3px;box-shadow:inset 0 -1px 0;cursor:default;}.hidden-by-impl-hider,.hidden-by-usual-hider{display:none !important;}#implementations-list>h3>span.in-band{width:100%;}.table-display{width:100%;border:0;border-collapse:collapse;border-spacing:0;font-size:16px;}.table-display tr td:first-child{padding-right:0;}.table-display tr td:last-child{float:right;}.table-display .out-of-band{position:relative;font-size:19px;display:block;}#implementors-list>.impl-items .table-display .out-of-band{font-size:17px;}.table-display td:hover .anchor{display:block;top:2px;left:-5px;}#main>ul{padding-left:10px;}#main>ul>li{list-style:none;}.non-exhaustive{margin-bottom:1em;}div.children{padding-left:27px;display:none;}div.name{cursor:pointer;position:relative;margin-left:16px;}div.files>a{display:block;padding:0 3px;}div.files>a:hover,div.name:hover{background-color:#a14b4b;}div.name.expand+.children{display:block;}div.name::before{content:"\25B6";padding-left:4px;font-size:0.7em;position:absolute;left:-16px;top:4px;}div.name.expand::before{transform:rotate(90deg);left:-15px;top:2px;}.type-decl>pre>.toggle-wrapper.toggle-attributes.top-attr{margin-left:0 !important;}.type-decl>pre>.docblock.attributes.top-attr{margin-left:1.8em !important;}.type-decl>pre>.toggle-attributes{margin-left:2.2em;}.type-decl>pre>.docblock.attributes{margin-left:4em;} \ No newline at end of file diff --git a/api/search-index.js b/api/search-index.js new file mode 100644 index 000000000000..e704d369d44b --- /dev/null +++ b/api/search-index.js @@ -0,0 +1,19 @@ +var searchIndex={}; +searchIndex["lightbeam"] = {"doc":"","i":[[3,"CodeGenSession","lightbeam","",null,null],[12,"module_context","","",0,null],[12,"op_offset_map","","",0,null],[3,"ExecutableModule","","",null,null],[3,"TranslatedModule","","",null,null],[4,"ExecutionError","","",null,null],[13,"FuncIndexOutOfBounds","","",1,null],[13,"TypeMismatch","","",1,null],[5,"translate_function","","",null,[[["u32"],["relocsink"],["functionbody"],["codegensession"]],[["result",["error"]],["error"]]]],[5,"translate","","",null,[[],[["error"],["result",["executablemodule","error"]],["executablemodule"]]]],[11,"new","","",0,[[["m"],["u32"]],["self"]]],[11,"new_context","","",0,[[["relocsink"],["self"],["u32"]],["context"]]],[11,"into_translated_code_section","","",0,[[],[["error"],["result",["translatedcodesection","error"]],["translatedcodesection"]]]],[11,"instantiate","","",2,[[],["executablemodule"]]],[11,"disassemble","","",2,[[["self"]]]],[11,"execute_func_unchecked","","Executes the function identified by `func_idx`.",3,[[["u32"],["self"],["functionargs"]],["t"]]],[11,"execute_func","","",3,[[["typelist"],["u32"],["self"],["functionargs"]],[["result",["executionerror"]],["typelist"],["executionerror"]]]],[11,"disassemble","","",3,[[["self"]]]],[8,"ModuleContext","","",null,null],[16,"Signature","","",4,null],[16,"GlobalType","","",4,null],[10,"vmctx_vmglobal_definition","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmctx_vmglobal_import_from","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmctx_vmmemory_import_from","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmctx_vmmemory_definition","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmctx_vmmemory_definition_base","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmctx_vmmemory_definition_current_length","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmmemory_definition_base","","",4,[[["self"]],["u8"]]],[10,"vmmemory_definition_current_length","","",4,[[["self"]],["u8"]]],[10,"vmctx_vmtable_import_from","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmctx_vmtable_definition","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmctx_vmtable_definition_base","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmctx_vmtable_definition_current_elements","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmctx_vmfunction_import_body","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmctx_vmfunction_import_vmctx","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmtable_definition_base","","",4,[[["self"]],["u8"]]],[10,"vmtable_definition_current_elements","","",4,[[["self"]],["u8"]]],[10,"vmctx_vmshared_signature_id","","",4,[[["u32"],["self"]],["u32"]]],[10,"vmcaller_checked_anyfunc_type_index","","",4,[[["self"]],["u8"]]],[10,"vmcaller_checked_anyfunc_func_ptr","","",4,[[["self"]],["u8"]]],[10,"vmcaller_checked_anyfunc_vmctx","","",4,[[["self"]],["u8"]]],[10,"size_of_vmcaller_checked_anyfunc","","",4,[[["self"]],["u8"]]],[10,"defined_table_index","","",4,[[["u32"],["self"]],[["u32"],["option",["u32"]]]]],[10,"defined_memory_index","","",4,[[["u32"],["self"]],[["u32"],["option",["u32"]]]]],[10,"defined_global_index","","",4,[[["u32"],["self"]],[["u32"],["option",["u32"]]]]],[10,"global_type","","",4,[[["u32"],["self"]]]],[10,"func_type_index","","",4,[[["u32"],["self"]],["u32"]]],[10,"signature","","",4,[[["u32"],["self"]]]],[10,"func_index","","",4,[[["u32"],["self"]],["u32"]]],[10,"defined_func_index","","",4,[[["u32"],["self"]],[["u32"],["option",["u32"]]]]],[11,"defined_func_type","","",4,[[["u32"],["self"]]]],[11,"func_type","","",4,[[["u32"],["self"]]]],[11,"emit_memory_bounds_check","","",4,[[["self"]],["bool"]]],[8,"Signature","","",null,null],[16,"Type","","",5,null],[10,"params","","",5,[[["self"]]]],[10,"returns","","",5,[[["self"]]]],[11,"from","","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]],[11,"from","","",3,[[["t"]],["t"]]],[11,"into","","",3,[[],["u"]]],[11,"try_from","","",3,[[["u"]],["result"]]],[11,"try_into","","",3,[[],["result"]]],[11,"borrow","","",3,[[["self"]],["t"]]],[11,"borrow_mut","","",3,[[["self"]],["t"]]],[11,"type_id","","",3,[[["self"]],["typeid"]]],[11,"from","","",2,[[["t"]],["t"]]],[11,"into","","",2,[[],["u"]]],[11,"try_from","","",2,[[["u"]],["result"]]],[11,"try_into","","",2,[[],["result"]]],[11,"borrow","","",2,[[["self"]],["t"]]],[11,"borrow_mut","","",2,[[["self"]],["t"]]],[11,"type_id","","",2,[[["self"]],["typeid"]]],[11,"from","","",1,[[["t"]],["t"]]],[11,"into","","",1,[[],["u"]]],[11,"to_owned","","",1,[[["self"]],["t"]]],[11,"clone_into","","",1,[[["self"],["t"]]]],[11,"to_string","","",1,[[["self"]],["string"]]],[11,"try_from","","",1,[[["u"]],["result"]]],[11,"try_into","","",1,[[],["result"]]],[11,"borrow","","",1,[[["self"]],["t"]]],[11,"borrow_mut","","",1,[[["self"]],["t"]]],[11,"type_id","","",1,[[["self"]],["typeid"]]],[11,"equivalent","","",1,[[["k"],["self"]],["bool"]]],[11,"clone_any","","",1,[[["self"]],[["box",["cloneany"]],["cloneany"]]]],[11,"clone_any_send","","",1,[[["self"]],[["cloneany"],["box",["cloneany"]]]]],[11,"clone_any_sync","","",1,[[["self"]],[["box",["cloneany"]],["cloneany"]]]],[11,"clone_any_send_sync","","",1,[[["self"]],[["box",["cloneany"]],["cloneany"]]]],[11,"clone","","",1,[[["self"]],["executionerror"]]],[11,"default","","",2,[[],["translatedmodule"]]],[11,"eq","","",1,[[["executionerror"],["self"]],["bool"]]],[11,"fmt","","",1,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",1,[[["self"],["formatter"]],["result"]]],[11,"defined_func_type","","",4,[[["u32"],["self"]]]],[11,"func_type","","",4,[[["u32"],["self"]]]],[11,"emit_memory_bounds_check","","",4,[[["self"]],["bool"]]]],"p":[[3,"CodeGenSession"],[4,"ExecutionError"],[3,"TranslatedModule"],[3,"ExecutableModule"],[8,"ModuleContext"],[8,"Signature"]]}; +searchIndex["wasi_common"] = {"doc":"","i":[[3,"WasiCtx","wasi_common","",null,null],[3,"WasiCtxBuilder","","A builder allowing customizable construction of `WasiCtx`…",null,null],[4,"Error","","",null,null],[13,"Wasi","","",0,null],[13,"Io","","",0,null],[13,"Yanix","","",0,null],[5,"preopen_dir","","",null,[[["asref",["path"]],["path"]],[["error"],["result",["file","error"]],["file"]]]],[11,"new","","Builder for a new `WasiCtx`.",1,[[],["self"]]],[11,"args","","Add arguments to the command-line arguments list.",1,[[],["self"]]],[11,"arg","","Add an argument to the command-line arguments list.",1,[[["asref"]],["self"]]],[11,"inherit_args","","Inherit the command-line arguments from the host process.",1,[[],["self"]]],[11,"inherit_stdio","","Inherit the stdin, stdout, and stderr streams from the…",1,[[],["self"]]],[11,"inherit_env","","Inherit the environment variables from the host process.",1,[[],["self"]]],[11,"env","","Add an entry to the environment.",1,[[["asref"]],["self"]]],[11,"envs","","Add entries to the environment.",1,[[],["self"]]],[11,"stdin","","Provide a File to use as stdin",1,[[["file"]],["self"]]],[11,"stdout","","Provide a File to use as stdout",1,[[["file"]],["self"]]],[11,"stderr","","Provide a File to use as stderr",1,[[["file"]],["self"]]],[11,"preopened_dir","","Add a preopened directory.",1,[[["path"],["asref",["path"]],["file"]],["self"]]],[11,"build","","Build a `WasiCtx`, consuming this `WasiCtxBuilder`.",1,[[],[["wasictx"],["error"],["result",["wasictx","error"]]]]],[11,"new","","Make a new `WasiCtx` with some default settings.",2,[[],[["error"],["result",["error"]]]]],[18,"ESUCCESS","","",0,null],[18,"E2BIG","","",0,null],[18,"EACCES","","",0,null],[18,"EADDRINUSE","","",0,null],[18,"EADDRNOTAVAIL","","",0,null],[18,"EAFNOSUPPORT","","",0,null],[18,"EAGAIN","","",0,null],[18,"EALREADY","","",0,null],[18,"EBADF","","",0,null],[18,"EBADMSG","","",0,null],[18,"EBUSY","","",0,null],[18,"ECANCELED","","",0,null],[18,"ECHILD","","",0,null],[18,"ECONNABORTED","","",0,null],[18,"ECONNREFUSED","","",0,null],[18,"ECONNRESET","","",0,null],[18,"EDEADLK","","",0,null],[18,"EDESTADDRREQ","","",0,null],[18,"EDOM","","",0,null],[18,"EDQUOT","","",0,null],[18,"EEXIST","","",0,null],[18,"EFAULT","","",0,null],[18,"EFBIG","","",0,null],[18,"EHOSTUNREACH","","",0,null],[18,"EIDRM","","",0,null],[18,"EILSEQ","","",0,null],[18,"EINPROGRESS","","",0,null],[18,"EINTR","","",0,null],[18,"EINVAL","","",0,null],[18,"EIO","","",0,null],[18,"EISCONN","","",0,null],[18,"EISDIR","","",0,null],[18,"ELOOP","","",0,null],[18,"EMFILE","","",0,null],[18,"EMLINK","","",0,null],[18,"EMSGSIZE","","",0,null],[18,"EMULTIHOP","","",0,null],[18,"ENAMETOOLONG","","",0,null],[18,"ENETDOWN","","",0,null],[18,"ENETRESET","","",0,null],[18,"ENETUNREACH","","",0,null],[18,"ENFILE","","",0,null],[18,"ENOBUFS","","",0,null],[18,"ENODEV","","",0,null],[18,"ENOENT","","",0,null],[18,"ENOEXEC","","",0,null],[18,"ENOLCK","","",0,null],[18,"ENOLINK","","",0,null],[18,"ENOMEM","","",0,null],[18,"ENOMSG","","",0,null],[18,"ENOPROTOOPT","","",0,null],[18,"ENOSPC","","",0,null],[18,"ENOSYS","","",0,null],[18,"ENOTCONN","","",0,null],[18,"ENOTDIR","","",0,null],[18,"ENOTEMPTY","","",0,null],[18,"ENOTRECOVERABLE","","",0,null],[18,"ENOTSOCK","","",0,null],[18,"ENOTSUP","","",0,null],[18,"ENOTTY","","",0,null],[18,"ENXIO","","",0,null],[18,"EOVERFLOW","","",0,null],[18,"EOWNERDEAD","","",0,null],[18,"EPERM","","",0,null],[18,"EPIPE","","",0,null],[18,"EPROTO","","",0,null],[18,"EPROTONOSUPPORT","","",0,null],[18,"EPROTOTYPE","","",0,null],[18,"ERANGE","","",0,null],[18,"EROFS","","",0,null],[18,"ESPIPE","","",0,null],[18,"ESRCH","","",0,null],[18,"ESTALE","","",0,null],[18,"ETIMEDOUT","","",0,null],[18,"ETXTBSY","","",0,null],[18,"EXDEV","","",0,null],[18,"ENOTCAPABLE","","",0,null],[0,"fs","","A very experimental module modeled providing a high-level…",null,null],[3,"Dir","wasi_common::fs","A reference to an open directory on the filesystem.",null,null],[3,"DirBuilder","","A builder used to create directories in various manners.",null,null],[3,"DirEntry","","Entries returned by the ReadDir iterator.",null,null],[3,"File","","A reference to an open file on the filesystem.",null,null],[3,"FileType","","A structure representing a type of file with accessors for…",null,null],[3,"Metadata","","Metadata information about a file.",null,null],[3,"OpenOptions","","Options and flags which can be used to configure how a…",null,null],[3,"Permissions","","Representation of the various permissions on a file.",null,null],[3,"ReadDir","","Iterator over the entries in a directory.",null,null],[11,"from_raw_wasi_fd","","Constructs a new instance of `Self` from the given raw…",3,[[["__wasi_fd_t"],["wasictx"]],["self"]]],[11,"open_file","","Attempts to open a file in read-only mode.",3,[[["self"],["asref",["path"]],["path"]],[["result",["file"]],["file"]]]],[11,"open_file_with","","Opens a file at `path` with the options specified by `self`.",3,[[["path"],["openoptions"],["self"],["asref",["path"]]],[["result",["file"]],["file"]]]],[11,"open_dir","","Attempts to open a directory.",3,[[["self"],["asref",["path"]],["path"]],["result"]]],[11,"create_file","","Opens a file in write-only mode.",3,[[["self"],["asref",["path"]],["path"]],[["result",["file"]],["file"]]]],[11,"read","","Returns an iterator over the entries within a directory.",3,[[["self"]],[["result",["readdir"]],["readdir"]]]],[11,"into_read","","Consumes self and returns an iterator over the entries…",3,[[],["readdir"]]],[11,"read_file","","Read the entire contents of a file into a bytes vector.",3,[[["self"],["asref",["path"]],["path"]],[["result",["vec"]],["vec",["u8"]]]]],[11,"read_dir","","Returns an iterator over the entries within a directory.",3,[[["self"],["asref",["path"]],["path"]],[["result",["readdir"]],["readdir"]]]],[11,"new","","Creates a new set of options with default mode/security…",4,[[],["self"]]],[11,"recursive","","Indicates that directories should be created recursively,…",4,[[["self"],["bool"]],["self"]]],[11,"create","","Creates the specified directory with the options…",4,[[["asref",["path"]],["self"],["path"]],["result"]]],[11,"metadata","","Returns the metadata for the file that this entry points at.",5,[[["self"]],[["result",["metadata"]],["metadata"]]]],[11,"file_type","","Returns the file type for the file that this entry points…",5,[[["self"]],[["filetype"],["result",["filetype"]]]]],[11,"file_name","","Returns the bare file name of this directory entry without…",5,[[["self"]],["string"]]],[11,"from_raw_wasi_fd","","Constructs a new instance of `Self` from the given raw…",6,[[["__wasi_fd_t"],["wasictx"]],["self"]]],[11,"sync_all","","Attempts to sync all OS-internal metadata to disk.",6,[[["self"]],[["error"],["result",["error"]]]]],[11,"sync_data","","This function is similar to `sync_all`, except that it may…",6,[[["self"]],[["error"],["result",["error"]]]]],[11,"set_len","","Truncates or extends the underlying file, updating the…",6,[[["self"],["u64"]],[["error"],["result",["error"]]]]],[11,"metadata","","Queries metadata about the underlying file.",6,[[["self"]],[["metadata"],["result",["metadata","error"]],["error"]]]],[11,"is_dir","","Tests whether this file type represents a directory.",7,[[["self"]],["bool"]]],[11,"is_file","","Tests whether this file type represents a regular file.",7,[[["self"]],["bool"]]],[11,"is_symlink","","Tests whether this file type represents a symbolic link.",7,[[["self"]],["bool"]]],[11,"file_type","","Returns the file type for this metadata.",8,[[["self"]],["filetype"]]],[11,"is_dir","","Returns true if this metadata is for a directory.",8,[[["self"]],["bool"]]],[11,"is_file","","Returns true if this metadata is for a regular file.",8,[[["self"]],["bool"]]],[11,"len","","Returns the size of the file, in bytes, this metadata is…",8,[[["self"]],["u64"]]],[11,"permissions","","Returns the permissions of the file this metadata is for.",8,[[["self"]],["permissions"]]],[11,"modified","","Returns the last modification time listed in this metadata.",8,[[["self"]],[["result",["systemtime"]],["systemtime"]]]],[11,"accessed","","Returns the last access time of this metadata.",8,[[["self"]],[["result",["systemtime"]],["systemtime"]]]],[11,"created","","Returns the creation time listed in this metadata.",8,[[["self"]],[["result",["systemtime"]],["systemtime"]]]],[11,"new","","Creates a blank new set of options ready for configuration.",9,[[],["self"]]],[11,"read","","Sets the option for read access.",9,[[["self"],["bool"]],["self"]]],[11,"write","","Sets the option for write access.",9,[[["self"],["bool"]],["self"]]],[11,"append","","Sets the option for the append mode.",9,[[["self"],["bool"]],["self"]]],[11,"truncate","","Sets the option for truncating a previous file.",9,[[["self"],["bool"]],["self"]]],[11,"create","","Sets the option to create a new file.",9,[[["self"],["bool"]],["self"]]],[11,"create_new","","Sets the option to always create a new file.",9,[[["self"],["bool"]],["self"]]],[11,"readonly","","Returns true if these permissions describe a readonly…",10,[[["self"]],["bool"]]],[11,"set_readonly","","Modifies the readonly flag for this set of permissions.",10,[[["self"],["bool"]]]],[11,"from_raw_wasi_fd","","Constructs a new instance of `Self` from the given raw…",11,[[["__wasi_fd_t"]],["self"]]],[0,"old","wasi_common","",null,null],[0,"snapshot_0","wasi_common::old","",null,null],[3,"WasiCtx","wasi_common::old::snapshot_0","",null,null],[3,"WasiCtxBuilder","","A builder allowing customizable construction of `WasiCtx`…",null,null],[11,"new","","Builder for a new `WasiCtx`.",12,[[],["self"]]],[11,"args","","Add arguments to the command-line arguments list.",12,[[],["self"]]],[11,"arg","","Add an argument to the command-line arguments list.",12,[[["asref"]],["self"]]],[11,"inherit_args","","Inherit the command-line arguments from the host process.",12,[[],["self"]]],[11,"inherit_stdio","","Inherit the stdin, stdout, and stderr streams from the…",12,[[],["self"]]],[11,"inherit_env","","Inherit the environment variables from the host process.",12,[[],["self"]]],[11,"env","","Add an entry to the environment.",12,[[["asref"]],["self"]]],[11,"envs","","Add entries to the environment.",12,[[],["self"]]],[11,"stdin","","Provide a File to use as stdin",12,[[["file"]],["self"]]],[11,"stdout","","Provide a File to use as stdout",12,[[["file"]],["self"]]],[11,"stderr","","Provide a File to use as stderr",12,[[["file"]],["self"]]],[11,"preopened_dir","","Add a preopened directory.",12,[[["path"],["asref",["path"]],["file"]],["self"]]],[11,"build","","Build a `WasiCtx`, consuming this `WasiCtxBuilder`.",12,[[],[["result",["wasictx"]],["wasictx"]]]],[11,"new","","Make a new `WasiCtx` with some default settings.",13,[[],["result"]]],[0,"wasi","","Types and constants shared between 32-bit and 64-bit wasi.…",null,null],[3,"__wasi_dirent_t","wasi_common::old::snapshot_0::wasi","",null,null],[12,"d_next","","",14,null],[12,"d_ino","","",14,null],[12,"d_namlen","","",14,null],[12,"d_type","","",14,null],[3,"__wasi_fdstat_t","","",null,null],[12,"fs_filetype","","",15,null],[12,"fs_flags","","",15,null],[12,"fs_rights_base","","",15,null],[12,"fs_rights_inheriting","","",15,null],[3,"__wasi_filestat_t","","",null,null],[12,"dev","","",16,null],[12,"ino","","",16,null],[12,"filetype","","",16,null],[12,"nlink","","",16,null],[12,"size","","",16,null],[12,"atim","","",16,null],[12,"mtim","","",16,null],[12,"ctim","","",16,null],[3,"__wasi_event_fd_readwrite_t","","",null,null],[12,"nbytes","","",17,null],[12,"flags","","",17,null],[3,"__wasi_event_t","","",null,null],[12,"userdata","","",18,null],[12,"error","","",18,null],[12,"type","","",18,null],[12,"u","","",18,null],[3,"__wasi_subscription_clock_t","","",null,null],[12,"identifier","","",19,null],[12,"id","","",19,null],[12,"timeout","","",19,null],[12,"precision","","",19,null],[12,"flags","","",19,null],[3,"__wasi_subscription_fd_readwrite_t","","",null,null],[12,"file_descriptor","","",20,null],[3,"__wasi_subscription_t","","",null,null],[12,"userdata","","",21,null],[12,"type","","",21,null],[12,"u","","",21,null],[19,"__wasi_event_u_t","","",null,null],[12,"fd_readwrite","","",22,null],[19,"__wasi_subscription_u_t","","",null,null],[12,"clock","","",23,null],[12,"fd_readwrite","","",23,null],[5,"strerror","","",null,[[["__wasi_errno_t"]],["str"]]],[5,"whence_to_str","","",null,[[["__wasi_whence_t"]],["str"]]],[6,"__wasi_filesize_t","","",null,null],[6,"__wasi_timestamp_t","","",null,null],[6,"__wasi_clockid_t","","",null,null],[6,"__wasi_errno_t","","",null,null],[6,"__wasi_rights_t","","",null,null],[6,"__wasi_fd_t","","",null,null],[6,"__wasi_filedelta_t","","",null,null],[6,"__wasi_whence_t","","",null,null],[6,"__wasi_dircookie_t","","",null,null],[6,"__wasi_dirnamlen_t","","",null,null],[6,"__wasi_inode_t","","",null,null],[6,"__wasi_filetype_t","","",null,null],[6,"__wasi_advice_t","","",null,null],[6,"__wasi_fdflags_t","","",null,null],[6,"__wasi_device_t","","",null,null],[6,"__wasi_fstflags_t","","",null,null],[6,"__wasi_lookupflags_t","","",null,null],[6,"__wasi_oflags_t","","",null,null],[6,"__wasi_linkcount_t","","",null,null],[6,"__wasi_userdata_t","","",null,null],[6,"__wasi_eventtype_t","","",null,null],[6,"__wasi_eventrwflags_t","","",null,null],[6,"__wasi_subclockflags_t","","",null,null],[6,"__wasi_exitcode_t","","",null,null],[6,"__wasi_signal_t","","",null,null],[6,"__wasi_riflags_t","","",null,null],[6,"__wasi_roflags_t","","",null,null],[6,"__wasi_siflags_t","","",null,null],[6,"__wasi_sdflags_t","","",null,null],[6,"__wasi_preopentype_t","","",null,null],[17,"__WASI_CLOCKID_REALTIME","","",null,null],[17,"__WASI_CLOCKID_MONOTONIC","","",null,null],[17,"__WASI_CLOCKID_PROCESS_CPUTIME_ID","","",null,null],[17,"__WASI_CLOCKID_THREAD_CPUTIME_ID","","",null,null],[17,"__WASI_ERRNO_SUCCESS","","",null,null],[17,"__WASI_ERRNO_2BIG","","",null,null],[17,"__WASI_ERRNO_ACCES","","",null,null],[17,"__WASI_ERRNO_ADDRINUSE","","",null,null],[17,"__WASI_ERRNO_ADDRNOTAVAIL","","",null,null],[17,"__WASI_ERRNO_AFNOSUPPORT","","",null,null],[17,"__WASI_ERRNO_AGAIN","","",null,null],[17,"__WASI_ERRNO_ALREADY","","",null,null],[17,"__WASI_ERRNO_BADF","","",null,null],[17,"__WASI_ERRNO_BADMSG","","",null,null],[17,"__WASI_ERRNO_BUSY","","",null,null],[17,"__WASI_ERRNO_CANCELED","","",null,null],[17,"__WASI_ERRNO_CHILD","","",null,null],[17,"__WASI_ERRNO_CONNABORTED","","",null,null],[17,"__WASI_ERRNO_CONNREFUSED","","",null,null],[17,"__WASI_ERRNO_CONNRESET","","",null,null],[17,"__WASI_ERRNO_DEADLK","","",null,null],[17,"__WASI_ERRNO_DESTADDRREQ","","",null,null],[17,"__WASI_ERRNO_DOM","","",null,null],[17,"__WASI_ERRNO_DQUOT","","",null,null],[17,"__WASI_ERRNO_EXIST","","",null,null],[17,"__WASI_ERRNO_FAULT","","",null,null],[17,"__WASI_ERRNO_FBIG","","",null,null],[17,"__WASI_ERRNO_HOSTUNREACH","","",null,null],[17,"__WASI_ERRNO_IDRM","","",null,null],[17,"__WASI_ERRNO_ILSEQ","","",null,null],[17,"__WASI_ERRNO_INPROGRESS","","",null,null],[17,"__WASI_ERRNO_INTR","","",null,null],[17,"__WASI_ERRNO_INVAL","","",null,null],[17,"__WASI_ERRNO_IO","","",null,null],[17,"__WASI_ERRNO_ISCONN","","",null,null],[17,"__WASI_ERRNO_ISDIR","","",null,null],[17,"__WASI_ERRNO_LOOP","","",null,null],[17,"__WASI_ERRNO_MFILE","","",null,null],[17,"__WASI_ERRNO_MLINK","","",null,null],[17,"__WASI_ERRNO_MSGSIZE","","",null,null],[17,"__WASI_ERRNO_MULTIHOP","","",null,null],[17,"__WASI_ERRNO_NAMETOOLONG","","",null,null],[17,"__WASI_ERRNO_NETDOWN","","",null,null],[17,"__WASI_ERRNO_NETRESET","","",null,null],[17,"__WASI_ERRNO_NETUNREACH","","",null,null],[17,"__WASI_ERRNO_NFILE","","",null,null],[17,"__WASI_ERRNO_NOBUFS","","",null,null],[17,"__WASI_ERRNO_NODEV","","",null,null],[17,"__WASI_ERRNO_NOENT","","",null,null],[17,"__WASI_ERRNO_NOEXEC","","",null,null],[17,"__WASI_ERRNO_NOLCK","","",null,null],[17,"__WASI_ERRNO_NOLINK","","",null,null],[17,"__WASI_ERRNO_NOMEM","","",null,null],[17,"__WASI_ERRNO_NOMSG","","",null,null],[17,"__WASI_ERRNO_NOPROTOOPT","","",null,null],[17,"__WASI_ERRNO_NOSPC","","",null,null],[17,"__WASI_ERRNO_NOSYS","","",null,null],[17,"__WASI_ERRNO_NOTCONN","","",null,null],[17,"__WASI_ERRNO_NOTDIR","","",null,null],[17,"__WASI_ERRNO_NOTEMPTY","","",null,null],[17,"__WASI_ERRNO_NOTRECOVERABLE","","",null,null],[17,"__WASI_ERRNO_NOTSOCK","","",null,null],[17,"__WASI_ERRNO_NOTSUP","","",null,null],[17,"__WASI_ERRNO_NOTTY","","",null,null],[17,"__WASI_ERRNO_NXIO","","",null,null],[17,"__WASI_ERRNO_OVERFLOW","","",null,null],[17,"__WASI_ERRNO_OWNERDEAD","","",null,null],[17,"__WASI_ERRNO_PERM","","",null,null],[17,"__WASI_ERRNO_PIPE","","",null,null],[17,"__WASI_ERRNO_PROTO","","",null,null],[17,"__WASI_ERRNO_PROTONOSUPPORT","","",null,null],[17,"__WASI_ERRNO_PROTOTYPE","","",null,null],[17,"__WASI_ERRNO_RANGE","","",null,null],[17,"__WASI_ERRNO_ROFS","","",null,null],[17,"__WASI_ERRNO_SPIPE","","",null,null],[17,"__WASI_ERRNO_SRCH","","",null,null],[17,"__WASI_ERRNO_STALE","","",null,null],[17,"__WASI_ERRNO_TIMEDOUT","","",null,null],[17,"__WASI_ERRNO_TXTBSY","","",null,null],[17,"__WASI_ERRNO_XDEV","","",null,null],[17,"__WASI_ERRNO_NOTCAPABLE","","",null,null],[17,"__WASI_RIGHTS_FD_DATASYNC","","",null,null],[17,"__WASI_RIGHTS_FD_READ","","",null,null],[17,"__WASI_RIGHTS_FD_SEEK","","",null,null],[17,"__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS","","",null,null],[17,"__WASI_RIGHTS_FD_SYNC","","",null,null],[17,"__WASI_RIGHTS_FD_TELL","","",null,null],[17,"__WASI_RIGHTS_FD_WRITE","","",null,null],[17,"__WASI_RIGHTS_FD_ADVISE","","",null,null],[17,"__WASI_RIGHTS_FD_ALLOCATE","","",null,null],[17,"__WASI_RIGHTS_PATH_CREATE_DIRECTORY","","",null,null],[17,"__WASI_RIGHTS_PATH_CREATE_FILE","","",null,null],[17,"__WASI_RIGHTS_PATH_LINK_SOURCE","","",null,null],[17,"__WASI_RIGHTS_PATH_LINK_TARGET","","",null,null],[17,"__WASI_RIGHTS_PATH_OPEN","","",null,null],[17,"__WASI_RIGHTS_FD_READDIR","","",null,null],[17,"__WASI_RIGHTS_PATH_READLINK","","",null,null],[17,"__WASI_RIGHTS_PATH_RENAME_SOURCE","","",null,null],[17,"__WASI_RIGHTS_PATH_RENAME_TARGET","","",null,null],[17,"__WASI_RIGHTS_PATH_FILESTAT_GET","","",null,null],[17,"__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE","","",null,null],[17,"__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES","","",null,null],[17,"__WASI_RIGHTS_FD_FILESTAT_GET","","",null,null],[17,"__WASI_RIGHTS_FD_FILESTAT_SET_SIZE","","",null,null],[17,"__WASI_RIGHTS_FD_FILESTAT_SET_TIMES","","",null,null],[17,"__WASI_RIGHTS_PATH_SYMLINK","","",null,null],[17,"__WASI_RIGHTS_PATH_REMOVE_DIRECTORY","","",null,null],[17,"__WASI_RIGHTS_PATH_UNLINK_FILE","","",null,null],[17,"__WASI_RIGHTS_POLL_FD_READWRITE","","",null,null],[17,"__WASI_RIGHTS_SOCK_SHUTDOWN","","",null,null],[17,"__WASI_WHENCE_CUR","","",null,null],[17,"__WASI_WHENCE_END","","",null,null],[17,"__WASI_WHENCE_SET","","",null,null],[17,"__WASI_FILETYPE_UNKNOWN","","",null,null],[17,"__WASI_FILETYPE_BLOCK_DEVICE","","",null,null],[17,"__WASI_FILETYPE_CHARACTER_DEVICE","","",null,null],[17,"__WASI_FILETYPE_DIRECTORY","","",null,null],[17,"__WASI_FILETYPE_REGULAR_FILE","","",null,null],[17,"__WASI_FILETYPE_SOCKET_DGRAM","","",null,null],[17,"__WASI_FILETYPE_SOCKET_STREAM","","",null,null],[17,"__WASI_FILETYPE_SYMBOLIC_LINK","","",null,null],[17,"__WASI_ADVICE_NORMAL","","",null,null],[17,"__WASI_ADVICE_SEQUENTIAL","","",null,null],[17,"__WASI_ADVICE_RANDOM","","",null,null],[17,"__WASI_ADVICE_WILLNEED","","",null,null],[17,"__WASI_ADVICE_DONTNEED","","",null,null],[17,"__WASI_ADVICE_NOREUSE","","",null,null],[17,"__WASI_FDFLAGS_APPEND","","",null,null],[17,"__WASI_FDFLAGS_DSYNC","","",null,null],[17,"__WASI_FDFLAGS_NONBLOCK","","",null,null],[17,"__WASI_FDFLAGS_RSYNC","","",null,null],[17,"__WASI_FDFLAGS_SYNC","","",null,null],[17,"__WASI_FSTFLAGS_ATIM","","",null,null],[17,"__WASI_FSTFLAGS_ATIM_NOW","","",null,null],[17,"__WASI_FSTFLAGS_MTIM","","",null,null],[17,"__WASI_FSTFLAGS_MTIM_NOW","","",null,null],[17,"__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW","","",null,null],[17,"__WASI_OFLAGS_CREAT","","",null,null],[17,"__WASI_OFLAGS_DIRECTORY","","",null,null],[17,"__WASI_OFLAGS_EXCL","","",null,null],[17,"__WASI_OFLAGS_TRUNC","","",null,null],[17,"__WASI_EVENTTYPE_CLOCK","","",null,null],[17,"__WASI_EVENTTYPE_FD_READ","","",null,null],[17,"__WASI_EVENTTYPE_FD_WRITE","","",null,null],[17,"__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP","","",null,null],[17,"__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME","","",null,null],[17,"__WASI_SIGNAL_NONE","","",null,null],[17,"__WASI_SIGNAL_HUP","","",null,null],[17,"__WASI_SIGNAL_INT","","",null,null],[17,"__WASI_SIGNAL_QUIT","","",null,null],[17,"__WASI_SIGNAL_ILL","","",null,null],[17,"__WASI_SIGNAL_TRAP","","",null,null],[17,"__WASI_SIGNAL_ABRT","","",null,null],[17,"__WASI_SIGNAL_BUS","","",null,null],[17,"__WASI_SIGNAL_FPE","","",null,null],[17,"__WASI_SIGNAL_KILL","","",null,null],[17,"__WASI_SIGNAL_USR1","","",null,null],[17,"__WASI_SIGNAL_SEGV","","",null,null],[17,"__WASI_SIGNAL_USR2","","",null,null],[17,"__WASI_SIGNAL_PIPE","","",null,null],[17,"__WASI_SIGNAL_ALRM","","",null,null],[17,"__WASI_SIGNAL_TERM","","",null,null],[17,"__WASI_SIGNAL_CHLD","","",null,null],[17,"__WASI_SIGNAL_CONT","","",null,null],[17,"__WASI_SIGNAL_STOP","","",null,null],[17,"__WASI_SIGNAL_TSTP","","",null,null],[17,"__WASI_SIGNAL_TTIN","","",null,null],[17,"__WASI_SIGNAL_TTOU","","",null,null],[17,"__WASI_SIGNAL_URG","","",null,null],[17,"__WASI_SIGNAL_XCPU","","",null,null],[17,"__WASI_SIGNAL_XFSZ","","",null,null],[17,"__WASI_SIGNAL_VTALRM","","",null,null],[17,"__WASI_SIGNAL_PROF","","",null,null],[17,"__WASI_SIGNAL_WINCH","","",null,null],[17,"__WASI_SIGNAL_POLL","","",null,null],[17,"__WASI_SIGNAL_PWR","","",null,null],[17,"__WASI_SIGNAL_SYS","","",null,null],[17,"__WASI_RIFLAGS_RECV_PEEK","","",null,null],[17,"__WASI_RIFLAGS_RECV_WAITALL","","",null,null],[17,"__WASI_ROFLAGS_RECV_DATA_TRUNCATED","","",null,null],[17,"__WASI_SDFLAGS_RD","","",null,null],[17,"__WASI_SDFLAGS_WR","","",null,null],[17,"__WASI_PREOPENTYPE_DIR","","",null,null],[17,"__WASI_DIRCOOKIE_START","","",null,null],[0,"wasi32","wasi_common::old::snapshot_0","Types and constants specific to 32-bit wasi. These are…",null,null],[3,"__wasi_iovec_t","wasi_common::old::snapshot_0::wasi32","",null,null],[12,"buf","","",24,null],[12,"buf_len","","",24,null],[3,"__wasi_ciovec_t","","",null,null],[12,"buf","","",25,null],[12,"buf_len","","",25,null],[3,"__wasi_prestat_dir_t","","",null,null],[12,"pr_name_len","","",26,null],[3,"__wasi_prestat_t","","",null,null],[12,"pr_type","","",27,null],[12,"u","","",27,null],[19,"__wasi_prestat_u_t","","",null,null],[12,"dir","","",28,null],[6,"uintptr_t","","",null,null],[6,"size_t","","",null,null],[6,"__wasi_size_t","","",null,null],[6,"__wasi_iovec_array_t","","",null,null],[6,"__wasi_ciovec_array_t","","",null,null],[0,"hostcalls","wasi_common::old::snapshot_0","",null,null],[5,"args_get","wasi_common::old::snapshot_0::hostcalls","",null,[[["uintptr_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_args_get","","",null,[[["usize"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"args_sizes_get","","",null,[[["uintptr_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_args_sizes_get","","",null,[[["usize"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"environ_get","","",null,[[["uintptr_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_environ_get","","",null,[[["usize"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"environ_sizes_get","","",null,[[["uintptr_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_environ_sizes_get","","",null,[[["usize"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"clock_res_get","","",null,[[["__wasi_clockid_t"],["uintptr_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_clock_res_get","","",null,[[["usize"],["__wasi_clockid_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"clock_time_get","","",null,[[["__wasi_clockid_t"],["__wasi_timestamp_t"],["uintptr_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_clock_time_get","","",null,[[["usize"],["__wasi_clockid_t"],["__wasi_timestamp_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"fd_advise","","",null,[[["__wasi_advice_t"],["__wasi_fd_t"],["__wasi_filesize_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_advise","","",null,[[["usize"],["__wasi_fd_t"],["__wasi_filesize_t"],["__wasi_advice_t"]],["__wasi_errno_t"]]],[5,"fd_allocate","","",null,[[["__wasi_fd_t"],["__wasi_filesize_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_allocate","","",null,[[["usize"],["__wasi_fd_t"],["__wasi_filesize_t"]],["__wasi_errno_t"]]],[5,"fd_close","","",null,[[["__wasi_fd_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_close","","",null,[[["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_datasync","","",null,[[["__wasi_fd_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_datasync","","",null,[[["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_fdstat_get","","",null,[[["uintptr_t"],["__wasi_fd_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_fdstat_get","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_fdstat_set_flags","","",null,[[["__wasi_fd_t"],["__wasi_fdflags_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_fdstat_set_flags","","",null,[[["usize"],["__wasi_fd_t"],["__wasi_fdflags_t"]],["__wasi_errno_t"]]],[5,"fd_fdstat_set_rights","","",null,[[["__wasi_rights_t"],["__wasi_fd_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_fdstat_set_rights","","",null,[[["__wasi_rights_t"],["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_filestat_get","","",null,[[["uintptr_t"],["__wasi_fd_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_filestat_get","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_filestat_set_size","","",null,[[["__wasi_fd_t"],["__wasi_filesize_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_filestat_set_size","","",null,[[["usize"],["__wasi_fd_t"],["__wasi_filesize_t"]],["__wasi_errno_t"]]],[5,"fd_filestat_set_times","","",null,[[["__wasi_timestamp_t"],["__wasi_fstflags_t"],["__wasi_fd_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_filestat_set_times","","",null,[[["usize"],["__wasi_timestamp_t"],["__wasi_fd_t"],["__wasi_fstflags_t"]],["__wasi_errno_t"]]],[5,"fd_pread","","",null,[[["__wasi_filesize_t"],["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_pread","","",null,[[["uintptr_t"],["__wasi_fd_t"],["usize"],["size_t"],["__wasi_filesize_t"]],["__wasi_errno_t"]]],[5,"fd_prestat_get","","",null,[[["uintptr_t"],["__wasi_fd_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_prestat_get","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_prestat_dir_name","","",null,[[["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_prestat_dir_name","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"],["size_t"]],["__wasi_errno_t"]]],[5,"fd_pwrite","","",null,[[["__wasi_filesize_t"],["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_pwrite","","",null,[[["uintptr_t"],["__wasi_fd_t"],["usize"],["size_t"],["__wasi_filesize_t"]],["__wasi_errno_t"]]],[5,"fd_read","","",null,[[["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_read","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"],["size_t"]],["__wasi_errno_t"]]],[5,"fd_readdir","","",null,[[["__wasi_dircookie_t"],["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_readdir","","",null,[[["uintptr_t"],["__wasi_fd_t"],["__wasi_dircookie_t"],["usize"],["size_t"]],["__wasi_errno_t"]]],[5,"fd_renumber","","",null,[[["__wasi_fd_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_renumber","","",null,[[["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_seek","","",null,[[["__wasi_whence_t"],["uintptr_t"],["__wasi_filedelta_t"],["__wasi_fd_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_seek","","",null,[[["usize"],["__wasi_filedelta_t"],["__wasi_fd_t"],["uintptr_t"],["__wasi_whence_t"]],["__wasi_errno_t"]]],[5,"fd_sync","","",null,[[["__wasi_fd_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_sync","","",null,[[["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_tell","","",null,[[["uintptr_t"],["__wasi_fd_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_tell","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_write","","",null,[[["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_fd_write","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"],["size_t"]],["__wasi_errno_t"]]],[5,"path_create_directory","","",null,[[["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_path_create_directory","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"],["size_t"]],["__wasi_errno_t"]]],[5,"path_filestat_get","","",null,[[["size_t"],["uintptr_t"],["__wasi_fd_t"],["__wasi_lookupflags_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_path_filestat_get","","",null,[[["uintptr_t"],["__wasi_fd_t"],["usize"],["__wasi_lookupflags_t"],["size_t"]],["__wasi_errno_t"]]],[5,"path_filestat_set_times","","",null,[[["uintptr_t"],["__wasi_fstflags_t"],["__wasi_fd_t"],["wasictx"],["__wasi_timestamp_t"],["__wasi_lookupflags_t"],["size_t"]],["__wasi_errno_t"]]],[5,"old_wasi_common_path_filestat_set_times","","",null,[[["uintptr_t"],["__wasi_fd_t"],["__wasi_fstflags_t"],["usize"],["__wasi_timestamp_t"],["__wasi_lookupflags_t"],["size_t"]],["__wasi_errno_t"]]],[5,"path_link","","",null,[[["size_t"],["uintptr_t"],["__wasi_fd_t"],["__wasi_lookupflags_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_path_link","","",null,[[["uintptr_t"],["__wasi_fd_t"],["usize"],["__wasi_lookupflags_t"],["size_t"]],["__wasi_errno_t"]]],[5,"path_open","","",null,[[["uintptr_t"],["__wasi_fd_t"],["__wasi_fdflags_t"],["wasictx"],["__wasi_rights_t"],["__wasi_oflags_t"],["__wasi_lookupflags_t"],["size_t"]],["__wasi_errno_t"]]],[5,"old_wasi_common_path_open","","",null,[[["uintptr_t"],["__wasi_fd_t"],["__wasi_fdflags_t"],["__wasi_rights_t"],["usize"],["__wasi_oflags_t"],["__wasi_lookupflags_t"],["size_t"]],["__wasi_errno_t"]]],[5,"path_readlink","","",null,[[["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_path_readlink","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"],["size_t"]],["__wasi_errno_t"]]],[5,"path_remove_directory","","",null,[[["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_path_remove_directory","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"],["size_t"]],["__wasi_errno_t"]]],[5,"path_rename","","",null,[[["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_path_rename","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"],["size_t"]],["__wasi_errno_t"]]],[5,"path_symlink","","",null,[[["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_path_symlink","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"],["size_t"]],["__wasi_errno_t"]]],[5,"path_unlink_file","","",null,[[["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_path_unlink_file","","",null,[[["usize"],["uintptr_t"],["__wasi_fd_t"],["size_t"]],["__wasi_errno_t"]]],[5,"poll_oneoff","","",null,[[["uintptr_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_poll_oneoff","","",null,[[["usize"],["uintptr_t"],["size_t"]],["__wasi_errno_t"]]],[5,"proc_exit","","",null,[[["__wasi_exitcode_t"],["wasictx"]]]],[5,"old_wasi_common_proc_exit","","",null,[[["__wasi_exitcode_t"],["usize"]]]],[5,"proc_raise","","",null,[[["__wasi_signal_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_proc_raise","","",null,[[["usize"],["__wasi_signal_t"]],["__wasi_errno_t"]]],[5,"sched_yield","","",null,[[["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_sched_yield","","",null,[[["usize"]],["__wasi_errno_t"]]],[5,"random_get","","",null,[[["uintptr_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_random_get","","",null,[[["usize"],["uintptr_t"],["size_t"]],["__wasi_errno_t"]]],[5,"sock_recv","","",null,[[["__wasi_riflags_t"],["uintptr_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_sock_recv","","",null,[[["uintptr_t"],["__wasi_fd_t"],["usize"],["size_t"],["__wasi_riflags_t"]],["__wasi_errno_t"]]],[5,"sock_send","","",null,[[["uintptr_t"],["__wasi_siflags_t"],["__wasi_fd_t"],["size_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_sock_send","","",null,[[["uintptr_t"],["__wasi_fd_t"],["usize"],["__wasi_siflags_t"],["size_t"]],["__wasi_errno_t"]]],[5,"sock_shutdown","","",null,[[["__wasi_fd_t"],["__wasi_sdflags_t"],["wasictx"]],["__wasi_errno_t"]]],[5,"old_wasi_common_sock_shutdown","","",null,[[["usize"],["__wasi_fd_t"],["__wasi_sdflags_t"]],["__wasi_errno_t"]]],[6,"Error","wasi_common::old::snapshot_0","",null,null],[6,"Result","","",null,null],[0,"wasi","wasi_common","Types and constants shared between 32-bit and 64-bit wasi.…",null,null],[3,"__wasi_dirent_t","wasi_common::wasi","",null,null],[12,"d_next","","",29,null],[12,"d_ino","","",29,null],[12,"d_namlen","","",29,null],[12,"d_type","","",29,null],[3,"__wasi_fdstat_t","","",null,null],[12,"fs_filetype","","",30,null],[12,"fs_flags","","",30,null],[12,"fs_rights_base","","",30,null],[12,"fs_rights_inheriting","","",30,null],[3,"__wasi_filestat_t","","",null,null],[12,"dev","","",31,null],[12,"ino","","",31,null],[12,"filetype","","",31,null],[12,"nlink","","",31,null],[12,"size","","",31,null],[12,"atim","","",31,null],[12,"mtim","","",31,null],[12,"ctim","","",31,null],[3,"__wasi_event_fd_readwrite_t","","",null,null],[12,"nbytes","","",32,null],[12,"flags","","",32,null],[3,"__wasi_event_t","","",null,null],[12,"userdata","","",33,null],[12,"error","","",33,null],[12,"type","","",33,null],[12,"u","","",33,null],[3,"__wasi_subscription_clock_t","","",null,null],[12,"id","","",34,null],[12,"timeout","","",34,null],[12,"precision","","",34,null],[12,"flags","","",34,null],[3,"__wasi_subscription_fd_readwrite_t","","",null,null],[12,"file_descriptor","","",35,null],[3,"__wasi_subscription_t","","",null,null],[12,"userdata","","",36,null],[12,"type","","",36,null],[12,"u","","",36,null],[19,"__wasi_event_u_t","","",null,null],[12,"fd_readwrite","","",37,null],[19,"__wasi_subscription_u_t","","",null,null],[12,"clock","","",38,null],[12,"fd_readwrite","","",38,null],[5,"strerror","","",null,[[["__wasi_errno_t"]],["str"]]],[5,"whence_to_str","","",null,[[["__wasi_whence_t"]],["str"]]],[6,"__wasi_filesize_t","","",null,null],[6,"__wasi_timestamp_t","","",null,null],[6,"__wasi_clockid_t","","",null,null],[6,"__wasi_errno_t","","",null,null],[6,"__wasi_rights_t","","",null,null],[6,"__wasi_fd_t","","",null,null],[6,"__wasi_filedelta_t","","",null,null],[6,"__wasi_whence_t","","",null,null],[6,"__wasi_dircookie_t","","",null,null],[6,"__wasi_dirnamlen_t","","",null,null],[6,"__wasi_inode_t","","",null,null],[6,"__wasi_filetype_t","","",null,null],[6,"__wasi_advice_t","","",null,null],[6,"__wasi_fdflags_t","","",null,null],[6,"__wasi_device_t","","",null,null],[6,"__wasi_fstflags_t","","",null,null],[6,"__wasi_lookupflags_t","","",null,null],[6,"__wasi_oflags_t","","",null,null],[6,"__wasi_linkcount_t","","",null,null],[6,"__wasi_userdata_t","","",null,null],[6,"__wasi_eventtype_t","","",null,null],[6,"__wasi_eventrwflags_t","","",null,null],[6,"__wasi_subclockflags_t","","",null,null],[6,"__wasi_exitcode_t","","",null,null],[6,"__wasi_signal_t","","",null,null],[6,"__wasi_riflags_t","","",null,null],[6,"__wasi_roflags_t","","",null,null],[6,"__wasi_siflags_t","","",null,null],[6,"__wasi_sdflags_t","","",null,null],[6,"__wasi_preopentype_t","","",null,null],[17,"__WASI_CLOCKID_REALTIME","","",null,null],[17,"__WASI_CLOCKID_MONOTONIC","","",null,null],[17,"__WASI_CLOCKID_PROCESS_CPUTIME_ID","","",null,null],[17,"__WASI_CLOCKID_THREAD_CPUTIME_ID","","",null,null],[17,"__WASI_ERRNO_SUCCESS","","",null,null],[17,"__WASI_ERRNO_2BIG","","",null,null],[17,"__WASI_ERRNO_ACCES","","",null,null],[17,"__WASI_ERRNO_ADDRINUSE","","",null,null],[17,"__WASI_ERRNO_ADDRNOTAVAIL","","",null,null],[17,"__WASI_ERRNO_AFNOSUPPORT","","",null,null],[17,"__WASI_ERRNO_AGAIN","","",null,null],[17,"__WASI_ERRNO_ALREADY","","",null,null],[17,"__WASI_ERRNO_BADF","","",null,null],[17,"__WASI_ERRNO_BADMSG","","",null,null],[17,"__WASI_ERRNO_BUSY","","",null,null],[17,"__WASI_ERRNO_CANCELED","","",null,null],[17,"__WASI_ERRNO_CHILD","","",null,null],[17,"__WASI_ERRNO_CONNABORTED","","",null,null],[17,"__WASI_ERRNO_CONNREFUSED","","",null,null],[17,"__WASI_ERRNO_CONNRESET","","",null,null],[17,"__WASI_ERRNO_DEADLK","","",null,null],[17,"__WASI_ERRNO_DESTADDRREQ","","",null,null],[17,"__WASI_ERRNO_DOM","","",null,null],[17,"__WASI_ERRNO_DQUOT","","",null,null],[17,"__WASI_ERRNO_EXIST","","",null,null],[17,"__WASI_ERRNO_FAULT","","",null,null],[17,"__WASI_ERRNO_FBIG","","",null,null],[17,"__WASI_ERRNO_HOSTUNREACH","","",null,null],[17,"__WASI_ERRNO_IDRM","","",null,null],[17,"__WASI_ERRNO_ILSEQ","","",null,null],[17,"__WASI_ERRNO_INPROGRESS","","",null,null],[17,"__WASI_ERRNO_INTR","","",null,null],[17,"__WASI_ERRNO_INVAL","","",null,null],[17,"__WASI_ERRNO_IO","","",null,null],[17,"__WASI_ERRNO_ISCONN","","",null,null],[17,"__WASI_ERRNO_ISDIR","","",null,null],[17,"__WASI_ERRNO_LOOP","","",null,null],[17,"__WASI_ERRNO_MFILE","","",null,null],[17,"__WASI_ERRNO_MLINK","","",null,null],[17,"__WASI_ERRNO_MSGSIZE","","",null,null],[17,"__WASI_ERRNO_MULTIHOP","","",null,null],[17,"__WASI_ERRNO_NAMETOOLONG","","",null,null],[17,"__WASI_ERRNO_NETDOWN","","",null,null],[17,"__WASI_ERRNO_NETRESET","","",null,null],[17,"__WASI_ERRNO_NETUNREACH","","",null,null],[17,"__WASI_ERRNO_NFILE","","",null,null],[17,"__WASI_ERRNO_NOBUFS","","",null,null],[17,"__WASI_ERRNO_NODEV","","",null,null],[17,"__WASI_ERRNO_NOENT","","",null,null],[17,"__WASI_ERRNO_NOEXEC","","",null,null],[17,"__WASI_ERRNO_NOLCK","","",null,null],[17,"__WASI_ERRNO_NOLINK","","",null,null],[17,"__WASI_ERRNO_NOMEM","","",null,null],[17,"__WASI_ERRNO_NOMSG","","",null,null],[17,"__WASI_ERRNO_NOPROTOOPT","","",null,null],[17,"__WASI_ERRNO_NOSPC","","",null,null],[17,"__WASI_ERRNO_NOSYS","","",null,null],[17,"__WASI_ERRNO_NOTCONN","","",null,null],[17,"__WASI_ERRNO_NOTDIR","","",null,null],[17,"__WASI_ERRNO_NOTEMPTY","","",null,null],[17,"__WASI_ERRNO_NOTRECOVERABLE","","",null,null],[17,"__WASI_ERRNO_NOTSOCK","","",null,null],[17,"__WASI_ERRNO_NOTSUP","","",null,null],[17,"__WASI_ERRNO_NOTTY","","",null,null],[17,"__WASI_ERRNO_NXIO","","",null,null],[17,"__WASI_ERRNO_OVERFLOW","","",null,null],[17,"__WASI_ERRNO_OWNERDEAD","","",null,null],[17,"__WASI_ERRNO_PERM","","",null,null],[17,"__WASI_ERRNO_PIPE","","",null,null],[17,"__WASI_ERRNO_PROTO","","",null,null],[17,"__WASI_ERRNO_PROTONOSUPPORT","","",null,null],[17,"__WASI_ERRNO_PROTOTYPE","","",null,null],[17,"__WASI_ERRNO_RANGE","","",null,null],[17,"__WASI_ERRNO_ROFS","","",null,null],[17,"__WASI_ERRNO_SPIPE","","",null,null],[17,"__WASI_ERRNO_SRCH","","",null,null],[17,"__WASI_ERRNO_STALE","","",null,null],[17,"__WASI_ERRNO_TIMEDOUT","","",null,null],[17,"__WASI_ERRNO_TXTBSY","","",null,null],[17,"__WASI_ERRNO_XDEV","","",null,null],[17,"__WASI_ERRNO_NOTCAPABLE","","",null,null],[17,"__WASI_RIGHTS_FD_DATASYNC","","",null,null],[17,"__WASI_RIGHTS_FD_READ","","",null,null],[17,"__WASI_RIGHTS_FD_SEEK","","",null,null],[17,"__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS","","",null,null],[17,"__WASI_RIGHTS_FD_SYNC","","",null,null],[17,"__WASI_RIGHTS_FD_TELL","","",null,null],[17,"__WASI_RIGHTS_FD_WRITE","","",null,null],[17,"__WASI_RIGHTS_FD_ADVISE","","",null,null],[17,"__WASI_RIGHTS_FD_ALLOCATE","","",null,null],[17,"__WASI_RIGHTS_PATH_CREATE_DIRECTORY","","",null,null],[17,"__WASI_RIGHTS_PATH_CREATE_FILE","","",null,null],[17,"__WASI_RIGHTS_PATH_LINK_SOURCE","","",null,null],[17,"__WASI_RIGHTS_PATH_LINK_TARGET","","",null,null],[17,"__WASI_RIGHTS_PATH_OPEN","","",null,null],[17,"__WASI_RIGHTS_FD_READDIR","","",null,null],[17,"__WASI_RIGHTS_PATH_READLINK","","",null,null],[17,"__WASI_RIGHTS_PATH_RENAME_SOURCE","","",null,null],[17,"__WASI_RIGHTS_PATH_RENAME_TARGET","","",null,null],[17,"__WASI_RIGHTS_PATH_FILESTAT_GET","","",null,null],[17,"__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE","","",null,null],[17,"__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES","","",null,null],[17,"__WASI_RIGHTS_FD_FILESTAT_GET","","",null,null],[17,"__WASI_RIGHTS_FD_FILESTAT_SET_SIZE","","",null,null],[17,"__WASI_RIGHTS_FD_FILESTAT_SET_TIMES","","",null,null],[17,"__WASI_RIGHTS_PATH_SYMLINK","","",null,null],[17,"__WASI_RIGHTS_PATH_REMOVE_DIRECTORY","","",null,null],[17,"__WASI_RIGHTS_PATH_UNLINK_FILE","","",null,null],[17,"__WASI_RIGHTS_POLL_FD_READWRITE","","",null,null],[17,"__WASI_RIGHTS_SOCK_SHUTDOWN","","",null,null],[17,"__WASI_WHENCE_SET","","",null,null],[17,"__WASI_WHENCE_CUR","","",null,null],[17,"__WASI_WHENCE_END","","",null,null],[17,"__WASI_FILETYPE_UNKNOWN","","",null,null],[17,"__WASI_FILETYPE_BLOCK_DEVICE","","",null,null],[17,"__WASI_FILETYPE_CHARACTER_DEVICE","","",null,null],[17,"__WASI_FILETYPE_DIRECTORY","","",null,null],[17,"__WASI_FILETYPE_REGULAR_FILE","","",null,null],[17,"__WASI_FILETYPE_SOCKET_DGRAM","","",null,null],[17,"__WASI_FILETYPE_SOCKET_STREAM","","",null,null],[17,"__WASI_FILETYPE_SYMBOLIC_LINK","","",null,null],[17,"__WASI_ADVICE_NORMAL","","",null,null],[17,"__WASI_ADVICE_SEQUENTIAL","","",null,null],[17,"__WASI_ADVICE_RANDOM","","",null,null],[17,"__WASI_ADVICE_WILLNEED","","",null,null],[17,"__WASI_ADVICE_DONTNEED","","",null,null],[17,"__WASI_ADVICE_NOREUSE","","",null,null],[17,"__WASI_FDFLAGS_APPEND","","",null,null],[17,"__WASI_FDFLAGS_DSYNC","","",null,null],[17,"__WASI_FDFLAGS_NONBLOCK","","",null,null],[17,"__WASI_FDFLAGS_RSYNC","","",null,null],[17,"__WASI_FDFLAGS_SYNC","","",null,null],[17,"__WASI_FSTFLAGS_ATIM","","",null,null],[17,"__WASI_FSTFLAGS_ATIM_NOW","","",null,null],[17,"__WASI_FSTFLAGS_MTIM","","",null,null],[17,"__WASI_FSTFLAGS_MTIM_NOW","","",null,null],[17,"__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW","","",null,null],[17,"__WASI_OFLAGS_CREAT","","",null,null],[17,"__WASI_OFLAGS_DIRECTORY","","",null,null],[17,"__WASI_OFLAGS_EXCL","","",null,null],[17,"__WASI_OFLAGS_TRUNC","","",null,null],[17,"__WASI_EVENTTYPE_CLOCK","","",null,null],[17,"__WASI_EVENTTYPE_FD_READ","","",null,null],[17,"__WASI_EVENTTYPE_FD_WRITE","","",null,null],[17,"__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP","","",null,null],[17,"__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME","","",null,null],[17,"__WASI_SIGNAL_NONE","","",null,null],[17,"__WASI_SIGNAL_HUP","","",null,null],[17,"__WASI_SIGNAL_INT","","",null,null],[17,"__WASI_SIGNAL_QUIT","","",null,null],[17,"__WASI_SIGNAL_ILL","","",null,null],[17,"__WASI_SIGNAL_TRAP","","",null,null],[17,"__WASI_SIGNAL_ABRT","","",null,null],[17,"__WASI_SIGNAL_BUS","","",null,null],[17,"__WASI_SIGNAL_FPE","","",null,null],[17,"__WASI_SIGNAL_KILL","","",null,null],[17,"__WASI_SIGNAL_USR1","","",null,null],[17,"__WASI_SIGNAL_SEGV","","",null,null],[17,"__WASI_SIGNAL_USR2","","",null,null],[17,"__WASI_SIGNAL_PIPE","","",null,null],[17,"__WASI_SIGNAL_ALRM","","",null,null],[17,"__WASI_SIGNAL_TERM","","",null,null],[17,"__WASI_SIGNAL_CHLD","","",null,null],[17,"__WASI_SIGNAL_CONT","","",null,null],[17,"__WASI_SIGNAL_STOP","","",null,null],[17,"__WASI_SIGNAL_TSTP","","",null,null],[17,"__WASI_SIGNAL_TTIN","","",null,null],[17,"__WASI_SIGNAL_TTOU","","",null,null],[17,"__WASI_SIGNAL_URG","","",null,null],[17,"__WASI_SIGNAL_XCPU","","",null,null],[17,"__WASI_SIGNAL_XFSZ","","",null,null],[17,"__WASI_SIGNAL_VTALRM","","",null,null],[17,"__WASI_SIGNAL_PROF","","",null,null],[17,"__WASI_SIGNAL_WINCH","","",null,null],[17,"__WASI_SIGNAL_POLL","","",null,null],[17,"__WASI_SIGNAL_PWR","","",null,null],[17,"__WASI_SIGNAL_SYS","","",null,null],[17,"__WASI_RIFLAGS_RECV_PEEK","","",null,null],[17,"__WASI_RIFLAGS_RECV_WAITALL","","",null,null],[17,"__WASI_ROFLAGS_RECV_DATA_TRUNCATED","","",null,null],[17,"__WASI_SDFLAGS_RD","","",null,null],[17,"__WASI_SDFLAGS_WR","","",null,null],[17,"__WASI_PREOPENTYPE_DIR","","",null,null],[17,"__WASI_DIRCOOKIE_START","","",null,null],[0,"wasi32","wasi_common","Types and constants specific to 32-bit wasi. These are…",null,null],[3,"__wasi_iovec_t","wasi_common::wasi32","",null,null],[12,"buf","","",39,null],[12,"buf_len","","",39,null],[3,"__wasi_ciovec_t","","",null,null],[12,"buf","","",40,null],[12,"buf_len","","",40,null],[3,"__wasi_prestat_dir_t","","",null,null],[12,"pr_name_len","","",41,null],[3,"__wasi_prestat_t","","",null,null],[12,"pr_type","","",42,null],[12,"u","","",42,null],[19,"__wasi_prestat_u_t","","",null,null],[12,"dir","","",43,null],[6,"uintptr_t","","",null,null],[6,"size_t","","",null,null],[6,"__wasi_size_t","","",null,null],[6,"__wasi_iovec_array_t","","",null,null],[6,"__wasi_ciovec_array_t","","",null,null],[0,"hostcalls","wasi_common","",null,null],[5,"args_get","wasi_common::hostcalls","",null,[[["wasictx"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_args_get","","",null,[[["uintptr_t"],["usize"]],["__wasi_errno_t"]]],[5,"args_sizes_get","","",null,[[["wasictx"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_args_sizes_get","","",null,[[["uintptr_t"],["usize"]],["__wasi_errno_t"]]],[5,"environ_get","","",null,[[["wasictx"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_environ_get","","",null,[[["uintptr_t"],["usize"]],["__wasi_errno_t"]]],[5,"environ_sizes_get","","",null,[[["wasictx"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_environ_sizes_get","","",null,[[["uintptr_t"],["usize"]],["__wasi_errno_t"]]],[5,"clock_res_get","","",null,[[["wasictx"],["__wasi_clockid_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_clock_res_get","","",null,[[["uintptr_t"],["usize"],["__wasi_clockid_t"]],["__wasi_errno_t"]]],[5,"clock_time_get","","",null,[[["wasictx"],["__wasi_timestamp_t"],["__wasi_clockid_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_clock_time_get","","",null,[[["uintptr_t"],["usize"],["__wasi_timestamp_t"],["__wasi_clockid_t"]],["__wasi_errno_t"]]],[5,"fd_advise","","",null,[[["wasictx"],["__wasi_filesize_t"],["__wasi_fd_t"],["__wasi_advice_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_advise","","",null,[[["__wasi_advice_t"],["usize"],["__wasi_filesize_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_allocate","","",null,[[["wasictx"],["__wasi_filesize_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_allocate","","",null,[[["usize"],["__wasi_filesize_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_close","","",null,[[["wasictx"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_close","","",null,[[["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_datasync","","",null,[[["wasictx"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_datasync","","",null,[[["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_fdstat_get","","",null,[[["wasictx"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_fdstat_get","","",null,[[["uintptr_t"],["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_fdstat_set_flags","","",null,[[["wasictx"],["__wasi_fdflags_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_fdstat_set_flags","","",null,[[["usize"],["__wasi_fdflags_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_fdstat_set_rights","","",null,[[["wasictx"],["__wasi_rights_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_fdstat_set_rights","","",null,[[["usize"],["__wasi_rights_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_filestat_get","","",null,[[["wasictx"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_filestat_get","","",null,[[["uintptr_t"],["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_filestat_set_size","","",null,[[["wasictx"],["__wasi_filesize_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_filestat_set_size","","",null,[[["usize"],["__wasi_filesize_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_filestat_set_times","","",null,[[["wasictx"],["__wasi_timestamp_t"],["__wasi_fstflags_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_filestat_set_times","","",null,[[["usize"],["__wasi_timestamp_t"],["__wasi_fstflags_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_pread","","",null,[[["wasictx"],["size_t"],["__wasi_filesize_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_pread","","",null,[[["__wasi_fd_t"],["size_t"],["usize"],["__wasi_filesize_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"fd_prestat_get","","",null,[[["wasictx"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_prestat_get","","",null,[[["uintptr_t"],["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_prestat_dir_name","","",null,[[["wasictx"],["size_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_prestat_dir_name","","",null,[[["uintptr_t"],["usize"],["size_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_pwrite","","",null,[[["wasictx"],["size_t"],["__wasi_filesize_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_pwrite","","",null,[[["__wasi_fd_t"],["size_t"],["usize"],["__wasi_filesize_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"fd_read","","",null,[[["wasictx"],["size_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_read","","",null,[[["uintptr_t"],["usize"],["size_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_readdir","","",null,[[["wasictx"],["size_t"],["__wasi_dircookie_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_readdir","","",null,[[["__wasi_fd_t"],["size_t"],["usize"],["__wasi_dircookie_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"fd_renumber","","",null,[[["wasictx"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_renumber","","",null,[[["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_seek","","",null,[[["wasictx"],["__wasi_whence_t"],["__wasi_filedelta_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_seek","","",null,[[["__wasi_whence_t"],["usize"],["__wasi_filedelta_t"],["uintptr_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_sync","","",null,[[["wasictx"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_sync","","",null,[[["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_tell","","",null,[[["wasictx"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_tell","","",null,[[["uintptr_t"],["usize"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"fd_write","","",null,[[["wasictx"],["size_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_fd_write","","",null,[[["uintptr_t"],["usize"],["size_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"path_create_directory","","",null,[[["wasictx"],["size_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_path_create_directory","","",null,[[["uintptr_t"],["usize"],["size_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"path_filestat_get","","",null,[[["wasictx"],["size_t"],["__wasi_lookupflags_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_path_filestat_get","","",null,[[["__wasi_lookupflags_t"],["__wasi_fd_t"],["size_t"],["usize"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"path_filestat_set_times","","",null,[[["wasictx"],["__wasi_timestamp_t"],["__wasi_lookupflags_t"],["__wasi_fstflags_t"],["__wasi_fd_t"],["size_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_path_filestat_set_times","","",null,[[["__wasi_timestamp_t"],["__wasi_lookupflags_t"],["__wasi_fstflags_t"],["__wasi_fd_t"],["size_t"],["usize"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"path_link","","",null,[[["wasictx"],["size_t"],["__wasi_lookupflags_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_path_link","","",null,[[["__wasi_lookupflags_t"],["__wasi_fd_t"],["size_t"],["usize"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"path_open","","",null,[[["wasictx"],["__wasi_lookupflags_t"],["__wasi_rights_t"],["__wasi_fd_t"],["size_t"],["__wasi_oflags_t"],["__wasi_fdflags_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_path_open","","",null,[[["__wasi_lookupflags_t"],["__wasi_rights_t"],["__wasi_fd_t"],["size_t"],["usize"],["__wasi_oflags_t"],["__wasi_fdflags_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"path_readlink","","",null,[[["wasictx"],["size_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_path_readlink","","",null,[[["uintptr_t"],["usize"],["size_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"path_remove_directory","","",null,[[["wasictx"],["size_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_path_remove_directory","","",null,[[["uintptr_t"],["usize"],["size_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"path_rename","","",null,[[["wasictx"],["size_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_path_rename","","",null,[[["uintptr_t"],["usize"],["size_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"path_symlink","","",null,[[["wasictx"],["size_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_path_symlink","","",null,[[["uintptr_t"],["usize"],["size_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"path_unlink_file","","",null,[[["wasictx"],["size_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_path_unlink_file","","",null,[[["uintptr_t"],["usize"],["size_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"poll_oneoff","","",null,[[["wasictx"],["size_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_poll_oneoff","","",null,[[["uintptr_t"],["usize"],["size_t"]],["__wasi_errno_t"]]],[5,"proc_exit","","",null,[[["wasictx"],["__wasi_exitcode_t"]]]],[5,"wasi_common_proc_exit","","",null,[[["usize"],["__wasi_exitcode_t"]]]],[5,"proc_raise","","",null,[[["wasictx"],["__wasi_signal_t"]],["__wasi_errno_t"]]],[5,"wasi_common_proc_raise","","",null,[[["usize"],["__wasi_signal_t"]],["__wasi_errno_t"]]],[5,"sched_yield","","",null,[[["wasictx"]],["__wasi_errno_t"]]],[5,"wasi_common_sched_yield","","",null,[[["usize"]],["__wasi_errno_t"]]],[5,"random_get","","",null,[[["wasictx"],["size_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_random_get","","",null,[[["uintptr_t"],["usize"],["size_t"]],["__wasi_errno_t"]]],[5,"sock_recv","","",null,[[["wasictx"],["size_t"],["__wasi_riflags_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_sock_recv","","",null,[[["__wasi_fd_t"],["size_t"],["__wasi_riflags_t"],["usize"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"sock_send","","",null,[[["wasictx"],["size_t"],["__wasi_siflags_t"],["__wasi_fd_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"wasi_common_sock_send","","",null,[[["__wasi_fd_t"],["size_t"],["usize"],["__wasi_siflags_t"],["uintptr_t"]],["__wasi_errno_t"]]],[5,"sock_shutdown","","",null,[[["wasictx"],["__wasi_sdflags_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[5,"wasi_common_sock_shutdown","","",null,[[["usize"],["__wasi_sdflags_t"],["__wasi_fd_t"]],["__wasi_errno_t"]]],[11,"from","wasi_common","",2,[[["t"]],["t"]]],[11,"into","","",2,[[],["u"]]],[11,"try_from","","",2,[[["u"]],["result"]]],[11,"try_into","","",2,[[],["result"]]],[11,"borrow","","",2,[[["self"]],["t"]]],[11,"borrow_mut","","",2,[[["self"]],["t"]]],[11,"type_id","","",2,[[["self"]],["typeid"]]],[11,"from","","",1,[[["t"]],["t"]]],[11,"into","","",1,[[],["u"]]],[11,"try_from","","",1,[[["u"]],["result"]]],[11,"try_into","","",1,[[],["result"]]],[11,"borrow","","",1,[[["self"]],["t"]]],[11,"borrow_mut","","",1,[[["self"]],["t"]]],[11,"type_id","","",1,[[["self"]],["typeid"]]],[11,"from","","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"to_string","","",0,[[["self"]],["string"]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]],[11,"from","wasi_common::fs","",3,[[["t"]],["t"]]],[11,"into","","",3,[[],["u"]]],[11,"try_from","","",3,[[["u"]],["result"]]],[11,"try_into","","",3,[[],["result"]]],[11,"borrow","","",3,[[["self"]],["t"]]],[11,"borrow_mut","","",3,[[["self"]],["t"]]],[11,"type_id","","",3,[[["self"]],["typeid"]]],[11,"from","","",4,[[["t"]],["t"]]],[11,"into","","",4,[[],["u"]]],[11,"try_from","","",4,[[["u"]],["result"]]],[11,"try_into","","",4,[[],["result"]]],[11,"borrow","","",4,[[["self"]],["t"]]],[11,"borrow_mut","","",4,[[["self"]],["t"]]],[11,"type_id","","",4,[[["self"]],["typeid"]]],[11,"from","","",5,[[["t"]],["t"]]],[11,"into","","",5,[[],["u"]]],[11,"try_from","","",5,[[["u"]],["result"]]],[11,"try_into","","",5,[[],["result"]]],[11,"borrow","","",5,[[["self"]],["t"]]],[11,"borrow_mut","","",5,[[["self"]],["t"]]],[11,"type_id","","",5,[[["self"]],["typeid"]]],[11,"from","","",6,[[["t"]],["t"]]],[11,"into","","",6,[[],["u"]]],[11,"try_from","","",6,[[["u"]],["result"]]],[11,"try_into","","",6,[[],["result"]]],[11,"borrow","","",6,[[["self"]],["t"]]],[11,"borrow_mut","","",6,[[["self"]],["t"]]],[11,"type_id","","",6,[[["self"]],["typeid"]]],[11,"from","","",7,[[["t"]],["t"]]],[11,"into","","",7,[[],["u"]]],[11,"to_owned","","",7,[[["self"]],["t"]]],[11,"clone_into","","",7,[[["self"],["t"]]]],[11,"try_from","","",7,[[["u"]],["result"]]],[11,"try_into","","",7,[[],["result"]]],[11,"borrow","","",7,[[["self"]],["t"]]],[11,"borrow_mut","","",7,[[["self"]],["t"]]],[11,"type_id","","",7,[[["self"]],["typeid"]]],[11,"from","","",8,[[["t"]],["t"]]],[11,"into","","",8,[[],["u"]]],[11,"to_owned","","",8,[[["self"]],["t"]]],[11,"clone_into","","",8,[[["self"],["t"]]]],[11,"try_from","","",8,[[["u"]],["result"]]],[11,"try_into","","",8,[[],["result"]]],[11,"borrow","","",8,[[["self"]],["t"]]],[11,"borrow_mut","","",8,[[["self"]],["t"]]],[11,"type_id","","",8,[[["self"]],["typeid"]]],[11,"from","","",9,[[["t"]],["t"]]],[11,"into","","",9,[[],["u"]]],[11,"try_from","","",9,[[["u"]],["result"]]],[11,"try_into","","",9,[[],["result"]]],[11,"borrow","","",9,[[["self"]],["t"]]],[11,"borrow_mut","","",9,[[["self"]],["t"]]],[11,"type_id","","",9,[[["self"]],["typeid"]]],[11,"from","","",10,[[["t"]],["t"]]],[11,"into","","",10,[[],["u"]]],[11,"to_owned","","",10,[[["self"]],["t"]]],[11,"clone_into","","",10,[[["self"],["t"]]]],[11,"try_from","","",10,[[["u"]],["result"]]],[11,"try_into","","",10,[[],["result"]]],[11,"borrow","","",10,[[["self"]],["t"]]],[11,"borrow_mut","","",10,[[["self"]],["t"]]],[11,"type_id","","",10,[[["self"]],["typeid"]]],[11,"from","","",11,[[["t"]],["t"]]],[11,"into","","",11,[[],["u"]]],[11,"into_iter","","",11,[[],["i"]]],[11,"try_from","","",11,[[["u"]],["result"]]],[11,"try_into","","",11,[[],["result"]]],[11,"borrow","","",11,[[["self"]],["t"]]],[11,"borrow_mut","","",11,[[["self"]],["t"]]],[11,"type_id","","",11,[[["self"]],["typeid"]]],[11,"from","wasi_common::old::snapshot_0","",13,[[["t"]],["t"]]],[11,"into","","",13,[[],["u"]]],[11,"try_from","","",13,[[["u"]],["result"]]],[11,"try_into","","",13,[[],["result"]]],[11,"borrow","","",13,[[["self"]],["t"]]],[11,"borrow_mut","","",13,[[["self"]],["t"]]],[11,"type_id","","",13,[[["self"]],["typeid"]]],[11,"from","","",12,[[["t"]],["t"]]],[11,"into","","",12,[[],["u"]]],[11,"try_from","","",12,[[["u"]],["result"]]],[11,"try_into","","",12,[[],["result"]]],[11,"borrow","","",12,[[["self"]],["t"]]],[11,"borrow_mut","","",12,[[["self"]],["t"]]],[11,"type_id","","",12,[[["self"]],["typeid"]]],[11,"from","wasi_common::old::snapshot_0::wasi","",14,[[["t"]],["t"]]],[11,"into","","",14,[[],["u"]]],[11,"to_owned","","",14,[[["self"]],["t"]]],[11,"clone_into","","",14,[[["self"],["t"]]]],[11,"try_from","","",14,[[["u"]],["result"]]],[11,"try_into","","",14,[[],["result"]]],[11,"borrow","","",14,[[["self"]],["t"]]],[11,"borrow_mut","","",14,[[["self"]],["t"]]],[11,"type_id","","",14,[[["self"]],["typeid"]]],[11,"from","","",15,[[["t"]],["t"]]],[11,"into","","",15,[[],["u"]]],[11,"to_owned","","",15,[[["self"]],["t"]]],[11,"clone_into","","",15,[[["self"],["t"]]]],[11,"try_from","","",15,[[["u"]],["result"]]],[11,"try_into","","",15,[[],["result"]]],[11,"borrow","","",15,[[["self"]],["t"]]],[11,"borrow_mut","","",15,[[["self"]],["t"]]],[11,"type_id","","",15,[[["self"]],["typeid"]]],[11,"from","","",16,[[["t"]],["t"]]],[11,"into","","",16,[[],["u"]]],[11,"to_owned","","",16,[[["self"]],["t"]]],[11,"clone_into","","",16,[[["self"],["t"]]]],[11,"try_from","","",16,[[["u"]],["result"]]],[11,"try_into","","",16,[[],["result"]]],[11,"borrow","","",16,[[["self"]],["t"]]],[11,"borrow_mut","","",16,[[["self"]],["t"]]],[11,"type_id","","",16,[[["self"]],["typeid"]]],[11,"from","","",17,[[["t"]],["t"]]],[11,"into","","",17,[[],["u"]]],[11,"to_owned","","",17,[[["self"]],["t"]]],[11,"clone_into","","",17,[[["self"],["t"]]]],[11,"try_from","","",17,[[["u"]],["result"]]],[11,"try_into","","",17,[[],["result"]]],[11,"borrow","","",17,[[["self"]],["t"]]],[11,"borrow_mut","","",17,[[["self"]],["t"]]],[11,"type_id","","",17,[[["self"]],["typeid"]]],[11,"from","","",18,[[["t"]],["t"]]],[11,"into","","",18,[[],["u"]]],[11,"to_owned","","",18,[[["self"]],["t"]]],[11,"clone_into","","",18,[[["self"],["t"]]]],[11,"try_from","","",18,[[["u"]],["result"]]],[11,"try_into","","",18,[[],["result"]]],[11,"borrow","","",18,[[["self"]],["t"]]],[11,"borrow_mut","","",18,[[["self"]],["t"]]],[11,"type_id","","",18,[[["self"]],["typeid"]]],[11,"from","","",19,[[["t"]],["t"]]],[11,"into","","",19,[[],["u"]]],[11,"to_owned","","",19,[[["self"]],["t"]]],[11,"clone_into","","",19,[[["self"],["t"]]]],[11,"try_from","","",19,[[["u"]],["result"]]],[11,"try_into","","",19,[[],["result"]]],[11,"borrow","","",19,[[["self"]],["t"]]],[11,"borrow_mut","","",19,[[["self"]],["t"]]],[11,"type_id","","",19,[[["self"]],["typeid"]]],[11,"from","","",20,[[["t"]],["t"]]],[11,"into","","",20,[[],["u"]]],[11,"to_owned","","",20,[[["self"]],["t"]]],[11,"clone_into","","",20,[[["self"],["t"]]]],[11,"try_from","","",20,[[["u"]],["result"]]],[11,"try_into","","",20,[[],["result"]]],[11,"borrow","","",20,[[["self"]],["t"]]],[11,"borrow_mut","","",20,[[["self"]],["t"]]],[11,"type_id","","",20,[[["self"]],["typeid"]]],[11,"from","","",21,[[["t"]],["t"]]],[11,"into","","",21,[[],["u"]]],[11,"to_owned","","",21,[[["self"]],["t"]]],[11,"clone_into","","",21,[[["self"],["t"]]]],[11,"try_from","","",21,[[["u"]],["result"]]],[11,"try_into","","",21,[[],["result"]]],[11,"borrow","","",21,[[["self"]],["t"]]],[11,"borrow_mut","","",21,[[["self"]],["t"]]],[11,"type_id","","",21,[[["self"]],["typeid"]]],[11,"from","","",22,[[["t"]],["t"]]],[11,"into","","",22,[[],["u"]]],[11,"to_owned","","",22,[[["self"]],["t"]]],[11,"clone_into","","",22,[[["self"],["t"]]]],[11,"try_from","","",22,[[["u"]],["result"]]],[11,"try_into","","",22,[[],["result"]]],[11,"borrow","","",22,[[["self"]],["t"]]],[11,"borrow_mut","","",22,[[["self"]],["t"]]],[11,"type_id","","",22,[[["self"]],["typeid"]]],[11,"from","","",23,[[["t"]],["t"]]],[11,"into","","",23,[[],["u"]]],[11,"to_owned","","",23,[[["self"]],["t"]]],[11,"clone_into","","",23,[[["self"],["t"]]]],[11,"try_from","","",23,[[["u"]],["result"]]],[11,"try_into","","",23,[[],["result"]]],[11,"borrow","","",23,[[["self"]],["t"]]],[11,"borrow_mut","","",23,[[["self"]],["t"]]],[11,"type_id","","",23,[[["self"]],["typeid"]]],[11,"from","wasi_common::old::snapshot_0::wasi32","",24,[[["t"]],["t"]]],[11,"into","","",24,[[],["u"]]],[11,"to_owned","","",24,[[["self"]],["t"]]],[11,"clone_into","","",24,[[["self"],["t"]]]],[11,"try_from","","",24,[[["u"]],["result"]]],[11,"try_into","","",24,[[],["result"]]],[11,"borrow","","",24,[[["self"]],["t"]]],[11,"borrow_mut","","",24,[[["self"]],["t"]]],[11,"type_id","","",24,[[["self"]],["typeid"]]],[11,"from","","",25,[[["t"]],["t"]]],[11,"into","","",25,[[],["u"]]],[11,"to_owned","","",25,[[["self"]],["t"]]],[11,"clone_into","","",25,[[["self"],["t"]]]],[11,"try_from","","",25,[[["u"]],["result"]]],[11,"try_into","","",25,[[],["result"]]],[11,"borrow","","",25,[[["self"]],["t"]]],[11,"borrow_mut","","",25,[[["self"]],["t"]]],[11,"type_id","","",25,[[["self"]],["typeid"]]],[11,"from","","",26,[[["t"]],["t"]]],[11,"into","","",26,[[],["u"]]],[11,"to_owned","","",26,[[["self"]],["t"]]],[11,"clone_into","","",26,[[["self"],["t"]]]],[11,"try_from","","",26,[[["u"]],["result"]]],[11,"try_into","","",26,[[],["result"]]],[11,"borrow","","",26,[[["self"]],["t"]]],[11,"borrow_mut","","",26,[[["self"]],["t"]]],[11,"type_id","","",26,[[["self"]],["typeid"]]],[11,"from","","",27,[[["t"]],["t"]]],[11,"into","","",27,[[],["u"]]],[11,"to_owned","","",27,[[["self"]],["t"]]],[11,"clone_into","","",27,[[["self"],["t"]]]],[11,"try_from","","",27,[[["u"]],["result"]]],[11,"try_into","","",27,[[],["result"]]],[11,"borrow","","",27,[[["self"]],["t"]]],[11,"borrow_mut","","",27,[[["self"]],["t"]]],[11,"type_id","","",27,[[["self"]],["typeid"]]],[11,"from","","",28,[[["t"]],["t"]]],[11,"into","","",28,[[],["u"]]],[11,"to_owned","","",28,[[["self"]],["t"]]],[11,"clone_into","","",28,[[["self"],["t"]]]],[11,"try_from","","",28,[[["u"]],["result"]]],[11,"try_into","","",28,[[],["result"]]],[11,"borrow","","",28,[[["self"]],["t"]]],[11,"borrow_mut","","",28,[[["self"]],["t"]]],[11,"type_id","","",28,[[["self"]],["typeid"]]],[11,"from","wasi_common::wasi","",29,[[["t"]],["t"]]],[11,"into","","",29,[[],["u"]]],[11,"to_owned","","",29,[[["self"]],["t"]]],[11,"clone_into","","",29,[[["self"],["t"]]]],[11,"try_from","","",29,[[["u"]],["result"]]],[11,"try_into","","",29,[[],["result"]]],[11,"borrow","","",29,[[["self"]],["t"]]],[11,"borrow_mut","","",29,[[["self"]],["t"]]],[11,"type_id","","",29,[[["self"]],["typeid"]]],[11,"from","","",30,[[["t"]],["t"]]],[11,"into","","",30,[[],["u"]]],[11,"to_owned","","",30,[[["self"]],["t"]]],[11,"clone_into","","",30,[[["self"],["t"]]]],[11,"try_from","","",30,[[["u"]],["result"]]],[11,"try_into","","",30,[[],["result"]]],[11,"borrow","","",30,[[["self"]],["t"]]],[11,"borrow_mut","","",30,[[["self"]],["t"]]],[11,"type_id","","",30,[[["self"]],["typeid"]]],[11,"from","","",31,[[["t"]],["t"]]],[11,"into","","",31,[[],["u"]]],[11,"to_owned","","",31,[[["self"]],["t"]]],[11,"clone_into","","",31,[[["self"],["t"]]]],[11,"try_from","","",31,[[["u"]],["result"]]],[11,"try_into","","",31,[[],["result"]]],[11,"borrow","","",31,[[["self"]],["t"]]],[11,"borrow_mut","","",31,[[["self"]],["t"]]],[11,"type_id","","",31,[[["self"]],["typeid"]]],[11,"from","","",32,[[["t"]],["t"]]],[11,"into","","",32,[[],["u"]]],[11,"to_owned","","",32,[[["self"]],["t"]]],[11,"clone_into","","",32,[[["self"],["t"]]]],[11,"try_from","","",32,[[["u"]],["result"]]],[11,"try_into","","",32,[[],["result"]]],[11,"borrow","","",32,[[["self"]],["t"]]],[11,"borrow_mut","","",32,[[["self"]],["t"]]],[11,"type_id","","",32,[[["self"]],["typeid"]]],[11,"from","","",33,[[["t"]],["t"]]],[11,"into","","",33,[[],["u"]]],[11,"to_owned","","",33,[[["self"]],["t"]]],[11,"clone_into","","",33,[[["self"],["t"]]]],[11,"try_from","","",33,[[["u"]],["result"]]],[11,"try_into","","",33,[[],["result"]]],[11,"borrow","","",33,[[["self"]],["t"]]],[11,"borrow_mut","","",33,[[["self"]],["t"]]],[11,"type_id","","",33,[[["self"]],["typeid"]]],[11,"from","","",34,[[["t"]],["t"]]],[11,"into","","",34,[[],["u"]]],[11,"to_owned","","",34,[[["self"]],["t"]]],[11,"clone_into","","",34,[[["self"],["t"]]]],[11,"try_from","","",34,[[["u"]],["result"]]],[11,"try_into","","",34,[[],["result"]]],[11,"borrow","","",34,[[["self"]],["t"]]],[11,"borrow_mut","","",34,[[["self"]],["t"]]],[11,"type_id","","",34,[[["self"]],["typeid"]]],[11,"from","","",35,[[["t"]],["t"]]],[11,"into","","",35,[[],["u"]]],[11,"to_owned","","",35,[[["self"]],["t"]]],[11,"clone_into","","",35,[[["self"],["t"]]]],[11,"try_from","","",35,[[["u"]],["result"]]],[11,"try_into","","",35,[[],["result"]]],[11,"borrow","","",35,[[["self"]],["t"]]],[11,"borrow_mut","","",35,[[["self"]],["t"]]],[11,"type_id","","",35,[[["self"]],["typeid"]]],[11,"from","","",36,[[["t"]],["t"]]],[11,"into","","",36,[[],["u"]]],[11,"to_owned","","",36,[[["self"]],["t"]]],[11,"clone_into","","",36,[[["self"],["t"]]]],[11,"try_from","","",36,[[["u"]],["result"]]],[11,"try_into","","",36,[[],["result"]]],[11,"borrow","","",36,[[["self"]],["t"]]],[11,"borrow_mut","","",36,[[["self"]],["t"]]],[11,"type_id","","",36,[[["self"]],["typeid"]]],[11,"from","","",37,[[["t"]],["t"]]],[11,"into","","",37,[[],["u"]]],[11,"to_owned","","",37,[[["self"]],["t"]]],[11,"clone_into","","",37,[[["self"],["t"]]]],[11,"try_from","","",37,[[["u"]],["result"]]],[11,"try_into","","",37,[[],["result"]]],[11,"borrow","","",37,[[["self"]],["t"]]],[11,"borrow_mut","","",37,[[["self"]],["t"]]],[11,"type_id","","",37,[[["self"]],["typeid"]]],[11,"from","","",38,[[["t"]],["t"]]],[11,"into","","",38,[[],["u"]]],[11,"to_owned","","",38,[[["self"]],["t"]]],[11,"clone_into","","",38,[[["self"],["t"]]]],[11,"try_from","","",38,[[["u"]],["result"]]],[11,"try_into","","",38,[[],["result"]]],[11,"borrow","","",38,[[["self"]],["t"]]],[11,"borrow_mut","","",38,[[["self"]],["t"]]],[11,"type_id","","",38,[[["self"]],["typeid"]]],[11,"from","wasi_common::wasi32","",39,[[["t"]],["t"]]],[11,"into","","",39,[[],["u"]]],[11,"to_owned","","",39,[[["self"]],["t"]]],[11,"clone_into","","",39,[[["self"],["t"]]]],[11,"try_from","","",39,[[["u"]],["result"]]],[11,"try_into","","",39,[[],["result"]]],[11,"borrow","","",39,[[["self"]],["t"]]],[11,"borrow_mut","","",39,[[["self"]],["t"]]],[11,"type_id","","",39,[[["self"]],["typeid"]]],[11,"from","","",40,[[["t"]],["t"]]],[11,"into","","",40,[[],["u"]]],[11,"to_owned","","",40,[[["self"]],["t"]]],[11,"clone_into","","",40,[[["self"],["t"]]]],[11,"try_from","","",40,[[["u"]],["result"]]],[11,"try_into","","",40,[[],["result"]]],[11,"borrow","","",40,[[["self"]],["t"]]],[11,"borrow_mut","","",40,[[["self"]],["t"]]],[11,"type_id","","",40,[[["self"]],["typeid"]]],[11,"from","","",41,[[["t"]],["t"]]],[11,"into","","",41,[[],["u"]]],[11,"to_owned","","",41,[[["self"]],["t"]]],[11,"clone_into","","",41,[[["self"],["t"]]]],[11,"try_from","","",41,[[["u"]],["result"]]],[11,"try_into","","",41,[[],["result"]]],[11,"borrow","","",41,[[["self"]],["t"]]],[11,"borrow_mut","","",41,[[["self"]],["t"]]],[11,"type_id","","",41,[[["self"]],["typeid"]]],[11,"from","","",42,[[["t"]],["t"]]],[11,"into","","",42,[[],["u"]]],[11,"to_owned","","",42,[[["self"]],["t"]]],[11,"clone_into","","",42,[[["self"],["t"]]]],[11,"try_from","","",42,[[["u"]],["result"]]],[11,"try_into","","",42,[[],["result"]]],[11,"borrow","","",42,[[["self"]],["t"]]],[11,"borrow_mut","","",42,[[["self"]],["t"]]],[11,"type_id","","",42,[[["self"]],["typeid"]]],[11,"from","","",43,[[["t"]],["t"]]],[11,"into","","",43,[[],["u"]]],[11,"to_owned","","",43,[[["self"]],["t"]]],[11,"clone_into","","",43,[[["self"],["t"]]]],[11,"try_from","","",43,[[["u"]],["result"]]],[11,"try_into","","",43,[[],["result"]]],[11,"borrow","","",43,[[["self"]],["t"]]],[11,"borrow_mut","","",43,[[["self"]],["t"]]],[11,"type_id","","",43,[[["self"]],["typeid"]]],[11,"drop","wasi_common::fs","",3,[[["self"]]]],[11,"drop","","",6,[[["self"]]]],[11,"from","wasi_common","",0,[[["error"]],["self"]]],[11,"from","","",0,[[["yanixerror"]],["self"]]],[11,"from","","",0,[[["tryfrominterror"]],["self"]]],[11,"from","","",0,[[["infallible"]],["self"]]],[11,"from","","",0,[[["utf8error"]],["self"]]],[11,"from","","",0,[[["nulerror"]],["self"]]],[11,"from","","",0,[[["nulerror"]],["self"]]],[11,"from","","",44,[[["errno"]],["self"]]],[11,"from","","",0,[[["errno"]],["self"]]],[11,"next","wasi_common::fs","TODO: Not yet implemented.",11,[[["self"]],["option"]]],[11,"clone","","",7,[[["self"]],["filetype"]]],[11,"clone","","",8,[[["self"]],["metadata"]]],[11,"clone","","",10,[[["self"]],["permissions"]]],[11,"clone","wasi_common::old::snapshot_0::wasi","",14,[[["self"]],["__wasi_dirent_t"]]],[11,"clone","","",15,[[["self"]],["__wasi_fdstat_t"]]],[11,"clone","","",16,[[["self"]],["__wasi_filestat_t"]]],[11,"clone","","",17,[[["self"]],["__wasi_event_fd_readwrite_t"]]],[11,"clone","","",22,[[["self"]],["__wasi_event_u_t"]]],[11,"clone","","",18,[[["self"]],["__wasi_event_t"]]],[11,"clone","","",19,[[["self"]],["__wasi_subscription_clock_t"]]],[11,"clone","","",20,[[["self"]],["__wasi_subscription_fd_readwrite_t"]]],[11,"clone","","",23,[[["self"]],["__wasi_subscription_u_t"]]],[11,"clone","","",21,[[["self"]],["__wasi_subscription_t"]]],[11,"clone","wasi_common::old::snapshot_0::wasi32","",24,[[["self"]],["__wasi_iovec_t"]]],[11,"clone","","",25,[[["self"]],["__wasi_ciovec_t"]]],[11,"clone","","",26,[[["self"]],["__wasi_prestat_dir_t"]]],[11,"clone","","",28,[[["self"]],["__wasi_prestat_u_t"]]],[11,"clone","","",27,[[["self"]],["__wasi_prestat_t"]]],[11,"clone","wasi_common::wasi","",29,[[["self"]],["__wasi_dirent_t"]]],[11,"clone","","",30,[[["self"]],["__wasi_fdstat_t"]]],[11,"clone","","",31,[[["self"]],["__wasi_filestat_t"]]],[11,"clone","","",32,[[["self"]],["__wasi_event_fd_readwrite_t"]]],[11,"clone","","",37,[[["self"]],["__wasi_event_u_t"]]],[11,"clone","","",33,[[["self"]],["__wasi_event_t"]]],[11,"clone","","",34,[[["self"]],["__wasi_subscription_clock_t"]]],[11,"clone","","",35,[[["self"]],["__wasi_subscription_fd_readwrite_t"]]],[11,"clone","","",38,[[["self"]],["__wasi_subscription_u_t"]]],[11,"clone","","",36,[[["self"]],["__wasi_subscription_t"]]],[11,"clone","wasi_common::wasi32","",39,[[["self"]],["__wasi_iovec_t"]]],[11,"clone","","",40,[[["self"]],["__wasi_ciovec_t"]]],[11,"clone","","",41,[[["self"]],["__wasi_prestat_dir_t"]]],[11,"clone","","",43,[[["self"]],["__wasi_prestat_u_t"]]],[11,"clone","","",42,[[["self"]],["__wasi_prestat_t"]]],[11,"eq","wasi_common::fs","",7,[[["filetype"],["self"]],["bool"]]],[11,"eq","","",10,[[["self"],["permissions"]],["bool"]]],[11,"eq","wasi_common::old::snapshot_0::wasi","",14,[[["self"],["__wasi_dirent_t"]],["bool"]]],[11,"ne","","",14,[[["self"],["__wasi_dirent_t"]],["bool"]]],[11,"eq","","",15,[[["self"],["__wasi_fdstat_t"]],["bool"]]],[11,"ne","","",15,[[["self"],["__wasi_fdstat_t"]],["bool"]]],[11,"eq","","",16,[[["self"],["__wasi_filestat_t"]],["bool"]]],[11,"ne","","",16,[[["self"],["__wasi_filestat_t"]],["bool"]]],[11,"eq","","",17,[[["__wasi_event_fd_readwrite_t"],["self"]],["bool"]]],[11,"ne","","",17,[[["__wasi_event_fd_readwrite_t"],["self"]],["bool"]]],[11,"eq","","",19,[[["__wasi_subscription_clock_t"],["self"]],["bool"]]],[11,"ne","","",19,[[["__wasi_subscription_clock_t"],["self"]],["bool"]]],[11,"eq","","",20,[[["__wasi_subscription_fd_readwrite_t"],["self"]],["bool"]]],[11,"ne","","",20,[[["__wasi_subscription_fd_readwrite_t"],["self"]],["bool"]]],[11,"eq","wasi_common::old::snapshot_0::wasi32","",24,[[["self"],["__wasi_iovec_t"]],["bool"]]],[11,"ne","","",24,[[["self"],["__wasi_iovec_t"]],["bool"]]],[11,"eq","","",25,[[["self"],["__wasi_ciovec_t"]],["bool"]]],[11,"ne","","",25,[[["self"],["__wasi_ciovec_t"]],["bool"]]],[11,"eq","","",26,[[["__wasi_prestat_dir_t"],["self"]],["bool"]]],[11,"ne","","",26,[[["__wasi_prestat_dir_t"],["self"]],["bool"]]],[11,"eq","wasi_common::wasi","",29,[[["self"],["__wasi_dirent_t"]],["bool"]]],[11,"ne","","",29,[[["self"],["__wasi_dirent_t"]],["bool"]]],[11,"eq","","",30,[[["__wasi_fdstat_t"],["self"]],["bool"]]],[11,"ne","","",30,[[["__wasi_fdstat_t"],["self"]],["bool"]]],[11,"eq","","",31,[[["__wasi_filestat_t"],["self"]],["bool"]]],[11,"ne","","",31,[[["__wasi_filestat_t"],["self"]],["bool"]]],[11,"eq","","",32,[[["self"],["__wasi_event_fd_readwrite_t"]],["bool"]]],[11,"ne","","",32,[[["self"],["__wasi_event_fd_readwrite_t"]],["bool"]]],[11,"eq","","",34,[[["__wasi_subscription_clock_t"],["self"]],["bool"]]],[11,"ne","","",34,[[["__wasi_subscription_clock_t"],["self"]],["bool"]]],[11,"eq","","",35,[[["self"],["__wasi_subscription_fd_readwrite_t"]],["bool"]]],[11,"ne","","",35,[[["self"],["__wasi_subscription_fd_readwrite_t"]],["bool"]]],[11,"eq","wasi_common::wasi32","",39,[[["self"],["__wasi_iovec_t"]],["bool"]]],[11,"ne","","",39,[[["self"],["__wasi_iovec_t"]],["bool"]]],[11,"eq","","",40,[[["self"],["__wasi_ciovec_t"]],["bool"]]],[11,"ne","","",40,[[["self"],["__wasi_ciovec_t"]],["bool"]]],[11,"eq","","",41,[[["self"],["__wasi_prestat_dir_t"]],["bool"]]],[11,"ne","","",41,[[["self"],["__wasi_prestat_dir_t"]],["bool"]]],[11,"fmt","wasi_common","",2,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",0,[[["formatter"],["self"]],["result"]]],[11,"fmt","wasi_common::old::snapshot_0","",13,[[["formatter"],["self"]],["result"]]],[11,"fmt","wasi_common::old::snapshot_0::wasi","",14,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",15,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",16,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",17,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",19,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",20,[[["formatter"],["self"]],["result"]]],[11,"fmt","wasi_common::old::snapshot_0::wasi32","",24,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",25,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",26,[[["formatter"],["self"]],["result"]]],[11,"fmt","wasi_common::wasi","",29,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",30,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",31,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",32,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",34,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",35,[[["formatter"],["self"]],["result"]]],[11,"fmt","wasi_common::wasi32","",39,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",40,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",41,[[["formatter"],["self"]],["result"]]],[11,"fmt","wasi_common","",0,[[["self"],["formatter"]],["result"]]],[11,"hash","wasi_common::fs","",7,[[["self"],["__h"]]]],[11,"hash","wasi_common::old::snapshot_0::wasi","",14,[[["self"],["__h"]]]],[11,"hash","","",15,[[["self"],["__h"]]]],[11,"hash","","",16,[[["self"],["__h"]]]],[11,"hash","","",17,[[["self"],["__h"]]]],[11,"hash","","",19,[[["self"],["__h"]]]],[11,"hash","","",20,[[["self"],["__h"]]]],[11,"hash","wasi_common::old::snapshot_0::wasi32","",24,[[["self"],["__h"]]]],[11,"hash","","",25,[[["self"],["__h"]]]],[11,"hash","","",26,[[["self"],["__h"]]]],[11,"hash","wasi_common::wasi","",29,[[["self"],["__h"]]]],[11,"hash","","",30,[[["self"],["__h"]]]],[11,"hash","","",31,[[["self"],["__h"]]]],[11,"hash","","",32,[[["self"],["__h"]]]],[11,"hash","","",34,[[["self"],["__h"]]]],[11,"hash","","",35,[[["self"],["__h"]]]],[11,"hash","wasi_common::wasi32","",39,[[["self"],["__h"]]]],[11,"hash","","",40,[[["self"],["__h"]]]],[11,"hash","","",41,[[["self"],["__h"]]]],[11,"source","wasi_common","",0,[[["self"]],[["error"],["option",["error"]]]]],[11,"read","wasi_common::fs","TODO: Not yet implemented. See the comment in…",6,[[["self"]],[["result",["usize"]],["usize"]]]]],"p":[[4,"Error"],[3,"WasiCtxBuilder"],[3,"WasiCtx"],[3,"Dir"],[3,"DirBuilder"],[3,"DirEntry"],[3,"File"],[3,"FileType"],[3,"Metadata"],[3,"OpenOptions"],[3,"Permissions"],[3,"ReadDir"],[3,"WasiCtxBuilder"],[3,"WasiCtx"],[3,"__wasi_dirent_t"],[3,"__wasi_fdstat_t"],[3,"__wasi_filestat_t"],[3,"__wasi_event_fd_readwrite_t"],[3,"__wasi_event_t"],[3,"__wasi_subscription_clock_t"],[3,"__wasi_subscription_fd_readwrite_t"],[3,"__wasi_subscription_t"],[19,"__wasi_event_u_t"],[19,"__wasi_subscription_u_t"],[3,"__wasi_iovec_t"],[3,"__wasi_ciovec_t"],[3,"__wasi_prestat_dir_t"],[3,"__wasi_prestat_t"],[19,"__wasi_prestat_u_t"],[3,"__wasi_dirent_t"],[3,"__wasi_fdstat_t"],[3,"__wasi_filestat_t"],[3,"__wasi_event_fd_readwrite_t"],[3,"__wasi_event_t"],[3,"__wasi_subscription_clock_t"],[3,"__wasi_subscription_fd_readwrite_t"],[3,"__wasi_subscription_t"],[19,"__wasi_event_u_t"],[19,"__wasi_subscription_u_t"],[3,"__wasi_iovec_t"],[3,"__wasi_ciovec_t"],[3,"__wasi_prestat_dir_t"],[3,"__wasi_prestat_t"],[19,"__wasi_prestat_u_t"],[6,"Error"]]}; +searchIndex["wasmtime"] = {"doc":"Wasmtime's embedding API","i":[[3,"Global","wasmtime","A WebAssembly `global` value which can be read and written…",null,null],[3,"Table","","A WebAssembly `table`, or an array of values.",null,null],[3,"Memory","","A WebAssembly linear memory.",null,null],[3,"FrameInfo","","Description of a frame in a backtrace for a [`Trap`].",null,null],[3,"Func","","A WebAssembly function which can be called.",null,null],[3,"Instance","","An instantiated WebAssembly module.",null,null],[3,"Module","","A compiled WebAssembly module, ready to be instantiated.",null,null],[3,"HostRef","","Represents a piece of data located in the host environment.",null,null],[3,"Config","","Global configuration options used to create an [`Engine`]…",null,null],[3,"Engine","","An `Engine` which is a global context for compilation and…",null,null],[3,"Store","","A `Store` is a shared cache of information between…",null,null],[3,"Trap","","A struct representing an aborted instruction execution,…",null,null],[3,"Limits","","Limits of tables/memories where the units of the limits…",null,null],[3,"FuncType","","A descriptor for a function in a WebAssembly module.",null,null],[3,"GlobalType","","A WebAssembly global descriptor.",null,null],[3,"TableType","","A descriptor for a table in a WebAssembly module.",null,null],[3,"MemoryType","","A descriptor for a WebAssembly memory type.",null,null],[3,"ImportType","","A descriptor for an imported value into a wasm module.",null,null],[3,"ExportType","","A descriptor for an exported WebAssembly value.",null,null],[4,"Extern","","An external item to a WebAssembly module, or a list of…",null,null],[13,"Func","","A WebAssembly `func` which can be called.",0,null],[13,"Global","","A WebAssembly `global` which acts like a `Cell` of…",0,null],[13,"Table","","A WebAssembly `table` which is an array of `Val` types.",0,null],[13,"Memory","","A WebAssembly linear memory.",0,null],[4,"AnyRef","","Represents an opaque reference to any data within…",null,null],[13,"Null","","A reference to no data.",1,null],[13,"Ref","","A reference to data stored internally in `wasmtime`.",1,null],[13,"Other","","A reference to data located outside of `wasmtime`.",1,null],[4,"OptLevel","","Possible optimization levels for the Cranelift codegen…",null,null],[13,"None","","No optimizations performed, minimizes compilation time by…",2,null],[13,"Speed","","Generates the fastest possible code, but may take longer.",2,null],[13,"SpeedAndSize","","Similar to `speed`, but also performs transformations…",2,null],[4,"Strategy","","Possible Compilation strategies for a wasm module.",null,null],[13,"Auto","","An indicator that the compilation strategy should be…",3,null],[13,"Cranelift","","Currently the default backend, Cranelift aims to be a…",3,null],[13,"Lightbeam","","A single-pass code generator that is faster than Cranelift…",3,null],[4,"Mutability","","Indicator of whether a global is mutable or not",null,null],[13,"Const","","The global is constant and its value does not change",4,null],[13,"Var","","The value of the global can change over time",4,null],[4,"ValType","","A list of all possible value types in WebAssembly.",null,null],[13,"I32","","Signed 32 bit integer.",5,null],[13,"I64","","Signed 64 bit integer.",5,null],[13,"F32","","Floating point 32 bit integer.",5,null],[13,"F64","","Floating point 64 bit integer.",5,null],[13,"V128","","A 128 bit number.",5,null],[13,"AnyRef","","A reference to opaque data in the Wasm instance.",5,null],[13,"FuncRef","","A reference to a Wasm function.",5,null],[4,"ExternType","","A list of all possible types which can be externally…",null,null],[13,"Func","","This external type is the type of a WebAssembly function.",6,null],[13,"Global","","This external type is the type of a WebAssembly global.",6,null],[13,"Table","","This external type is the type of a WebAssembly table.",6,null],[13,"Memory","","This external type is the type of a WebAssembly memory.",6,null],[4,"Val","","Possible runtime values that a WebAssembly module can…",null,null],[13,"I32","","A 32-bit integer",7,null],[13,"I64","","A 64-bit integer",7,null],[13,"F32","","A 32-bit float.",7,null],[13,"F64","","A 64-bit float.",7,null],[13,"AnyRef","","An `anyref` value which can hold opaque data to the wasm…",7,null],[13,"FuncRef","","A first-class reference to a WebAssembly function.",7,null],[13,"V128","","A 128-bit number",7,null],[11,"func","","Returns the underlying `Func`, if this external is a…",0,[[["self"]],[["option",["func"]],["func"]]]],[11,"global","","Returns the underlying `Global`, if this external is a…",0,[[["self"]],[["global"],["option",["global"]]]]],[11,"table","","Returns the underlying `Table`, if this external is a table.",0,[[["self"]],[["table"],["option",["table"]]]]],[11,"memory","","Returns the underlying `Memory`, if this external is a…",0,[[["self"]],[["option",["memory"]],["memory"]]]],[11,"ty","","Returns the type associated with this `Extern`.",0,[[["self"]],["externtype"]]],[11,"new","","Creates a new WebAssembly `global` value with the provide…",8,[[["globaltype"],["store"],["val"]],[["result",["global"]],["global"]]]],[11,"ty","","Returns the underlying type of this `global`.",8,[[["self"]],["globaltype"]]],[11,"get","","Returns the current [`Val`] of this global.",8,[[["self"]],["val"]]],[11,"set","","Attempts to set the current value of this global to [`Val`].",8,[[["self"],["val"]],["result"]]],[11,"new","","Creates a new `Table` with the given parameters.",9,[[["val"],["store"],["tabletype"]],[["table"],["result",["table"]]]]],[11,"ty","","Returns the underlying type of this table, including its…",9,[[["self"]],["tabletype"]]],[11,"get","","Returns the table element value at `index`.",9,[[["u32"],["self"]],[["option",["val"]],["val"]]]],[11,"set","","Writes the `val` provided into `index` within this table.",9,[[["u32"],["self"],["val"]],["result"]]],[11,"size","","Returns the current size of this table.",9,[[["self"]],["u32"]]],[11,"grow","","Grows the size of this table by `delta` more elements,…",9,[[["u32"],["self"],["val"]],[["u32"],["result",["u32"]]]]],[11,"new","","Creates a new WebAssembly memory given the configuration…",10,[[["memorytype"],["store"]],["memory"]]],[11,"ty","","Returns the underlying type of this memory.",10,[[["self"]],["memorytype"]]],[11,"data_unchecked","","Returns this memory as a slice view that can be read…",10,[[["self"]]]],[11,"data_unchecked_mut","","Returns this memory as a slice view that can be read and…",10,[[["self"]]]],[11,"data_ptr","","Returns the base pointer, in the host's address space,…",10,[[["self"]]]],[11,"data_size","","Returns the byte length of this memory.",10,[[["self"]],["usize"]]],[11,"size","","Returns the size, in pages, of this wasm memory.",10,[[["self"]],["u32"]]],[11,"grow","","Grows this WebAssembly memory by `delta` pages.",10,[[["u32"],["self"]],[["u32"],["result",["u32"]]]]],[11,"func_index","","Returns the WebAssembly function index for this frame.",11,[[["self"]],["u32"]]],[11,"module_name","","Returns the identifer of the module that this frame is for.",11,[[["self"]],[["str"],["option",["str"]]]]],[11,"func_name","","Returns a descriptive name of the function for this frame,…",11,[[["self"]],[["str"],["option",["str"]]]]],[11,"new","","Creates a new `Func` with the given arguments, typically…",12,[[["callable"],["functype"],["store"],["rc",["callable"]]],["self"]]],[11,"wrap0","","Creates a new `Func` from the given Rust closure, which…",12,[[["store"],["f"]],["func"]]],[11,"wrap1","","Creates a new `Func` from the given Rust closure, which…",12,[[["store"],["f"]],["func"]]],[11,"wrap2","","Creates a new `Func` from the given Rust closure, which…",12,[[["store"],["f"]],["func"]]],[11,"wrap3","","Creates a new `Func` from the given Rust closure, which…",12,[[["store"],["f"]],["func"]]],[11,"wrap4","","Creates a new `Func` from the given Rust closure, which…",12,[[["store"],["f"]],["func"]]],[11,"wrap5","","Creates a new `Func` from the given Rust closure, which…",12,[[["store"],["f"]],["func"]]],[11,"wrap6","","Creates a new `Func` from the given Rust closure, which…",12,[[["store"],["f"]],["func"]]],[11,"wrap7","","Creates a new `Func` from the given Rust closure, which…",12,[[["store"],["f"]],["func"]]],[11,"wrap8","","Creates a new `Func` from the given Rust closure, which…",12,[[["store"],["f"]],["func"]]],[11,"wrap9","","Creates a new `Func` from the given Rust closure, which…",12,[[["store"],["f"]],["func"]]],[11,"wrap10","","Creates a new `Func` from the given Rust closure, which…",12,[[["store"],["f"]],["func"]]],[11,"ty","","Returns the underlying wasm type that this `Func` has.",12,[[["self"]],["functype"]]],[11,"param_arity","","Returns the number of parameters that this function takes.",12,[[["self"]],["usize"]]],[11,"result_arity","","Returns the number of results this function produces.",12,[[["self"]],["usize"]]],[11,"call","","Invokes this function with the `params` given, returning…",12,[[["self"]],[["result",["box","trap"]],["box"],["trap"]]]],[11,"get0","","Extracts a natively-callable object from this `Func`, if…",12,[[["self"]],["option"]]],[11,"get1","","Extracts a natively-callable object from this `Func`, if…",12,[[["self"]],["option"]]],[11,"get2","","Extracts a natively-callable object from this `Func`, if…",12,[[["self"]],["option"]]],[11,"new","","Creates a new [`Instance`] from the previously compiled…",13,[[["module"]],[["error"],["instance"],["result",["instance","error"]]]]],[11,"store","","Returns the associated [`Store`] that this `Instance` is…",13,[[["self"]],["store"]]],[11,"module","","Returns the associated [`Module`] that this `Instance`…",13,[[["self"]],["module"]]],[11,"exports","","Returns the list of exported items from this [`Instance`].",13,[[["self"]]]],[11,"get_export","","Looks up an exported [`Extern`] value by name.",13,[[["str"],["self"]],[["extern"],["option",["extern"]]]]],[11,"new","","Creates a new WebAssembly `Module` from the given…",14,[[["store"]],[["result",["module"]],["module"]]]],[11,"new_with_name","","Creates a new WebAssembly `Module` from the given…",14,[[["str"],["store"]],[["result",["module"]],["module"]]]],[11,"from_file","","Creates a new WebAssembly `Module` from the contents of…",14,[[["store"]],[["result",["module"]],["module"]]]],[11,"from_binary","","Creates a new WebAssembly `Module` from the given…",14,[[["store"]],[["result",["module"]],["module"]]]],[11,"from_binary_unchecked","","Creates a new WebAssembly `Module` from the given…",14,[[["store"]],[["result",["module"]],["module"]]]],[11,"validate","","Validates `binary` input data as a WebAssembly binary…",14,[[["store"]],["result"]]],[11,"name","","Returns identifier/name that this [`Module`] has. This…",14,[[["self"]],[["str"],["option",["str"]]]]],[11,"imports","","Returns the list of imports that this [`Module`] has and…",14,[[["self"]]]],[11,"exports","","Returns the list of exports that this [`Module`] has and…",14,[[["self"]]]],[11,"store","","Returns the [`Store`] that this [`Module`] was compiled…",14,[[["self"]],["store"]]],[11,"new","","Creates a new instance of `AnyRef` from `Box`.",1,[[["box",["any"]],["any"]],["self"]]],[11,"null","","Creates a `Null` reference.",1,[[],["self"]]],[11,"data","","Returns the data stored in the reference if available. #…",1,[[["self"]],[["box",["any"]],["ref",["box"]]]]],[11,"ptr_eq","","Returns true if the two `AnyRef`'s point to the same…",1,[[["self"],["anyref"]],["bool"]]],[11,"host_info","","Returns a mutable reference to the host information if…",1,[[["self"]],[["option",["refmut"]],["refmut",["box"]]]]],[11,"set_host_info","","Sets the host information for an `AnyRef`. # Panics Panics…",1,[[["option",["box"]],["self"],["box",["hostinfo"]]]]],[11,"new","","Creates a new `HostRef` from `T`.",15,[[["t"]],["hostref"]]],[11,"borrow","","Immutably borrows the wrapped data. # Panics Panics if the…",15,[[["self"]],["ref"]]],[11,"borrow_mut","","Mutably borrows the wrapped data. # Panics Panics if the…",15,[[["self"]],["refmut"]]],[11,"ptr_eq","","Returns true if the two `HostRef`'s point to the same…",15,[[["self"],["hostref"]],["bool"]]],[11,"anyref","","Returns an opaque reference to the wrapped data in the…",15,[[["self"]],["anyref"]]],[11,"new","","Creates a new configuration object with the default…",16,[[],["config"]]],[11,"debug_info","","Configures whether DWARF debug information will be emitted…",16,[[["self"],["bool"]],["self"]]],[11,"wasm_threads","","Configures whether the WebAssembly threads proposal will…",16,[[["self"],["bool"]],["self"]]],[11,"wasm_reference_types","","Configures whether the WebAssembly reference types…",16,[[["self"],["bool"]],["self"]]],[11,"wasm_simd","","Configures whether the WebAssembly SIMD proposal will be…",16,[[["self"],["bool"]],["self"]]],[11,"wasm_bulk_memory","","Configures whether the WebAssembly bulk memory operations…",16,[[["self"],["bool"]],["self"]]],[11,"wasm_multi_value","","Configures whether the WebAssembly multi-value proposal…",16,[[["self"],["bool"]],["self"]]],[11,"strategy","","Configures which compilation strategy will be used for…",16,[[["strategy"],["self"]],[["result"],["self"]]]],[11,"cranelift_debug_verifier","","Configures whether the debug verifier of Cranelift is…",16,[[["self"],["bool"]],["self"]]],[11,"cranelift_opt_level","","Configures the Cranelift code generator optimization level.",16,[[["optlevel"],["self"]],["self"]]],[11,"cache_config_load","","Loads cache configuration specified at `path`.",16,[[["self"]],[["result"],["self"]]]],[11,"cache_config_load_default","","Loads cache configuration from the system default path.",16,[[["self"]],[["result"],["self"]]]],[11,"new","","Creates a new [`Engine`] with the specified compilation…",17,[[["config"]],["engine"]]],[11,"config","","Returns the configuration settings that this engine is…",17,[[["self"]],["config"]]],[11,"new","","Creates a new store to be associated with the given…",18,[[["engine"]],["store"]]],[11,"engine","","Returns the [`Engine`] that this store is associated with.",18,[[["self"]],["engine"]]],[11,"same","","Returns whether the stores `a` and `b` refer to the same…",18,[[["store"]],["bool"]]],[11,"new","","Creates a new `Trap` with `message`. # Example `let trap =…",19,[[["string"],["into",["string"]]],["self"]]],[11,"message","","Returns a reference the `message` stored in `Trap`.",19,[[["self"]],["str"]]],[11,"trace","","Returns a list of function frames in WebAssembly code that…",19,[[["self"]]]],[11,"new","","Creates a new set of limits with the minimum and maximum…",20,[[["u32"],["option",["u32"]]],["limits"]]],[11,"at_least","","Creates a new `Limits` with the `min` specified and no…",20,[[["u32"]],["limits"]]],[11,"min","","Returns the minimum amount for these limits.",20,[[["self"]],["u32"]]],[11,"max","","Returns the maximum amount for these limits, if specified.",20,[[["self"]],[["u32"],["option",["u32"]]]]],[11,"is_num","","Returns true if `ValType` matches any of the numeric…",5,[[["self"]],["bool"]]],[11,"is_ref","","Returns true if `ValType` matches either of the reference…",5,[[["self"]],["bool"]]],[11,"func","","Attempt to return the underlying type of this external…",6,[[["self"]],[["option",["functype"]],["functype"]]]],[11,"unwrap_func","","Returns the underlying descriptor of this [`ExternType`],…",6,[[["self"]],["functype"]]],[11,"global","","Attempt to return the underlying type of this external…",6,[[["self"]],[["globaltype"],["option",["globaltype"]]]]],[11,"unwrap_global","","Returns the underlying descriptor of this [`ExternType`],…",6,[[["self"]],["globaltype"]]],[11,"table","","Attempt to return the underlying type of this external…",6,[[["self"]],[["tabletype"],["option",["tabletype"]]]]],[11,"unwrap_table","","Returns the underlying descriptor of this [`ExternType`],…",6,[[["self"]],["tabletype"]]],[11,"memory","","Attempt to return the underlying type of this external…",6,[[["self"]],[["option",["memorytype"]],["memorytype"]]]],[11,"unwrap_memory","","Returns the underlying descriptor of this [`ExternType`],…",6,[[["self"]],["memorytype"]]],[11,"new","","Creates a new function descriptor from the given…",21,[[["box"]],["functype"]]],[11,"params","","Returns the list of parameter types for this function.",21,[[["self"]]]],[11,"results","","Returns the list of result types for this function.",21,[[["self"]]]],[11,"new","","Creates a new global descriptor of the specified `content`…",22,[[["valtype"],["mutability"]],["globaltype"]]],[11,"content","","Returns the value type of this global descriptor.",22,[[["self"]],["valtype"]]],[11,"mutability","","Returns whether or not this global is mutable.",22,[[["self"]],["mutability"]]],[11,"new","","Creates a new table descriptor which will contain the…",23,[[["valtype"],["limits"]],["tabletype"]]],[11,"element","","Returns the element value type of this table.",23,[[["self"]],["valtype"]]],[11,"limits","","Returns the limits, in units of elements, of this table.",23,[[["self"]],["limits"]]],[11,"new","","Creates a new descriptor for a WebAssembly memory given…",24,[[["limits"]],["memorytype"]]],[11,"limits","","Returns the limits (in pages) that are configured for this…",24,[[["self"]],["limits"]]],[11,"new","","Creates a new import descriptor which comes from `module`…",25,[[["str"],["externtype"]],["importtype"]]],[11,"module","","Returns the module name that this import is expected to…",25,[[["self"]],["str"]]],[11,"name","","Returns the field name of the module that this import is…",25,[[["self"]],["str"]]],[11,"ty","","Returns the expected type of this import.",25,[[["self"]],["externtype"]]],[11,"new","","Creates a new export which is exported with the given…",26,[[["str"],["externtype"]],["exporttype"]]],[11,"name","","Returns the name by which this export is known by.",26,[[["self"]],["str"]]],[11,"ty","","Returns the type of this export.",26,[[["self"]],["externtype"]]],[11,"null","","Returns a null `anyref` value.",7,[[],["val"]]],[11,"ty","","Returns the corresponding [`ValType`] for this `Val`.",7,[[["self"]],["valtype"]]],[11,"i32","","Attempt to access the underlying value of this `Val`,…",7,[[["self"]],[["i32"],["option",["i32"]]]]],[11,"unwrap_i32","","Returns the underlying value of this `Val`, panicking if…",7,[[["self"]],["i32"]]],[11,"i64","","Attempt to access the underlying value of this `Val`,…",7,[[["self"]],[["i64"],["option",["i64"]]]]],[11,"unwrap_i64","","Returns the underlying value of this `Val`, panicking if…",7,[[["self"]],["i64"]]],[11,"f32","","Attempt to access the underlying value of this `Val`,…",7,[[["self"]],[["f32"],["option",["f32"]]]]],[11,"unwrap_f32","","Returns the underlying value of this `Val`, panicking if…",7,[[["self"]],["f32"]]],[11,"f64","","Attempt to access the underlying value of this `Val`,…",7,[[["self"]],[["option",["f64"]],["f64"]]]],[11,"unwrap_f64","","Returns the underlying value of this `Val`, panicking if…",7,[[["self"]],["f64"]]],[11,"funcref","","Attempt to access the underlying value of this `Val`,…",7,[[["self"]],[["option",["func"]],["func"]]]],[11,"unwrap_funcref","","Returns the underlying value of this `Val`, panicking if…",7,[[["self"]],["func"]]],[11,"v128","","Attempt to access the underlying value of this `Val`,…",7,[[["self"]],[["u128"],["option",["u128"]]]]],[11,"unwrap_v128","","Returns the underlying value of this `Val`, panicking if…",7,[[["self"]],["u128"]]],[11,"anyref","","Attempt to access the underlying value of this `Val`,…",7,[[["self"]],[["anyref"],["option",["anyref"]]]]],[11,"unwrap_anyref","","Returns the underlying value of this `Val`, panicking if…",7,[[["self"]],["anyref"]]],[0,"unix","","Unix-specific extension for the `wasmtime` crate.",null,null],[8,"InstanceExt","wasmtime::unix","Extensions for the [`Instance`] type only available on Unix.",null,null],[10,"set_signal_handler","","The signal handler must be async-signal-safe.",27,[[["self"],["h"]]]],[8,"Callable","wasmtime","A trait representing a function that can be imported and…",null,null],[10,"call","","What is called when the function is invoked in…",28,[[["self"]],[["trap"],["result",["trap"]]]]],[8,"WasmRet","","A trait implemented for types which can be returned from…",null,null],[8,"WasmTy","","A trait implemented for types which can be arguments to…",null,null],[8,"HostInfo","","",null,null],[11,"finalize","","",29,[[["self"]]]],[11,"from","","",8,[[["t"]],["t"]]],[11,"into","","",8,[[],["u"]]],[11,"to_owned","","",8,[[["self"]],["t"]]],[11,"clone_into","","",8,[[["self"],["t"]]]],[11,"try_from","","",8,[[["u"]],["result"]]],[11,"try_into","","",8,[[],["result"]]],[11,"borrow","","",8,[[["self"]],["t"]]],[11,"borrow_mut","","",8,[[["self"]],["t"]]],[11,"type_id","","",8,[[["self"]],["typeid"]]],[11,"from","","",9,[[["t"]],["t"]]],[11,"into","","",9,[[],["u"]]],[11,"to_owned","","",9,[[["self"]],["t"]]],[11,"clone_into","","",9,[[["self"],["t"]]]],[11,"try_from","","",9,[[["u"]],["result"]]],[11,"try_into","","",9,[[],["result"]]],[11,"borrow","","",9,[[["self"]],["t"]]],[11,"borrow_mut","","",9,[[["self"]],["t"]]],[11,"type_id","","",9,[[["self"]],["typeid"]]],[11,"from","","",10,[[["t"]],["t"]]],[11,"into","","",10,[[],["u"]]],[11,"to_owned","","",10,[[["self"]],["t"]]],[11,"clone_into","","",10,[[["self"],["t"]]]],[11,"try_from","","",10,[[["u"]],["result"]]],[11,"try_into","","",10,[[],["result"]]],[11,"borrow","","",10,[[["self"]],["t"]]],[11,"borrow_mut","","",10,[[["self"]],["t"]]],[11,"type_id","","",10,[[["self"]],["typeid"]]],[11,"from","","",11,[[["t"]],["t"]]],[11,"into","","",11,[[],["u"]]],[11,"try_from","","",11,[[["u"]],["result"]]],[11,"try_into","","",11,[[],["result"]]],[11,"borrow","","",11,[[["self"]],["t"]]],[11,"borrow_mut","","",11,[[["self"]],["t"]]],[11,"type_id","","",11,[[["self"]],["typeid"]]],[11,"from","","",12,[[["t"]],["t"]]],[11,"into","","",12,[[],["u"]]],[11,"to_owned","","",12,[[["self"]],["t"]]],[11,"clone_into","","",12,[[["self"],["t"]]]],[11,"try_from","","",12,[[["u"]],["result"]]],[11,"try_into","","",12,[[],["result"]]],[11,"borrow","","",12,[[["self"]],["t"]]],[11,"borrow_mut","","",12,[[["self"]],["t"]]],[11,"type_id","","",12,[[["self"]],["typeid"]]],[11,"from","","",13,[[["t"]],["t"]]],[11,"into","","",13,[[],["u"]]],[11,"to_owned","","",13,[[["self"]],["t"]]],[11,"clone_into","","",13,[[["self"],["t"]]]],[11,"try_from","","",13,[[["u"]],["result"]]],[11,"try_into","","",13,[[],["result"]]],[11,"borrow","","",13,[[["self"]],["t"]]],[11,"borrow_mut","","",13,[[["self"]],["t"]]],[11,"type_id","","",13,[[["self"]],["typeid"]]],[11,"from","","",14,[[["t"]],["t"]]],[11,"into","","",14,[[],["u"]]],[11,"to_owned","","",14,[[["self"]],["t"]]],[11,"clone_into","","",14,[[["self"],["t"]]]],[11,"try_from","","",14,[[["u"]],["result"]]],[11,"try_into","","",14,[[],["result"]]],[11,"borrow","","",14,[[["self"]],["t"]]],[11,"borrow_mut","","",14,[[["self"]],["t"]]],[11,"type_id","","",14,[[["self"]],["typeid"]]],[11,"from","","",15,[[["t"]],["t"]]],[11,"into","","",15,[[],["u"]]],[11,"to_owned","","",15,[[["self"]],["t"]]],[11,"clone_into","","",15,[[["self"],["t"]]]],[11,"try_from","","",15,[[["u"]],["result"]]],[11,"try_into","","",15,[[],["result"]]],[11,"borrow","","",15,[[["self"]],["t"]]],[11,"borrow_mut","","",15,[[["self"]],["t"]]],[11,"type_id","","",15,[[["self"]],["typeid"]]],[11,"from","","",16,[[["t"]],["t"]]],[11,"into","","",16,[[],["u"]]],[11,"to_owned","","",16,[[["self"]],["t"]]],[11,"clone_into","","",16,[[["self"],["t"]]]],[11,"try_from","","",16,[[["u"]],["result"]]],[11,"try_into","","",16,[[],["result"]]],[11,"borrow","","",16,[[["self"]],["t"]]],[11,"borrow_mut","","",16,[[["self"]],["t"]]],[11,"type_id","","",16,[[["self"]],["typeid"]]],[11,"from","","",17,[[["t"]],["t"]]],[11,"into","","",17,[[],["u"]]],[11,"to_owned","","",17,[[["self"]],["t"]]],[11,"clone_into","","",17,[[["self"],["t"]]]],[11,"try_from","","",17,[[["u"]],["result"]]],[11,"try_into","","",17,[[],["result"]]],[11,"borrow","","",17,[[["self"]],["t"]]],[11,"borrow_mut","","",17,[[["self"]],["t"]]],[11,"type_id","","",17,[[["self"]],["typeid"]]],[11,"from","","",18,[[["t"]],["t"]]],[11,"into","","",18,[[],["u"]]],[11,"to_owned","","",18,[[["self"]],["t"]]],[11,"clone_into","","",18,[[["self"],["t"]]]],[11,"try_from","","",18,[[["u"]],["result"]]],[11,"try_into","","",18,[[],["result"]]],[11,"borrow","","",18,[[["self"]],["t"]]],[11,"borrow_mut","","",18,[[["self"]],["t"]]],[11,"type_id","","",18,[[["self"]],["typeid"]]],[11,"from","","",19,[[["t"]],["t"]]],[11,"into","","",19,[[],["u"]]],[11,"to_owned","","",19,[[["self"]],["t"]]],[11,"clone_into","","",19,[[["self"],["t"]]]],[11,"to_string","","",19,[[["self"]],["string"]]],[11,"try_from","","",19,[[["u"]],["result"]]],[11,"try_into","","",19,[[],["result"]]],[11,"borrow","","",19,[[["self"]],["t"]]],[11,"borrow_mut","","",19,[[["self"]],["t"]]],[11,"type_id","","",19,[[["self"]],["typeid"]]],[11,"from","","",20,[[["t"]],["t"]]],[11,"into","","",20,[[],["u"]]],[11,"to_owned","","",20,[[["self"]],["t"]]],[11,"clone_into","","",20,[[["self"],["t"]]]],[11,"try_from","","",20,[[["u"]],["result"]]],[11,"try_into","","",20,[[],["result"]]],[11,"borrow","","",20,[[["self"]],["t"]]],[11,"borrow_mut","","",20,[[["self"]],["t"]]],[11,"type_id","","",20,[[["self"]],["typeid"]]],[11,"from","","",21,[[["t"]],["t"]]],[11,"into","","",21,[[],["u"]]],[11,"to_owned","","",21,[[["self"]],["t"]]],[11,"clone_into","","",21,[[["self"],["t"]]]],[11,"try_from","","",21,[[["u"]],["result"]]],[11,"try_into","","",21,[[],["result"]]],[11,"borrow","","",21,[[["self"]],["t"]]],[11,"borrow_mut","","",21,[[["self"]],["t"]]],[11,"type_id","","",21,[[["self"]],["typeid"]]],[11,"from","","",22,[[["t"]],["t"]]],[11,"into","","",22,[[],["u"]]],[11,"to_owned","","",22,[[["self"]],["t"]]],[11,"clone_into","","",22,[[["self"],["t"]]]],[11,"try_from","","",22,[[["u"]],["result"]]],[11,"try_into","","",22,[[],["result"]]],[11,"borrow","","",22,[[["self"]],["t"]]],[11,"borrow_mut","","",22,[[["self"]],["t"]]],[11,"type_id","","",22,[[["self"]],["typeid"]]],[11,"from","","",23,[[["t"]],["t"]]],[11,"into","","",23,[[],["u"]]],[11,"to_owned","","",23,[[["self"]],["t"]]],[11,"clone_into","","",23,[[["self"],["t"]]]],[11,"try_from","","",23,[[["u"]],["result"]]],[11,"try_into","","",23,[[],["result"]]],[11,"borrow","","",23,[[["self"]],["t"]]],[11,"borrow_mut","","",23,[[["self"]],["t"]]],[11,"type_id","","",23,[[["self"]],["typeid"]]],[11,"from","","",24,[[["t"]],["t"]]],[11,"into","","",24,[[],["u"]]],[11,"to_owned","","",24,[[["self"]],["t"]]],[11,"clone_into","","",24,[[["self"],["t"]]]],[11,"try_from","","",24,[[["u"]],["result"]]],[11,"try_into","","",24,[[],["result"]]],[11,"borrow","","",24,[[["self"]],["t"]]],[11,"borrow_mut","","",24,[[["self"]],["t"]]],[11,"type_id","","",24,[[["self"]],["typeid"]]],[11,"from","","",25,[[["t"]],["t"]]],[11,"into","","",25,[[],["u"]]],[11,"to_owned","","",25,[[["self"]],["t"]]],[11,"clone_into","","",25,[[["self"],["t"]]]],[11,"try_from","","",25,[[["u"]],["result"]]],[11,"try_into","","",25,[[],["result"]]],[11,"borrow","","",25,[[["self"]],["t"]]],[11,"borrow_mut","","",25,[[["self"]],["t"]]],[11,"type_id","","",25,[[["self"]],["typeid"]]],[11,"from","","",26,[[["t"]],["t"]]],[11,"into","","",26,[[],["u"]]],[11,"to_owned","","",26,[[["self"]],["t"]]],[11,"clone_into","","",26,[[["self"],["t"]]]],[11,"try_from","","",26,[[["u"]],["result"]]],[11,"try_into","","",26,[[],["result"]]],[11,"borrow","","",26,[[["self"]],["t"]]],[11,"borrow_mut","","",26,[[["self"]],["t"]]],[11,"type_id","","",26,[[["self"]],["typeid"]]],[11,"from","","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"to_owned","","",0,[[["self"]],["t"]]],[11,"clone_into","","",0,[[["self"],["t"]]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]],[11,"from","","",1,[[["t"]],["t"]]],[11,"into","","",1,[[],["u"]]],[11,"to_owned","","",1,[[["self"]],["t"]]],[11,"clone_into","","",1,[[["self"],["t"]]]],[11,"try_from","","",1,[[["u"]],["result"]]],[11,"try_into","","",1,[[],["result"]]],[11,"borrow","","",1,[[["self"]],["t"]]],[11,"borrow_mut","","",1,[[["self"]],["t"]]],[11,"type_id","","",1,[[["self"]],["typeid"]]],[11,"from","","",2,[[["t"]],["t"]]],[11,"into","","",2,[[],["u"]]],[11,"to_owned","","",2,[[["self"]],["t"]]],[11,"clone_into","","",2,[[["self"],["t"]]]],[11,"try_from","","",2,[[["u"]],["result"]]],[11,"try_into","","",2,[[],["result"]]],[11,"borrow","","",2,[[["self"]],["t"]]],[11,"borrow_mut","","",2,[[["self"]],["t"]]],[11,"type_id","","",2,[[["self"]],["typeid"]]],[11,"from","","",3,[[["t"]],["t"]]],[11,"into","","",3,[[],["u"]]],[11,"to_owned","","",3,[[["self"]],["t"]]],[11,"clone_into","","",3,[[["self"],["t"]]]],[11,"try_from","","",3,[[["u"]],["result"]]],[11,"try_into","","",3,[[],["result"]]],[11,"borrow","","",3,[[["self"]],["t"]]],[11,"borrow_mut","","",3,[[["self"]],["t"]]],[11,"type_id","","",3,[[["self"]],["typeid"]]],[11,"from","","",4,[[["t"]],["t"]]],[11,"into","","",4,[[],["u"]]],[11,"to_owned","","",4,[[["self"]],["t"]]],[11,"clone_into","","",4,[[["self"],["t"]]]],[11,"try_from","","",4,[[["u"]],["result"]]],[11,"try_into","","",4,[[],["result"]]],[11,"borrow","","",4,[[["self"]],["t"]]],[11,"borrow_mut","","",4,[[["self"]],["t"]]],[11,"type_id","","",4,[[["self"]],["typeid"]]],[11,"from","","",5,[[["t"]],["t"]]],[11,"into","","",5,[[],["u"]]],[11,"to_owned","","",5,[[["self"]],["t"]]],[11,"clone_into","","",5,[[["self"],["t"]]]],[11,"try_from","","",5,[[["u"]],["result"]]],[11,"try_into","","",5,[[],["result"]]],[11,"borrow","","",5,[[["self"]],["t"]]],[11,"borrow_mut","","",5,[[["self"]],["t"]]],[11,"type_id","","",5,[[["self"]],["typeid"]]],[11,"equivalent","","",5,[[["k"],["self"]],["bool"]]],[11,"from","","",6,[[["t"]],["t"]]],[11,"into","","",6,[[],["u"]]],[11,"to_owned","","",6,[[["self"]],["t"]]],[11,"clone_into","","",6,[[["self"],["t"]]]],[11,"try_from","","",6,[[["u"]],["result"]]],[11,"try_into","","",6,[[],["result"]]],[11,"borrow","","",6,[[["self"]],["t"]]],[11,"borrow_mut","","",6,[[["self"]],["t"]]],[11,"type_id","","",6,[[["self"]],["typeid"]]],[11,"from","","",7,[[["t"]],["t"]]],[11,"into","","",7,[[],["u"]]],[11,"to_owned","","",7,[[["self"]],["t"]]],[11,"clone_into","","",7,[[["self"],["t"]]]],[11,"try_from","","",7,[[["u"]],["result"]]],[11,"try_into","","",7,[[],["result"]]],[11,"borrow","","",7,[[["self"]],["t"]]],[11,"borrow_mut","","",7,[[["self"]],["t"]]],[11,"type_id","","",7,[[["self"]],["typeid"]]],[11,"set_signal_handler","","",13,[[["self"],["h"]]]],[11,"from","","",0,[[["func"]],["self"]]],[11,"from","","",0,[[["global"]],["self"]]],[11,"from","","",0,[[["memory"]],["self"]]],[11,"from","","",0,[[["table"]],["self"]]],[11,"from","","",7,[[["i32"]],["val"]]],[11,"from","","",7,[[["i64"]],["val"]]],[11,"from","","",7,[[["f32"]],["val"]]],[11,"from","","",7,[[["f64"]],["val"]]],[11,"from","","",7,[[["anyref"]],["val"]]],[11,"from","","",7,[[["func"]],["val"]]],[11,"clone","","",0,[[["self"]],["extern"]]],[11,"clone","","",8,[[["self"]],["global"]]],[11,"clone","","",9,[[["self"]],["table"]]],[11,"clone","","",10,[[["self"]],["memory"]]],[11,"clone","","",12,[[["self"]],["func"]]],[11,"clone","","",13,[[["self"]],["instance"]]],[11,"clone","","",14,[[["self"]],["module"]]],[11,"clone","","",1,[[["self"]],["anyref"]]],[11,"clone","","",15,[[["self"]],["hostref"]]],[11,"clone","","",16,[[["self"]],["config"]]],[11,"clone","","",3,[[["self"]],["strategy"]]],[11,"clone","","",2,[[["self"]],["optlevel"]]],[11,"clone","","",17,[[["self"]],["engine"]]],[11,"clone","","",18,[[["self"]],["store"]]],[11,"clone","","",19,[[["self"]],["trap"]]],[11,"clone","","",4,[[["self"]],["mutability"]]],[11,"clone","","",20,[[["self"]],["limits"]]],[11,"clone","","",5,[[["self"]],["valtype"]]],[11,"clone","","",6,[[["self"]],["externtype"]]],[11,"clone","","",21,[[["self"]],["functype"]]],[11,"clone","","",22,[[["self"]],["globaltype"]]],[11,"clone","","",23,[[["self"]],["tabletype"]]],[11,"clone","","",24,[[["self"]],["memorytype"]]],[11,"clone","","",25,[[["self"]],["importtype"]]],[11,"clone","","",26,[[["self"]],["exporttype"]]],[11,"clone","","",7,[[["self"]],["val"]]],[11,"default","","",16,[[],["config"]]],[11,"default","","",17,[[],["engine"]]],[11,"default","","",18,[[],["store"]]],[11,"eq","","",4,[[["self"],["mutability"]],["bool"]]],[11,"eq","","",5,[[["self"],["valtype"]],["bool"]]],[11,"fmt","","",11,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",12,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",1,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",15,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",16,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",3,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",2,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",19,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",4,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",20,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",5,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",6,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",21,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",22,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",23,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",24,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",25,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",26,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",7,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",19,[[["formatter"],["self"]],["result"]]],[11,"finalize","","",29,[[["self"]]]]],"p":[[4,"Extern"],[4,"AnyRef"],[4,"OptLevel"],[4,"Strategy"],[4,"Mutability"],[4,"ValType"],[4,"ExternType"],[4,"Val"],[3,"Global"],[3,"Table"],[3,"Memory"],[3,"FrameInfo"],[3,"Func"],[3,"Instance"],[3,"Module"],[3,"HostRef"],[3,"Config"],[3,"Engine"],[3,"Store"],[3,"Trap"],[3,"Limits"],[3,"FuncType"],[3,"GlobalType"],[3,"TableType"],[3,"MemoryType"],[3,"ImportType"],[3,"ExportType"],[8,"InstanceExt"],[8,"Callable"],[8,"HostInfo"]]}; +searchIndex["wasmtime_debug"] = {"doc":"Debug utils for WebAssembly using Cranelift.","i":[[3,"DebugInfoData","wasmtime_debug","",null,null],[12,"dwarf","","",0,null],[12,"name_section","","",0,null],[12,"wasm_file","","",0,null],[3,"WasmFileInfo","","",null,null],[12,"path","","",1,null],[12,"code_section_offset","","",1,null],[12,"funcs","","",1,null],[4,"ResolvedSymbol","","",null,null],[13,"PhysicalAddress","","",2,null],[13,"Reloc","","",2,null],[12,"name","wasmtime_debug::ResolvedSymbol","",3,null],[12,"addend","","",3,null],[5,"read_debuginfo","wasmtime_debug","",null,[[],["debuginfodata"]]],[5,"transform_dwarf","","",null,[[["debuginfodata"],["targetfrontendconfig"],["moduleaddressmap"],["modulevmctxinfo"],["valuelabelsranges"]],[["error"],["dwarf"],["result",["dwarf","error"]]]]],[5,"emit_dwarf","","",null,[[["artifact"],["dwarf"],["symbolresolver"]],["result"]]],[5,"emit_debugsections","","",null,[[["modulevmctxinfo"],["artifact"],["targetfrontendconfig"],["debuginfodata"],["moduleaddressmap"],["valuelabelsranges"]],[["result",["error"]],["error"]]]],[5,"emit_debugsections_image","","",null,[[["debuginfodata"],["targetfrontendconfig"],["triple"],["modulevmctxinfo"],["moduleaddressmap"],["valuelabelsranges"]],[["error"],["vec",["u8"]],["result",["vec","error"]]]]],[8,"SymbolResolver","","",null,null],[10,"resolve_symbol","","",4,[[["i64"],["self"],["usize"]],["resolvedsymbol"]]],[11,"from","","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]],[11,"from","","",1,[[["t"]],["t"]]],[11,"into","","",1,[[],["u"]]],[11,"try_from","","",1,[[["u"]],["result"]]],[11,"try_into","","",1,[[],["result"]]],[11,"borrow","","",1,[[["self"]],["t"]]],[11,"borrow_mut","","",1,[[["self"]],["t"]]],[11,"type_id","","",1,[[["self"]],["typeid"]]],[11,"from","","",2,[[["t"]],["t"]]],[11,"into","","",2,[[],["u"]]],[11,"try_from","","",2,[[["u"]],["result"]]],[11,"try_into","","",2,[[],["result"]]],[11,"borrow","","",2,[[["self"]],["t"]]],[11,"borrow_mut","","",2,[[["self"]],["t"]]],[11,"type_id","","",2,[[["self"]],["typeid"]]],[11,"fmt","","",1,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",0,[[["formatter"],["self"]],["result"]]]],"p":[[3,"DebugInfoData"],[3,"WasmFileInfo"],[4,"ResolvedSymbol"],[13,"Reloc"],[8,"SymbolResolver"]]}; +searchIndex["wasmtime_environ"] = {"doc":"Standalone environment for WebAssembly using Cranelift.…","i":[[3,"FunctionAddressMap","wasmtime_environ","Function and its instructions addresses mappings.",null,null],[12,"instructions","","Instructions maps. The array is sorted by the…",0,null],[12,"start_srcloc","","Function start source location (normally declaration).",0,null],[12,"end_srcloc","","Function end source location.",0,null],[12,"body_offset","","Generated function body offset if applicable, otherwise 0.",0,null],[12,"body_len","","Generated function body length.",0,null],[3,"InstructionAddressMap","","Single source location to generated address mapping.",null,null],[12,"srcloc","","Original source location.",1,null],[12,"code_offset","","Generated instructions offset.",1,null],[12,"code_len","","Generated instructions length.",1,null],[3,"ModuleVmctxInfo","","Module `vmctx` related info.",null,null],[12,"memory_offset","","The memory definition offset in the VMContext structure.",2,null],[12,"stack_slots","","The functions stack slots.",2,null],[3,"CacheConfig","","Global configuration for how the cache is managed",null,null],[3,"Compilation","","The result of compiling a WebAssembly module's functions.",null,null],[3,"CompiledFunction","","Compiled function: machine code body, jump table offsets,…",null,null],[12,"body","","The function body.",3,null],[12,"jt_offsets","","The jump tables offsets (in the body).",3,null],[12,"unwind_info","","The unwind information.",3,null],[3,"CompiledFunctionUnwindInfoReloc","","Relocation entry for unwind info.",null,null],[12,"offset","","Entry offest in the code block.",4,null],[12,"addend","","Entry addend relative to the code block.",4,null],[3,"Relocation","","A record of a relocation to perform.",null,null],[12,"reloc","","The relocation code.",5,null],[12,"reloc_target","","Relocation target.",5,null],[12,"offset","","The offset where to apply the relocation.",5,null],[12,"addend","","The addend to add to the relocation value.",5,null],[3,"TrapInformation","","Information about trap.",null,null],[12,"code_offset","","The offset of the trapping instruction in native code. It…",6,null],[12,"source_loc","","Location of trapping instruction in WebAssembly binary…",6,null],[12,"trap_code","","Code of the trap.",6,null],[3,"BuiltinFunctionIndex","","An index type for builtin functions.",null,null],[3,"MemoryPlan","","A WebAssembly linear memory description along with our…",null,null],[12,"memory","","The WebAssembly linear memory description.",7,null],[12,"style","","Our chosen implementation style.",7,null],[12,"offset_guard_size","","Our chosen offset-guard size.",7,null],[3,"Module","","A translated WebAssembly module, excluding the function…",null,null],[12,"id","","A unique identifier (within this process) for this module.",8,null],[12,"signatures","","Unprocessed signatures exactly as provided by…",8,null],[12,"imported_funcs","","Names of imported functions, as well as the index of the…",8,null],[12,"imported_tables","","Names of imported tables.",8,null],[12,"imported_memories","","Names of imported memories.",8,null],[12,"imported_globals","","Names of imported globals.",8,null],[12,"functions","","Types of functions, imported and local.",8,null],[12,"table_plans","","WebAssembly tables.",8,null],[12,"memory_plans","","WebAssembly linear memory plans.",8,null],[12,"globals","","WebAssembly global variables.",8,null],[12,"exports","","Exported entities.",8,null],[12,"start_func","","The module \"start\" function, if present.",8,null],[12,"table_elements","","WebAssembly table initializers.",8,null],[12,"func_names","","WebAssembly table initializers.",8,null],[3,"TableElements","","A WebAssembly table initializer.",null,null],[12,"table_index","","The index of a table to initialize.",9,null],[12,"base","","Optionally, a global variable giving a base index.",9,null],[12,"offset","","The offset to add to the base.",9,null],[12,"elements","","The values to write into the table elements.",9,null],[3,"TablePlan","","A WebAssembly table description along with our chosen…",null,null],[12,"table","","The WebAssembly table description.",10,null],[12,"style","","Our chosen implementation style.",10,null],[3,"DataInitializer","","A data initializer for linear memory.",null,null],[12,"location","","The location where the initialization is to be performed.",11,null],[12,"data","","The initialization data.",11,null],[3,"DataInitializerLocation","","A memory index and offset within that memory where a data…",null,null],[12,"memory_index","","The index of the memory to initialize.",12,null],[12,"base","","Optionally a globalvar base to initialize at.",12,null],[12,"offset","","A constant offset to initialize at.",12,null],[3,"FunctionBodyData","","Contains function data: byte code and its offset in the…",null,null],[12,"data","","Body byte code.",13,null],[12,"module_offset","","Body offset in the module file.",13,null],[3,"ModuleEnvironment","","Object containing the standalone environment information.",null,null],[3,"ModuleTranslation","","The result of translating via `ModuleEnvironment`.…",null,null],[12,"target_config","","Compilation setting flags.",14,null],[12,"module","","Module information.",14,null],[12,"function_body_inputs","","References to the function bodies.",14,null],[12,"data_initializers","","References to the data initializers.",14,null],[12,"tunables","","Tunable parameters.",14,null],[12,"module_translation","","The decoded Wasm types for the module.",14,null],[3,"Tunables","","Tunable parameters for WebAssembly compilation.",null,null],[12,"static_memory_bound","","For static heaps, the size in wasm pages of the heap…",15,null],[12,"static_memory_offset_guard_size","","The size in bytes of the offset guard for static heaps.",15,null],[12,"dynamic_memory_offset_guard_size","","The size in bytes of the offset guard for dynamic heaps.",15,null],[3,"TargetSharedSignatureIndex","","Target specific type for shared signature index.",null,null],[3,"VMOffsets","","This class computes offsets to fields within `VMContext`…",null,null],[12,"pointer_size","","The size in bytes of a pointer on the target.",16,null],[12,"num_signature_ids","","The number of signature declarations in the module.",16,null],[12,"num_imported_functions","","The number of imported functions in the module.",16,null],[12,"num_imported_tables","","The number of imported tables in the module.",16,null],[12,"num_imported_memories","","The number of imported memories in the module.",16,null],[12,"num_imported_globals","","The number of imported globals in the module.",16,null],[12,"num_defined_tables","","The number of defined tables in the module.",16,null],[12,"num_defined_memories","","The number of defined memories in the module.",16,null],[12,"num_defined_globals","","The number of defined globals in the module.",16,null],[4,"ModuleMemoryOffset","","Memory definition offset in the VMContext structure.",null,null],[13,"None","","Not available.",17,null],[13,"Defined","","Offset to the defined memory.",17,null],[13,"Imported","","Offset to the imported memory.",17,null],[4,"CompileError","","An error while compiling WebAssembly to machine code.",null,null],[13,"Wasm","","A wasm translation error occured.",18,null],[13,"Codegen","","A compilation error occured.",18,null],[13,"DebugInfoNotSupported","","A compilation error occured.",18,null],[4,"CompiledFunctionUnwindInfo","","Compiled function unwind information.",null,null],[13,"None","","No info.",19,null],[13,"Windows","","Windows UNWIND_INFO.",19,null],[13,"FrameLayout","","Frame layout info.",19,null],[4,"RelocationTarget","","Destination function. Can be either user function or some…",null,null],[13,"UserFunc","","The user function index.",20,null],[13,"LibCall","","A compiler-generated libcall.",20,null],[13,"JumpTable","","Jump table index.",20,null],[4,"Export","","An entity to export.",null,null],[13,"Function","","Function export.",21,null],[13,"Table","","Table export.",21,null],[13,"Memory","","Memory export.",21,null],[13,"Global","","Global export.",21,null],[4,"MemoryStyle","","Implemenation styles for WebAssembly linear memory.",null,null],[13,"Dynamic","","The actual memory can be resized and moved.",22,null],[13,"Static","","Addresss space is allocated up front.",22,null],[12,"bound","wasmtime_environ::MemoryStyle","The number of mapped and unmapped pages.",23,null],[4,"TableStyle","wasmtime_environ","Implemenation styles for WebAssembly tables.",null,null],[13,"CallerChecksSignature","","Signatures are stored in the table and checked in the…",24,null],[5,"cache_create_new_config","","Creates a new configuration file at specified path, or…",null,[[["debug"],["option"],["asref",["path"]],["path"]],[["result",["pathbuf"]],["pathbuf"]]]],[5,"translate_signature","","Add environment-specific function parameters.",null,[[["type"],["signature"]],["signature"]]],[11,"new","","Constructs unwind info object.",19,[[["targetisa"],["context"]],["self"]]],[11,"is_empty","","Retuns true is no unwind info data.",19,[[["self"]],["bool"]]],[11,"len","","Returns size of serilized unwind info.",19,[[["self"]],["usize"]]],[11,"serialize","","Serializes data into byte array.",19,[[["vec"],["self"]]]],[11,"new","","Creates a compilation artifact from a contiguous function…",25,[[["primarymap",["definedfuncindex","compiledfunction"]],["compiledfunction"],["definedfuncindex"]],["self"]]],[11,"from_buffer","","Allocates the compilation result with the given function…",25,[[["vec",["u8"]],["u8"]],["self"]]],[11,"get","","Gets the bytes of a single function",25,[[["self"],["definedfuncindex"]],["compiledfunction"]]],[11,"len","","Gets the number of functions defined.",25,[[["self"]],["usize"]]],[11,"is_empty","","Returns whether there are no functions defined.",25,[[["self"]],["bool"]]],[11,"get_jt_offsets","","Gets functions jump table offsets.",25,[[["self"]],[["jumptableoffsets"],["primarymap",["definedfuncindex","jumptableoffsets"]],["definedfuncindex"]]]],[11,"get_memory32_grow_index","","Returns an index for wasm's `memory.grow` builtin function.",26,[[],["self"]]],[11,"get_imported_memory32_grow_index","","Returns an index for wasm's imported `memory.grow` builtin…",26,[[],["self"]]],[11,"get_memory32_size_index","","Returns an index for wasm's `memory.size` builtin function.",26,[[],["self"]]],[11,"get_imported_memory32_size_index","","Returns an index for wasm's imported `memory.size` builtin…",26,[[],["self"]]],[11,"builtin_functions_total_number","","Returns the total number of builtin functions.",26,[[],["u32"]]],[11,"index","","Return the index as an u32 number.",26,[[["self"]],["u32"]]],[11,"for_memory","","Decide on an implementation style for the given `Memory`.",22,[[["memory"],["tunables"]]]],[11,"for_memory","","Draw up a plan for implementing a `Memory`.",7,[[["memory"],["tunables"]],["self"]]],[11,"for_table","","Decide on an implementation style for the given `Table`.",24,[[["table"],["tunables"]],["self"]]],[11,"for_table","","Draw up a plan for implementing a `Table`.",10,[[["table"],["tunables"]],["self"]]],[11,"new","","Allocates the module data structures.",8,[[],["self"]]],[11,"func_index","","Convert a `DefinedFuncIndex` into a `FuncIndex`.",8,[[["self"],["definedfuncindex"]],["funcindex"]]],[11,"defined_func_index","","Convert a `FuncIndex` into a `DefinedFuncIndex`. Returns…",8,[[["self"],["funcindex"]],[["option",["definedfuncindex"]],["definedfuncindex"]]]],[11,"is_imported_function","","Test whether the given function index is for an imported…",8,[[["self"],["funcindex"]],["bool"]]],[11,"table_index","","Convert a `DefinedTableIndex` into a `TableIndex`.",8,[[["definedtableindex"],["self"]],["tableindex"]]],[11,"defined_table_index","","Convert a `TableIndex` into a `DefinedTableIndex`. Returns…",8,[[["self"],["tableindex"]],[["definedtableindex"],["option",["definedtableindex"]]]]],[11,"is_imported_table","","Test whether the given table index is for an imported table.",8,[[["self"],["tableindex"]],["bool"]]],[11,"memory_index","","Convert a `DefinedMemoryIndex` into a `MemoryIndex`.",8,[[["definedmemoryindex"],["self"]],["memoryindex"]]],[11,"defined_memory_index","","Convert a `MemoryIndex` into a `DefinedMemoryIndex`.…",8,[[["memoryindex"],["self"]],[["definedmemoryindex"],["option",["definedmemoryindex"]]]]],[11,"is_imported_memory","","Test whether the given memory index is for an imported…",8,[[["memoryindex"],["self"]],["bool"]]],[11,"global_index","","Convert a `DefinedGlobalIndex` into a `GlobalIndex`.",8,[[["definedglobalindex"],["self"]],["globalindex"]]],[11,"defined_global_index","","Convert a `GlobalIndex` into a `DefinedGlobalIndex`.…",8,[[["self"],["globalindex"]],[["definedglobalindex"],["option",["definedglobalindex"]]]]],[11,"is_imported_global","","Test whether the given global index is for an imported…",8,[[["self"],["globalindex"]],["bool"]]],[11,"hash_for_cache","","Computes hash of the module for the purpose of caching.",8,[[["primarymap"],["self"],["h"]]]],[11,"func_env","","Return a new `FuncEnvironment` for translating a function.",14,[[["self"]],["funcenvironment"]]],[11,"new","","Allocates the environment data structures.",27,[[["targetfrontendconfig"],["tunables"]],["self"]]],[11,"translate","","Translate a wasm module using this environment. This…",27,[[],[["moduletranslation"],["wasmresult",["moduletranslation"]]]]],[11,"new","","Return a new `VMOffsets` instance, for a given pointer size.",16,[[["module"],["u8"]],["self"]]],[11,"vmfunction_import_body","","The offset of the `body` field.",16,[[["self"]],["u8"]]],[11,"vmfunction_import_vmctx","","The offset of the `vmctx` field.",16,[[["self"]],["u8"]]],[11,"size_of_vmfunction_import","","Return the size of `VMFunctionImport`.",16,[[["self"]],["u8"]]],[11,"size_of_vmfunction_body_ptr","","The size of the `current_elements` field.",16,[[["self"]],["u8"]]],[11,"vmtable_import_from","","The offset of the `from` field.",16,[[["self"]],["u8"]]],[11,"vmtable_import_vmctx","","The offset of the `vmctx` field.",16,[[["self"]],["u8"]]],[11,"size_of_vmtable_import","","Return the size of `VMTableImport`.",16,[[["self"]],["u8"]]],[11,"vmtable_definition_base","","The offset of the `base` field.",16,[[["self"]],["u8"]]],[11,"vmtable_definition_current_elements","","The offset of the `current_elements` field.",16,[[["self"]],["u8"]]],[11,"size_of_vmtable_definition_current_elements","","The size of the `current_elements` field.",16,[[["self"]],["u8"]]],[11,"size_of_vmtable_definition","","Return the size of `VMTableDefinition`.",16,[[["self"]],["u8"]]],[11,"type_of_vmtable_definition_current_elements","","The type of the `current_elements` field.",16,[[["self"]],["type"]]],[11,"vmmemory_import_from","","The offset of the `from` field.",16,[[["self"]],["u8"]]],[11,"vmmemory_import_vmctx","","The offset of the `vmctx` field.",16,[[["self"]],["u8"]]],[11,"size_of_vmmemory_import","","Return the size of `VMMemoryImport`.",16,[[["self"]],["u8"]]],[11,"vmmemory_definition_base","","The offset of the `base` field.",16,[[["self"]],["u8"]]],[11,"vmmemory_definition_current_length","","The offset of the `current_length` field.",16,[[["self"]],["u8"]]],[11,"size_of_vmmemory_definition_current_length","","The size of the `current_length` field.",16,[[["self"]],["u8"]]],[11,"size_of_vmmemory_definition","","Return the size of `VMMemoryDefinition`.",16,[[["self"]],["u8"]]],[11,"type_of_vmmemory_definition_current_length","","The type of the `current_length` field.",16,[[["self"]],["type"]]],[11,"vmglobal_import_from","","The offset of the `from` field.",16,[[["self"]],["u8"]]],[11,"size_of_vmglobal_import","","Return the size of `VMGlobalImport`.",16,[[["self"]],["u8"]]],[11,"size_of_vmglobal_definition","","Return the size of `VMGlobalDefinition`; this is the size…",16,[[["self"]],["u8"]]],[11,"size_of_vmshared_signature_index","","Return the size of `VMSharedSignatureIndex`.",16,[[["self"]],["u8"]]],[11,"vmcaller_checked_anyfunc_func_ptr","","The offset of the `func_ptr` field.",16,[[["self"]],["u8"]]],[11,"vmcaller_checked_anyfunc_type_index","","The offset of the `type_index` field.",16,[[["self"]],["u8"]]],[11,"vmcaller_checked_anyfunc_vmctx","","The offset of the `vmctx` field.",16,[[["self"]],["u8"]]],[11,"size_of_vmcaller_checked_anyfunc","","Return the size of `VMCallerCheckedAnyfunc`.",16,[[["self"]],["u8"]]],[11,"vmctx_signature_ids_begin","","The offset of the `signature_ids` array.",16,[[["self"]],["u32"]]],[11,"vmctx_imported_functions_begin","","The offset of the `tables` array.",16,[[["self"]],["u32"]]],[11,"vmctx_imported_tables_begin","","The offset of the `tables` array.",16,[[["self"]],["u32"]]],[11,"vmctx_imported_memories_begin","","The offset of the `memories` array.",16,[[["self"]],["u32"]]],[11,"vmctx_imported_globals_begin","","The offset of the `globals` array.",16,[[["self"]],["u32"]]],[11,"vmctx_tables_begin","","The offset of the `tables` array.",16,[[["self"]],["u32"]]],[11,"vmctx_memories_begin","","The offset of the `memories` array.",16,[[["self"]],["u32"]]],[11,"vmctx_globals_begin","","The offset of the `globals` array.",16,[[["self"]],["u32"]]],[11,"vmctx_builtin_functions_begin","","The offset of the builtin functions array.",16,[[["self"]],["u32"]]],[11,"size_of_vmctx","","Return the size of the `VMContext` allocation.",16,[[["self"]],["u32"]]],[11,"vmctx_vmshared_signature_id","","Return the offset to `VMSharedSignatureId` index `index`.",16,[[["signatureindex"],["self"]],["u32"]]],[11,"vmctx_vmfunction_import","","Return the offset to `VMFunctionImport` index `index`.",16,[[["self"],["funcindex"]],["u32"]]],[11,"vmctx_vmtable_import","","Return the offset to `VMTableImport` index `index`.",16,[[["self"],["tableindex"]],["u32"]]],[11,"vmctx_vmmemory_import","","Return the offset to `VMMemoryImport` index `index`.",16,[[["memoryindex"],["self"]],["u32"]]],[11,"vmctx_vmglobal_import","","Return the offset to `VMGlobalImport` index `index`.",16,[[["self"],["globalindex"]],["u32"]]],[11,"vmctx_vmtable_definition","","Return the offset to `VMTableDefinition` index `index`.",16,[[["definedtableindex"],["self"]],["u32"]]],[11,"vmctx_vmmemory_definition","","Return the offset to `VMMemoryDefinition` index `index`.",16,[[["definedmemoryindex"],["self"]],["u32"]]],[11,"vmctx_vmglobal_definition","","Return the offset to the `VMGlobalDefinition` index `index`.",16,[[["definedglobalindex"],["self"]],["u32"]]],[11,"vmctx_vmfunction_import_body","","Return the offset to the `body` field in `*const…",16,[[["self"],["funcindex"]],["u32"]]],[11,"vmctx_vmfunction_import_vmctx","","Return the offset to the `vmctx` field in `*const…",16,[[["self"],["funcindex"]],["u32"]]],[11,"vmctx_vmtable_import_from","","Return the offset to the `from` field in `VMTableImport`…",16,[[["self"],["tableindex"]],["u32"]]],[11,"vmctx_vmtable_definition_base","","Return the offset to the `base` field in…",16,[[["definedtableindex"],["self"]],["u32"]]],[11,"vmctx_vmtable_definition_current_elements","","Return the offset to the `current_elements` field in…",16,[[["definedtableindex"],["self"]],["u32"]]],[11,"vmctx_vmmemory_import_from","","Return the offset to the `from` field in `VMMemoryImport`…",16,[[["memoryindex"],["self"]],["u32"]]],[11,"vmctx_vmmemory_import_vmctx","","Return the offset to the `vmctx` field in `VMMemoryImport`…",16,[[["memoryindex"],["self"]],["u32"]]],[11,"vmctx_vmmemory_definition_base","","Return the offset to the `base` field in…",16,[[["definedmemoryindex"],["self"]],["u32"]]],[11,"vmctx_vmmemory_definition_current_length","","Return the offset to the `current_length` field in…",16,[[["definedmemoryindex"],["self"]],["u32"]]],[11,"vmctx_vmglobal_import_from","","Return the offset to the `from` field in `VMGlobalImport`…",16,[[["self"],["globalindex"]],["u32"]]],[11,"vmctx_builtin_function","","Return the offset to builtin function in…",16,[[["builtinfunctionindex"],["self"]],["u32"]]],[11,"new","","Constructs `TargetSharedSignatureIndex`.",28,[[["u32"]],["self"]]],[11,"index","","Returns index value.",28,[[],["u32"]]],[11,"worker_event_queue_size","","Returns `$setting`.",29,[[["self"]],["u64"]]],[11,"baseline_compression_level","","Returns `$setting`.",29,[[["self"]],["i32"]]],[11,"optimized_compression_level","","Returns `$setting`.",29,[[["self"]],["i32"]]],[11,"optimized_compression_usage_counter_threshold","","Returns `$setting`.",29,[[["self"]],["u64"]]],[11,"cleanup_interval","","Returns `$setting`.",29,[[["self"]],["duration"]]],[11,"optimizing_compression_task_timeout","","Returns `$setting`.",29,[[["self"]],["duration"]]],[11,"allowed_clock_drift_for_files_from_future","","Returns `$setting`.",29,[[["self"]],["duration"]]],[11,"file_count_soft_limit","","Returns `$setting`.",29,[[["self"]],["u64"]]],[11,"files_total_size_soft_limit","","Returns `$setting`.",29,[[["self"]],["u64"]]],[11,"file_count_limit_percent_if_deleting","","Returns `$setting`.",29,[[["self"]],["u8"]]],[11,"files_total_size_limit_percent_if_deleting","","Returns `$setting`.",29,[[["self"]],["u8"]]],[11,"enabled","","Returns true if and only if the cache is enabled.",29,[[["self"]],["bool"]]],[11,"directory","","Returns path to the cache directory.",29,[[["self"]],["pathbuf"]]],[11,"new_cache_disabled","","Creates a new set of configuration which represents a…",29,[[],["self"]]],[11,"from_file","","Parses cache configuration from the file specified",29,[[["path"],["option",["path"]]],["result"]]],[0,"cranelift","","Support for compiling with Cranelift.",null,null],[3,"RelocSink","wasmtime_environ::cranelift","Implementation of a relocation sink that just saves all…",null,null],[12,"func_relocs","","Relocations recorded for the function.",30,null],[3,"Cranelift","","A compiler that compiles a WebAssembly module with…",null,null],[11,"new","","Return a new `RelocSink` instance.",30,[[["funcindex"]],["self"]]],[0,"ir","wasmtime_environ","",null,null],[0,"types","wasmtime_environ::ir","Common types for the Cranelift code generator.",null,null],[3,"Type","wasmtime_environ::ir::types","The type of an SSA value.",null,null],[17,"INVALID","","Not a valid type. Can't be loaded or stored. Can't be part…",null,null],[17,"IFLAGS","","CPU flags representing the result of an integer…",null,null],[17,"FFLAGS","","CPU flags representing the result of a floating point…",null,null],[17,"B1","","A boolean type with 1 bits.",null,null],[17,"B8","","A boolean type with 8 bits.",null,null],[17,"B16","","A boolean type with 16 bits.",null,null],[17,"B32","","A boolean type with 32 bits.",null,null],[17,"B64","","A boolean type with 64 bits.",null,null],[17,"B128","","A boolean type with 128 bits.",null,null],[17,"I8","","An integer type with 8 bits. WARNING: arithmetic on 8bit…",null,null],[17,"I16","","An integer type with 16 bits. WARNING: arithmetic on 16bit…",null,null],[17,"I32","","An integer type with 32 bits.",null,null],[17,"I64","","An integer type with 64 bits.",null,null],[17,"I128","","An integer type with 128 bits.",null,null],[17,"F32","","A 32-bit floating point type represented in the IEEE…",null,null],[17,"F64","","A 64-bit floating point type represented in the IEEE…",null,null],[17,"R32","","An opaque reference type with 32 bits.",null,null],[17,"R64","","An opaque reference type with 64 bits.",null,null],[17,"B8X8","","A SIMD vector with 8 lanes containing a `b8` each.",null,null],[17,"B16X4","","A SIMD vector with 4 lanes containing a `b16` each.",null,null],[17,"B32X2","","A SIMD vector with 2 lanes containing a `b32` each.",null,null],[17,"I8X8","","A SIMD vector with 8 lanes containing a `i8` each.",null,null],[17,"I16X4","","A SIMD vector with 4 lanes containing a `i16` each.",null,null],[17,"I32X2","","A SIMD vector with 2 lanes containing a `i32` each.",null,null],[17,"F32X2","","A SIMD vector with 2 lanes containing a `f32` each.",null,null],[17,"B8X16","","A SIMD vector with 16 lanes containing a `b8` each.",null,null],[17,"B16X8","","A SIMD vector with 8 lanes containing a `b16` each.",null,null],[17,"B32X4","","A SIMD vector with 4 lanes containing a `b32` each.",null,null],[17,"B64X2","","A SIMD vector with 2 lanes containing a `b64` each.",null,null],[17,"I8X16","","A SIMD vector with 16 lanes containing a `i8` each.",null,null],[17,"I16X8","","A SIMD vector with 8 lanes containing a `i16` each.",null,null],[17,"I32X4","","A SIMD vector with 4 lanes containing a `i32` each.",null,null],[17,"I64X2","","A SIMD vector with 2 lanes containing a `i64` each.",null,null],[17,"F32X4","","A SIMD vector with 4 lanes containing a `f32` each.",null,null],[17,"F64X2","","A SIMD vector with 2 lanes containing a `f64` each.",null,null],[17,"B8X32","","A SIMD vector with 32 lanes containing a `b8` each.",null,null],[17,"B16X16","","A SIMD vector with 16 lanes containing a `b16` each.",null,null],[17,"B32X8","","A SIMD vector with 8 lanes containing a `b32` each.",null,null],[17,"B64X4","","A SIMD vector with 4 lanes containing a `b64` each.",null,null],[17,"B128X2","","A SIMD vector with 2 lanes containing a `b128` each.",null,null],[17,"I8X32","","A SIMD vector with 32 lanes containing a `i8` each.",null,null],[17,"I16X16","","A SIMD vector with 16 lanes containing a `i16` each.",null,null],[17,"I32X8","","A SIMD vector with 8 lanes containing a `i32` each.",null,null],[17,"I64X4","","A SIMD vector with 4 lanes containing a `i64` each.",null,null],[17,"I128X2","","A SIMD vector with 2 lanes containing a `i128` each.",null,null],[17,"F32X8","","A SIMD vector with 8 lanes containing a `f32` each.",null,null],[17,"F64X4","","A SIMD vector with 4 lanes containing a `f64` each.",null,null],[17,"B8X64","","A SIMD vector with 64 lanes containing a `b8` each.",null,null],[17,"B16X32","","A SIMD vector with 32 lanes containing a `b16` each.",null,null],[17,"B32X16","","A SIMD vector with 16 lanes containing a `b32` each.",null,null],[17,"B64X8","","A SIMD vector with 8 lanes containing a `b64` each.",null,null],[17,"B128X4","","A SIMD vector with 4 lanes containing a `b128` each.",null,null],[17,"I8X64","","A SIMD vector with 64 lanes containing a `i8` each.",null,null],[17,"I16X32","","A SIMD vector with 32 lanes containing a `i16` each.",null,null],[17,"I32X16","","A SIMD vector with 16 lanes containing a `i32` each.",null,null],[17,"I64X8","","A SIMD vector with 8 lanes containing a `i64` each.",null,null],[17,"I128X4","","A SIMD vector with 4 lanes containing a `i128` each.",null,null],[17,"F32X16","","A SIMD vector with 16 lanes containing a `f32` each.",null,null],[17,"F64X8","","A SIMD vector with 8 lanes containing a `f64` each.",null,null],[3,"AbiParam","wasmtime_environ::ir","Function parameter or return value descriptor.",null,null],[12,"value_type","","Type of the argument value.",31,null],[12,"purpose","","Special purpose of argument, or `Normal`.",31,null],[12,"extension","","Method for extending argument to a full register.",31,null],[12,"location","","ABI-specific location of this argument, or `Unassigned`…",31,null],[4,"ArgumentPurpose","","The special purpose of a function argument.",null,null],[13,"Normal","","A normal user program value passed to or from a function.",32,null],[13,"StructReturn","","Struct return pointer.",32,null],[13,"Link","","The link register.",32,null],[13,"FramePointer","","The frame pointer.",32,null],[13,"CalleeSaved","","A callee-saved register.",32,null],[13,"VMContext","","A VM context pointer.",32,null],[13,"SignatureId","","A signature identifier.",32,null],[13,"StackLimit","","A stack limit pointer.",32,null],[3,"Signature","","Function signature.",null,null],[12,"params","","The arguments passed to the function.",33,null],[12,"returns","","Values returned from the function.",33,null],[12,"call_conv","","Calling convention.",33,null],[3,"SourceLoc","","A source location.",null,null],[3,"StackSlots","","Stack frame manager.",null,null],[12,"layout_info","","Layout information computed from `layout_stack`.",34,null],[4,"TrapCode","","A trap code describing the reason for a trap.",null,null],[13,"StackOverflow","","The current stack space was exhausted.",35,null],[13,"HeapOutOfBounds","","A `heap_addr` instruction detected an out-of-bounds error.",35,null],[13,"TableOutOfBounds","","A `table_addr` instruction detected an out-of-bounds error.",35,null],[13,"OutOfBounds","","Other bounds checking error.",35,null],[13,"IndirectCallToNull","","Indirect call to a null table entry.",35,null],[13,"BadSignature","","Signature mismatch on indirect call.",35,null],[13,"IntegerOverflow","","An integer arithmetic operation caused an overflow.",35,null],[13,"IntegerDivisionByZero","","An integer division by zero.",35,null],[13,"BadConversionToInteger","","Failed float-to-int conversion.",35,null],[13,"UnreachableCodeReached","","Code that was supposed to have been unreachable was reached.",35,null],[13,"Interrupt","","Execution has potentially run too long and may be…",35,null],[13,"User","","A user-defined trap code.",35,null],[3,"Type","","The type of an SSA value.",null,null],[3,"ValueLabel","","Marked with a label value.",null,null],[4,"ValueLoc","","Value location.",null,null],[13,"Unassigned","","This value has not been assigned to a location yet.",36,null],[13,"Reg","","Value is assigned to a register.",36,null],[13,"Stack","","Value is assigned to a stack slot.",36,null],[6,"ValueLabelsRanges","","Resulting map of Value labels and their ranges/locations.",null,null],[0,"settings","wasmtime_environ","",null,null],[5,"builder","wasmtime_environ::settings","Create a `settings::Builder` for the shared settings group.",null,[[],["builder"]]],[3,"Builder","","Collect settings values based on a template.",null,null],[8,"Configurable","","A string-based configurator for settings groups.",null,null],[10,"set","","Set the string value of any setting by name.",37,[[["str"],["self"]],[["result",["seterror"]],["seterror"]]]],[10,"enable","","Enable a boolean setting or apply a preset.",37,[[["str"],["self"]],[["result",["seterror"]],["seterror"]]]],[3,"Flags","","Flags group `shared`.",null,null],[0,"isa","wasmtime_environ","",null,null],[4,"CallConv","wasmtime_environ::isa","Calling convention identifiers.",null,null],[13,"Fast","","Best performance, not ABI-stable",38,null],[13,"Cold","","Smallest caller code size, not ABI-stable",38,null],[13,"SystemV","","System V-style convention used on many platforms",38,null],[13,"WindowsFastcall","","Windows \"fastcall\" convention, also used for x64 and ARM",38,null],[13,"BaldrdashSystemV","","SpiderMonkey WebAssembly convention on systems using…",38,null],[13,"BaldrdashWindows","","SpiderMonkey WebAssembly convention on Windows",38,null],[13,"Probestack","","Specialized convention for the probestack function",38,null],[6,"RegUnit","","Register units are the smallest units of register…",null,null],[3,"TargetFrontendConfig","","This struct provides information that a frontend may need…",null,null],[12,"default_call_conv","","The default calling convention of the target.",39,null],[12,"pointer_width","","The pointer width of the target.",39,null],[8,"TargetIsa","","Methods that are specialized to a target ISA. Implies a…",null,null],[10,"name","","Get the name of this ISA.",40,[[["self"]],["str"]]],[10,"triple","","Get the target triple that was used to make this trait…",40,[[["self"]],["triple"]]],[10,"flags","","Get the ISA-independent flags that were used to make this…",40,[[["self"]],["flags"]]],[11,"default_call_conv","","Get the default calling convention of this target.",40,[[["self"]],["callconv"]]],[11,"pointer_type","","Get the pointer type of this ISA.",40,[[["self"]],["type"]]],[11,"pointer_width","","Get the width of pointers on this ISA.",40,[[["self"]],["pointerwidth"]]],[11,"pointer_bits","","Get the width of pointers on this ISA, in units of bits.",40,[[["self"]],["u8"]]],[11,"pointer_bytes","","Get the width of pointers on this ISA, in units of bytes.",40,[[["self"]],["u8"]]],[11,"frontend_config","","Get the information needed by frontends producing…",40,[[["self"]],["targetfrontendconfig"]]],[11,"uses_cpu_flags","","Does the CPU implement scalar comparisons using a CPU…",40,[[["self"]],["bool"]]],[11,"uses_complex_addresses","","Does the CPU implement multi-register addressing?",40,[[["self"]],["bool"]]],[10,"register_info","","Get a data structure describing the registers in this ISA.",40,[[["self"]],["reginfo"]]],[10,"legal_encodings","","Returns an iterator over legal encodings for the…",40,[[["instructiondata"],["type"],["self"],["function"]],["encodings"]]],[11,"encode","","Encode an instruction after determining it is legal.",40,[[["function"],["type"],["instructiondata"],["self"]],[["result",["encoding"]],["encoding"]]]],[10,"encoding_info","","Get a data structure describing the instruction encodings…",40,[[["self"]],["encinfo"]]],[10,"legalize_signature","","Legalize a function signature.",40,[[["cow"],["self"],["bool"]]]],[10,"regclass_for_abi_type","","Get the register class that should be used to represent an…",40,[[["self"],["type"]],["regclassdata"]]],[10,"allocatable_registers","","Get the set of allocatable registers that can be used when…",40,[[["function"],["self"]],["registerset"]]],[11,"prologue_epilogue","","Compute the stack layout and insert prologue and epilogue…",40,[[["function"],["self"]],[["codegenerror"],["result",["codegenerror"]]]]],[10,"emit_function_to_memory","","Emit a whole function into memory.",40,[[["function"],["memorycodesink"],["self"]]]],[10,"unsigned_add_overflow_condition","","IntCC condition for Unsigned Addition Overflow (Carry).",40,[[["self"]],["intcc"]]],[10,"unsigned_sub_overflow_condition","","IntCC condition for Unsigned Subtraction Overflow…",40,[[["self"]],["intcc"]]],[11,"emit_unwind_info","","Emit unwind information for the given function.",40,[[["function"],["frameunwindsink"],["frameunwindkind"],["self"]]]],[0,"entity","wasmtime_environ","",null,null],[3,"BoxedSlice","wasmtime_environ::entity","A slice mapping `K -> V` allocating dense entity references.",null,null],[8,"EntityRef","","A type wrapping a small integer index should implement…",null,null],[10,"new","","Create a new entity reference from a small integer. This…",41,[[["usize"]],["self"]]],[10,"index","","Get the index that was used to create this entity reference.",41,[[],["usize"]]],[3,"PrimaryMap","","A primary mapping `K -> V` allocating dense entity…",null,null],[0,"wasm","wasmtime_environ","",null,null],[5,"get_vmctx_value_label","wasmtime_environ::wasm","Special VMContext value label. It is tracked as…",null,[[],["valuelabel"]]],[3,"DefinedFuncIndex","","Index type of a defined function inside the WebAssembly…",null,null],[3,"DefinedGlobalIndex","","Index type of a defined global inside the WebAssembly…",null,null],[3,"DefinedMemoryIndex","","Index type of a defined memory inside the WebAssembly…",null,null],[3,"DefinedTableIndex","","Index type of a defined table inside the WebAssembly module.",null,null],[3,"FuncIndex","","Index type of a function (imported or defined) inside the…",null,null],[3,"Global","","WebAssembly global.",null,null],[12,"ty","","The type of the value stored in the global.",42,null],[12,"mutability","","A flag indicating whether the value may change at runtime.",42,null],[12,"initializer","","The source of the initial value.",42,null],[3,"GlobalIndex","","Index type of a global variable (imported or defined)…",null,null],[4,"GlobalInit","","Globals are initialized via the `const` operators or by…",null,null],[13,"I32Const","","An `i32.const`.",43,null],[13,"I64Const","","An `i64.const`.",43,null],[13,"F32Const","","An `f32.const`.",43,null],[13,"F64Const","","An `f64.const`.",43,null],[13,"V128Const","","A `vconst`.",43,null],[13,"GetGlobal","","A `global.get` of another global.",43,null],[13,"RefNullConst","","A `ref.null`.",43,null],[13,"RefFunc","","A `ref.func `.",43,null],[13,"Import","","< The global is imported from, and thus initialized by, a…",43,null],[3,"Memory","","WebAssembly linear memory.",null,null],[12,"minimum","","The minimum number of pages in the memory.",44,null],[12,"maximum","","The maximum number of pages in the memory.",44,null],[12,"shared","","Whether the memory may be shared between multiple threads.",44,null],[3,"MemoryIndex","","Index type of a linear memory (imported or defined) inside…",null,null],[3,"SignatureIndex","","Index type of a signature (imported or defined) inside the…",null,null],[3,"Table","","WebAssembly table.",null,null],[12,"ty","","The type of data stored in elements of the table.",45,null],[12,"minimum","","The minimum number of elements in the table.",45,null],[12,"maximum","","The maximum number of elements in the table.",45,null],[4,"TableElementType","","WebAssembly table element. Can be a function or a scalar…",null,null],[13,"Val","","A scalar type.",46,null],[13,"Func","","A function.",46,null],[3,"TableIndex","","Index type of a table (imported or defined) inside the…",null,null],[6,"ModuleAddressMap","wasmtime_environ","Module functions addresses mappings.",null,null],[6,"ValueLabelsRanges","","Value ranges for functions.",null,null],[6,"Relocations","","Relocations to apply to function bodies.",null,null],[6,"Traps","","Information about traps associated with the functions…",null,null],[17,"WASM_PAGE_SIZE","","WebAssembly page sizes are defined to be 64KiB.",null,null],[17,"WASM_MAX_PAGES","","The number of pages we can have before we run out of byte…",null,null],[17,"VERSION","","Version number of this crate.",null,null],[8,"Compiler","","An implementation of a compiler from parsed WebAssembly…",null,null],[10,"compile_module","","Compile a parsed module with the given `TargetIsa`.",47,[[["cacheconfig"],["module"],["functionbodydata"],["bool"],["primarymap",["definedfuncindex","functionbodydata"]],["moduletranslationstate"],["targetisa"],["definedfuncindex"]],[["compileerror"],["result",["compileerror"]]]]],[11,"from","","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"to_owned","","",0,[[["self"]],["t"]]],[11,"clone_into","","",0,[[["self"],["t"]]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]],[11,"equivalent","","",0,[[["k"],["self"]],["bool"]]],[11,"from","","",1,[[["t"]],["t"]]],[11,"into","","",1,[[],["u"]]],[11,"to_owned","","",1,[[["self"]],["t"]]],[11,"clone_into","","",1,[[["self"],["t"]]]],[11,"try_from","","",1,[[["u"]],["result"]]],[11,"try_into","","",1,[[],["result"]]],[11,"borrow","","",1,[[["self"]],["t"]]],[11,"borrow_mut","","",1,[[["self"]],["t"]]],[11,"type_id","","",1,[[["self"]],["typeid"]]],[11,"equivalent","","",1,[[["k"],["self"]],["bool"]]],[11,"from","","",2,[[["t"]],["t"]]],[11,"into","","",2,[[],["u"]]],[11,"to_owned","","",2,[[["self"]],["t"]]],[11,"clone_into","","",2,[[["self"],["t"]]]],[11,"try_from","","",2,[[["u"]],["result"]]],[11,"try_into","","",2,[[],["result"]]],[11,"borrow","","",2,[[["self"]],["t"]]],[11,"borrow_mut","","",2,[[["self"]],["t"]]],[11,"type_id","","",2,[[["self"]],["typeid"]]],[11,"from","","",29,[[["t"]],["t"]]],[11,"into","","",29,[[],["u"]]],[11,"to_owned","","",29,[[["self"]],["t"]]],[11,"clone_into","","",29,[[["self"],["t"]]]],[11,"try_from","","",29,[[["u"]],["result"]]],[11,"try_into","","",29,[[],["result"]]],[11,"borrow","","",29,[[["self"]],["t"]]],[11,"borrow_mut","","",29,[[["self"]],["t"]]],[11,"type_id","","",29,[[["self"]],["typeid"]]],[11,"from","","",25,[[["t"]],["t"]]],[11,"into","","",25,[[],["u"]]],[11,"try_from","","",25,[[["u"]],["result"]]],[11,"try_into","","",25,[[],["result"]]],[11,"borrow","","",25,[[["self"]],["t"]]],[11,"borrow_mut","","",25,[[["self"]],["t"]]],[11,"type_id","","",25,[[["self"]],["typeid"]]],[11,"equivalent","","",25,[[["k"],["self"]],["bool"]]],[11,"from","","",3,[[["t"]],["t"]]],[11,"into","","",3,[[],["u"]]],[11,"to_owned","","",3,[[["self"]],["t"]]],[11,"clone_into","","",3,[[["self"],["t"]]]],[11,"try_from","","",3,[[["u"]],["result"]]],[11,"try_into","","",3,[[],["result"]]],[11,"borrow","","",3,[[["self"]],["t"]]],[11,"borrow_mut","","",3,[[["self"]],["t"]]],[11,"type_id","","",3,[[["self"]],["typeid"]]],[11,"equivalent","","",3,[[["k"],["self"]],["bool"]]],[11,"from","","",4,[[["t"]],["t"]]],[11,"into","","",4,[[],["u"]]],[11,"to_owned","","",4,[[["self"]],["t"]]],[11,"clone_into","","",4,[[["self"],["t"]]]],[11,"try_from","","",4,[[["u"]],["result"]]],[11,"try_into","","",4,[[],["result"]]],[11,"borrow","","",4,[[["self"]],["t"]]],[11,"borrow_mut","","",4,[[["self"]],["t"]]],[11,"type_id","","",4,[[["self"]],["typeid"]]],[11,"equivalent","","",4,[[["k"],["self"]],["bool"]]],[11,"from","","",5,[[["t"]],["t"]]],[11,"into","","",5,[[],["u"]]],[11,"to_owned","","",5,[[["self"]],["t"]]],[11,"clone_into","","",5,[[["self"],["t"]]]],[11,"try_from","","",5,[[["u"]],["result"]]],[11,"try_into","","",5,[[],["result"]]],[11,"borrow","","",5,[[["self"]],["t"]]],[11,"borrow_mut","","",5,[[["self"]],["t"]]],[11,"type_id","","",5,[[["self"]],["typeid"]]],[11,"equivalent","","",5,[[["k"],["self"]],["bool"]]],[11,"from","","",6,[[["t"]],["t"]]],[11,"into","","",6,[[],["u"]]],[11,"try_from","","",6,[[["u"]],["result"]]],[11,"try_into","","",6,[[],["result"]]],[11,"borrow","","",6,[[["self"]],["t"]]],[11,"borrow_mut","","",6,[[["self"]],["t"]]],[11,"type_id","","",6,[[["self"]],["typeid"]]],[11,"equivalent","","",6,[[["k"],["self"]],["bool"]]],[11,"from","","",26,[[["t"]],["t"]]],[11,"into","","",26,[[],["u"]]],[11,"try_from","","",26,[[["u"]],["result"]]],[11,"try_into","","",26,[[],["result"]]],[11,"borrow","","",26,[[["self"]],["t"]]],[11,"borrow_mut","","",26,[[["self"]],["t"]]],[11,"type_id","","",26,[[["self"]],["typeid"]]],[11,"from","","",7,[[["t"]],["t"]]],[11,"into","","",7,[[],["u"]]],[11,"to_owned","","",7,[[["self"]],["t"]]],[11,"clone_into","","",7,[[["self"],["t"]]]],[11,"try_from","","",7,[[["u"]],["result"]]],[11,"try_into","","",7,[[],["result"]]],[11,"borrow","","",7,[[["self"]],["t"]]],[11,"borrow_mut","","",7,[[["self"]],["t"]]],[11,"type_id","","",7,[[["self"]],["typeid"]]],[11,"from","","",8,[[["t"]],["t"]]],[11,"into","","",8,[[],["u"]]],[11,"try_from","","",8,[[["u"]],["result"]]],[11,"try_into","","",8,[[],["result"]]],[11,"borrow","","",8,[[["self"]],["t"]]],[11,"borrow_mut","","",8,[[["self"]],["t"]]],[11,"type_id","","",8,[[["self"]],["typeid"]]],[11,"from","","",9,[[["t"]],["t"]]],[11,"into","","",9,[[],["u"]]],[11,"to_owned","","",9,[[["self"]],["t"]]],[11,"clone_into","","",9,[[["self"],["t"]]]],[11,"try_from","","",9,[[["u"]],["result"]]],[11,"try_into","","",9,[[],["result"]]],[11,"borrow","","",9,[[["self"]],["t"]]],[11,"borrow_mut","","",9,[[["self"]],["t"]]],[11,"type_id","","",9,[[["self"]],["typeid"]]],[11,"from","","",10,[[["t"]],["t"]]],[11,"into","","",10,[[],["u"]]],[11,"to_owned","","",10,[[["self"]],["t"]]],[11,"clone_into","","",10,[[["self"],["t"]]]],[11,"try_from","","",10,[[["u"]],["result"]]],[11,"try_into","","",10,[[],["result"]]],[11,"borrow","","",10,[[["self"]],["t"]]],[11,"borrow_mut","","",10,[[["self"]],["t"]]],[11,"type_id","","",10,[[["self"]],["typeid"]]],[11,"from","","",11,[[["t"]],["t"]]],[11,"into","","",11,[[],["u"]]],[11,"try_from","","",11,[[["u"]],["result"]]],[11,"try_into","","",11,[[],["result"]]],[11,"borrow","","",11,[[["self"]],["t"]]],[11,"borrow_mut","","",11,[[["self"]],["t"]]],[11,"type_id","","",11,[[["self"]],["typeid"]]],[11,"from","","",12,[[["t"]],["t"]]],[11,"into","","",12,[[],["u"]]],[11,"to_owned","","",12,[[["self"]],["t"]]],[11,"clone_into","","",12,[[["self"],["t"]]]],[11,"try_from","","",12,[[["u"]],["result"]]],[11,"try_into","","",12,[[],["result"]]],[11,"borrow","","",12,[[["self"]],["t"]]],[11,"borrow_mut","","",12,[[["self"]],["t"]]],[11,"type_id","","",12,[[["self"]],["typeid"]]],[11,"from","","",13,[[["t"]],["t"]]],[11,"into","","",13,[[],["u"]]],[11,"try_from","","",13,[[["u"]],["result"]]],[11,"try_into","","",13,[[],["result"]]],[11,"borrow","","",13,[[["self"]],["t"]]],[11,"borrow_mut","","",13,[[["self"]],["t"]]],[11,"type_id","","",13,[[["self"]],["typeid"]]],[11,"from","","",27,[[["t"]],["t"]]],[11,"into","","",27,[[],["u"]]],[11,"try_from","","",27,[[["u"]],["result"]]],[11,"try_into","","",27,[[],["result"]]],[11,"borrow","","",27,[[["self"]],["t"]]],[11,"borrow_mut","","",27,[[["self"]],["t"]]],[11,"type_id","","",27,[[["self"]],["typeid"]]],[11,"from","","",14,[[["t"]],["t"]]],[11,"into","","",14,[[],["u"]]],[11,"try_from","","",14,[[["u"]],["result"]]],[11,"try_into","","",14,[[],["result"]]],[11,"borrow","","",14,[[["self"]],["t"]]],[11,"borrow_mut","","",14,[[["self"]],["t"]]],[11,"type_id","","",14,[[["self"]],["typeid"]]],[11,"from","","",15,[[["t"]],["t"]]],[11,"into","","",15,[[],["u"]]],[11,"to_owned","","",15,[[["self"]],["t"]]],[11,"clone_into","","",15,[[["self"],["t"]]]],[11,"try_from","","",15,[[["u"]],["result"]]],[11,"try_into","","",15,[[],["result"]]],[11,"borrow","","",15,[[["self"]],["t"]]],[11,"borrow_mut","","",15,[[["self"]],["t"]]],[11,"type_id","","",15,[[["self"]],["typeid"]]],[11,"from","","",28,[[["t"]],["t"]]],[11,"into","","",28,[[],["u"]]],[11,"to_owned","","",28,[[["self"]],["t"]]],[11,"clone_into","","",28,[[["self"],["t"]]]],[11,"try_from","","",28,[[["u"]],["result"]]],[11,"try_into","","",28,[[],["result"]]],[11,"borrow","","",28,[[["self"]],["t"]]],[11,"borrow_mut","","",28,[[["self"]],["t"]]],[11,"type_id","","",28,[[["self"]],["typeid"]]],[11,"from","","",16,[[["t"]],["t"]]],[11,"into","","",16,[[],["u"]]],[11,"try_from","","",16,[[["u"]],["result"]]],[11,"try_into","","",16,[[],["result"]]],[11,"borrow","","",16,[[["self"]],["t"]]],[11,"borrow_mut","","",16,[[["self"]],["t"]]],[11,"type_id","","",16,[[["self"]],["typeid"]]],[11,"from","","",17,[[["t"]],["t"]]],[11,"into","","",17,[[],["u"]]],[11,"to_owned","","",17,[[["self"]],["t"]]],[11,"clone_into","","",17,[[["self"],["t"]]]],[11,"try_from","","",17,[[["u"]],["result"]]],[11,"try_into","","",17,[[],["result"]]],[11,"borrow","","",17,[[["self"]],["t"]]],[11,"borrow_mut","","",17,[[["self"]],["t"]]],[11,"type_id","","",17,[[["self"]],["typeid"]]],[11,"from","","",18,[[["t"]],["t"]]],[11,"into","","",18,[[],["u"]]],[11,"to_string","","",18,[[["self"]],["string"]]],[11,"try_from","","",18,[[["u"]],["result"]]],[11,"try_into","","",18,[[],["result"]]],[11,"borrow","","",18,[[["self"]],["t"]]],[11,"borrow_mut","","",18,[[["self"]],["t"]]],[11,"type_id","","",18,[[["self"]],["typeid"]]],[11,"from","","",19,[[["t"]],["t"]]],[11,"into","","",19,[[],["u"]]],[11,"to_owned","","",19,[[["self"]],["t"]]],[11,"clone_into","","",19,[[["self"],["t"]]]],[11,"try_from","","",19,[[["u"]],["result"]]],[11,"try_into","","",19,[[],["result"]]],[11,"borrow","","",19,[[["self"]],["t"]]],[11,"borrow_mut","","",19,[[["self"]],["t"]]],[11,"type_id","","",19,[[["self"]],["typeid"]]],[11,"equivalent","","",19,[[["k"],["self"]],["bool"]]],[11,"from","","",20,[[["t"]],["t"]]],[11,"into","","",20,[[],["u"]]],[11,"to_owned","","",20,[[["self"]],["t"]]],[11,"clone_into","","",20,[[["self"],["t"]]]],[11,"try_from","","",20,[[["u"]],["result"]]],[11,"try_into","","",20,[[],["result"]]],[11,"borrow","","",20,[[["self"]],["t"]]],[11,"borrow_mut","","",20,[[["self"]],["t"]]],[11,"type_id","","",20,[[["self"]],["typeid"]]],[11,"equivalent","","",20,[[["k"],["self"]],["bool"]]],[11,"from","","",21,[[["t"]],["t"]]],[11,"into","","",21,[[],["u"]]],[11,"to_owned","","",21,[[["self"]],["t"]]],[11,"clone_into","","",21,[[["self"],["t"]]]],[11,"try_from","","",21,[[["u"]],["result"]]],[11,"try_into","","",21,[[],["result"]]],[11,"borrow","","",21,[[["self"]],["t"]]],[11,"borrow_mut","","",21,[[["self"]],["t"]]],[11,"type_id","","",21,[[["self"]],["typeid"]]],[11,"equivalent","","",21,[[["k"],["self"]],["bool"]]],[11,"from","","",22,[[["t"]],["t"]]],[11,"into","","",22,[[],["u"]]],[11,"to_owned","","",22,[[["self"]],["t"]]],[11,"clone_into","","",22,[[["self"],["t"]]]],[11,"try_from","","",22,[[["u"]],["result"]]],[11,"try_into","","",22,[[],["result"]]],[11,"borrow","","",22,[[["self"]],["t"]]],[11,"borrow_mut","","",22,[[["self"]],["t"]]],[11,"type_id","","",22,[[["self"]],["typeid"]]],[11,"from","","",24,[[["t"]],["t"]]],[11,"into","","",24,[[],["u"]]],[11,"to_owned","","",24,[[["self"]],["t"]]],[11,"clone_into","","",24,[[["self"],["t"]]]],[11,"try_from","","",24,[[["u"]],["result"]]],[11,"try_into","","",24,[[],["result"]]],[11,"borrow","","",24,[[["self"]],["t"]]],[11,"borrow_mut","","",24,[[["self"]],["t"]]],[11,"type_id","","",24,[[["self"]],["typeid"]]],[11,"from","wasmtime_environ::ir","",48,[[["t"]],["t"]]],[11,"into","","",48,[[],["u"]]],[11,"to_owned","","",48,[[["self"]],["t"]]],[11,"clone_into","","",48,[[["self"],["t"]]]],[11,"to_string","","",48,[[["self"]],["string"]]],[11,"try_from","","",48,[[["u"]],["result"]]],[11,"try_into","","",48,[[],["result"]]],[11,"borrow","","",48,[[["self"]],["t"]]],[11,"borrow_mut","","",48,[[["self"]],["t"]]],[11,"type_id","","",48,[[["self"]],["typeid"]]],[11,"equivalent","","",48,[[["k"],["self"]],["bool"]]],[11,"from","","",31,[[["t"]],["t"]]],[11,"into","","",31,[[],["u"]]],[11,"to_owned","","",31,[[["self"]],["t"]]],[11,"clone_into","","",31,[[["self"],["t"]]]],[11,"to_string","","",31,[[["self"]],["string"]]],[11,"try_from","","",31,[[["u"]],["result"]]],[11,"try_into","","",31,[[],["result"]]],[11,"borrow","","",31,[[["self"]],["t"]]],[11,"borrow_mut","","",31,[[["self"]],["t"]]],[11,"type_id","","",31,[[["self"]],["typeid"]]],[11,"equivalent","","",31,[[["k"],["self"]],["bool"]]],[11,"from","","",32,[[["t"]],["t"]]],[11,"into","","",32,[[],["u"]]],[11,"to_owned","","",32,[[["self"]],["t"]]],[11,"clone_into","","",32,[[["self"],["t"]]]],[11,"to_string","","",32,[[["self"]],["string"]]],[11,"try_from","","",32,[[["u"]],["result"]]],[11,"try_into","","",32,[[],["result"]]],[11,"borrow","","",32,[[["self"]],["t"]]],[11,"borrow_mut","","",32,[[["self"]],["t"]]],[11,"type_id","","",32,[[["self"]],["typeid"]]],[11,"equivalent","","",32,[[["k"],["self"]],["bool"]]],[11,"from","","",33,[[["t"]],["t"]]],[11,"into","","",33,[[],["u"]]],[11,"to_owned","","",33,[[["self"]],["t"]]],[11,"clone_into","","",33,[[["self"],["t"]]]],[11,"to_string","","",33,[[["self"]],["string"]]],[11,"try_from","","",33,[[["u"]],["result"]]],[11,"try_into","","",33,[[],["result"]]],[11,"borrow","","",33,[[["self"]],["t"]]],[11,"borrow_mut","","",33,[[["self"]],["t"]]],[11,"type_id","","",33,[[["self"]],["typeid"]]],[11,"equivalent","","",33,[[["k"],["self"]],["bool"]]],[11,"from","","",49,[[["t"]],["t"]]],[11,"into","","",49,[[],["u"]]],[11,"to_owned","","",49,[[["self"]],["t"]]],[11,"clone_into","","",49,[[["self"],["t"]]]],[11,"to_string","","",49,[[["self"]],["string"]]],[11,"try_from","","",49,[[["u"]],["result"]]],[11,"try_into","","",49,[[],["result"]]],[11,"borrow","","",49,[[["self"]],["t"]]],[11,"borrow_mut","","",49,[[["self"]],["t"]]],[11,"type_id","","",49,[[["self"]],["typeid"]]],[11,"equivalent","","",49,[[["k"],["self"]],["bool"]]],[11,"from","","",34,[[["t"]],["t"]]],[11,"into","","",34,[[],["u"]]],[11,"to_owned","","",34,[[["self"]],["t"]]],[11,"clone_into","","",34,[[["self"],["t"]]]],[11,"try_from","","",34,[[["u"]],["result"]]],[11,"try_into","","",34,[[],["result"]]],[11,"borrow","","",34,[[["self"]],["t"]]],[11,"borrow_mut","","",34,[[["self"]],["t"]]],[11,"type_id","","",34,[[["self"]],["typeid"]]],[11,"equivalent","","",34,[[["k"],["self"]],["bool"]]],[11,"from","","",35,[[["t"]],["t"]]],[11,"into","","",35,[[],["u"]]],[11,"to_owned","","",35,[[["self"]],["t"]]],[11,"clone_into","","",35,[[["self"],["t"]]]],[11,"to_string","","",35,[[["self"]],["string"]]],[11,"try_from","","",35,[[["u"]],["result"]]],[11,"try_into","","",35,[[],["result"]]],[11,"borrow","","",35,[[["self"]],["t"]]],[11,"borrow_mut","","",35,[[["self"]],["t"]]],[11,"type_id","","",35,[[["self"]],["typeid"]]],[11,"equivalent","","",35,[[["k"],["self"]],["bool"]]],[11,"from","","",50,[[["t"]],["t"]]],[11,"into","","",50,[[],["u"]]],[11,"to_owned","","",50,[[["self"]],["t"]]],[11,"clone_into","","",50,[[["self"],["t"]]]],[11,"to_string","","",50,[[["self"]],["string"]]],[11,"try_from","","",50,[[["u"]],["result"]]],[11,"try_into","","",50,[[],["result"]]],[11,"borrow","","",50,[[["self"]],["t"]]],[11,"borrow_mut","","",50,[[["self"]],["t"]]],[11,"type_id","","",50,[[["self"]],["typeid"]]],[11,"key","","",50,[[["self"]],["t"]]],[11,"equivalent","","",50,[[["k"],["self"]],["bool"]]],[11,"from","","",36,[[["t"]],["t"]]],[11,"into","","",36,[[],["u"]]],[11,"to_owned","","",36,[[["self"]],["t"]]],[11,"clone_into","","",36,[[["self"],["t"]]]],[11,"try_from","","",36,[[["u"]],["result"]]],[11,"try_into","","",36,[[],["result"]]],[11,"borrow","","",36,[[["self"]],["t"]]],[11,"borrow_mut","","",36,[[["self"]],["t"]]],[11,"type_id","","",36,[[["self"]],["typeid"]]],[11,"equivalent","","",36,[[["k"],["self"]],["bool"]]],[11,"from","wasmtime_environ::settings","",51,[[["t"]],["t"]]],[11,"into","","",51,[[],["u"]]],[11,"to_owned","","",51,[[["self"]],["t"]]],[11,"clone_into","","",51,[[["self"],["t"]]]],[11,"try_from","","",51,[[["u"]],["result"]]],[11,"try_into","","",51,[[],["result"]]],[11,"borrow","","",51,[[["self"]],["t"]]],[11,"borrow_mut","","",51,[[["self"]],["t"]]],[11,"type_id","","",51,[[["self"]],["typeid"]]],[11,"from","","",52,[[["t"]],["t"]]],[11,"into","","",52,[[],["u"]]],[11,"to_owned","","",52,[[["self"]],["t"]]],[11,"clone_into","","",52,[[["self"],["t"]]]],[11,"to_string","","",52,[[["self"]],["string"]]],[11,"try_from","","",52,[[["u"]],["result"]]],[11,"try_into","","",52,[[],["result"]]],[11,"borrow","","",52,[[["self"]],["t"]]],[11,"borrow_mut","","",52,[[["self"]],["t"]]],[11,"type_id","","",52,[[["self"]],["typeid"]]],[11,"from","wasmtime_environ::isa","",38,[[["t"]],["t"]]],[11,"into","","",38,[[],["u"]]],[11,"to_owned","","",38,[[["self"]],["t"]]],[11,"clone_into","","",38,[[["self"],["t"]]]],[11,"to_string","","",38,[[["self"]],["string"]]],[11,"try_from","","",38,[[["u"]],["result"]]],[11,"try_into","","",38,[[],["result"]]],[11,"borrow","","",38,[[["self"]],["t"]]],[11,"borrow_mut","","",38,[[["self"]],["t"]]],[11,"type_id","","",38,[[["self"]],["typeid"]]],[11,"equivalent","","",38,[[["k"],["self"]],["bool"]]],[11,"from","","",39,[[["t"]],["t"]]],[11,"into","","",39,[[],["u"]]],[11,"to_owned","","",39,[[["self"]],["t"]]],[11,"clone_into","","",39,[[["self"],["t"]]]],[11,"try_from","","",39,[[["u"]],["result"]]],[11,"try_into","","",39,[[],["result"]]],[11,"borrow","","",39,[[["self"]],["t"]]],[11,"borrow_mut","","",39,[[["self"]],["t"]]],[11,"type_id","","",39,[[["self"]],["typeid"]]],[11,"from","wasmtime_environ::entity","",53,[[["t"]],["t"]]],[11,"into","","",53,[[],["u"]]],[11,"to_owned","","",53,[[["self"]],["t"]]],[11,"clone_into","","",53,[[["self"],["t"]]]],[11,"try_from","","",53,[[["u"]],["result"]]],[11,"try_into","","",53,[[],["result"]]],[11,"borrow","","",53,[[["self"]],["t"]]],[11,"borrow_mut","","",53,[[["self"]],["t"]]],[11,"type_id","","",53,[[["self"]],["typeid"]]],[11,"from","","",54,[[["t"]],["t"]]],[11,"into","","",54,[[],["u"]]],[11,"to_owned","","",54,[[["self"]],["t"]]],[11,"clone_into","","",54,[[["self"],["t"]]]],[11,"try_from","","",54,[[["u"]],["result"]]],[11,"try_into","","",54,[[],["result"]]],[11,"borrow","","",54,[[["self"]],["t"]]],[11,"borrow_mut","","",54,[[["self"]],["t"]]],[11,"type_id","","",54,[[["self"]],["typeid"]]],[11,"equivalent","","",54,[[["k"],["self"]],["bool"]]],[11,"from","wasmtime_environ::wasm","",55,[[["t"]],["t"]]],[11,"into","","",55,[[],["u"]]],[11,"to_owned","","",55,[[["self"]],["t"]]],[11,"clone_into","","",55,[[["self"],["t"]]]],[11,"try_from","","",55,[[["u"]],["result"]]],[11,"try_into","","",55,[[],["result"]]],[11,"borrow","","",55,[[["self"]],["t"]]],[11,"borrow_mut","","",55,[[["self"]],["t"]]],[11,"type_id","","",55,[[["self"]],["typeid"]]],[11,"key","","",55,[[["self"]],["t"]]],[11,"equivalent","","",55,[[["k"],["self"]],["bool"]]],[11,"from","","",56,[[["t"]],["t"]]],[11,"into","","",56,[[],["u"]]],[11,"to_owned","","",56,[[["self"]],["t"]]],[11,"clone_into","","",56,[[["self"],["t"]]]],[11,"try_from","","",56,[[["u"]],["result"]]],[11,"try_into","","",56,[[],["result"]]],[11,"borrow","","",56,[[["self"]],["t"]]],[11,"borrow_mut","","",56,[[["self"]],["t"]]],[11,"type_id","","",56,[[["self"]],["typeid"]]],[11,"key","","",56,[[["self"]],["t"]]],[11,"equivalent","","",56,[[["k"],["self"]],["bool"]]],[11,"from","","",57,[[["t"]],["t"]]],[11,"into","","",57,[[],["u"]]],[11,"to_owned","","",57,[[["self"]],["t"]]],[11,"clone_into","","",57,[[["self"],["t"]]]],[11,"try_from","","",57,[[["u"]],["result"]]],[11,"try_into","","",57,[[],["result"]]],[11,"borrow","","",57,[[["self"]],["t"]]],[11,"borrow_mut","","",57,[[["self"]],["t"]]],[11,"type_id","","",57,[[["self"]],["typeid"]]],[11,"key","","",57,[[["self"]],["t"]]],[11,"equivalent","","",57,[[["k"],["self"]],["bool"]]],[11,"from","","",58,[[["t"]],["t"]]],[11,"into","","",58,[[],["u"]]],[11,"to_owned","","",58,[[["self"]],["t"]]],[11,"clone_into","","",58,[[["self"],["t"]]]],[11,"try_from","","",58,[[["u"]],["result"]]],[11,"try_into","","",58,[[],["result"]]],[11,"borrow","","",58,[[["self"]],["t"]]],[11,"borrow_mut","","",58,[[["self"]],["t"]]],[11,"type_id","","",58,[[["self"]],["typeid"]]],[11,"key","","",58,[[["self"]],["t"]]],[11,"equivalent","","",58,[[["k"],["self"]],["bool"]]],[11,"from","","",59,[[["t"]],["t"]]],[11,"into","","",59,[[],["u"]]],[11,"to_owned","","",59,[[["self"]],["t"]]],[11,"clone_into","","",59,[[["self"],["t"]]]],[11,"try_from","","",59,[[["u"]],["result"]]],[11,"try_into","","",59,[[],["result"]]],[11,"borrow","","",59,[[["self"]],["t"]]],[11,"borrow_mut","","",59,[[["self"]],["t"]]],[11,"type_id","","",59,[[["self"]],["typeid"]]],[11,"key","","",59,[[["self"]],["t"]]],[11,"equivalent","","",59,[[["k"],["self"]],["bool"]]],[11,"from","","",42,[[["t"]],["t"]]],[11,"into","","",42,[[],["u"]]],[11,"to_owned","","",42,[[["self"]],["t"]]],[11,"clone_into","","",42,[[["self"],["t"]]]],[11,"try_from","","",42,[[["u"]],["result"]]],[11,"try_into","","",42,[[],["result"]]],[11,"borrow","","",42,[[["self"]],["t"]]],[11,"borrow_mut","","",42,[[["self"]],["t"]]],[11,"type_id","","",42,[[["self"]],["typeid"]]],[11,"from","","",60,[[["t"]],["t"]]],[11,"into","","",60,[[],["u"]]],[11,"to_owned","","",60,[[["self"]],["t"]]],[11,"clone_into","","",60,[[["self"],["t"]]]],[11,"try_from","","",60,[[["u"]],["result"]]],[11,"try_into","","",60,[[],["result"]]],[11,"borrow","","",60,[[["self"]],["t"]]],[11,"borrow_mut","","",60,[[["self"]],["t"]]],[11,"type_id","","",60,[[["self"]],["typeid"]]],[11,"key","","",60,[[["self"]],["t"]]],[11,"equivalent","","",60,[[["k"],["self"]],["bool"]]],[11,"from","","",43,[[["t"]],["t"]]],[11,"into","","",43,[[],["u"]]],[11,"to_owned","","",43,[[["self"]],["t"]]],[11,"clone_into","","",43,[[["self"],["t"]]]],[11,"try_from","","",43,[[["u"]],["result"]]],[11,"try_into","","",43,[[],["result"]]],[11,"borrow","","",43,[[["self"]],["t"]]],[11,"borrow_mut","","",43,[[["self"]],["t"]]],[11,"type_id","","",43,[[["self"]],["typeid"]]],[11,"from","","",44,[[["t"]],["t"]]],[11,"into","","",44,[[],["u"]]],[11,"to_owned","","",44,[[["self"]],["t"]]],[11,"clone_into","","",44,[[["self"],["t"]]]],[11,"try_from","","",44,[[["u"]],["result"]]],[11,"try_into","","",44,[[],["result"]]],[11,"borrow","","",44,[[["self"]],["t"]]],[11,"borrow_mut","","",44,[[["self"]],["t"]]],[11,"type_id","","",44,[[["self"]],["typeid"]]],[11,"from","","",61,[[["t"]],["t"]]],[11,"into","","",61,[[],["u"]]],[11,"to_owned","","",61,[[["self"]],["t"]]],[11,"clone_into","","",61,[[["self"],["t"]]]],[11,"try_from","","",61,[[["u"]],["result"]]],[11,"try_into","","",61,[[],["result"]]],[11,"borrow","","",61,[[["self"]],["t"]]],[11,"borrow_mut","","",61,[[["self"]],["t"]]],[11,"type_id","","",61,[[["self"]],["typeid"]]],[11,"key","","",61,[[["self"]],["t"]]],[11,"equivalent","","",61,[[["k"],["self"]],["bool"]]],[11,"from","","",62,[[["t"]],["t"]]],[11,"into","","",62,[[],["u"]]],[11,"to_owned","","",62,[[["self"]],["t"]]],[11,"clone_into","","",62,[[["self"],["t"]]]],[11,"try_from","","",62,[[["u"]],["result"]]],[11,"try_into","","",62,[[],["result"]]],[11,"borrow","","",62,[[["self"]],["t"]]],[11,"borrow_mut","","",62,[[["self"]],["t"]]],[11,"type_id","","",62,[[["self"]],["typeid"]]],[11,"key","","",62,[[["self"]],["t"]]],[11,"equivalent","","",62,[[["k"],["self"]],["bool"]]],[11,"from","","",45,[[["t"]],["t"]]],[11,"into","","",45,[[],["u"]]],[11,"to_owned","","",45,[[["self"]],["t"]]],[11,"clone_into","","",45,[[["self"],["t"]]]],[11,"try_from","","",45,[[["u"]],["result"]]],[11,"try_into","","",45,[[],["result"]]],[11,"borrow","","",45,[[["self"]],["t"]]],[11,"borrow_mut","","",45,[[["self"]],["t"]]],[11,"type_id","","",45,[[["self"]],["typeid"]]],[11,"from","","",46,[[["t"]],["t"]]],[11,"into","","",46,[[],["u"]]],[11,"to_owned","","",46,[[["self"]],["t"]]],[11,"clone_into","","",46,[[["self"],["t"]]]],[11,"try_from","","",46,[[["u"]],["result"]]],[11,"try_into","","",46,[[],["result"]]],[11,"borrow","","",46,[[["self"]],["t"]]],[11,"borrow_mut","","",46,[[["self"]],["t"]]],[11,"type_id","","",46,[[["self"]],["typeid"]]],[11,"from","","",63,[[["t"]],["t"]]],[11,"into","","",63,[[],["u"]]],[11,"to_owned","","",63,[[["self"]],["t"]]],[11,"clone_into","","",63,[[["self"],["t"]]]],[11,"try_from","","",63,[[["u"]],["result"]]],[11,"try_into","","",63,[[],["result"]]],[11,"borrow","","",63,[[["self"]],["t"]]],[11,"borrow_mut","","",63,[[["self"]],["t"]]],[11,"type_id","","",63,[[["self"]],["typeid"]]],[11,"key","","",63,[[["self"]],["t"]]],[11,"equivalent","","",63,[[["k"],["self"]],["bool"]]],[11,"from","wasmtime_environ::cranelift","",30,[[["t"]],["t"]]],[11,"into","","",30,[[],["u"]]],[11,"try_from","","",30,[[["u"]],["result"]]],[11,"try_into","","",30,[[],["result"]]],[11,"borrow","","",30,[[["self"]],["t"]]],[11,"borrow_mut","","",30,[[["self"]],["t"]]],[11,"type_id","","",30,[[["self"]],["typeid"]]],[11,"from","","",64,[[["t"]],["t"]]],[11,"into","","",64,[[],["u"]]],[11,"try_from","","",64,[[["u"]],["result"]]],[11,"try_into","","",64,[[],["result"]]],[11,"borrow","","",64,[[["self"]],["t"]]],[11,"borrow_mut","","",64,[[["self"]],["t"]]],[11,"type_id","","",64,[[["self"]],["typeid"]]],[11,"eq","wasmtime_environ::ir","",35,[[["trapcode"],["self"]],["bool"]]],[11,"ne","","",35,[[["trapcode"],["self"]],["bool"]]],[11,"eq","","",49,[[["sourceloc"],["self"]],["bool"]]],[11,"ne","","",49,[[["sourceloc"],["self"]],["bool"]]],[11,"eq","","",31,[[["abiparam"],["self"]],["bool"]]],[11,"ne","","",31,[[["abiparam"],["self"]],["bool"]]],[11,"eq","","",32,[[["self"],["argumentpurpose"]],["bool"]]],[11,"eq","","",34,[[["stackslots"],["self"]],["bool"]]],[11,"ne","","",34,[[["stackslots"],["self"]],["bool"]]],[11,"eq","","",48,[[["type"],["self"]],["bool"]]],[11,"ne","","",48,[[["type"],["self"]],["bool"]]],[11,"eq","wasmtime_environ::isa","",38,[[["self"],["callconv"]],["bool"]]],[11,"eq","wasmtime_environ::ir","",50,[[["self"],["valuelabel"]],["bool"]]],[11,"ne","","",50,[[["self"],["valuelabel"]],["bool"]]],[11,"eq","","",33,[[["self"],["signature"]],["bool"]]],[11,"ne","","",33,[[["self"],["signature"]],["bool"]]],[11,"eq","","",36,[[["self"],["valueloc"]],["bool"]]],[11,"ne","","",36,[[["self"],["valueloc"]],["bool"]]],[11,"from_str","wasmtime_environ::isa","",38,[[["str"]],[["callconv"],["result",["callconv"]]]]],[11,"from_str","wasmtime_environ::ir","",35,[[["str"]],[["result",["trapcode"]],["trapcode"]]]],[11,"from_str","","",32,[[["str"]],[["argumentpurpose"],["result",["argumentpurpose"]]]]],[11,"enable","wasmtime_environ::settings","",51,[[["str"],["self"]],[["result",["seterror"]],["seterror"]]]],[11,"set","","",51,[[["str"],["self"]],[["result",["seterror"]],["seterror"]]]],[11,"default","wasmtime_environ::ir","",36,[[],["valueloc"]]],[11,"default","","",49,[[],["sourceloc"]]],[11,"default","","",48,[[],["type"]]],[11,"clone","wasmtime_environ::settings","",52,[[["self"]],["flags"]]],[11,"clone","","",51,[[["self"]],["builder"]]],[11,"clone","wasmtime_environ::ir","",48,[[["self"]],["type"]]],[11,"clone","","",49,[[["self"]],["sourceloc"]]],[11,"clone","wasmtime_environ::isa","",39,[[["self"]],["targetfrontendconfig"]]],[11,"clone","wasmtime_environ::ir","",32,[[["self"]],["argumentpurpose"]]],[11,"clone","","",36,[[["self"]],["valueloc"]]],[11,"clone","","",33,[[["self"]],["signature"]]],[11,"clone","","",31,[[["self"]],["abiparam"]]],[11,"clone","","",50,[[["self"]],["valuelabel"]]],[11,"clone","wasmtime_environ::isa","",38,[[["self"]],["callconv"]]],[11,"clone","wasmtime_environ::ir","",35,[[["self"]],["trapcode"]]],[11,"clone","","",34,[[["self"]],["stackslots"]]],[11,"new","","",50,[[["usize"]],["valuelabel"]]],[11,"index","","",50,[[],["usize"]]],[11,"deserialize","","",50,[[["__d"]],[["result",["valuelabel"]],["valuelabel"]]]],[11,"deserialize","","",49,[[["__d"]],[["sourceloc"],["result",["sourceloc"]]]]],[11,"deserialize","","",34,[[["__d"]],[["stackslots"],["result",["stackslots"]]]]],[11,"deserialize","","",36,[[["__d"]],[["valueloc"],["result",["valueloc"]]]]],[11,"deserialize","","",35,[[["__d"]],[["trapcode"],["result",["trapcode"]]]]],[11,"hash","","",33,[[["self"],["__h"]]]],[11,"hash","","",32,[[["self"],["__h"]]]],[11,"hash","","",50,[[["self"],["__h"]]]],[11,"hash","wasmtime_environ::isa","",38,[[["self"],["__h"]]]],[11,"hash","wasmtime_environ::ir","",35,[[["self"],["__h"]]]],[11,"hash","","",31,[[["self"],["__h"]]]],[11,"hash","","",48,[[["self"],["__h"]]]],[11,"index","","",34,[[["self"],["stackslot"]],["stackslotdata"]]],[11,"index_mut","","",34,[[["self"],["stackslot"]],["stackslotdata"]]],[11,"fmt","","",48,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",49,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",50,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",31,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",33,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","wasmtime_environ::settings","",52,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","wasmtime_environ::ir","",32,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",35,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","wasmtime_environ::isa","",38,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",38,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","wasmtime_environ::ir","",31,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",50,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",49,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",36,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",34,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",33,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",32,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",35,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",48,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"reserved_value","","",50,[[],["valuelabel"]]],[11,"serialize","","",34,[[["self"],["__s"]],["result"]]],[11,"serialize","","",36,[[["self"],["__s"]],["result"]]],[11,"serialize","","",50,[[["self"],["__s"]],["result"]]],[11,"serialize","","",49,[[["self"],["__s"]],["result"]]],[11,"serialize","","",35,[[["self"],["__s"]],["result"]]],[11,"eq","wasmtime_environ::entity","",54,[[["self"],["primarymap"]],["bool"]]],[11,"ne","","",54,[[["self"],["primarymap"]],["bool"]]],[11,"index_mut","","",53,[[["self"],["k"]],["v"]]],[11,"index_mut","","",54,[[["self"],["k"]],["v"]]],[11,"serialize","","",54,[[["self"],["__s"]],["result"]]],[11,"clone","","",54,[[["self"]],["primarymap"]]],[11,"clone","","",53,[[["self"]],["boxedslice"]]],[11,"fmt","","",53,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",54,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"hash","","",54,[[["self"],["__h"]]]],[11,"index","","",54,[[["self"],["k"]],["v"]]],[11,"index","","",53,[[["self"],["k"]],["v"]]],[11,"from_iter","","",54,[[["t"]],["primarymap"]]],[11,"deserialize","","",54,[[["__d"]],[["result",["primarymap"]],["primarymap"]]]],[11,"reserved_value","wasmtime_environ::wasm","",57,[[],["definedmemoryindex"]]],[11,"reserved_value","","",58,[[],["definedtableindex"]]],[11,"reserved_value","","",61,[[],["memoryindex"]]],[11,"reserved_value","","",62,[[],["signatureindex"]]],[11,"reserved_value","","",55,[[],["definedfuncindex"]]],[11,"reserved_value","","",63,[[],["tableindex"]]],[11,"reserved_value","","",59,[[],["funcindex"]]],[11,"reserved_value","","",60,[[],["globalindex"]]],[11,"reserved_value","","",56,[[],["definedglobalindex"]]],[11,"cmp","","",59,[[["funcindex"],["self"]],["ordering"]]],[11,"cmp","","",58,[[["definedtableindex"],["self"]],["ordering"]]],[11,"cmp","","",55,[[["definedfuncindex"],["self"]],["ordering"]]],[11,"cmp","","",63,[[["self"],["tableindex"]],["ordering"]]],[11,"cmp","","",62,[[["signatureindex"],["self"]],["ordering"]]],[11,"cmp","","",60,[[["globalindex"],["self"]],["ordering"]]],[11,"cmp","","",56,[[["definedglobalindex"],["self"]],["ordering"]]],[11,"cmp","","",61,[[["self"],["memoryindex"]],["ordering"]]],[11,"cmp","","",57,[[["self"],["definedmemoryindex"]],["ordering"]]],[11,"eq","","",58,[[["definedtableindex"],["self"]],["bool"]]],[11,"ne","","",58,[[["definedtableindex"],["self"]],["bool"]]],[11,"eq","","",59,[[["funcindex"],["self"]],["bool"]]],[11,"ne","","",59,[[["funcindex"],["self"]],["bool"]]],[11,"eq","","",63,[[["self"],["tableindex"]],["bool"]]],[11,"ne","","",63,[[["self"],["tableindex"]],["bool"]]],[11,"eq","","",60,[[["globalindex"],["self"]],["bool"]]],[11,"ne","","",60,[[["globalindex"],["self"]],["bool"]]],[11,"eq","","",56,[[["definedglobalindex"],["self"]],["bool"]]],[11,"ne","","",56,[[["definedglobalindex"],["self"]],["bool"]]],[11,"eq","","",57,[[["self"],["definedmemoryindex"]],["bool"]]],[11,"ne","","",57,[[["self"],["definedmemoryindex"]],["bool"]]],[11,"eq","","",62,[[["signatureindex"],["self"]],["bool"]]],[11,"ne","","",62,[[["signatureindex"],["self"]],["bool"]]],[11,"eq","","",61,[[["self"],["memoryindex"]],["bool"]]],[11,"ne","","",61,[[["self"],["memoryindex"]],["bool"]]],[11,"eq","","",55,[[["definedfuncindex"],["self"]],["bool"]]],[11,"ne","","",55,[[["definedfuncindex"],["self"]],["bool"]]],[11,"new","","",60,[[["usize"]],["globalindex"]]],[11,"index","","",60,[[],["usize"]]],[11,"new","","",63,[[["usize"]],["tableindex"]]],[11,"index","","",63,[[],["usize"]]],[11,"new","","",55,[[["usize"]],["definedfuncindex"]]],[11,"index","","",55,[[],["usize"]]],[11,"new","","",61,[[["usize"]],["memoryindex"]]],[11,"index","","",61,[[],["usize"]]],[11,"new","","",62,[[["usize"]],["signatureindex"]]],[11,"index","","",62,[[],["usize"]]],[11,"new","","",56,[[["usize"]],["definedglobalindex"]]],[11,"index","","",56,[[],["usize"]]],[11,"new","","",58,[[["usize"]],["definedtableindex"]]],[11,"index","","",58,[[],["usize"]]],[11,"new","","",57,[[["usize"]],["definedmemoryindex"]]],[11,"index","","",57,[[],["usize"]]],[11,"new","","",59,[[["usize"]],["funcindex"]]],[11,"index","","",59,[[],["usize"]]],[11,"partial_cmp","","",57,[[["self"],["definedmemoryindex"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",57,[[["self"],["definedmemoryindex"]],["bool"]]],[11,"le","","",57,[[["self"],["definedmemoryindex"]],["bool"]]],[11,"gt","","",57,[[["self"],["definedmemoryindex"]],["bool"]]],[11,"ge","","",57,[[["self"],["definedmemoryindex"]],["bool"]]],[11,"partial_cmp","","",58,[[["definedtableindex"],["self"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",58,[[["definedtableindex"],["self"]],["bool"]]],[11,"le","","",58,[[["definedtableindex"],["self"]],["bool"]]],[11,"gt","","",58,[[["definedtableindex"],["self"]],["bool"]]],[11,"ge","","",58,[[["definedtableindex"],["self"]],["bool"]]],[11,"partial_cmp","","",56,[[["definedglobalindex"],["self"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",56,[[["definedglobalindex"],["self"]],["bool"]]],[11,"le","","",56,[[["definedglobalindex"],["self"]],["bool"]]],[11,"gt","","",56,[[["definedglobalindex"],["self"]],["bool"]]],[11,"ge","","",56,[[["definedglobalindex"],["self"]],["bool"]]],[11,"partial_cmp","","",63,[[["self"],["tableindex"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",63,[[["self"],["tableindex"]],["bool"]]],[11,"le","","",63,[[["self"],["tableindex"]],["bool"]]],[11,"gt","","",63,[[["self"],["tableindex"]],["bool"]]],[11,"ge","","",63,[[["self"],["tableindex"]],["bool"]]],[11,"partial_cmp","","",61,[[["self"],["memoryindex"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",61,[[["self"],["memoryindex"]],["bool"]]],[11,"le","","",61,[[["self"],["memoryindex"]],["bool"]]],[11,"gt","","",61,[[["self"],["memoryindex"]],["bool"]]],[11,"ge","","",61,[[["self"],["memoryindex"]],["bool"]]],[11,"partial_cmp","","",59,[[["funcindex"],["self"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",59,[[["funcindex"],["self"]],["bool"]]],[11,"le","","",59,[[["funcindex"],["self"]],["bool"]]],[11,"gt","","",59,[[["funcindex"],["self"]],["bool"]]],[11,"ge","","",59,[[["funcindex"],["self"]],["bool"]]],[11,"partial_cmp","","",55,[[["definedfuncindex"],["self"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",55,[[["definedfuncindex"],["self"]],["bool"]]],[11,"le","","",55,[[["definedfuncindex"],["self"]],["bool"]]],[11,"gt","","",55,[[["definedfuncindex"],["self"]],["bool"]]],[11,"ge","","",55,[[["definedfuncindex"],["self"]],["bool"]]],[11,"partial_cmp","","",60,[[["globalindex"],["self"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",60,[[["globalindex"],["self"]],["bool"]]],[11,"le","","",60,[[["globalindex"],["self"]],["bool"]]],[11,"gt","","",60,[[["globalindex"],["self"]],["bool"]]],[11,"ge","","",60,[[["globalindex"],["self"]],["bool"]]],[11,"partial_cmp","","",62,[[["signatureindex"],["self"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",62,[[["signatureindex"],["self"]],["bool"]]],[11,"le","","",62,[[["signatureindex"],["self"]],["bool"]]],[11,"gt","","",62,[[["signatureindex"],["self"]],["bool"]]],[11,"ge","","",62,[[["signatureindex"],["self"]],["bool"]]],[11,"clone","","",55,[[["self"]],["definedfuncindex"]]],[11,"clone","","",63,[[["self"]],["tableindex"]]],[11,"clone","","",57,[[["self"]],["definedmemoryindex"]]],[11,"clone","","",44,[[["self"]],["memory"]]],[11,"clone","","",42,[[["self"]],["global"]]],[11,"clone","","",45,[[["self"]],["table"]]],[11,"clone","","",59,[[["self"]],["funcindex"]]],[11,"clone","","",61,[[["self"]],["memoryindex"]]],[11,"clone","","",43,[[["self"]],["globalinit"]]],[11,"clone","","",56,[[["self"]],["definedglobalindex"]]],[11,"clone","","",46,[[["self"]],["tableelementtype"]]],[11,"clone","","",58,[[["self"]],["definedtableindex"]]],[11,"clone","","",62,[[["self"]],["signatureindex"]]],[11,"clone","","",60,[[["self"]],["globalindex"]]],[11,"serialize","","",59,[[["self"],["__s"]],["result"]]],[11,"deserialize","","",59,[[["__d"]],[["funcindex"],["result",["funcindex"]]]]],[11,"fmt","","",58,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",43,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",44,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",61,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",42,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",62,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",57,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",63,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",45,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",55,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",59,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",60,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",46,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",56,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"hash","","",55,[[["self"],["__h"]]]],[11,"hash","","",62,[[["self"],["__h"]]]],[11,"hash","","",61,[[["self"],["__h"]]]],[11,"hash","","",63,[[["self"],["__h"]]]],[11,"hash","","",46,[[["self"],["__h"]]]],[11,"hash","","",57,[[["self"],["__h"]]]],[11,"hash","","",56,[[["self"],["__h"]]]],[11,"hash","","",43,[[["self"],["__h"]]]],[11,"hash","","",59,[[["self"],["__h"]]]],[11,"hash","","",44,[[["self"],["__h"]]]],[11,"hash","","",58,[[["self"],["__h"]]]],[11,"hash","","",45,[[["self"],["__h"]]]],[11,"hash","","",60,[[["self"],["__h"]]]],[11,"hash","","",42,[[["self"],["__h"]]]],[11,"compile_module","wasmtime_environ::cranelift","Compile the module using Cranelift, producing a…",64,[[["cacheconfig"],["functionbodydata"],["module"],["bool"],["primarymap",["definedfuncindex","functionbodydata"]],["targetisa"],["moduletranslationstate"],["definedfuncindex"]],[["compileerror"],["result",["compileerror"]]]]],[11,"from","wasmtime_environ","",18,[[["wasmerror"]],["self"]]],[11,"clone","","",1,[[["self"]],["instructionaddressmap"]]],[11,"clone","","",0,[[["self"]],["functionaddressmap"]]],[11,"clone","","",17,[[["self"]],["modulememoryoffset"]]],[11,"clone","","",2,[[["self"]],["modulevmctxinfo"]]],[11,"clone","","",4,[[["self"]],["compiledfunctionunwindinforeloc"]]],[11,"clone","","",19,[[["self"]],["compiledfunctionunwindinfo"]]],[11,"clone","","",3,[[["self"]],["compiledfunction"]]],[11,"clone","","",5,[[["self"]],["relocation"]]],[11,"clone","","",20,[[["self"]],["relocationtarget"]]],[11,"clone","","",9,[[["self"]],["tableelements"]]],[11,"clone","","",21,[[["self"]],["export"]]],[11,"clone","","",22,[[["self"]],["memorystyle"]]],[11,"clone","","",7,[[["self"]],["memoryplan"]]],[11,"clone","","",24,[[["self"]],["tablestyle"]]],[11,"clone","","",10,[[["self"]],["tableplan"]]],[11,"clone","","",12,[[["self"]],["datainitializerlocation"]]],[11,"clone","","",15,[[["self"]],["tunables"]]],[11,"clone","","",28,[[["self"]],["targetsharedsignatureindex"]]],[11,"clone","","",29,[[["self"]],["cacheconfig"]]],[11,"default","","",15,[[],["self"]]],[11,"cmp","","",21,[[["export"],["self"]],["ordering"]]],[11,"eq","","",1,[[["instructionaddressmap"],["self"]],["bool"]]],[11,"ne","","",1,[[["instructionaddressmap"],["self"]],["bool"]]],[11,"eq","","",0,[[["functionaddressmap"],["self"]],["bool"]]],[11,"ne","","",0,[[["functionaddressmap"],["self"]],["bool"]]],[11,"eq","","",4,[[["self"],["compiledfunctionunwindinforeloc"]],["bool"]]],[11,"ne","","",4,[[["self"],["compiledfunctionunwindinforeloc"]],["bool"]]],[11,"eq","","",19,[[["self"],["compiledfunctionunwindinfo"]],["bool"]]],[11,"ne","","",19,[[["self"],["compiledfunctionunwindinfo"]],["bool"]]],[11,"eq","","",3,[[["self"],["compiledfunction"]],["bool"]]],[11,"ne","","",3,[[["self"],["compiledfunction"]],["bool"]]],[11,"eq","","",25,[[["self"],["compilation"]],["bool"]]],[11,"ne","","",25,[[["self"],["compilation"]],["bool"]]],[11,"eq","","",5,[[["self"],["relocation"]],["bool"]]],[11,"ne","","",5,[[["self"],["relocation"]],["bool"]]],[11,"eq","","",20,[[["self"],["relocationtarget"]],["bool"]]],[11,"ne","","",20,[[["self"],["relocationtarget"]],["bool"]]],[11,"eq","","",6,[[["trapinformation"],["self"]],["bool"]]],[11,"ne","","",6,[[["trapinformation"],["self"]],["bool"]]],[11,"eq","","",21,[[["export"],["self"]],["bool"]]],[11,"ne","","",21,[[["export"],["self"]],["bool"]]],[11,"partial_cmp","","",21,[[["export"],["self"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",21,[[["export"],["self"]],["bool"]]],[11,"le","","",21,[[["export"],["self"]],["bool"]]],[11,"gt","","",21,[[["export"],["self"]],["bool"]]],[11,"ge","","",21,[[["export"],["self"]],["bool"]]],[11,"fmt","","",1,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",0,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",17,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",2,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",4,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",19,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",3,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",25,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",5,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",20,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",6,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",18,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",9,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",21,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",22,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",7,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",24,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",10,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",8,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",28,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",29,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",18,[[["self"],["formatter"]],["result"]]],[11,"hash","","",9,[[["self"],["__h"]]]],[11,"hash","","",21,[[["self"],["__h"]]]],[11,"hash","","",22,[[["self"],["__h"]]]],[11,"hash","","",7,[[["self"],["__h"]]]],[11,"hash","","",24,[[["self"],["__h"]]]],[11,"hash","","",10,[[["self"],["__h"]]]],[11,"hash","","",13,[[["self"],["__h"]]]],[11,"source","","",18,[[["self"]],[["error"],["option",["error"]]]]],[11,"reloc_block","wasmtime_environ::cranelift","",30,[[["codeoffset"],["self"],["reloc"]]]],[11,"reloc_external","","",30,[[["codeoffset"],["addend"],["self"],["externalname"],["reloc"]]]],[11,"reloc_constant","","",30,[[["constantoffset"],["codeoffset"],["self"],["reloc"]]]],[11,"reloc_jt","","",30,[[["codeoffset"],["jumptable"],["self"],["reloc"]]]],[11,"deserialize","wasmtime_environ","",1,[[["__d"]],["result"]]],[11,"deserialize","","",0,[[["__d"]],["result"]]],[11,"deserialize","","",4,[[["__d"]],["result"]]],[11,"deserialize","","",19,[[["__d"]],["result"]]],[11,"deserialize","","",3,[[["__d"]],["result"]]],[11,"deserialize","","",25,[[["__d"]],["result"]]],[11,"deserialize","","",5,[[["__d"]],["result"]]],[11,"deserialize","","",20,[[["__d"]],["result"]]],[11,"deserialize","","",6,[[["__d"]],["result"]]],[11,"deserialize","","",29,[[["__d"]],["result"]]],[11,"serialize","","",1,[[["self"],["__s"]],["result"]]],[11,"serialize","","",0,[[["self"],["__s"]],["result"]]],[11,"serialize","","",4,[[["self"],["__s"]],["result"]]],[11,"serialize","","",19,[[["self"],["__s"]],["result"]]],[11,"serialize","","",3,[[["self"],["__s"]],["result"]]],[11,"serialize","","",25,[[["self"],["__s"]],["result"]]],[11,"serialize","","",5,[[["self"],["__s"]],["result"]]],[11,"serialize","","",20,[[["self"],["__s"]],["result"]]],[11,"serialize","","",6,[[["self"],["__s"]],["result"]]],[11,"reserve_signatures","","",27,[[["self"],["u32"]],["wasmresult"]]],[11,"declare_signature","","",27,[[["self"],["signature"]],["wasmresult"]]],[11,"declare_func_import","","",27,[[["signatureindex"],["str"],["self"]],["wasmresult"]]],[11,"declare_table_import","","",27,[[["str"],["self"],["table"]],["wasmresult"]]],[11,"declare_memory_import","","",27,[[["str"],["self"],["memory"]],["wasmresult"]]],[11,"declare_global_import","","",27,[[["str"],["global"],["self"]],["wasmresult"]]],[11,"finish_imports","","",27,[[["self"]],["wasmresult"]]],[11,"reserve_func_types","","",27,[[["self"],["u32"]],["wasmresult"]]],[11,"declare_func_type","","",27,[[["signatureindex"],["self"]],["wasmresult"]]],[11,"reserve_tables","","",27,[[["self"],["u32"]],["wasmresult"]]],[11,"declare_table","","",27,[[["self"],["table"]],["wasmresult"]]],[11,"reserve_memories","","",27,[[["self"],["u32"]],["wasmresult"]]],[11,"declare_memory","","",27,[[["self"],["memory"]],["wasmresult"]]],[11,"reserve_globals","","",27,[[["self"],["u32"]],["wasmresult"]]],[11,"declare_global","","",27,[[["self"],["global"]],["wasmresult"]]],[11,"reserve_exports","","",27,[[["self"],["u32"]],["wasmresult"]]],[11,"declare_func_export","","",27,[[["str"],["self"],["funcindex"]],["wasmresult"]]],[11,"declare_table_export","","",27,[[["str"],["self"],["tableindex"]],["wasmresult"]]],[11,"declare_memory_export","","",27,[[["memoryindex"],["self"],["str"]],["wasmresult"]]],[11,"declare_global_export","","",27,[[["str"],["self"],["globalindex"]],["wasmresult"]]],[11,"declare_start_func","","",27,[[["self"],["funcindex"]],["wasmresult"]]],[11,"reserve_table_elements","","",27,[[["self"],["u32"]],["wasmresult"]]],[11,"declare_table_elements","","",27,[[["globalindex"],["box"],["usize"],["self"],["tableindex"],["option",["globalindex"]]],["wasmresult"]]],[11,"define_function_body","","",27,[[["usize"],["self"],["moduletranslationstate"]],["wasmresult"]]],[11,"reserve_data_initializers","","",27,[[["self"],["u32"]],["wasmresult"]]],[11,"declare_data_initialization","","",27,[[["usize"],["memoryindex"],["self"],["option",["globalindex"]],["globalindex"]],["wasmresult"]]],[11,"declare_func_name","","",27,[[["str"],["self"],["funcindex"]],["wasmresult"]]],[11,"target_config","","",27,[[["self"]],["targetfrontendconfig"]]],[11,"lane_type","wasmtime_environ::ir","Get the lane type of this SIMD vector type.",48,[[],["type"]]],[11,"lane_of","","The type transformation that returns the lane type of a…",48,[[],["type"]]],[11,"log2_lane_bits","","Get log_2 of the number of bits in a lane.",48,[[],["u8"]]],[11,"lane_bits","","Get the number of bits in a lane.",48,[[],["u8"]]],[11,"int","","Get an integer type with the requested number of bits.",48,[[["u16"]],[["option",["type"]],["type"]]]],[11,"as_bool_pedantic","","Get a type with the same number of lanes as this type, but…",48,[[],["type"]]],[11,"as_bool","","Get a type with the same number of lanes as this type, but…",48,[[],["type"]]],[11,"half_width","","Get a type with the same number of lanes as this type, but…",48,[[],[["option",["type"]],["type"]]]],[11,"double_width","","Get a type with the same number of lanes as this type, but…",48,[[],[["option",["type"]],["type"]]]],[11,"is_invalid","","Is this the INVALID type?",48,[[],["bool"]]],[11,"is_special","","Is this a special type?",48,[[],["bool"]]],[11,"is_lane","","Is this a lane type?",48,[[],["bool"]]],[11,"is_vector","","Is this a SIMD vector type?",48,[[],["bool"]]],[11,"is_bool","","Is this a scalar boolean type?",48,[[],["bool"]]],[11,"is_int","","Is this a scalar integer type?",48,[[],["bool"]]],[11,"is_float","","Is this a scalar floating point type?",48,[[],["bool"]]],[11,"is_flags","","Is this a CPU flags type?",48,[[],["bool"]]],[11,"is_ref","","Is this a ref type?",48,[[],["bool"]]],[11,"log2_lane_count","","Get log_2 of the number of lanes in this SIMD vector type.",48,[[],["u8"]]],[11,"lane_count","","Get the number of lanes in this SIMD vector type.",48,[[],["u16"]]],[11,"bits","","Get the total number of bits used to represent this type.",48,[[],["u16"]]],[11,"bytes","","Get the number of bytes used to store this type in memory.",48,[[],["u32"]]],[11,"by","","Get a SIMD vector type with `n` times more lanes than this…",48,[[["u16"]],[["option",["type"]],["type"]]]],[11,"half_vector","","Get a SIMD vector with half the number of lanes.",48,[[],[["option",["type"]],["type"]]]],[11,"index","","Index of this type, for use with hash tables etc.",48,[[],["usize"]]],[11,"wider_or_equal","","True iff:",48,[[["type"]],["bool"]]],[11,"triple_pointer_type","","Return the pointer type for the given target triple.",48,[[["triple"]],["type"]]],[11,"new","","Create a parameter with default flags.",31,[[["type"]],["abiparam"]]],[11,"special","","Create a special-purpose parameter that is not (yet) bound…",31,[[["argumentpurpose"],["type"]],["abiparam"]]],[11,"special_reg","","Create a parameter for a special-purpose register.",31,[[["argumentpurpose"],["u16"],["type"]],["abiparam"]]],[11,"uext","","Convert `self` to a parameter with the `uext` flag set.",31,[[],["abiparam"]]],[11,"sext","","Convert `self` to a parameter type with the `sext` flag set.",31,[[],["abiparam"]]],[11,"display","","Return an object that can display `self` with correct…",31,[[["self"],["r"]],["displayabiparam"]]],[11,"new","","Create a new blank signature.",33,[[["callconv"]],["signature"]]],[11,"clear","","Clear the signature so it is identical to a fresh one…",33,[[["self"],["callconv"]]]],[11,"display","","Return an object that can display `self` with correct…",33,[[["self"],["r"]],["displaysignature"]]],[11,"special_param_index","","Find the index of a presumed unique special-purpose…",33,[[["argumentpurpose"],["self"]],[["option",["usize"]],["usize"]]]],[11,"special_return_index","","Find the index of a presumed unique special-purpose…",33,[[["argumentpurpose"],["self"]],[["option",["usize"]],["usize"]]]],[11,"uses_special_param","","Does this signature have a parameter whose…",33,[[["argumentpurpose"],["self"]],["bool"]]],[11,"uses_special_return","","Does this signature have a return whose `ArgumentPurpose`…",33,[[["argumentpurpose"],["self"]],["bool"]]],[11,"num_special_params","","How many special parameters does this function have?",33,[[["self"]],["usize"]]],[11,"num_special_returns","","How many special returns does this function have?",33,[[["self"]],["usize"]]],[11,"uses_struct_return_param","","Does this signature take an struct return pointer parameter?",33,[[["self"]],["bool"]]],[11,"is_multi_return","","Does this return more than one normal value? (Pre-struct…",33,[[["self"]],["bool"]]],[11,"new","","Create a new source location with the given bits.",49,[[["u32"]],["sourceloc"]]],[11,"is_default","","Is this the default source location?",49,[[],["bool"]]],[11,"bits","","Read the bits of this source location.",49,[[],["u32"]]],[11,"new","","Create an empty stack slot manager.",34,[[],["stackslots"]]],[11,"clear","","Clear out everything.",34,[[["self"]]]],[11,"push","","Allocate a new stack slot.",34,[[["self"],["stackslotdata"]],["stackslot"]]],[11,"is_valid","","Check if `ss` is a valid stack slot reference.",34,[[["self"],["stackslot"]],["bool"]]],[11,"iter","","Get an iterator over all the stack slot keys.",34,[[["self"]],[["iter",["stackslot","stackslotdata"]],["stackslotdata"],["stackslot"]]]],[11,"iter_mut","","Get an iterator over all the stack slot keys, mutable…",34,[[["self"]],[["itermut",["stackslot","stackslotdata"]],["stackslotdata"],["stackslot"]]]],[11,"values","","Get an iterator over all the stack slot records.",34,[[["self"]],[["iter",["stackslotdata"]],["stackslotdata"]]]],[11,"values_mut","","Get an iterator over all the stack slot records, mutable…",34,[[["self"]],[["stackslotdata"],["itermut",["stackslotdata"]]]]],[11,"keys","","Get an iterator over all the stack slot keys.",34,[[["self"]],[["stackslot"],["keys",["stackslot"]]]]],[11,"next_key","","Get a reference to the next stack slot that would be…",34,[[["self"]],["stackslot"]]],[11,"make_spill_slot","","Create a new spill slot for spilling values of type `ty`.",34,[[["self"],["type"]],["stackslot"]]],[11,"make_incoming_arg","","Create a stack slot representing an incoming function…",34,[[["self"],["type"],["i32"]],["stackslot"]]],[11,"get_outgoing_arg","","Get a stack slot representing an outgoing argument.",34,[[["self"],["type"],["i32"]],["stackslot"]]],[11,"get_emergency_slot","","Get an emergency spill slot that can be used to store a…",34,[[["self"],["type"]],["stackslot"]]],[11,"from_u32","","Return the underlying index value as a `u32`.",50,[[["u32"]],["valuelabel"]]],[11,"as_u32","","Return the underlying index value as a `u32`.",50,[[],["u32"]]],[11,"is_assigned","","Is this an assigned location? (That is, not `Unassigned`).",36,[[],["bool"]]],[11,"unwrap_reg","","Get the register unit of this location, or panic.",36,[[],["u16"]]],[11,"unwrap_stack","","Get the stack slot of this location, or panic.",36,[[],["stackslot"]]],[11,"display","","Return an object that can display this value location,…",36,[[["r"]],["displayvalueloc"]]],[11,"new","wasmtime_environ::settings","Create a new builder with defaults and names from the…",51,[[["template"]],["builder"]]],[11,"state_for","","Extract contents of builder once everything is configured.",51,[[["str"]],["box"]]],[11,"new","","Create flags shared settings group.",52,[[["builder"]],["flags"]]],[11,"predicate_view","","Get a view of the boolean predicates.",52,[[["self"]],["predicateview"]]],[11,"opt_level","","Optimization level:",52,[[["self"]],["optlevel"]]],[11,"libcall_call_conv","","Defines the calling convention to use for LibCalls call…",52,[[["self"]],["libcallcallconv"]]],[11,"baldrdash_prologue_words","","Number of pointer-sized words pushed by the baldrdash…",52,[[["self"]],["u8"]]],[11,"probestack_size_log2","","The log2 of the size of the stack guard region.",52,[[["self"]],["u8"]]],[11,"enable_verifier","","Run the Cranelift IR verifier at strategic times during…",52,[[["self"]],["bool"]]],[11,"is_pic","","Enable Position-Independent Code generation",52,[[["self"]],["bool"]]],[11,"use_colocated_libcalls","","Use colocated libcalls.",52,[[["self"]],["bool"]]],[11,"avoid_div_traps","","Generate explicit checks around native division…",52,[[["self"]],["bool"]]],[11,"enable_float","","Enable the use of floating-point instructions",52,[[["self"]],["bool"]]],[11,"enable_nan_canonicalization","","Enable NaN canonicalization",52,[[["self"]],["bool"]]],[11,"enable_pinned_reg","","Enable the use of the pinned register.",52,[[["self"]],["bool"]]],[11,"use_pinned_reg_as_heap_base","","Use the pinned register as the heap base.",52,[[["self"]],["bool"]]],[11,"enable_simd","","Enable the use of SIMD instructions.",52,[[["self"]],["bool"]]],[11,"enable_atomics","","Enable the use of atomic instructions",52,[[["self"]],["bool"]]],[11,"enable_safepoints","","Enable safepoint instruction insertions.",52,[[["self"]],["bool"]]],[11,"emit_all_ones_funcaddrs","","Emit not-yet-relocated function addresses as all-ones bit…",52,[[["self"]],["bool"]]],[11,"enable_probestack","","Enable the use of stack probes, for calling conventions…",52,[[["self"]],["bool"]]],[11,"probestack_func_adjusts_sp","","Set this to true of the stack probe function modifies the…",52,[[["self"]],["bool"]]],[11,"enable_jump_tables","","Enable the use of jump tables in generated machine code.",52,[[["self"]],["bool"]]],[11,"triple_default","wasmtime_environ::isa","Return the default calling convention for the given target…",38,[[["triple"]],["callconv"]]],[11,"for_libcall","","Returns the calling convention used for libcalls for the…",38,[[["targetisa"]],["callconv"]]],[11,"extends_windows_fastcall","","Is the calling convention extending the Windows Fastcall…",38,[[],["bool"]]],[11,"extends_baldrdash","","Is the calling convention extending the Baldrdash ABI?",38,[[],["bool"]]],[11,"pointer_type","","Get the pointer type of this target.",39,[[],["type"]]],[11,"pointer_bits","","Get the width of pointers on this target, in units of bits.",39,[[],["u8"]]],[11,"pointer_bytes","","Get the width of pointers on this target, in units of bytes.",39,[[],["u8"]]],[11,"default_call_conv","","Get the default calling convention of this target.",40,[[["self"]],["callconv"]]],[11,"pointer_type","","Get the pointer type of this ISA.",40,[[["self"]],["type"]]],[11,"pointer_width","","Get the width of pointers on this ISA.",40,[[["self"]],["pointerwidth"]]],[11,"pointer_bits","","Get the width of pointers on this ISA, in units of bits.",40,[[["self"]],["u8"]]],[11,"pointer_bytes","","Get the width of pointers on this ISA, in units of bytes.",40,[[["self"]],["u8"]]],[11,"frontend_config","","Get the information needed by frontends producing…",40,[[["self"]],["targetfrontendconfig"]]],[11,"uses_cpu_flags","","Does the CPU implement scalar comparisons using a CPU…",40,[[["self"]],["bool"]]],[11,"uses_complex_addresses","","Does the CPU implement multi-register addressing?",40,[[["self"]],["bool"]]],[11,"encode","","Encode an instruction after determining it is legal.",40,[[["function"],["type"],["instructiondata"],["self"]],[["result",["encoding"]],["encoding"]]]],[11,"prologue_epilogue","","Compute the stack layout and insert prologue and epilogue…",40,[[["function"],["self"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"emit_unwind_info","","Emit unwind information for the given function.",40,[[["function"],["frameunwindsink"],["frameunwindkind"],["self"]]]],[11,"from_raw","wasmtime_environ::entity","Create a new slice from a raw pointer. A safer way to…",53,[[],["boxedslice"]]],[11,"is_valid","","Check if `k` is a valid key in the map.",53,[[["self"],["k"]],["bool"]]],[11,"get","","Get the element at `k` if it exists.",53,[[["self"],["k"]],[["v"],["option"]]]],[11,"get_mut","","Get the element at `k` if it exists, mutable version.",53,[[["self"],["k"]],[["v"],["option"]]]],[11,"is_empty","","Is this map completely empty?",53,[[["self"]],["bool"]]],[11,"len","","Get the total number of entity references created.",53,[[["self"]],["usize"]]],[11,"keys","","Iterate over all the keys in this map.",53,[[["self"]],["keys"]]],[11,"values","","Iterate over all the values in this map.",53,[[["self"]],["iter"]]],[11,"values_mut","","Iterate over all the values in this map, mutable edition.",53,[[["self"]],["itermut"]]],[11,"iter","","Iterate over all the keys and values in this map.",53,[[["self"]],["iter"]]],[11,"iter_mut","","Iterate over all the keys and values in this map, mutable…",53,[[["self"]],["itermut"]]],[11,"last","","Returns the last element that was inserted in the map.",53,[[["self"]],[["v"],["option"]]]],[11,"new","","Create a new empty map.",54,[[],["primarymap"]]],[11,"with_capacity","","Create a new empty map with the given capacity.",54,[[["usize"]],["primarymap"]]],[11,"is_valid","","Check if `k` is a valid key in the map.",54,[[["self"],["k"]],["bool"]]],[11,"get","","Get the element at `k` if it exists.",54,[[["self"],["k"]],[["v"],["option"]]]],[11,"get_mut","","Get the element at `k` if it exists, mutable version.",54,[[["self"],["k"]],[["v"],["option"]]]],[11,"is_empty","","Is this map completely empty?",54,[[["self"]],["bool"]]],[11,"len","","Get the total number of entity references created.",54,[[["self"]],["usize"]]],[11,"keys","","Iterate over all the keys in this map.",54,[[["self"]],["keys"]]],[11,"values","","Iterate over all the values in this map.",54,[[["self"]],["iter"]]],[11,"values_mut","","Iterate over all the values in this map, mutable edition.",54,[[["self"]],["itermut"]]],[11,"iter","","Iterate over all the keys and values in this map.",54,[[["self"]],["iter"]]],[11,"iter_mut","","Iterate over all the keys and values in this map, mutable…",54,[[["self"]],["itermut"]]],[11,"clear","","Remove all entries from this map.",54,[[["self"]]]],[11,"next_key","","Get the key that will be assigned to the next pushed value.",54,[[["self"]],["k"]]],[11,"push","","Append `v` to the mapping, assigning a new key which is…",54,[[["self"],["v"]],["k"]]],[11,"last","","Returns the last element that was inserted in the map.",54,[[["self"]],[["v"],["option"]]]],[11,"reserve","","Reserves capacity for at least `additional` more elements…",54,[[["self"],["usize"]]]],[11,"reserve_exact","","Reserves the minimum capacity for exactly `additional`…",54,[[["self"],["usize"]]]],[11,"shrink_to_fit","","Shrinks the capacity of the `PrimaryMap` as much as…",54,[[["self"]]]],[11,"into_boxed_slice","","Consumes this `PrimaryMap` and produces a `BoxedSlice`.",54,[[],["boxedslice"]]],[11,"from_u32","wasmtime_environ::wasm","Return the underlying index value as a `u32`.",55,[[["u32"]],["definedfuncindex"]]],[11,"as_u32","","Return the underlying index value as a `u32`.",55,[[],["u32"]]],[11,"from_u32","","Return the underlying index value as a `u32`.",56,[[["u32"]],["definedglobalindex"]]],[11,"as_u32","","Return the underlying index value as a `u32`.",56,[[],["u32"]]],[11,"from_u32","","Return the underlying index value as a `u32`.",57,[[["u32"]],["definedmemoryindex"]]],[11,"as_u32","","Return the underlying index value as a `u32`.",57,[[],["u32"]]],[11,"from_u32","","Return the underlying index value as a `u32`.",58,[[["u32"]],["definedtableindex"]]],[11,"as_u32","","Return the underlying index value as a `u32`.",58,[[],["u32"]]],[11,"from_u32","","Return the underlying index value as a `u32`.",59,[[["u32"]],["funcindex"]]],[11,"as_u32","","Return the underlying index value as a `u32`.",59,[[],["u32"]]],[11,"from_u32","","Return the underlying index value as a `u32`.",60,[[["u32"]],["globalindex"]]],[11,"as_u32","","Return the underlying index value as a `u32`.",60,[[],["u32"]]],[11,"from_u32","","Return the underlying index value as a `u32`.",61,[[["u32"]],["memoryindex"]]],[11,"as_u32","","Return the underlying index value as a `u32`.",61,[[],["u32"]]],[11,"from_u32","","Return the underlying index value as a `u32`.",62,[[["u32"]],["signatureindex"]]],[11,"as_u32","","Return the underlying index value as a `u32`.",62,[[],["u32"]]],[11,"from_u32","","Return the underlying index value as a `u32`.",63,[[["u32"]],["tableindex"]]],[11,"as_u32","","Return the underlying index value as a `u32`.",63,[[],["u32"]]]],"p":[[3,"FunctionAddressMap"],[3,"InstructionAddressMap"],[3,"ModuleVmctxInfo"],[3,"CompiledFunction"],[3,"CompiledFunctionUnwindInfoReloc"],[3,"Relocation"],[3,"TrapInformation"],[3,"MemoryPlan"],[3,"Module"],[3,"TableElements"],[3,"TablePlan"],[3,"DataInitializer"],[3,"DataInitializerLocation"],[3,"FunctionBodyData"],[3,"ModuleTranslation"],[3,"Tunables"],[3,"VMOffsets"],[4,"ModuleMemoryOffset"],[4,"CompileError"],[4,"CompiledFunctionUnwindInfo"],[4,"RelocationTarget"],[4,"Export"],[4,"MemoryStyle"],[13,"Static"],[4,"TableStyle"],[3,"Compilation"],[3,"BuiltinFunctionIndex"],[3,"ModuleEnvironment"],[3,"TargetSharedSignatureIndex"],[3,"CacheConfig"],[3,"RelocSink"],[3,"AbiParam"],[4,"ArgumentPurpose"],[3,"Signature"],[3,"StackSlots"],[4,"TrapCode"],[4,"ValueLoc"],[8,"Configurable"],[4,"CallConv"],[3,"TargetFrontendConfig"],[8,"TargetIsa"],[8,"EntityRef"],[3,"Global"],[4,"GlobalInit"],[3,"Memory"],[3,"Table"],[4,"TableElementType"],[8,"Compiler"],[3,"Type"],[3,"SourceLoc"],[3,"ValueLabel"],[3,"Builder"],[3,"Flags"],[3,"BoxedSlice"],[3,"PrimaryMap"],[3,"DefinedFuncIndex"],[3,"DefinedGlobalIndex"],[3,"DefinedMemoryIndex"],[3,"DefinedTableIndex"],[3,"FuncIndex"],[3,"GlobalIndex"],[3,"MemoryIndex"],[3,"SignatureIndex"],[3,"TableIndex"],[3,"Cranelift"]]}; +searchIndex["wasmtime_fuzzing"] = {"doc":"Fuzzing infrastructure for Wasmtime.","i":[[0,"generators","wasmtime_fuzzing","Test case generators.",null,null],[3,"WasmOptTtf","wasmtime_fuzzing::generators","A Wasm test case generator that is powered by Binaryen's…",null,null],[12,"wasm","","The raw, encoded Wasm bytes.",0,null],[3,"DifferentialConfig","","A description of configuration options that we should do…",null,null],[0,"api","","Generating sequences of Wasmtime API calls.",null,null],[3,"ApiCalls","wasmtime_fuzzing::generators::api","A sequence of API calls.",null,null],[12,"calls","","The API calls.",1,null],[4,"ApiCall","","A call to one of Wasmtime's public APIs.",null,null],[13,"ConfigNew","","",2,null],[13,"ConfigDebugInfo","","",2,null],[13,"EngineNew","","",2,null],[13,"StoreNew","","",2,null],[13,"ModuleNew","","",2,null],[12,"id","wasmtime_fuzzing::generators::api::ApiCall","",3,null],[12,"wasm","","",3,null],[13,"ModuleDrop","wasmtime_fuzzing::generators::api","",2,null],[12,"id","wasmtime_fuzzing::generators::api::ApiCall","",4,null],[13,"InstanceNew","wasmtime_fuzzing::generators::api","",2,null],[12,"id","wasmtime_fuzzing::generators::api::ApiCall","",5,null],[12,"module","","",5,null],[13,"InstanceDrop","wasmtime_fuzzing::generators::api","",2,null],[12,"id","wasmtime_fuzzing::generators::api::ApiCall","",6,null],[13,"CallExportedFunc","wasmtime_fuzzing::generators::api","",2,null],[12,"instance","wasmtime_fuzzing::generators::api::ApiCall","",7,null],[12,"nth","","",7,null],[11,"to_wasmtime_config","wasmtime_fuzzing::generators","Convert this differential fuzzing config into a…",8,[[["self"]],[["result",["config"]],["config"]]]],[0,"oracles","wasmtime_fuzzing","Oracles.",null,null],[5,"instantiate","wasmtime_fuzzing::oracles","Instantiate the Wasm buffer, and implicitly fail if we…",null,[[["strategy"]]]],[5,"instantiate_with_config","","Instantiate the Wasm buffer, and implicitly fail if we…",null,[[["config"]]]],[5,"compile","","Compile the Wasm buffer, and implicitly fail if we have an…",null,[[["strategy"]]]],[5,"differential_execution","","Instantiate the given Wasm module with each `Config` and…",null,[[["wasmoptttf"]]]],[5,"make_api_calls","","Invoke the given API calls.",null,[[["apicalls"]]]],[0,"dummy","","Dummy implementations of things that a Wasm module can…",null,null],[3,"DummyFunc","wasmtime_fuzzing::oracles::dummy","A function that doesn't do anything but return the default…",null,null],[5,"dummy_imports","","Create a set of dummy functions/globals/etc for the given…",null,[[["store"]],[["result",["vec","trap"]],["vec",["extern"]],["trap"]]]],[5,"dummy_value","","Construct a dummy value for the given value type.",null,[[["valtype"]],[["trap"],["result",["val","trap"]],["val"]]]],[5,"dummy_values","","Construct a sequence of dummy values for the given types.",null,[[],[["trap"],["result",["vec","trap"]],["vec",["val"]]]]],[5,"dummy_global","","Construct a dummy global for the given global type.",null,[[["store"],["globaltype"]],[["trap"],["result",["global","trap"]],["global"]]]],[5,"dummy_table","","Construct a dummy table for the given table type.",null,[[["store"],["tabletype"]],[["trap"],["result",["table","trap"]],["table"]]]],[5,"dummy_memory","","Construct a dummy memory for the given memory type.",null,[[["store"],["memorytype"]],["memory"]]],[11,"new","","Construct a new dummy `Func`.",9,[[["store"],["functype"]],["func"]]],[11,"from","wasmtime_fuzzing::generators","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"to_owned","","",0,[[["self"]],["t"]]],[11,"clone_into","","",0,[[["self"],["t"]]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]],[11,"from","","",8,[[["t"]],["t"]]],[11,"into","","",8,[[],["u"]]],[11,"to_owned","","",8,[[["self"]],["t"]]],[11,"clone_into","","",8,[[["self"],["t"]]]],[11,"try_from","","",8,[[["u"]],["result"]]],[11,"try_into","","",8,[[],["result"]]],[11,"borrow","","",8,[[["self"]],["t"]]],[11,"borrow_mut","","",8,[[["self"]],["t"]]],[11,"type_id","","",8,[[["self"]],["typeid"]]],[11,"equivalent","","",8,[[["k"],["self"]],["bool"]]],[11,"from","wasmtime_fuzzing::generators::api","",1,[[["t"]],["t"]]],[11,"into","","",1,[[],["u"]]],[11,"try_from","","",1,[[["u"]],["result"]]],[11,"try_into","","",1,[[],["result"]]],[11,"borrow","","",1,[[["self"]],["t"]]],[11,"borrow_mut","","",1,[[["self"]],["t"]]],[11,"type_id","","",1,[[["self"]],["typeid"]]],[11,"from","","",2,[[["t"]],["t"]]],[11,"into","","",2,[[],["u"]]],[11,"to_owned","","",2,[[["self"]],["t"]]],[11,"clone_into","","",2,[[["self"],["t"]]]],[11,"try_from","","",2,[[["u"]],["result"]]],[11,"try_into","","",2,[[],["result"]]],[11,"borrow","","",2,[[["self"]],["t"]]],[11,"borrow_mut","","",2,[[["self"]],["t"]]],[11,"type_id","","",2,[[["self"]],["typeid"]]],[11,"from","wasmtime_fuzzing::oracles::dummy","",9,[[["t"]],["t"]]],[11,"into","","",9,[[],["u"]]],[11,"try_from","","",9,[[["u"]],["result"]]],[11,"try_into","","",9,[[],["result"]]],[11,"borrow","","",9,[[["self"]],["t"]]],[11,"borrow_mut","","",9,[[["self"]],["t"]]],[11,"type_id","","",9,[[["self"]],["typeid"]]],[11,"clone","wasmtime_fuzzing::generators::api","",2,[[["self"]],["apicall"]]],[11,"clone","wasmtime_fuzzing::generators","",0,[[["self"]],["wasmoptttf"]]],[11,"clone","","",8,[[["self"]],["differentialconfig"]]],[11,"eq","","",8,[[["self"],["differentialconfig"]],["bool"]]],[11,"ne","","",8,[[["self"],["differentialconfig"]],["bool"]]],[11,"fmt","wasmtime_fuzzing::generators::api","",2,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",1,[[["formatter"],["self"]],["result"]]],[11,"fmt","wasmtime_fuzzing::generators","",0,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",8,[[["formatter"],["self"]],["result"]]],[11,"fmt","wasmtime_fuzzing::oracles::dummy","",9,[[["formatter"],["self"]],["result"]]],[11,"hash","wasmtime_fuzzing::generators","",8,[[["self"],["__h"]]]],[11,"arbitrary","wasmtime_fuzzing::generators::api","",2,[[["unstructured"]],["result"]]],[11,"arbitrary_take_rest","","",2,[[["unstructured"]],["result"]]],[11,"size_hint","","",2,[[]]],[11,"shrink","","",2,[[["self"]],[["box",["iterator"]],["iterator"]]]],[11,"arbitrary","","",1,[[["unstructured"]],["result"]]],[11,"arbitrary","wasmtime_fuzzing::generators","",0,[[["unstructured"]],["result"]]],[11,"arbitrary_take_rest","","",0,[[["unstructured"]],["result"]]],[11,"arbitrary","","",8,[[["unstructured"]],["result"]]],[11,"arbitrary_take_rest","","",8,[[["unstructured"]],["result"]]],[11,"size_hint","","",8,[[]]],[11,"shrink","","",8,[[["self"]],[["box",["iterator"]],["iterator"]]]],[11,"call","wasmtime_fuzzing::oracles::dummy","",9,[[["self"]],[["result",["trap"]],["trap"]]]]],"p":[[3,"WasmOptTtf"],[3,"ApiCalls"],[4,"ApiCall"],[13,"ModuleNew"],[13,"ModuleDrop"],[13,"InstanceNew"],[13,"InstanceDrop"],[13,"CallExportedFunc"],[3,"DifferentialConfig"],[3,"DummyFunc"]]}; +searchIndex["wasmtime_interface_types"] = {"doc":"A small crate to handle WebAssembly interface types in…","i":[[3,"ModuleData","wasmtime_interface_types","A data structure intended to hold a parsed representation…",null,null],[3,"ExportBinding","","Representation of a binding of an exported function.",null,null],[4,"Value","","The set of all possible WebAssembly Interface Types",null,null],[13,"String","","",0,null],[13,"I32","","",0,null],[13,"U32","","",0,null],[13,"I64","","",0,null],[13,"U64","","",0,null],[13,"F32","","",0,null],[13,"F64","","",0,null],[11,"new","","Parses a raw binary wasm file, extracting information…",1,[[],[["result",["moduledata"]],["moduledata"]]]],[11,"find_wasi_module_name","","Detects if WASI support is needed: returns module name…",1,[[["self"]],[["string"],["option",["string"]]]]],[11,"invoke_export","","Invokes wasmtime function with a `&[Value]` list. `Value`…",1,[[["str"],["self"],["instance"]],[["vec",["value"]],["result",["vec"]]]]],[11,"binding_for_export","","Returns an appropriate binding for the `name` export in…",1,[[["str"],["instancehandle"],["self"]],[["exportbinding"],["result",["exportbinding"]]]]],[11,"param_bindings","","Returns the list of binding expressions used to create the…",2,[[["self"]],[["result",["vec"]],["vec",["incomingbindingexpression"]]]]],[11,"param_types","","Returns the list of scalar types used for this binding",2,[[["self"]],[["result",["vec"]],["vec",["webidlscalartype"]]]]],[11,"result_bindings","","Returns the list of binding expressions used to extract…",2,[[["self"]],[["result",["vec"]],["vec",["outgoingbindingexpression"]]]]],[11,"from","","",1,[[["t"]],["t"]]],[11,"into","","",1,[[],["u"]]],[11,"try_from","","",1,[[["u"]],["result"]]],[11,"try_into","","",1,[[],["result"]]],[11,"borrow","","",1,[[["self"]],["t"]]],[11,"borrow_mut","","",1,[[["self"]],["t"]]],[11,"type_id","","",1,[[["self"]],["typeid"]]],[11,"from","","",2,[[["t"]],["t"]]],[11,"into","","",2,[[],["u"]]],[11,"try_from","","",2,[[["u"]],["result"]]],[11,"try_into","","",2,[[],["result"]]],[11,"borrow","","",2,[[["self"]],["t"]]],[11,"borrow_mut","","",2,[[["self"]],["t"]]],[11,"type_id","","",2,[[["self"]],["typeid"]]],[11,"from","","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"to_owned","","",0,[[["self"]],["t"]]],[11,"clone_into","","",0,[[["self"],["t"]]]],[11,"to_string","","",0,[[["self"]],["string"]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]],[11,"from","","",0,[[["string"]],["value"]]],[11,"from","","",0,[[["i32"]],["value"]]],[11,"from","","",0,[[["u32"]],["value"]]],[11,"from","","",0,[[["i64"]],["value"]]],[11,"from","","",0,[[["u64"]],["value"]]],[11,"from","","",0,[[["f32"]],["value"]]],[11,"from","","",0,[[["f64"]],["value"]]],[11,"from","","",0,[[["str"]],["value"]]],[11,"clone","","",0,[[["self"]],["value"]]],[11,"fmt","","",0,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",0,[[["formatter"],["self"]],["result"]]]],"p":[[4,"Value"],[3,"ModuleData"],[3,"ExportBinding"]]}; +searchIndex["wasmtime_jit"] = {"doc":"JIT-style runtime for WebAssembly using Cranelift.","i":[[3,"InstanceHandle","wasmtime_jit","A handle holding an `Instance` of a WebAssembly module.",null,null],[4,"InstantiationError","","An error while instantiating a module.",null,null],[13,"Resource","","Insufficient resources available for execution.",0,null],[13,"Link","","A wasm link error occured.",0,null],[13,"StartTrap","","A compilation error occured.",0,null],[3,"CodeMemory","","Memory manager for executable code.",null,null],[3,"Compiler","","A WebAssembly code JIT compiler.",null,null],[3,"CompiledModule","","A compiled wasm module, ready to be instantiated.",null,null],[3,"NullResolver","","`Resolver` implementation that always resolves to `None`.",null,null],[4,"CompilationStrategy","","Select which kind of compilation to use.",null,null],[13,"Auto","","Let Wasmtime pick the strategy.",1,null],[13,"Cranelift","","Compile all functions with Cranelift.",1,null],[4,"SetupError","","An error condition while setting up a wasm instance, be it…",null,null],[13,"Validate","","The module did not pass validation.",2,null],[13,"Compile","","A wasm translation error occured.",2,null],[13,"Instantiate","","Some runtime resource was unavailable or insufficient, or…",2,null],[13,"DebugInfo","","Debug information generation error occured.",2,null],[5,"instantiate","","Create a new wasm instance by compiling the wasm module in…",null,[[["resolver"],["bool"],["compiler"]],[["instancehandle"],["setuperror"],["result",["instancehandle","setuperror"]]]]],[5,"link_module","","Links a module that has been compiled with…",null,[[["module"],["primarymap"],["primarymap"],["relocations"]]]],[5,"target_tunables","","Return a `Tunables` instance tuned for the given target…",null,[[["triple"]],["tunables"]]],[11,"new","","Create a new `CodeMemory` instance.",3,[[],["self"]]],[11,"allocate_for_function","","Allocate a continuous memory block for a single compiled…",3,[[["self"],["compiledfunction"]],[["result",["string"]],["string"]]]],[11,"allocate_for_compilation","","Allocate a continuous memory block for a compilation.",3,[[["self"],["compilation"]],[["string"],["box"],["result",["box","string"]]]]],[11,"publish","","Make all allocated memory executable.",3,[[["self"]]]],[11,"new","","Construct a new `Compiler`.",4,[[["targetisa"],["box",["targetisa"]],["cacheconfig"],["compilationstrategy"]],["self"]]],[11,"frontend_config","","Return the target's frontend configuration settings.",4,[[["self"]],["targetfrontendconfig"]]],[11,"tunables","","Return the tunables in use by this engine.",4,[[["self"]],["tunables"]]],[11,"get_published_trampoline","","Create and publish a trampoline for invoking a function.",4,[[["self"],["signature"],["usize"]],[["setuperror"],["result",["setuperror"]]]]],[11,"signatures","","Shared signature registry.",4,[[["self"]],["signatureregistry"]]],[11,"trap_registry","","Shared registration of trap information",4,[[["self"]],["trapregistry"]]],[11,"new","","Compile a data buffer into a `CompiledModule`, which may…",5,[[["bool"],["compiler"]],[["result",["setuperror"]],["setuperror"]]]],[11,"from_parts","","Construct a `CompiledModule` from component parts.",5,[[["option",["gdbjitimageregistration"]],["vmsharedsignatureindex"],["boxedslice",["definedfuncindex"]],["box"],["boxedslice",["signatureindex","vmsharedsignatureindex"]],["gdbjitimageregistration"],["trapregistration"],["definedfuncindex"],["module"],["signatureindex"]],["self"]]],[11,"instantiate","","Crate an `Instance` from this `CompiledModule`.",5,[[["resolver"],["self"]],[["instancehandle"],["instantiationerror"],["result",["instancehandle","instantiationerror"]]]]],[11,"module","","Return a reference-counting pointer to a module.",5,[[["self"]],["arc"]]],[11,"module_ref","","Return a reference to a module.",5,[[["self"]],["module"]]],[11,"finished_functions","","Returns the map of all finished JIT functions compiled for…",5,[[["self"]],["boxedslice"]]],[0,"native","","",null,null],[5,"lookup","wasmtime_jit::native","Look for an ISA for the given `triple`. Return a builder…",null,[[["triple"]],[["lookuperror"],["result",["builder","lookuperror"]],["builder"]]]],[5,"builder","","",null,[[],["builder"]]],[5,"call_conv","","",null,[[],["callconv"]]],[0,"trampoline","wasmtime_jit","",null,null],[5,"pretty_error","wasmtime_jit::trampoline","Pretty-print a Cranelift error.",null,[[["function"],["targetisa"],["codegenerror"],["option",["targetisa"]]],["string"]]],[3,"Context","","Persistent data structures and compilation pipeline.",null,null],[12,"func","","The function we're compiling.",6,null],[12,"cfg","","The control flow graph of `func`.",6,null],[12,"domtree","","Dominator tree for `func`.",6,null],[12,"regalloc","","Register allocation context.",6,null],[12,"loop_analysis","","Loop analysis of `func`.",6,null],[12,"redundant_reload_remover","","Redundant-reload remover context.",6,null],[3,"FunctionBuilder","","Temporary object used to build a single Cranelift IR…",null,null],[12,"func","","The function currently being built. This field is public…",7,null],[3,"FunctionBuilderContext","","Structure used for translating a series of functions into…",null,null],[0,"ir","","",null,null],[4,"ExternalName","wasmtime_jit::trampoline::ir","The name of an external is either a reference to a…",null,null],[13,"User","","A name in a user-defined symbol table. Cranelift does not…",8,null],[12,"namespace","wasmtime_jit::trampoline::ir::ExternalName","Arbitrary.",9,null],[12,"index","","Arbitrary.",9,null],[13,"TestCase","wasmtime_jit::trampoline::ir","A test case function name of up to a hardcoded amount of…",8,null],[12,"length","wasmtime_jit::trampoline::ir::ExternalName","How many of the bytes in `ascii` are valid?",10,null],[12,"ascii","","Ascii bytes of the name.",10,null],[13,"LibCall","wasmtime_jit::trampoline::ir","A well-known runtime library function.",8,null],[3,"Function","","A function.",null,null],[12,"name","","Name of this function. Mostly used by `.clif` files.",11,null],[12,"signature","","Signature of this function.",11,null],[12,"old_signature","","The old signature of this function, before the most recent…",11,null],[12,"stack_slots","","Stack slots allocated in this function.",11,null],[12,"global_values","","Global values referenced.",11,null],[12,"heaps","","Heaps referenced.",11,null],[12,"tables","","Tables referenced.",11,null],[12,"jump_tables","","Jump tables used in this function.",11,null],[12,"dfg","","Data flow graph containing the primary definition of all…",11,null],[12,"layout","","Layout of blocks and instructions in the function body.",11,null],[12,"encodings","","Encoding recipe and bits for the legal instructions.…",11,null],[12,"locations","","Location assigned to every value.",11,null],[12,"entry_diversions","","Non-default locations assigned to value at the entry of…",11,null],[12,"offsets","","Code offsets of the block headers.",11,null],[12,"jt_offsets","","Code offsets of Jump Table headers.",11,null],[12,"srclocs","","Source locations.",11,null],[12,"prologue_end","","Instruction that marks the end (inclusive) of the…",11,null],[12,"frame_layout","","Frame layout for the instructions.",11,null],[8,"InstBuilder","","Convenience methods for building instructions.",null,null],[11,"jump","","Jump.",12,[[["block"]],["inst"]]],[11,"fallthrough","","Fall through to the next block.",12,[[["block"]],["inst"]]],[11,"brz","","Branch when zero.",12,[[["value"],["block"]],["inst"]]],[11,"brnz","","Branch when non-zero.",12,[[["value"],["block"]],["inst"]]],[11,"br_icmp","","Compare scalar integers and branch.",12,[[["value"],["t1"],["block"]],["inst"]]],[11,"brif","","Branch when condition is true in integer CPU flags.",12,[[["value"],["t1"],["block"]],["inst"]]],[11,"brff","","Branch when condition is true in floating point CPU flags.",12,[[["value"],["t1"],["block"]],["inst"]]],[11,"br_table","","Indirect branch via jump table.",12,[[["value"],["block"],["jumptable"]],["inst"]]],[11,"jump_table_entry","","Get an entry from a jump table.",12,[[["value"],["t1"],["jumptable"]],["value"]]],[11,"jump_table_base","","Get the absolute base address of a jump table.",12,[[["type"],["jumptable"]],["value"]]],[11,"indirect_jump_table_br","","Branch indirectly via a jump table entry.",12,[[["value"],["jumptable"]],["inst"]]],[11,"debugtrap","","Encodes an assembly debug trap.",12,[[],["inst"]]],[11,"trap","","Terminate execution unconditionally.",12,[[["t1"]],["inst"]]],[11,"trapz","","Trap when zero.",12,[[["value"],["t1"]],["inst"]]],[11,"resumable_trap","","A resumable trap.",12,[[["t1"]],["inst"]]],[11,"trapnz","","Trap when non-zero.",12,[[["value"],["t1"]],["inst"]]],[11,"trapif","","Trap when condition is true in integer CPU flags.",12,[[["value"],["t1"],["t2"]],["inst"]]],[11,"trapff","","Trap when condition is true in floating point CPU flags.",12,[[["value"],["t1"],["t2"]],["inst"]]],[11,"return_","","Return from the function.",12,[[],["inst"]]],[11,"fallthrough_return","","Return from the function by fallthrough.",12,[[],["inst"]]],[11,"call","","Direct function call.",12,[[["funcref"]],["inst"]]],[11,"call_indirect","","Indirect function call.",12,[[["value"],["sigref"]],["inst"]]],[11,"func_addr","","Get the address of a function.",12,[[["type"],["funcref"]],["value"]]],[11,"load","","Load from memory at `p + Offset`.",12,[[["value"],["t1"],["t2"],["type"]],["value"]]],[11,"load_complex","","Load from memory at `sum(args) + Offset`.",12,[[["t1"],["type"],["t2"]],["value"]]],[11,"store","","Store `x` to memory at `p + Offset`.",12,[[["value"],["t1"],["t2"]],["inst"]]],[11,"store_complex","","Store `x` to memory at `sum(args) + Offset`.",12,[[["value"],["t1"],["t2"]],["inst"]]],[11,"uload8","","Load 8 bits from memory at `p + Offset` and zero-extend.",12,[[["value"],["t1"],["t2"],["type"]],["value"]]],[11,"uload8_complex","","Load 8 bits from memory at `sum(args) + Offset` and…",12,[[["t1"],["type"],["t2"]],["value"]]],[11,"sload8","","Load 8 bits from memory at `p + Offset` and sign-extend.",12,[[["value"],["t1"],["t2"],["type"]],["value"]]],[11,"sload8_complex","","Load 8 bits from memory at `sum(args) + Offset` and…",12,[[["t1"],["type"],["t2"]],["value"]]],[11,"istore8","","Store the low 8 bits of `x` to memory at `p + Offset`.",12,[[["value"],["t1"],["t2"]],["inst"]]],[11,"istore8_complex","","Store the low 8 bits of `x` to memory at `sum(args) +…",12,[[["value"],["t1"],["t2"]],["inst"]]],[11,"uload16","","Load 16 bits from memory at `p + Offset` and zero-extend.",12,[[["value"],["t1"],["t2"],["type"]],["value"]]],[11,"uload16_complex","","Load 16 bits from memory at `sum(args) + Offset` and…",12,[[["t1"],["type"],["t2"]],["value"]]],[11,"sload16","","Load 16 bits from memory at `p + Offset` and sign-extend.",12,[[["value"],["t1"],["t2"],["type"]],["value"]]],[11,"sload16_complex","","Load 16 bits from memory at `sum(args) + Offset` and…",12,[[["t1"],["type"],["t2"]],["value"]]],[11,"istore16","","Store the low 16 bits of `x` to memory at `p + Offset`.",12,[[["value"],["t1"],["t2"]],["inst"]]],[11,"istore16_complex","","Store the low 16 bits of `x` to memory at `sum(args) +…",12,[[["value"],["t1"],["t2"]],["inst"]]],[11,"uload32","","Load 32 bits from memory at `p + Offset` and zero-extend.",12,[[["value"],["t1"],["t2"]],["value"]]],[11,"uload32_complex","","Load 32 bits from memory at `sum(args) + Offset` and…",12,[[["t1"],["t2"]],["value"]]],[11,"sload32","","Load 32 bits from memory at `p + Offset` and sign-extend.",12,[[["value"],["t1"],["t2"]],["value"]]],[11,"sload32_complex","","Load 32 bits from memory at `sum(args) + Offset` and…",12,[[["t1"],["t2"]],["value"]]],[11,"istore32","","Store the low 32 bits of `x` to memory at `p + Offset`.",12,[[["value"],["t1"],["t2"]],["inst"]]],[11,"istore32_complex","","Store the low 32 bits of `x` to memory at `sum(args) +…",12,[[["value"],["t1"],["t2"]],["inst"]]],[11,"stack_load","","Load a value from a stack slot at the constant offset.",12,[[["stackslot"],["type"],["t1"]],["value"]]],[11,"stack_store","","Store a value to a stack slot at a constant offset.",12,[[["value"],["stackslot"],["t1"]],["inst"]]],[11,"stack_addr","","Get the address of a stack slot.",12,[[["stackslot"],["type"],["t1"]],["value"]]],[11,"global_value","","Compute the value of global GV.",12,[[["type"],["globalvalue"]],["value"]]],[11,"symbol_value","","Compute the value of global GV, which is a symbolic value.",12,[[["type"],["globalvalue"]],["value"]]],[11,"heap_addr","","Bounds check and compute absolute address of heap memory.",12,[[["value"],["t1"],["type"],["heap"]],["value"]]],[11,"get_pinned_reg","","Gets the content of the pinned register, when it's enabled.",12,[[["type"]],["value"]]],[11,"set_pinned_reg","","Sets the content of the pinned register, when it's enabled.",12,[[["value"]],["inst"]]],[11,"table_addr","","Bounds check and compute absolute address of a table entry.",12,[[["value"],["t1"],["table"],["type"]],["value"]]],[11,"iconst","","Integer constant.",12,[[["type"],["t1"]],["value"]]],[11,"f32const","","Floating point constant.",12,[[["t1"]],["value"]]],[11,"f64const","","Floating point constant.",12,[[["t1"]],["value"]]],[11,"bconst","","Boolean constant.",12,[[["type"],["t1"]],["value"]]],[11,"vconst","","SIMD vector constant.",12,[[["type"],["t1"]],["value"]]],[11,"shuffle","","SIMD vector shuffle.",12,[[["value"],["t1"]],["value"]]],[11,"null","","Null constant value for reference types.",12,[[["type"]],["value"]]],[11,"nop","","Just a dummy instruction.",12,[[],["inst"]]],[11,"select","","Conditional select.",12,[[["value"]],["value"]]],[11,"selectif","","Conditional select, dependent on integer condition codes.",12,[[["value"],["t1"],["type"]],["value"]]],[11,"bitselect","","Conditional select of bits.",12,[[["value"]],["value"]]],[11,"copy","","Register-register copy.",12,[[["value"]],["value"]]],[11,"spill","","Spill a register value to a stack slot.",12,[[["value"]],["value"]]],[11,"fill","","Load a register value from a stack slot.",12,[[["value"]],["value"]]],[11,"fill_nop","","This is identical to `fill`, except it has no encoding,…",12,[[["value"]],["value"]]],[11,"regmove","","Temporarily divert `x` from `src` to `dst`.",12,[[["value"],["t1"],["t2"]],["inst"]]],[11,"copy_special","","Copies the contents of ''src'' register to ''dst'' register.",12,[[["t2"],["t1"]],["inst"]]],[11,"copy_to_ssa","","Copies the contents of ''src'' register to ''a'' SSA name.",12,[[["type"],["t1"]],["value"]]],[11,"copy_nop","","Stack-slot-to-the-same-stack-slot copy, which is…",12,[[["value"]],["value"]]],[11,"adjust_sp_down","","Subtracts `delta` offset value from the stack pointer…",12,[[["value"]],["inst"]]],[11,"adjust_sp_up_imm","","Adds `Offset` immediate offset value to the stack pointer…",12,[[["t1"]],["inst"]]],[11,"adjust_sp_down_imm","","Subtracts `Offset` immediate offset value from the stack…",12,[[["t1"]],["inst"]]],[11,"ifcmp_sp","","Compare `addr` with the stack pointer and set the CPU flags.",12,[[["value"]],["value"]]],[11,"regspill","","Temporarily divert `x` from `src` to `SS`.",12,[[["value"],["t1"],["stackslot"]],["inst"]]],[11,"regfill","","Temporarily divert `x` from `SS` to `dst`.",12,[[["value"],["stackslot"],["t1"]],["inst"]]],[11,"safepoint","","This instruction will provide live reference values at a…",12,[[],["inst"]]],[11,"vsplit","","Split a vector into two halves.",12,[[["value"]]]],[11,"vconcat","","Vector concatenation.",12,[[["value"]],["value"]]],[11,"vselect","","Vector lane select.",12,[[["value"]],["value"]]],[11,"vany_true","","Reduce a vector to a scalar boolean.",12,[[["value"]],["value"]]],[11,"vall_true","","Reduce a vector to a scalar boolean.",12,[[["value"]],["value"]]],[11,"splat","","Vector splat.",12,[[["value"],["type"]],["value"]]],[11,"insertlane","","Insert `y` as lane `Idx` in x.",12,[[["value"],["t1"]],["value"]]],[11,"extractlane","","Extract lane `Idx` from `x`.",12,[[["value"],["t1"]],["value"]]],[11,"icmp","","Integer comparison.",12,[[["value"],["t1"]],["value"]]],[11,"icmp_imm","","Compare scalar integer to a constant.",12,[[["value"],["t1"],["t2"]],["value"]]],[11,"ifcmp","","Compare scalar integers and return flags.",12,[[["value"]],["value"]]],[11,"ifcmp_imm","","Compare scalar integer to a constant and return flags.",12,[[["value"],["t1"]],["value"]]],[11,"iadd","","Wrapping integer addition: `a := x + y \\pmod{2^B}`.",12,[[["value"]],["value"]]],[11,"uadd_sat","","Add with unsigned saturation.",12,[[["value"]],["value"]]],[11,"sadd_sat","","Add with signed saturation.",12,[[["value"]],["value"]]],[11,"isub","","Wrapping integer subtraction: `a := x - y \\pmod{2^B}`.",12,[[["value"]],["value"]]],[11,"usub_sat","","Subtract with unsigned saturation.",12,[[["value"]],["value"]]],[11,"ssub_sat","","Subtract with signed saturation.",12,[[["value"]],["value"]]],[11,"ineg","","Integer negation: `a := -x \\pmod{2^B}`.",12,[[["value"]],["value"]]],[11,"imul","","Wrapping integer multiplication: `a := x y \\pmod{2^B}`.",12,[[["value"]],["value"]]],[11,"umulhi","","Unsigned integer multiplication, producing the high half…",12,[[["value"]],["value"]]],[11,"smulhi","","Signed integer multiplication, producing the high half of…",12,[[["value"]],["value"]]],[11,"udiv","","Unsigned integer division: `a := \\lfloor {x \\over y}…",12,[[["value"]],["value"]]],[11,"sdiv","","Signed integer division rounded toward zero: `a :=…",12,[[["value"]],["value"]]],[11,"urem","","Unsigned integer remainder.",12,[[["value"]],["value"]]],[11,"srem","","Signed integer remainder. The result has the sign of the…",12,[[["value"]],["value"]]],[11,"iadd_imm","","Add immediate integer.",12,[[["value"],["t1"]],["value"]]],[11,"imul_imm","","Integer multiplication by immediate constant.",12,[[["value"],["t1"]],["value"]]],[11,"udiv_imm","","Unsigned integer division by an immediate constant.",12,[[["value"],["t1"]],["value"]]],[11,"sdiv_imm","","Signed integer division by an immediate constant.",12,[[["value"],["t1"]],["value"]]],[11,"urem_imm","","Unsigned integer remainder with immediate divisor.",12,[[["value"],["t1"]],["value"]]],[11,"srem_imm","","Signed integer remainder with immediate divisor.",12,[[["value"],["t1"]],["value"]]],[11,"irsub_imm","","Immediate reverse wrapping subtraction: `a := Y - x…",12,[[["value"],["t1"]],["value"]]],[11,"iadd_cin","","Add integers with carry in.",12,[[["value"]],["value"]]],[11,"iadd_ifcin","","Add integers with carry in.",12,[[["value"]],["value"]]],[11,"iadd_cout","","Add integers with carry out.",12,[[["value"]]]],[11,"iadd_ifcout","","Add integers with carry out.",12,[[["value"]]]],[11,"iadd_carry","","Add integers with carry in and out.",12,[[["value"]]]],[11,"iadd_ifcarry","","Add integers with carry in and out.",12,[[["value"]]]],[11,"isub_bin","","Subtract integers with borrow in.",12,[[["value"]],["value"]]],[11,"isub_ifbin","","Subtract integers with borrow in.",12,[[["value"]],["value"]]],[11,"isub_bout","","Subtract integers with borrow out.",12,[[["value"]]]],[11,"isub_ifbout","","Subtract integers with borrow out.",12,[[["value"]]]],[11,"isub_borrow","","Subtract integers with borrow in and out.",12,[[["value"]]]],[11,"isub_ifborrow","","Subtract integers with borrow in and out.",12,[[["value"]]]],[11,"band","","Bitwise and.",12,[[["value"]],["value"]]],[11,"bor","","Bitwise or.",12,[[["value"]],["value"]]],[11,"bxor","","Bitwise xor.",12,[[["value"]],["value"]]],[11,"bnot","","Bitwise not.",12,[[["value"]],["value"]]],[11,"band_not","","Bitwise and not.",12,[[["value"]],["value"]]],[11,"bor_not","","Bitwise or not.",12,[[["value"]],["value"]]],[11,"bxor_not","","Bitwise xor not.",12,[[["value"]],["value"]]],[11,"band_imm","","Bitwise and with immediate.",12,[[["value"],["t1"]],["value"]]],[11,"bor_imm","","Bitwise or with immediate.",12,[[["value"],["t1"]],["value"]]],[11,"bxor_imm","","Bitwise xor with immediate.",12,[[["value"],["t1"]],["value"]]],[11,"rotl","","Rotate left.",12,[[["value"]],["value"]]],[11,"rotr","","Rotate right.",12,[[["value"]],["value"]]],[11,"rotl_imm","","Rotate left by immediate.",12,[[["value"],["t1"]],["value"]]],[11,"rotr_imm","","Rotate right by immediate.",12,[[["value"],["t1"]],["value"]]],[11,"ishl","","Integer shift left. Shift the bits in `x` towards the MSB…",12,[[["value"]],["value"]]],[11,"ushr","","Unsigned shift right. Shift bits in `x` towards the LSB by…",12,[[["value"]],["value"]]],[11,"sshr","","Signed shift right. Shift bits in `x` towards the LSB by…",12,[[["value"]],["value"]]],[11,"ishl_imm","","Integer shift left by immediate.",12,[[["value"],["t1"]],["value"]]],[11,"ushr_imm","","Unsigned shift right by immediate.",12,[[["value"],["t1"]],["value"]]],[11,"sshr_imm","","Signed shift right by immediate.",12,[[["value"],["t1"]],["value"]]],[11,"bitrev","","Reverse the bits of a integer.",12,[[["value"]],["value"]]],[11,"clz","","Count leading zero bits.",12,[[["value"]],["value"]]],[11,"cls","","Count leading sign bits.",12,[[["value"]],["value"]]],[11,"ctz","","Count trailing zeros.",12,[[["value"]],["value"]]],[11,"popcnt","","Population count",12,[[["value"]],["value"]]],[11,"fcmp","","Floating point comparison.",12,[[["value"],["t1"]],["value"]]],[11,"ffcmp","","Floating point comparison returning flags.",12,[[["value"]],["value"]]],[11,"fadd","","Floating point addition.",12,[[["value"]],["value"]]],[11,"fsub","","Floating point subtraction.",12,[[["value"]],["value"]]],[11,"fmul","","Floating point multiplication.",12,[[["value"]],["value"]]],[11,"fdiv","","Floating point division.",12,[[["value"]],["value"]]],[11,"sqrt","","Floating point square root.",12,[[["value"]],["value"]]],[11,"fma","","Floating point fused multiply-and-add.",12,[[["value"]],["value"]]],[11,"fneg","","Floating point negation.",12,[[["value"]],["value"]]],[11,"fabs","","Floating point absolute value.",12,[[["value"]],["value"]]],[11,"fcopysign","","Floating point copy sign.",12,[[["value"]],["value"]]],[11,"fmin","","Floating point minimum, propagating NaNs.",12,[[["value"]],["value"]]],[11,"fmax","","Floating point maximum, propagating NaNs.",12,[[["value"]],["value"]]],[11,"ceil","","Round floating point round to integral, towards positive…",12,[[["value"]],["value"]]],[11,"floor","","Round floating point round to integral, towards negative…",12,[[["value"]],["value"]]],[11,"trunc","","Round floating point round to integral, towards zero.",12,[[["value"]],["value"]]],[11,"nearest","","Round floating point round to integral, towards nearest…",12,[[["value"]],["value"]]],[11,"is_null","","Reference verification.",12,[[["value"]],["value"]]],[11,"is_invalid","","Reference verification.",12,[[["value"]],["value"]]],[11,"trueif","","Test integer CPU flags for a specific condition.",12,[[["value"],["t1"]],["value"]]],[11,"trueff","","Test floating point CPU flags for a specific condition.",12,[[["value"],["t1"]],["value"]]],[11,"bitcast","","Reinterpret the bits in `x` as a different type.",12,[[["value"],["type"]],["value"]]],[11,"raw_bitcast","","Cast the bits in `x` as a different type of the same bit…",12,[[["value"],["type"]],["value"]]],[11,"scalar_to_vector","","Scalar To Vector -- move a value out of a scalar register…",12,[[["value"],["type"]],["value"]]],[11,"breduce","","Convert `x` to a smaller boolean type in the…",12,[[["value"],["type"]],["value"]]],[11,"bextend","","Convert `x` to a larger boolean type in the…",12,[[["value"],["type"]],["value"]]],[11,"bint","","Convert `x` to an integer.",12,[[["value"],["type"]],["value"]]],[11,"bmask","","Convert `x` to an integer mask.",12,[[["value"],["type"]],["value"]]],[11,"ireduce","","Convert `x` to a smaller integer type by dropping high bits.",12,[[["value"],["type"]],["value"]]],[11,"uextend","","Convert `x` to a larger integer type by zero-extending.",12,[[["value"],["type"]],["value"]]],[11,"sextend","","Convert `x` to a larger integer type by sign-extending.",12,[[["value"],["type"]],["value"]]],[11,"fpromote","","Convert `x` to a larger floating point format.",12,[[["value"],["type"]],["value"]]],[11,"fdemote","","Convert `x` to a smaller floating point format.",12,[[["value"],["type"]],["value"]]],[11,"fcvt_to_uint","","Convert floating point to unsigned integer.",12,[[["value"],["type"]],["value"]]],[11,"fcvt_to_uint_sat","","Convert floating point to unsigned integer as fcvt_to_uint…",12,[[["value"],["type"]],["value"]]],[11,"fcvt_to_sint","","Convert floating point to signed integer.",12,[[["value"],["type"]],["value"]]],[11,"fcvt_to_sint_sat","","Convert floating point to signed integer as fcvt_to_sint…",12,[[["value"],["type"]],["value"]]],[11,"fcvt_from_uint","","Convert unsigned integer to floating point.",12,[[["value"],["type"]],["value"]]],[11,"fcvt_from_sint","","Convert signed integer to floating point.",12,[[["value"],["type"]],["value"]]],[11,"isplit","","Split an integer into low and high parts.",12,[[["value"]]]],[11,"iconcat","","Concatenate low and high bits to form a larger integer type.",12,[[["value"]],["value"]]],[11,"x86_udivmodx","","Extended unsigned division.",12,[[["value"]]]],[11,"x86_sdivmodx","","Extended signed division.",12,[[["value"]]]],[11,"x86_umulx","","Unsigned integer multiplication, producing a double-length…",12,[[["value"]]]],[11,"x86_smulx","","Signed integer multiplication, producing a double-length…",12,[[["value"]]]],[11,"x86_cvtt2si","","Convert with truncation floating point to signed integer.",12,[[["value"],["type"]],["value"]]],[11,"x86_fmin","","Floating point minimum with x86 semantics.",12,[[["value"]],["value"]]],[11,"x86_fmax","","Floating point maximum with x86 semantics.",12,[[["value"]],["value"]]],[11,"x86_push","","Pushes a value onto the stack.",12,[[["value"]],["inst"]]],[11,"x86_pop","","Pops a value from the stack.",12,[[["type"]],["value"]]],[11,"x86_bsr","","Bit Scan Reverse -- returns the bit-index of the most…",12,[[["value"]]]],[11,"x86_bsf","","Bit Scan Forwards -- returns the bit-index of the least…",12,[[["value"]]]],[11,"x86_pshufd","","Packed Shuffle Doublewords -- copies data from either…",12,[[["value"],["t1"]],["value"]]],[11,"x86_pshufb","","Packed Shuffle Bytes -- re-orders data in an extended…",12,[[["value"]],["value"]]],[11,"x86_pextr","","Extract lane `Idx` from `x`. The lane index, `Idx`, is an…",12,[[["value"],["t1"]],["value"]]],[11,"x86_pinsr","","Insert `y` into `x` at lane `Idx`. The lane index, `Idx`,…",12,[[["value"],["t1"]],["value"]]],[11,"x86_insertps","","Insert a lane of `y` into `x` at using `Idx` to encode…",12,[[["value"],["t1"]],["value"]]],[11,"x86_movsd","","Move the low 64 bits of the float vector `y` to the low 64…",12,[[["value"]],["value"]]],[11,"x86_movlhps","","Move the low 64 bits of the float vector `y` to the high…",12,[[["value"]],["value"]]],[11,"x86_psll","","Shift Packed Data Left Logical -- This implements the…",12,[[["value"]],["value"]]],[11,"x86_psrl","","Shift Packed Data Right Logical -- This implements the…",12,[[["value"]],["value"]]],[11,"x86_psra","","Shift Packed Data Right Arithmetic -- This implements the…",12,[[["value"]],["value"]]],[11,"x86_ptest","","Logical Compare -- PTEST will set the ZF flag if all bits…",12,[[["value"]],["value"]]],[11,"x86_pmaxs","","Maximum of Packed Signed Integers -- Compare signed…",12,[[["value"]],["value"]]],[11,"x86_pmaxu","","Maximum of Packed Unsigned Integers -- Compare unsigned…",12,[[["value"]],["value"]]],[11,"x86_pmins","","Minimum of Packed Signed Integers -- Compare signed…",12,[[["value"]],["value"]]],[11,"x86_pminu","","Minimum of Packed Unsigned Integers -- Compare unsigned…",12,[[["value"]],["value"]]],[11,"Binary","","Binary(imms=(), vals=2)",12,[[["value"],["opcode"],["type"]]]],[11,"BinaryImm","","BinaryImm(imms=(imm: ir::immediates::Imm64), vals=1)",12,[[["value"],["opcode"],["type"],["imm64"]]]],[11,"Branch","","Branch(imms=(destination: ir::Block), vals=1)",12,[[["value"],["opcode"],["entitylist",["value"]],["type"],["block"]]]],[11,"BranchFloat","","BranchFloat(imms=(cond: ir::condcodes::FloatCC,…",12,[[["value"],["opcode"],["entitylist",["value"]],["floatcc"],["type"],["block"]]]],[11,"BranchIcmp","","BranchIcmp(imms=(cond: ir::condcodes::IntCC, destination:…",12,[[["value"],["opcode"],["entitylist",["value"]],["intcc"],["type"],["block"]]]],[11,"BranchInt","","BranchInt(imms=(cond: ir::condcodes::IntCC, destination:…",12,[[["value"],["opcode"],["entitylist",["value"]],["intcc"],["type"],["block"]]]],[11,"BranchTable","","BranchTable(imms=(destination: ir::Block, table:…",12,[[["value"],["opcode"],["type"],["block"],["jumptable"]]]],[11,"BranchTableBase","","BranchTableBase(imms=(table: ir::JumpTable), vals=0)",12,[[["opcode"],["type"],["jumptable"]]]],[11,"BranchTableEntry","","BranchTableEntry(imms=(imm: ir::immediates::Uimm8, table:…",12,[[["jumptable"],["opcode"],["value"],["type"],["u8"]]]],[11,"Call","","Call(imms=(func_ref: ir::FuncRef), vals=0)",12,[[["value"],["opcode"],["entitylist",["value"]],["type"],["funcref"]]]],[11,"CallIndirect","","CallIndirect(imms=(sig_ref: ir::SigRef), vals=1)",12,[[["value"],["opcode"],["entitylist",["value"]],["type"],["sigref"]]]],[11,"CondTrap","","CondTrap(imms=(code: ir::TrapCode), vals=1)",12,[[["trapcode"],["opcode"],["value"],["type"]]]],[11,"CopySpecial","","CopySpecial(imms=(src: isa::RegUnit, dst: isa::RegUnit),…",12,[[["opcode"],["u16"],["type"]]]],[11,"CopyToSsa","","CopyToSsa(imms=(src: isa::RegUnit), vals=0)",12,[[["u16"],["opcode"],["type"]]]],[11,"ExtractLane","","ExtractLane(imms=(lane: ir::immediates::Uimm8), vals=1)",12,[[["value"],["opcode"],["type"],["u8"]]]],[11,"FloatCompare","","FloatCompare(imms=(cond: ir::condcodes::FloatCC), vals=2)",12,[[["value"],["opcode"],["floatcc"],["type"]]]],[11,"FloatCond","","FloatCond(imms=(cond: ir::condcodes::FloatCC), vals=1)",12,[[["value"],["opcode"],["floatcc"],["type"]]]],[11,"FloatCondTrap","","FloatCondTrap(imms=(cond: ir::condcodes::FloatCC, code:…",12,[[["trapcode"],["opcode"],["value"],["floatcc"],["type"]]]],[11,"FuncAddr","","FuncAddr(imms=(func_ref: ir::FuncRef), vals=0)",12,[[["opcode"],["type"],["funcref"]]]],[11,"HeapAddr","","HeapAddr(imms=(heap: ir::Heap, imm:…",12,[[["value"],["opcode"],["uimm32"],["type"],["heap"]]]],[11,"IndirectJump","","IndirectJump(imms=(table: ir::JumpTable), vals=1)",12,[[["value"],["opcode"],["type"],["jumptable"]]]],[11,"InsertLane","","InsertLane(imms=(lane: ir::immediates::Uimm8), vals=2)",12,[[["value"],["opcode"],["type"],["u8"]]]],[11,"IntCompare","","IntCompare(imms=(cond: ir::condcodes::IntCC), vals=2)",12,[[["value"],["opcode"],["intcc"],["type"]]]],[11,"IntCompareImm","","IntCompareImm(imms=(cond: ir::condcodes::IntCC, imm:…",12,[[["value"],["opcode"],["intcc"],["type"],["imm64"]]]],[11,"IntCond","","IntCond(imms=(cond: ir::condcodes::IntCC), vals=1)",12,[[["value"],["opcode"],["intcc"],["type"]]]],[11,"IntCondTrap","","IntCondTrap(imms=(cond: ir::condcodes::IntCC, code:…",12,[[["trapcode"],["opcode"],["value"],["intcc"],["type"]]]],[11,"IntSelect","","IntSelect(imms=(cond: ir::condcodes::IntCC), vals=3)",12,[[["value"],["opcode"],["intcc"],["type"]]]],[11,"Jump","","Jump(imms=(destination: ir::Block), vals=0)",12,[[["value"],["opcode"],["entitylist",["value"]],["type"],["block"]]]],[11,"Load","","Load(imms=(flags: ir::MemFlags, offset:…",12,[[["value"],["opcode"],["offset32"],["type"],["memflags"]]]],[11,"LoadComplex","","LoadComplex(imms=(flags: ir::MemFlags, offset:…",12,[[["value"],["opcode"],["entitylist",["value"]],["offset32"],["type"],["memflags"]]]],[11,"MultiAry","","MultiAry(imms=(), vals=0)",12,[[["value"],["opcode"],["entitylist",["value"]],["type"]]]],[11,"NullAry","","NullAry(imms=(), vals=0)",12,[[["opcode"],["type"]]]],[11,"RegFill","","RegFill(imms=(src: ir::StackSlot, dst: isa::RegUnit),…",12,[[["value"],["opcode"],["stackslot"],["type"],["u16"]]]],[11,"RegMove","","RegMove(imms=(src: isa::RegUnit, dst: isa::RegUnit), vals=1)",12,[[["value"],["opcode"],["u16"],["type"]]]],[11,"RegSpill","","RegSpill(imms=(src: isa::RegUnit, dst: ir::StackSlot),…",12,[[["value"],["opcode"],["u16"],["type"],["stackslot"]]]],[11,"Shuffle","","Shuffle(imms=(mask: ir::Immediate), vals=2)",12,[[["value"],["opcode"],["immediate"],["type"]]]],[11,"StackLoad","","StackLoad(imms=(stack_slot: ir::StackSlot, offset:…",12,[[["opcode"],["stackslot"],["type"],["offset32"]]]],[11,"StackStore","","StackStore(imms=(stack_slot: ir::StackSlot, offset:…",12,[[["value"],["opcode"],["stackslot"],["type"],["offset32"]]]],[11,"Store","","Store(imms=(flags: ir::MemFlags, offset:…",12,[[["value"],["opcode"],["offset32"],["type"],["memflags"]]]],[11,"StoreComplex","","StoreComplex(imms=(flags: ir::MemFlags, offset:…",12,[[["value"],["opcode"],["entitylist",["value"]],["offset32"],["type"],["memflags"]]]],[11,"TableAddr","","TableAddr(imms=(table: ir::Table, offset:…",12,[[["value"],["opcode"],["table"],["offset32"],["type"]]]],[11,"Ternary","","Ternary(imms=(), vals=3)",12,[[["value"],["opcode"],["type"]]]],[11,"Trap","","Trap(imms=(code: ir::TrapCode), vals=0)",12,[[["trapcode"],["opcode"],["type"]]]],[11,"Unary","","Unary(imms=(), vals=1)",12,[[["value"],["opcode"],["type"]]]],[11,"UnaryBool","","UnaryBool(imms=(imm: bool), vals=0)",12,[[["opcode"],["type"],["bool"]]]],[11,"UnaryConst","","UnaryConst(imms=(constant_handle: ir::Constant), vals=0)",12,[[["opcode"],["type"],["constant"]]]],[11,"UnaryGlobalValue","","UnaryGlobalValue(imms=(global_value: ir::GlobalValue),…",12,[[["opcode"],["type"],["globalvalue"]]]],[11,"UnaryIeee32","","UnaryIeee32(imms=(imm: ir::immediates::Ieee32), vals=0)",12,[[["ieee32"],["opcode"],["type"]]]],[11,"UnaryIeee64","","UnaryIeee64(imms=(imm: ir::immediates::Ieee64), vals=0)",12,[[["opcode"],["type"],["ieee64"]]]],[11,"UnaryImm","","UnaryImm(imms=(imm: ir::immediates::Imm64), vals=0)",12,[[["opcode"],["type"],["imm64"]]]],[3,"MemFlags","","Flags for memory operations like load/store.",null,null],[3,"StackSlotData","","Contents of a stack slot.",null,null],[12,"kind","","The kind of stack slot.",13,null],[12,"size","","Size of stack slot in bytes.",13,null],[12,"offset","","Offset of stack slot relative to the stack pointer in the…",13,null],[4,"StackSlotKind","","The kind of a stack slot.",null,null],[13,"SpillSlot","","A spill slot. This is a stack slot created by the register…",14,null],[13,"ExplicitSlot","","An explicit stack slot. This is a chunk of stack memory…",14,null],[13,"IncomingArg","","An incoming function argument.",14,null],[13,"OutgoingArg","","An outgoing function argument.",14,null],[13,"StructReturnSlot","","Space allocated in the caller's frame for the callee's…",14,null],[13,"EmergencySlot","","An emergency spill slot.",14,null],[0,"binemit","wasmtime_jit::trampoline","",null,null],[3,"NullTrapSink","wasmtime_jit::trampoline::binemit","A `TrapSink` implementation that does nothing, which is…",null,null],[6,"CodeOffset","","Offset in bytes from the beginning of the function.",null,null],[3,"NullStackmapSink","","Placeholder StackmapSink that does nothing.",null,null],[8,"TrapSink","","A trait for receiving trap codes and offsets.",null,null],[10,"trap","","Add trap information for a specific offset.",15,[[["trapcode"],["u32"],["sourceloc"],["self"]]]],[3,"TrampolineRelocSink","","We don't expect trampoline compilation to produce any…",null,null],[17,"VERSION","wasmtime_jit","Version number of this crate.",null,null],[8,"Resolver","","Import resolver connects imports with available exported…",null,null],[10,"resolve","","Resolves an import a WebAssembly module to an export it's…",16,[[["str"],["u32"],["self"]],[["option",["export"]],["export"]]]],[11,"from","","",17,[[["t"]],["t"]]],[11,"into","","",17,[[],["u"]]],[11,"to_owned","","",17,[[["self"]],["t"]]],[11,"clone_into","","",17,[[["self"],["t"]]]],[11,"try_from","","",17,[[["u"]],["result"]]],[11,"try_into","","",17,[[],["result"]]],[11,"borrow","","",17,[[["self"]],["t"]]],[11,"borrow_mut","","",17,[[["self"]],["t"]]],[11,"type_id","","",17,[[["self"]],["typeid"]]],[11,"equivalent","","",17,[[["k"],["self"]],["bool"]]],[11,"from","","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"to_string","","",0,[[["self"]],["string"]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]],[11,"from","","",3,[[["t"]],["t"]]],[11,"into","","",3,[[],["u"]]],[11,"try_from","","",3,[[["u"]],["result"]]],[11,"try_into","","",3,[[],["result"]]],[11,"borrow","","",3,[[["self"]],["t"]]],[11,"borrow_mut","","",3,[[["self"]],["t"]]],[11,"type_id","","",3,[[["self"]],["typeid"]]],[11,"from","","",4,[[["t"]],["t"]]],[11,"into","","",4,[[],["u"]]],[11,"try_from","","",4,[[["u"]],["result"]]],[11,"try_into","","",4,[[],["result"]]],[11,"borrow","","",4,[[["self"]],["t"]]],[11,"borrow_mut","","",4,[[["self"]],["t"]]],[11,"type_id","","",4,[[["self"]],["typeid"]]],[11,"from","","",5,[[["t"]],["t"]]],[11,"into","","",5,[[],["u"]]],[11,"try_from","","",5,[[["u"]],["result"]]],[11,"try_into","","",5,[[],["result"]]],[11,"borrow","","",5,[[["self"]],["t"]]],[11,"borrow_mut","","",5,[[["self"]],["t"]]],[11,"type_id","","",5,[[["self"]],["typeid"]]],[11,"from","","",18,[[["t"]],["t"]]],[11,"into","","",18,[[],["u"]]],[11,"try_from","","",18,[[["u"]],["result"]]],[11,"try_into","","",18,[[],["result"]]],[11,"borrow","","",18,[[["self"]],["t"]]],[11,"borrow_mut","","",18,[[["self"]],["t"]]],[11,"type_id","","",18,[[["self"]],["typeid"]]],[11,"from","","",1,[[["t"]],["t"]]],[11,"into","","",1,[[],["u"]]],[11,"to_owned","","",1,[[["self"]],["t"]]],[11,"clone_into","","",1,[[["self"],["t"]]]],[11,"try_from","","",1,[[["u"]],["result"]]],[11,"try_into","","",1,[[],["result"]]],[11,"borrow","","",1,[[["self"]],["t"]]],[11,"borrow_mut","","",1,[[["self"]],["t"]]],[11,"type_id","","",1,[[["self"]],["typeid"]]],[11,"from","","",2,[[["t"]],["t"]]],[11,"into","","",2,[[],["u"]]],[11,"to_string","","",2,[[["self"]],["string"]]],[11,"try_from","","",2,[[["u"]],["result"]]],[11,"try_into","","",2,[[],["result"]]],[11,"borrow","","",2,[[["self"]],["t"]]],[11,"borrow_mut","","",2,[[["self"]],["t"]]],[11,"type_id","","",2,[[["self"]],["typeid"]]],[11,"from","wasmtime_jit::trampoline","",6,[[["t"]],["t"]]],[11,"into","","",6,[[],["u"]]],[11,"try_from","","",6,[[["u"]],["result"]]],[11,"try_into","","",6,[[],["result"]]],[11,"borrow","","",6,[[["self"]],["t"]]],[11,"borrow_mut","","",6,[[["self"]],["t"]]],[11,"type_id","","",6,[[["self"]],["typeid"]]],[11,"from","","",7,[[["t"]],["t"]]],[11,"into","","",7,[[],["u"]]],[11,"try_from","","",7,[[["u"]],["result"]]],[11,"try_into","","",7,[[],["result"]]],[11,"borrow","","",7,[[["self"]],["t"]]],[11,"borrow_mut","","",7,[[["self"]],["t"]]],[11,"type_id","","",7,[[["self"]],["typeid"]]],[11,"from","","",19,[[["t"]],["t"]]],[11,"into","","",19,[[],["u"]]],[11,"try_from","","",19,[[["u"]],["result"]]],[11,"try_into","","",19,[[],["result"]]],[11,"borrow","","",19,[[["self"]],["t"]]],[11,"borrow_mut","","",19,[[["self"]],["t"]]],[11,"type_id","","",19,[[["self"]],["typeid"]]],[11,"from","wasmtime_jit::trampoline::ir","",8,[[["t"]],["t"]]],[11,"into","","",8,[[],["u"]]],[11,"to_owned","","",8,[[["self"]],["t"]]],[11,"clone_into","","",8,[[["self"],["t"]]]],[11,"to_string","","",8,[[["self"]],["string"]]],[11,"try_from","","",8,[[["u"]],["result"]]],[11,"try_into","","",8,[[],["result"]]],[11,"borrow","","",8,[[["self"]],["t"]]],[11,"borrow_mut","","",8,[[["self"]],["t"]]],[11,"type_id","","",8,[[["self"]],["typeid"]]],[11,"equivalent","","",8,[[["k"],["self"]],["bool"]]],[11,"from","","",11,[[["t"]],["t"]]],[11,"into","","",11,[[],["u"]]],[11,"to_owned","","",11,[[["self"]],["t"]]],[11,"clone_into","","",11,[[["self"],["t"]]]],[11,"to_string","","",11,[[["self"]],["string"]]],[11,"try_from","","",11,[[["u"]],["result"]]],[11,"try_into","","",11,[[],["result"]]],[11,"borrow","","",11,[[["self"]],["t"]]],[11,"borrow_mut","","",11,[[["self"]],["t"]]],[11,"type_id","","",11,[[["self"]],["typeid"]]],[11,"from","","",20,[[["t"]],["t"]]],[11,"into","","",20,[[],["u"]]],[11,"to_owned","","",20,[[["self"]],["t"]]],[11,"clone_into","","",20,[[["self"],["t"]]]],[11,"to_string","","",20,[[["self"]],["string"]]],[11,"try_from","","",20,[[["u"]],["result"]]],[11,"try_into","","",20,[[],["result"]]],[11,"borrow","","",20,[[["self"]],["t"]]],[11,"borrow_mut","","",20,[[["self"]],["t"]]],[11,"type_id","","",20,[[["self"]],["typeid"]]],[11,"equivalent","","",20,[[["k"],["self"]],["bool"]]],[11,"from","","",13,[[["t"]],["t"]]],[11,"into","","",13,[[],["u"]]],[11,"to_owned","","",13,[[["self"]],["t"]]],[11,"clone_into","","",13,[[["self"],["t"]]]],[11,"to_string","","",13,[[["self"]],["string"]]],[11,"try_from","","",13,[[["u"]],["result"]]],[11,"try_into","","",13,[[],["result"]]],[11,"borrow","","",13,[[["self"]],["t"]]],[11,"borrow_mut","","",13,[[["self"]],["t"]]],[11,"type_id","","",13,[[["self"]],["typeid"]]],[11,"equivalent","","",13,[[["k"],["self"]],["bool"]]],[11,"from","","",14,[[["t"]],["t"]]],[11,"into","","",14,[[],["u"]]],[11,"to_owned","","",14,[[["self"]],["t"]]],[11,"clone_into","","",14,[[["self"],["t"]]]],[11,"to_string","","",14,[[["self"]],["string"]]],[11,"try_from","","",14,[[["u"]],["result"]]],[11,"try_into","","",14,[[],["result"]]],[11,"borrow","","",14,[[["self"]],["t"]]],[11,"borrow_mut","","",14,[[["self"]],["t"]]],[11,"type_id","","",14,[[["self"]],["typeid"]]],[11,"equivalent","","",14,[[["k"],["self"]],["bool"]]],[11,"from","wasmtime_jit::trampoline::binemit","",21,[[["t"]],["t"]]],[11,"into","","",21,[[],["u"]]],[11,"try_from","","",21,[[["u"]],["result"]]],[11,"try_into","","",21,[[],["result"]]],[11,"borrow","","",21,[[["self"]],["t"]]],[11,"borrow_mut","","",21,[[["self"]],["t"]]],[11,"type_id","","",21,[[["self"]],["typeid"]]],[11,"from","","",22,[[["t"]],["t"]]],[11,"into","","",22,[[],["u"]]],[11,"try_from","","",22,[[["u"]],["result"]]],[11,"try_into","","",22,[[],["result"]]],[11,"borrow","","",22,[[["self"]],["t"]]],[11,"borrow_mut","","",22,[[["self"]],["t"]]],[11,"type_id","","",22,[[["self"]],["typeid"]]],[11,"from","","",23,[[["t"]],["t"]]],[11,"into","","",23,[[],["u"]]],[11,"try_from","","",23,[[["u"]],["result"]]],[11,"try_into","","",23,[[],["result"]]],[11,"borrow","","",23,[[["self"]],["t"]]],[11,"borrow_mut","","",23,[[["self"]],["t"]]],[11,"type_id","","",23,[[["self"]],["typeid"]]],[11,"eq","wasmtime_jit::trampoline::ir","",14,[[["stackslotkind"],["self"]],["bool"]]],[11,"eq","","",13,[[["self"],["stackslotdata"]],["bool"]]],[11,"ne","","",13,[[["self"],["stackslotdata"]],["bool"]]],[11,"eq","","",20,[[["memflags"],["self"]],["bool"]]],[11,"ne","","",20,[[["memflags"],["self"]],["bool"]]],[11,"eq","","",8,[[["self"],["externalname"]],["bool"]]],[11,"ne","","",8,[[["self"],["externalname"]],["bool"]]],[11,"from_str","","",14,[[["str"]],[["result",["stackslotkind"]],["stackslotkind"]]]],[11,"from_str","","",8,[[["str"]],[["result",["externalname"]],["externalname"]]]],[11,"default","","",8,[[],["externalname"]]],[11,"clone","","",8,[[["self"]],["externalname"]]],[11,"clone","","",20,[[["self"]],["memflags"]]],[11,"clone","","",11,[[["self"]],["function"]]],[11,"clone","","",13,[[["self"]],["stackslotdata"]]],[11,"clone","","",14,[[["self"]],["stackslotkind"]]],[11,"deserialize","","",14,[[["__d"]],[["result",["stackslotkind"]],["stackslotkind"]]]],[11,"deserialize","","",13,[[["__d"]],[["result",["stackslotdata"]],["stackslotdata"]]]],[11,"hash","","",20,[[["self"],["__h"]]]],[11,"trap","wasmtime_jit::trampoline::binemit","",21,[[["trapcode"],["u32"],["sourceloc"],["self"]]]],[11,"fmt","wasmtime_jit::trampoline::ir","",8,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",20,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",11,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",14,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",13,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",20,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",8,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",13,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",14,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"fmt","","",11,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"add_stackmap","wasmtime_jit::trampoline::binemit","",22,[[["self"],["u32"],["stackmap"]]]],[11,"serialize","wasmtime_jit::trampoline::ir","",14,[[["self"],["__s"]],["result"]]],[11,"serialize","","",13,[[["self"],["__s"]],["result"]]],[11,"hash","wasmtime_jit","",17,[[["self"],["__h"]]]],[11,"drop","","",17,[[["self"]]]],[11,"eq","","",17,[[["self"],["instancehandle"]],["bool"]]],[11,"ne","","",17,[[["self"],["instancehandle"]],["bool"]]],[11,"fmt","","",0,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"source","","",0,[[["self"]],[["error"],["option",["error"]]]]],[11,"clone","","",17,[[["self"]],["instancehandle"]]],[11,"fmt","","",0,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"from","","",0,[[["linkerror"]],["instantiationerror"]]],[11,"resolve","","",18,[[["str"],["u32"],["self"]],[["option",["export"]],["export"]]]],[11,"from","","",2,[[["compileerror"]],["self"]]],[11,"from","","",2,[[["instantiationerror"]],["self"]]],[11,"from","","",2,[[["error"]],["self"]]],[11,"clone","","",1,[[["self"]],["compilationstrategy"]]],[11,"fmt","","",1,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",2,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",2,[[["self"],["formatter"]],["result"]]],[11,"source","","",2,[[["self"]],[["error"],["option",["error"]]]]],[11,"reloc_block","wasmtime_jit::trampoline::binemit","",23,[[["codeoffset"],["reloc"],["self"]]]],[11,"reloc_external","","",23,[[["codeoffset"],["reloc"],["addend"],["self"],["externalname"]]]],[11,"reloc_constant","","",23,[[["codeoffset"],["reloc"],["self"],["constantoffset"]]]],[11,"reloc_jt","","",23,[[["jumptable"],["codeoffset"],["reloc"],["self"]]]],[11,"new","wasmtime_jit","Create a new `InstanceHandle` pointing at a new `Instance`.",17,[[["box",["any"]],["boxedslice",["signatureindex","vmsharedsignatureindex"]],["definedfuncindex"],["rc",["gdbjitimageregistration"]],["boxedslice",["definedfuncindex"]],["vmsharedsignatureindex"],["any"],["trapregistration"],["signatureindex"],["arc",["module"]],["option",["rc"]],["imports"],["module"]],[["instantiationerror"],["result",["instancehandle","instantiationerror"]],["instancehandle"]]]],[11,"from_vmctx","","Create a new `InstanceHandle` pointing at the instance…",17,[[],["instancehandle"]]],[11,"vmctx","","Return a reference to the vmctx used by compiled wasm code.",17,[[["self"]],["vmcontext"]]],[11,"vmctx_ptr","","Return a raw pointer to the vmctx used by compiled wasm…",17,[[["self"]]]],[11,"module","","Return a reference-counting pointer to a module.",17,[[["self"]],["arc"]]],[11,"module_ref","","Return a reference to a module.",17,[[["self"]],["module"]]],[11,"lookup","","Lookup an export with the given name.",17,[[["str"],["self"]],[["export"],["option",["export"]]]]],[11,"lookup_by_declaration","","Lookup an export with the given export declaration.",17,[[["self"],["export"]],["export"]]],[11,"exports","","Return an iterator over the exports of this instance.",17,[[["self"]],[["string"],["export"],["iter",["string","export"]]]]],[11,"host_state","","Return a reference to the custom state attached to this…",17,[[["self"]],["any"]]],[11,"memory_index","","Return the memory index for the given `VMMemoryDefinition`…",17,[[["self"],["vmmemorydefinition"]],["definedmemoryindex"]]],[11,"memory_grow","","Grow memory in this instance by the specified amount of…",17,[[["definedmemoryindex"],["self"],["u32"]],[["option",["u32"]],["u32"]]]],[11,"table_index","","Return the table index for the given `VMTableDefinition`…",17,[[["self"],["vmtabledefinition"]],["definedtableindex"]]],[11,"table_grow","","Grow table in this instance by the specified amount of…",17,[[["definedtableindex"],["self"],["u32"]],[["option",["u32"]],["u32"]]]],[11,"table_get","","Get table element reference.",17,[[["definedtableindex"],["self"],["u32"]],[["vmcallercheckedanyfunc"],["option",["vmcallercheckedanyfunc"]]]]],[11,"table_set","","Set table element reference.",17,[[["vmcallercheckedanyfunc"],["u32"],["definedtableindex"],["self"]],["result"]]],[11,"set_signal_handler","","Set a custom signal handler",17,[[["self"],["h"]]]],[11,"new","wasmtime_jit::trampoline","Allocate a new compilation context.",6,[[],["context"]]],[11,"for_function","","Allocate a new compilation context with an existing…",6,[[["function"]],["context"]]],[11,"clear","","Clear all data structures in this context.",6,[[["self"]]]],[11,"compile_and_emit","","Compile the function, and emit machine code into a…",6,[[["targetisa"],["trapsink"],["relocsink"],["vec"],["self"],["stackmapsink"]],[["codegenerror"],["codeinfo"],["result",["codeinfo","codegenerror"]]]]],[11,"compile","","Compile the function.",6,[[["self"],["targetisa"]],[["codegenerror"],["codeinfo"],["result",["codeinfo","codegenerror"]]]]],[11,"emit_to_memory","","Emit machine code directly into raw memory.",6,[[["targetisa"],["relocsink"],["trapsink"],["self"],["stackmapsink"]],["codeinfo"]]],[11,"emit_unwind_info","","Emit unwind information.",6,[[["targetisa"],["frameunwindkind"],["self"],["frameunwindsink"]]]],[11,"verify","","Run the verifier on the function.",6,[[["foi"],["self"]],[["result",["verifiererrors"]],["verifiererrors"]]]],[11,"verify_if","","Run the verifier only if the `enable_verifier` setting is…",6,[[["foi"],["self"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"verify_locations","","Run the locations verifier on the function.",6,[[["targetisa"],["self"]],[["result",["verifiererrors"]],["verifiererrors"]]]],[11,"verify_locations_if","","Run the locations verifier only if the `enable_verifier`…",6,[[["targetisa"],["self"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"dce","","Perform dead-code elimination on the function.",6,[[["foi"],["self"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"preopt","","Perform pre-legalization rewrites on the function.",6,[[["self"],["targetisa"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"canonicalize_nans","","Perform NaN canonicalizing rewrites on the function.",6,[[["self"],["targetisa"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"legalize","","Run the legalizer for `isa` on the function.",6,[[["self"],["targetisa"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"postopt","","Perform post-legalization rewrites on the function.",6,[[["self"],["targetisa"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"compute_cfg","","Compute the control flow graph.",6,[[["self"]]]],[11,"compute_domtree","","Compute dominator tree.",6,[[["self"]]]],[11,"compute_loop_analysis","","Compute the loop analysis.",6,[[["self"]]]],[11,"flowgraph","","Compute the control flow graph and dominator tree.",6,[[["self"]]]],[11,"simple_gvn","","Perform simple GVN on the function.",6,[[["foi"],["self"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"licm","","Perform LICM on the function.",6,[[["self"],["targetisa"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"eliminate_unreachable_code","","Perform unreachable code elimination.",6,[[["foi"],["self"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"regalloc","","Run the register allocator.",6,[[["self"],["targetisa"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"prologue_epilogue","","Insert prologue and epilogues after computing the stack…",6,[[["self"],["targetisa"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"redundant_reload_remover","","Do redundant-reload removal after allocation of both…",6,[[["self"],["targetisa"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"shrink_instructions","","Run the instruction shrinking pass.",6,[[["self"],["targetisa"]],[["codegenerror"],["result",["codegenerror"]]]]],[11,"relax_branches","","Run the branch relaxation pass and return information…",6,[[["self"],["targetisa"]],[["codegenerror"],["codeinfo"],["result",["codeinfo","codegenerror"]]]]],[11,"build_value_labels_ranges","","Builds ranges and location for specified value labels.",6,[[["targetisa"],["self"]],[["result",["hashmap","codegenerror"]],["hashmap",["valuelabel","vec","randomstate"]],["codegenerror"]]]],[11,"new","","Creates a new FunctionBuilder structure that will operate…",7,[[["function"],["functionbuildercontext"]],["functionbuilder"]]],[11,"set_srcloc","","Set the source location that should be assigned to all new…",7,[[["sourceloc"],["self"]]]],[11,"create_block","","Creates a new `Block` and returns its reference.",7,[[["self"]],["block"]]],[11,"switch_to_block","","After the call to this function, new instructions will be…",7,[[["self"],["block"]]]],[11,"seal_block","","Declares that all the predecessors of this block are known.",7,[[["self"],["block"]]]],[11,"seal_all_blocks","","Effectively calls seal_block on all blocks in the function.",7,[[["self"]]]],[11,"declare_var","","In order to use a variable in a `use_var`, you need to…",7,[[["self"],["type"],["variable"]]]],[11,"use_var","","Returns the Cranelift IR value corresponding to the…",7,[[["self"],["variable"]],["value"]]],[11,"def_var","","Register a new definition of a user variable. The type of…",7,[[["value"],["self"],["variable"]]]],[11,"set_val_label","","Set label for Value",7,[[["value"],["self"],["valuelabel"]]]],[11,"create_jump_table","","Creates a jump table in the function, to be used by…",7,[[["jumptabledata"],["self"]],["jumptable"]]],[11,"create_stack_slot","","Creates a stack slot in the function, to be used by…",7,[[["self"],["stackslotdata"]],["stackslot"]]],[11,"import_signature","","Adds a signature which can later be used to declare an…",7,[[["signature"],["self"]],["sigref"]]],[11,"import_function","","Declare an external function import.",7,[[["self"],["extfuncdata"]],["funcref"]]],[11,"create_global_value","","Declares a global value accessible to the function.",7,[[["globalvaluedata"],["self"]],["globalvalue"]]],[11,"create_heap","","Declares a heap accessible to the function.",7,[[["self"],["heapdata"]],["heap"]]],[11,"ins","","Returns an object with the `InstBuilder` trait that allows…",7,[[["self"]],["funcinstbuilder"]]],[11,"ensure_inserted_block","","Make sure that the current block is inserted in the layout.",7,[[["self"]]]],[11,"cursor","","Returns a `FuncCursor` pointed at the current position…",7,[[["self"]],["funccursor"]]],[11,"append_block_params_for_function_params","","Append parameters to the given `Block` corresponding to…",7,[[["self"],["block"]]]],[11,"append_block_params_for_function_returns","","Append parameters to the given `Block` corresponding to…",7,[[["self"],["block"]]]],[11,"finalize","","Declare that translation of the current function is…",7,[[["self"]]]],[11,"block_params","","Retrieves all the parameters for a `Block` currently…",7,[[["block"],["self"]]]],[11,"signature","","Retrieves the signature with reference `sigref` previously…",7,[[["self"],["sigref"]],[["signature"],["option",["signature"]]]]],[11,"append_block_param","","Creates a parameter for a specific `Block` by appending it…",7,[[["self"],["block"],["type"]],["value"]]],[11,"inst_results","","Returns the result values of an instruction.",7,[[["inst"],["self"]]]],[11,"change_jump_destination","","Changes the destination of a jump instruction after…",7,[[["self"],["inst"],["block"]]]],[11,"is_unreachable","","Returns `true` if and only if the current `Block` is…",7,[[["self"]],["bool"]]],[11,"is_pristine","","Returns `true` if and only if no instructions have been…",7,[[["self"]],["bool"]]],[11,"is_filled","","Returns `true` if and only if a terminator instruction has…",7,[[["self"]],["bool"]]],[11,"display","","Returns a displayable object for the function as it is.",7,[[["self"],["i"]],["displayfunction"]]],[11,"call_memcpy","","Calls libc.memcpy",7,[[["value"],["targetfrontendconfig"],["self"]]]],[11,"emit_small_memcpy","","Optimised memcpy for small copies.",7,[[["value"],["targetfrontendconfig"],["self"],["u64"],["u8"]]]],[11,"call_memset","","Calls libc.memset",7,[[["value"],["targetfrontendconfig"],["self"]]]],[11,"emit_small_memset","","Calls libc.memset",7,[[["value"],["targetfrontendconfig"],["self"],["u64"],["u8"]]]],[11,"call_memmove","","Calls libc.memmove",7,[[["value"],["targetfrontendconfig"],["self"]]]],[11,"emit_small_memmove","","Optimised memmove for small moves.",7,[[["value"],["targetfrontendconfig"],["self"],["u64"],["u8"]]]],[11,"new","","Creates a FunctionBuilderContext structure. The structure…",19,[[],["functionbuildercontext"]]],[11,"testcase","wasmtime_jit::trampoline::ir","Creates a new external name from a sequence of bytes.…",8,[[["t"]],["externalname"]]],[11,"user","","Create a new external name from user-provided integer…",8,[[["u32"]],["externalname"]]],[11,"with_name_signature","","Create a function with the given name and signature.",11,[[["signature"],["externalname"]],["function"]]],[11,"clear","","Clear all data structures in this function.",11,[[["self"]]]],[11,"new","","Create a new empty, anonymous function with a Fast calling…",11,[[],["function"]]],[11,"create_jump_table","","Creates a jump table in the function, to be used by…",11,[[["jumptabledata"],["self"]],["jumptable"]]],[11,"create_stack_slot","","Creates a stack slot in the function, to be used by…",11,[[["self"],["stackslotdata"]],["stackslot"]]],[11,"import_signature","","Adds a signature which can later be used to declare an…",11,[[["signature"],["self"]],["sigref"]]],[11,"import_function","","Declare an external function import.",11,[[["self"],["extfuncdata"]],["funcref"]]],[11,"create_global_value","","Declares a global value accessible to the function.",11,[[["globalvaluedata"],["self"]],["globalvalue"]]],[11,"create_heap","","Declares a heap accessible to the function.",11,[[["self"],["heapdata"]],["heap"]]],[11,"create_table","","Declares a table accessible to the function.",11,[[["self"],["tabledata"]],["table"]]],[11,"display","","Return an object that can display this function with…",11,[[["i"],["self"]],["displayfunction"]]],[11,"display_with","","Return an object that can display this function with…",11,[[["self"],["displayfunctionannotations"]],["displayfunction"]]],[11,"special_param","","Find a presumed unique special-purpose function parameter…",11,[[["self"],["argumentpurpose"]],[["value"],["option",["value"]]]]],[11,"inst_offsets","","Get an iterator over the instructions in `block`,…",11,[[["encinfo"],["block"],["self"]],["instoffsetiter"]]],[11,"update_encoding","","Wrapper around `encode` which assigns `inst` the resulting…",11,[[["self"],["inst"],["targetisa"]],["result"]]],[11,"encode","","Wrapper around `TargetIsa::encode` for encoding an…",11,[[["inst"],["self"],["targetisa"]],[["result",["encoding"]],["encoding"]]]],[11,"collect_debug_info","","Starts collection of debug information.",11,[[["self"]]]],[11,"collect_frame_layout_info","","Starts collection of frame layout information.",11,[[["self"]]]],[11,"change_branch_destination","","Changes the destination of a jump or branch instruction.…",11,[[["self"],["inst"],["block"]]]],[11,"is_block_basic","","Checks that the specified block can be encoded as a basic…",11,[[["block"],["self"]],["result"]]],[11,"is_leaf","","Returns true if the function is function that doesn't call…",11,[[["self"]],["bool"]]],[11,"new","","Create a new empty set of flags.",20,[[],["memflags"]]],[11,"trusted","","Create a set of flags representing an access from a…",20,[[],["memflags"]]],[11,"set_by_name","","Set a flag bit by name.",20,[[["str"],["self"]],["bool"]]],[11,"notrap","","Test if the `notrap` flag is set.",20,[[],["bool"]]],[11,"set_notrap","","Set the `notrap` flag.",20,[[["self"]]]],[11,"aligned","","Test if the `aligned` flag is set.",20,[[],["bool"]]],[11,"set_aligned","","Set the `aligned` flag.",20,[[["self"]]]],[11,"readonly","","Test if the `readonly` flag is set.",20,[[],["bool"]]],[11,"set_readonly","","Set the `readonly` flag.",20,[[["self"]]]],[11,"new","","Create a stack slot with the specified byte size.",13,[[["u32"],["stackslotkind"]],["stackslotdata"]]],[11,"alignment","","Get the alignment in bytes of this stack slot given the…",13,[[["u32"],["self"]],["u32"]]]],"p":[[4,"InstantiationError"],[4,"CompilationStrategy"],[4,"SetupError"],[3,"CodeMemory"],[3,"Compiler"],[3,"CompiledModule"],[3,"Context"],[3,"FunctionBuilder"],[4,"ExternalName"],[13,"User"],[13,"TestCase"],[3,"Function"],[8,"InstBuilder"],[3,"StackSlotData"],[4,"StackSlotKind"],[8,"TrapSink"],[8,"Resolver"],[3,"InstanceHandle"],[3,"NullResolver"],[3,"FunctionBuilderContext"],[3,"MemFlags"],[3,"NullTrapSink"],[3,"NullStackmapSink"],[3,"TrampolineRelocSink"]]}; +searchIndex["wasmtime_obj"] = {"doc":"Object-file writing library using the wasmtime environment.","i":[[5,"emit_module","wasmtime_obj","Emits a module that has been emitted with the…",null,[[["targetfrontendconfig"],["artifact"],["compilation"],["module"],["relocations"]],["result"]]],[17,"VERSION","","Version number of this crate.",null,null]],"p":[]}; +searchIndex["wasmtime_runtime"] = {"doc":"Runtime library support for Wasmtime.","i":[[3,"Imports","wasmtime_runtime","Resolved import pointers.",null,null],[12,"dependencies","","The set of instances that the imports depend on.",0,null],[12,"functions","","Resolved addresses for imported functions.",0,null],[12,"tables","","Resolved addresses for imported tables.",0,null],[12,"memories","","Resolved addresses for imported memories.",0,null],[12,"globals","","Resolved addresses for imported globals.",0,null],[3,"InstanceHandle","","A handle holding an `Instance` of a WebAssembly module.",null,null],[3,"LinkError","","An link error while instantiating a module.",null,null],[12,"0","","",1,null],[3,"GdbJitImageRegistration","","Registeration for JIT image",null,null],[3,"Mmap","","A simple struct consisting of a page-aligned pointer to…",null,null],[3,"SignatureRegistry","","WebAssembly requires that the caller and callee signatures…",null,null],[3,"TrapDescription","","Description of a trap.",null,null],[12,"source_loc","","Location of the trap in source binary module.",2,null],[12,"trap_code","","Code of the trap.",2,null],[3,"TrapRegistration","","RAII structure returned from `TrapRegistry::register_trap`…",null,null],[3,"TrapRegistry","","The registry maintains descriptions of traps in currently…",null,null],[3,"VMCallerCheckedAnyfunc","","The VM caller-checked \"anyfunc\" record, for caller-side…",null,null],[12,"func_ptr","","Function body.",3,null],[12,"type_index","","Function signature id.",3,null],[12,"vmctx","","Function `VMContext`.",3,null],[3,"VMContext","","The VM \"context\", which is pointed to by the `vmctx` arg…",null,null],[3,"VMFunctionBody","","A placeholder byte-sized type which is just used to…",null,null],[3,"VMFunctionImport","","An imported function.",null,null],[12,"body","","A pointer to the imported function body.",4,null],[12,"vmctx","","A pointer to the `VMContext` that owns the function.",4,null],[3,"VMGlobalDefinition","","The storage for a WebAssembly global defined within the…",null,null],[3,"VMGlobalImport","","The fields compiled code needs to access to utilize a…",null,null],[12,"from","","A pointer to the imported global variable description.",5,null],[3,"VMInvokeArgument","","The storage for a WebAssembly invocation argument",null,null],[3,"VMMemoryDefinition","","The fields compiled code needs to access to utilize a…",null,null],[12,"base","","The start address.",6,null],[12,"current_length","","The current logical size of this linear memory in bytes.",6,null],[3,"VMMemoryImport","","The fields compiled code needs to access to utilize a…",null,null],[12,"from","","A pointer to the imported memory description.",7,null],[12,"vmctx","","A pointer to the `VMContext` that owns the memory…",7,null],[3,"VMSharedSignatureIndex","","An index into the shared signature registry, usable for…",null,null],[3,"VMTableDefinition","","The fields compiled code needs to access to utilize a…",null,null],[12,"base","","Pointer to the table data.",8,null],[12,"current_elements","","The current number of elements in the table.",8,null],[3,"VMTableImport","","The fields compiled code needs to access to utilize a…",null,null],[12,"from","","A pointer to the imported table description.",9,null],[12,"vmctx","","A pointer to the `VMContext` that owns the table…",9,null],[4,"Export","","The value of an export passed from one instance to another.",null,null],[13,"Function","","A function export value.",10,null],[12,"address","wasmtime_runtime::Export","The address of the native-code function.",11,null],[12,"vmctx","","Pointer to the containing `VMContext`.",11,null],[12,"signature","","The function signature declaration, used for compatibilty…",11,null],[13,"Table","wasmtime_runtime","A table export value.",10,null],[12,"definition","wasmtime_runtime::Export","The address of the table descriptor.",12,null],[12,"vmctx","","Pointer to the containing `VMContext`.",12,null],[12,"table","","The table declaration, used for compatibilty checking.",12,null],[13,"Memory","wasmtime_runtime","A memory export value.",10,null],[12,"definition","wasmtime_runtime::Export","The address of the memory descriptor.",13,null],[12,"vmctx","","Pointer to the containing `VMContext`.",13,null],[12,"memory","","The memory declaration, used for compatibilty checking.",13,null],[13,"Global","wasmtime_runtime","A global export value.",10,null],[12,"definition","wasmtime_runtime::Export","The address of the global storage.",14,null],[12,"vmctx","","Pointer to the containing `VMContext`.",14,null],[12,"global","","The global declaration, used for compatibilty checking.",14,null],[4,"InstantiationError","wasmtime_runtime","An error while instantiating a module.",null,null],[13,"Resource","","Insufficient resources available for execution.",15,null],[13,"Link","","A wasm link error occured.",15,null],[13,"StartTrap","","A compilation error occured.",15,null],[4,"Trap","","Stores trace message with backtrace.",null,null],[13,"User","","A user-raised trap through `raise_user_trap`.",16,null],[13,"Wasm","","A wasm-originating trap from wasm code itself.",16,null],[12,"desc","wasmtime_runtime::Trap","What sort of trap happened, as well as where in the…",17,null],[12,"backtrace","","Native stack backtrace at the time the trap occurred",17,null],[5,"resume_panic","wasmtime_runtime","Carries a Rust panic across wasm code and resumes the…",null,[[["box",["any"]],["any"]]]],[5,"catch_traps","","Catches any wasm traps that happen within the execution of…",null,[[["f"]],[["trap"],["result",["trap"]]]]],[5,"raise_user_trap","","Raises a user-defined trap immediately.",null,[[["box",["error"]],["error"]]]],[5,"wasmtime_call_trampoline","","Call the wasm function pointed to by `callee`.",null,[[],[["trap"],["result",["trap"]]]]],[11,"function","","Construct a function export value.",10,[[["signature"]],["self"]]],[11,"table","","Construct a table export value.",10,[[["tableplan"]],["self"]]],[11,"memory","","Construct a memory export value.",10,[[["memoryplan"]],["self"]]],[11,"global","","Construct a global export value.",10,[[["global"]],["self"]]],[11,"new","","Construct a new `Imports` instance.",0,[[["primarymap",["funcindex","vmfunctionimport"]],["vmmemoryimport"],["vmfunctionimport"],["tableindex"],["primarymap",["memoryindex","vmmemoryimport"]],["vmglobalimport"],["vmtableimport"],["hashset",["instancehandle"]],["globalindex"],["funcindex"],["primarymap",["tableindex","vmtableimport"]],["instancehandle"],["memoryindex"],["primarymap",["globalindex","vmglobalimport"]]],["self"]]],[11,"none","","Construct a new `Imports` instance with no imports.",0,[[],["self"]]],[11,"set_signal_handler","","Set a custom signal handler",18,[[["self"],["h"]]]],[11,"new","","Create a new `InstanceHandle` pointing at a new `Instance`.",18,[[["vmsharedsignatureindex"],["definedfuncindex"],["boxedslice",["definedfuncindex"]],["module"],["arc",["module"]],["box",["any"]],["boxedslice",["signatureindex","vmsharedsignatureindex"]],["imports"],["option",["rc"]],["any"],["trapregistration"],["signatureindex"],["rc",["gdbjitimageregistration"]]],[["result",["instantiationerror"]],["instantiationerror"]]]],[11,"from_vmctx","","Create a new `InstanceHandle` pointing at the instance…",18,[[],["self"]]],[11,"vmctx","","Return a reference to the vmctx used by compiled wasm code.",18,[[["self"]],["vmcontext"]]],[11,"vmctx_ptr","","Return a raw pointer to the vmctx used by compiled wasm…",18,[[["self"]]]],[11,"module","","Return a reference-counting pointer to a module.",18,[[["self"]],["arc"]]],[11,"module_ref","","Return a reference to a module.",18,[[["self"]],["module"]]],[11,"lookup","","Lookup an export with the given name.",18,[[["str"],["self"]],[["option",["export"]],["export"]]]],[11,"lookup_by_declaration","","Lookup an export with the given export declaration.",18,[[["self"],["export"]],["export"]]],[11,"exports","","Return an iterator over the exports of this instance.",18,[[["self"]],[["string"],["export"],["iter",["string","export"]]]]],[11,"host_state","","Return a reference to the custom state attached to this…",18,[[["self"]],["any"]]],[11,"memory_index","","Return the memory index for the given `VMMemoryDefinition`…",18,[[["self"],["vmmemorydefinition"]],["definedmemoryindex"]]],[11,"memory_grow","","Grow memory in this instance by the specified amount of…",18,[[["u32"],["self"],["definedmemoryindex"]],[["u32"],["option",["u32"]]]]],[11,"table_index","","Return the table index for the given `VMTableDefinition`…",18,[[["vmtabledefinition"],["self"]],["definedtableindex"]]],[11,"table_grow","","Grow table in this instance by the specified amount of…",18,[[["u32"],["self"],["definedtableindex"]],[["u32"],["option",["u32"]]]]],[11,"table_get","","Get table element reference.",18,[[["u32"],["self"],["definedtableindex"]],[["vmcallercheckedanyfunc"],["option",["vmcallercheckedanyfunc"]]]]],[11,"table_set","","Set table element reference.",18,[[["u32"],["definedtableindex"],["vmcallercheckedanyfunc"],["self"]],["result"]]],[11,"register","","Registers JIT image using __jit_debug_register_code",19,[[["vec",["u8"]],["u8"]],["self"]]],[11,"file","","JIT image used in registration",19,[[["self"]]]],[11,"new","","Construct a new empty instance of `Mmap`.",20,[[],["self"]]],[11,"with_at_least","","Create a new `Mmap` pointing to at least `size` bytes of…",20,[[["usize"]],[["result",["string"]],["string"]]]],[11,"accessible_reserved","","Create a new `Mmap` pointing to `accessible_size` bytes of…",20,[[["usize"]],[["result",["string"]],["string"]]]],[11,"make_accessible","","Make the memory starting at `start` and extending for…",20,[[["self"],["usize"]],[["result",["string"]],["string"]]]],[11,"as_slice","","Return the allocated memory as a slice of u8.",20,[[["self"]]]],[11,"as_mut_slice","","Return the allocated memory as a mutable slice of u8.",20,[[["self"]]]],[11,"as_ptr","","Return the allocated memory as a pointer to u8.",20,[[["self"]]]],[11,"as_mut_ptr","","Return the allocated memory as a mutable pointer to u8.",20,[[["self"]]]],[11,"len","","Return the length of the allocated memory.",20,[[["self"]],["usize"]]],[11,"is_empty","","Return whether any memory has been allocated.",20,[[["self"]],["bool"]]],[11,"new","","Create a new `SignatureRegistry`.",21,[[],["self"]]],[11,"register","","Register a signature and return its unique index.",21,[[["signature"],["self"]],["vmsharedsignatureindex"]]],[11,"lookup","","Looks up a shared signature index within this registry.",21,[[["vmsharedsignatureindex"],["self"]],[["signature"],["option",["signature"]]]]],[11,"register_traps","","Registers a list of traps.",22,[[["self"]],["trapregistration"]]],[11,"get_trap","","Gets a trap description at given address.",23,[[["self"],["usize"]],[["trapdescription"],["option",["trapdescription"]]]]],[11,"new","","Construct a `VMGlobalDefinition`.",24,[[],["self"]]],[11,"as_i32","","Return a reference to the value as an i32.",24,[[["self"]],["i32"]]],[11,"as_i32_mut","","Return a mutable reference to the value as an i32.",24,[[["self"]],["i32"]]],[11,"as_u32","","Return a reference to the value as a u32.",24,[[["self"]],["u32"]]],[11,"as_u32_mut","","Return a mutable reference to the value as an u32.",24,[[["self"]],["u32"]]],[11,"as_i64","","Return a reference to the value as an i64.",24,[[["self"]],["i64"]]],[11,"as_i64_mut","","Return a mutable reference to the value as an i64.",24,[[["self"]],["i64"]]],[11,"as_u64","","Return a reference to the value as an u64.",24,[[["self"]],["u64"]]],[11,"as_u64_mut","","Return a mutable reference to the value as an u64.",24,[[["self"]],["u64"]]],[11,"as_f32","","Return a reference to the value as an f32.",24,[[["self"]],["f32"]]],[11,"as_f32_mut","","Return a mutable reference to the value as an f32.",24,[[["self"]],["f32"]]],[11,"as_f32_bits","","Return a reference to the value as f32 bits.",24,[[["self"]],["u32"]]],[11,"as_f32_bits_mut","","Return a mutable reference to the value as f32 bits.",24,[[["self"]],["u32"]]],[11,"as_f64","","Return a reference to the value as an f64.",24,[[["self"]],["f64"]]],[11,"as_f64_mut","","Return a mutable reference to the value as an f64.",24,[[["self"]],["f64"]]],[11,"as_f64_bits","","Return a reference to the value as f64 bits.",24,[[["self"]],["u64"]]],[11,"as_f64_bits_mut","","Return a mutable reference to the value as f64 bits.",24,[[["self"]],["u64"]]],[11,"as_u128","","Return a reference to the value as an u128.",24,[[["self"]],["u128"]]],[11,"as_u128_mut","","Return a mutable reference to the value as an u128.",24,[[["self"]],["u128"]]],[11,"as_u128_bits","","Return a reference to the value as u128 bits.",24,[[["self"]]]],[11,"as_u128_bits_mut","","Return a mutable reference to the value as u128 bits.",24,[[["self"]]]],[11,"new","","Create a new `VMSharedSignatureIndex`.",25,[[["u32"]],["self"]]],[11,"new","","Create a new invocation argument filled with zeroes",26,[[],["self"]]],[11,"host_state","","Return a reference to the host state associated with this…",27,[[["self"]],["any"]]],[0,"libcalls","","Runtime library calls. Note that wasm compilers may…",null,null],[5,"wasmtime_f32_ceil","wasmtime_runtime::libcalls","Implementation of f32.ceil",null,[[["f32"]],["f32"]]],[5,"wasmtime_f32_floor","","Implementation of f32.floor",null,[[["f32"]],["f32"]]],[5,"wasmtime_f32_trunc","","Implementation of f32.trunc",null,[[["f32"]],["f32"]]],[5,"wasmtime_f32_nearest","","Implementation of f32.nearest",null,[[["f32"]],["f32"]]],[5,"wasmtime_f64_ceil","","Implementation of f64.ceil",null,[[["f64"]],["f64"]]],[5,"wasmtime_f64_floor","","Implementation of f64.floor",null,[[["f64"]],["f64"]]],[5,"wasmtime_f64_trunc","","Implementation of f64.trunc",null,[[["f64"]],["f64"]]],[5,"wasmtime_f64_nearest","","Implementation of f64.nearest",null,[[["f64"]],["f64"]]],[5,"wasmtime_memory32_grow","","Implementation of memory.grow for locally-defined 32-bit…",null,[[["u32"]],["u32"]]],[5,"wasmtime_imported_memory32_grow","","Implementation of memory.grow for imported 32-bit memories.",null,[[["u32"]],["u32"]]],[5,"wasmtime_memory32_size","","Implementation of memory.size for locally-defined 32-bit…",null,[[["u32"]],["u32"]]],[5,"wasmtime_imported_memory32_size","","Implementation of memory.size for imported 32-bit memories.",null,[[["u32"]],["u32"]]],[17,"VERSION","wasmtime_runtime","Version number of this crate.",null,null],[11,"from","","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"to_owned","","",0,[[["self"]],["t"]]],[11,"clone_into","","",0,[[["self"],["t"]]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]],[11,"from","","",18,[[["t"]],["t"]]],[11,"into","","",18,[[],["u"]]],[11,"to_owned","","",18,[[["self"]],["t"]]],[11,"clone_into","","",18,[[["self"],["t"]]]],[11,"try_from","","",18,[[["u"]],["result"]]],[11,"try_into","","",18,[[],["result"]]],[11,"borrow","","",18,[[["self"]],["t"]]],[11,"borrow_mut","","",18,[[["self"]],["t"]]],[11,"type_id","","",18,[[["self"]],["typeid"]]],[11,"equivalent","","",18,[[["k"],["self"]],["bool"]]],[11,"from","","",1,[[["t"]],["t"]]],[11,"into","","",1,[[],["u"]]],[11,"to_string","","",1,[[["self"]],["string"]]],[11,"try_from","","",1,[[["u"]],["result"]]],[11,"try_into","","",1,[[],["result"]]],[11,"borrow","","",1,[[["self"]],["t"]]],[11,"borrow_mut","","",1,[[["self"]],["t"]]],[11,"type_id","","",1,[[["self"]],["typeid"]]],[11,"from","","",19,[[["t"]],["t"]]],[11,"into","","",19,[[],["u"]]],[11,"try_from","","",19,[[["u"]],["result"]]],[11,"try_into","","",19,[[],["result"]]],[11,"borrow","","",19,[[["self"]],["t"]]],[11,"borrow_mut","","",19,[[["self"]],["t"]]],[11,"type_id","","",19,[[["self"]],["typeid"]]],[11,"from","","",20,[[["t"]],["t"]]],[11,"into","","",20,[[],["u"]]],[11,"try_from","","",20,[[["u"]],["result"]]],[11,"try_into","","",20,[[],["result"]]],[11,"borrow","","",20,[[["self"]],["t"]]],[11,"borrow_mut","","",20,[[["self"]],["t"]]],[11,"type_id","","",20,[[["self"]],["typeid"]]],[11,"from","","",21,[[["t"]],["t"]]],[11,"into","","",21,[[],["u"]]],[11,"try_from","","",21,[[["u"]],["result"]]],[11,"try_into","","",21,[[],["result"]]],[11,"borrow","","",21,[[["self"]],["t"]]],[11,"borrow_mut","","",21,[[["self"]],["t"]]],[11,"type_id","","",21,[[["self"]],["typeid"]]],[11,"from","","",2,[[["t"]],["t"]]],[11,"into","","",2,[[],["u"]]],[11,"to_owned","","",2,[[["self"]],["t"]]],[11,"clone_into","","",2,[[["self"],["t"]]]],[11,"to_string","","",2,[[["self"]],["string"]]],[11,"try_from","","",2,[[["u"]],["result"]]],[11,"try_into","","",2,[[],["result"]]],[11,"borrow","","",2,[[["self"]],["t"]]],[11,"borrow_mut","","",2,[[["self"]],["t"]]],[11,"type_id","","",2,[[["self"]],["typeid"]]],[11,"from","","",23,[[["t"]],["t"]]],[11,"into","","",23,[[],["u"]]],[11,"to_owned","","",23,[[["self"]],["t"]]],[11,"clone_into","","",23,[[["self"],["t"]]]],[11,"try_from","","",23,[[["u"]],["result"]]],[11,"try_into","","",23,[[],["result"]]],[11,"borrow","","",23,[[["self"]],["t"]]],[11,"borrow_mut","","",23,[[["self"]],["t"]]],[11,"type_id","","",23,[[["self"]],["typeid"]]],[11,"from","","",22,[[["t"]],["t"]]],[11,"into","","",22,[[],["u"]]],[11,"try_from","","",22,[[["u"]],["result"]]],[11,"try_into","","",22,[[],["result"]]],[11,"borrow","","",22,[[["self"]],["t"]]],[11,"borrow_mut","","",22,[[["self"]],["t"]]],[11,"type_id","","",22,[[["self"]],["typeid"]]],[11,"from","","",3,[[["t"]],["t"]]],[11,"into","","",3,[[],["u"]]],[11,"to_owned","","",3,[[["self"]],["t"]]],[11,"clone_into","","",3,[[["self"],["t"]]]],[11,"try_from","","",3,[[["u"]],["result"]]],[11,"try_into","","",3,[[],["result"]]],[11,"borrow","","",3,[[["self"]],["t"]]],[11,"borrow_mut","","",3,[[["self"]],["t"]]],[11,"type_id","","",3,[[["self"]],["typeid"]]],[11,"from","","",27,[[["t"]],["t"]]],[11,"into","","",27,[[],["u"]]],[11,"try_from","","",27,[[["u"]],["result"]]],[11,"try_into","","",27,[[],["result"]]],[11,"borrow","","",27,[[["self"]],["t"]]],[11,"borrow_mut","","",27,[[["self"]],["t"]]],[11,"type_id","","",27,[[["self"]],["typeid"]]],[11,"from","","",28,[[["t"]],["t"]]],[11,"into","","",28,[[],["u"]]],[11,"try_from","","",28,[[["u"]],["result"]]],[11,"try_into","","",28,[[],["result"]]],[11,"borrow","","",28,[[["self"]],["t"]]],[11,"borrow_mut","","",28,[[["self"]],["t"]]],[11,"type_id","","",28,[[["self"]],["typeid"]]],[11,"from","","",4,[[["t"]],["t"]]],[11,"into","","",4,[[],["u"]]],[11,"to_owned","","",4,[[["self"]],["t"]]],[11,"clone_into","","",4,[[["self"],["t"]]]],[11,"try_from","","",4,[[["u"]],["result"]]],[11,"try_into","","",4,[[],["result"]]],[11,"borrow","","",4,[[["self"]],["t"]]],[11,"borrow_mut","","",4,[[["self"]],["t"]]],[11,"type_id","","",4,[[["self"]],["typeid"]]],[11,"from","","",24,[[["t"]],["t"]]],[11,"into","","",24,[[],["u"]]],[11,"to_owned","","",24,[[["self"]],["t"]]],[11,"clone_into","","",24,[[["self"],["t"]]]],[11,"try_from","","",24,[[["u"]],["result"]]],[11,"try_into","","",24,[[],["result"]]],[11,"borrow","","",24,[[["self"]],["t"]]],[11,"borrow_mut","","",24,[[["self"]],["t"]]],[11,"type_id","","",24,[[["self"]],["typeid"]]],[11,"from","","",5,[[["t"]],["t"]]],[11,"into","","",5,[[],["u"]]],[11,"to_owned","","",5,[[["self"]],["t"]]],[11,"clone_into","","",5,[[["self"],["t"]]]],[11,"try_from","","",5,[[["u"]],["result"]]],[11,"try_into","","",5,[[],["result"]]],[11,"borrow","","",5,[[["self"]],["t"]]],[11,"borrow_mut","","",5,[[["self"]],["t"]]],[11,"type_id","","",5,[[["self"]],["typeid"]]],[11,"from","","",26,[[["t"]],["t"]]],[11,"into","","",26,[[],["u"]]],[11,"to_owned","","",26,[[["self"]],["t"]]],[11,"clone_into","","",26,[[["self"],["t"]]]],[11,"try_from","","",26,[[["u"]],["result"]]],[11,"try_into","","",26,[[],["result"]]],[11,"borrow","","",26,[[["self"]],["t"]]],[11,"borrow_mut","","",26,[[["self"]],["t"]]],[11,"type_id","","",26,[[["self"]],["typeid"]]],[11,"from","","",6,[[["t"]],["t"]]],[11,"into","","",6,[[],["u"]]],[11,"to_owned","","",6,[[["self"]],["t"]]],[11,"clone_into","","",6,[[["self"],["t"]]]],[11,"try_from","","",6,[[["u"]],["result"]]],[11,"try_into","","",6,[[],["result"]]],[11,"borrow","","",6,[[["self"]],["t"]]],[11,"borrow_mut","","",6,[[["self"]],["t"]]],[11,"type_id","","",6,[[["self"]],["typeid"]]],[11,"from","","",7,[[["t"]],["t"]]],[11,"into","","",7,[[],["u"]]],[11,"to_owned","","",7,[[["self"]],["t"]]],[11,"clone_into","","",7,[[["self"],["t"]]]],[11,"try_from","","",7,[[["u"]],["result"]]],[11,"try_into","","",7,[[],["result"]]],[11,"borrow","","",7,[[["self"]],["t"]]],[11,"borrow_mut","","",7,[[["self"]],["t"]]],[11,"type_id","","",7,[[["self"]],["typeid"]]],[11,"from","","",25,[[["t"]],["t"]]],[11,"into","","",25,[[],["u"]]],[11,"to_owned","","",25,[[["self"]],["t"]]],[11,"clone_into","","",25,[[["self"],["t"]]]],[11,"try_from","","",25,[[["u"]],["result"]]],[11,"try_into","","",25,[[],["result"]]],[11,"borrow","","",25,[[["self"]],["t"]]],[11,"borrow_mut","","",25,[[["self"]],["t"]]],[11,"type_id","","",25,[[["self"]],["typeid"]]],[11,"equivalent","","",25,[[["k"],["self"]],["bool"]]],[11,"from","","",8,[[["t"]],["t"]]],[11,"into","","",8,[[],["u"]]],[11,"to_owned","","",8,[[["self"]],["t"]]],[11,"clone_into","","",8,[[["self"],["t"]]]],[11,"try_from","","",8,[[["u"]],["result"]]],[11,"try_into","","",8,[[],["result"]]],[11,"borrow","","",8,[[["self"]],["t"]]],[11,"borrow_mut","","",8,[[["self"]],["t"]]],[11,"type_id","","",8,[[["self"]],["typeid"]]],[11,"from","","",9,[[["t"]],["t"]]],[11,"into","","",9,[[],["u"]]],[11,"to_owned","","",9,[[["self"]],["t"]]],[11,"clone_into","","",9,[[["self"],["t"]]]],[11,"try_from","","",9,[[["u"]],["result"]]],[11,"try_into","","",9,[[],["result"]]],[11,"borrow","","",9,[[["self"]],["t"]]],[11,"borrow_mut","","",9,[[["self"]],["t"]]],[11,"type_id","","",9,[[["self"]],["typeid"]]],[11,"from","","",10,[[["t"]],["t"]]],[11,"into","","",10,[[],["u"]]],[11,"to_owned","","",10,[[["self"]],["t"]]],[11,"clone_into","","",10,[[["self"],["t"]]]],[11,"try_from","","",10,[[["u"]],["result"]]],[11,"try_into","","",10,[[],["result"]]],[11,"borrow","","",10,[[["self"]],["t"]]],[11,"borrow_mut","","",10,[[["self"]],["t"]]],[11,"type_id","","",10,[[["self"]],["typeid"]]],[11,"from","","",15,[[["t"]],["t"]]],[11,"into","","",15,[[],["u"]]],[11,"to_string","","",15,[[["self"]],["string"]]],[11,"try_from","","",15,[[["u"]],["result"]]],[11,"try_into","","",15,[[],["result"]]],[11,"borrow","","",15,[[["self"]],["t"]]],[11,"borrow_mut","","",15,[[["self"]],["t"]]],[11,"type_id","","",15,[[["self"]],["typeid"]]],[11,"from","","",16,[[["t"]],["t"]]],[11,"into","","",16,[[],["u"]]],[11,"to_string","","",16,[[["self"]],["string"]]],[11,"try_from","","",16,[[["u"]],["result"]]],[11,"try_into","","",16,[[],["result"]]],[11,"borrow","","",16,[[["self"]],["t"]]],[11,"borrow_mut","","",16,[[["self"]],["t"]]],[11,"type_id","","",16,[[["self"]],["typeid"]]],[11,"drop","","",18,[[["self"]]]],[11,"drop","","",19,[[["self"]]]],[11,"drop","","",20,[[["self"]]]],[11,"drop","","",23,[[["self"]]]],[11,"from","","",15,[[["linkerror"]],["self"]]],[11,"clone","","",10,[[["self"]],["export"]]],[11,"clone","","",0,[[["self"]],["imports"]]],[11,"clone","","",18,[[["self"]],["self"]]],[11,"clone","","",23,[[["self"]],["trapregistration"]]],[11,"clone","","",2,[[["self"]],["trapdescription"]]],[11,"clone","","",4,[[["self"]],["vmfunctionimport"]]],[11,"clone","","",9,[[["self"]],["vmtableimport"]]],[11,"clone","","",7,[[["self"]],["vmmemoryimport"]]],[11,"clone","","",5,[[["self"]],["vmglobalimport"]]],[11,"clone","","",6,[[["self"]],["vmmemorydefinition"]]],[11,"clone","","",8,[[["self"]],["vmtabledefinition"]]],[11,"clone","","",24,[[["self"]],["vmglobaldefinition"]]],[11,"clone","","",25,[[["self"]],["vmsharedsignatureindex"]]],[11,"clone","","",3,[[["self"]],["vmcallercheckedanyfunc"]]],[11,"clone","","",26,[[["self"]],["vminvokeargument"]]],[11,"default","","",22,[[],["trapregistry"]]],[11,"default","","",25,[[],["self"]]],[11,"default","","",3,[[],["self"]]],[11,"eq","","",18,[[["instancehandle"],["self"]],["bool"]]],[11,"ne","","",18,[[["instancehandle"],["self"]],["bool"]]],[11,"eq","","",2,[[["self"],["trapdescription"]],["bool"]]],[11,"ne","","",2,[[["self"],["trapdescription"]],["bool"]]],[11,"eq","","",25,[[["vmsharedsignatureindex"],["self"]],["bool"]]],[11,"ne","","",25,[[["vmsharedsignatureindex"],["self"]],["bool"]]],[11,"fmt","","",10,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",1,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",15,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",20,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",21,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",2,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",16,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",4,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",9,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",7,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",5,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",6,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",8,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",24,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",25,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",3,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",26,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",27,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",1,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",15,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",2,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",16,[[["formatter"],["self"]],["result"]]],[11,"hash","","",18,[[["self"],["__h"]]]],[11,"hash","","",25,[[["self"],["__h"]]]],[11,"source","","",15,[[["self"]],[["error"],["option",["error"]]]]]],"p":[[3,"Imports"],[3,"LinkError"],[3,"TrapDescription"],[3,"VMCallerCheckedAnyfunc"],[3,"VMFunctionImport"],[3,"VMGlobalImport"],[3,"VMMemoryDefinition"],[3,"VMMemoryImport"],[3,"VMTableDefinition"],[3,"VMTableImport"],[4,"Export"],[13,"Function"],[13,"Table"],[13,"Memory"],[13,"Global"],[4,"InstantiationError"],[4,"Trap"],[13,"Wasm"],[3,"InstanceHandle"],[3,"GdbJitImageRegistration"],[3,"Mmap"],[3,"SignatureRegistry"],[3,"TrapRegistry"],[3,"TrapRegistration"],[3,"VMGlobalDefinition"],[3,"VMSharedSignatureIndex"],[3,"VMInvokeArgument"],[3,"VMContext"],[3,"VMFunctionBody"]]}; +searchIndex["wasmtime_rust"] = {"doc":"","i":[[23,"wasmtime","wasmtime_rust","",null,null]],"p":[]}; +searchIndex["wasmtime_rust_macro"] = {"doc":"","i":[[23,"wasmtime","wasmtime_rust_macro","",null,null]],"p":[]}; +searchIndex["wasmtime_wasi"] = {"doc":"","i":[[3,"WasiCtx","wasmtime_wasi","",null,null],[3,"WasiCtxBuilder","","A builder allowing customizable construction of `WasiCtx`…",null,null],[3,"Wasi","","An instantiated instance of the wasi exports.",null,null],[12,"args_get","","",0,null],[12,"args_sizes_get","","",0,null],[12,"environ_get","","",0,null],[12,"environ_sizes_get","","",0,null],[12,"clock_res_get","","",0,null],[12,"clock_time_get","","",0,null],[12,"fd_advise","","",0,null],[12,"fd_allocate","","",0,null],[12,"fd_close","","",0,null],[12,"fd_datasync","","",0,null],[12,"fd_fdstat_get","","",0,null],[12,"fd_fdstat_set_flags","","",0,null],[12,"fd_fdstat_set_rights","","",0,null],[12,"fd_filestat_get","","",0,null],[12,"fd_filestat_set_size","","",0,null],[12,"fd_filestat_set_times","","",0,null],[12,"fd_pread","","",0,null],[12,"fd_prestat_get","","",0,null],[12,"fd_prestat_dir_name","","",0,null],[12,"fd_pwrite","","",0,null],[12,"fd_read","","",0,null],[12,"fd_readdir","","",0,null],[12,"fd_renumber","","",0,null],[12,"fd_seek","","",0,null],[12,"fd_sync","","",0,null],[12,"fd_tell","","",0,null],[12,"fd_write","","",0,null],[12,"path_create_directory","","",0,null],[12,"path_filestat_get","","",0,null],[12,"path_filestat_set_times","","",0,null],[12,"path_link","","",0,null],[12,"path_open","","",0,null],[12,"path_readlink","","",0,null],[12,"path_remove_directory","","",0,null],[12,"path_rename","","",0,null],[12,"path_symlink","","",0,null],[12,"path_unlink_file","","",0,null],[12,"poll_oneoff","","",0,null],[12,"proc_exit","","",0,null],[12,"proc_raise","","",0,null],[12,"sched_yield","","",0,null],[12,"random_get","","",0,null],[12,"sock_recv","","",0,null],[12,"sock_send","","",0,null],[12,"sock_shutdown","","",0,null],[5,"is_wasi_module","","",null,[[["str"]],["bool"]]],[0,"old","","",null,null],[0,"snapshot_0","wasmtime_wasi::old","",null,null],[3,"Wasi","wasmtime_wasi::old::snapshot_0","An instantiated instance of the wasi exports.",null,null],[12,"args_get","","",1,null],[12,"args_sizes_get","","",1,null],[12,"environ_get","","",1,null],[12,"environ_sizes_get","","",1,null],[12,"clock_res_get","","",1,null],[12,"clock_time_get","","",1,null],[12,"fd_advise","","",1,null],[12,"fd_allocate","","",1,null],[12,"fd_close","","",1,null],[12,"fd_datasync","","",1,null],[12,"fd_fdstat_get","","",1,null],[12,"fd_fdstat_set_flags","","",1,null],[12,"fd_fdstat_set_rights","","",1,null],[12,"fd_filestat_get","","",1,null],[12,"fd_filestat_set_size","","",1,null],[12,"fd_filestat_set_times","","",1,null],[12,"fd_pread","","",1,null],[12,"fd_prestat_get","","",1,null],[12,"fd_prestat_dir_name","","",1,null],[12,"fd_pwrite","","",1,null],[12,"fd_read","","",1,null],[12,"fd_readdir","","",1,null],[12,"fd_renumber","","",1,null],[12,"fd_seek","","",1,null],[12,"fd_sync","","",1,null],[12,"fd_tell","","",1,null],[12,"fd_write","","",1,null],[12,"path_create_directory","","",1,null],[12,"path_filestat_get","","",1,null],[12,"path_filestat_set_times","","",1,null],[12,"path_link","","",1,null],[12,"path_open","","",1,null],[12,"path_readlink","","",1,null],[12,"path_remove_directory","","",1,null],[12,"path_rename","","",1,null],[12,"path_symlink","","",1,null],[12,"path_unlink_file","","",1,null],[12,"poll_oneoff","","",1,null],[12,"proc_exit","","",1,null],[12,"proc_raise","","",1,null],[12,"sched_yield","","",1,null],[12,"random_get","","",1,null],[12,"sock_recv","","",1,null],[12,"sock_send","","",1,null],[12,"sock_shutdown","","",1,null],[5,"is_wasi_module","","",null,[[["str"]],["bool"]]],[11,"new","","Creates a new [`Wasi`] instance.",1,[[["wasictx"],["store"]],["wasi"]]],[11,"get_export","","Looks up a field called `name` in this structure,…",1,[[["str"],["self"]],[["func"],["option",["func"]]]]],[11,"new","wasmtime_wasi","Creates a new [`Wasi`] instance.",0,[[["store"],["wasictx"]],["wasi"]]],[11,"get_export","","Looks up a field called `name` in this structure,…",0,[[["str"],["self"]],[["func"],["option",["func"]]]]],[11,"from","","",2,[[["t"]],["t"]]],[11,"into","","",2,[[],["u"]]],[11,"try_from","","",2,[[["u"]],["result"]]],[11,"try_into","","",2,[[],["result"]]],[11,"borrow","","",2,[[["self"]],["t"]]],[11,"borrow_mut","","",2,[[["self"]],["t"]]],[11,"type_id","","",2,[[["self"]],["typeid"]]],[11,"from","","",3,[[["t"]],["t"]]],[11,"into","","",3,[[],["u"]]],[11,"try_from","","",3,[[["u"]],["result"]]],[11,"try_into","","",3,[[],["result"]]],[11,"borrow","","",3,[[["self"]],["t"]]],[11,"borrow_mut","","",3,[[["self"]],["t"]]],[11,"type_id","","",3,[[["self"]],["typeid"]]],[11,"from","","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]],[11,"from","wasmtime_wasi::old::snapshot_0","",1,[[["t"]],["t"]]],[11,"into","","",1,[[],["u"]]],[11,"try_from","","",1,[[["u"]],["result"]]],[11,"try_into","","",1,[[],["result"]]],[11,"borrow","","",1,[[["self"]],["t"]]],[11,"borrow_mut","","",1,[[["self"]],["t"]]],[11,"type_id","","",1,[[["self"]],["typeid"]]],[11,"fmt","wasmtime_wasi","",2,[[["formatter"],["self"]],[["result",["error"]],["error"]]]],[11,"new","","Make a new `WasiCtx` with some default settings.",2,[[],[["result",["wasictx","error"]],["error"],["wasictx"]]]],[11,"new","","Builder for a new `WasiCtx`.",3,[[],["wasictxbuilder"]]],[11,"args","","Add arguments to the command-line arguments list.",3,[[],["wasictxbuilder"]]],[11,"arg","","Add an argument to the command-line arguments list.",3,[[["s"]],["wasictxbuilder"]]],[11,"inherit_args","","Inherit the command-line arguments from the host process.",3,[[],["wasictxbuilder"]]],[11,"inherit_stdio","","Inherit the stdin, stdout, and stderr streams from the…",3,[[],["wasictxbuilder"]]],[11,"inherit_env","","Inherit the environment variables from the host process.",3,[[],["wasictxbuilder"]]],[11,"env","","Add an entry to the environment.",3,[[["s"]],["wasictxbuilder"]]],[11,"envs","","Add entries to the environment.",3,[[],["wasictxbuilder"]]],[11,"stdin","","Provide a File to use as stdin",3,[[["file"]],["wasictxbuilder"]]],[11,"stdout","","Provide a File to use as stdout",3,[[["file"]],["wasictxbuilder"]]],[11,"stderr","","Provide a File to use as stderr",3,[[["file"]],["wasictxbuilder"]]],[11,"preopened_dir","","Add a preopened directory.",3,[[["file"],["p"]],["wasictxbuilder"]]],[11,"build","","Build a `WasiCtx`, consuming this `WasiCtxBuilder`.",3,[[],[["result",["wasictx","error"]],["error"],["wasictx"]]]]],"p":[[3,"Wasi"],[3,"Wasi"],[3,"WasiCtx"],[3,"WasiCtxBuilder"]]}; +searchIndex["wasmtime_wast"] = {"doc":"Implementation of the WAST text format for wasmtime.","i":[[3,"WastContext","wasmtime_wast","The wast test script language allows modules to be defined…",null,null],[5,"instantiate_spectest","","Return an instance implementing the \"spectest\" interface…",null,[[["store"]],[["str"],["extern"],["hashmap",["str","extern"]]]]],[11,"new","","Construct a new instance of `WastContext`.",0,[[["store"]],["self"]]],[11,"register_spectest","","Register \"spectest\" which is used by the spec testsuite.",0,[[["self"]],["result"]]],[11,"run_buffer","","Run a wast script from a byte buffer.",0,[[["str"],["self"]],["result"]]],[11,"run_file","","Run a wast script from a file.",0,[[["self"],["path"]],["result"]]],[17,"VERSION","","Version number of this crate.",null,null],[11,"from","","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]]],"p":[[3,"WastContext"]]}; +searchIndex["wig"] = {"doc":"","i":[[14,"witx_host_types","wig","",null,null],[14,"witx_wasi_types","","",null,null],[14,"witx_wasi32_types","","",null,null],[14,"define_wasi_struct","","A single-use macro in the `wasmtime-wasi` crate.",null,null],[14,"define_hostcalls","","",null,null]],"p":[]}; +searchIndex["winx"] = {"doc":"","i":[],"p":[]}; +searchIndex["yanix"] = {"doc":"`yanix` stands for Yet Another Nix crate, and, well, it is…","i":[[4,"Errno","yanix","",null,null],[13,"EPERM","","",0,null],[13,"ENOENT","","",0,null],[13,"ESRCH","","",0,null],[13,"EINTR","","",0,null],[13,"EIO","","",0,null],[13,"ENXIO","","",0,null],[13,"E2BIG","","",0,null],[13,"ENOEXEC","","",0,null],[13,"EBADF","","",0,null],[13,"ECHILD","","",0,null],[13,"EAGAIN","","",0,null],[13,"ENOMEM","","",0,null],[13,"EACCES","","",0,null],[13,"EFAULT","","",0,null],[13,"EBUSY","","",0,null],[13,"EEXIST","","",0,null],[13,"EXDEV","","",0,null],[13,"ENODEV","","",0,null],[13,"ENOTDIR","","",0,null],[13,"EISDIR","","",0,null],[13,"EINVAL","","",0,null],[13,"ENFILE","","",0,null],[13,"EMFILE","","",0,null],[13,"ENOTTY","","",0,null],[13,"ETXTBSY","","",0,null],[13,"EFBIG","","",0,null],[13,"ENOSPC","","",0,null],[13,"ESPIPE","","",0,null],[13,"EROFS","","",0,null],[13,"EMLINK","","",0,null],[13,"EPIPE","","",0,null],[13,"EDOM","","",0,null],[13,"ERANGE","","",0,null],[13,"EDEADLK","","",0,null],[13,"ENAMETOOLONG","","",0,null],[13,"ENOLCK","","",0,null],[13,"ENOSYS","","",0,null],[13,"ENOTEMPTY","","",0,null],[13,"ELOOP","","",0,null],[13,"ENOMSG","","",0,null],[13,"EIDRM","","",0,null],[13,"ENOLINK","","",0,null],[13,"EPROTO","","",0,null],[13,"EMULTIHOP","","",0,null],[13,"EBADMSG","","",0,null],[13,"EOVERFLOW","","",0,null],[13,"EILSEQ","","",0,null],[13,"ENOTSOCK","","",0,null],[13,"EDESTADDRREQ","","",0,null],[13,"EMSGSIZE","","",0,null],[13,"EPROTOTYPE","","",0,null],[13,"ENOPROTOOPT","","",0,null],[13,"EPROTONOSUPPORT","","",0,null],[13,"EAFNOSUPPORT","","",0,null],[13,"EADDRINUSE","","",0,null],[13,"EADDRNOTAVAIL","","",0,null],[13,"ENETDOWN","","",0,null],[13,"ENETUNREACH","","",0,null],[13,"ENETRESET","","",0,null],[13,"ECONNABORTED","","",0,null],[13,"ECONNRESET","","",0,null],[13,"ENOBUFS","","",0,null],[13,"EISCONN","","",0,null],[13,"ENOTCONN","","",0,null],[13,"ETIMEDOUT","","",0,null],[13,"ECONNREFUSED","","",0,null],[13,"EHOSTUNREACH","","",0,null],[13,"EALREADY","","",0,null],[13,"EINPROGRESS","","",0,null],[13,"ESTALE","","",0,null],[13,"EDQUOT","","",0,null],[13,"ECANCELED","","",0,null],[13,"EOWNERDEAD","","",0,null],[13,"ENOTRECOVERABLE","","",0,null],[4,"YanixError","","",null,null],[13,"Errno","","",1,null],[13,"NulError","","",1,null],[13,"TryFromIntError","","",1,null],[0,"clock","","",null,null],[4,"ClockId","yanix::clock","",null,null],[13,"Realtime","","",2,null],[13,"Monotonic","","",2,null],[13,"ProcessCPUTime","","",2,null],[13,"ThreadCPUTime","","",2,null],[5,"clock_getres","","",null,[[["clockid"]],[["timespec"],["result",["timespec"]]]]],[5,"clock_gettime","","",null,[[["clockid"]],[["timespec"],["result",["timespec"]]]]],[11,"as_raw","","",2,[[["self"]],["clockid_t"]]],[0,"dir","yanix","",null,null],[3,"Dir","yanix::dir","",null,null],[3,"Entry","","",null,null],[3,"SeekLoc","","",null,null],[3,"DirIter","","",null,null],[4,"FileType","","",null,null],[13,"CharacterDevice","","",3,null],[13,"Directory","","",3,null],[13,"BlockDevice","","",3,null],[13,"RegularFile","","",3,null],[13,"Symlink","","",3,null],[13,"Fifo","","",3,null],[13,"Socket","","",3,null],[13,"Unknown","","",3,null],[8,"EntryExt","","",null,null],[10,"ino","","",4,[[["self"]],["u64"]]],[10,"seek_loc","","",4,[[["self"]],[["seekloc"],["result",["seekloc"]]]]],[11,"from","","Takes the ownership of the passed-in descriptor-based…",5,[[["intorawfd"]],["result"]]],[11,"seek","","Set the position of the directory stream, see `seekdir(3)`.",5,[[["seekloc"],["self"]]]],[11,"rewind","","Reset directory stream, see `rewinddir(3)`.",5,[[["self"]]]],[11,"tell","","Get the current position in the directory stream.",5,[[["self"]],["seekloc"]]],[11,"file_name","","Returns the file name of this directory entry.",6,[[["self"]],["cstr"]]],[11,"file_type","","Returns the type of this directory entry.",6,[[["self"]],["filetype"]]],[11,"to_raw","","",7,[[["self"]],["i64"]]],[11,"from_raw","","",3,[[["u8"]],["self"]]],[11,"to_raw","","",3,[[["self"]],["u8"]]],[11,"new","","",8,[[["t"]],["self"]]],[0,"fcntl","yanix","",null,null],[5,"dup_fd","yanix::fcntl","",null,[[["rawfd"],["bool"]],[["result",["rawfd"]],["rawfd"]]]],[5,"get_fd_flags","","",null,[[["rawfd"]],[["fdflag"],["result",["fdflag"]]]]],[5,"set_fd_flags","","",null,[[["rawfd"],["fdflag"]],["result"]]],[5,"get_status_flags","","",null,[[["rawfd"]],[["result",["oflag"]],["oflag"]]]],[5,"set_status_flags","","",null,[[["rawfd"],["oflag"]],["result"]]],[0,"file","yanix","",null,null],[3,"FdFlag","yanix::file","",null,null],[3,"AtFlag","","",null,null],[3,"Mode","","",null,null],[3,"OFlag","","",null,null],[3,"SFlag","","",null,null],[5,"isatty","","",null,[[["rawfd"]],[["result",["bool"]],["bool"]]]],[5,"openat","","",null,[[["asref",["osstr"]],["mode"],["oflag"],["rawfd"],["osstr"]],[["result",["rawfd"]],["rawfd"]]]],[5,"readlinkat","","",null,[[["osstr"],["rawfd"],["asref",["osstr"]]],[["osstring"],["result",["osstring"]]]]],[5,"mkdirat","","",null,[[["asref",["osstr"]],["mode"],["rawfd"],["osstr"]],["result"]]],[5,"linkat","","",null,[[["asref",["osstr"]],["atflag"],["rawfd"],["osstr"]],["result"]]],[5,"unlinkat","","",null,[[["asref",["osstr"]],["atflag"],["rawfd"],["osstr"]],["result"]]],[5,"renameat","","",null,[[["asref",["osstr"]],["rawfd"],["osstr"]],["result"]]],[5,"symlinkat","","",null,[[["asref",["osstr"]],["rawfd"],["osstr"]],["result"]]],[5,"fstatat","","",null,[[["asref",["osstr"]],["atflag"],["rawfd"],["osstr"]],[["result",["stat"]],["stat"]]]],[5,"fstat","","",null,[[["rawfd"]],[["result",["stat"]],["stat"]]]],[5,"fionread","","`fionread()` function, equivalent to `ioctl(fd, FIONREAD,…",null,[[["rawfd"]],[["usize"],["result",["usize"]]]]],[18,"CLOEXEC","","",9,null],[11,"empty","","Returns an empty set of flags",9,[[],["fdflag"]]],[11,"all","","Returns the set containing all flags.",9,[[],["fdflag"]]],[11,"bits","","Returns the raw value of the flags currently stored.",9,[[["self"]],["c_int"]]],[11,"from_bits","","Convert from underlying bit representation, unless that…",9,[[["c_int"]],[["fdflag"],["option",["fdflag"]]]]],[11,"from_bits_truncate","","Convert from underlying bit representation, dropping any…",9,[[["c_int"]],["fdflag"]]],[11,"from_bits_unchecked","","Convert from underlying bit representation, preserving all…",9,[[["c_int"]],["fdflag"]]],[11,"is_empty","","Returns `true` if no flags are currently stored.",9,[[["self"]],["bool"]]],[11,"is_all","","Returns `true` if all flags are currently set.",9,[[["self"]],["bool"]]],[11,"intersects","","Returns `true` if there are flags common to both `self`…",9,[[["self"],["fdflag"]],["bool"]]],[11,"contains","","Returns `true` all of the flags in `other` are contained…",9,[[["self"],["fdflag"]],["bool"]]],[11,"insert","","Inserts the specified flags in-place.",9,[[["self"],["fdflag"]]]],[11,"remove","","Removes the specified flags in-place.",9,[[["self"],["fdflag"]]]],[11,"toggle","","Toggles the specified flags in-place.",9,[[["self"],["fdflag"]]]],[11,"set","","Inserts or removes the specified flags depending on the…",9,[[["bool"],["self"],["fdflag"]]]],[18,"REMOVEDIR","","",10,null],[18,"SYMLINK_FOLLOW","","",10,null],[18,"SYMLINK_NOFOLLOW","","",10,null],[11,"empty","","Returns an empty set of flags",10,[[],["atflag"]]],[11,"all","","Returns the set containing all flags.",10,[[],["atflag"]]],[11,"bits","","Returns the raw value of the flags currently stored.",10,[[["self"]],["c_int"]]],[11,"from_bits","","Convert from underlying bit representation, unless that…",10,[[["c_int"]],[["atflag"],["option",["atflag"]]]]],[11,"from_bits_truncate","","Convert from underlying bit representation, dropping any…",10,[[["c_int"]],["atflag"]]],[11,"from_bits_unchecked","","Convert from underlying bit representation, preserving all…",10,[[["c_int"]],["atflag"]]],[11,"is_empty","","Returns `true` if no flags are currently stored.",10,[[["self"]],["bool"]]],[11,"is_all","","Returns `true` if all flags are currently set.",10,[[["self"]],["bool"]]],[11,"intersects","","Returns `true` if there are flags common to both `self`…",10,[[["atflag"],["self"]],["bool"]]],[11,"contains","","Returns `true` all of the flags in `other` are contained…",10,[[["atflag"],["self"]],["bool"]]],[11,"insert","","Inserts the specified flags in-place.",10,[[["atflag"],["self"]]]],[11,"remove","","Removes the specified flags in-place.",10,[[["atflag"],["self"]]]],[11,"toggle","","Toggles the specified flags in-place.",10,[[["atflag"],["self"]]]],[11,"set","","Inserts or removes the specified flags depending on the…",10,[[["atflag"],["self"],["bool"]]]],[18,"IRWXU","","",11,null],[18,"IRUSR","","",11,null],[18,"IWUSR","","",11,null],[18,"IXUSR","","",11,null],[18,"IRWXG","","",11,null],[18,"IRGRP","","",11,null],[18,"IWGRP","","",11,null],[18,"IXGRP","","",11,null],[18,"IRWXO","","",11,null],[18,"IROTH","","",11,null],[18,"IWOTH","","",11,null],[18,"IXOTH","","",11,null],[18,"ISUID","","",11,null],[18,"ISGID","","",11,null],[18,"ISVTX","","",11,null],[11,"empty","","Returns an empty set of flags",11,[[],["mode"]]],[11,"all","","Returns the set containing all flags.",11,[[],["mode"]]],[11,"bits","","Returns the raw value of the flags currently stored.",11,[[["self"]],["mode_t"]]],[11,"from_bits","","Convert from underlying bit representation, unless that…",11,[[["mode_t"]],[["option",["mode"]],["mode"]]]],[11,"from_bits_truncate","","Convert from underlying bit representation, dropping any…",11,[[["mode_t"]],["mode"]]],[11,"from_bits_unchecked","","Convert from underlying bit representation, preserving all…",11,[[["mode_t"]],["mode"]]],[11,"is_empty","","Returns `true` if no flags are currently stored.",11,[[["self"]],["bool"]]],[11,"is_all","","Returns `true` if all flags are currently set.",11,[[["self"]],["bool"]]],[11,"intersects","","Returns `true` if there are flags common to both `self`…",11,[[["mode"],["self"]],["bool"]]],[11,"contains","","Returns `true` all of the flags in `other` are contained…",11,[[["mode"],["self"]],["bool"]]],[11,"insert","","Inserts the specified flags in-place.",11,[[["mode"],["self"]]]],[11,"remove","","Removes the specified flags in-place.",11,[[["mode"],["self"]]]],[11,"toggle","","Toggles the specified flags in-place.",11,[[["mode"],["self"]]]],[11,"set","","Inserts or removes the specified flags depending on the…",11,[[["mode"],["self"],["bool"]]]],[18,"ACCMODE","","",12,null],[18,"APPEND","","",12,null],[18,"CREAT","","",12,null],[18,"DIRECTORY","","",12,null],[18,"DSYNC","","",12,null],[18,"EXCL","","",12,null],[18,"FSYNC","","",12,null],[18,"NOFOLLOW","","",12,null],[18,"NONBLOCK","","",12,null],[18,"RDONLY","","",12,null],[18,"WRONLY","","",12,null],[18,"RDWR","","",12,null],[18,"RSYNC","","",12,null],[18,"SYNC","","",12,null],[18,"TRUNC","","",12,null],[11,"empty","","Returns an empty set of flags",12,[[],["oflag"]]],[11,"all","","Returns the set containing all flags.",12,[[],["oflag"]]],[11,"bits","","Returns the raw value of the flags currently stored.",12,[[["self"]],["c_int"]]],[11,"from_bits","","Convert from underlying bit representation, unless that…",12,[[["c_int"]],[["option",["oflag"]],["oflag"]]]],[11,"from_bits_truncate","","Convert from underlying bit representation, dropping any…",12,[[["c_int"]],["oflag"]]],[11,"from_bits_unchecked","","Convert from underlying bit representation, preserving all…",12,[[["c_int"]],["oflag"]]],[11,"is_empty","","Returns `true` if no flags are currently stored.",12,[[["self"]],["bool"]]],[11,"is_all","","Returns `true` if all flags are currently set.",12,[[["self"]],["bool"]]],[11,"intersects","","Returns `true` if there are flags common to both `self`…",12,[[["self"],["oflag"]],["bool"]]],[11,"contains","","Returns `true` all of the flags in `other` are contained…",12,[[["self"],["oflag"]],["bool"]]],[11,"insert","","Inserts the specified flags in-place.",12,[[["self"],["oflag"]]]],[11,"remove","","Removes the specified flags in-place.",12,[[["self"],["oflag"]]]],[11,"toggle","","Toggles the specified flags in-place.",12,[[["self"],["oflag"]]]],[11,"set","","Inserts or removes the specified flags depending on the…",12,[[["bool"],["self"],["oflag"]]]],[18,"IFIFO","","",13,null],[18,"IFCHR","","",13,null],[18,"IFDIR","","",13,null],[18,"IFBLK","","",13,null],[18,"IFREG","","",13,null],[18,"IFLNK","","",13,null],[18,"IFSOCK","","",13,null],[18,"IFMT","","",13,null],[11,"empty","","Returns an empty set of flags",13,[[],["sflag"]]],[11,"all","","Returns the set containing all flags.",13,[[],["sflag"]]],[11,"bits","","Returns the raw value of the flags currently stored.",13,[[["self"]],["mode_t"]]],[11,"from_bits","","Convert from underlying bit representation, unless that…",13,[[["mode_t"]],[["option",["sflag"]],["sflag"]]]],[11,"from_bits_truncate","","Convert from underlying bit representation, dropping any…",13,[[["mode_t"]],["sflag"]]],[11,"from_bits_unchecked","","Convert from underlying bit representation, preserving all…",13,[[["mode_t"]],["sflag"]]],[11,"is_empty","","Returns `true` if no flags are currently stored.",13,[[["self"]],["bool"]]],[11,"is_all","","Returns `true` if all flags are currently set.",13,[[["self"]],["bool"]]],[11,"intersects","","Returns `true` if there are flags common to both `self`…",13,[[["sflag"],["self"]],["bool"]]],[11,"contains","","Returns `true` all of the flags in `other` are contained…",13,[[["sflag"],["self"]],["bool"]]],[11,"insert","","Inserts the specified flags in-place.",13,[[["sflag"],["self"]]]],[11,"remove","","Removes the specified flags in-place.",13,[[["sflag"],["self"]]]],[11,"toggle","","Toggles the specified flags in-place.",13,[[["sflag"],["self"]]]],[11,"set","","Inserts or removes the specified flags depending on the…",13,[[["sflag"],["self"],["bool"]]]],[0,"poll","yanix","",null,null],[3,"PollFlags","yanix::poll","",null,null],[3,"PollFd","","",null,null],[5,"poll","","",null,[[["c_int"]],[["usize"],["result",["usize"]]]]],[18,"POLLIN","","",14,null],[18,"POLLPRI","","",14,null],[18,"POLLOUT","","",14,null],[18,"POLLRDNORM","","",14,null],[18,"POLLWRNORM","","",14,null],[18,"POLLRDBAND","","",14,null],[18,"POLLWRBAND","","",14,null],[18,"POLLERR","","",14,null],[18,"POLLHUP","","",14,null],[18,"POLLNVAL","","",14,null],[11,"empty","","Returns an empty set of flags",14,[[],["pollflags"]]],[11,"all","","Returns the set containing all flags.",14,[[],["pollflags"]]],[11,"bits","","Returns the raw value of the flags currently stored.",14,[[["self"]],["c_short"]]],[11,"from_bits","","Convert from underlying bit representation, unless that…",14,[[["c_short"]],[["pollflags"],["option",["pollflags"]]]]],[11,"from_bits_truncate","","Convert from underlying bit representation, dropping any…",14,[[["c_short"]],["pollflags"]]],[11,"from_bits_unchecked","","Convert from underlying bit representation, preserving all…",14,[[["c_short"]],["pollflags"]]],[11,"is_empty","","Returns `true` if no flags are currently stored.",14,[[["self"]],["bool"]]],[11,"is_all","","Returns `true` if all flags are currently set.",14,[[["self"]],["bool"]]],[11,"intersects","","Returns `true` if there are flags common to both `self`…",14,[[["pollflags"],["self"]],["bool"]]],[11,"contains","","Returns `true` all of the flags in `other` are contained…",14,[[["pollflags"],["self"]],["bool"]]],[11,"insert","","Inserts the specified flags in-place.",14,[[["pollflags"],["self"]]]],[11,"remove","","Removes the specified flags in-place.",14,[[["pollflags"],["self"]]]],[11,"toggle","","Toggles the specified flags in-place.",14,[[["pollflags"],["self"]]]],[11,"set","","Inserts or removes the specified flags depending on the…",14,[[["pollflags"],["self"],["bool"]]]],[11,"new","","",15,[[["pollflags"],["rawfd"]],["self"]]],[11,"revents","","",15,[[],[["option",["pollflags"]],["pollflags"]]]],[0,"socket","yanix","",null,null],[4,"SockType","yanix::socket","",null,null],[13,"Stream","","",16,null],[13,"Datagram","","",16,null],[13,"SeqPacket","","",16,null],[13,"Raw","","",16,null],[13,"Rdm","","",16,null],[5,"get_socket_type","","",null,[[["rawfd"]],[["result",["socktype"]],["socktype"]]]],[11,"from_i32","yanix","",0,[[["i32"]],["self"]]],[11,"last","","",0,[[],["self"]]],[11,"from_success_code","","",0,[[["iszero"]],["result"]]],[11,"from_result","","",0,[[["isminusone"]],[["result"],["isminusone"]]]],[11,"from_raw","yanix::dir","",7,[[["i64"]],["result"]]],[0,"fadvise","yanix","",null,null],[4,"PosixFadviseAdvice","yanix::fadvise","",null,null],[13,"Normal","","",17,null],[13,"Sequential","","",17,null],[13,"Random","","",17,null],[13,"NoReuse","","",17,null],[13,"WillNeed","","",17,null],[13,"DontNeed","","",17,null],[5,"posix_fadvise","","",null,[[["rawfd"],["posixfadviseadvice"],["off_t"]],["result"]]],[6,"Result","yanix","",null,null],[11,"from","","",0,[[["t"]],["t"]]],[11,"into","","",0,[[],["u"]]],[11,"to_owned","","",0,[[["self"]],["t"]]],[11,"clone_into","","",0,[[["self"],["t"]]]],[11,"to_string","","",0,[[["self"]],["string"]]],[11,"try_from","","",0,[[["u"]],["result"]]],[11,"try_into","","",0,[[],["result"]]],[11,"borrow","","",0,[[["self"]],["t"]]],[11,"borrow_mut","","",0,[[["self"]],["t"]]],[11,"type_id","","",0,[[["self"]],["typeid"]]],[11,"from","","",1,[[["t"]],["t"]]],[11,"into","","",1,[[],["u"]]],[11,"to_string","","",1,[[["self"]],["string"]]],[11,"try_from","","",1,[[["u"]],["result"]]],[11,"try_into","","",1,[[],["result"]]],[11,"borrow","","",1,[[["self"]],["t"]]],[11,"borrow_mut","","",1,[[["self"]],["t"]]],[11,"type_id","","",1,[[["self"]],["typeid"]]],[11,"from","yanix::clock","",2,[[["t"]],["t"]]],[11,"into","","",2,[[],["u"]]],[11,"to_owned","","",2,[[["self"]],["t"]]],[11,"clone_into","","",2,[[["self"],["t"]]]],[11,"try_from","","",2,[[["u"]],["result"]]],[11,"try_into","","",2,[[],["result"]]],[11,"borrow","","",2,[[["self"]],["t"]]],[11,"borrow_mut","","",2,[[["self"]],["t"]]],[11,"type_id","","",2,[[["self"]],["typeid"]]],[11,"from","yanix::dir","",5,[[["t"]],["t"]]],[11,"into","","",5,[[],["u"]]],[11,"to_owned","","",5,[[["self"]],["t"]]],[11,"clone_into","","",5,[[["self"],["t"]]]],[11,"try_from","","",5,[[["u"]],["result"]]],[11,"try_into","","",5,[[],["result"]]],[11,"borrow","","",5,[[["self"]],["t"]]],[11,"borrow_mut","","",5,[[["self"]],["t"]]],[11,"type_id","","",5,[[["self"]],["typeid"]]],[11,"from","","",6,[[["t"]],["t"]]],[11,"into","","",6,[[],["u"]]],[11,"to_owned","","",6,[[["self"]],["t"]]],[11,"clone_into","","",6,[[["self"],["t"]]]],[11,"try_from","","",6,[[["u"]],["result"]]],[11,"try_into","","",6,[[],["result"]]],[11,"borrow","","",6,[[["self"]],["t"]]],[11,"borrow_mut","","",6,[[["self"]],["t"]]],[11,"type_id","","",6,[[["self"]],["typeid"]]],[11,"from","","",7,[[["t"]],["t"]]],[11,"into","","",7,[[],["u"]]],[11,"to_owned","","",7,[[["self"]],["t"]]],[11,"clone_into","","",7,[[["self"],["t"]]]],[11,"try_from","","",7,[[["u"]],["result"]]],[11,"try_into","","",7,[[],["result"]]],[11,"borrow","","",7,[[["self"]],["t"]]],[11,"borrow_mut","","",7,[[["self"]],["t"]]],[11,"type_id","","",7,[[["self"]],["typeid"]]],[11,"from","","",8,[[["t"]],["t"]]],[11,"into","","",8,[[],["u"]]],[11,"into_iter","","",8,[[],["i"]]],[11,"try_from","","",8,[[["u"]],["result"]]],[11,"try_into","","",8,[[],["result"]]],[11,"borrow","","",8,[[["self"]],["t"]]],[11,"borrow_mut","","",8,[[["self"]],["t"]]],[11,"type_id","","",8,[[["self"]],["typeid"]]],[11,"from","","",3,[[["t"]],["t"]]],[11,"into","","",3,[[],["u"]]],[11,"to_owned","","",3,[[["self"]],["t"]]],[11,"clone_into","","",3,[[["self"],["t"]]]],[11,"try_from","","",3,[[["u"]],["result"]]],[11,"try_into","","",3,[[],["result"]]],[11,"borrow","","",3,[[["self"]],["t"]]],[11,"borrow_mut","","",3,[[["self"]],["t"]]],[11,"type_id","","",3,[[["self"]],["typeid"]]],[11,"from","yanix::file","",9,[[["t"]],["t"]]],[11,"into","","",9,[[],["u"]]],[11,"to_owned","","",9,[[["self"]],["t"]]],[11,"clone_into","","",9,[[["self"],["t"]]]],[11,"try_from","","",9,[[["u"]],["result"]]],[11,"try_into","","",9,[[],["result"]]],[11,"borrow","","",9,[[["self"]],["t"]]],[11,"borrow_mut","","",9,[[["self"]],["t"]]],[11,"type_id","","",9,[[["self"]],["typeid"]]],[11,"from","","",10,[[["t"]],["t"]]],[11,"into","","",10,[[],["u"]]],[11,"to_owned","","",10,[[["self"]],["t"]]],[11,"clone_into","","",10,[[["self"],["t"]]]],[11,"try_from","","",10,[[["u"]],["result"]]],[11,"try_into","","",10,[[],["result"]]],[11,"borrow","","",10,[[["self"]],["t"]]],[11,"borrow_mut","","",10,[[["self"]],["t"]]],[11,"type_id","","",10,[[["self"]],["typeid"]]],[11,"from","","",11,[[["t"]],["t"]]],[11,"into","","",11,[[],["u"]]],[11,"to_owned","","",11,[[["self"]],["t"]]],[11,"clone_into","","",11,[[["self"],["t"]]]],[11,"try_from","","",11,[[["u"]],["result"]]],[11,"try_into","","",11,[[],["result"]]],[11,"borrow","","",11,[[["self"]],["t"]]],[11,"borrow_mut","","",11,[[["self"]],["t"]]],[11,"type_id","","",11,[[["self"]],["typeid"]]],[11,"from","","",12,[[["t"]],["t"]]],[11,"into","","",12,[[],["u"]]],[11,"to_owned","","",12,[[["self"]],["t"]]],[11,"clone_into","","",12,[[["self"],["t"]]]],[11,"try_from","","",12,[[["u"]],["result"]]],[11,"try_into","","",12,[[],["result"]]],[11,"borrow","","",12,[[["self"]],["t"]]],[11,"borrow_mut","","",12,[[["self"]],["t"]]],[11,"type_id","","",12,[[["self"]],["typeid"]]],[11,"from","","",13,[[["t"]],["t"]]],[11,"into","","",13,[[],["u"]]],[11,"to_owned","","",13,[[["self"]],["t"]]],[11,"clone_into","","",13,[[["self"],["t"]]]],[11,"try_from","","",13,[[["u"]],["result"]]],[11,"try_into","","",13,[[],["result"]]],[11,"borrow","","",13,[[["self"]],["t"]]],[11,"borrow_mut","","",13,[[["self"]],["t"]]],[11,"type_id","","",13,[[["self"]],["typeid"]]],[11,"from","yanix::poll","",14,[[["t"]],["t"]]],[11,"into","","",14,[[],["u"]]],[11,"to_owned","","",14,[[["self"]],["t"]]],[11,"clone_into","","",14,[[["self"],["t"]]]],[11,"try_from","","",14,[[["u"]],["result"]]],[11,"try_into","","",14,[[],["result"]]],[11,"borrow","","",14,[[["self"]],["t"]]],[11,"borrow_mut","","",14,[[["self"]],["t"]]],[11,"type_id","","",14,[[["self"]],["typeid"]]],[11,"from","","",15,[[["t"]],["t"]]],[11,"into","","",15,[[],["u"]]],[11,"to_owned","","",15,[[["self"]],["t"]]],[11,"clone_into","","",15,[[["self"],["t"]]]],[11,"try_from","","",15,[[["u"]],["result"]]],[11,"try_into","","",15,[[],["result"]]],[11,"borrow","","",15,[[["self"]],["t"]]],[11,"borrow_mut","","",15,[[["self"]],["t"]]],[11,"type_id","","",15,[[["self"]],["typeid"]]],[11,"from","yanix::socket","",16,[[["t"]],["t"]]],[11,"into","","",16,[[],["u"]]],[11,"to_owned","","",16,[[["self"]],["t"]]],[11,"clone_into","","",16,[[["self"],["t"]]]],[11,"try_from","","",16,[[["u"]],["result"]]],[11,"try_into","","",16,[[],["result"]]],[11,"borrow","","",16,[[["self"]],["t"]]],[11,"borrow_mut","","",16,[[["self"]],["t"]]],[11,"type_id","","",16,[[["self"]],["typeid"]]],[11,"from","yanix::fadvise","",17,[[["t"]],["t"]]],[11,"into","","",17,[[],["u"]]],[11,"to_owned","","",17,[[["self"]],["t"]]],[11,"clone_into","","",17,[[["self"],["t"]]]],[11,"try_from","","",17,[[["u"]],["result"]]],[11,"try_into","","",17,[[],["result"]]],[11,"borrow","","",17,[[["self"]],["t"]]],[11,"borrow_mut","","",17,[[["self"]],["t"]]],[11,"type_id","","",17,[[["self"]],["typeid"]]],[11,"ino","yanix::dir","",6,[[["self"]],["u64"]]],[11,"seek_loc","","",6,[[["self"]],[["seekloc"],["result",["seekloc"]]]]],[11,"drop","","",5,[[["self"]]]],[11,"from","yanix","",1,[[["errno"]],["self"]]],[11,"from","","",1,[[["nulerror"]],["self"]]],[11,"from","","",1,[[["tryfrominterror"]],["self"]]],[11,"extend","yanix::file","",9,[[["self"],["intoiterator"]]]],[11,"extend","","",10,[[["self"],["intoiterator"]]]],[11,"extend","","",11,[[["self"],["intoiterator"]]]],[11,"extend","","",12,[[["self"],["intoiterator"]]]],[11,"extend","","",13,[[["intoiterator"],["self"]]]],[11,"extend","yanix::poll","",14,[[["self"],["intoiterator"]]]],[11,"next","yanix::dir","",8,[[["self"]],["option"]]],[11,"clone","yanix::clock","",2,[[["self"]],["clockid"]]],[11,"clone","yanix::dir","",5,[[["self"]],["dir"]]],[11,"clone","","",6,[[["self"]],["entry"]]],[11,"clone","","",7,[[["self"]],["seekloc"]]],[11,"clone","","",3,[[["self"]],["filetype"]]],[11,"clone","yanix::file","",9,[[["self"]],["fdflag"]]],[11,"clone","","",10,[[["self"]],["atflag"]]],[11,"clone","","",11,[[["self"]],["mode"]]],[11,"clone","","",12,[[["self"]],["oflag"]]],[11,"clone","","",13,[[["self"]],["sflag"]]],[11,"clone","yanix::poll","",14,[[["self"]],["pollflags"]]],[11,"clone","","",15,[[["self"]],["pollfd"]]],[11,"clone","yanix::socket","",16,[[["self"]],["socktype"]]],[11,"clone","yanix","",0,[[["self"]],["errno"]]],[11,"clone","yanix::fadvise","",17,[[["self"]],["posixfadviseadvice"]]],[11,"cmp","yanix::file","",9,[[["self"],["fdflag"]],["ordering"]]],[11,"cmp","","",10,[[["atflag"],["self"]],["ordering"]]],[11,"cmp","","",11,[[["mode"],["self"]],["ordering"]]],[11,"cmp","","",12,[[["oflag"],["self"]],["ordering"]]],[11,"cmp","","",13,[[["self"],["sflag"]],["ordering"]]],[11,"cmp","yanix::poll","",14,[[["self"],["pollflags"]],["ordering"]]],[11,"eq","yanix::dir","",5,[[["dir"],["self"]],["bool"]]],[11,"ne","","",5,[[["dir"],["self"]],["bool"]]],[11,"eq","yanix::file","",9,[[["self"],["fdflag"]],["bool"]]],[11,"ne","","",9,[[["self"],["fdflag"]],["bool"]]],[11,"eq","","",10,[[["atflag"],["self"]],["bool"]]],[11,"ne","","",10,[[["atflag"],["self"]],["bool"]]],[11,"eq","","",11,[[["mode"],["self"]],["bool"]]],[11,"ne","","",11,[[["mode"],["self"]],["bool"]]],[11,"eq","","",12,[[["oflag"],["self"]],["bool"]]],[11,"ne","","",12,[[["oflag"],["self"]],["bool"]]],[11,"eq","","",13,[[["self"],["sflag"]],["bool"]]],[11,"ne","","",13,[[["self"],["sflag"]],["bool"]]],[11,"eq","yanix::poll","",14,[[["self"],["pollflags"]],["bool"]]],[11,"ne","","",14,[[["self"],["pollflags"]],["bool"]]],[11,"eq","","",15,[[["pollfd"],["self"]],["bool"]]],[11,"ne","","",15,[[["pollfd"],["self"]],["bool"]]],[11,"eq","yanix","",0,[[["errno"],["self"]],["bool"]]],[11,"partial_cmp","yanix::file","",9,[[["self"],["fdflag"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",9,[[["self"],["fdflag"]],["bool"]]],[11,"le","","",9,[[["self"],["fdflag"]],["bool"]]],[11,"gt","","",9,[[["self"],["fdflag"]],["bool"]]],[11,"ge","","",9,[[["self"],["fdflag"]],["bool"]]],[11,"partial_cmp","","",10,[[["atflag"],["self"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",10,[[["atflag"],["self"]],["bool"]]],[11,"le","","",10,[[["atflag"],["self"]],["bool"]]],[11,"gt","","",10,[[["atflag"],["self"]],["bool"]]],[11,"ge","","",10,[[["atflag"],["self"]],["bool"]]],[11,"partial_cmp","","",11,[[["mode"],["self"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",11,[[["mode"],["self"]],["bool"]]],[11,"le","","",11,[[["mode"],["self"]],["bool"]]],[11,"gt","","",11,[[["mode"],["self"]],["bool"]]],[11,"ge","","",11,[[["mode"],["self"]],["bool"]]],[11,"partial_cmp","","",12,[[["oflag"],["self"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",12,[[["oflag"],["self"]],["bool"]]],[11,"le","","",12,[[["oflag"],["self"]],["bool"]]],[11,"gt","","",12,[[["oflag"],["self"]],["bool"]]],[11,"ge","","",12,[[["oflag"],["self"]],["bool"]]],[11,"partial_cmp","","",13,[[["self"],["sflag"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",13,[[["self"],["sflag"]],["bool"]]],[11,"le","","",13,[[["self"],["sflag"]],["bool"]]],[11,"gt","","",13,[[["self"],["sflag"]],["bool"]]],[11,"ge","","",13,[[["self"],["sflag"]],["bool"]]],[11,"partial_cmp","yanix::poll","",14,[[["self"],["pollflags"]],[["option",["ordering"]],["ordering"]]]],[11,"lt","","",14,[[["self"],["pollflags"]],["bool"]]],[11,"le","","",14,[[["self"],["pollflags"]],["bool"]]],[11,"gt","","",14,[[["self"],["pollflags"]],["bool"]]],[11,"ge","","",14,[[["self"],["pollflags"]],["bool"]]],[11,"fmt","yanix::clock","",2,[[["formatter"],["self"]],["result"]]],[11,"fmt","yanix::dir","",5,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",6,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",7,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",3,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",8,[[["formatter"],["self"]],["result"]]],[11,"fmt","yanix::file","",9,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",10,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",11,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",12,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",13,[[["self"],["formatter"]],["result"]]],[11,"fmt","yanix::poll","",14,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",15,[[["formatter"],["self"]],["result"]]],[11,"fmt","yanix::socket","",16,[[["formatter"],["self"]],["result"]]],[11,"fmt","yanix","",0,[[["formatter"],["self"]],["result"]]],[11,"fmt","yanix::fadvise","",17,[[["formatter"],["self"]],["result"]]],[11,"fmt","yanix","",1,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",0,[[["formatter"],["self"]],["result"]]],[11,"fmt","","",1,[[["self"],["formatter"]],["result"]]],[11,"sub","yanix::file","Returns the set difference of the two sets of flags.",9,[[["fdflag"]],["fdflag"]]],[11,"sub","","Returns the set difference of the two sets of flags.",10,[[["atflag"]],["atflag"]]],[11,"sub","","Returns the set difference of the two sets of flags.",11,[[["mode"]],["mode"]]],[11,"sub","","Returns the set difference of the two sets of flags.",12,[[["oflag"]],["oflag"]]],[11,"sub","","Returns the set difference of the two sets of flags.",13,[[["sflag"]],["sflag"]]],[11,"sub","yanix::poll","Returns the set difference of the two sets of flags.",14,[[["pollflags"]],["pollflags"]]],[11,"sub_assign","yanix::file","Disables all flags enabled in the set.",9,[[["self"],["fdflag"]]]],[11,"sub_assign","","Disables all flags enabled in the set.",10,[[["atflag"],["self"]]]],[11,"sub_assign","","Disables all flags enabled in the set.",11,[[["mode"],["self"]]]],[11,"sub_assign","","Disables all flags enabled in the set.",12,[[["self"],["oflag"]]]],[11,"sub_assign","","Disables all flags enabled in the set.",13,[[["sflag"],["self"]]]],[11,"sub_assign","yanix::poll","Disables all flags enabled in the set.",14,[[["pollflags"],["self"]]]],[11,"not","yanix::file","Returns the complement of this set of flags.",9,[[],["fdflag"]]],[11,"not","","Returns the complement of this set of flags.",10,[[],["atflag"]]],[11,"not","","Returns the complement of this set of flags.",11,[[],["mode"]]],[11,"not","","Returns the complement of this set of flags.",12,[[],["oflag"]]],[11,"not","","Returns the complement of this set of flags.",13,[[],["sflag"]]],[11,"not","yanix::poll","Returns the complement of this set of flags.",14,[[],["pollflags"]]],[11,"bitand","yanix::file","Returns the intersection between the two sets of flags.",9,[[["fdflag"]],["fdflag"]]],[11,"bitand","","Returns the intersection between the two sets of flags.",10,[[["atflag"]],["atflag"]]],[11,"bitand","","Returns the intersection between the two sets of flags.",11,[[["mode"]],["mode"]]],[11,"bitand","","Returns the intersection between the two sets of flags.",12,[[["oflag"]],["oflag"]]],[11,"bitand","","Returns the intersection between the two sets of flags.",13,[[["sflag"]],["sflag"]]],[11,"bitand","yanix::poll","Returns the intersection between the two sets of flags.",14,[[["pollflags"]],["pollflags"]]],[11,"bitor","yanix::file","Returns the union of the two sets of flags.",9,[[["fdflag"]],["fdflag"]]],[11,"bitor","","Returns the union of the two sets of flags.",10,[[["atflag"]],["atflag"]]],[11,"bitor","","Returns the union of the two sets of flags.",11,[[["mode"]],["mode"]]],[11,"bitor","","Returns the union of the two sets of flags.",12,[[["oflag"]],["oflag"]]],[11,"bitor","","Returns the union of the two sets of flags.",13,[[["sflag"]],["sflag"]]],[11,"bitor","yanix::poll","Returns the union of the two sets of flags.",14,[[["pollflags"]],["pollflags"]]],[11,"bitxor","yanix::file","Returns the left flags, but with all the right flags…",9,[[["fdflag"]],["fdflag"]]],[11,"bitxor","","Returns the left flags, but with all the right flags…",10,[[["atflag"]],["atflag"]]],[11,"bitxor","","Returns the left flags, but with all the right flags…",11,[[["mode"]],["mode"]]],[11,"bitxor","","Returns the left flags, but with all the right flags…",12,[[["oflag"]],["oflag"]]],[11,"bitxor","","Returns the left flags, but with all the right flags…",13,[[["sflag"]],["sflag"]]],[11,"bitxor","yanix::poll","Returns the left flags, but with all the right flags…",14,[[["pollflags"]],["pollflags"]]],[11,"bitand_assign","yanix::file","Disables all flags disabled in the set.",9,[[["self"],["fdflag"]]]],[11,"bitand_assign","","Disables all flags disabled in the set.",10,[[["atflag"],["self"]]]],[11,"bitand_assign","","Disables all flags disabled in the set.",11,[[["mode"],["self"]]]],[11,"bitand_assign","","Disables all flags disabled in the set.",12,[[["self"],["oflag"]]]],[11,"bitand_assign","","Disables all flags disabled in the set.",13,[[["sflag"],["self"]]]],[11,"bitand_assign","yanix::poll","Disables all flags disabled in the set.",14,[[["pollflags"],["self"]]]],[11,"bitor_assign","yanix::file","Adds the set of flags.",9,[[["self"],["fdflag"]]]],[11,"bitor_assign","","Adds the set of flags.",10,[[["atflag"],["self"]]]],[11,"bitor_assign","","Adds the set of flags.",11,[[["mode"],["self"]]]],[11,"bitor_assign","","Adds the set of flags.",12,[[["self"],["oflag"]]]],[11,"bitor_assign","","Adds the set of flags.",13,[[["sflag"],["self"]]]],[11,"bitor_assign","yanix::poll","Adds the set of flags.",14,[[["pollflags"],["self"]]]],[11,"bitxor_assign","yanix::file","Toggles the set of flags.",9,[[["self"],["fdflag"]]]],[11,"bitxor_assign","","Toggles the set of flags.",10,[[["atflag"],["self"]]]],[11,"bitxor_assign","","Toggles the set of flags.",11,[[["mode"],["self"]]]],[11,"bitxor_assign","","Toggles the set of flags.",12,[[["self"],["oflag"]]]],[11,"bitxor_assign","","Toggles the set of flags.",13,[[["sflag"],["self"]]]],[11,"bitxor_assign","yanix::poll","Toggles the set of flags.",14,[[["pollflags"],["self"]]]],[11,"hash","yanix::dir","",5,[[["self"],["__h"]]]],[11,"hash","yanix::file","",9,[[["self"],["__h"]]]],[11,"hash","","",10,[[["self"],["__h"]]]],[11,"hash","","",11,[[["self"],["__h"]]]],[11,"hash","","",12,[[["self"],["__h"]]]],[11,"hash","","",13,[[["self"],["__h"]]]],[11,"hash","yanix::poll","",14,[[["self"],["__h"]]]],[11,"hash","","",15,[[["self"],["__h"]]]],[11,"hash","yanix","",0,[[["self"],["__h"]]]],[11,"from_iter","yanix::file","",9,[[["intoiterator"]],["fdflag"]]],[11,"from_iter","","",10,[[["intoiterator"]],["atflag"]]],[11,"from_iter","","",11,[[["intoiterator"]],["mode"]]],[11,"from_iter","","",12,[[["intoiterator"]],["oflag"]]],[11,"from_iter","","",13,[[["intoiterator"]],["sflag"]]],[11,"from_iter","yanix::poll","",14,[[["intoiterator"]],["pollflags"]]],[11,"fmt","yanix::file","",9,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",10,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",11,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",12,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",13,[[["self"],["formatter"]],["result"]]],[11,"fmt","yanix::poll","",14,[[["self"],["formatter"]],["result"]]],[11,"fmt","yanix::file","",9,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",10,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",11,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",12,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",13,[[["self"],["formatter"]],["result"]]],[11,"fmt","yanix::poll","",14,[[["self"],["formatter"]],["result"]]],[11,"fmt","yanix::file","",9,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",10,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",11,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",12,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",13,[[["self"],["formatter"]],["result"]]],[11,"fmt","yanix::poll","",14,[[["self"],["formatter"]],["result"]]],[11,"fmt","yanix::file","",9,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",10,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",11,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",12,[[["self"],["formatter"]],["result"]]],[11,"fmt","","",13,[[["self"],["formatter"]],["result"]]],[11,"fmt","yanix::poll","",14,[[["self"],["formatter"]],["result"]]],[11,"source","yanix","",1,[[["self"]],[["error"],["option",["error"]]]]],[11,"as_raw_fd","yanix::dir","",5,[[["self"]],["rawfd"]]]],"p":[[4,"Errno"],[4,"YanixError"],[4,"ClockId"],[4,"FileType"],[8,"EntryExt"],[3,"Dir"],[3,"Entry"],[3,"SeekLoc"],[3,"DirIter"],[3,"FdFlag"],[3,"AtFlag"],[3,"Mode"],[3,"OFlag"],[3,"SFlag"],[3,"PollFlags"],[3,"PollFd"],[4,"SockType"],[4,"PosixFadviseAdvice"]]}; +addSearchOptions(searchIndex);initSearch(searchIndex); \ No newline at end of file diff --git a/api/settings.css b/api/settings.css new file mode 100644 index 000000000000..6ce7665866c4 --- /dev/null +++ b/api/settings.css @@ -0,0 +1 @@ +.setting-line{padding:5px;position:relative;}.setting-line>div{max-width:calc(100% - 74px);display:inline-block;vertical-align:top;font-size:17px;padding-top:2px;}.setting-line>.title{font-size:19px;width:100%;max-width:none;border-bottom:1px solid;}.toggle{position:relative;display:inline-block;width:45px;height:27px;margin-right:20px;}.toggle input{display:none;}.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:#ccc;-webkit-transition:.3s;transition:.3s;}.slider:before{position:absolute;content:"";height:19px;width:19px;left:4px;bottom:4px;background-color:white;-webkit-transition:.3s;transition:.3s;}input:checked+.slider{background-color:#2196F3;}input:focus+.slider{box-shadow:0 0 1px #2196F3;}input:checked+.slider:before{-webkit-transform:translateX(19px);-ms-transform:translateX(19px);transform:translateX(19px);}.setting-line>.sub-settings{padding-left:42px;width:100%;display:block;} \ No newline at end of file diff --git a/api/settings.html b/api/settings.html new file mode 100644 index 000000000000..1a9b3a16e746 --- /dev/null +++ b/api/settings.html @@ -0,0 +1,2 @@ +Rustdoc settings

Rustdoc settings

Auto-hide item declarations
Auto-hide structs declaration
Auto-hide enums declaration
Auto-hide unions declaration
Auto-hide traits declaration
Auto-hide macros declaration
+
Auto-hide item attributes.
Auto-hide item methods' documentation
Auto-hide trait implementations documentation
Directly go to item in search if there is only one result
Show line numbers on code examples
Disable keyboard shortcuts
\ No newline at end of file diff --git a/api/settings.js b/api/settings.js new file mode 100644 index 000000000000..9930309054f2 --- /dev/null +++ b/api/settings.js @@ -0,0 +1 @@ +(function(){function changeSetting(settingName,isEnabled){updateLocalStorage('rustdoc-'+settingName,isEnabled)}function getSettingValue(settingName){return getCurrentValue('rustdoc-'+settingName)}function setEvents(){var elems=document.getElementsByClassName("slider");if(!elems||elems.length===0){return}for(var i=0;i"){sidebar.style.left="";this.style.left="";child.innerText="<";updateLocalStorage("rustdoc-source-sidebar-show","true")}else{sidebar.style.left="-300px";this.style.left="0";child.innerText=">";updateLocalStorage("rustdoc-source-sidebar-show","false")}}function createSidebarToggle(){var sidebarToggle=document.createElement("div");sidebarToggle.id="sidebar-toggle";sidebarToggle.onclick=toggleSidebar;var inner1=document.createElement("div");inner1.style.position="relative";var inner2=document.createElement("div");inner2.style.paddingTop="3px";if(getCurrentValue("rustdoc-source-sidebar-show")==="true"){inner2.innerText="<"}else{inner2.innerText=">";sidebarToggle.style.left="0"}inner1.appendChild(inner2);sidebarToggle.appendChild(inner1);return sidebarToggle}function createSourceSidebar(){if(window.rootPath.endsWith("/")===false){window.rootPath+="/"}var main=document.getElementById("main");var sidebarToggle=createSidebarToggle();main.insertBefore(sidebarToggle,main.firstChild);var sidebar=document.createElement("div");sidebar.id="source-sidebar";if(getCurrentValue("rustdoc-source-sidebar-show")!=="true"){sidebar.style.left="-300px"}var currentFile=getCurrentFilePath();var hasFoundFile=false;var title=document.createElement("div");title.className="title";title.innerText="Files";sidebar.appendChild(title);Object.keys(sourcesIndex).forEach(function(key){sourcesIndex[key].name=key;hasFoundFile=createDirEntry(sourcesIndex[key],sidebar,"",currentFile,hasFoundFile)});main.insertBefore(sidebar,main.firstChild)} \ No newline at end of file diff --git a/api/src/lightbeam/backend.rs.html b/api/src/lightbeam/backend.rs.html new file mode 100644 index 000000000000..f96acc3a61d2 --- /dev/null +++ b/api/src/lightbeam/backend.rs.html @@ -0,0 +1,12009 @@ +backend.rs.html -- source
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+2259
+2260
+2261
+2262
+2263
+2264
+2265
+2266
+2267
+2268
+2269
+2270
+2271
+2272
+2273
+2274
+2275
+2276
+2277
+2278
+2279
+2280
+2281
+2282
+2283
+2284
+2285
+2286
+2287
+2288
+2289
+2290
+2291
+2292
+2293
+2294
+2295
+2296
+2297
+2298
+2299
+2300
+2301
+2302
+2303
+2304
+2305
+2306
+2307
+2308
+2309
+2310
+2311
+2312
+2313
+2314
+2315
+2316
+2317
+2318
+2319
+2320
+2321
+2322
+2323
+2324
+2325
+2326
+2327
+2328
+2329
+2330
+2331
+2332
+2333
+2334
+2335
+2336
+2337
+2338
+2339
+2340
+2341
+2342
+2343
+2344
+2345
+2346
+2347
+2348
+2349
+2350
+2351
+2352
+2353
+2354
+2355
+2356
+2357
+2358
+2359
+2360
+2361
+2362
+2363
+2364
+2365
+2366
+2367
+2368
+2369
+2370
+2371
+2372
+2373
+2374
+2375
+2376
+2377
+2378
+2379
+2380
+2381
+2382
+2383
+2384
+2385
+2386
+2387
+2388
+2389
+2390
+2391
+2392
+2393
+2394
+2395
+2396
+2397
+2398
+2399
+2400
+2401
+2402
+2403
+2404
+2405
+2406
+2407
+2408
+2409
+2410
+2411
+2412
+2413
+2414
+2415
+2416
+2417
+2418
+2419
+2420
+2421
+2422
+2423
+2424
+2425
+2426
+2427
+2428
+2429
+2430
+2431
+2432
+2433
+2434
+2435
+2436
+2437
+2438
+2439
+2440
+2441
+2442
+2443
+2444
+2445
+2446
+2447
+2448
+2449
+2450
+2451
+2452
+2453
+2454
+2455
+2456
+2457
+2458
+2459
+2460
+2461
+2462
+2463
+2464
+2465
+2466
+2467
+2468
+2469
+2470
+2471
+2472
+2473
+2474
+2475
+2476
+2477
+2478
+2479
+2480
+2481
+2482
+2483
+2484
+2485
+2486
+2487
+2488
+2489
+2490
+2491
+2492
+2493
+2494
+2495
+2496
+2497
+2498
+2499
+2500
+2501
+2502
+2503
+2504
+2505
+2506
+2507
+2508
+2509
+2510
+2511
+2512
+2513
+2514
+2515
+2516
+2517
+2518
+2519
+2520
+2521
+2522
+2523
+2524
+2525
+2526
+2527
+2528
+2529
+2530
+2531
+2532
+2533
+2534
+2535
+2536
+2537
+2538
+2539
+2540
+2541
+2542
+2543
+2544
+2545
+2546
+2547
+2548
+2549
+2550
+2551
+2552
+2553
+2554
+2555
+2556
+2557
+2558
+2559
+2560
+2561
+2562
+2563
+2564
+2565
+2566
+2567
+2568
+2569
+2570
+2571
+2572
+2573
+2574
+2575
+2576
+2577
+2578
+2579
+2580
+2581
+2582
+2583
+2584
+2585
+2586
+2587
+2588
+2589
+2590
+2591
+2592
+2593
+2594
+2595
+2596
+2597
+2598
+2599
+2600
+2601
+2602
+2603
+2604
+2605
+2606
+2607
+2608
+2609
+2610
+2611
+2612
+2613
+2614
+2615
+2616
+2617
+2618
+2619
+2620
+2621
+2622
+2623
+2624
+2625
+2626
+2627
+2628
+2629
+2630
+2631
+2632
+2633
+2634
+2635
+2636
+2637
+2638
+2639
+2640
+2641
+2642
+2643
+2644
+2645
+2646
+2647
+2648
+2649
+2650
+2651
+2652
+2653
+2654
+2655
+2656
+2657
+2658
+2659
+2660
+2661
+2662
+2663
+2664
+2665
+2666
+2667
+2668
+2669
+2670
+2671
+2672
+2673
+2674
+2675
+2676
+2677
+2678
+2679
+2680
+2681
+2682
+2683
+2684
+2685
+2686
+2687
+2688
+2689
+2690
+2691
+2692
+2693
+2694
+2695
+2696
+2697
+2698
+2699
+2700
+2701
+2702
+2703
+2704
+2705
+2706
+2707
+2708
+2709
+2710
+2711
+2712
+2713
+2714
+2715
+2716
+2717
+2718
+2719
+2720
+2721
+2722
+2723
+2724
+2725
+2726
+2727
+2728
+2729
+2730
+2731
+2732
+2733
+2734
+2735
+2736
+2737
+2738
+2739
+2740
+2741
+2742
+2743
+2744
+2745
+2746
+2747
+2748
+2749
+2750
+2751
+2752
+2753
+2754
+2755
+2756
+2757
+2758
+2759
+2760
+2761
+2762
+2763
+2764
+2765
+2766
+2767
+2768
+2769
+2770
+2771
+2772
+2773
+2774
+2775
+2776
+2777
+2778
+2779
+2780
+2781
+2782
+2783
+2784
+2785
+2786
+2787
+2788
+2789
+2790
+2791
+2792
+2793
+2794
+2795
+2796
+2797
+2798
+2799
+2800
+2801
+2802
+2803
+2804
+2805
+2806
+2807
+2808
+2809
+2810
+2811
+2812
+2813
+2814
+2815
+2816
+2817
+2818
+2819
+2820
+2821
+2822
+2823
+2824
+2825
+2826
+2827
+2828
+2829
+2830
+2831
+2832
+2833
+2834
+2835
+2836
+2837
+2838
+2839
+2840
+2841
+2842
+2843
+2844
+2845
+2846
+2847
+2848
+2849
+2850
+2851
+2852
+2853
+2854
+2855
+2856
+2857
+2858
+2859
+2860
+2861
+2862
+2863
+2864
+2865
+2866
+2867
+2868
+2869
+2870
+2871
+2872
+2873
+2874
+2875
+2876
+2877
+2878
+2879
+2880
+2881
+2882
+2883
+2884
+2885
+2886
+2887
+2888
+2889
+2890
+2891
+2892
+2893
+2894
+2895
+2896
+2897
+2898
+2899
+2900
+2901
+2902
+2903
+2904
+2905
+2906
+2907
+2908
+2909
+2910
+2911
+2912
+2913
+2914
+2915
+2916
+2917
+2918
+2919
+2920
+2921
+2922
+2923
+2924
+2925
+2926
+2927
+2928
+2929
+2930
+2931
+2932
+2933
+2934
+2935
+2936
+2937
+2938
+2939
+2940
+2941
+2942
+2943
+2944
+2945
+2946
+2947
+2948
+2949
+2950
+2951
+2952
+2953
+2954
+2955
+2956
+2957
+2958
+2959
+2960
+2961
+2962
+2963
+2964
+2965
+2966
+2967
+2968
+2969
+2970
+2971
+2972
+2973
+2974
+2975
+2976
+2977
+2978
+2979
+2980
+2981
+2982
+2983
+2984
+2985
+2986
+2987
+2988
+2989
+2990
+2991
+2992
+2993
+2994
+2995
+2996
+2997
+2998
+2999
+3000
+3001
+3002
+3003
+3004
+3005
+3006
+3007
+3008
+3009
+3010
+3011
+3012
+3013
+3014
+3015
+3016
+3017
+3018
+3019
+3020
+3021
+3022
+3023
+3024
+3025
+3026
+3027
+3028
+3029
+3030
+3031
+3032
+3033
+3034
+3035
+3036
+3037
+3038
+3039
+3040
+3041
+3042
+3043
+3044
+3045
+3046
+3047
+3048
+3049
+3050
+3051
+3052
+3053
+3054
+3055
+3056
+3057
+3058
+3059
+3060
+3061
+3062
+3063
+3064
+3065
+3066
+3067
+3068
+3069
+3070
+3071
+3072
+3073
+3074
+3075
+3076
+3077
+3078
+3079
+3080
+3081
+3082
+3083
+3084
+3085
+3086
+3087
+3088
+3089
+3090
+3091
+3092
+3093
+3094
+3095
+3096
+3097
+3098
+3099
+3100
+3101
+3102
+3103
+3104
+3105
+3106
+3107
+3108
+3109
+3110
+3111
+3112
+3113
+3114
+3115
+3116
+3117
+3118
+3119
+3120
+3121
+3122
+3123
+3124
+3125
+3126
+3127
+3128
+3129
+3130
+3131
+3132
+3133
+3134
+3135
+3136
+3137
+3138
+3139
+3140
+3141
+3142
+3143
+3144
+3145
+3146
+3147
+3148
+3149
+3150
+3151
+3152
+3153
+3154
+3155
+3156
+3157
+3158
+3159
+3160
+3161
+3162
+3163
+3164
+3165
+3166
+3167
+3168
+3169
+3170
+3171
+3172
+3173
+3174
+3175
+3176
+3177
+3178
+3179
+3180
+3181
+3182
+3183
+3184
+3185
+3186
+3187
+3188
+3189
+3190
+3191
+3192
+3193
+3194
+3195
+3196
+3197
+3198
+3199
+3200
+3201
+3202
+3203
+3204
+3205
+3206
+3207
+3208
+3209
+3210
+3211
+3212
+3213
+3214
+3215
+3216
+3217
+3218
+3219
+3220
+3221
+3222
+3223
+3224
+3225
+3226
+3227
+3228
+3229
+3230
+3231
+3232
+3233
+3234
+3235
+3236
+3237
+3238
+3239
+3240
+3241
+3242
+3243
+3244
+3245
+3246
+3247
+3248
+3249
+3250
+3251
+3252
+3253
+3254
+3255
+3256
+3257
+3258
+3259
+3260
+3261
+3262
+3263
+3264
+3265
+3266
+3267
+3268
+3269
+3270
+3271
+3272
+3273
+3274
+3275
+3276
+3277
+3278
+3279
+3280
+3281
+3282
+3283
+3284
+3285
+3286
+3287
+3288
+3289
+3290
+3291
+3292
+3293
+3294
+3295
+3296
+3297
+3298
+3299
+3300
+3301
+3302
+3303
+3304
+3305
+3306
+3307
+3308
+3309
+3310
+3311
+3312
+3313
+3314
+3315
+3316
+3317
+3318
+3319
+3320
+3321
+3322
+3323
+3324
+3325
+3326
+3327
+3328
+3329
+3330
+3331
+3332
+3333
+3334
+3335
+3336
+3337
+3338
+3339
+3340
+3341
+3342
+3343
+3344
+3345
+3346
+3347
+3348
+3349
+3350
+3351
+3352
+3353
+3354
+3355
+3356
+3357
+3358
+3359
+3360
+3361
+3362
+3363
+3364
+3365
+3366
+3367
+3368
+3369
+3370
+3371
+3372
+3373
+3374
+3375
+3376
+3377
+3378
+3379
+3380
+3381
+3382
+3383
+3384
+3385
+3386
+3387
+3388
+3389
+3390
+3391
+3392
+3393
+3394
+3395
+3396
+3397
+3398
+3399
+3400
+3401
+3402
+3403
+3404
+3405
+3406
+3407
+3408
+3409
+3410
+3411
+3412
+3413
+3414
+3415
+3416
+3417
+3418
+3419
+3420
+3421
+3422
+3423
+3424
+3425
+3426
+3427
+3428
+3429
+3430
+3431
+3432
+3433
+3434
+3435
+3436
+3437
+3438
+3439
+3440
+3441
+3442
+3443
+3444
+3445
+3446
+3447
+3448
+3449
+3450
+3451
+3452
+3453
+3454
+3455
+3456
+3457
+3458
+3459
+3460
+3461
+3462
+3463
+3464
+3465
+3466
+3467
+3468
+3469
+3470
+3471
+3472
+3473
+3474
+3475
+3476
+3477
+3478
+3479
+3480
+3481
+3482
+3483
+3484
+3485
+3486
+3487
+3488
+3489
+3490
+3491
+3492
+3493
+3494
+3495
+3496
+3497
+3498
+3499
+3500
+3501
+3502
+3503
+3504
+3505
+3506
+3507
+3508
+3509
+3510
+3511
+3512
+3513
+3514
+3515
+3516
+3517
+3518
+3519
+3520
+3521
+3522
+3523
+3524
+3525
+3526
+3527
+3528
+3529
+3530
+3531
+3532
+3533
+3534
+3535
+3536
+3537
+3538
+3539
+3540
+3541
+3542
+3543
+3544
+3545
+3546
+3547
+3548
+3549
+3550
+3551
+3552
+3553
+3554
+3555
+3556
+3557
+3558
+3559
+3560
+3561
+3562
+3563
+3564
+3565
+3566
+3567
+3568
+3569
+3570
+3571
+3572
+3573
+3574
+3575
+3576
+3577
+3578
+3579
+3580
+3581
+3582
+3583
+3584
+3585
+3586
+3587
+3588
+3589
+3590
+3591
+3592
+3593
+3594
+3595
+3596
+3597
+3598
+3599
+3600
+3601
+3602
+3603
+3604
+3605
+3606
+3607
+3608
+3609
+3610
+3611
+3612
+3613
+3614
+3615
+3616
+3617
+3618
+3619
+3620
+3621
+3622
+3623
+3624
+3625
+3626
+3627
+3628
+3629
+3630
+3631
+3632
+3633
+3634
+3635
+3636
+3637
+3638
+3639
+3640
+3641
+3642
+3643
+3644
+3645
+3646
+3647
+3648
+3649
+3650
+3651
+3652
+3653
+3654
+3655
+3656
+3657
+3658
+3659
+3660
+3661
+3662
+3663
+3664
+3665
+3666
+3667
+3668
+3669
+3670
+3671
+3672
+3673
+3674
+3675
+3676
+3677
+3678
+3679
+3680
+3681
+3682
+3683
+3684
+3685
+3686
+3687
+3688
+3689
+3690
+3691
+3692
+3693
+3694
+3695
+3696
+3697
+3698
+3699
+3700
+3701
+3702
+3703
+3704
+3705
+3706
+3707
+3708
+3709
+3710
+3711
+3712
+3713
+3714
+3715
+3716
+3717
+3718
+3719
+3720
+3721
+3722
+3723
+3724
+3725
+3726
+3727
+3728
+3729
+3730
+3731
+3732
+3733
+3734
+3735
+3736
+3737
+3738
+3739
+3740
+3741
+3742
+3743
+3744
+3745
+3746
+3747
+3748
+3749
+3750
+3751
+3752
+3753
+3754
+3755
+3756
+3757
+3758
+3759
+3760
+3761
+3762
+3763
+3764
+3765
+3766
+3767
+3768
+3769
+3770
+3771
+3772
+3773
+3774
+3775
+3776
+3777
+3778
+3779
+3780
+3781
+3782
+3783
+3784
+3785
+3786
+3787
+3788
+3789
+3790
+3791
+3792
+3793
+3794
+3795
+3796
+3797
+3798
+3799
+3800
+3801
+3802
+3803
+3804
+3805
+3806
+3807
+3808
+3809
+3810
+3811
+3812
+3813
+3814
+3815
+3816
+3817
+3818
+3819
+3820
+3821
+3822
+3823
+3824
+3825
+3826
+3827
+3828
+3829
+3830
+3831
+3832
+3833
+3834
+3835
+3836
+3837
+3838
+3839
+3840
+3841
+3842
+3843
+3844
+3845
+3846
+3847
+3848
+3849
+3850
+3851
+3852
+3853
+3854
+3855
+3856
+3857
+3858
+3859
+3860
+3861
+3862
+3863
+3864
+3865
+3866
+3867
+3868
+3869
+3870
+3871
+3872
+3873
+3874
+3875
+3876
+3877
+3878
+3879
+3880
+3881
+3882
+3883
+3884
+3885
+3886
+3887
+3888
+3889
+3890
+3891
+3892
+3893
+3894
+3895
+3896
+3897
+3898
+3899
+3900
+3901
+3902
+3903
+3904
+3905
+3906
+3907
+3908
+3909
+3910
+3911
+3912
+3913
+3914
+3915
+3916
+3917
+3918
+3919
+3920
+3921
+3922
+3923
+3924
+3925
+3926
+3927
+3928
+3929
+3930
+3931
+3932
+3933
+3934
+3935
+3936
+3937
+3938
+3939
+3940
+3941
+3942
+3943
+3944
+3945
+3946
+3947
+3948
+3949
+3950
+3951
+3952
+3953
+3954
+3955
+3956
+3957
+3958
+3959
+3960
+3961
+3962
+3963
+3964
+3965
+3966
+3967
+3968
+3969
+3970
+3971
+3972
+3973
+3974
+3975
+3976
+3977
+3978
+3979
+3980
+3981
+3982
+3983
+3984
+3985
+3986
+3987
+3988
+3989
+3990
+3991
+3992
+3993
+3994
+3995
+3996
+3997
+3998
+3999
+4000
+4001
+4002
+4003
+4004
+4005
+4006
+4007
+4008
+4009
+4010
+4011
+4012
+4013
+4014
+4015
+4016
+4017
+4018
+4019
+4020
+4021
+4022
+4023
+4024
+4025
+4026
+4027
+4028
+4029
+4030
+4031
+4032
+4033
+4034
+4035
+4036
+4037
+4038
+4039
+4040
+4041
+4042
+4043
+4044
+4045
+4046
+4047
+4048
+4049
+4050
+4051
+4052
+4053
+4054
+4055
+4056
+4057
+4058
+4059
+4060
+4061
+4062
+4063
+4064
+4065
+4066
+4067
+4068
+4069
+4070
+4071
+4072
+4073
+4074
+4075
+4076
+4077
+4078
+4079
+4080
+4081
+4082
+4083
+4084
+4085
+4086
+4087
+4088
+4089
+4090
+4091
+4092
+4093
+4094
+4095
+4096
+4097
+4098
+4099
+4100
+4101
+4102
+4103
+4104
+4105
+4106
+4107
+4108
+4109
+4110
+4111
+4112
+4113
+4114
+4115
+4116
+4117
+4118
+4119
+4120
+4121
+4122
+4123
+4124
+4125
+4126
+4127
+4128
+4129
+4130
+4131
+4132
+4133
+4134
+4135
+4136
+4137
+4138
+4139
+4140
+4141
+4142
+4143
+4144
+4145
+4146
+4147
+4148
+4149
+4150
+4151
+4152
+4153
+4154
+4155
+4156
+4157
+4158
+4159
+4160
+4161
+4162
+4163
+4164
+4165
+4166
+4167
+4168
+4169
+4170
+4171
+4172
+4173
+4174
+4175
+4176
+4177
+4178
+4179
+4180
+4181
+4182
+4183
+4184
+4185
+4186
+4187
+4188
+4189
+4190
+4191
+4192
+4193
+4194
+4195
+4196
+4197
+4198
+4199
+4200
+4201
+4202
+4203
+4204
+4205
+4206
+4207
+4208
+4209
+4210
+4211
+4212
+4213
+4214
+4215
+4216
+4217
+4218
+4219
+4220
+4221
+4222
+4223
+4224
+4225
+4226
+4227
+4228
+4229
+4230
+4231
+4232
+4233
+4234
+4235
+4236
+4237
+4238
+4239
+4240
+4241
+4242
+4243
+4244
+4245
+4246
+4247
+4248
+4249
+4250
+4251
+4252
+4253
+4254
+4255
+4256
+4257
+4258
+4259
+4260
+4261
+4262
+4263
+4264
+4265
+4266
+4267
+4268
+4269
+4270
+4271
+4272
+4273
+4274
+4275
+4276
+4277
+4278
+4279
+4280
+4281
+4282
+4283
+4284
+4285
+4286
+4287
+4288
+4289
+4290
+4291
+4292
+4293
+4294
+4295
+4296
+4297
+4298
+4299
+4300
+4301
+4302
+4303
+4304
+4305
+4306
+4307
+4308
+4309
+4310
+4311
+4312
+4313
+4314
+4315
+4316
+4317
+4318
+4319
+4320
+4321
+4322
+4323
+4324
+4325
+4326
+4327
+4328
+4329
+4330
+4331
+4332
+4333
+4334
+4335
+4336
+4337
+4338
+4339
+4340
+4341
+4342
+4343
+4344
+4345
+4346
+4347
+4348
+4349
+4350
+4351
+4352
+4353
+4354
+4355
+4356
+4357
+4358
+4359
+4360
+4361
+4362
+4363
+4364
+4365
+4366
+4367
+4368
+4369
+4370
+4371
+4372
+4373
+4374
+4375
+4376
+4377
+4378
+4379
+4380
+4381
+4382
+4383
+4384
+4385
+4386
+4387
+4388
+4389
+4390
+4391
+4392
+4393
+4394
+4395
+4396
+4397
+4398
+4399
+4400
+4401
+4402
+4403
+4404
+4405
+4406
+4407
+4408
+4409
+4410
+4411
+4412
+4413
+4414
+4415
+4416
+4417
+4418
+4419
+4420
+4421
+4422
+4423
+4424
+4425
+4426
+4427
+4428
+4429
+4430
+4431
+4432
+4433
+4434
+4435
+4436
+4437
+4438
+4439
+4440
+4441
+4442
+4443
+4444
+4445
+4446
+4447
+4448
+4449
+4450
+4451
+4452
+4453
+4454
+4455
+4456
+4457
+4458
+4459
+4460
+4461
+4462
+4463
+4464
+4465
+4466
+4467
+4468
+4469
+4470
+4471
+4472
+4473
+4474
+4475
+4476
+4477
+4478
+4479
+4480
+4481
+4482
+4483
+4484
+4485
+4486
+4487
+4488
+4489
+4490
+4491
+4492
+4493
+4494
+4495
+4496
+4497
+4498
+4499
+4500
+4501
+4502
+4503
+4504
+4505
+4506
+4507
+4508
+4509
+4510
+4511
+4512
+4513
+4514
+4515
+4516
+4517
+4518
+4519
+4520
+4521
+4522
+4523
+4524
+4525
+4526
+4527
+4528
+4529
+4530
+4531
+4532
+4533
+4534
+4535
+4536
+4537
+4538
+4539
+4540
+4541
+4542
+4543
+4544
+4545
+4546
+4547
+4548
+4549
+4550
+4551
+4552
+4553
+4554
+4555
+4556
+4557
+4558
+4559
+4560
+4561
+4562
+4563
+4564
+4565
+4566
+4567
+4568
+4569
+4570
+4571
+4572
+4573
+4574
+4575
+4576
+4577
+4578
+4579
+4580
+4581
+4582
+4583
+4584
+4585
+4586
+4587
+4588
+4589
+4590
+4591
+4592
+4593
+4594
+4595
+4596
+4597
+4598
+4599
+4600
+4601
+4602
+4603
+4604
+4605
+4606
+4607
+4608
+4609
+4610
+4611
+4612
+4613
+4614
+4615
+4616
+4617
+4618
+4619
+4620
+4621
+4622
+4623
+4624
+4625
+4626
+4627
+4628
+4629
+4630
+4631
+4632
+4633
+4634
+4635
+4636
+4637
+4638
+4639
+4640
+4641
+4642
+4643
+4644
+4645
+4646
+4647
+4648
+4649
+4650
+4651
+4652
+4653
+4654
+4655
+4656
+4657
+4658
+4659
+4660
+4661
+4662
+4663
+4664
+4665
+4666
+4667
+4668
+4669
+4670
+4671
+4672
+4673
+4674
+4675
+4676
+4677
+4678
+4679
+4680
+4681
+4682
+4683
+4684
+4685
+4686
+4687
+4688
+4689
+4690
+4691
+4692
+4693
+4694
+4695
+4696
+4697
+4698
+4699
+4700
+4701
+4702
+4703
+4704
+4705
+4706
+4707
+4708
+4709
+4710
+4711
+4712
+4713
+4714
+4715
+4716
+4717
+4718
+4719
+4720
+4721
+4722
+4723
+4724
+4725
+4726
+4727
+4728
+4729
+4730
+4731
+4732
+4733
+4734
+4735
+4736
+4737
+4738
+4739
+4740
+4741
+4742
+4743
+4744
+4745
+4746
+4747
+4748
+4749
+4750
+4751
+4752
+4753
+4754
+4755
+4756
+4757
+4758
+4759
+4760
+4761
+4762
+4763
+4764
+4765
+4766
+4767
+4768
+4769
+4770
+4771
+4772
+4773
+4774
+4775
+4776
+4777
+4778
+4779
+4780
+4781
+4782
+4783
+4784
+4785
+4786
+4787
+4788
+4789
+4790
+4791
+4792
+4793
+4794
+4795
+4796
+4797
+4798
+4799
+4800
+4801
+4802
+4803
+4804
+4805
+4806
+4807
+4808
+4809
+4810
+4811
+4812
+4813
+4814
+4815
+4816
+4817
+4818
+4819
+4820
+4821
+4822
+4823
+4824
+4825
+4826
+4827
+4828
+4829
+4830
+4831
+4832
+4833
+4834
+4835
+4836
+4837
+4838
+4839
+4840
+4841
+4842
+4843
+4844
+4845
+4846
+4847
+4848
+4849
+4850
+4851
+4852
+4853
+4854
+4855
+4856
+4857
+4858
+4859
+4860
+4861
+4862
+4863
+4864
+4865
+4866
+4867
+4868
+4869
+4870
+4871
+4872
+4873
+4874
+4875
+4876
+4877
+4878
+4879
+4880
+4881
+4882
+4883
+4884
+4885
+4886
+4887
+4888
+4889
+4890
+4891
+4892
+4893
+4894
+4895
+4896
+4897
+4898
+4899
+4900
+4901
+4902
+4903
+4904
+4905
+4906
+4907
+4908
+4909
+4910
+4911
+4912
+4913
+4914
+4915
+4916
+4917
+4918
+4919
+4920
+4921
+4922
+4923
+4924
+4925
+4926
+4927
+4928
+4929
+4930
+4931
+4932
+4933
+4934
+4935
+4936
+4937
+4938
+4939
+4940
+4941
+4942
+4943
+4944
+4945
+4946
+4947
+4948
+4949
+4950
+4951
+4952
+4953
+4954
+4955
+4956
+4957
+4958
+4959
+4960
+4961
+4962
+4963
+4964
+4965
+4966
+4967
+4968
+4969
+4970
+4971
+4972
+4973
+4974
+4975
+4976
+4977
+4978
+4979
+4980
+4981
+4982
+4983
+4984
+4985
+4986
+4987
+4988
+4989
+4990
+4991
+4992
+4993
+4994
+4995
+4996
+4997
+4998
+4999
+5000
+5001
+5002
+5003
+5004
+5005
+5006
+5007
+5008
+5009
+5010
+5011
+5012
+5013
+5014
+5015
+5016
+5017
+5018
+5019
+5020
+5021
+5022
+5023
+5024
+5025
+5026
+5027
+5028
+5029
+5030
+5031
+5032
+5033
+5034
+5035
+5036
+5037
+5038
+5039
+5040
+5041
+5042
+5043
+5044
+5045
+5046
+5047
+5048
+5049
+5050
+5051
+5052
+5053
+5054
+5055
+5056
+5057
+5058
+5059
+5060
+5061
+5062
+5063
+5064
+5065
+5066
+5067
+5068
+5069
+5070
+5071
+5072
+5073
+5074
+5075
+5076
+5077
+5078
+5079
+5080
+5081
+5082
+5083
+5084
+5085
+5086
+5087
+5088
+5089
+5090
+5091
+5092
+5093
+5094
+5095
+5096
+5097
+5098
+5099
+5100
+5101
+5102
+5103
+5104
+5105
+5106
+5107
+5108
+5109
+5110
+5111
+5112
+5113
+5114
+5115
+5116
+5117
+5118
+5119
+5120
+5121
+5122
+5123
+5124
+5125
+5126
+5127
+5128
+5129
+5130
+5131
+5132
+5133
+5134
+5135
+5136
+5137
+5138
+5139
+5140
+5141
+5142
+5143
+5144
+5145
+5146
+5147
+5148
+5149
+5150
+5151
+5152
+5153
+5154
+5155
+5156
+5157
+5158
+5159
+5160
+5161
+5162
+5163
+5164
+5165
+5166
+5167
+5168
+5169
+5170
+5171
+5172
+5173
+5174
+5175
+5176
+5177
+5178
+5179
+5180
+5181
+5182
+5183
+5184
+5185
+5186
+5187
+5188
+5189
+5190
+5191
+5192
+5193
+5194
+5195
+5196
+5197
+5198
+5199
+5200
+5201
+5202
+5203
+5204
+5205
+5206
+5207
+5208
+5209
+5210
+5211
+5212
+5213
+5214
+5215
+5216
+5217
+5218
+5219
+5220
+5221
+5222
+5223
+5224
+5225
+5226
+5227
+5228
+5229
+5230
+5231
+5232
+5233
+5234
+5235
+5236
+5237
+5238
+5239
+5240
+5241
+5242
+5243
+5244
+5245
+5246
+5247
+5248
+5249
+5250
+5251
+5252
+5253
+5254
+5255
+5256
+5257
+5258
+5259
+5260
+5261
+5262
+5263
+5264
+5265
+5266
+5267
+5268
+5269
+5270
+5271
+5272
+5273
+5274
+5275
+5276
+5277
+5278
+5279
+5280
+5281
+5282
+5283
+5284
+5285
+5286
+5287
+5288
+5289
+5290
+5291
+5292
+5293
+5294
+5295
+5296
+5297
+5298
+5299
+5300
+5301
+5302
+5303
+5304
+5305
+5306
+5307
+5308
+5309
+5310
+5311
+5312
+5313
+5314
+5315
+5316
+5317
+5318
+5319
+5320
+5321
+5322
+5323
+5324
+5325
+5326
+5327
+5328
+5329
+5330
+5331
+5332
+5333
+5334
+5335
+5336
+5337
+5338
+5339
+5340
+5341
+5342
+5343
+5344
+5345
+5346
+5347
+5348
+5349
+5350
+5351
+5352
+5353
+5354
+5355
+5356
+5357
+5358
+5359
+5360
+5361
+5362
+5363
+5364
+5365
+5366
+5367
+5368
+5369
+5370
+5371
+5372
+5373
+5374
+5375
+5376
+5377
+5378
+5379
+5380
+5381
+5382
+5383
+5384
+5385
+5386
+5387
+5388
+5389
+5390
+5391
+5392
+5393
+5394
+5395
+5396
+5397
+5398
+5399
+5400
+5401
+5402
+5403
+5404
+5405
+5406
+5407
+5408
+5409
+5410
+5411
+5412
+5413
+5414
+5415
+5416
+5417
+5418
+5419
+5420
+5421
+5422
+5423
+5424
+5425
+5426
+5427
+5428
+5429
+5430
+5431
+5432
+5433
+5434
+5435
+5436
+5437
+5438
+5439
+5440
+5441
+5442
+5443
+5444
+5445
+5446
+5447
+5448
+5449
+5450
+5451
+5452
+5453
+5454
+5455
+5456
+5457
+5458
+5459
+5460
+5461
+5462
+5463
+5464
+5465
+5466
+5467
+5468
+5469
+5470
+5471
+5472
+5473
+5474
+5475
+5476
+5477
+5478
+5479
+5480
+5481
+5482
+5483
+5484
+5485
+5486
+5487
+5488
+5489
+5490
+5491
+5492
+5493
+5494
+5495
+5496
+5497
+5498
+5499
+5500
+5501
+5502
+5503
+5504
+5505
+5506
+5507
+5508
+5509
+5510
+5511
+5512
+5513
+5514
+5515
+5516
+5517
+5518
+5519
+5520
+5521
+5522
+5523
+5524
+5525
+5526
+5527
+5528
+5529
+5530
+5531
+5532
+5533
+5534
+5535
+5536
+5537
+5538
+5539
+5540
+5541
+5542
+5543
+5544
+5545
+5546
+5547
+5548
+5549
+5550
+5551
+5552
+5553
+5554
+5555
+5556
+5557
+5558
+5559
+5560
+5561
+5562
+5563
+5564
+5565
+5566
+5567
+5568
+5569
+5570
+5571
+5572
+5573
+5574
+5575
+5576
+5577
+5578
+5579
+5580
+5581
+5582
+5583
+5584
+5585
+5586
+5587
+5588
+5589
+5590
+5591
+5592
+5593
+5594
+5595
+5596
+5597
+5598
+5599
+5600
+5601
+5602
+5603
+5604
+5605
+5606
+5607
+5608
+5609
+5610
+5611
+5612
+5613
+5614
+5615
+5616
+5617
+5618
+5619
+5620
+5621
+5622
+5623
+5624
+5625
+5626
+5627
+5628
+5629
+5630
+5631
+5632
+5633
+5634
+5635
+5636
+5637
+5638
+5639
+5640
+5641
+5642
+5643
+5644
+5645
+5646
+5647
+5648
+5649
+5650
+5651
+5652
+5653
+5654
+5655
+5656
+5657
+5658
+5659
+5660
+5661
+5662
+5663
+5664
+5665
+5666
+5667
+5668
+5669
+5670
+5671
+5672
+5673
+5674
+5675
+5676
+5677
+5678
+5679
+5680
+5681
+5682
+5683
+5684
+5685
+5686
+5687
+5688
+5689
+5690
+5691
+5692
+5693
+5694
+5695
+5696
+5697
+5698
+5699
+5700
+5701
+5702
+5703
+5704
+5705
+5706
+5707
+5708
+5709
+5710
+5711
+5712
+5713
+5714
+5715
+5716
+5717
+5718
+5719
+5720
+5721
+5722
+5723
+5724
+5725
+5726
+5727
+5728
+5729
+5730
+5731
+5732
+5733
+5734
+5735
+5736
+5737
+5738
+5739
+5740
+5741
+5742
+5743
+5744
+5745
+5746
+5747
+5748
+5749
+5750
+5751
+5752
+5753
+5754
+5755
+5756
+5757
+5758
+5759
+5760
+5761
+5762
+5763
+5764
+5765
+5766
+5767
+5768
+5769
+5770
+5771
+5772
+5773
+5774
+5775
+5776
+5777
+5778
+5779
+5780
+5781
+5782
+5783
+5784
+5785
+5786
+5787
+5788
+5789
+5790
+5791
+5792
+5793
+5794
+5795
+5796
+5797
+5798
+5799
+5800
+5801
+5802
+5803
+5804
+5805
+5806
+5807
+5808
+5809
+5810
+5811
+5812
+5813
+5814
+5815
+5816
+5817
+5818
+5819
+5820
+5821
+5822
+5823
+5824
+5825
+5826
+5827
+5828
+5829
+5830
+5831
+5832
+5833
+5834
+5835
+5836
+5837
+5838
+5839
+5840
+5841
+5842
+5843
+5844
+5845
+5846
+5847
+5848
+5849
+5850
+5851
+5852
+5853
+5854
+5855
+5856
+5857
+5858
+5859
+5860
+5861
+5862
+5863
+5864
+5865
+5866
+5867
+5868
+5869
+5870
+5871
+5872
+5873
+5874
+5875
+5876
+5877
+5878
+5879
+5880
+5881
+5882
+5883
+5884
+5885
+5886
+5887
+5888
+5889
+5890
+5891
+5892
+5893
+5894
+5895
+5896
+5897
+5898
+5899
+5900
+5901
+5902
+5903
+5904
+5905
+5906
+5907
+5908
+5909
+5910
+5911
+5912
+5913
+5914
+5915
+5916
+5917
+5918
+5919
+5920
+5921
+5922
+5923
+5924
+5925
+5926
+5927
+5928
+5929
+5930
+5931
+5932
+5933
+5934
+5935
+5936
+5937
+5938
+5939
+5940
+5941
+5942
+5943
+5944
+5945
+5946
+5947
+5948
+5949
+5950
+5951
+5952
+5953
+5954
+5955
+5956
+5957
+5958
+5959
+5960
+5961
+5962
+5963
+5964
+5965
+5966
+5967
+5968
+5969
+5970
+5971
+5972
+5973
+5974
+5975
+5976
+5977
+5978
+5979
+5980
+5981
+5982
+5983
+5984
+5985
+5986
+5987
+5988
+5989
+5990
+5991
+5992
+5993
+5994
+5995
+5996
+5997
+5998
+5999
+6000
+6001
+6002
+6003
+
+#![allow(clippy::float_cmp)]
+
+use self::registers::*;
+use crate::error::Error;
+use crate::microwasm::{BrTarget, Ieee32, Ieee64, SignlessType, Type, Value, F32, F64, I32, I64};
+use crate::module::ModuleContext;
+use cranelift_codegen::{binemit, ir};
+use dynasm::dynasm;
+use dynasmrt::x64::Assembler;
+use dynasmrt::{AssemblyOffset, DynamicLabel, DynasmApi, DynasmLabelApi, ExecutableBuffer};
+use either::Either;
+
+use std::{
+    any::{Any, TypeId},
+    cmp::Ordering,
+    collections::HashMap,
+    convert::{TryFrom, TryInto},
+    fmt::Display,
+    iter::{self, FromIterator},
+    mem,
+    ops::RangeInclusive,
+};
+
+// TODO: Get rid of this! It's a total hack.
+mod magic {
+    use cranelift_codegen::ir;
+
+    /// Compute an `ir::ExternalName` for the `memory.grow` libcall for
+    /// 32-bit locally-defined memories.
+    pub fn get_memory32_grow_name() -> ir::ExternalName {
+        ir::ExternalName::user(1, 0)
+    }
+
+    /// Compute an `ir::ExternalName` for the `memory.grow` libcall for
+    /// 32-bit imported memories.
+    pub fn get_imported_memory32_grow_name() -> ir::ExternalName {
+        ir::ExternalName::user(1, 1)
+    }
+
+    /// Compute an `ir::ExternalName` for the `memory.size` libcall for
+    /// 32-bit locally-defined memories.
+    pub fn get_memory32_size_name() -> ir::ExternalName {
+        ir::ExternalName::user(1, 2)
+    }
+
+    /// Compute an `ir::ExternalName` for the `memory.size` libcall for
+    /// 32-bit imported memories.
+    pub fn get_imported_memory32_size_name() -> ir::ExternalName {
+        ir::ExternalName::user(1, 3)
+    }
+}
+
+/// Size of a pointer on the target in bytes.
+const WORD_SIZE: u32 = 8;
+
+type RegId = u8;
+
+#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
+pub enum GPR {
+    Rq(RegId),
+    Rx(RegId),
+}
+
+#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
+pub enum GPRType {
+    Rq,
+    Rx,
+}
+
+impl From<SignlessType> for GPRType {
+    fn from(other: SignlessType) -> GPRType {
+        match other {
+            I32 | I64 => GPRType::Rq,
+            F32 | F64 => GPRType::Rx,
+        }
+    }
+}
+
+impl From<SignlessType> for Option<GPRType> {
+    fn from(other: SignlessType) -> Self {
+        Some(other.into())
+    }
+}
+
+impl GPR {
+    fn type_(self) -> GPRType {
+        match self {
+            GPR::Rq(_) => GPRType::Rq,
+            GPR::Rx(_) => GPRType::Rx,
+        }
+    }
+
+    fn rq(self) -> Option<RegId> {
+        match self {
+            GPR::Rq(r) => Some(r),
+            GPR::Rx(_) => None,
+        }
+    }
+
+    fn rx(self) -> Option<RegId> {
+        match self {
+            GPR::Rx(r) => Some(r),
+            GPR::Rq(_) => None,
+        }
+    }
+}
+
+pub fn arg_locs(types: impl IntoIterator<Item = SignlessType>) -> Result<Vec<CCLoc>, Error> {
+    let types = types.into_iter();
+    let mut out = Vec::with_capacity(types.size_hint().0);
+    // TODO: VmCtx is in the first register
+    let mut int_gpr_iter = INTEGER_ARGS_IN_GPRS.iter();
+    let mut float_gpr_iter = FLOAT_ARGS_IN_GPRS.iter();
+    let mut stack_idx = 0;
+
+    for ty in types {
+        match ty {
+            I32 | I64 => out.push(int_gpr_iter.next().map(|&r| CCLoc::Reg(r)).unwrap_or_else(
+                || {
+                    let out = CCLoc::Stack(stack_idx);
+                    stack_idx += 1;
+                    out
+                },
+            )),
+            F32 | F64 => match float_gpr_iter.next() {
+                None => {
+                    return Err(Error::Microwasm(
+                        "Float args on stack not yet supported".to_string(),
+                    ))
+                }
+                Some(val) => out.push(CCLoc::Reg(*val)),
+            },
+        }
+    }
+
+    Ok(out)
+}
+
+pub fn ret_locs(types: impl IntoIterator<Item = SignlessType>) -> Result<Vec<CCLoc>, Error> {
+    let types = types.into_iter();
+    let mut out = Vec::with_capacity(types.size_hint().0);
+    // TODO: VmCtx is in the first register
+    let mut int_gpr_iter = INTEGER_RETURN_GPRS.iter();
+    let mut float_gpr_iter = FLOAT_RETURN_GPRS.iter();
+
+    for ty in types {
+        match ty {
+            I32 | I64 => match int_gpr_iter.next() {
+                None => {
+                    return Err(Error::Microwasm(
+                        "We don't support stack returns yet".to_string(),
+                    ))
+                }
+                Some(val) => out.push(CCLoc::Reg(*val)),
+            },
+            F32 | F64 => match float_gpr_iter.next() {
+                None => {
+                    return Err(Error::Microwasm(
+                        "We don't support stack returns yet".to_string(),
+                    ))
+                }
+                Some(val) => out.push(CCLoc::Reg(*val)),
+            },
+        }
+    }
+
+    Ok(out)
+}
+
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+struct GPRs {
+    bits: u16,
+}
+
+impl GPRs {
+    fn new() -> Self {
+        Self { bits: 0 }
+    }
+}
+
+#[allow(dead_code)]
+pub mod registers {
+    use super::{RegId, GPR};
+
+    pub mod rq {
+        use super::RegId;
+
+        pub const RAX: RegId = 0;
+        pub const RCX: RegId = 1;
+        pub const RDX: RegId = 2;
+        pub const RBX: RegId = 3;
+        pub const RSP: RegId = 4;
+        pub const RBP: RegId = 5;
+        pub const RSI: RegId = 6;
+        pub const RDI: RegId = 7;
+        pub const R8: RegId = 8;
+        pub const R9: RegId = 9;
+        pub const R10: RegId = 10;
+        pub const R11: RegId = 11;
+        pub const R12: RegId = 12;
+        pub const R13: RegId = 13;
+        pub const R14: RegId = 14;
+        pub const R15: RegId = 15;
+    }
+
+    pub const RAX: GPR = GPR::Rq(self::rq::RAX);
+    pub const RCX: GPR = GPR::Rq(self::rq::RCX);
+    pub const RDX: GPR = GPR::Rq(self::rq::RDX);
+    pub const RBX: GPR = GPR::Rq(self::rq::RBX);
+    pub const RSP: GPR = GPR::Rq(self::rq::RSP);
+    pub const RBP: GPR = GPR::Rq(self::rq::RBP);
+    pub const RSI: GPR = GPR::Rq(self::rq::RSI);
+    pub const RDI: GPR = GPR::Rq(self::rq::RDI);
+    pub const R8: GPR = GPR::Rq(self::rq::R8);
+    pub const R9: GPR = GPR::Rq(self::rq::R9);
+    pub const R10: GPR = GPR::Rq(self::rq::R10);
+    pub const R11: GPR = GPR::Rq(self::rq::R11);
+    pub const R12: GPR = GPR::Rq(self::rq::R12);
+    pub const R13: GPR = GPR::Rq(self::rq::R13);
+    pub const R14: GPR = GPR::Rq(self::rq::R14);
+    pub const R15: GPR = GPR::Rq(self::rq::R15);
+
+    pub const XMM0: GPR = GPR::Rx(0);
+    pub const XMM1: GPR = GPR::Rx(1);
+    pub const XMM2: GPR = GPR::Rx(2);
+    pub const XMM3: GPR = GPR::Rx(3);
+    pub const XMM4: GPR = GPR::Rx(4);
+    pub const XMM5: GPR = GPR::Rx(5);
+    pub const XMM6: GPR = GPR::Rx(6);
+    pub const XMM7: GPR = GPR::Rx(7);
+    pub const XMM8: GPR = GPR::Rx(8);
+    pub const XMM9: GPR = GPR::Rx(9);
+    pub const XMM10: GPR = GPR::Rx(10);
+    pub const XMM11: GPR = GPR::Rx(11);
+    pub const XMM12: GPR = GPR::Rx(12);
+    pub const XMM13: GPR = GPR::Rx(13);
+    pub const XMM14: GPR = GPR::Rx(14);
+    pub const XMM15: GPR = GPR::Rx(15);
+
+    pub const NUM_GPRS: u8 = 16;
+}
+
+const SIGN_MASK_F64: u64 = 0x8000_0000_0000_0000;
+const REST_MASK_F64: u64 = !SIGN_MASK_F64;
+const SIGN_MASK_F32: u32 = 0x8000_0000;
+const REST_MASK_F32: u32 = !SIGN_MASK_F32;
+
+impl GPRs {
+    fn take(&mut self) -> Option<RegId> {
+        let lz = self.bits.trailing_zeros();
+        if lz < 16 {
+            let gpr = lz as RegId;
+            self.mark_used(gpr);
+            Some(gpr)
+        } else {
+            None
+        }
+    }
+
+    fn mark_used(&mut self, gpr: RegId) {
+        self.bits &= !(1 << gpr as u16);
+    }
+
+    fn release(&mut self, gpr: RegId) {
+        debug_assert!(
+            !self.is_free(gpr),
+            "released register {} was already free",
+            gpr
+        );
+        self.bits |= 1 << gpr;
+    }
+
+    fn is_free(self, gpr: RegId) -> bool {
+        (self.bits & (1 << gpr)) != 0
+    }
+}
+
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub struct Registers {
+    /// Registers at 64 bits and below (al/ah/ax/eax/rax, for example)
+    scratch_64: (GPRs, [u8; NUM_GPRS as usize]),
+    /// Registers at 128 bits (xmm0, for example)
+    scratch_128: (GPRs, [u8; NUM_GPRS as usize]),
+}
+
+impl Default for Registers {
+    fn default() -> Self {
+        Self::new()
+    }
+}
+
+impl Registers {
+    pub fn new() -> Self {
+        Self {
+            scratch_64: (GPRs::new(), [1; NUM_GPRS as _]),
+            scratch_128: (GPRs::new(), [1; NUM_GPRS as _]),
+        }
+    }
+
+    pub fn release_scratch_register(&mut self) -> Result<(), Error> {
+        // Give ourselves a few scratch registers to work with, for now.
+        for &scratch in SCRATCH_REGS {
+            self.release(scratch)?;
+        }
+        Ok(())
+    }
+
+    fn scratch_counts_mut(&mut self, gpr: GPR) -> (u8, &mut (GPRs, [u8; NUM_GPRS as usize])) {
+        match gpr {
+            GPR::Rq(r) => (r, &mut self.scratch_64),
+            GPR::Rx(r) => (r, &mut self.scratch_128),
+        }
+    }
+
+    fn scratch_counts(&self, gpr: GPR) -> (u8, &(GPRs, [u8; NUM_GPRS as usize])) {
+        match gpr {
+            GPR::Rq(r) => (r, &self.scratch_64),
+            GPR::Rx(r) => (r, &self.scratch_128),
+        }
+    }
+
+    pub fn mark_used(&mut self, gpr: GPR) {
+        let (gpr, scratch_counts) = self.scratch_counts_mut(gpr);
+        scratch_counts.0.mark_used(gpr);
+        scratch_counts.1[gpr as usize] += 1;
+    }
+
+    pub fn num_usages(&self, gpr: GPR) -> u8 {
+        let (gpr, scratch_counts) = self.scratch_counts(gpr);
+        scratch_counts.1[gpr as usize]
+    }
+
+    pub fn take(&mut self, ty: impl Into<GPRType>) -> Option<GPR> {
+        let (mk_gpr, scratch_counts) = match ty.into() {
+            GPRType::Rq => (GPR::Rq as fn(_) -> _, &mut self.scratch_64),
+            GPRType::Rx => (GPR::Rx as fn(_) -> _, &mut self.scratch_128),
+        };
+
+        let out = scratch_counts.0.take()?;
+        scratch_counts.1[out as usize] += 1;
+        Some(mk_gpr(out))
+    }
+
+    pub fn release(&mut self, gpr: GPR) -> Result<(), Error> {
+        let (gpr, scratch_counts) = self.scratch_counts_mut(gpr);
+        let c = &mut scratch_counts.1[gpr as usize];
+        *c = match c.checked_sub(1) {
+            Some(e) => e,
+            None => return Err(Error::Microwasm(format!("Double-freed register: {}", gpr))),
+        };
+        if *c == 0 {
+            scratch_counts.0.release(gpr);
+        }
+        Ok(())
+    }
+
+    pub fn is_free(&self, gpr: GPR) -> bool {
+        let (gpr, scratch_counts) = self.scratch_counts(gpr);
+        scratch_counts.0.is_free(gpr)
+    }
+}
+
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct BlockCallingConvention {
+    pub stack_depth: StackDepth,
+    pub arguments: Vec<CCLoc>,
+}
+
+impl BlockCallingConvention {
+    pub fn function_start(args: impl IntoIterator<Item = CCLoc>) -> Self {
+        BlockCallingConvention {
+            // We start and return the function with stack depth 1 since we must
+            // allow space for the saved return address.
+            stack_depth: StackDepth(1),
+            arguments: Vec::from_iter(args),
+        }
+    }
+}
+
+// TODO: Combine this with `ValueLocation`?
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub enum CCLoc {
+    /// Value exists in a register.
+    Reg(GPR),
+    /// Value exists on the stack.
+    Stack(i32),
+}
+
+impl CCLoc {
+    fn try_from(other: ValueLocation) -> Option<Self> {
+        match other {
+            ValueLocation::Reg(reg) => Some(CCLoc::Reg(reg)),
+            ValueLocation::Stack(offset) => Some(CCLoc::Stack(offset)),
+            _ => None,
+        }
+    }
+}
+
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub enum CondCode {
+    CF0,
+    CF1,
+    ZF0,
+    ZF1,
+    CF0AndZF0,
+    CF1OrZF1,
+    ZF0AndSFEqOF,
+    ZF1OrSFNeOF,
+    SFEqOF,
+    SFNeOF,
+}
+
+mod cc {
+    use super::CondCode;
+
+    pub const EQUAL: CondCode = CondCode::ZF0;
+    pub const NOT_EQUAL: CondCode = CondCode::ZF1;
+    pub const GE_U: CondCode = CondCode::CF0;
+    pub const LT_U: CondCode = CondCode::CF1;
+    pub const GT_U: CondCode = CondCode::CF0AndZF0;
+    pub const LE_U: CondCode = CondCode::CF1OrZF1;
+    pub const GE_S: CondCode = CondCode::SFEqOF;
+    pub const LT_S: CondCode = CondCode::SFNeOF;
+    pub const GT_S: CondCode = CondCode::ZF0AndSFEqOF;
+    pub const LE_S: CondCode = CondCode::ZF1OrSFNeOF;
+}
+
+impl std::ops::Not for CondCode {
+    type Output = Self;
+
+    fn not(self) -> Self {
+        use CondCode::*;
+
+        match self {
+            CF0 => CF1,
+            CF1 => CF0,
+            ZF0 => ZF1,
+            ZF1 => ZF0,
+            CF0AndZF0 => CF1OrZF1,
+            CF1OrZF1 => CF0AndZF0,
+            ZF0AndSFEqOF => ZF1OrSFNeOF,
+            ZF1OrSFNeOF => ZF0AndSFEqOF,
+            SFEqOF => SFNeOF,
+            SFNeOF => SFEqOF,
+        }
+    }
+}
+
+/// Describes location of a value.
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub enum ValueLocation {
+    /// Value exists in a register.
+    Reg(GPR),
+    /// Value exists on the stack. Note that this offset is from the rsp as it
+    /// was when we entered the function.
+    Stack(i32),
+    /// Value is a literal
+    Immediate(Value),
+    /// Value is a set condition code
+    Cond(CondCode),
+}
+
+impl From<CCLoc> for ValueLocation {
+    fn from(other: CCLoc) -> Self {
+        match other {
+            CCLoc::Reg(r) => ValueLocation::Reg(r),
+            CCLoc::Stack(o) => ValueLocation::Stack(o),
+        }
+    }
+}
+
+impl ValueLocation {
+    fn stack(self) -> Option<i32> {
+        match self {
+            ValueLocation::Stack(o) => Some(o),
+            _ => None,
+        }
+    }
+
+    fn reg(self) -> Option<GPR> {
+        match self {
+            ValueLocation::Reg(r) => Some(r),
+            _ => None,
+        }
+    }
+
+    fn immediate(self) -> Option<Value> {
+        match self {
+            ValueLocation::Immediate(i) => Some(i),
+            _ => None,
+        }
+    }
+
+    fn imm_i32(self) -> Option<i32> {
+        self.immediate().and_then(Value::as_i32)
+    }
+
+    fn imm_i64(self) -> Option<i64> {
+        self.immediate().and_then(Value::as_i64)
+    }
+
+    fn imm_f32(self) -> Option<Ieee32> {
+        self.immediate().and_then(Value::as_f32)
+    }
+
+    fn imm_f64(self) -> Option<Ieee64> {
+        self.immediate().and_then(Value::as_f64)
+    }
+}
+
+// TODO: This assumes only system-v calling convention.
+// In system-v calling convention the first 6 arguments are passed via registers.
+// All rest arguments are passed on the stack.
+const INTEGER_ARGS_IN_GPRS: &[GPR] = &[RSI, RDX, RCX, R8, R9];
+const INTEGER_RETURN_GPRS: &[GPR] = &[RAX, RDX];
+const FLOAT_ARGS_IN_GPRS: &[GPR] = &[XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7];
+const FLOAT_RETURN_GPRS: &[GPR] = &[XMM0, XMM1];
+// List of scratch registers taken from https://wiki.osdev.org/System_V_ABI
+const SCRATCH_REGS: &[GPR] = &[
+    RSI, RDX, RCX, R8, R9, RAX, R10, R11, XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, XMM8,
+    XMM9, XMM10, XMM11, XMM12, XMM13, XMM14, XMM15,
+];
+const VMCTX: RegId = rq::RDI;
+
+#[must_use]
+#[derive(Debug, Clone)]
+pub struct FunctionEnd {
+    should_generate_epilogue: bool,
+}
+
+pub struct CodeGenSession<'module, M> {
+    assembler: Assembler,
+    pub module_context: &'module M,
+    pub op_offset_map: Vec<(AssemblyOffset, Box<dyn Display + Send + Sync>)>,
+    labels: Labels,
+    func_starts: Vec<(Option<AssemblyOffset>, DynamicLabel)>,
+}
+
+impl<'module, M> CodeGenSession<'module, M> {
+    pub fn new(func_count: u32, module_context: &'module M) -> Self {
+        let mut assembler = Assembler::new().unwrap();
+        let func_starts = iter::repeat_with(|| (None, assembler.new_dynamic_label()))
+            .take(func_count as usize)
+            .collect::<Vec<_>>();
+
+        CodeGenSession {
+            assembler,
+            op_offset_map: Default::default(),
+            labels: Default::default(),
+            func_starts,
+            module_context,
+        }
+    }
+
+    pub fn new_context<'this>(
+        &'this mut self,
+        func_idx: u32,
+        reloc_sink: &'this mut dyn binemit::RelocSink,
+    ) -> Context<'this, M> {
+        {
+            let func_start = &mut self.func_starts[func_idx as usize];
+
+            // At this point we know the exact start address of this function. Save it
+            // and define dynamic label at this location.
+            func_start.0 = Some(self.assembler.offset());
+            self.assembler.dynamic_label(func_start.1);
+        }
+
+        Context {
+            asm: &mut self.assembler,
+            current_function: func_idx,
+            reloc_sink,
+            func_starts: &self.func_starts,
+            labels: &mut self.labels,
+            block_state: Default::default(),
+            module_context: self.module_context,
+        }
+    }
+
+    fn finalize(&mut self) {
+        let mut values = self.labels.values_mut().collect::<Vec<_>>();
+        values.sort_unstable_by_key(|(_, align, _)| *align);
+        for (label, align, func) in values {
+            if let Some(mut func) = func.take() {
+                dynasm!(self.assembler
+                    ; .align *align as usize
+                );
+                self.assembler.dynamic_label(label.0);
+                func(&mut self.assembler);
+            }
+        }
+    }
+
+    pub fn into_translated_code_section(mut self) -> Result<TranslatedCodeSection, Error> {
+        self.finalize();
+        let exec_buf = self
+            .assembler
+            .finalize()
+            .map_err(|_asm| Error::Assembler("assembler error".to_owned()))?;
+        let func_starts = self
+            .func_starts
+            .iter()
+            .map(|(offset, _)| offset.unwrap())
+            .collect::<Vec<_>>();
+        Ok(TranslatedCodeSection {
+            exec_buf,
+            func_starts,
+            op_offset_map: self.op_offset_map,
+            // TODO
+            relocatable_accesses: vec![],
+        })
+    }
+}
+
+#[derive(Debug)]
+struct RelocateAddress {
+    reg: Option<GPR>,
+    imm: usize,
+}
+
+#[derive(Debug)]
+struct RelocateAccess {
+    position: AssemblyOffset,
+    dst_reg: GPR,
+    address: RelocateAddress,
+}
+
+pub struct TranslatedCodeSection {
+    exec_buf: ExecutableBuffer,
+    func_starts: Vec<AssemblyOffset>,
+    #[allow(dead_code)]
+    relocatable_accesses: Vec<RelocateAccess>,
+    op_offset_map: Vec<(AssemblyOffset, Box<dyn Display + Send + Sync>)>,
+}
+
+impl TranslatedCodeSection {
+    pub fn func_start(&self, idx: usize) -> *const u8 {
+        let offset = self.func_starts[idx];
+        self.exec_buf.ptr(offset)
+    }
+
+    pub fn func_range(&self, idx: usize) -> std::ops::Range<usize> {
+        let end = self
+            .func_starts
+            .get(idx + 1)
+            .map(|i| i.0)
+            .unwrap_or_else(|| self.exec_buf.len());
+
+        self.func_starts[idx].0..end
+    }
+
+    pub fn funcs<'a>(&'a self) -> impl Iterator<Item = std::ops::Range<usize>> + 'a {
+        (0..self.func_starts.len()).map(move |i| self.func_range(i))
+    }
+
+    pub fn buffer(&self) -> &[u8] {
+        &*self.exec_buf
+    }
+
+    pub fn disassemble(&self) {
+        crate::disassemble::disassemble(&*self.exec_buf, &self.op_offset_map).unwrap();
+    }
+}
+
+#[derive(Debug, Default, Clone)]
+pub struct BlockState {
+    pub stack: Stack,
+    pub depth: StackDepth,
+    pub regs: Registers,
+}
+
+type Stack = Vec<ValueLocation>;
+
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+enum LabelValue {
+    I32(i32),
+    I64(i64),
+}
+
+impl From<Value> for LabelValue {
+    fn from(other: Value) -> LabelValue {
+        match other {
+            Value::I32(v) => LabelValue::I32(v),
+            Value::I64(v) => LabelValue::I64(v),
+            Value::F32(v) => LabelValue::I32(v.to_bits() as _),
+            Value::F64(v) => LabelValue::I64(v.to_bits() as _),
+        }
+    }
+}
+
+type Labels = HashMap<
+    (u32, Either<TypeId, (LabelValue, Option<LabelValue>)>),
+    (Label, u32, Option<Box<dyn FnMut(&mut Assembler)>>),
+>;
+
+pub struct Context<'this, M> {
+    pub asm: &'this mut Assembler,
+    reloc_sink: &'this mut dyn binemit::RelocSink,
+    module_context: &'this M,
+    current_function: u32,
+    func_starts: &'this Vec<(Option<AssemblyOffset>, DynamicLabel)>,
+    /// Each push and pop on the value stack increments or decrements this value by 1 respectively.
+    pub block_state: BlockState,
+    labels: &'this mut Labels,
+}
+
+/// Label in code.
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub struct Label(DynamicLabel);
+
+/// Offset from starting value of SP counted in words.
+#[derive(Default, Debug, Copy, Clone, PartialEq, Eq)]
+pub struct StackDepth(u32);
+
+impl StackDepth {
+    pub fn reserve(&mut self, slots: u32) {
+        self.0 = self.0.checked_add(slots).unwrap();
+    }
+
+    pub fn free(&mut self, slots: u32) {
+        self.0 = self.0.checked_sub(slots).unwrap();
+    }
+}
+
+macro_rules! int_div {
+    ($full_div_s:ident, $full_div_u:ident, $div_u:ident, $div_s:ident, $rem_u:ident, $rem_s:ident, $imm_fn:ident, $signed_ty:ty, $unsigned_ty:ty, $reg_ty:tt, $pointer_ty:tt) => {
+        // TODO: Fast div using mul for constant divisor? It looks like LLVM doesn't do that for us when
+        //       emitting Wasm.
+        pub fn $div_u(&mut self) -> Result<(), Error>{
+            let divisor = self.pop()?;
+            let dividend = self.pop()?;
+
+            if let (Some(dividend), Some(divisor)) = (dividend.$imm_fn(), divisor.$imm_fn()) {
+                if divisor == 0 {
+                    self.trap();
+                    self.push(ValueLocation::Immediate((0 as $unsigned_ty).into()))?;
+                } else {
+                    self.push(ValueLocation::Immediate(
+                        <$unsigned_ty>::wrapping_div(dividend as _, divisor as _).into(),
+                    ))?;
+                }
+
+                return Ok(())
+            }
+
+            let (div, rem, saved) = self.$full_div_u(divisor, dividend)?;
+
+            self.free_value(rem)?;
+
+            let div = match div {
+                ValueLocation::Reg(div)  => {
+                    if saved.clone().any(|dst| dst == div) {
+                        let new = self.take_reg(I32).unwrap();
+                        dynasm!(self.asm
+                            ; mov Rq(new.rq().unwrap()), Rq(div.rq().unwrap())
+                        );
+                        self.block_state.regs.release(div)?;
+                        ValueLocation::Reg(new)
+                    } else {
+                        ValueLocation::Reg(div)
+                    }
+                }
+                _ => div,
+            };
+
+            self.cleanup_gprs(saved);
+
+            self.push(div)?;
+            Ok(())
+        }
+
+        // TODO: Fast div using mul for constant divisor? It looks like LLVM doesn't do that for us when
+        //       emitting Wasm.
+        pub fn $div_s(&mut self) -> Result<(), Error>{
+            let divisor = self.pop()?;
+            let dividend = self.pop()?;
+
+            if let (Some(dividend), Some(divisor)) = (dividend.$imm_fn(), divisor.$imm_fn()) {
+                if divisor == 0 {
+                    self.trap();
+                    self.push(ValueLocation::Immediate((0 as $signed_ty).into()))?;
+                } else {
+                    self.push(ValueLocation::Immediate(
+                        <$signed_ty>::wrapping_div(dividend, divisor).into(),
+                    ))?;
+                }
+
+                return Ok(())
+            }
+
+            let (div, rem, saved) = self.$full_div_s(divisor, dividend)?;
+
+            self.free_value(rem)?;
+
+            let div = match div {
+                ValueLocation::Reg(div)  => {
+                    if saved.clone().any(|dst| dst == div) {
+                        let new = self.take_reg(I32).unwrap();
+                        dynasm!(self.asm
+                            ; mov Rq(new.rq().unwrap()), Rq(div.rq().unwrap())
+                        );
+                        self.block_state.regs.release(div)?;
+                        ValueLocation::Reg(new)
+                    } else {
+                        ValueLocation::Reg(div)
+                    }
+                }
+                _ => div,
+            };
+
+            self.cleanup_gprs(saved);
+
+            self.push(div)?;
+            Ok(())
+        }
+
+        pub fn $rem_u(&mut self) -> Result<(), Error>{
+            let divisor = self.pop()?;
+            let dividend = self.pop()?;
+
+            if let (Some(dividend), Some(divisor)) = (dividend.$imm_fn(), divisor.$imm_fn()) {
+                if divisor == 0 {
+                    self.trap();
+                    self.push(ValueLocation::Immediate((0 as $unsigned_ty).into()))?;
+                } else {
+                    self.push(ValueLocation::Immediate(
+                        (dividend as $unsigned_ty % divisor as $unsigned_ty).into(),
+                    ))?;
+                }
+                return Ok(());
+            }
+
+            let (div, rem, saved) = self.$full_div_u(divisor, dividend)?;
+
+            self.free_value(div)?;
+
+            let rem = match rem {
+                ValueLocation::Reg(rem)  => {
+                    if saved.clone().any(|dst| dst == rem) {
+                        let new = self.take_reg(I32).unwrap();
+                        dynasm!(self.asm
+                            ; mov Rq(new.rq().unwrap()), Rq(rem.rq().unwrap())
+                        );
+                        self.block_state.regs.release(rem)?;
+                        ValueLocation::Reg(new)
+                    } else {
+                        ValueLocation::Reg(rem)
+                    }
+                }
+                _ => rem,
+            };
+
+            self.cleanup_gprs(saved);
+
+            self.push(rem)?;
+            Ok(())
+        }
+
+        pub fn $rem_s(&mut self) -> Result<(), Error>{
+            let mut divisor = self.pop()?;
+            let dividend = self.pop()?;
+
+            if let (Some(dividend), Some(divisor)) = (dividend.$imm_fn(), divisor.$imm_fn()) {
+                if divisor == 0 {
+                    self.trap();
+                    self.push(ValueLocation::Immediate((0 as $signed_ty).into()))?;
+                } else {
+                    self.push(ValueLocation::Immediate((dividend % divisor).into()))?;
+                }
+                return Ok(());
+            }
+
+            let is_neg1 = self.create_label();
+
+            let current_depth = self.block_state.depth.clone();
+
+            // TODO: This could cause segfaults because of implicit push/pop
+            let gen_neg1_case = match divisor {
+                ValueLocation::Immediate(_) => {
+                    if divisor.$imm_fn().unwrap() == -1 {
+                        self.push(ValueLocation::Immediate((-1 as $signed_ty).into()))?;
+                        self.free_value(dividend)?;
+                        return Ok(());
+                    }
+
+                    false
+                }
+                ValueLocation::Reg(_) => {
+                    let reg = match self.put_into_register(GPRType::Rq, &mut divisor) {
+                        Err(e) => return Err(e),
+                        Ok(o) => o.unwrap(),
+                    };
+
+                    dynasm!(self.asm
+                        ; cmp $reg_ty(reg.rq().unwrap()), -1
+                    );
+                    // TODO: We could choose `current_depth` as the depth here instead but we currently
+                    //       don't for simplicity
+                    self.set_stack_depth(current_depth.clone())?;
+                    dynasm!(self.asm
+                        ; je =>is_neg1.0
+                    );
+
+                    true
+                }
+                ValueLocation::Stack(offset) => {
+                    let offset = self.adjusted_offset(offset);
+                    dynasm!(self.asm
+                        ; cmp $pointer_ty [rsp + offset], -1
+                    );
+                    self.set_stack_depth(current_depth.clone())?;
+                    dynasm!(self.asm
+                        ; je =>is_neg1.0
+                    );
+
+                    true
+                }
+                ValueLocation::Cond(_) => {
+                    // `cc` can never be `-1`, only `0` and `1`
+                    false
+                }
+            };
+
+            let (div, rem, saved) = self.$full_div_s(divisor, dividend)?;
+
+            self.free_value(div)?;
+
+            let rem = match rem {
+                ValueLocation::Reg(rem) => {
+                    if saved.clone().any(|dst| dst == rem) {
+                        let new = self.take_reg(I32).unwrap();
+                        dynasm!(self.asm
+                            ; mov Rq(new.rq().unwrap()), Rq(rem.rq().unwrap())
+                        );
+                        self.block_state.regs.release(rem)?;
+                        ValueLocation::Reg(new)
+                    } else {
+                        ValueLocation::Reg(rem)
+                    }
+                }
+                _ => rem,
+            };
+
+            self.cleanup_gprs(saved);
+
+            if gen_neg1_case {
+                let ret = self.create_label();
+                self.set_stack_depth(current_depth.clone())?;
+                dynasm!(self.asm
+                    ; jmp =>ret.0
+                );
+                self.define_label(is_neg1);
+
+                let dst_ccloc = match CCLoc::try_from(rem) {
+                    None => {
+                        return Err(Error::Microwasm(
+                            "$rem_s Programmer error".to_string(),
+                        ))
+                    }
+                    Some(o) => o,
+                };
+
+                self.copy_value(
+                    ValueLocation::Immediate((0 as $signed_ty).into()),
+                    dst_ccloc
+                )?;
+
+                self.set_stack_depth(current_depth.clone())?;
+                self.define_label(ret);
+            }
+
+            self.push(rem)?;
+            Ok(())
+        }
+    }
+}
+
+macro_rules! unop {
+    ($name:ident, $instr:ident, $reg_ty:tt, $typ:ty, $const_fallback:expr) => {
+        pub fn $name(&mut self) -> Result<(), Error>{
+            let mut val = self.pop()?;
+
+            let out_val = match val {
+                ValueLocation::Immediate(imm) =>
+                    ValueLocation::Immediate(
+                        ($const_fallback(imm.as_int().unwrap() as $typ) as $typ).into()
+                    ),
+                ValueLocation::Stack(offset) => {
+                    let offset = self.adjusted_offset(offset);
+                    let temp = self.take_reg(Type::for_::<$typ>()).unwrap();
+                    dynasm!(self.asm
+                        ; $instr $reg_ty(temp.rq().unwrap()), [rsp + offset]
+                    );
+                    ValueLocation::Reg(temp)
+                }
+                ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                    let reg = match self.put_into_register(GPRType::Rq, &mut val) {
+                        Err(e) => return Err(e),
+                        Ok(o) => o.unwrap(),
+                    };
+                    let temp = self.take_reg(Type::for_::<$typ>()).unwrap();
+                    dynasm!(self.asm
+                        ; $instr $reg_ty(temp.rq().unwrap()), $reg_ty(reg.rq().unwrap())
+                    );
+                    ValueLocation::Reg(temp)
+                }
+            };
+
+            self.free_value(val)?;
+            self.push(out_val)?;
+            Ok(())
+        }
+    }
+}
+
+macro_rules! conversion {
+    (
+        $name:ident,
+        $instr:ident,
+        $in_reg_ty:tt,
+        $in_reg_fn:ident,
+        $out_reg_ty:tt,
+        $out_reg_fn:ident,
+        $in_typ:ty,
+        $out_typ:ty,
+        $const_ty_fn:ident,
+        $const_fallback:expr
+    ) => {
+        pub fn $name(&mut self) -> Result<(), Error>{
+            let mut val = self.pop()?;
+
+            let out_val = match val {
+                ValueLocation::Immediate(imm) =>
+                    ValueLocation::Immediate(
+                        $const_fallback(imm.$const_ty_fn().unwrap()).into()
+                    ),
+                ValueLocation::Stack(offset) => {
+                    let offset = self.adjusted_offset(offset);
+                    let temp = self.take_reg(Type::for_::<$out_typ>()).unwrap();
+                    dynasm!(self.asm
+                        ; $instr $out_reg_ty(temp.$out_reg_fn().unwrap()), [rsp + offset]
+                    );
+
+                    ValueLocation::Reg(temp)
+                }
+                ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                    let reg = match self.put_into_register(Type::for_::<$in_typ>(), &mut val)  {
+                        Err(e) => return Err(e),
+                        Ok(o) => o.unwrap(),
+                    };
+                    let temp = self.take_reg(Type::for_::<$out_typ>()).unwrap();
+
+                    dynasm!(self.asm
+                        ; $instr $out_reg_ty(temp.$out_reg_fn().unwrap()), $in_reg_ty(reg.$in_reg_fn().unwrap())
+                    );
+
+                    ValueLocation::Reg(temp)
+                }
+            };
+
+            self.free_value(val)?;
+
+            self.push(out_val)?;
+            Ok(())
+        }
+    }
+}
+
+// TODO: Support immediate `count` parameters
+macro_rules! shift {
+    ($name:ident, $reg_ty:tt, $instr:ident, $const_fallback:expr, $ty:expr) => {
+        pub fn $name(&mut self) -> Result<(), Error>{
+            let mut count = self.pop()?;
+            let mut val = self.pop()?;
+
+            if let Some(imm) = count.immediate() {
+                if let Some(imm) = imm.as_int() {
+                    if let Ok(imm) = i8::try_from(imm) {
+                        let reg = match self.put_into_temp_register($ty, &mut val) {
+                            Err(e) => return Err(e),
+                            Ok(o) => o.unwrap(),
+                        };
+
+                        dynasm!(self.asm
+                            ; $instr $reg_ty(reg.rq().unwrap()), imm
+                        );
+                        self.push(ValueLocation::Reg(reg))?;
+                        return Ok(());
+                    }
+                }
+            }
+
+            if val == ValueLocation::Reg(RCX) {
+                let new = self.take_reg($ty).unwrap();
+                self.copy_value(val, CCLoc::Reg(new))?;
+                self.free_value(val)?;
+                val = ValueLocation::Reg(new);
+            }
+
+            // TODO: Maybe allocate `RCX`, write `count` to it and then free `count`.
+            //       Once we've implemented refcounting this will do the right thing
+            //       for free.
+            let temp_rcx = match count {
+                ValueLocation::Reg(RCX) => {None}
+                other => {
+                    let out = if self.block_state.regs.is_free(RCX) {
+                        None
+                    } else {
+                        let new_reg = self.take_reg(I32).unwrap();
+                        dynasm!(self.asm
+                            ; mov Rq(new_reg.rq().unwrap()), rcx
+                        );
+                        Some(new_reg)
+                    };
+
+                    match other {
+                        ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                            let gpr = match self.put_into_register(I32, &mut count) {
+                                Err(e) => return Err(e),
+                                Ok(o) => o.unwrap(),
+                            };
+                            dynasm!(self.asm
+                                ; mov cl, Rb(gpr.rq().unwrap())
+                            );
+                        }
+                        ValueLocation::Stack(offset) => {
+                            let offset = self.adjusted_offset(offset);
+                            dynasm!(self.asm
+                                ; mov cl, [rsp + offset]
+                            );
+                        }
+                        ValueLocation::Immediate(imm) => {
+                            dynasm!(self.asm
+                                ; mov cl, imm.as_int().unwrap() as i8
+                            );
+                        }
+                    }
+
+                    out
+                }
+            };
+
+            self.free_value(count)?;
+            self.block_state.regs.mark_used(RCX);
+            count = ValueLocation::Reg(RCX);
+
+            let reg = match self.put_into_temp_register($ty, &mut val) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+
+            dynasm!(self.asm
+                ; $instr $reg_ty(reg.rq().unwrap()), cl
+            );
+
+            self.free_value(count)?;
+
+            if let Some(gpr) = temp_rcx {
+                dynasm!(self.asm
+                    ; mov rcx, Rq(gpr.rq().unwrap())
+                );
+                self.block_state.regs.release(gpr)?;
+            }
+
+            self.push(val)?;
+            Ok(())
+        }
+    }
+}
+
+macro_rules! cmp_i32 {
+    ($name:ident, $flags:expr, $reverse_flags:expr, $const_fallback:expr) => {
+        pub fn $name(&mut self) -> Result<(), Error>{
+            let mut right = self.pop()?;
+            let mut left = self.pop()?;
+
+            let out = if let Some(i) = left.imm_i32() {
+                match right {
+                    ValueLocation::Stack(offset) => {
+                        let offset = self.adjusted_offset(offset);
+
+                        dynasm!(self.asm
+                            ; cmp DWORD [rsp + offset], i
+                        );
+                        ValueLocation::Cond($reverse_flags)
+                    }
+                    ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                        let rreg = match self.put_into_register(I32, &mut right) {
+                            Err(e) => return Err(e),
+                            Ok(o) => o.unwrap(),
+                        };
+                        dynasm!(self.asm
+                            ; cmp Rd(rreg.rq().unwrap()), i
+                        );
+                        ValueLocation::Cond($reverse_flags)
+                    }
+                    ValueLocation::Immediate(right) => {
+                        ValueLocation::Immediate(
+                            (if $const_fallback(i, right.as_i32().unwrap()) {
+                                1i32
+                            } else {
+                                0i32
+                            }).into()
+                        )
+                    }
+                }
+            } else {
+                let lreg = match self.put_into_register(I32, &mut left) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                match right {
+                    ValueLocation::Stack(offset) => {
+                        let offset = self.adjusted_offset(offset);
+                        dynasm!(self.asm
+                            ; cmp Rd(lreg.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                    ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                        let rreg = match self.put_into_register(I32, &mut right) {
+                            Err(e) => return Err(e),
+                            Ok(o) => o.unwrap(),
+                        };
+
+                        dynasm!(self.asm
+                            ; cmp Rd(lreg.rq().unwrap()), Rd(rreg.rq().unwrap())
+                        );
+                    }
+                    ValueLocation::Immediate(i) => {
+                        dynasm!(self.asm
+                            ; cmp Rd(lreg.rq().unwrap()), i.as_i32().unwrap()
+                        );
+                    }
+                }
+
+                ValueLocation::Cond($flags)
+            };
+
+            self.free_value(left)?;
+            self.free_value(right)?;
+
+            self.push(out)?;
+            Ok(())
+        }
+    }
+}
+
+macro_rules! cmp_i64 {
+    ($name:ident, $flags:expr, $reverse_flags:expr, $const_fallback:expr) => {
+        pub fn $name(&mut self) -> Result<(), Error> {
+            let mut right = self.pop()?;
+            let mut left = self.pop()?;
+
+            let out = if let Some(i) = left.imm_i64() {
+                match right {
+                    ValueLocation::Stack(offset) => {
+                        let offset = self.adjusted_offset(offset);
+                        if let Some(i) = i.try_into().ok() {
+                            dynasm!(self.asm
+                                ; cmp QWORD [rsp + offset], i
+                            );
+                        } else {
+                            let lreg = match self.put_into_register(I32, &mut left) {
+                                Err(e) => return Err(e),
+                                Ok(o) => o.unwrap(),
+                            };
+
+                            dynasm!(self.asm
+                                ; cmp QWORD [rsp + offset], Rq(lreg.rq().unwrap())
+                            );
+                        }
+                        ValueLocation::Cond($reverse_flags)
+                    }
+                    ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                        let rreg = match self.put_into_register(I32, &mut right) {
+                            Err(e) => return Err(e),
+                            Ok(o) => o.unwrap(),
+                        };
+
+                        if let Some(i) = i.try_into().ok() {
+                            dynasm!(self.asm
+                                ; cmp Rq(rreg.rq().unwrap()), i
+                            );
+                        } else {
+                            let lreg = match self.put_into_register(I32, &mut left) {
+                                Err(e) => return Err(e),
+                                Ok(o) => o.unwrap(),
+                            };
+
+                            dynasm!(self.asm
+                                ; cmp Rq(rreg.rq().unwrap()), Rq(lreg.rq().unwrap())
+                            );
+                        }
+                        ValueLocation::Cond($reverse_flags)
+                    }
+                    ValueLocation::Immediate(right) => {
+                        ValueLocation::Immediate(
+                            (if $const_fallback(i, right.as_i64().unwrap()) {
+                                1i32
+                            } else {
+                                0i32
+                            }).into()
+                        )
+                    }
+                }
+            } else {
+                let lreg = match self.put_into_register(I64, &mut left) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                match right {
+                    ValueLocation::Stack(offset) => {
+                        let offset = self.adjusted_offset(offset);
+                        dynasm!(self.asm
+                            ; cmp Rq(lreg.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                    ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                        let rreg = match self.put_into_register(I32, &mut right) {
+                            Err(e) => return Err(e),
+                            Ok(o) => o.unwrap(),
+                        };
+
+                        dynasm!(self.asm
+                            ; cmp Rq(lreg.rq().unwrap()), Rq(rreg.rq().unwrap())
+                        );
+                    }
+                    ValueLocation::Immediate(i) => {
+                        let i = i.as_i64().unwrap();
+                        if let Some(i) = i.try_into().ok() {
+                            dynasm!(self.asm
+                                    ; cmp Rq(lreg.rq().unwrap()), i
+                            );
+                        } else {
+                            let rreg = match self.put_into_register(I32, &mut right) {
+                                Err(e) => return Err(e),
+                                Ok(o) => o.unwrap(),
+                            };
+
+                            dynasm!(self.asm
+                                ; cmp Rq(lreg.rq().unwrap()), Rq(rreg.rq().unwrap())
+                            );
+                        }
+                    }
+                }
+
+                ValueLocation::Cond($flags)
+            };
+
+            self.free_value(left)?;
+            self.free_value(right)?;
+            self.push(out)?;
+            Ok(())
+        }
+    }
+}
+
+macro_rules! cmp_f32 {
+    ($name:ident, $reverse_name:ident, $instr:ident, $const_fallback:expr) => {
+        cmp_float!(
+            comiss,
+            f32,
+            imm_f32,
+            $name,
+            $reverse_name,
+            $instr,
+            $const_fallback
+        );
+    };
+}
+
+macro_rules! eq_float {
+    ($name:ident, $instr:ident, $imm_fn:ident, $const_fallback:expr) => {
+        pub fn $name(&mut self) -> Result<(), Error>{
+            let right = self.pop()?;
+            let left = self.pop()?;
+
+            if let Some(right) = right.immediate() {
+                if let Some(left) = left.immediate() {
+                    self.push(ValueLocation::Immediate(
+                        if $const_fallback(left.$imm_fn().unwrap(), right.$imm_fn().unwrap()) {
+                            1u32
+                        } else {
+                            0
+                        }.into()
+                    ))?;
+                    return Ok(());
+                }
+            }
+
+            let (mut left, mut right) = match left {
+                ValueLocation::Reg(r) if self.block_state.regs.num_usages(r) <= 1 => (left, right),
+                _ =>  (right, left)
+            };
+
+            let lreg = match self.put_into_temp_register(GPRType::Rx, &mut left) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+            let rreg = match self.put_into_register(GPRType::Rx, &mut right) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+
+            let out = self.take_reg(I32).unwrap();
+
+            dynasm!(self.asm
+                ; $instr Rx(lreg.rx().unwrap()), Rx(rreg.rx().unwrap())
+                ; movd Rd(out.rq().unwrap()), Rx(lreg.rx().unwrap())
+                ; and Rd(out.rq().unwrap()), 1
+            );
+
+            self.push(ValueLocation::Reg(out))?;
+            self.free_value(left)?;
+            self.free_value(right)?;
+            Ok(())
+        }
+
+    }
+}
+
+macro_rules! minmax_float {
+    (
+        $name:ident,
+        $instr:ident,
+        $cmpinstr:ident,
+        $addinstr:ident,
+        $combineinstr:ident,
+        $imm_fn:ident,
+        $const_fallback:expr
+    ) => {
+        pub fn $name(&mut self) -> Result<(), Error>{
+            let right = self.pop()?;
+            let left = self.pop()?;
+
+            if let Some(right) = right.immediate() {
+                if let Some(left) = left.immediate() {
+                    self.push(ValueLocation::Immediate(
+                        $const_fallback(left.$imm_fn().unwrap(), right.$imm_fn().unwrap()).into()
+                    ))?;
+                    return Ok(());
+                }
+            }
+
+            let (mut left, mut right) = match left {
+                ValueLocation::Reg(r) if self.block_state.regs.num_usages(r) <= 1 => (left, right),
+                _ =>  (right, left)
+            };
+
+            let lreg = match self.put_into_temp_register(GPRType::Rx, &mut left) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+            let rreg = match self.put_into_register(GPRType::Rx, &mut right) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+
+            dynasm!(self.asm
+                ; $cmpinstr Rx(lreg.rx().unwrap()), Rx(rreg.rx().unwrap())
+                ; je >equal
+                ; $instr Rx(lreg.rx().unwrap()), Rx(rreg.rx().unwrap())
+                ; jmp >ret
+            ; equal:
+                ; jnp >equal_but_not_parity
+                ; $addinstr Rx(lreg.rx().unwrap()), Rx(rreg.rx().unwrap())
+                ; jmp >ret
+            ; equal_but_not_parity:
+                ; $combineinstr Rx(lreg.rx().unwrap()), Rx(rreg.rx().unwrap())
+            ; ret:
+            );
+
+            self.push(left)?;
+            self.free_value(right)?;
+            Ok(())
+        }
+
+    }
+}
+
+macro_rules! cmp_f64 {
+    ($name:ident, $reverse_name:ident, $instr:ident, $const_fallback:expr) => {
+        cmp_float!(
+            comisd,
+            f64,
+            imm_f64,
+            $name,
+            $reverse_name,
+            $instr,
+            $const_fallback
+        );
+    };
+}
+
+macro_rules! cmp_float {
+    (@helper $cmp_instr:ident, $ty:ty, $imm_fn:ident, $self:expr, $left:expr, $right:expr, $instr:ident, $const_fallback:expr) => {{
+        let (left, right, this) = ($left, $right, $self);
+        if let (Some(left), Some(right)) = (left.$imm_fn(), right.$imm_fn()) {
+            if $const_fallback(<$ty>::from_bits(left.to_bits()), <$ty>::from_bits(right.to_bits())) {
+                ValueLocation::Immediate(1i32.into())
+            } else {
+                ValueLocation::Immediate(0i32.into())
+            }
+        } else {
+            let lreg = match this.put_into_register(GPRType::Rx, left) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+
+            let result = this.take_reg(I32).unwrap();
+
+            match right {
+                ValueLocation::Stack(offset) => {
+                    let offset = this.adjusted_offset(*offset);
+
+                    dynasm!(this.asm
+                        ; xor Rq(result.rq().unwrap()), Rq(result.rq().unwrap())
+                        ; $cmp_instr Rx(lreg.rx().unwrap()), [rsp + offset]
+                        ; $instr Rb(result.rq().unwrap())
+                    );
+                }
+                right => {
+                    let rreg = match this.put_into_register(GPRType::Rx, right) {
+                        Err(e) => return Err(e),
+                        Ok(o) => o.unwrap(),
+                    };
+
+                    dynasm!(this.asm
+                        ; xor Rq(result.rq().unwrap()), Rq(result.rq().unwrap())
+                        ; $cmp_instr Rx(lreg.rx().unwrap()), Rx(rreg.rx().unwrap())
+                        ; $instr Rb(result.rq().unwrap())
+                    );
+                }
+            }
+
+            ValueLocation::Reg(result)
+        }
+    }};
+    ($cmp_instr:ident, $ty:ty, $imm_fn:ident, $name:ident, $reverse_name:ident, $instr:ident, $const_fallback:expr) => {
+        pub fn $name(&mut self) -> Result<(), Error> {
+            let mut right = self.pop()?;
+            let mut left = self.pop()?;
+
+            let out = cmp_float!(@helper
+                $cmp_instr,
+                $ty,
+                $imm_fn,
+                &mut *self,
+                &mut left,
+                &mut right,
+                $instr,
+                $const_fallback
+            );
+
+            self.free_value(left)?;
+            self.free_value(right)?;
+
+            self.push(out)?;
+            Ok(())
+        }
+
+        pub fn $reverse_name(&mut self) -> Result<(), Error> {
+            let mut right = self.pop()?;
+            let mut left = self.pop()?;
+
+            let out = cmp_float!(@helper
+                $cmp_instr,
+                $ty,
+                $imm_fn,
+                &mut *self,
+                &mut right,
+                &mut left,
+                $instr,
+                $const_fallback
+            );
+
+            self.free_value(left)?;
+            self.free_value(right)?;
+
+            self.push(out)?;
+            Ok(())
+        }
+    };
+}
+
+macro_rules! binop_i32 {
+    ($name:ident, $instr:ident, $const_fallback:expr) => {
+        binop!(
+            $name,
+            $instr,
+            $const_fallback,
+            Rd,
+            rq,
+            I32,
+            imm_i32,
+            |this: &mut Context<_>, op1: GPR, i| dynasm!(this.asm
+                ; $instr Rd(op1.rq().unwrap()), i
+            )
+        );
+    };
+}
+
+macro_rules! commutative_binop_i32 {
+    ($name:ident, $instr:ident, $const_fallback:expr) => {
+        commutative_binop!(
+            $name,
+            $instr,
+            $const_fallback,
+            Rd,
+            rq,
+            I32,
+            imm_i32,
+            |this: &mut Context<_>, op1: GPR, i| dynasm!(this.asm
+                ; $instr Rd(op1.rq().unwrap()), i
+            )
+        );
+    };
+}
+
+macro_rules! binop_i64 {
+    ($name:ident, $instr:ident, $const_fallback:expr) => {
+        binop!(
+            $name,
+            $instr,
+            $const_fallback,
+            Rq,
+            rq,
+            I64,
+            imm_i64,
+            |this: &mut Context<_>, op1: GPR, i| dynasm!(this.asm
+                ; $instr Rq(op1.rq().unwrap()), i
+            )
+        );
+    };
+}
+
+macro_rules! commutative_binop_i64 {
+    ($name:ident, $instr:ident, $const_fallback:expr) => {
+        commutative_binop!(
+            $name,
+            $instr,
+            $const_fallback,
+            Rq,
+            rq,
+            I64,
+            imm_i64,
+            |this: &mut Context<_>, op1: GPR, i| dynasm!(this.asm
+                ; $instr Rq(op1.rq().unwrap()), i
+            )
+        );
+    };
+}
+
+macro_rules! binop_f32 {
+    ($name:ident, $instr:ident, $const_fallback:expr) => {
+        binop!(
+            $name,
+            $instr,
+            |a: Ieee32, b: Ieee32| Ieee32::from_bits(
+                $const_fallback(f32::from_bits(a.to_bits()), f32::from_bits(b.to_bits())).to_bits()
+            ),
+            Rx,
+            rx,
+            F32,
+            imm_f32,
+            |_, _, _: i32| unreachable!()
+        );
+    };
+}
+
+macro_rules! commutative_binop_f32 {
+    ($name:ident, $instr:ident, $const_fallback:expr) => {
+        commutative_binop!(
+            $name,
+            $instr,
+            |a: Ieee32, b: Ieee32| Ieee32::from_bits(
+                $const_fallback(f32::from_bits(a.to_bits()), f32::from_bits(b.to_bits())).to_bits()
+            ),
+            Rx,
+            rx,
+            F32,
+            imm_f32,
+            |_, _, _: i32| unreachable!()
+        );
+    };
+}
+
+macro_rules! binop_f64 {
+    ($name:ident, $instr:ident, $const_fallback:expr) => {
+        binop!(
+            $name,
+            $instr,
+            |a: Ieee64, b: Ieee64| Ieee64::from_bits(
+                $const_fallback(f64::from_bits(a.to_bits()), f64::from_bits(b.to_bits())).to_bits()
+            ),
+            Rx,
+            rx,
+            F64,
+            imm_f64,
+            |_, _, _: i32| unreachable!()
+        );
+    };
+}
+
+macro_rules! commutative_binop_f64 {
+    ($name:ident, $instr:ident, $const_fallback:expr) => {
+        commutative_binop!(
+            $name,
+            $instr,
+            |a: Ieee64, b: Ieee64| Ieee64::from_bits(
+                $const_fallback(f64::from_bits(a.to_bits()), f64::from_bits(b.to_bits())).to_bits()
+            ),
+            Rx,
+            rx,
+            F64,
+            imm_f64,
+            |_, _, _: i32| unreachable!()
+        );
+    };
+}
+macro_rules! commutative_binop {
+    ($name:ident, $instr:ident, $const_fallback:expr, $reg_ty:tt, $reg_fn:ident, $ty:expr, $imm_fn:ident, $direct_imm:expr) => {
+        binop!(
+            $name,
+            $instr,
+            $const_fallback,
+            $reg_ty,
+            $reg_fn,
+            $ty,
+            $imm_fn,
+            $direct_imm,
+            |op1: ValueLocation, op0: ValueLocation| match op1 {
+                ValueLocation::Reg(_) => (op1, op0),
+                _ => {
+                    if op0.immediate().is_some() {
+                        (op1, op0)
+                    } else {
+                        (op0, op1)
+                    }
+                }
+            }
+        );
+    };
+}
+
+macro_rules! binop {
+    ($name:ident, $instr:ident, $const_fallback:expr, $reg_ty:tt, $reg_fn:ident, $ty:expr, $imm_fn:ident, $direct_imm:expr) => {
+        binop!($name, $instr, $const_fallback, $reg_ty, $reg_fn, $ty, $imm_fn, $direct_imm, |a, b| (a, b));
+    };
+    ($name:ident, $instr:ident, $const_fallback:expr, $reg_ty:tt, $reg_fn:ident, $ty:expr, $imm_fn:ident, $direct_imm:expr, $map_op:expr) => {
+        pub fn $name(&mut self) -> Result<(), Error> {
+            let right = self.pop()?;
+            let left = self.pop()?;
+
+            if let Some(i1) = left.$imm_fn() {
+                if let Some(i0) = right.$imm_fn() {
+                    self.block_state.stack.push(ValueLocation::Immediate($const_fallback(i1, i0).into()));
+                    return Ok(());
+                }
+            }
+
+            let (mut left, mut right) = $map_op(left, right);
+            let lreg = match self.put_into_temp_register($ty, &mut left) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+
+            match right {
+                ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                    // This handles the case where we (for example) have a float in an `Rq` reg
+                    let right_reg = match self.put_into_register($ty, &mut right) {
+                        Err(e) => return Err(e),
+                        Ok(o) => o.unwrap(),
+                    };
+
+                    dynasm!(self.asm
+                        ; $instr $reg_ty(lreg.$reg_fn().unwrap()), $reg_ty(right_reg.$reg_fn().unwrap())
+                    );
+                }
+                ValueLocation::Stack(offset) => {
+                    let offset = self.adjusted_offset(offset);
+                    dynasm!(self.asm
+                        ; $instr $reg_ty(lreg.$reg_fn().unwrap()), [rsp + offset]
+                    );
+                }
+                ValueLocation::Immediate(i) => {
+                    if let Some(i) = i.as_int().and_then(|i| i.try_into().ok()) {
+                        $direct_imm(&mut *self, lreg, i);
+                    } else {
+                        let scratch = self.take_reg($ty).unwrap();
+                        self.immediate_to_reg(scratch, i);
+
+                        dynasm!(self.asm
+                            ; $instr $reg_ty(lreg.$reg_fn().unwrap()), $reg_ty(scratch.$reg_fn().unwrap())
+                        );
+
+                        self.block_state.regs.release(scratch)?;
+                    }
+                }
+            }
+
+            self.free_value(right)?;
+            self.push(left)?;
+            Ok(())
+        }
+    }
+}
+
+macro_rules! load {
+    (@inner $name:ident, $rtype:expr, $reg_ty:tt, $emit_fn:expr) => {
+        pub fn $name(&mut self, offset: u32) -> Result<(), Error> {
+            fn load_to_reg<_M: ModuleContext>(
+                ctx: &mut Context<_M>,
+                dst: GPR,
+                (offset, runtime_offset): (i32, Result<i32, GPR>)
+            ) -> Result<(), Error> {
+                let mem_index = 0;
+                let reg_offset = ctx.module_context
+                    .defined_memory_index(mem_index)
+                    .map(|index| (
+                        None,
+                        ctx.module_context.vmctx_vmmemory_definition(index) as i32
+                    ));
+                let (reg, mem_offset) = reg_offset.unwrap_or_else(|| {
+                    let reg = ctx.take_reg(I64).unwrap();
+
+                    dynasm!(ctx.asm
+                        ; mov Rq(reg.rq().unwrap()), [
+                            Rq(VMCTX) + ctx.module_context.vmctx_vmmemory_import_from(mem_index) as i32
+                        ]
+                    );
+
+                    (Some(reg), 0)
+                });
+
+                let vmctx = GPR::Rq(VMCTX);
+
+                if ctx.module_context.emit_memory_bounds_check() {
+                    let trap_label = ctx.trap_label();
+                    let addr_reg = match runtime_offset {
+                        Ok(imm) => {
+                            let addr_reg = ctx.take_reg(I64).unwrap();
+                            dynasm!(ctx.asm
+                                ; mov Rq(addr_reg.rq().unwrap()), QWORD imm as i64 + offset as i64
+                            );
+                            addr_reg
+                        }
+                        Err(gpr) => {
+                            if offset == 0 {
+                                match ctx.clone_to_register(I32, ValueLocation::Reg(gpr)) {
+                                    Err(e) => return Err(e),
+                                    Ok(o) => o.unwrap(),
+                                }
+
+                            } else if offset > 0 {
+                                let addr_reg = ctx.take_reg(I64).unwrap();
+                                dynasm!(ctx.asm
+                                    ; lea Rq(addr_reg.rq().unwrap()), [Rq(gpr.rq().unwrap()) + offset]
+                                );
+                                addr_reg
+                            } else {
+                                let addr_reg = ctx.take_reg(I64).unwrap();
+                                let offset_reg = ctx.take_reg(I64).unwrap();
+                                dynasm!(ctx.asm
+                                    ; mov Rd(offset_reg.rq().unwrap()), offset
+                                    ; mov Rq(addr_reg.rq().unwrap()), Rq(gpr.rq().unwrap())
+                                    ; add Rq(addr_reg.rq().unwrap()), Rq(offset_reg.rq().unwrap())
+                                );
+                                ctx.block_state.regs.release(offset_reg)?;
+                                addr_reg
+                            }
+                        }
+                    };
+                    dynasm!(ctx.asm
+                        ; cmp [
+                            Rq(reg.unwrap_or(vmctx).rq().unwrap()) +
+                                mem_offset +
+                                ctx.module_context.vmmemory_definition_current_length() as i32
+                        ], Rq(addr_reg.rq().unwrap())
+                        ; jna =>trap_label.0
+                    );
+                    ctx.block_state.regs.release(addr_reg)?;
+                }
+
+                let mem_ptr_reg = ctx.take_reg(I64).unwrap();
+                dynasm!(ctx.asm
+                    ; mov Rq(mem_ptr_reg.rq().unwrap()), [
+                        Rq(reg.unwrap_or(vmctx).rq().unwrap()) +
+                            mem_offset +
+                            ctx.module_context.vmmemory_definition_base() as i32
+                    ]
+                );
+                if let Some(reg) = reg {
+                    ctx.block_state.regs.release(reg)?;
+                }
+                $emit_fn(ctx, dst, mem_ptr_reg, runtime_offset, offset)?;
+                ctx.block_state.regs.release(mem_ptr_reg)?;
+                Ok(())
+            }
+
+            let base = self.pop()?;
+
+            let temp = self.take_reg($rtype).unwrap();
+
+            match base {
+                ValueLocation::Immediate(i) => {
+                    load_to_reg(self, temp, (offset as _, Ok(i.as_i32().unwrap())))?;
+                }
+                mut base => {
+                    let gpr = match self.put_into_register(I32, &mut base) {
+                        Err(e) => return Err(e),
+                        Ok(o) => o.unwrap(),
+                    };
+                    load_to_reg(self, temp, (offset as _, Err(gpr)))?;
+                    self.free_value(base)?;
+                }
+            }
+
+            self.push(ValueLocation::Reg(temp))?;
+            Ok(())
+        }
+    };
+    ($name:ident, $rtype:expr, $reg_ty:tt, NONE, $rq_instr:ident, $ty:ident) => {
+        load!(@inner
+            $name,
+            $rtype,
+            $reg_ty,
+            |ctx: &mut Context<_>, dst: GPR, mem_ptr_reg: GPR, runtime_offset: Result<i32, GPR>, offset: i32| -> Result<(), Error>  {
+                match runtime_offset {
+                    Ok(imm) => {
+                        dynasm!(ctx.asm
+                            ; $rq_instr $reg_ty(dst.rq().unwrap()), $ty [Rq(mem_ptr_reg.rq().unwrap()) + offset + imm]
+                        );
+                        Ok(())
+                    }
+                    Err(offset_reg) => {
+                        dynasm!(ctx.asm
+                            ; $rq_instr $reg_ty(dst.rq().unwrap()), $ty [Rq(mem_ptr_reg.rq().unwrap()) + Rq(offset_reg.rq().unwrap()) + offset]
+                        );
+                        Ok(())
+                    }
+                }
+            }
+        );
+    };
+    ($name:ident, $rtype:expr, $reg_ty:tt, $xmm_instr:ident, $rq_instr:ident, $ty:ident) => {
+        load!(@inner
+            $name,
+            $rtype,
+            $reg_ty,
+            |ctx: &mut Context<_>, dst: GPR, mem_ptr_reg: GPR, runtime_offset: Result<i32, GPR>, offset: i32| -> Result<(), Error>  {
+                match (dst, runtime_offset) {
+                    (GPR::Rq(r), Ok(imm)) => {
+                        dynasm!(ctx.asm
+                            ; $rq_instr $reg_ty(r), $ty [Rq(mem_ptr_reg.rq().unwrap()) + offset + imm]
+                        );
+                        Ok(())
+                    }
+                    (GPR::Rx(r), Ok(imm)) => {
+                        if let Some(combined) = offset.checked_add(imm) {
+                            dynasm!(ctx.asm
+                                ; $xmm_instr Rx(r), $ty [Rq(mem_ptr_reg.rq().unwrap()) + combined]
+                            );
+                            Ok(())
+                        } else {
+                            let offset_reg = ctx.take_reg(GPRType::Rq).unwrap();
+                            dynasm!(ctx.asm
+                                ; mov Rq(offset_reg.rq().unwrap()), offset
+                                ; $xmm_instr Rx(r), $ty [
+                                    Rq(mem_ptr_reg.rq().unwrap()) +
+                                    Rq(offset_reg.rq().unwrap()) +
+                                    imm
+                                ]
+                            );
+                            ctx.block_state.regs.release(offset_reg)?;
+                            Ok(())
+                        }
+                    }
+                    (GPR::Rq(r), Err(offset_reg)) => {
+                        dynasm!(ctx.asm
+                            ; $rq_instr $reg_ty(r), $ty [Rq(mem_ptr_reg.rq().unwrap()) + Rq(offset_reg.rq().unwrap()) + offset]
+                        );
+                        Ok(())
+                    }
+                    (GPR::Rx(r), Err(offset_reg)) => {
+                        dynasm!(ctx.asm
+                            ; $xmm_instr Rx(r), $ty [Rq(mem_ptr_reg.rq().unwrap()) + Rq(offset_reg.rq().unwrap()) + offset]
+                        );
+                        Ok(())
+                    }
+                }
+            }
+        );
+    };
+}
+
+macro_rules! store {
+    (@inner $name:ident, $int_reg_ty:tt, $match_offset:expr, $size:ident) => {
+        pub fn $name(&mut self, offset: u32) -> Result<(), Error>{
+            fn store_from_reg<_M: ModuleContext>(
+                ctx: &mut Context<_M>,
+                src: GPR,
+                (offset, runtime_offset): (i32, Result<i32, GPR>)
+            ) -> Result<(), Error> {
+                let mem_index = 0;
+                let reg_offset = ctx.module_context
+                    .defined_memory_index(mem_index)
+                    .map(|index| (
+                        None,
+                        ctx.module_context.vmctx_vmmemory_definition(index) as i32
+                    ));
+                let (reg, mem_offset) = reg_offset.unwrap_or_else(|| {
+                    let reg = ctx.take_reg(I64).unwrap();
+
+                    dynasm!(ctx.asm
+                        ; mov Rq(reg.rq().unwrap()), [
+                            Rq(VMCTX) + ctx.module_context.vmctx_vmmemory_import_from(mem_index) as i32
+                        ]
+                    );
+
+                    (Some(reg), 0)
+                });
+
+                let vmctx = GPR::Rq(VMCTX);
+
+                if ctx.module_context.emit_memory_bounds_check() {
+                    let trap_label = ctx.trap_label();
+                    let addr_reg = match runtime_offset {
+                        Ok(imm) => {
+                            let addr_reg = ctx.take_reg(I64).unwrap();
+                            dynasm!(ctx.asm
+                                ; mov Rq(addr_reg.rq().unwrap()), QWORD imm as i64 + offset as i64
+                            );
+                            addr_reg
+                        }
+                        Err(gpr) => {
+                            if offset == 0 {
+                                match ctx.clone_to_register(I32, ValueLocation::Reg(gpr)) {
+                                    Err(e) => return Err(e),
+                                    Ok(o) => o.unwrap(),
+                                }
+
+                            } else if offset > 0 {
+                                let addr_reg = ctx.take_reg(I64).unwrap();
+                                dynasm!(ctx.asm
+                                    ; lea Rq(addr_reg.rq().unwrap()), [Rq(gpr.rq().unwrap()) + offset]
+                                );
+                                addr_reg
+                            } else {
+                                let addr_reg = ctx.take_reg(I64).unwrap();
+                                let offset_reg = ctx.take_reg(I64).unwrap();
+                                dynasm!(ctx.asm
+                                    ; mov Rd(offset_reg.rq().unwrap()), offset
+                                    ; mov Rq(addr_reg.rq().unwrap()), Rq(gpr.rq().unwrap())
+                                    ; add Rq(addr_reg.rq().unwrap()), Rq(offset_reg.rq().unwrap())
+                                );
+                                ctx.block_state.regs.release(offset_reg)?;
+                                addr_reg
+                            }
+                        }
+                    };
+                    dynasm!(ctx.asm
+                        ; cmp Rq(addr_reg.rq().unwrap()), [
+                            Rq(reg.unwrap_or(vmctx).rq().unwrap()) +
+                                mem_offset +
+                                ctx.module_context.vmmemory_definition_current_length() as i32
+                        ]
+                        ; jae =>trap_label.0
+                    );
+                    ctx.block_state.regs.release(addr_reg)?;
+                }
+
+                let mem_ptr_reg = ctx.take_reg(I64).unwrap();
+                dynasm!(ctx.asm
+                    ; mov Rq(mem_ptr_reg.rq().unwrap()), [
+                        Rq(reg.unwrap_or(vmctx).rq().unwrap()) +
+                            mem_offset +
+                            ctx.module_context.vmmemory_definition_base() as i32
+                    ]
+                );
+                if let Some(reg) = reg {
+                    ctx.block_state.regs.release(reg)?;
+                }
+                let src = $match_offset(ctx, mem_ptr_reg, runtime_offset, offset, src)?;
+                ctx.block_state.regs.release(mem_ptr_reg)?;
+                ctx.block_state.regs.release(src)?;
+                Ok(())
+            }
+
+            if !(offset <= i32::max_value() as u32) {
+                return Err(Error::Microwasm(format!("store: offset value too big {}", offset)))
+            }
+
+            let mut src = self.pop()?;
+            let base = self.pop()?;
+
+            // `store_from_reg` frees `src`
+            // TODO: Would it be better to free it outside `store_from_reg`?
+            let src_reg = match self.put_into_register(None, &mut src) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+
+
+            match base {
+                ValueLocation::Immediate(i) => {
+                    store_from_reg(self, src_reg, (offset as i32, Ok(i.as_i32().unwrap())))?
+                }
+                mut base => {
+                    let gpr = match self.put_into_register(I32, &mut base) {
+                        Err(e) => return Err(e),
+                        Ok(o) => o.unwrap(),
+                    };
+                    store_from_reg(self, src_reg, (offset as i32, Err(gpr)))?;
+                    self.free_value(base)?;
+                }
+            }
+            Ok(())
+        }
+    };
+    ($name:ident, $int_reg_ty:tt, NONE, $size:ident) => {
+        store!(@inner
+            $name,
+            $int_reg_ty,
+            |ctx: &mut Context<_>, mem_ptr_reg: GPR, runtime_offset: Result<i32, GPR>, offset: i32, src| -> Result<GPR, Error> {
+                let src_reg = match ctx.put_into_temp_register(GPRType::Rq, &mut ValueLocation::Reg(src)) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                match runtime_offset {
+                    Ok(imm) => {
+                        dynasm!(ctx.asm
+                            ; mov [Rq(mem_ptr_reg.rq().unwrap()) + offset + imm], $int_reg_ty(src_reg.rq().unwrap())
+                        );
+                    }
+                    Err(offset_reg) => {
+                        dynasm!(ctx.asm
+                            ; mov [Rq(mem_ptr_reg.rq().unwrap()) + Rq(offset_reg.rq().unwrap()) + offset], $int_reg_ty(src_reg.rq().unwrap())
+                        );
+                    }
+                }
+
+                Ok(src_reg)
+            },
+            $size
+        );
+    };
+    ($name:ident, $int_reg_ty:tt, $xmm_instr:ident, $size:ident) => {
+        store!(@inner
+            $name,
+            $int_reg_ty,
+            |ctx: &mut Context<_>, mem_ptr_reg: GPR, runtime_offset: Result<i32, GPR>, offset: i32, src| -> Result<GPR, Error> {
+                match (runtime_offset, src) {
+                    (Ok(imm), GPR::Rq(r)) => {
+                        dynasm!(ctx.asm
+                            ; mov [Rq(mem_ptr_reg.rq().unwrap()) + offset + imm], $int_reg_ty(r)
+                        );
+                    }
+                    (Ok(imm), GPR::Rx(r)) => {
+                        dynasm!(ctx.asm
+                            ; $xmm_instr [Rq(mem_ptr_reg.rq().unwrap()) + offset + imm], Rx(r)
+                        );
+                    }
+                    (Err(offset_reg), GPR::Rq(r)) => {
+                        dynasm!(ctx.asm
+                            ; mov [Rq(mem_ptr_reg.rq().unwrap()) + Rq(offset_reg.rq().unwrap()) + offset], $int_reg_ty(r)
+                        );
+                    }
+                    (Err(offset_reg), GPR::Rx(r)) => {
+                        dynasm!(ctx.asm
+                            ; $xmm_instr [Rq(mem_ptr_reg.rq().unwrap()) + Rq(offset_reg.rq().unwrap()) + offset], Rx(r)
+                        );
+                    }
+                }
+
+                Ok(src)
+            },
+            $size
+        );
+    };
+}
+
+#[derive(Debug, Clone, PartialEq, Eq)]
+pub struct VirtualCallingConvention {
+    pub stack: Stack,
+    pub depth: StackDepth,
+}
+
+impl<'this, M: ModuleContext> Context<'this, M> {
+    fn free_reg(&mut self, type_: GPRType) -> Result<bool, Error> {
+        let pos = if let Some(pos) = self
+            .block_state
+            .stack
+            .iter()
+            .position(|r| r.reg().map(|reg| reg.type_() == type_).unwrap_or(false))
+        {
+            pos
+        } else {
+            return Ok(false);
+        };
+
+        let old_loc = self.block_state.stack[pos];
+        let new_loc = self.push_physical(old_loc)?;
+        self.block_state.stack[pos] = new_loc;
+
+        let reg = old_loc.reg().unwrap();
+
+        for elem in &mut self.block_state.stack[pos + 1..] {
+            if *elem == old_loc {
+                *elem = new_loc;
+                self.block_state.regs.release(reg)?;
+            }
+        }
+
+        Ok(true)
+    }
+
+    fn take_reg(&mut self, r: impl Into<GPRType>) -> Option<GPR> {
+        let r = r.into();
+        loop {
+            if let Some(gpr) = self.block_state.regs.take(r) {
+                break Some(gpr);
+            }
+
+            if self.free_reg(r) == Ok(false) {
+                break None;
+            }
+        }
+    }
+
+    pub fn virtual_calling_convention(&self) -> VirtualCallingConvention {
+        VirtualCallingConvention {
+            stack: self.block_state.stack.clone(),
+            depth: self.block_state.depth,
+        }
+    }
+
+    /// Create a new undefined label.
+    pub fn create_label(&mut self) -> Label {
+        Label(self.asm.new_dynamic_label())
+    }
+
+    pub fn define_host_fn(&mut self, host_fn: *const u8) {
+        dynasm!(self.asm
+            ; mov rax, QWORD host_fn as i64
+            ; call rax
+            ; ret
+        );
+    }
+
+    fn adjusted_offset(&self, offset: i32) -> i32 {
+        (self.block_state.depth.0 as i32 + offset) * WORD_SIZE as i32
+    }
+
+    cmp_i32!(i32_eq, cc::EQUAL, cc::EQUAL, |a, b| a == b);
+    cmp_i32!(i32_neq, cc::NOT_EQUAL, cc::NOT_EQUAL, |a, b| a != b);
+    // `dynasm-rs` inexplicably doesn't support setb but `setnae` (and `setc`) are synonymous
+    cmp_i32!(i32_lt_u, cc::LT_U, cc::GT_U, |a, b| (a as u32) < (b as u32));
+    cmp_i32!(i32_le_u, cc::LE_U, cc::GE_U, |a, b| (a as u32)
+        <= (b as u32));
+    cmp_i32!(i32_gt_u, cc::GT_U, cc::LT_U, |a, b| (a as u32) > (b as u32));
+    cmp_i32!(i32_ge_u, cc::GE_U, cc::LE_U, |a, b| (a as u32)
+        >= (b as u32));
+    cmp_i32!(i32_lt_s, cc::LT_S, cc::GT_S, |a, b| a < b);
+    cmp_i32!(i32_le_s, cc::LE_S, cc::GE_S, |a, b| a <= b);
+    cmp_i32!(i32_gt_s, cc::GT_S, cc::LT_S, |a, b| a > b);
+    cmp_i32!(i32_ge_s, cc::GE_S, cc::LE_S, |a, b| a >= b);
+
+    cmp_i64!(i64_eq, cc::EQUAL, cc::EQUAL, |a, b| a == b);
+    cmp_i64!(i64_neq, cc::NOT_EQUAL, cc::NOT_EQUAL, |a, b| a != b);
+    // `dynasm-rs` inexplicably doesn't support setb but `setnae` (and `setc`) are synonymous
+    cmp_i64!(i64_lt_u, cc::LT_U, cc::GT_U, |a, b| (a as u64) < (b as u64));
+    cmp_i64!(i64_le_u, cc::LE_U, cc::GE_U, |a, b| (a as u64)
+        <= (b as u64));
+    cmp_i64!(i64_gt_u, cc::GT_U, cc::LT_U, |a, b| (a as u64) > (b as u64));
+    cmp_i64!(i64_ge_u, cc::GE_U, cc::LE_U, |a, b| (a as u64)
+        >= (b as u64));
+    cmp_i64!(i64_lt_s, cc::LT_S, cc::GT_S, |a, b| a < b);
+    cmp_i64!(i64_le_s, cc::LE_S, cc::GE_S, |a, b| a <= b);
+    cmp_i64!(i64_gt_s, cc::GT_S, cc::LT_S, |a, b| a > b);
+    cmp_i64!(i64_ge_s, cc::GE_S, cc::LE_S, |a, b| a >= b);
+
+    cmp_f32!(f32_gt, f32_lt, seta, |a, b| a > b);
+    cmp_f32!(f32_ge, f32_le, setnc, |a, b| a >= b);
+    eq_float!(
+        f32_eq,
+        cmpeqss,
+        as_f32,
+        |a: Ieee32, b: Ieee32| f32::from_bits(a.to_bits()) == f32::from_bits(b.to_bits())
+    );
+    eq_float!(
+        f32_ne,
+        cmpneqss,
+        as_f32,
+        |a: Ieee32, b: Ieee32| f32::from_bits(a.to_bits()) != f32::from_bits(b.to_bits())
+    );
+
+    cmp_f64!(f64_gt, f64_lt, seta, |a, b| a > b);
+    cmp_f64!(f64_ge, f64_le, setnc, |a, b| a >= b);
+    eq_float!(
+        f64_eq,
+        cmpeqsd,
+        as_f64,
+        |a: Ieee64, b: Ieee64| f64::from_bits(a.to_bits()) == f64::from_bits(b.to_bits())
+    );
+    eq_float!(
+        f64_ne,
+        cmpneqsd,
+        as_f64,
+        |a: Ieee64, b: Ieee64| f64::from_bits(a.to_bits()) != f64::from_bits(b.to_bits())
+    );
+
+    // TODO: Should we do this logic in `eq` and just have this delegate to `eq`?
+    //       That would mean that `eqz` and `eq` with a const 0 argument don't
+    //       result in different code. It would also allow us to generate better
+    //       code for `neq` and `gt_u` with const 0 operand
+    pub fn i32_eqz(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        if let ValueLocation::Immediate(Value::I32(i)) = val {
+            self.push(ValueLocation::Immediate(
+                (if i == 0 { 1i32 } else { 0 }).into(),
+            ))?;
+            return Ok(());
+        }
+
+        if let ValueLocation::Cond(loc) = val {
+            self.push(ValueLocation::Cond(!loc))?;
+            return Ok(());
+        }
+
+        let reg = match self.put_into_register(I32, &mut val) {
+            Err(e) => return Err(e),
+            Ok(o) => o.unwrap(),
+        };
+
+        let out = self.take_reg(I32).unwrap();
+
+        dynasm!(self.asm
+            ; xor Rd(out.rq().unwrap()), Rd(out.rq().unwrap())
+            ; test Rd(reg.rq().unwrap()), Rd(reg.rq().unwrap())
+            ; setz Rb(out.rq().unwrap())
+        );
+
+        self.free_value(val)?;
+
+        self.push(ValueLocation::Reg(out))?;
+        Ok(())
+    }
+
+    pub fn i64_eqz(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        if let ValueLocation::Immediate(Value::I64(i)) = val {
+            self.push(ValueLocation::Immediate(
+                (if i == 0 { 1i32 } else { 0 }).into(),
+            ))?;
+            return Ok(());
+        }
+
+        if let ValueLocation::Cond(loc) = val {
+            self.push(ValueLocation::Cond(!loc))?;
+            return Ok(());
+        }
+
+        let reg = match self.put_into_register(I64, &mut val) {
+            Err(e) => return Err(e),
+            Ok(o) => o.unwrap(),
+        };
+
+        let out = self.take_reg(I64).unwrap();
+
+        dynasm!(self.asm
+            ; xor Rd(out.rq().unwrap()), Rd(out.rq().unwrap())
+            ; test Rq(reg.rq().unwrap()), Rq(reg.rq().unwrap())
+            ; setz Rb(out.rq().unwrap())
+        );
+
+        self.free_value(val)?;
+
+        self.push(ValueLocation::Reg(out))?;
+        Ok(())
+    }
+
+    fn br_on_cond_code(&mut self, label: Label, cond: CondCode) {
+        match cond {
+            cc::EQUAL => dynasm!(self.asm
+                ; je =>label.0
+            ),
+            cc::NOT_EQUAL => dynasm!(self.asm
+                ; jne =>label.0
+            ),
+            cc::GT_U => dynasm!(self.asm
+                ; ja =>label.0
+            ),
+            cc::GE_U => dynasm!(self.asm
+                ; jae =>label.0
+            ),
+            cc::LT_U => dynasm!(self.asm
+                ; jb =>label.0
+            ),
+            cc::LE_U => dynasm!(self.asm
+                ; jbe =>label.0
+            ),
+            cc::GT_S => dynasm!(self.asm
+                ; jg =>label.0
+            ),
+            cc::GE_S => dynasm!(self.asm
+                ; jge =>label.0
+            ),
+            cc::LT_S => dynasm!(self.asm
+                ; jl =>label.0
+            ),
+            cc::LE_S => dynasm!(self.asm
+                ; jle =>label.0
+            ),
+        }
+    }
+
+    /// Pops i32 predicate and branches to the specified label
+    /// if the predicate is equal to zero.
+    pub fn br_if_false(
+        &mut self,
+        target: impl Into<BrTarget<Label>>,
+        pass_args: impl FnOnce(&mut Self) -> Result<(), Error>,
+    ) -> Result<(), Error> {
+        let mut val = self.pop()?;
+        let label = target
+            .into()
+            .label()
+            .copied()
+            .unwrap_or_else(|| self.ret_label());
+
+        let cond = match val {
+            ValueLocation::Cond(cc) => !cc,
+            _ => {
+                let predicate = match self.put_into_register(I32, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                dynasm!(self.asm
+                    ; test Rd(predicate.rq().unwrap()), Rd(predicate.rq().unwrap())
+                );
+
+                CondCode::ZF0
+            }
+        };
+
+        self.free_value(val)?;
+
+        pass_args(self)?;
+
+        self.br_on_cond_code(label, cond);
+        Ok(())
+    }
+
+    /// Pops i32 predicate and branches to the specified label
+    /// if the predicate is not equal to zero.
+    pub fn br_if_true(
+        &mut self,
+        target: impl Into<BrTarget<Label>>,
+        pass_args: impl FnOnce(&mut Self) -> Result<(), Error>,
+    ) -> Result<(), Error> {
+        let mut val = self.pop()?;
+        let label = target
+            .into()
+            .label()
+            .copied()
+            .unwrap_or_else(|| self.ret_label());
+
+        let cond = match val {
+            ValueLocation::Cond(cc) => cc,
+            _ => {
+                let predicate = match self.put_into_register(I32, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                dynasm!(self.asm
+                    ; test Rd(predicate.rq().unwrap()), Rd(predicate.rq().unwrap())
+                );
+
+                CondCode::ZF1
+            }
+        };
+
+        self.free_value(val)?;
+
+        pass_args(self)?;
+
+        self.br_on_cond_code(label, cond);
+        Ok(())
+    }
+
+    /// Branch unconditionally to the specified label.
+    pub fn br(&mut self, label: impl Into<BrTarget<Label>>) {
+        match label.into() {
+            BrTarget::Return => self.ret(),
+            BrTarget::Label(label) => dynasm!(self.asm
+                ; jmp =>label.0
+            ),
+        }
+    }
+
+    /// If `default` is `None` then the default is just continuing execution
+    pub fn br_table<I>(
+        &mut self,
+        targets: I,
+        default: Option<BrTarget<Label>>,
+        pass_args: impl FnOnce(&mut Self) -> Result<(), Error>,
+    ) -> Result<(), Error>
+    where
+        I: IntoIterator<Item = Option<BrTarget<Label>>>,
+        I::IntoIter: ExactSizeIterator,
+    {
+        let mut targets = targets.into_iter();
+        let count = targets.len();
+
+        let mut selector = self.pop()?;
+
+        pass_args(self)?;
+
+        if let Some(imm) = selector.imm_i32() {
+            if let Some(target) = targets.nth(imm as _).or(Some(default)).and_then(|a| a) {
+                match target {
+                    BrTarget::Label(label) => self.br(label),
+                    BrTarget::Return => {
+                        dynasm!(self.asm
+                            ; ret
+                        );
+                    }
+                }
+            }
+        } else {
+            let end_label = self.create_label();
+
+            if count > 0 {
+                let temp = match self.put_into_temp_register(GPRType::Rq, &mut selector) {
+                    Err(e) => return Err(e),
+                    Ok(o) => match o {
+                        Some(r) => Ok((r, false)),
+                        None => {
+                            self.push_physical(ValueLocation::Reg(RAX))?;
+                            self.block_state.regs.mark_used(RAX);
+                            Ok((RAX, true))
+                        }
+                    },
+                };
+
+                let (selector_reg, pop_selector) = match temp {
+                    Err(e) => return Err(e),
+                    Ok(a) => a,
+                };
+
+                let (tmp, pop_tmp) = if let Some(reg) = self.take_reg(I64) {
+                    (reg, false)
+                } else {
+                    let out_reg = if selector_reg == RAX { RCX } else { RAX };
+
+                    self.push_physical(ValueLocation::Reg(out_reg))?;
+                    self.block_state.regs.mark_used(out_reg);
+
+                    (out_reg, true)
+                };
+
+                self.immediate_to_reg(tmp, (count as u32).into());
+                dynasm!(self.asm
+                    ; cmp Rq(selector_reg.rq().unwrap()), Rq(tmp.rq().unwrap())
+                    ; cmova Rq(selector_reg.rq().unwrap()), Rq(tmp.rq().unwrap())
+                    ; lea Rq(tmp.rq().unwrap()), [>start_label]
+                    ; lea Rq(selector_reg.rq().unwrap()), [
+                        Rq(selector_reg.rq().unwrap()) * 5
+                    ]
+                    ; add Rq(selector_reg.rq().unwrap()), Rq(tmp.rq().unwrap())
+                );
+
+                if pop_tmp {
+                    dynasm!(self.asm
+                        ; pop Rq(tmp.rq().unwrap())
+                    );
+                } else {
+                    self.block_state.regs.release(tmp)?;
+                }
+
+                if pop_selector {
+                    dynasm!(self.asm
+                        ; pop Rq(selector_reg.rq().unwrap())
+                    );
+                }
+
+                dynasm!(self.asm
+                    ; jmp Rq(selector_reg.rq().unwrap())
+                ; start_label:
+                );
+
+                for target in targets {
+                    let label = target
+                        .map(|target| self.target_to_label(target))
+                        .unwrap_or(end_label);
+                    dynasm!(self.asm
+                        ; jmp =>label.0
+                    );
+                }
+            }
+
+            if let Some(def) = default {
+                match def {
+                    BrTarget::Label(label) => dynasm!(self.asm
+                        ; jmp =>label.0
+                    ),
+                    BrTarget::Return => dynasm!(self.asm
+                        ; ret
+                    ),
+                }
+            }
+
+            self.define_label(end_label);
+        }
+
+        self.free_value(selector)?;
+        Ok(())
+    }
+
+    fn set_stack_depth(&mut self, depth: StackDepth) -> Result<(), Error> {
+        if self.block_state.depth.0 != depth.0 {
+            let diff = depth.0 as i32 - self.block_state.depth.0 as i32;
+            let emit_lea = if diff.abs() != 1 {
+                true
+            } else {
+                match self.block_state.depth.0.cmp(&depth.0) {
+                    Ordering::Less => {
+                        for _ in 0..diff {
+                            dynasm!(self.asm
+                                ; push rax
+                            );
+                        }
+                        false
+                    }
+                    Ordering::Greater => {
+                        if let Some(trash) = self.take_reg(I64) {
+                            for _ in 0..self.block_state.depth.0 - depth.0 {
+                                dynasm!(self.asm
+                                    ; pop Rq(trash.rq().unwrap())
+                                );
+                            }
+                            self.block_state.regs.release(trash)?;
+                            false
+                        } else {
+                            true
+                        }
+                    }
+                    Ordering::Equal => false,
+                }
+            };
+            if emit_lea {
+                dynasm!(self.asm
+                    ; lea rsp, [rsp + (self.block_state.depth.0 as i32 - depth.0 as i32) * WORD_SIZE as i32]
+                );
+            }
+            self.block_state.depth = depth;
+        }
+        Ok(())
+    }
+
+    fn do_pass_block_args(&mut self, cc: &BlockCallingConvention) -> Result<(), Error> {
+        let args = &cc.arguments;
+        for &dst in args.iter().rev().take(self.block_state.stack.len()) {
+            if let CCLoc::Reg(r) = dst {
+                if !self.block_state.regs.is_free(r)
+                    && *self.block_state.stack.last().unwrap() != ValueLocation::Reg(r)
+                {
+                    // TODO: This would be made simpler and more efficient with a proper SSE
+                    //       representation.
+                    self.save_regs(&[r], ..)?;
+                }
+
+                self.block_state.regs.mark_used(r);
+            }
+            self.pop_into(dst)?;
+        }
+        Ok(())
+    }
+
+    pub fn pass_block_args(&mut self, cc: &BlockCallingConvention) -> Result<(), Error> {
+        self.do_pass_block_args(cc)?;
+        self.set_stack_depth(cc.stack_depth)?;
+        Ok(())
+    }
+
+    pub fn serialize_block_args(
+        &mut self,
+        cc: &BlockCallingConvention,
+        params: u32,
+    ) -> Result<BlockCallingConvention, Error> {
+        self.do_pass_block_args(cc)?;
+
+        let mut out_args = cc.arguments.clone();
+
+        out_args.reverse();
+
+        while out_args.len() < params as usize {
+            let mut val = self.pop()?;
+
+            // TODO: We can use stack slots for values already on the stack but we
+            //       don't refcount stack slots right now
+            let ccloc = self.put_into_temp_location(None, &mut val)?;
+            out_args.push(ccloc);
+        }
+
+        out_args.reverse();
+
+        self.set_stack_depth(cc.stack_depth)?;
+
+        Ok(BlockCallingConvention {
+            stack_depth: cc.stack_depth,
+            arguments: out_args,
+        })
+    }
+
+    /// Puts all stack values into "real" locations so that they can i.e. be set to different
+    /// values on different iterations of a loop
+    pub fn serialize_args(&mut self, count: u32) -> Result<BlockCallingConvention, Error> {
+        let mut out = Vec::with_capacity(count as _);
+
+        // TODO: We can make this more efficient now that `pop` isn't so complicated
+        for _ in 0..count {
+            let mut val = self.pop()?;
+            // TODO: We can use stack slots for values already on the stack but we
+            //       don't refcount stack slots right now
+            let loc = self.put_into_temp_location(None, &mut val)?;
+
+            out.push(loc);
+        }
+
+        out.reverse();
+
+        Ok(BlockCallingConvention {
+            stack_depth: self.block_state.depth,
+            arguments: out,
+        })
+    }
+
+    pub fn get_global(&mut self, global_idx: u32) -> Result<(), Error> {
+        let (reg, offset) = self
+            .module_context
+            .defined_global_index(global_idx)
+            .map(|defined_global_index| {
+                (
+                    None,
+                    self.module_context
+                        .vmctx_vmglobal_definition(defined_global_index),
+                )
+            })
+            .unwrap_or_else(|| {
+                let reg = self.take_reg(I64).unwrap();
+
+                dynasm!(self.asm
+                    ; mov Rq(reg.rq().unwrap()), [
+                        Rq(VMCTX) +
+                            self.module_context.vmctx_vmglobal_import_from(global_idx) as i32
+                    ]
+                );
+
+                (Some(reg), 0)
+            });
+
+        let out = self.take_reg(GPRType::Rq).unwrap();
+        let vmctx = GPR::Rq(VMCTX);
+
+        // TODO: Are globals necessarily aligned to 128 bits? We can load directly to an XMM reg if so
+        dynasm!(self.asm
+            ; mov Rq(out.rq().unwrap()), [Rq(reg.unwrap_or(vmctx).rq().unwrap()) + offset as i32]
+        );
+
+        if let Some(reg) = reg {
+            self.block_state.regs.release(reg)?;
+        }
+
+        self.push(ValueLocation::Reg(out))?;
+        Ok(())
+    }
+
+    pub fn set_global(&mut self, global_idx: u32) -> Result<(), Error> {
+        let mut val = self.pop()?;
+        let (reg, offset) = self
+            .module_context
+            .defined_global_index(global_idx)
+            .map(|defined_global_index| {
+                (
+                    None,
+                    self.module_context
+                        .vmctx_vmglobal_definition(defined_global_index),
+                )
+            })
+            .unwrap_or_else(|| {
+                let reg = self.take_reg(I64).unwrap();
+
+                dynasm!(self.asm
+                    ; mov Rq(reg.rq().unwrap()), [
+                        Rq(VMCTX) +
+                            self.module_context.vmctx_vmglobal_import_from(global_idx) as i32
+                    ]
+                );
+
+                (Some(reg), 0)
+            });
+
+        let val_reg = match self.put_into_register(GPRType::Rq, &mut val) {
+            Err(e) => return Err(e),
+            Ok(o) => o.unwrap(),
+        };
+        let vmctx = GPR::Rq(VMCTX);
+
+        // We always use `Rq` (even for floats) since the globals are not necessarily aligned to 128 bits
+        dynasm!(self.asm
+            ; mov [
+                Rq(reg.unwrap_or(vmctx).rq().unwrap()) + offset as i32
+            ], Rq(val_reg.rq().unwrap())
+        );
+
+        if let Some(reg) = reg {
+            self.block_state.regs.release(reg)?;
+        }
+
+        self.free_value(val)?;
+        Ok(())
+    }
+
+    fn immediate_to_reg(&mut self, reg: GPR, val: Value) {
+        match reg {
+            GPR::Rq(r) => {
+                let val = val.as_bytes();
+                if (val as u64) <= u32::max_value() as u64 {
+                    dynasm!(self.asm
+                        ; mov Rd(r), val as i32
+                    );
+                } else {
+                    dynasm!(self.asm
+                        ; mov Rq(r), QWORD val
+                    );
+                }
+            }
+            GPR::Rx(r) => {
+                let label = self.aligned_label(16, LabelValue::from(val));
+                dynasm!(self.asm
+                    ; movq Rx(r), [=>label.0]
+                );
+            }
+        }
+    }
+
+    // The `&` and `&mut` aren't necessary (`ValueLocation` is copy) but it ensures that we don't get
+    // the arguments the wrong way around. In the future we want to have a `ReadLocation` and `WriteLocation`
+    // so we statically can't write to a literal so this will become a non-issue.
+    fn copy_value(&mut self, src: ValueLocation, dst: CCLoc) -> Result<(), Error> {
+        match (src, dst) {
+            (ValueLocation::Cond(cond), CCLoc::Stack(o)) => {
+                let offset = self.adjusted_offset(o);
+
+                dynasm!(self.asm
+                    ; mov QWORD [rsp + offset], DWORD 0
+                );
+
+                match cond {
+                    cc::EQUAL => dynasm!(self.asm
+                        ; sete [rsp + offset]
+                    ),
+                    cc::NOT_EQUAL => dynasm!(self.asm
+                        ; setne [rsp + offset]
+                    ),
+                    cc::GT_U => dynasm!(self.asm
+                        ; seta [rsp + offset]
+                    ),
+                    cc::GE_U => dynasm!(self.asm
+                        ; setae [rsp + offset]
+                    ),
+                    cc::LT_U => dynasm!(self.asm
+                        ; setb [rsp + offset]
+                    ),
+                    cc::LE_U => dynasm!(self.asm
+                        ; setbe [rsp + offset]
+                    ),
+                    cc::GT_S => dynasm!(self.asm
+                        ; setg [rsp + offset]
+                    ),
+                    cc::GE_S => dynasm!(self.asm
+                        ; setge [rsp + offset]
+                    ),
+                    cc::LT_S => dynasm!(self.asm
+                        ; setl [rsp + offset]
+                    ),
+                    cc::LE_S => dynasm!(self.asm
+                        ; setle [rsp + offset]
+                    ),
+                }
+            }
+            (ValueLocation::Cond(cond), CCLoc::Reg(reg)) => match reg {
+                GPR::Rq(r) => {
+                    dynasm!(self.asm
+                        ; mov Rq(r), 0
+                    );
+
+                    match cond {
+                        cc::EQUAL => dynasm!(self.asm
+                            ; sete Rb(r)
+                        ),
+                        cc::NOT_EQUAL => dynasm!(self.asm
+                            ; setne Rb(r)
+                        ),
+                        cc::GT_U => dynasm!(self.asm
+                            ; seta Rb(r)
+                        ),
+                        cc::GE_U => dynasm!(self.asm
+                            ; setae Rb(r)
+                        ),
+                        cc::LT_U => dynasm!(self.asm
+                            ; setb Rb(r)
+                        ),
+                        cc::LE_U => dynasm!(self.asm
+                            ; setbe Rb(r)
+                        ),
+                        cc::GT_S => dynasm!(self.asm
+                            ; setg Rb(r)
+                        ),
+                        cc::GE_S => dynasm!(self.asm
+                            ; setge Rb(r)
+                        ),
+                        cc::LT_S => dynasm!(self.asm
+                            ; setl Rb(r)
+                        ),
+                        cc::LE_S => dynasm!(self.asm
+                            ; setle Rb(r)
+                        ),
+                    }
+                }
+                GPR::Rx(_) => {
+                    let temp = CCLoc::Reg(self.take_reg(I32).unwrap());
+                    self.copy_value(src, temp)?;
+                    let temp = temp.into();
+                    self.copy_value(temp, dst)?;
+                    self.free_value(temp)?;
+                }
+            },
+            (ValueLocation::Stack(in_offset), CCLoc::Stack(out_offset)) => {
+                let in_offset = self.adjusted_offset(in_offset);
+                let out_offset = self.adjusted_offset(out_offset);
+                if in_offset != out_offset {
+                    if let Some(gpr) = self.take_reg(I64) {
+                        dynasm!(self.asm
+                            ; mov Rq(gpr.rq().unwrap()), [rsp + in_offset]
+                            ; mov [rsp + out_offset], Rq(gpr.rq().unwrap())
+                        );
+                        self.block_state.regs.release(gpr)?;
+                    } else {
+                        dynasm!(self.asm
+                            ; push rax
+                            ; mov rax, [rsp + in_offset + WORD_SIZE as i32]
+                            ; mov [rsp + out_offset + WORD_SIZE as i32], rax
+                            ; pop rax
+                        );
+                    }
+                }
+            }
+            // TODO: XMM registers
+            (ValueLocation::Reg(in_reg), CCLoc::Stack(out_offset)) => {
+                let out_offset = self.adjusted_offset(out_offset);
+                match in_reg {
+                    GPR::Rq(in_reg) => {
+                        // We can always use `Rq` here for now because stack slots are in multiples of
+                        // 8 bytes
+                        dynasm!(self.asm
+                            ; mov [rsp + out_offset], Rq(in_reg)
+                        );
+                    }
+                    GPR::Rx(in_reg) => {
+                        // We can always use `movq` here for now because stack slots are in multiples of
+                        // 8 bytes
+                        dynasm!(self.asm
+                            ; movq [rsp + out_offset], Rx(in_reg)
+                        );
+                    }
+                }
+            }
+            (ValueLocation::Immediate(i), CCLoc::Stack(out_offset)) => {
+                // TODO: Floats
+                let i = i.as_bytes();
+                let out_offset = self.adjusted_offset(out_offset);
+                if (i as u64) <= u32::max_value() as u64 {
+                    dynasm!(self.asm
+                        ; mov DWORD [rsp + out_offset], i as i32
+                    );
+                } else if let Some(scratch) = self.take_reg(I64) {
+                    dynasm!(self.asm
+                        ; mov Rq(scratch.rq().unwrap()), QWORD i
+                        ; mov [rsp + out_offset], Rq(scratch.rq().unwrap())
+                    );
+
+                    self.block_state.regs.release(scratch)?;
+                } else {
+                    dynasm!(self.asm
+                        ; push rax
+                        ; mov rax, QWORD i
+                        ; mov [rsp + out_offset + WORD_SIZE as i32], rax
+                        ; pop rax
+                    );
+                }
+            }
+            (ValueLocation::Stack(in_offset), CCLoc::Reg(out_reg)) => {
+                let in_offset = self.adjusted_offset(in_offset);
+                match out_reg {
+                    GPR::Rq(out_reg) => {
+                        // We can always use `Rq` here for now because stack slots are in multiples of
+                        // 8 bytes
+                        dynasm!(self.asm
+                            ; mov Rq(out_reg), [rsp + in_offset]
+                        );
+                    }
+                    GPR::Rx(out_reg) => {
+                        // We can always use `movq` here for now because stack slots are in multiples of
+                        // 8 bytes
+                        dynasm!(self.asm
+                            ; movq Rx(out_reg), [rsp + in_offset]
+                        );
+                    }
+                }
+            }
+            (ValueLocation::Reg(in_reg), CCLoc::Reg(out_reg)) => {
+                if in_reg != out_reg {
+                    match (in_reg, out_reg) {
+                        (GPR::Rq(in_reg), GPR::Rq(out_reg)) => {
+                            dynasm!(self.asm
+                                ; mov Rq(out_reg), Rq(in_reg)
+                            );
+                        }
+                        (GPR::Rx(in_reg), GPR::Rq(out_reg)) => {
+                            dynasm!(self.asm
+                                ; movq Rq(out_reg), Rx(in_reg)
+                            );
+                        }
+                        (GPR::Rq(in_reg), GPR::Rx(out_reg)) => {
+                            dynasm!(self.asm
+                                ; movq Rx(out_reg), Rq(in_reg)
+                            );
+                        }
+                        (GPR::Rx(in_reg), GPR::Rx(out_reg)) => {
+                            dynasm!(self.asm
+                                ; movapd Rx(out_reg), Rx(in_reg)
+                            );
+                        }
+                    }
+                }
+            }
+            (ValueLocation::Immediate(i), CCLoc::Reg(out_reg)) => {
+                // TODO: Floats
+                self.immediate_to_reg(out_reg, i);
+            }
+        }
+        Ok(())
+    }
+
+    /// Define the given label at the current position.
+    ///
+    /// Multiple labels can be defined at the same position. However, a label
+    /// can be defined only once.
+    pub fn define_label(&mut self, label: Label) {
+        self.asm.dynamic_label(label.0);
+    }
+
+    pub fn set_state(&mut self, state: VirtualCallingConvention) -> Result<(), Error> {
+        self.block_state.regs = Registers::new();
+        self.block_state.regs.release_scratch_register()?;
+        for elem in &state.stack {
+            if let ValueLocation::Reg(r) = elem {
+                self.block_state.regs.mark_used(*r);
+            }
+        }
+        self.block_state.stack = state.stack;
+        self.block_state.depth = state.depth;
+        Ok(())
+    }
+
+    pub fn apply_cc(&mut self, cc: &BlockCallingConvention) -> Result<(), Error> {
+        let stack = cc.arguments.iter();
+
+        self.block_state.stack = Vec::with_capacity(stack.size_hint().0);
+        self.block_state.regs = Registers::new();
+        self.block_state.regs.release_scratch_register()?;
+
+        for &elem in stack {
+            if let CCLoc::Reg(r) = elem {
+                self.block_state.regs.mark_used(r);
+            }
+
+            self.block_state.stack.push(elem.into());
+        }
+
+        self.block_state.depth = cc.stack_depth;
+        Ok(())
+    }
+
+    load!(i32_load, GPRType::Rq, Rd, movd, mov, DWORD);
+    load!(i64_load, GPRType::Rq, Rq, movq, mov, QWORD);
+    load!(f32_load, GPRType::Rx, Rd, movd, mov, DWORD);
+    load!(f64_load, GPRType::Rx, Rq, movq, mov, QWORD);
+
+    load!(i32_load8_u, GPRType::Rq, Rd, NONE, movzx, BYTE);
+    load!(i32_load8_s, GPRType::Rq, Rd, NONE, movsx, BYTE);
+    load!(i32_load16_u, GPRType::Rq, Rd, NONE, movzx, WORD);
+    load!(i32_load16_s, GPRType::Rq, Rd, NONE, movsx, WORD);
+
+    load!(i64_load8_u, GPRType::Rq, Rq, NONE, movzx, BYTE);
+    load!(i64_load8_s, GPRType::Rq, Rq, NONE, movsx, BYTE);
+    load!(i64_load16_u, GPRType::Rq, Rq, NONE, movzx, WORD);
+    load!(i64_load16_s, GPRType::Rq, Rq, NONE, movsx, WORD);
+    load!(i64_load32_u, GPRType::Rq, Rd, movd, mov, DWORD);
+    load!(i64_load32_s, GPRType::Rq, Rq, NONE, movsxd, DWORD);
+
+    store!(store8, Rb, NONE, DWORD);
+    store!(store16, Rw, NONE, QWORD);
+    store!(store32, Rd, movd, DWORD);
+    store!(store64, Rq, movq, QWORD);
+
+    fn push_physical(&mut self, mut value: ValueLocation) -> Result<ValueLocation, Error> {
+        let out_offset = -(self.block_state.depth.0 as i32 + 1);
+        match value {
+            ValueLocation::Reg(_) | ValueLocation::Immediate(_) | ValueLocation::Cond(_) => {
+                if let Some(gpr) = self.put_into_register(GPRType::Rq, &mut value)? {
+                    dynasm!(self.asm
+                        ; push Rq(gpr.rq().unwrap())
+                    );
+                } else {
+                    dynasm!(self.asm
+                        ; push rax
+                    );
+
+                    self.copy_value(value, CCLoc::Stack(out_offset))?;
+                }
+
+                self.free_value(value)?;
+            }
+            ValueLocation::Stack(o) => {
+                let offset = self.adjusted_offset(o);
+                dynasm!(self.asm
+                    ; push QWORD [rsp + offset]
+                );
+            }
+        }
+
+        self.block_state.depth.reserve(1);
+
+        Ok(ValueLocation::Stack(out_offset))
+    }
+
+    fn push(&mut self, value: ValueLocation) -> Result<(), Error> {
+        if let Some(mut top) = self.block_state.stack.pop() {
+            if let ValueLocation::Cond(_) = top {
+                match self.put_into_register(I32, &mut top) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+            }
+
+            self.block_state.stack.push(top);
+        }
+
+        self.block_state.stack.push(value);
+        Ok(())
+    }
+
+    fn pop(&mut self) -> Result<ValueLocation, Error> {
+        match self.block_state.stack.pop() {
+            Some(v) => Ok(v),
+            None => Err(Error::Microwasm(
+                "Stack is empty - pop impossible".to_string(),
+            )),
+        }
+    }
+
+    pub fn drop(&mut self, range: RangeInclusive<u32>) -> Result<(), Error> {
+        let mut repush = Vec::with_capacity(*range.start() as _);
+
+        for _ in 0..*range.start() {
+            let v = self.pop()?;
+            repush.push(v);
+        }
+
+        for _ in range {
+            let val = self.pop()?;
+            self.free_value(val)?;
+        }
+
+        for v in repush.into_iter().rev() {
+            self.push(v)?;
+        }
+        Ok(())
+    }
+
+    fn pop_into(&mut self, dst: CCLoc) -> Result<(), Error> {
+        let val = self.pop()?;
+        self.copy_value(val, dst)?;
+        self.free_value(val)?;
+        Ok(())
+    }
+
+    fn free_value(&mut self, val: ValueLocation) -> Result<(), Error> {
+        if let ValueLocation::Reg(r) = val {
+            self.block_state.regs.release(r)?;
+        }
+        Ok(())
+    }
+
+    /// Puts this value into a register so that it can be efficiently read
+    fn put_into_register(
+        &mut self,
+        ty: impl Into<Option<GPRType>>,
+        val: &mut ValueLocation,
+    ) -> Result<Option<GPR>, Error> {
+        if let Some(out) = self.clone_to_register(ty, *val)? {
+            self.free_value(*val)?;
+            *val = ValueLocation::Reg(out);
+            Ok(Some(out))
+        } else {
+            Ok(None)
+        }
+    }
+
+    /// Clones this value into a register so that it can be efficiently read
+    fn clone_to_register(
+        &mut self,
+        ty: impl Into<Option<GPRType>>,
+        val: ValueLocation,
+    ) -> Result<Option<GPR>, Error> {
+        let ty = ty.into();
+        match val {
+            ValueLocation::Reg(r) if ty.map(|t| t == r.type_()).unwrap_or(true) => {
+                self.block_state.regs.mark_used(r);
+                Ok(Some(r))
+            }
+            val => match self.take_reg(ty.unwrap_or(GPRType::Rq)) {
+                Some(scratch) => {
+                    self.copy_value(val, CCLoc::Reg(scratch))?;
+                    Ok(Some(scratch))
+                }
+                None => Ok(None),
+            },
+        }
+    }
+
+    /// Puts this value into a temporary register so that operations
+    /// on that register don't write to a local.
+    fn put_into_temp_register(
+        &mut self,
+        ty: impl Into<Option<GPRType>>,
+        val: &mut ValueLocation,
+    ) -> Result<Option<GPR>, Error> {
+        let out = self.clone_to_temp_register(ty, *val)?;
+        if let Some(o) = out {
+            self.free_value(*val)?;
+            *val = ValueLocation::Reg(o);
+            Ok(Some(o))
+        } else {
+            Ok(None)
+        }
+    }
+
+    fn put_into_temp_location(
+        &mut self,
+        ty: impl Into<Option<GPRType>>,
+        val: &mut ValueLocation,
+    ) -> Result<CCLoc, Error> {
+        match val {
+            _ => {
+                if let Some(gpr) = self.put_into_temp_register(ty, val)? {
+                    Ok(CCLoc::Reg(gpr))
+                } else {
+                    let out = CCLoc::Stack(self.push_physical(*val)?.stack().unwrap());
+                    *val = out.into();
+                    Ok(out)
+                }
+            }
+        }
+    }
+
+    /// Clones this value into a temporary register so that operations
+    /// on that register don't write to a local.
+
+    fn clone_to_temp_register(
+        &mut self,
+        ty: impl Into<Option<GPRType>>,
+        val: ValueLocation,
+    ) -> Result<Option<GPR>, Error> {
+        // If we have `None` as the type then it always matches (`.unwrap_or(true)`)
+        match val {
+            ValueLocation::Reg(r) => {
+                let ty = ty.into();
+                let type_matches = ty.map(|t| t == r.type_()).unwrap_or(true);
+
+                if self.block_state.regs.num_usages(r) <= 1 && type_matches {
+                    self.block_state.regs.mark_used(r);
+                    Ok(Some(r))
+                } else if let Some(scratch) = self.take_reg(ty.unwrap_or(GPRType::Rq)) {
+                    self.copy_value(val, CCLoc::Reg(scratch))?;
+                    Ok(Some(scratch))
+                } else {
+                    Ok(None)
+                }
+            }
+            val => self.clone_to_register(ty, val),
+        }
+    }
+
+    pub fn f32_neg(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out = if let Some(i) = val.imm_f32() {
+            ValueLocation::Immediate(
+                Ieee32::from_bits((-f32::from_bits(i.to_bits())).to_bits()).into(),
+            )
+        } else {
+            let reg = match self.put_into_temp_register(GPRType::Rx, &mut val) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+            let const_label = self.aligned_label(16, LabelValue::I32(SIGN_MASK_F32 as i32));
+
+            dynasm!(self.asm
+                ; xorps Rx(reg.rx().unwrap()), [=>const_label.0]
+            );
+
+            val
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn f64_neg(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out = if let Some(i) = val.imm_f64() {
+            ValueLocation::Immediate(
+                Ieee64::from_bits((-f64::from_bits(i.to_bits())).to_bits()).into(),
+            )
+        } else {
+            let reg = match self.put_into_temp_register(GPRType::Rx, &mut val) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+            let const_label = self.aligned_label(16, LabelValue::I64(SIGN_MASK_F64 as i64));
+
+            dynasm!(self.asm
+                ; xorpd Rx(reg.rx().unwrap()), [=>const_label.0]
+            );
+
+            val
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn f32_abs(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out = if let Some(i) = val.imm_f32() {
+            ValueLocation::Immediate(
+                Ieee32::from_bits(f32::from_bits(i.to_bits()).abs().to_bits()).into(),
+            )
+        } else {
+            let reg = match self.put_into_temp_register(GPRType::Rx, &mut val) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+            let const_label = self.aligned_label(16, LabelValue::I32(REST_MASK_F32 as i32));
+
+            dynasm!(self.asm
+                ; andps Rx(reg.rx().unwrap()), [=>const_label.0]
+            );
+
+            val
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn f64_abs(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out = if let Some(i) = val.imm_f64() {
+            ValueLocation::Immediate(
+                Ieee64::from_bits(f64::from_bits(i.to_bits()).abs().to_bits()).into(),
+            )
+        } else {
+            let reg = match self.put_into_temp_register(GPRType::Rx, &mut val) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+
+            let const_label = self.aligned_label(16, LabelValue::I64(REST_MASK_F64 as i64));
+
+            dynasm!(self.asm
+                ; andps Rx(reg.rx().unwrap()), [=>const_label.0]
+            );
+
+            val
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn f32_sqrt(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out = if let Some(i) = val.imm_f32() {
+            ValueLocation::Immediate(
+                Ieee32::from_bits(f32::from_bits(i.to_bits()).sqrt().to_bits()).into(),
+            )
+        } else {
+            let reg = match self.put_into_temp_register(GPRType::Rx, &mut val) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+
+            dynasm!(self.asm
+                ; sqrtss Rx(reg.rx().unwrap()), Rx(reg.rx().unwrap())
+            );
+
+            val
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn f64_sqrt(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out = if let Some(i) = val.imm_f64() {
+            ValueLocation::Immediate(
+                Ieee64::from_bits(f64::from_bits(i.to_bits()).sqrt().to_bits()).into(),
+            )
+        } else {
+            let reg = match self.put_into_temp_register(GPRType::Rx, &mut val) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+
+            dynasm!(self.asm
+                ; sqrtsd Rx(reg.rx().unwrap()), Rx(reg.rx().unwrap())
+            );
+
+            ValueLocation::Reg(reg)
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn f32_copysign(&mut self) -> Result<(), Error> {
+        let mut right = self.pop()?;
+        let mut left = self.pop()?;
+
+        let out = if let (Some(left), Some(right)) = (left.imm_f32(), right.imm_f32()) {
+            ValueLocation::Immediate(
+                Ieee32::from_bits(
+                    (left.to_bits() & REST_MASK_F32) | (right.to_bits() & SIGN_MASK_F32),
+                )
+                .into(),
+            )
+        } else {
+            let lreg = match self.put_into_temp_register(GPRType::Rx, &mut left) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+            let rreg = match self.put_into_register(GPRType::Rx, &mut right) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+
+            let sign_mask = self.aligned_label(16, LabelValue::I32(SIGN_MASK_F32 as i32));
+            let rest_mask = self.aligned_label(16, LabelValue::I32(REST_MASK_F32 as i32));
+
+            dynasm!(self.asm
+                ; andps Rx(rreg.rx().unwrap()), [=>sign_mask.0]
+                ; andps Rx(lreg.rx().unwrap()), [=>rest_mask.0]
+                ; orps  Rx(lreg.rx().unwrap()), Rx(rreg.rx().unwrap())
+            );
+
+            self.free_value(right)?;
+
+            left
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn f64_copysign(&mut self) -> Result<(), Error> {
+        let mut right = self.pop()?;
+        let mut left = self.pop()?;
+
+        let out = if let (Some(left), Some(right)) = (left.imm_f64(), right.imm_f64()) {
+            ValueLocation::Immediate(
+                Ieee64::from_bits(
+                    (left.to_bits() & REST_MASK_F64) | (right.to_bits() & SIGN_MASK_F64),
+                )
+                .into(),
+            )
+        } else {
+            let lreg = match self.put_into_temp_register(GPRType::Rx, &mut left) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+            let rreg = match self.put_into_register(GPRType::Rx, &mut right) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+
+            let sign_mask = self.aligned_label(16, LabelValue::I64(SIGN_MASK_F64 as i64));
+            let rest_mask = self.aligned_label(16, LabelValue::I64(REST_MASK_F64 as i64));
+
+            dynasm!(self.asm
+                ; andpd Rx(rreg.rx().unwrap()), [=>sign_mask.0]
+                ; andpd Rx(lreg.rx().unwrap()), [=>rest_mask.0]
+                ; orpd  Rx(lreg.rx().unwrap()), Rx(rreg.rx().unwrap())
+            );
+
+            self.free_value(right)?;
+
+            left
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn i32_clz(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => {
+                ValueLocation::Immediate(imm.as_i32().unwrap().leading_zeros().into())
+            }
+            ValueLocation::Stack(offset) => {
+                let offset = self.adjusted_offset(offset);
+                let temp = self.take_reg(I32).unwrap();
+
+                if is_x86_feature_detected!("lzcnt") {
+                    dynasm!(self.asm
+                        ; lzcnt Rd(temp.rq().unwrap()), [rsp + offset]
+                    );
+                    ValueLocation::Reg(temp)
+                } else {
+                    let temp_2 = self.take_reg(I32).unwrap();
+
+                    dynasm!(self.asm
+                        ; bsr Rd(temp.rq().unwrap()), [rsp + offset]
+                        ; mov Rd(temp_2.rq().unwrap()), DWORD 0x3fu64 as _
+                        ; cmove Rd(temp.rq().unwrap()), Rd(temp_2.rq().unwrap())
+                        ; mov Rd(temp_2.rq().unwrap()), DWORD 0x1fu64 as _
+                        ; xor Rd(temp.rq().unwrap()), Rd(temp_2.rq().unwrap())
+                    );
+                    self.free_value(ValueLocation::Reg(temp_2))?;
+                    ValueLocation::Reg(temp)
+                }
+            }
+            ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                let reg = match self.put_into_register(GPRType::Rq, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let temp = self.take_reg(I32).unwrap();
+
+                if is_x86_feature_detected!("lzcnt") {
+                    dynasm!(self.asm
+                        ; lzcnt Rd(temp.rq().unwrap()), Rd(reg.rq().unwrap())
+                    );
+                    ValueLocation::Reg(temp)
+                } else {
+                    dynasm!(self.asm
+                        ; bsr Rd(temp.rq().unwrap()), Rd(reg.rq().unwrap())
+                        ; mov Rd(reg.rq().unwrap()), DWORD 0x3fu64 as _
+                        ; cmove Rd(temp.rq().unwrap()), Rd(reg.rq().unwrap())
+                        ; mov Rd(reg.rq().unwrap()), DWORD 0x1fu64 as _
+                        ; xor Rd(temp.rq().unwrap()), Rd(reg.rq().unwrap())
+                    );
+                    ValueLocation::Reg(temp)
+                }
+            }
+        };
+
+        self.free_value(val)?;
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn i64_clz(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => {
+                ValueLocation::Immediate((imm.as_i64().unwrap().leading_zeros() as u64).into())
+            }
+            ValueLocation::Stack(offset) => {
+                let offset = self.adjusted_offset(offset);
+                let temp = self.take_reg(I64).unwrap();
+
+                if is_x86_feature_detected!("lzcnt") {
+                    dynasm!(self.asm
+                        ; lzcnt Rq(temp.rq().unwrap()), [rsp + offset]
+                    );
+                    ValueLocation::Reg(temp)
+                } else {
+                    let temp_2 = self.take_reg(I64).unwrap();
+
+                    dynasm!(self.asm
+                        ; bsr Rq(temp.rq().unwrap()), [rsp + offset]
+                        ; mov Rq(temp_2.rq().unwrap()), QWORD 0x7fu64 as _
+                        ; cmove Rq(temp.rq().unwrap()), Rq(temp_2.rq().unwrap())
+                        ; mov Rq(temp_2.rq().unwrap()), QWORD 0x3fu64 as _
+                        ; xor Rq(temp.rq().unwrap()), Rq(temp_2.rq().unwrap())
+                    );
+                    self.free_value(ValueLocation::Reg(temp_2))?;
+                    ValueLocation::Reg(temp)
+                }
+            }
+            ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                let reg = match self.put_into_register(GPRType::Rq, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+                let temp = self.take_reg(I64).unwrap();
+
+                if is_x86_feature_detected!("lzcnt") {
+                    dynasm!(self.asm
+                        ; lzcnt Rq(temp.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                    ValueLocation::Reg(temp)
+                } else {
+                    dynasm!(self.asm
+                        ; bsr Rq(temp.rq().unwrap()), Rq(reg.rq().unwrap())
+                        ; mov Rq(reg.rq().unwrap()), QWORD 0x7fu64 as _
+                        ; cmove Rq(temp.rq().unwrap()), Rq(reg.rq().unwrap())
+                        ; mov Rq(reg.rq().unwrap()), QWORD 0x3fu64 as _
+                        ; xor Rq(temp.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                    ValueLocation::Reg(temp)
+                }
+            }
+        };
+
+        self.free_value(val)?;
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn i32_ctz(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => {
+                ValueLocation::Immediate(imm.as_i32().unwrap().trailing_zeros().into())
+            }
+            ValueLocation::Stack(offset) => {
+                let offset = self.adjusted_offset(offset);
+                let temp = self.take_reg(I32).unwrap();
+
+                if is_x86_feature_detected!("lzcnt") {
+                    dynasm!(self.asm
+                        ; tzcnt Rd(temp.rq().unwrap()), [rsp + offset]
+                    );
+                    ValueLocation::Reg(temp)
+                } else {
+                    let temp_zero_val = self.take_reg(I32).unwrap();
+
+                    dynasm!(self.asm
+                        ; bsf Rd(temp.rq().unwrap()), [rsp + offset]
+                        ; mov Rd(temp_zero_val.rq().unwrap()), DWORD 0x20u32 as _
+                        ; cmove Rd(temp.rq().unwrap()), Rd(temp_zero_val.rq().unwrap())
+                    );
+                    self.free_value(ValueLocation::Reg(temp_zero_val))?;
+                    ValueLocation::Reg(temp)
+                }
+            }
+            ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                let reg = match self.put_into_register(GPRType::Rq, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+                let temp = self.take_reg(I32).unwrap();
+
+                if is_x86_feature_detected!("lzcnt") {
+                    dynasm!(self.asm
+                        ; tzcnt Rd(temp.rq().unwrap()), Rd(reg.rq().unwrap())
+                    );
+                    ValueLocation::Reg(temp)
+                } else {
+                    dynasm!(self.asm
+                        ; bsf Rd(temp.rq().unwrap()), Rd(reg.rq().unwrap())
+                        ; mov Rd(reg.rq().unwrap()), DWORD 0x20u32 as _
+                        ; cmove Rd(temp.rq().unwrap()), Rd(reg.rq().unwrap())
+                    );
+                    ValueLocation::Reg(temp)
+                }
+            }
+        };
+
+        self.free_value(val)?;
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn i64_ctz(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => {
+                ValueLocation::Immediate((imm.as_i64().unwrap().trailing_zeros() as u64).into())
+            }
+            ValueLocation::Stack(offset) => {
+                let offset = self.adjusted_offset(offset);
+                let temp = self.take_reg(I64).unwrap();
+
+                if is_x86_feature_detected!("lzcnt") {
+                    dynasm!(self.asm
+                        ; tzcnt Rq(temp.rq().unwrap()), [rsp + offset]
+                    );
+                    ValueLocation::Reg(temp)
+                } else {
+                    let temp_zero_val = self.take_reg(I64).unwrap();
+
+                    dynasm!(self.asm
+                        ; bsf Rq(temp.rq().unwrap()), [rsp + offset]
+                        ; mov Rq(temp_zero_val.rq().unwrap()), QWORD 0x40u64 as _
+                        ; cmove Rq(temp.rq().unwrap()), Rq(temp_zero_val.rq().unwrap())
+                    );
+                    self.free_value(ValueLocation::Reg(temp_zero_val))?;
+                    ValueLocation::Reg(temp)
+                }
+            }
+            ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                let reg = match self.put_into_register(GPRType::Rq, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+                let temp = self.take_reg(I64).unwrap();
+
+                dynasm!(self.asm
+                    ; bsf Rq(temp.rq().unwrap()), Rq(reg.rq().unwrap())
+                    ; mov Rq(reg.rq().unwrap()), QWORD 0x40u64 as _
+                    ; cmove Rq(temp.rq().unwrap()), Rq(reg.rq().unwrap())
+                );
+                ValueLocation::Reg(temp)
+            }
+        };
+
+        self.free_value(val)?;
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn i32_extend_u(&mut self) -> Result<(), Error> {
+        let val = self.pop()?;
+
+        let out = if let ValueLocation::Immediate(imm) = val {
+            ValueLocation::Immediate((imm.as_i32().unwrap() as u32 as u64).into())
+        } else {
+            let new_reg = self.take_reg(I64).unwrap();
+
+            // TODO: Track set-ness of bits - we can make this a no-op in most cases
+            //       but we have to make this unconditional just in case this value
+            //       came from a truncate.
+            match val {
+                ValueLocation::Reg(GPR::Rx(rxreg)) => {
+                    dynasm!(self.asm
+                        ; movd Rd(new_reg.rq().unwrap()), Rx(rxreg)
+                    );
+                }
+                ValueLocation::Reg(GPR::Rq(rqreg)) => {
+                    dynasm!(self.asm
+                        ; mov Rd(new_reg.rq().unwrap()), Rd(rqreg)
+                    );
+                }
+                ValueLocation::Stack(offset) => {
+                    let offset = self.adjusted_offset(offset);
+
+                    dynasm!(self.asm
+                        ; mov Rd(new_reg.rq().unwrap()), [rsp + offset]
+                    );
+                }
+                ValueLocation::Cond(_) => self.copy_value(val, CCLoc::Reg(new_reg))?,
+                ValueLocation::Immediate(_) => {
+                    return Err(Error::Microwasm(
+                        "i32_extend_u unreachable code".to_string(),
+                    ))
+                }
+            }
+
+            ValueLocation::Reg(new_reg)
+        };
+
+        self.free_value(val)?;
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn i32_extend_s(&mut self) -> Result<(), Error> {
+        let val = self.pop()?;
+
+        self.free_value(val)?;
+        let new_reg = self.take_reg(I64).unwrap();
+
+        let out = if let ValueLocation::Immediate(imm) = val {
+            self.block_state.regs.release(new_reg)?;
+            ValueLocation::Immediate((imm.as_i32().unwrap() as i64).into())
+        } else {
+            match val {
+                ValueLocation::Reg(GPR::Rx(rxreg)) => {
+                    dynasm!(self.asm
+                        ; movd Rd(new_reg.rq().unwrap()), Rx(rxreg)
+                        ; movsxd Rq(new_reg.rq().unwrap()), Rd(new_reg.rq().unwrap())
+                    );
+                }
+                ValueLocation::Reg(GPR::Rq(rqreg)) => {
+                    dynasm!(self.asm
+                        ; movsxd Rq(new_reg.rq().unwrap()), Rd(rqreg)
+                    );
+                }
+                ValueLocation::Stack(offset) => {
+                    let offset = self.adjusted_offset(offset);
+
+                    dynasm!(self.asm
+                        ; movsxd Rq(new_reg.rq().unwrap()), DWORD [rsp + offset]
+                    );
+                }
+                _ => {
+                    return Err(Error::Microwasm(
+                        "i32_extend_s unreachable code".to_string(),
+                    ))
+                }
+            }
+
+            ValueLocation::Reg(new_reg)
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    unop!(i32_popcnt, popcnt, Rd, u32, u32::count_ones);
+    conversion!(
+        f64_from_f32,
+        cvtss2sd,
+        Rx,
+        rx,
+        Rx,
+        rx,
+        f32,
+        f64,
+        as_f32,
+        |a: Ieee32| Ieee64::from_bits((f32::from_bits(a.to_bits()) as f64).to_bits())
+    );
+    conversion!(
+        f32_from_f64,
+        cvtsd2ss,
+        Rx,
+        rx,
+        Rx,
+        rx,
+        f64,
+        f32,
+        as_f64,
+        |a: Ieee64| Ieee32::from_bits((f64::from_bits(a.to_bits()) as f32).to_bits())
+    );
+    pub fn i32_truncate_f32_s(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                (f32::from_bits(imm.as_f32().unwrap().to_bits()) as i32).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_register(F32, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+                let temp = self.take_reg(I32).unwrap();
+
+                let sign_mask = self.aligned_label(4, LabelValue::I32(SIGN_MASK_F32 as i32));
+                let float_cmp_mask =
+                    self.aligned_label(16, LabelValue::I32(0xCF00_0000_u32 as i32));
+                let zero = self.aligned_label(16, LabelValue::I32(0));
+                let trap_label = self.trap_label();
+
+                dynasm!(self.asm
+                    ; cvttss2si Rd(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; cmp Rd(temp.rq().unwrap()), [=>sign_mask.0]
+                    ; jne >ret
+                    ; ucomiss Rx(reg.rx().unwrap()), Rx(reg.rx().unwrap())
+                    ; jp =>trap_label.0
+                    ; ucomiss Rx(reg.rx().unwrap()), [=>float_cmp_mask.0]
+                    ; jnae =>trap_label.0
+                    ; ucomiss Rx(reg.rx().unwrap()), [=>zero.0]
+                    ; jnb =>trap_label.0
+                ; ret:
+                );
+
+                ValueLocation::Reg(temp)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn i32_truncate_f32_u(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                (f32::from_bits(imm.as_f32().unwrap().to_bits()) as i32).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_temp_register(F32, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let temp = self.take_reg(I32).unwrap();
+
+                let sign_mask = self.aligned_label(4, LabelValue::I32(SIGN_MASK_F32 as i32));
+                let float_cmp_mask =
+                    self.aligned_label(16, LabelValue::I32(0x4F00_0000_u32 as i32));
+                let trap_label = self.trap_label();
+
+                dynasm!(self.asm
+                    ; ucomiss Rx(reg.rx().unwrap()), [=>float_cmp_mask.0]
+                    ; jae >else_
+                    ; jp =>trap_label.0
+                    ; cvttss2si Rd(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; test Rd(temp.rq().unwrap()), Rd(temp.rq().unwrap())
+                    ; js =>trap_label.0
+                    ; jmp >ret
+                ; else_:
+                    ; subss Rx(reg.rx().unwrap()), [=>float_cmp_mask.0]
+                    ; cvttss2si Rd(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; test Rd(temp.rq().unwrap()), Rd(temp.rq().unwrap())
+                    ; js =>trap_label.0
+                    ; add Rq(temp.rq().unwrap()), [=>sign_mask.0]
+                ; ret:
+                );
+
+                ValueLocation::Reg(temp)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn i32_truncate_f64_s(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                (f64::from_bits(imm.as_f64().unwrap().to_bits()) as i32).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_register(F32, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let temp = self.take_reg(I32).unwrap();
+
+                let sign_mask = self.aligned_label(4, LabelValue::I32(SIGN_MASK_F32 as i32));
+                let float_cmp_mask =
+                    self.aligned_label(16, LabelValue::I64(0xC1E0_0000_0020_0000_u64 as i64));
+                let zero = self.aligned_label(16, LabelValue::I64(0));
+                let trap_label = self.trap_label();
+
+                dynasm!(self.asm
+                    ; cvttsd2si Rd(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; cmp Rd(temp.rq().unwrap()), [=>sign_mask.0]
+                    ; jne >ret
+                    ; ucomisd Rx(reg.rx().unwrap()), Rx(reg.rx().unwrap())
+                    ; jp =>trap_label.0
+                    ; ucomisd Rx(reg.rx().unwrap()), [=>float_cmp_mask.0]
+                    ; jna =>trap_label.0
+                    ; ucomisd Rx(reg.rx().unwrap()), [=>zero.0]
+                    ; jnb =>trap_label.0
+                ; ret:
+                );
+
+                ValueLocation::Reg(temp)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn i32_truncate_f64_u(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                (f64::from_bits(imm.as_f64().unwrap().to_bits()) as u32).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_temp_register(F32, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let temp = self.take_reg(I32).unwrap();
+
+                let sign_mask = self.aligned_label(4, LabelValue::I32(SIGN_MASK_F32 as i32));
+                let float_cmp_mask =
+                    self.aligned_label(16, LabelValue::I64(0x41E0_0000_0000_0000_u64 as i64));
+                let trap_label = self.trap_label();
+
+                dynasm!(self.asm
+                    ; ucomisd Rx(reg.rx().unwrap()), [=>float_cmp_mask.0]
+                    ; jae >else_
+                    ; jp =>trap_label.0
+                    ; cvttsd2si Rd(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; test Rd(temp.rq().unwrap()), Rd(temp.rq().unwrap())
+                    ; js =>trap_label.0
+                    ; jmp >ret
+                ; else_:
+                    ; subsd Rx(reg.rx().unwrap()), [=>float_cmp_mask.0]
+                    ; cvttsd2si Rd(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; test Rd(temp.rq().unwrap()), Rd(temp.rq().unwrap())
+                    ; js =>trap_label.0
+                    ; add Rq(temp.rq().unwrap()), [=>sign_mask.0]
+                ; ret:
+                );
+
+                ValueLocation::Reg(temp)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    conversion!(
+        f32_convert_from_i32_s,
+        cvtsi2ss,
+        Rd,
+        rq,
+        Rx,
+        rx,
+        i32,
+        f32,
+        as_i32,
+        |a| Ieee32::from_bits((a as f32).to_bits())
+    );
+    conversion!(
+        f64_convert_from_i32_s,
+        cvtsi2sd,
+        Rd,
+        rq,
+        Rx,
+        rx,
+        i32,
+        f64,
+        as_i32,
+        |a| Ieee64::from_bits((a as f64).to_bits())
+    );
+    conversion!(
+        f32_convert_from_i64_s,
+        cvtsi2ss,
+        Rq,
+        rq,
+        Rx,
+        rx,
+        i64,
+        f32,
+        as_i64,
+        |a| Ieee32::from_bits((a as f32).to_bits())
+    );
+    conversion!(
+        f64_convert_from_i64_s,
+        cvtsi2sd,
+        Rq,
+        rq,
+        Rx,
+        rx,
+        i64,
+        f64,
+        as_i64,
+        |a| Ieee64::from_bits((a as f64).to_bits())
+    );
+
+    pub fn i64_truncate_f32_s(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                (f32::from_bits(imm.as_f32().unwrap().to_bits()) as i64).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_temp_register(F32, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let temp = self.take_reg(I32).unwrap();
+
+                let sign_mask = self.aligned_label(16, LabelValue::I64(SIGN_MASK_F64 as i64));
+                let float_cmp_mask =
+                    self.aligned_label(16, LabelValue::I32(0xDF00_0000_u32 as i32));
+                let zero = self.aligned_label(16, LabelValue::I64(0));
+                let trap_label = self.trap_label();
+
+                dynasm!(self.asm
+                    ; cvttss2si Rq(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; cmp Rq(temp.rq().unwrap()), [=>sign_mask.0]
+                    ; jne >ret
+                    ; ucomiss Rx(reg.rx().unwrap()), Rx(reg.rx().unwrap())
+                    ; jp =>trap_label.0
+                    ; ucomiss Rx(reg.rx().unwrap()), [=>float_cmp_mask.0]
+                    ; jnae =>trap_label.0
+                    ; ucomiss Rx(reg.rx().unwrap()), [=>zero.0]
+                    ; jnb =>trap_label.0
+                ; ret:
+                );
+
+                ValueLocation::Reg(temp)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn i64_truncate_f64_s(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                (f64::from_bits(imm.as_f64().unwrap().to_bits()) as i64).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_register(F32, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let temp = self.take_reg(I32).unwrap();
+
+                let sign_mask = self.aligned_label(8, LabelValue::I64(SIGN_MASK_F64 as i64));
+                let float_cmp_mask =
+                    self.aligned_label(16, LabelValue::I64(0xC3E0_0000_0000_0000_u64 as i64));
+                let zero = self.aligned_label(16, LabelValue::I64(0));
+                let trap_label = self.trap_label();
+
+                dynasm!(self.asm
+                    ; cvttsd2si Rq(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; cmp Rq(temp.rq().unwrap()), [=>sign_mask.0]
+                    ; jne >ret
+                    ; ucomisd Rx(reg.rx().unwrap()), Rx(reg.rx().unwrap())
+                    ; jp =>trap_label.0
+                    ; ucomisd Rx(reg.rx().unwrap()), [=>float_cmp_mask.0]
+                    ; jnae =>trap_label.0
+                    ; ucomisd Rx(reg.rx().unwrap()), [=>zero.0]
+                    ; jnb =>trap_label.0
+                ; ret:
+                );
+
+                ValueLocation::Reg(temp)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn i64_truncate_f32_u(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                (f32::from_bits(imm.as_f32().unwrap().to_bits()) as u64).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_register(F32, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let temp = self.take_reg(I64).unwrap();
+                let sign_mask = self.aligned_label(16, LabelValue::I64(SIGN_MASK_F64 as i64));
+                let u64_trunc_f32_const = self.aligned_label(16, LabelValue::I32(0x5F00_0000_i32));
+                let trap_label = self.trap_label();
+
+                dynasm!(self.asm
+                    ; comiss Rx(reg.rx().unwrap()), [=>u64_trunc_f32_const.0]
+                    ; jae >large
+                    ; jp =>trap_label.0
+                    ; cvttss2si Rq(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; test Rq(temp.rq().unwrap()), Rq(temp.rq().unwrap())
+                    ; js =>trap_label.0
+                    ; jmp >cont
+                ; large:
+                    ; subss Rx(reg.rx().unwrap()), [=>u64_trunc_f32_const.0]
+                    ; cvttss2si Rq(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; test Rq(temp.rq().unwrap()), Rq(temp.rq().unwrap())
+                    ; js =>trap_label.0
+                    ; add Rq(temp.rq().unwrap()), [=>sign_mask.0]
+                ; cont:
+                );
+
+                ValueLocation::Reg(temp)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn i64_truncate_f64_u(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                (f64::from_bits(imm.as_f64().unwrap().to_bits()) as u64).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_register(F64, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let temp = self.take_reg(I64).unwrap();
+
+                let sign_mask = self.aligned_label(16, LabelValue::I64(SIGN_MASK_F64 as i64));
+                let u64_trunc_f64_const =
+                    self.aligned_label(16, LabelValue::I64(0x43E0_0000_0000_0000_i64));
+                let trap_label = self.trap_label();
+
+                dynasm!(self.asm
+                    ; comisd Rx(reg.rx().unwrap()), [=>u64_trunc_f64_const.0]
+                    ; jnb >large
+                    ; jp =>trap_label.0
+                    ; cvttsd2si Rq(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; cmp Rq(temp.rq().unwrap()), 0
+                    ; jge >cont
+                    ; jmp =>trap_label.0
+                ; large:
+                    ; subsd Rx(reg.rx().unwrap()), [=>u64_trunc_f64_const.0]
+                    ; cvttsd2si Rq(temp.rq().unwrap()), Rx(reg.rx().unwrap())
+                    ; cmp Rq(temp.rq().unwrap()), 0
+                    ; jnge =>trap_label.0
+                    ; add Rq(temp.rq().unwrap()), [=>sign_mask.0]
+                ; cont:
+                );
+
+                ValueLocation::Reg(temp)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn f32_convert_from_i32_u(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                Ieee32::from_bits((imm.as_i32().unwrap() as u32 as f32).to_bits()).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_register(I32, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let temp = self.take_reg(F32).unwrap();
+
+                dynasm!(self.asm
+                    ; mov Rd(reg.rq().unwrap()), Rd(reg.rq().unwrap())
+                    ; cvtsi2ss Rx(temp.rx().unwrap()), Rq(reg.rq().unwrap())
+                );
+
+                ValueLocation::Reg(temp)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn f64_convert_from_i32_u(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                Ieee64::from_bits((imm.as_i32().unwrap() as u32 as f64).to_bits()).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_register(I32, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let temp = self.take_reg(F64).unwrap();
+
+                dynasm!(self.asm
+                    ; mov Rd(reg.rq().unwrap()), Rd(reg.rq().unwrap())
+                    ; cvtsi2sd Rx(temp.rx().unwrap()), Rq(reg.rq().unwrap())
+                );
+
+                ValueLocation::Reg(temp)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn f32_convert_from_i64_u(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                Ieee32::from_bits((imm.as_i64().unwrap() as u64 as f32).to_bits()).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_register(I64, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let out = self.take_reg(F32).unwrap();
+                let temp = self.take_reg(I64).unwrap();
+
+                dynasm!(self.asm
+                    ; test Rq(reg.rq().unwrap()), Rq(reg.rq().unwrap())
+                    ; js >negative
+                    ; cvtsi2ss Rx(out.rx().unwrap()), Rq(reg.rq().unwrap())
+                    ; jmp >ret
+                ; negative:
+                    ; mov Rq(temp.rq().unwrap()), Rq(reg.rq().unwrap())
+                    ; shr Rq(temp.rq().unwrap()), 1
+                    ; and Rq(reg.rq().unwrap()), 1
+                    ; or Rq(reg.rq().unwrap()), Rq(temp.rq().unwrap())
+                    ; cvtsi2ss Rx(out.rx().unwrap()), Rq(reg.rq().unwrap())
+                    ; addss Rx(out.rx().unwrap()), Rx(out.rx().unwrap())
+                ; ret:
+                );
+
+                self.free_value(ValueLocation::Reg(temp))?;
+
+                ValueLocation::Reg(out)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn f64_convert_from_i64_u(&mut self) -> Result<(), Error> {
+        let mut val = self.pop()?;
+
+        let out_val = match val {
+            ValueLocation::Immediate(imm) => ValueLocation::Immediate(
+                Ieee64::from_bits((imm.as_i64().unwrap() as u64 as f64).to_bits()).into(),
+            ),
+            _ => {
+                let reg = match self.put_into_register(I64, &mut val) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let out = self.take_reg(F32).unwrap();
+                let temp = self.take_reg(I64).unwrap();
+
+                dynasm!(self.asm
+                    ; test Rq(reg.rq().unwrap()), Rq(reg.rq().unwrap())
+                    ; js >negative
+                    ; cvtsi2sd Rx(out.rx().unwrap()), Rq(reg.rq().unwrap())
+                    ; jmp >ret
+                ; negative:
+                    ; mov Rq(temp.rq().unwrap()), Rq(reg.rq().unwrap())
+                    ; shr Rq(temp.rq().unwrap()), 1
+                    ; and Rq(reg.rq().unwrap()), 1
+                    ; or Rq(reg.rq().unwrap()), Rq(temp.rq().unwrap())
+                    ; cvtsi2sd Rx(out.rx().unwrap()), Rq(reg.rq().unwrap())
+                    ; addsd Rx(out.rx().unwrap()), Rx(out.rx().unwrap())
+                ; ret:
+                );
+
+                self.free_value(ValueLocation::Reg(temp))?;
+
+                ValueLocation::Reg(out)
+            }
+        };
+
+        self.free_value(val)?;
+
+        self.push(out_val)?;
+        Ok(())
+    }
+
+    pub fn i32_wrap_from_i64(&mut self) -> Result<(), Error> {
+        let val = self.pop()?;
+
+        let out = match val {
+            ValueLocation::Immediate(imm) => {
+                ValueLocation::Immediate((imm.as_i64().unwrap() as u64 as u32).into())
+            }
+            val => val,
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn i32_reinterpret_from_f32(&mut self) -> Result<(), Error> {
+        let val = self.pop()?;
+
+        let out = match val {
+            ValueLocation::Immediate(imm) => {
+                ValueLocation::Immediate(imm.as_f32().unwrap().to_bits().into())
+            }
+            val => val,
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn i64_reinterpret_from_f64(&mut self) -> Result<(), Error> {
+        let val = self.pop()?;
+
+        let out = match val {
+            ValueLocation::Immediate(imm) => {
+                ValueLocation::Immediate(imm.as_f64().unwrap().to_bits().into())
+            }
+            val => val,
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn f32_reinterpret_from_i32(&mut self) -> Result<(), Error> {
+        let val = self.pop()?;
+
+        let out = match val {
+            ValueLocation::Immediate(imm) => {
+                ValueLocation::Immediate(Ieee32::from_bits(imm.as_i32().unwrap() as _).into())
+            }
+            val => val,
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    pub fn f64_reinterpret_from_i64(&mut self) -> Result<(), Error> {
+        let val = self.pop()?;
+
+        let out = match val {
+            ValueLocation::Immediate(imm) => {
+                ValueLocation::Immediate(Ieee64::from_bits(imm.as_i64().unwrap() as _).into())
+            }
+            val => val,
+        };
+
+        self.push(out)?;
+        Ok(())
+    }
+
+    unop!(i64_popcnt, popcnt, Rq, u64, |a: u64| a.count_ones() as u64);
+
+    // TODO: Use `lea` when the LHS operand isn't a temporary but both of the operands
+    //       are in registers.
+    commutative_binop_i32!(i32_add, add, i32::wrapping_add);
+    commutative_binop_i32!(i32_and, and, |a, b| a & b);
+    commutative_binop_i32!(i32_or, or, |a, b| a | b);
+    commutative_binop_i32!(i32_xor, xor, |a, b| a ^ b);
+    binop_i32!(i32_sub, sub, i32::wrapping_sub);
+
+    commutative_binop_i64!(i64_add, add, i64::wrapping_add);
+    commutative_binop_i64!(i64_and, and, |a, b| a & b);
+    commutative_binop_i64!(i64_or, or, |a, b| a | b);
+    commutative_binop_i64!(i64_xor, xor, |a, b| a ^ b);
+    binop_i64!(i64_sub, sub, i64::wrapping_sub);
+
+    commutative_binop_f32!(f32_add, addss, |a, b| a + b);
+    commutative_binop_f32!(f32_mul, mulss, |a, b| a * b);
+    minmax_float!(
+        f32_min,
+        minss,
+        ucomiss,
+        addss,
+        orps,
+        as_f32,
+        |a: Ieee32, b: Ieee32| Ieee32::from_bits(
+            f32::from_bits(a.to_bits())
+                .min(f32::from_bits(b.to_bits()))
+                .to_bits()
+        )
+    );
+    minmax_float!(
+        f32_max,
+        maxss,
+        ucomiss,
+        addss,
+        andps,
+        as_f32,
+        |a: Ieee32, b: Ieee32| Ieee32::from_bits(
+            f32::from_bits(a.to_bits())
+                .max(f32::from_bits(b.to_bits()))
+                .to_bits()
+        )
+    );
+    binop_f32!(f32_sub, subss, |a, b| a - b);
+    binop_f32!(f32_div, divss, |a, b| a / b);
+
+    pub fn f32_ceil(&mut self) -> Result<(), Error> {
+        self.relocated_function_call(
+            &ir::ExternalName::LibCall(ir::LibCall::CeilF32),
+            iter::once(F32),
+            iter::once(F32),
+            true,
+        )?;
+        Ok(())
+    }
+
+    pub fn f32_floor(&mut self) -> Result<(), Error> {
+        self.relocated_function_call(
+            &ir::ExternalName::LibCall(ir::LibCall::FloorF32),
+            iter::once(F32),
+            iter::once(F32),
+            true,
+        )?;
+        Ok(())
+    }
+
+    pub fn f32_nearest(&mut self) -> Result<(), Error> {
+        self.relocated_function_call(
+            &ir::ExternalName::LibCall(ir::LibCall::NearestF32),
+            iter::once(F32),
+            iter::once(F32),
+            true,
+        )?;
+        Ok(())
+    }
+
+    pub fn f32_trunc(&mut self) -> Result<(), Error> {
+        self.relocated_function_call(
+            &ir::ExternalName::LibCall(ir::LibCall::TruncF32),
+            iter::once(F32),
+            iter::once(F32),
+            true,
+        )?;
+        Ok(())
+    }
+
+    commutative_binop_f64!(f64_add, addsd, |a, b| a + b);
+    commutative_binop_f64!(f64_mul, mulsd, |a, b| a * b);
+    minmax_float!(
+        f64_min,
+        minsd,
+        ucomisd,
+        addsd,
+        orpd,
+        as_f64,
+        |a: Ieee64, b: Ieee64| Ieee64::from_bits(
+            f64::from_bits(a.to_bits())
+                .min(f64::from_bits(b.to_bits()))
+                .to_bits()
+        )
+    );
+    minmax_float!(
+        f64_max,
+        maxsd,
+        ucomisd,
+        addsd,
+        andpd,
+        as_f64,
+        |a: Ieee64, b: Ieee64| Ieee64::from_bits(
+            f64::from_bits(a.to_bits())
+                .max(f64::from_bits(b.to_bits()))
+                .to_bits()
+        )
+    );
+    binop_f64!(f64_sub, subsd, |a, b| a - b);
+    binop_f64!(f64_div, divsd, |a, b| a / b);
+
+    pub fn f64_ceil(&mut self) -> Result<(), Error> {
+        self.relocated_function_call(
+            &ir::ExternalName::LibCall(ir::LibCall::CeilF64),
+            iter::once(F64),
+            iter::once(F64),
+            true,
+        )?;
+        Ok(())
+    }
+
+    pub fn f64_floor(&mut self) -> Result<(), Error> {
+        self.relocated_function_call(
+            &ir::ExternalName::LibCall(ir::LibCall::FloorF64),
+            iter::once(F64),
+            iter::once(F64),
+            true,
+        )?;
+        Ok(())
+    }
+
+    pub fn f64_nearest(&mut self) -> Result<(), Error> {
+        self.relocated_function_call(
+            &ir::ExternalName::LibCall(ir::LibCall::NearestF64),
+            iter::once(F64),
+            iter::once(F64),
+            true,
+        )?;
+        Ok(())
+    }
+
+    pub fn f64_trunc(&mut self) -> Result<(), Error> {
+        self.relocated_function_call(
+            &ir::ExternalName::LibCall(ir::LibCall::TruncF64),
+            iter::once(F64),
+            iter::once(F64),
+            true,
+        )?;
+        Ok(())
+    }
+
+    shift!(
+        i32_shl,
+        Rd,
+        shl,
+        |a, b| (a as i32).wrapping_shl(b as _),
+        I32
+    );
+    shift!(
+        i32_shr_s,
+        Rd,
+        sar,
+        |a, b| (a as i32).wrapping_shr(b as _),
+        I32
+    );
+    shift!(
+        i32_shr_u,
+        Rd,
+        shr,
+        |a, b| (a as u32).wrapping_shr(b as _),
+        I32
+    );
+    shift!(
+        i32_rotl,
+        Rd,
+        rol,
+        |a, b| (a as u32).rotate_left(b as _),
+        I32
+    );
+    shift!(
+        i32_rotr,
+        Rd,
+        ror,
+        |a, b| (a as u32).rotate_right(b as _),
+        I32
+    );
+
+    shift!(
+        i64_shl,
+        Rq,
+        shl,
+        |a, b| (a as i64).wrapping_shl(b as _),
+        I64
+    );
+    shift!(
+        i64_shr_s,
+        Rq,
+        sar,
+        |a, b| (a as i64).wrapping_shr(b as _),
+        I64
+    );
+    shift!(
+        i64_shr_u,
+        Rq,
+        shr,
+        |a, b| (a as u64).wrapping_shr(b as _),
+        I64
+    );
+    shift!(
+        i64_rotl,
+        Rq,
+        rol,
+        |a, b| (a as u64).rotate_left(b as _),
+        I64
+    );
+    shift!(
+        i64_rotr,
+        Rq,
+        ror,
+        |a, b| (a as u64).rotate_right(b as _),
+        I64
+    );
+
+    // TODO: Do this without emitting `mov`
+    fn cleanup_gprs(&mut self, gprs: impl Iterator<Item = GPR>) {
+        for gpr in gprs {
+            dynasm!(self.asm
+                ; pop Rq(gpr.rq().unwrap())
+            );
+            self.block_state.depth.free(1);
+            // DON'T MARK IT USED HERE! See comment in `full_div`
+        }
+    }
+
+    int_div!(
+        i32_full_div_s,
+        i32_full_div_u,
+        i32_div_u,
+        i32_div_s,
+        i32_rem_u,
+        i32_rem_s,
+        imm_i32,
+        i32,
+        u32,
+        Rd,
+        DWORD
+    );
+    int_div!(
+        i64_full_div_s,
+        i64_full_div_u,
+        i64_div_u,
+        i64_div_s,
+        i64_rem_u,
+        i64_rem_s,
+        imm_i64,
+        i64,
+        u64,
+        Rq,
+        QWORD
+    );
+
+    // TODO: With a proper SSE-like "Value" system we could do this way better (we wouldn't have
+    //       to move `RAX`/`RDX` back afterwards).
+    fn full_div(
+        &mut self,
+        mut divisor: ValueLocation,
+        dividend: ValueLocation,
+        do_div: impl FnOnce(&mut Self, &mut ValueLocation) -> Result<(), Error>,
+    ) -> Result<
+        (
+            ValueLocation,
+            ValueLocation,
+            impl Iterator<Item = GPR> + Clone + 'this,
+        ),
+        Error,
+    > {
+        // To stop `take_reg` from allocating either of these necessary registers
+        self.block_state.regs.mark_used(RAX);
+        self.block_state.regs.mark_used(RDX);
+        if divisor == ValueLocation::Reg(RAX) || divisor == ValueLocation::Reg(RDX) {
+            let new_reg = self.take_reg(GPRType::Rq).unwrap();
+            self.copy_value(divisor, CCLoc::Reg(new_reg))?;
+            self.free_value(divisor)?;
+
+            divisor = ValueLocation::Reg(new_reg);
+        }
+        self.block_state.regs.release(RAX)?;
+        self.block_state.regs.release(RDX)?;
+
+        let saved_rax = if self.block_state.regs.is_free(RAX) {
+            None
+        } else {
+            dynasm!(self.asm
+                ; push rax
+            );
+            self.block_state.depth.reserve(1);
+            // DON'T FREE THIS REGISTER HERE - since we don't
+            // remove it from the stack freeing the register
+            // here will cause `take_reg` to allocate it.
+            Some(())
+        };
+
+        let saved_rdx = if self.block_state.regs.is_free(RDX) {
+            None
+        } else {
+            dynasm!(self.asm
+                ; push rdx
+            );
+            self.block_state.depth.reserve(1);
+            // DON'T FREE THIS REGISTER HERE - since we don't
+            // remove it from the stack freeing the register
+            // here will cause `take_reg` to allocate it.
+            Some(())
+        };
+
+        let saved = saved_rdx
+            .map(|_| RDX)
+            .into_iter()
+            .chain(saved_rax.map(|_| RAX));
+
+        self.copy_value(dividend, CCLoc::Reg(RAX))?;
+        self.block_state.regs.mark_used(RAX);
+
+        self.free_value(dividend)?;
+        // To stop `take_reg` from allocating either of these necessary registers
+        self.block_state.regs.mark_used(RDX);
+
+        do_div(self, &mut divisor)?;
+        self.free_value(divisor)?;
+
+        if self.block_state.regs.is_free(RAX) {
+            return Err(Error::Microwasm("full_div: RAX is not free".to_string()));
+        }
+        if self.block_state.regs.is_free(RDX) {
+            return Err(Error::Microwasm("full_div: RDX is not free".to_string()));
+        }
+
+        Ok((ValueLocation::Reg(RAX), ValueLocation::Reg(RDX), saved))
+    }
+
+    fn i32_full_div_u(
+        &mut self,
+        divisor: ValueLocation,
+        dividend: ValueLocation,
+    ) -> Result<
+        (
+            ValueLocation,
+            ValueLocation,
+            impl Iterator<Item = GPR> + Clone + 'this,
+        ),
+        Error,
+    > {
+        self.full_div(divisor, dividend, |this, divisor| match divisor {
+            ValueLocation::Stack(offset) => {
+                let offset = this.adjusted_offset(*offset);
+                dynasm!(this.asm
+                    ; xor edx, edx
+                    ; div DWORD [rsp + offset]
+                );
+                Ok(())
+            }
+            ValueLocation::Immediate(_) | ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                let r = match this.put_into_register(I32, divisor) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                dynasm!(this.asm
+                    ; xor edx, edx
+                    ; div Rd(r.rq().unwrap())
+                );
+                Ok(())
+            }
+        })
+    }
+
+    fn i32_full_div_s(
+        &mut self,
+        divisor: ValueLocation,
+        dividend: ValueLocation,
+    ) -> Result<
+        (
+            ValueLocation,
+            ValueLocation,
+            impl Iterator<Item = GPR> + Clone + 'this,
+        ),
+        Error,
+    > {
+        self.full_div(divisor, dividend, |this, divisor| match divisor {
+            ValueLocation::Stack(offset) => {
+                let offset = this.adjusted_offset(*offset);
+                dynasm!(this.asm
+                    ; cdq
+                    ; idiv DWORD [rsp + offset]
+                );
+                Ok(())
+            }
+            ValueLocation::Immediate(_) | ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                let r = match this.put_into_register(I32, divisor) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                dynasm!(this.asm
+                    ; cdq
+                    ; idiv Rd(r.rq().unwrap())
+                );
+                Ok(())
+            }
+        })
+    }
+
+    fn i64_full_div_u(
+        &mut self,
+        divisor: ValueLocation,
+        dividend: ValueLocation,
+    ) -> Result<
+        (
+            ValueLocation,
+            ValueLocation,
+            impl Iterator<Item = GPR> + Clone + 'this,
+        ),
+        Error,
+    > {
+        self.full_div(divisor, dividend, |this, divisor| match divisor {
+            ValueLocation::Stack(offset) => {
+                let offset = this.adjusted_offset(*offset);
+                dynasm!(this.asm
+                    ; xor rdx, rdx
+                    ; div QWORD [rsp + offset]
+                );
+                Ok(())
+            }
+            ValueLocation::Immediate(_) | ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                let r = match this.put_into_register(I64, divisor) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+                dynasm!(this.asm
+                    ; xor rdx, rdx
+                    ; div Rq(r.rq().unwrap())
+                );
+                Ok(())
+            }
+        })
+    }
+
+    fn i64_full_div_s(
+        &mut self,
+        divisor: ValueLocation,
+        dividend: ValueLocation,
+    ) -> Result<
+        (
+            ValueLocation,
+            ValueLocation,
+            impl Iterator<Item = GPR> + Clone + 'this,
+        ),
+        Error,
+    > {
+        self.full_div(divisor, dividend, |this, divisor| match divisor {
+            ValueLocation::Stack(offset) => {
+                let offset = this.adjusted_offset(*offset);
+                dynasm!(this.asm
+                    ; cqo
+                    ; idiv QWORD [rsp + offset]
+                );
+                Ok(())
+            }
+            ValueLocation::Immediate(_) | ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                let r = match this.put_into_register(I64, divisor) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                dynasm!(this.asm
+                    ; cqo
+                    ; idiv Rq(r.rq().unwrap())
+                );
+                Ok(())
+            }
+        })
+    }
+
+    // `i32_mul` needs to be separate because the immediate form of the instruction
+    // has a different syntax to the immediate form of the other instructions.
+    pub fn i32_mul(&mut self) -> Result<(), Error> {
+        let right = self.pop()?;
+        let left = self.pop()?;
+
+        if let Some(right) = right.immediate() {
+            if let Some(left) = left.immediate() {
+                self.push(ValueLocation::Immediate(
+                    i32::wrapping_mul(right.as_i32().unwrap(), left.as_i32().unwrap()).into(),
+                ))?;
+                return Ok(());
+            }
+        }
+
+        let (mut left, mut right) = match left {
+            ValueLocation::Reg(_) => (left, right),
+            _ => {
+                if right.immediate().is_some() {
+                    (left, right)
+                } else {
+                    (right, left)
+                }
+            }
+        };
+
+        let out = match right {
+            ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                let rreg = match self.put_into_register(I32, &mut right) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+                let lreg = match self.put_into_temp_register(I32, &mut left) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                dynasm!(self.asm
+                    ; imul Rd(lreg.rq().unwrap()), Rd(rreg.rq().unwrap())
+                );
+                left
+            }
+            ValueLocation::Stack(offset) => {
+                let offset = self.adjusted_offset(offset);
+
+                let lreg = match self.put_into_temp_register(I32, &mut left) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                dynasm!(self.asm
+                    ; imul Rd(lreg.rq().unwrap()), [rsp + offset]
+                );
+                left
+            }
+            ValueLocation::Immediate(i) => {
+                let lreg = match self.put_into_register(I32, &mut left) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                let new_reg = self.take_reg(I32).unwrap();
+                dynasm!(self.asm
+                    ; imul Rd(new_reg.rq().unwrap()), Rd(lreg.rq().unwrap()), i.as_i32().unwrap()
+                );
+                self.free_value(left)?;
+                ValueLocation::Reg(new_reg)
+            }
+        };
+
+        self.push(out)?;
+        self.free_value(right)?;
+        Ok(())
+    }
+
+    // `i64_mul` needs to be separate because the immediate form of the instruction
+    // has a different syntax to the immediate form of the other instructions.
+    pub fn i64_mul(&mut self) -> Result<(), Error> {
+        let right = self.pop()?;
+        let left = self.pop()?;
+
+        if let Some(right) = right.immediate() {
+            if let Some(left) = left.immediate() {
+                self.push(ValueLocation::Immediate(
+                    i64::wrapping_mul(right.as_i64().unwrap(), left.as_i64().unwrap()).into(),
+                ))?;
+                return Ok(());
+            }
+        }
+
+        let (mut left, mut right) = match left {
+            ValueLocation::Reg(_) => (left, right),
+            _ => {
+                if right.immediate().is_some() {
+                    (left, right)
+                } else {
+                    (right, left)
+                }
+            }
+        };
+
+        let out = match right {
+            ValueLocation::Reg(_) | ValueLocation::Cond(_) => {
+                let rreg = match self.put_into_register(I64, &mut right) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+                let lreg = match self.put_into_temp_register(I64, &mut left) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                dynasm!(self.asm
+                    ; imul Rq(lreg.rq().unwrap()), Rq(rreg.rq().unwrap())
+                );
+                left
+            }
+            ValueLocation::Stack(offset) => {
+                let offset = self.adjusted_offset(offset);
+
+                let lreg = match self.put_into_temp_register(I64, &mut left) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+
+                dynasm!(self.asm
+                    ; imul Rq(lreg.rq().unwrap()), [rsp + offset]
+                );
+                left
+            }
+            ValueLocation::Immediate(i) => {
+                let i = i.as_i64().unwrap();
+                if let Ok(i) = i.try_into() {
+                    let new_reg = self.take_reg(I64).unwrap();
+
+                    let lreg = match self.put_into_register(I64, &mut left) {
+                        Err(e) => return Err(e),
+                        Ok(o) => o.unwrap(),
+                    };
+
+                    dynasm!(self.asm
+                        ; imul Rq(new_reg.rq().unwrap()), Rq(lreg.rq().unwrap()), i
+                    );
+
+                    self.free_value(left)?;
+
+                    ValueLocation::Reg(new_reg)
+                } else {
+                    let rreg = match self.put_into_register(I64, &mut right) {
+                        Err(e) => return Err(e),
+                        Ok(o) => o.unwrap(),
+                    };
+                    let lreg = match self.put_into_temp_register(I64, &mut left) {
+                        Err(e) => return Err(e),
+                        Ok(o) => o.unwrap(),
+                    };
+
+                    dynasm!(self.asm
+                        ; imul Rq(lreg.rq().unwrap()), Rq(rreg.rq().unwrap())
+                    );
+                    left
+                }
+            }
+        };
+
+        self.push(out)?;
+        self.free_value(right)?;
+        Ok(())
+    }
+
+    fn cmov(&mut self, cond_code: CondCode, dst: GPR, src: CCLoc) {
+        match src {
+            CCLoc::Reg(reg) => match cond_code {
+                cc::EQUAL => {
+                    dynasm!(self.asm
+                        ; cmove Rq(dst.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                }
+                cc::NOT_EQUAL => {
+                    dynasm!(self.asm
+                        ; cmovne Rq(dst.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                }
+                cc::GE_U => {
+                    dynasm!(self.asm
+                        ; cmovae Rq(dst.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                }
+                cc::LT_U => {
+                    dynasm!(self.asm
+                        ; cmovb Rq(dst.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                }
+                cc::GT_U => {
+                    dynasm!(self.asm
+                        ; cmova Rq(dst.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                }
+                cc::LE_U => {
+                    dynasm!(self.asm
+                        ; cmovbe Rq(dst.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                }
+                cc::GE_S => {
+                    dynasm!(self.asm
+                        ; cmovge Rq(dst.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                }
+                cc::LT_S => {
+                    dynasm!(self.asm
+                        ; cmovl Rq(dst.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                }
+                cc::GT_S => {
+                    dynasm!(self.asm
+                        ; cmovg Rq(dst.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                }
+                cc::LE_S => {
+                    dynasm!(self.asm
+                        ; cmovle Rq(dst.rq().unwrap()), Rq(reg.rq().unwrap())
+                    );
+                }
+            },
+            CCLoc::Stack(offset) => {
+                let offset = self.adjusted_offset(offset);
+
+                match cond_code {
+                    cc::EQUAL => {
+                        dynasm!(self.asm
+                            ; cmove Rq(dst.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                    cc::NOT_EQUAL => {
+                        dynasm!(self.asm
+                            ; cmovne Rq(dst.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                    cc::GE_U => {
+                        dynasm!(self.asm
+                            ; cmovae Rq(dst.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                    cc::LT_U => {
+                        dynasm!(self.asm
+                            ; cmovb Rq(dst.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                    cc::GT_U => {
+                        dynasm!(self.asm
+                            ; cmova Rq(dst.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                    cc::LE_U => {
+                        dynasm!(self.asm
+                            ; cmovbe Rq(dst.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                    cc::GE_S => {
+                        dynasm!(self.asm
+                            ; cmovge Rq(dst.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                    cc::LT_S => {
+                        dynasm!(self.asm
+                            ; cmovl Rq(dst.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                    cc::GT_S => {
+                        dynasm!(self.asm
+                            ; cmovg Rq(dst.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                    cc::LE_S => {
+                        dynasm!(self.asm
+                            ; cmovle Rq(dst.rq().unwrap()), [rsp + offset]
+                        );
+                    }
+                }
+            }
+        }
+    }
+
+    pub fn select(&mut self) -> Result<(), Error> {
+        let mut cond = self.pop()?;
+        let mut else_ = self.pop()?;
+        let mut then = self.pop()?;
+
+        if let ValueLocation::Immediate(i) = cond {
+            if i.as_i32().unwrap() == 0 {
+                self.free_value(then)?;
+                self.push(else_)?;
+            } else {
+                self.free_value(else_)?;
+                self.push(then)?;
+            }
+
+            return Ok(());
+        }
+
+        let cond_code = match cond {
+            ValueLocation::Cond(cc) => cc,
+            _ => {
+                let cond_reg = match self.put_into_register(I32, &mut cond) {
+                    Err(e) => return Err(e),
+                    Ok(o) => o.unwrap(),
+                };
+                dynasm!(self.asm
+                    ; test Rd(cond_reg.rq().unwrap()), Rd(cond_reg.rq().unwrap())
+                );
+                self.free_value(cond)?;
+
+                cc::NOT_EQUAL
+            }
+        };
+
+        let else_ = if let ValueLocation::Stack(offset) = else_ {
+            CCLoc::Stack(offset)
+        } else {
+            let gpr = match self.put_into_register(I32, &mut else_) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+            CCLoc::Reg(gpr)
+        };
+
+        let then = if let ValueLocation::Stack(offset) = then {
+            CCLoc::Stack(offset)
+        } else {
+            let gpr = match self.put_into_register(I32, &mut then) {
+                Err(e) => return Err(e),
+                Ok(o) => o.unwrap(),
+            };
+            CCLoc::Reg(gpr)
+        };
+
+        let out_gpr = match (then, else_) {
+            (CCLoc::Reg(then_reg), else_) if self.block_state.regs.num_usages(then_reg) <= 1 => {
+                self.cmov(!cond_code, then_reg, else_);
+                self.free_value(else_.into())?;
+
+                then_reg
+            }
+            (then, CCLoc::Reg(else_reg)) if self.block_state.regs.num_usages(else_reg) <= 1 => {
+                self.cmov(cond_code, else_reg, then);
+                self.free_value(then.into())?;
+
+                else_reg
+            }
+            (then, else_) => {
+                let out = self.take_reg(GPRType::Rq).unwrap();
+                self.copy_value(else_.into(), CCLoc::Reg(out))?;
+                self.cmov(cond_code, out, then);
+
+                self.free_value(then.into())?;
+                self.free_value(else_.into())?;
+
+                out
+            }
+        };
+
+        self.push(ValueLocation::Reg(out_gpr))?;
+        Ok(())
+    }
+
+    pub fn pick(&mut self, depth: u32) {
+        let idx = self.block_state.stack.len() - 1 - depth as usize;
+        let v = self.block_state.stack[idx];
+        if let ValueLocation::Reg(r) = v {
+            self.block_state.regs.mark_used(r);
+        }
+        self.block_state.stack.push(v);
+    }
+
+    pub fn const_(&mut self, imm: Value) -> Result<(), Error> {
+        self.push(ValueLocation::Immediate(imm))?;
+        Ok(())
+    }
+
+    fn relocated_function_call(
+        &mut self,
+        name: &cranelift_codegen::ir::ExternalName,
+        args: impl IntoIterator<Item = SignlessType>,
+        rets: impl IntoIterator<Item = SignlessType>,
+        preserve_vmctx: bool,
+    ) -> Result<(), Error> {
+        let locs = arg_locs(args)?;
+
+        self.save_volatile(..locs.len())?;
+
+        if preserve_vmctx {
+            dynasm!(self.asm
+                ; push Rq(VMCTX)
+            );
+            self.block_state.depth.reserve(1);
+        }
+
+        let depth = self.block_state.depth;
+
+        self.pass_outgoing_args(&locs)?;
+        // 2 bytes for the 64-bit `mov` opcode + register ident, the rest is the immediate
+        self.reloc_sink.reloc_external(
+            (self.asm.offset().0
+                - self.func_starts[self.current_function as usize]
+                    .0
+                    .unwrap()
+                    .0) as u32
+                + 2,
+            binemit::Reloc::Abs8,
+            name,
+            0,
+        );
+        let temp = self.take_reg(I64).unwrap();
+        dynasm!(self.asm
+            ; mov Rq(temp.rq().unwrap()), QWORD 0xDEAD_BEEF_DEAD_BEEF_u64 as i64
+            ; call Rq(temp.rq().unwrap())
+        );
+        self.block_state.regs.release(temp)?;
+
+        for i in locs {
+            self.free_value(i.into())?;
+        }
+
+        self.push_function_returns(rets)?;
+
+        if preserve_vmctx {
+            self.set_stack_depth(depth)?;
+
+            dynasm!(self.asm
+                ; pop Rq(VMCTX)
+            );
+            self.block_state.depth.free(1);
+        }
+        Ok(())
+    }
+
+    // TODO: Other memory indices
+    pub fn memory_size(&mut self) -> Result<(), Error> {
+        let memory_index = 0;
+        if let Some(defined_memory_index) = self.module_context.defined_memory_index(memory_index) {
+            self.push(ValueLocation::Immediate(defined_memory_index.into()))?;
+            self.relocated_function_call(
+                &magic::get_memory32_size_name(),
+                iter::once(I32),
+                iter::once(I32),
+                true,
+            )?;
+        } else {
+            self.push(ValueLocation::Immediate(memory_index.into()))?;
+            self.relocated_function_call(
+                &magic::get_imported_memory32_size_name(),
+                iter::once(I32),
+                iter::once(I32),
+                true,
+            )?;
+        }
+        Ok(())
+    }
+
+    // TODO: Other memory indices
+    pub fn memory_grow(&mut self) -> Result<(), Error> {
+        let memory_index = 0;
+        if let Some(defined_memory_index) = self.module_context.defined_memory_index(memory_index) {
+            self.push(ValueLocation::Immediate(defined_memory_index.into()))?;
+            self.relocated_function_call(
+                &magic::get_memory32_grow_name(),
+                iter::once(I32).chain(iter::once(I32)),
+                iter::once(I32),
+                true,
+            )?;
+        } else {
+            self.push(ValueLocation::Immediate(memory_index.into()))?;
+            self.relocated_function_call(
+                &magic::get_imported_memory32_grow_name(),
+                iter::once(I32).chain(iter::once(I32)),
+                iter::once(I32),
+                true,
+            )?;
+        }
+        Ok(())
+    }
+
+    // TODO: Use `ArrayVec`?
+    // TODO: This inefficiently duplicates registers but it's not really possible
+    //       to double up stack space right now.
+    /// Saves volatile (i.e. caller-saved) registers before a function call, if they are used.
+    fn save_volatile(&mut self, _bounds: impl std::ops::RangeBounds<usize>) -> Result<(), Error> {
+        self.save_regs(SCRATCH_REGS, ..)?;
+        Ok(())
+    }
+
+    fn save_regs<I>(
+        &mut self,
+        regs: &I,
+        bounds: impl std::ops::RangeBounds<usize>,
+    ) -> Result<(), Error>
+    where
+        for<'a> &'a I: IntoIterator<Item = &'a GPR>,
+        I: ?Sized,
+    {
+        use std::ops::Bound::*;
+
+        let mut stack = mem::replace(&mut self.block_state.stack, vec![]);
+        let (start, end) = (
+            match bounds.end_bound() {
+                Unbounded => 0,
+                Included(v) => stack.len().saturating_sub(1 + v),
+                Excluded(v) => stack.len().saturating_sub(*v),
+            },
+            match bounds.start_bound() {
+                Unbounded => stack.len(),
+                Included(v) => stack.len().saturating_sub(*v),
+                Excluded(v) => stack.len().saturating_sub(1 + v),
+            },
+        );
+
+        let mut slice = &mut stack[start..end];
+
+        while let Some((first, rest)) = slice.split_first_mut() {
+            if let ValueLocation::Reg(vreg) = *first {
+                if regs.into_iter().any(|r| *r == vreg) {
+                    let old = *first;
+                    *first = self.push_physical(old)?;
+                    for val in &mut *rest {
+                        if *val == old {
+                            self.free_value(*val)?;
+                            *val = *first;
+                        }
+                    }
+                }
+            }
+
+            slice = rest;
+        }
+
+        mem::replace(&mut self.block_state.stack, stack);
+        Ok(())
+    }
+
+    /// Write the arguments to the callee to the registers and the stack using the SystemV
+    /// calling convention.
+    fn pass_outgoing_args(&mut self, out_locs: &[CCLoc]) -> Result<(), Error> {
+        // TODO: Do alignment here
+        let total_stack_space = out_locs
+            .iter()
+            .flat_map(|&l| {
+                if let CCLoc::Stack(offset) = l {
+                    if offset > 0 {
+                        Some(offset as u32)
+                    } else {
+                        None
+                    }
+                } else {
+                    None
+                }
+            })
+            .max()
+            .unwrap_or(0);
+        let mut depth = self.block_state.depth.0 + total_stack_space;
+
+        if depth & 1 != 0 {
+            self.set_stack_depth(StackDepth(self.block_state.depth.0 + 1))?;
+            depth += 1;
+        }
+
+        let mut pending = Vec::<(ValueLocation, CCLoc)>::with_capacity(out_locs.len());
+
+        for &loc in out_locs.iter().rev() {
+            let val = self.pop()?;
+
+            pending.push((val, loc));
+        }
+
+        while !pending.is_empty() {
+            let start_len = pending.len();
+
+            for (src, dst) in mem::replace(&mut pending, vec![]) {
+                if src != ValueLocation::from(dst) {
+                    if let CCLoc::Reg(r) = dst {
+                        if !self.block_state.regs.is_free(r) {
+                            pending.push((src, dst));
+                            continue;
+                        }
+
+                        self.block_state.regs.mark_used(r);
+                    }
+
+                    self.copy_value(src, dst)?;
+                    self.free_value(src)?;
+                }
+            }
+
+            if pending.len() == start_len {
+                let src = match pending
+                    .iter()
+                    .filter_map(|(src, _)| {
+                        if let ValueLocation::Reg(reg) = src {
+                            Some(reg)
+                        } else {
+                            None
+                        }
+                    })
+                    .next()
+                {
+                    None => {
+                        return Err(Error::Microwasm(
+                            "Programmer error: We shouldn't need to push \
+                             intermediate args if we don't have any argument sources in registers"
+                                .to_string(),
+                        ))
+                    }
+                    Some(val) => *val,
+                };
+                let new_src = self.push_physical(ValueLocation::Reg(src))?;
+                for (old_src, _) in pending.iter_mut() {
+                    if *old_src == ValueLocation::Reg(src) {
+                        *old_src = new_src;
+                    }
+                }
+            }
+        }
+
+        self.set_stack_depth(StackDepth(depth))?;
+        Ok(())
+    }
+
+    fn push_function_returns(
+        &mut self,
+        returns: impl IntoIterator<Item = SignlessType>,
+    ) -> Result<(), Error> {
+        for loc in ret_locs(returns)? {
+            if let CCLoc::Reg(reg) = loc {
+                self.block_state.regs.mark_used(reg);
+            }
+
+            self.push(loc.into())?;
+        }
+        Ok(())
+    }
+
+    pub fn call_indirect(
+        &mut self,
+        type_id: u32,
+        arg_types: impl IntoIterator<Item = SignlessType>,
+        return_types: impl IntoIterator<Item = SignlessType>,
+    ) -> Result<(), Error> {
+        let locs = arg_locs(arg_types)?;
+
+        for &loc in &locs {
+            if let CCLoc::Reg(r) = loc {
+                self.block_state.regs.mark_used(r);
+            }
+        }
+
+        let mut callee = self.pop()?;
+        let callee_reg = match self.put_into_temp_register(I32, &mut callee) {
+            Err(e) => return Err(e),
+            Ok(o) => o.unwrap(),
+        };
+
+        for &loc in &locs {
+            if let CCLoc::Reg(r) = loc {
+                self.block_state.regs.release(r)?;
+            }
+        }
+
+        self.save_volatile(..locs.len())?;
+        dynasm!(self.asm
+            ; push Rq(VMCTX)
+        );
+        self.block_state.depth.reserve(1);
+        let depth = self.block_state.depth;
+
+        self.pass_outgoing_args(&locs)?;
+
+        let fail = self.trap_label().0;
+        let table_index = 0;
+        let reg_offset = self
+            .module_context
+            .defined_table_index(table_index)
+            .map(|index| {
+                (
+                    None,
+                    self.module_context.vmctx_vmtable_definition(index) as i32,
+                )
+            });
+
+        let vmctx = GPR::Rq(VMCTX);
+        let (reg, offset) = reg_offset.unwrap_or_else(|| {
+            let reg = self.take_reg(I64).unwrap();
+
+            dynasm!(self.asm
+                ; mov Rq(reg.rq().unwrap()), [
+                    Rq(VMCTX) + self.module_context.vmctx_vmtable_import_from(table_index) as i32
+                ]
+            );
+
+            (Some(reg), 0)
+        });
+
+        let temp0 = self.take_reg(I64).unwrap();
+
+        dynasm!(self.asm
+            ; cmp Rd(callee_reg.rq().unwrap()), [
+                Rq(reg.unwrap_or(vmctx).rq().unwrap()) +
+                    offset +
+                    self.module_context.vmtable_definition_current_elements() as i32
+            ]
+            ; jae =>fail
+            ; imul
+                Rd(callee_reg.rq().unwrap()),
+                Rd(callee_reg.rq().unwrap()),
+                self.module_context.size_of_vmcaller_checked_anyfunc() as i32
+            ; mov Rq(temp0.rq().unwrap()), [
+                Rq(reg.unwrap_or(vmctx).rq().unwrap()) +
+                    offset +
+                    self.module_context.vmtable_definition_base() as i32
+            ]
+        );
+
+        if let Some(reg) = reg {
+            self.block_state.regs.release(reg)?;
+        }
+
+        let temp1 = self.take_reg(I64).unwrap();
+
+        dynasm!(self.asm
+            ; mov Rd(temp1.rq().unwrap()), [
+                Rq(VMCTX) +
+                    self.module_context
+                        .vmctx_vmshared_signature_id(type_id) as i32
+            ]
+            ; cmp DWORD [
+                Rq(temp0.rq().unwrap()) +
+                    Rq(callee_reg.rq().unwrap()) +
+                    self.module_context.vmcaller_checked_anyfunc_type_index() as i32
+            ], Rd(temp1.rq().unwrap())
+            ; jne =>fail
+            ; mov Rq(VMCTX), [
+                Rq(temp0.rq().unwrap()) +
+                    Rq(callee_reg.rq().unwrap()) +
+                    self.module_context.vmcaller_checked_anyfunc_vmctx() as i32
+            ]
+            ; call QWORD [
+                Rq(temp0.rq().unwrap()) +
+                    Rq(callee_reg.rq().unwrap()) +
+                    self.module_context.vmcaller_checked_anyfunc_func_ptr() as i32
+            ]
+        );
+
+        self.block_state.regs.release(temp0)?;
+        self.block_state.regs.release(temp1)?;
+        self.free_value(callee)?;
+
+        for i in locs {
+            self.free_value(i.into())?;
+        }
+
+        self.push_function_returns(return_types)?;
+
+        self.set_stack_depth(depth)?;
+        dynasm!(self.asm
+            ; pop Rq(VMCTX)
+        );
+        self.block_state.depth.free(1);
+        Ok(())
+    }
+
+    pub fn swap(&mut self, depth: u32) {
+        let last = self.block_state.stack.len() - 1;
+        self.block_state.stack.swap(last, last - depth as usize);
+    }
+
+    /// Call a function with the given index
+    pub fn call_direct(
+        &mut self,
+        index: u32,
+        arg_types: impl IntoIterator<Item = SignlessType>,
+        return_types: impl IntoIterator<Item = SignlessType>,
+    ) -> Result<(), Error> {
+        self.relocated_function_call(
+            &ir::ExternalName::user(0, index),
+            arg_types,
+            return_types,
+            false,
+        )?;
+        Ok(())
+    }
+
+    /// Call a function with the given index
+    pub fn call_direct_self(
+        &mut self,
+        defined_index: u32,
+        arg_types: impl IntoIterator<Item = SignlessType>,
+        return_types: impl IntoIterator<Item = SignlessType>,
+    ) -> Result<(), Error> {
+        let locs = arg_locs(arg_types)?;
+
+        self.save_volatile(..locs.len())?;
+
+        let (_, label) = self.func_starts[defined_index as usize];
+
+        self.pass_outgoing_args(&locs)?;
+        dynasm!(self.asm
+            ; call =>label
+        );
+
+        for i in locs {
+            self.free_value(i.into())?;
+        }
+
+        self.push_function_returns(return_types)?;
+        Ok(())
+    }
+
+    /// Call a function with the given index
+    pub fn call_direct_imported(
+        &mut self,
+        index: u32,
+        arg_types: impl IntoIterator<Item = SignlessType>,
+        return_types: impl IntoIterator<Item = SignlessType>,
+    ) -> Result<(), Error> {
+        let locs = arg_locs(arg_types)?;
+
+        dynasm!(self.asm
+            ; push Rq(VMCTX)
+        );
+        self.block_state.depth.reserve(1);
+        let depth = self.block_state.depth;
+
+        self.save_volatile(..locs.len())?;
+        self.pass_outgoing_args(&locs)?;
+
+        let callee = self.take_reg(I64).unwrap();
+
+        dynasm!(self.asm
+            ; mov Rq(callee.rq().unwrap()), [
+                Rq(VMCTX) + self.module_context.vmctx_vmfunction_import_body(index) as i32
+            ]
+            ; mov Rq(VMCTX), [
+                Rq(VMCTX) + self.module_context.vmctx_vmfunction_import_vmctx(index) as i32
+            ]
+            ; call Rq(callee.rq().unwrap())
+        );
+
+        self.block_state.regs.release(callee)?;
+
+        for i in locs {
+            self.free_value(i.into())?;
+        }
+
+        self.push_function_returns(return_types)?;
+
+        self.set_stack_depth(depth)?;
+        dynasm!(self.asm
+            ; pop Rq(VMCTX)
+        );
+        self.block_state.depth.free(1);
+        Ok(())
+    }
+
+    // TODO: Reserve space to store RBX, RBP, and R12..R15 so we can use them
+    //       as scratch registers
+    /// Writes the function prologue and stores the arguments as locals
+    pub fn start_function(
+        &mut self,
+        params: impl IntoIterator<Item = SignlessType>,
+    ) -> Result<(), Error> {
+        let i_locs = arg_locs(params)?;
+        let locs = Vec::from_iter(i_locs);
+
+        self.apply_cc(&BlockCallingConvention::function_start(locs))?;
+        Ok(())
+    }
+
+    pub fn ret(&mut self) {
+        dynasm!(self.asm
+            ; ret
+        );
+    }
+
+    pub fn epilogue(&mut self) {}
+
+    pub fn trap(&mut self) {
+        let trap_label = self.trap_label();
+        dynasm!(self.asm
+            ; jmp =>trap_label.0
+        );
+    }
+
+    pub fn trap_label(&mut self) -> Label {
+        self.label(|asm: &mut Assembler| {
+            dynasm!(asm
+                ; ud2
+            );
+        })
+    }
+
+    pub fn ret_label(&mut self) -> Label {
+        self.label(|asm: &mut Assembler| {
+            dynasm!(asm
+                ; ret
+            );
+        })
+    }
+
+    fn label<F>(&mut self, fun: F) -> Label
+    where
+        F: IntoLabel,
+    {
+        self.aligned_label(1, fun)
+    }
+
+    fn aligned_label<F>(&mut self, align: u32, fun: F) -> Label
+    where
+        F: IntoLabel,
+    {
+        let key = fun.key();
+        if let Some((label, _, _)) = self.labels.get(&(align, key)) {
+            return *label;
+        }
+
+        let label = self.create_label();
+        self.labels
+            .insert((align, key), (label, align, Some(fun.callback())));
+
+        label
+    }
+
+    fn target_to_label(&mut self, target: BrTarget<Label>) -> Label {
+        match target {
+            BrTarget::Label(label) => label,
+            BrTarget::Return => self.ret_label(),
+        }
+    }
+}
+
+trait IntoLabel {
+    fn key(&self) -> Either<TypeId, (LabelValue, Option<LabelValue>)>;
+    fn callback(self) -> Box<dyn FnMut(&mut Assembler)>;
+}
+
+impl<F> IntoLabel for F
+where
+    F: FnMut(&mut Assembler) + Any,
+{
+    fn key(&self) -> Either<TypeId, (LabelValue, Option<LabelValue>)> {
+        Either::Left(TypeId::of::<Self>())
+    }
+
+    fn callback(self) -> Box<dyn FnMut(&mut Assembler)> {
+        Box::new(self)
+    }
+}
+
+fn const_value(val: LabelValue) -> impl FnMut(&mut Assembler) {
+    move |asm| match val {
+        LabelValue::I32(val) => dynasm!(asm
+            ; .dword val
+        ),
+        LabelValue::I64(val) => dynasm!(asm
+            ; .qword val
+        ),
+    }
+}
+
+fn const_values(a: LabelValue, b: LabelValue) -> impl FnMut(&mut Assembler) {
+    move |asm| {
+        match a {
+            LabelValue::I32(val) => dynasm!(asm
+                ; .dword val
+            ),
+            LabelValue::I64(val) => dynasm!(asm
+                ; .qword val
+            ),
+        }
+
+        match b {
+            LabelValue::I32(val) => dynasm!(asm
+                ; .dword val
+            ),
+            LabelValue::I64(val) => dynasm!(asm
+                ; .qword val
+            ),
+        }
+    }
+}
+
+impl IntoLabel for LabelValue {
+    fn key(&self) -> Either<TypeId, (LabelValue, Option<LabelValue>)> {
+        Either::Right((*self, None))
+    }
+    fn callback(self) -> Box<dyn FnMut(&mut Assembler)> {
+        Box::new(const_value(self))
+    }
+}
+
+impl IntoLabel for (LabelValue, LabelValue) {
+    fn key(&self) -> Either<TypeId, (LabelValue, Option<LabelValue>)> {
+        Either::Right((self.0, Some(self.1)))
+    }
+    fn callback(self) -> Box<dyn FnMut(&mut Assembler)> {
+        Box::new(const_values(self.0, self.1))
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/lightbeam/disassemble.rs.html b/api/src/lightbeam/disassemble.rs.html new file mode 100644 index 000000000000..c9391321630b --- /dev/null +++ b/api/src/lightbeam/disassemble.rs.html @@ -0,0 +1,105 @@ +disassemble.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+
+use capstone::prelude::*;
+use dynasmrt::AssemblyOffset;
+use std::error::Error;
+use std::fmt::{Display, Write};
+
+pub fn disassemble(
+    mem: &[u8],
+    mut ops: &[(AssemblyOffset, impl Display)],
+) -> Result<(), Box<dyn Error>> {
+    let cs = Capstone::new()
+        .x86()
+        .mode(arch::x86::ArchMode::Mode64)
+        .build()?;
+
+    println!("{} bytes:", mem.len());
+    let insns = cs.disasm_all(&mem, 0x0)?;
+    for i in insns.iter() {
+        let mut line = String::new();
+
+        let address = i.address();
+
+        while let Some((offset, op)) = ops.first() {
+            if offset.0 as u64 <= address {
+                ops = &ops[1..];
+                println!("{}", op);
+            } else {
+                break;
+            }
+        }
+
+        write!(&mut line, "{:4x}:\t", i.address())?;
+
+        let mut bytes_str = String::new();
+        for b in i.bytes() {
+            write!(&mut bytes_str, "{:02x} ", b)?;
+        }
+        write!(&mut line, "{:24}\t", bytes_str)?;
+
+        if let Some(s) = i.mnemonic() {
+            write!(&mut line, "{}\t", s)?;
+        }
+
+        if let Some(s) = i.op_str() {
+            write!(&mut line, "{}", s)?;
+        }
+
+        println!("{}", line);
+    }
+
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/lightbeam/error.rs.html b/api/src/lightbeam/error.rs.html new file mode 100644 index 000000000000..22ede2af631a --- /dev/null +++ b/api/src/lightbeam/error.rs.html @@ -0,0 +1,63 @@ +error.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+
+use capstone;
+use thiserror::Error;
+use wasmparser::BinaryReaderError;
+
+#[derive(Error, PartialEq, Eq, Clone, Debug)]
+pub enum Error {
+    #[error("Disassembler error: {0}")]
+    Disassembler(String),
+
+    #[error("Assembler error: {0}")]
+    Assembler(String),
+
+    #[error("Input error: {0}")]
+    Input(String),
+
+    #[error("Microwasm error: {0}")]
+    Microwasm(String),
+}
+
+impl From<BinaryReaderError> for Error {
+    fn from(e: BinaryReaderError) -> Self {
+        Error::Input(format!("At wasm offset {}: {}", e.offset(), e.message()))
+    }
+}
+
+impl From<capstone::Error> for Error {
+    fn from(e: capstone::Error) -> Self {
+        Error::Disassembler(e.to_string())
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/lightbeam/function_body.rs.html b/api/src/lightbeam/function_body.rs.html new file mode 100644 index 000000000000..9e03d6e0b025 --- /dev/null +++ b/api/src/lightbeam/function_body.rs.html @@ -0,0 +1,1767 @@ +function_body.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+
+use crate::backend::{
+    ret_locs, BlockCallingConvention, CodeGenSession, Context, Label, VirtualCallingConvention,
+};
+#[cfg(debug_assertions)]
+use crate::backend::{Registers, ValueLocation};
+use crate::error::Error;
+use crate::microwasm::*;
+use crate::module::{ModuleContext, SigType, Signature};
+use cranelift_codegen::binemit;
+use dynasmrt::DynasmApi;
+use either::{Either, Left, Right};
+#[cfg(debug_assertions)]
+use more_asserts::assert_ge;
+use multi_mut::HashMapMultiMut;
+use std::{collections::HashMap, hash::Hash};
+use std::{fmt, mem};
+
+#[derive(Debug)]
+struct Block {
+    label: BrTarget<Label>,
+    calling_convention: Option<Either<BlockCallingConvention, VirtualCallingConvention>>,
+    params: u32,
+    // TODO: Is there a cleaner way to do this? `has_backwards_callers` should always be set if `is_next`
+    //       is false, so we should probably use an `enum` here.
+    is_next: bool,
+    num_callers: Option<u32>,
+    actual_num_callers: u32,
+    has_backwards_callers: bool,
+}
+
+impl Block {
+    fn should_serialize_args(&self) -> bool {
+        self.calling_convention.is_none()
+            && (self.num_callers != Some(1) || self.has_backwards_callers)
+    }
+}
+
+const DISASSEMBLE: bool = false;
+
+pub fn translate_wasm<M>(
+    session: &mut CodeGenSession<M>,
+    reloc_sink: &mut dyn binemit::RelocSink,
+    func_idx: u32,
+    body: &wasmparser::FunctionBody,
+) -> Result<(), Error>
+where
+    M: ModuleContext,
+    for<'any> &'any M::Signature: Into<OpSig>,
+{
+    let ty = session.module_context.defined_func_type(func_idx);
+
+    if DISASSEMBLE {
+        let microwasm_conv = MicrowasmConv::new(
+            session.module_context,
+            ty.params().iter().map(SigType::to_microwasm_type),
+            ty.returns().iter().map(SigType::to_microwasm_type),
+            body,
+        )?;
+
+        let _ = crate::microwasm::dis(
+            std::io::stdout(),
+            func_idx,
+            microwasm_conv.flat_map(|ops| ops.unwrap()),
+        );
+    }
+
+    let microwasm_conv = MicrowasmConv::new(
+        session.module_context,
+        ty.params().iter().map(SigType::to_microwasm_type),
+        ty.returns().iter().map(SigType::to_microwasm_type),
+        body,
+    )?;
+
+    let mut body = Vec::new();
+    for i in microwasm_conv {
+        body.extend(i?);
+    }
+
+    translate(session, reloc_sink, func_idx, body)?;
+    Ok(())
+}
+
+pub fn translate<M, I, L: Send + Sync + 'static>(
+    session: &mut CodeGenSession<M>,
+    reloc_sink: &mut dyn binemit::RelocSink,
+    func_idx: u32,
+    body: I,
+) -> Result<(), Error>
+where
+    M: ModuleContext,
+    I: IntoIterator<Item = Operator<L>>,
+    L: Hash + Clone + Eq,
+    BrTarget<L>: std::fmt::Display,
+{
+    fn drop_elements<T>(stack: &mut Vec<T>, depths: std::ops::RangeInclusive<u32>) {
+        let _ = (|| {
+            let start = stack
+                .len()
+                .checked_sub(1)?
+                .checked_sub(*depths.end() as usize)?;
+            let end = stack
+                .len()
+                .checked_sub(1)?
+                .checked_sub(*depths.start() as usize)?;
+            let real_range = start..=end;
+
+            stack.drain(real_range);
+
+            Some(())
+        })();
+    }
+
+    let func_type = session.module_context.defined_func_type(func_idx);
+    let mut body = body.into_iter().peekable();
+
+    let module_context = &*session.module_context;
+    let mut op_offset_map = mem::replace(&mut session.op_offset_map, vec![]);
+    let ctx = &mut session.new_context(func_idx, reloc_sink);
+    op_offset_map.push((
+        ctx.asm.offset(),
+        Box::new(format!("Function {}:", func_idx)),
+    ));
+
+    let params = func_type
+        .params()
+        .iter()
+        .map(|t| t.to_microwasm_type())
+        .collect::<Vec<_>>();
+
+    ctx.start_function(params.iter().cloned())?;
+
+    let mut blocks = HashMap::<BrTarget<L>, Block>::new();
+
+    let num_returns = func_type.returns().len();
+
+    let loc = ret_locs(func_type.returns().iter().map(|t| t.to_microwasm_type()))?;
+
+    blocks.insert(
+        BrTarget::Return,
+        Block {
+            label: BrTarget::Return,
+            params: num_returns as u32,
+            calling_convention: Some(Left(BlockCallingConvention::function_start(loc))),
+            is_next: false,
+            has_backwards_callers: false,
+            actual_num_callers: 0,
+            num_callers: None,
+        },
+    );
+
+    while let Some(op) = body.next() {
+        if let Some(Operator::Label(label)) = body.peek() {
+            let block = match blocks.get_mut(&BrTarget::Label(label.clone())) {
+                None => {
+                    return Err(Error::Microwasm(
+                        "Label defined before being declared".to_string(),
+                    ))
+                }
+                Some(o) => o,
+            };
+            block.is_next = true;
+        }
+
+        // `cfg` on blocks doesn't work in the compiler right now, so we have to write a dummy macro
+        #[cfg(debug_assertions)]
+        macro_rules! assertions {
+            () => {
+                if let Operator::Label(label) = &op {
+                    let block = &blocks[&BrTarget::Label(label.clone())];
+                    let num_cc_params = block.calling_convention.as_ref().map(|cc| match cc {
+                        Left(cc) => cc.arguments.len(),
+                        Right(cc) => cc.stack.len(),
+                    });
+                    if let Some(num_cc_params) = num_cc_params {
+                        // we can use assert here bc we are in debug mode
+                        assert_ge!(num_cc_params, block.params as usize);
+                    }
+                } else {
+                    let mut actual_regs = Registers::new();
+                    actual_regs.release_scratch_register()?;
+                    for val in &ctx.block_state.stack {
+                        if let ValueLocation::Reg(gpr) = val {
+                            actual_regs.mark_used(*gpr);
+                        }
+                    }
+                    // we can use assert here bc we are in debug mode
+                    assert_eq!(actual_regs, ctx.block_state.regs);
+                }
+            };
+        }
+
+        #[cfg(not(debug_assertions))]
+        macro_rules! assertions {
+            () => {};
+        }
+
+        assertions!();
+
+        struct DisassemblyOpFormatter<Label>(Operator<Label>);
+
+        impl<Label> fmt::Display for DisassemblyOpFormatter<Label>
+        where
+            Operator<Label>: fmt::Display,
+        {
+            fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+                match self.0 {
+                    Operator::Label(_) => write!(f, "{}", self.0),
+                    Operator::Block { .. } => write!(f, "{:5}\t{}", "", self.0),
+                    _ => write!(f, "{:5}\t  {}", "", self.0),
+                }
+            }
+        }
+
+        op_offset_map.push((
+            ctx.asm.offset(),
+            Box::new(DisassemblyOpFormatter(op.clone())),
+        ));
+
+        match op {
+            Operator::Unreachable => {
+                ctx.trap();
+            }
+            Operator::Label(label) => {
+                use std::collections::hash_map::Entry;
+
+                if let Entry::Occupied(mut entry) = blocks.entry(BrTarget::Label(label.clone())) {
+                    let has_backwards_callers = {
+                        let block = entry.get_mut();
+
+                        // TODO: Maybe we want to restrict Microwasm so that at least one of its callers
+                        //       must be before the label. In an ideal world the restriction would be that
+                        //       blocks without callers are illegal, but that's not reasonably possible for
+                        //       Microwasm generated from Wasm.
+                        if block.actual_num_callers == 0 {
+                            loop {
+                                let done = match body.peek() {
+                                    Some(Operator::Label(_)) | None => true,
+                                    Some(_) => false,
+                                };
+
+                                if done {
+                                    break;
+                                }
+
+                                let skipped = body.next();
+
+                                // We still want to honour block definitions even in unreachable code
+                                if let Some(Operator::Block {
+                                    label,
+                                    has_backwards_callers,
+                                    params,
+                                    num_callers,
+                                }) = skipped
+                                {
+                                    let asm_label = ctx.create_label();
+                                    blocks.insert(
+                                        BrTarget::Label(label),
+                                        Block {
+                                            label: BrTarget::Label(asm_label),
+                                            params: params.len() as _,
+                                            calling_convention: None,
+                                            is_next: false,
+                                            has_backwards_callers,
+                                            actual_num_callers: 0,
+                                            num_callers,
+                                        },
+                                    );
+                                }
+                            }
+
+                            continue;
+                        }
+
+                        block.is_next = false;
+
+                        // TODO: We can `take` this if it's a `Right`
+                        match block.calling_convention.as_ref() {
+                            Some(Left(cc)) => {
+                                ctx.apply_cc(cc)?;
+                            }
+                            Some(Right(virt)) => {
+                                ctx.set_state(virt.clone())?;
+                            }
+                            _ => {
+                                if block.params as usize != ctx.block_state.stack.len() {
+                                    return Err(Error::Microwasm(
+                                        "Not enough block params on the stack".to_string(),
+                                    ));
+                                }
+                            }
+                        }
+
+                        ctx.define_label(block.label.label().unwrap().clone());
+
+                        block.has_backwards_callers
+                    };
+
+                    // To reduce memory overhead
+                    if !has_backwards_callers {
+                        entry.remove_entry();
+                    }
+                } else {
+                    return Err(Error::Microwasm(
+                        "Label defined before being declared".to_string(),
+                    ));
+                }
+            }
+            Operator::Block {
+                label,
+                has_backwards_callers,
+                params,
+                num_callers,
+            } => {
+                let asm_label = ctx.create_label();
+                blocks.insert(
+                    BrTarget::Label(label),
+                    Block {
+                        label: BrTarget::Label(asm_label),
+                        params: params.len() as _,
+                        calling_convention: None,
+                        is_next: false,
+                        has_backwards_callers,
+                        actual_num_callers: 0,
+                        num_callers,
+                    },
+                );
+            }
+            Operator::Br { target } => {
+                // TODO: We should add the block to the hashmap if we don't have it already
+                let block = blocks.get_mut(&target).unwrap();
+                block.actual_num_callers += 1;
+
+                let should_serialize_args = block.should_serialize_args();
+
+                match block {
+                    Block {
+                        is_next,
+                        label: BrTarget::Label(l),
+                        calling_convention,
+                        ..
+                    } => {
+                        let cc = if should_serialize_args {
+                            let block_conv = ctx.serialize_args(block.params)?;
+                            *calling_convention = Some(Left(block_conv));
+                            None
+                        } else {
+                            calling_convention
+                                .as_ref()
+                                .map(Either::as_ref)
+                                .and_then(Either::left)
+                        };
+
+                        if let Some(cc) = cc {
+                            ctx.pass_block_args(cc)?;
+                        }
+
+                        if !*is_next {
+                            ctx.br(*l);
+                        }
+                    }
+                    Block {
+                        label: BrTarget::Return,
+                        calling_convention: Some(Left(cc)),
+                        ..
+                    } => {
+                        ctx.pass_block_args(cc)?;
+                        ctx.ret();
+                    }
+                    _ => return Err(Error::Microwasm("Br case unimplemented".to_string())),
+                }
+            }
+            Operator::BrIf { then, else_ } => {
+                let (then_block, else_block) = blocks.pair_mut(&then.target, &else_.target);
+                // TODO: If actual_num_callers == num_callers then we can remove this block from the hashmap.
+                //       This frees memory and acts as a kind of verification that `num_callers` is set
+                //       correctly. It doesn't help for loops and block ends generated from Wasm.
+                then_block.actual_num_callers += 1;
+                else_block.actual_num_callers += 1;
+
+                let then_block_parts = (then_block.is_next, then_block.label);
+                let else_block_parts = (else_block.is_next, else_block.label);
+
+                // TODO: The blocks should have compatible (one must be subset of other?) calling
+                //       conventions or else at least one must have no calling convention. This
+                //       should always be true for converting from WebAssembly AIUI.
+                let f = |ctx: &mut Context<_>| {
+                    let then_block_should_serialize_args = then_block.should_serialize_args();
+                    let else_block_should_serialize_args = else_block.should_serialize_args();
+                    let max_params = then_block.params.max(else_block.params);
+
+                    match (
+                        (&mut then_block.calling_convention, &then.to_drop),
+                        (&mut else_block.calling_convention, &else_.to_drop),
+                    ) {
+                        ((Some(Left(ref cc)), _), ref mut other @ (None, _))
+                        | (ref mut other @ (None, _), (Some(Left(ref cc)), _)) => {
+                            let mut cc = ctx.serialize_block_args(cc, max_params)?;
+                            if let Some(to_drop) = other.1 {
+                                drop_elements(&mut cc.arguments, to_drop.clone());
+                            }
+                            *other.0 = Some(Left(cc));
+                            Ok(())
+                        },
+                        (
+                            (ref mut then_cc @ None, then_to_drop),
+                            (ref mut else_cc @ None, else_to_drop),
+                        ) => {
+                            let virt_cc = if !then_block_should_serialize_args
+                                || !else_block_should_serialize_args
+                            {
+                                Some(ctx.virtual_calling_convention())
+                            } else {
+                                None
+                            };
+
+                            let cc = if then_block_should_serialize_args
+                                || else_block_should_serialize_args { let a = ctx.serialize_args(max_params)? ; Some(a) } else { None };
+
+                            **then_cc = if then_block_should_serialize_args {
+                                let mut cc = cc.clone().unwrap();
+                                if let Some(to_drop) = then_to_drop.clone() {
+                                    drop_elements(&mut cc.arguments, to_drop);
+                                }
+                                Some(Left(cc))
+                            } else {
+                                let mut cc = virt_cc.clone().unwrap();
+                                if let Some(to_drop) = then_to_drop.clone() {
+                                    drop_elements(&mut cc.stack, to_drop);
+                                }
+                                Some(Right(cc))
+                            };
+                            **else_cc = if else_block_should_serialize_args {
+                                let mut cc = cc.unwrap();
+                                if let Some(to_drop) = else_to_drop.clone() {
+                                    drop_elements(&mut cc.arguments, to_drop);
+                                }
+                                Some(Left(cc))
+                            } else {
+                                let mut cc = virt_cc.unwrap();
+                                if let Some(to_drop) = else_to_drop.clone() {
+                                    drop_elements(&mut cc.stack, to_drop);
+                                }
+                                Some(Right(cc))
+                            };
+                            Ok(())
+                        },
+                        _ => Err(Error::Microwasm(
+                            "unimplemented: Can't pass different params to different sides of `br_if` yet".to_string(),
+                        )),
+                    }
+                };
+
+                match (then_block_parts, else_block_parts) {
+                    ((true, _), (false, else_)) => {
+                        ctx.br_if_false(else_, f)?;
+                    }
+                    ((false, then), (true, _)) => {
+                        ctx.br_if_true(then, f)?;
+                    }
+                    ((false, then), (false, else_)) => {
+                        ctx.br_if_true(then, f)?;
+                        ctx.br(else_);
+                    }
+                    other => {
+                        return Err(Error::Microwasm(format!(
+                            "br_if unimplemented case: {:#?}",
+                            other
+                        )))
+                    }
+                };
+            }
+            Operator::BrTable(BrTable { targets, default }) => {
+                use itertools::Itertools;
+
+                let (label, num_callers, params) = {
+                    let def = &blocks[&default.target];
+                    (
+                        if def.is_next { None } else { Some(def.label) },
+                        def.num_callers,
+                        def.params
+                            + default
+                                .to_drop
+                                .as_ref()
+                                .map(|t| t.clone().count())
+                                .unwrap_or_default() as u32,
+                    )
+                };
+
+                let target_labels = targets
+                    .iter()
+                    .map(|target| {
+                        let block = &blocks[&target.target];
+                        if block.is_next {
+                            None
+                        } else {
+                            Some(block.label)
+                        }
+                    })
+                    .collect::<Vec<_>>();
+
+                ctx.br_table(target_labels, label, |ctx| {
+                    let mut cc = None;
+                    let mut max_params = params;
+                    let mut max_num_callers = num_callers;
+
+                    for target in targets.iter().chain(std::iter::once(&default)).unique() {
+                        let block = blocks.get_mut(&target.target).unwrap();
+                        block.actual_num_callers += 1;
+
+                        if block.calling_convention.is_some() {
+                            let new_cc = block.calling_convention.clone();
+
+                            if !(cc.is_none() || cc == new_cc) {
+                                return Err(Error::Microwasm(
+                                    "Can't pass different params to different elements of `br_table` yet"
+                                    .to_string()));
+                            }
+                            cc = new_cc;
+                        }
+
+                        if let Some(max) = max_num_callers {
+                            max_num_callers = block.num_callers.map(|n| max.max(n));
+                        }
+
+                        max_params = max_params.max(
+                            block.params
+                                + target
+                                    .to_drop
+                                    .as_ref()
+                                    .map(|t| t.clone().count())
+                                    .unwrap_or_default() as u32,
+                        );
+                    }
+
+                    let temp: Result<
+                        Either<BlockCallingConvention, VirtualCallingConvention>,
+                        Error,
+                    > = cc
+                        .map(|cc| match cc {
+                            Left(cc) => {
+                                let tmp = ctx.serialize_block_args(&cc, max_params)?;
+                                Ok(Left(tmp))
+                            }
+                            Right(cc) => Ok(Right(cc)),
+                        })
+                        .unwrap_or_else(|| {
+                            if max_num_callers.map(|callers| callers <= 1).unwrap_or(false) {
+                                Ok(Right(ctx.virtual_calling_convention()))
+                            } else {
+                                let tmp = ctx.serialize_args(max_params)?;
+                                Ok(Left(tmp))
+                            }
+                        });
+                    let cc = match temp.unwrap() {
+                        Right(rr) => Right(rr),
+                        Left(l) => Left(l),
+                    };
+
+                    for target in targets.iter().chain(std::iter::once(&default)).unique() {
+                        let block = blocks.get_mut(&target.target).unwrap();
+                        let mut cc = cc.clone();
+                        if let Some(to_drop) = target.to_drop.clone() {
+                            match &mut cc {
+                                Left(cc) => drop_elements(&mut cc.arguments, to_drop),
+                                Right(cc) => drop_elements(&mut cc.stack, to_drop),
+                            }
+                        }
+                        block.calling_convention = Some(cc);
+                    }
+                    Ok(())
+                })?;
+            }
+            Operator::Swap(depth) => ctx.swap(depth),
+            Operator::Pick(depth) => ctx.pick(depth),
+            Operator::Eq(I32) => ctx.i32_eq()?,
+            Operator::Eqz(Size::_32) => ctx.i32_eqz()?,
+            Operator::Ne(I32) => ctx.i32_neq()?,
+            Operator::Lt(SI32) => ctx.i32_lt_s()?,
+            Operator::Le(SI32) => ctx.i32_le_s()?,
+            Operator::Gt(SI32) => ctx.i32_gt_s()?,
+            Operator::Ge(SI32) => ctx.i32_ge_s()?,
+            Operator::Lt(SU32) => ctx.i32_lt_u()?,
+            Operator::Le(SU32) => ctx.i32_le_u()?,
+            Operator::Gt(SU32) => ctx.i32_gt_u()?,
+            Operator::Ge(SU32) => ctx.i32_ge_u()?,
+            Operator::Add(I32) => ctx.i32_add()?,
+            Operator::Sub(I32) => ctx.i32_sub()?,
+            Operator::And(Size::_32) => ctx.i32_and()?,
+            Operator::Or(Size::_32) => ctx.i32_or()?,
+            Operator::Xor(Size::_32) => ctx.i32_xor()?,
+            Operator::Mul(I32) => ctx.i32_mul()?,
+            Operator::Div(SU32) => ctx.i32_div_u()?,
+            Operator::Div(SI32) => ctx.i32_div_s()?,
+            Operator::Rem(sint::I32) => ctx.i32_rem_s()?,
+            Operator::Rem(sint::U32) => ctx.i32_rem_u()?,
+            Operator::Shl(Size::_32) => ctx.i32_shl()?,
+            Operator::Shr(sint::I32) => ctx.i32_shr_s()?,
+            Operator::Shr(sint::U32) => ctx.i32_shr_u()?,
+            Operator::Rotl(Size::_32) => ctx.i32_rotl()?,
+            Operator::Rotr(Size::_32) => ctx.i32_rotr()?,
+            Operator::Clz(Size::_32) => ctx.i32_clz()?,
+            Operator::Ctz(Size::_32) => ctx.i32_ctz()?,
+            Operator::Popcnt(Size::_32) => ctx.i32_popcnt()?,
+            Operator::Eq(I64) => ctx.i64_eq()?,
+            Operator::Eqz(Size::_64) => ctx.i64_eqz()?,
+            Operator::Ne(I64) => ctx.i64_neq()?,
+            Operator::Lt(SI64) => ctx.i64_lt_s()?,
+            Operator::Le(SI64) => ctx.i64_le_s()?,
+            Operator::Gt(SI64) => ctx.i64_gt_s()?,
+            Operator::Ge(SI64) => ctx.i64_ge_s()?,
+            Operator::Lt(SU64) => ctx.i64_lt_u()?,
+            Operator::Le(SU64) => ctx.i64_le_u()?,
+            Operator::Gt(SU64) => ctx.i64_gt_u()?,
+            Operator::Ge(SU64) => ctx.i64_ge_u()?,
+            Operator::Add(I64) => ctx.i64_add()?,
+            Operator::Sub(I64) => ctx.i64_sub()?,
+            Operator::And(Size::_64) => ctx.i64_and()?,
+            Operator::Or(Size::_64) => ctx.i64_or()?,
+            Operator::Xor(Size::_64) => ctx.i64_xor()?,
+            Operator::Mul(I64) => ctx.i64_mul()?,
+            Operator::Div(SU64) => ctx.i64_div_u()?,
+            Operator::Div(SI64) => ctx.i64_div_s()?,
+            Operator::Rem(sint::I64) => ctx.i64_rem_s()?,
+            Operator::Rem(sint::U64) => ctx.i64_rem_u()?,
+            Operator::Shl(Size::_64) => ctx.i64_shl()?,
+            Operator::Shr(sint::I64) => ctx.i64_shr_s()?,
+            Operator::Shr(sint::U64) => ctx.i64_shr_u()?,
+            Operator::Rotl(Size::_64) => ctx.i64_rotl()?,
+            Operator::Rotr(Size::_64) => ctx.i64_rotr()?,
+            Operator::Clz(Size::_64) => ctx.i64_clz()?,
+            Operator::Ctz(Size::_64) => ctx.i64_ctz()?,
+            Operator::Popcnt(Size::_64) => ctx.i64_popcnt()?,
+            Operator::Add(F32) => ctx.f32_add()?,
+            Operator::Mul(F32) => ctx.f32_mul()?,
+            Operator::Sub(F32) => ctx.f32_sub()?,
+            Operator::Div(SF32) => ctx.f32_div()?,
+            Operator::Min(Size::_32) => ctx.f32_min()?,
+            Operator::Max(Size::_32) => ctx.f32_max()?,
+            Operator::Copysign(Size::_32) => ctx.f32_copysign()?,
+            Operator::Sqrt(Size::_32) => ctx.f32_sqrt()?,
+            Operator::Neg(Size::_32) => ctx.f32_neg()?,
+            Operator::Abs(Size::_32) => ctx.f32_abs()?,
+            Operator::Floor(Size::_32) => ctx.f32_floor()?,
+            Operator::Ceil(Size::_32) => ctx.f32_ceil()?,
+            Operator::Nearest(Size::_32) => ctx.f32_nearest()?,
+            Operator::Trunc(Size::_32) => ctx.f32_trunc()?,
+            Operator::Eq(F32) => ctx.f32_eq()?,
+            Operator::Ne(F32) => ctx.f32_ne()?,
+            Operator::Gt(SF32) => ctx.f32_gt()?,
+            Operator::Ge(SF32) => ctx.f32_ge()?,
+            Operator::Lt(SF32) => ctx.f32_lt()?,
+            Operator::Le(SF32) => ctx.f32_le()?,
+            Operator::Add(F64) => ctx.f64_add()?,
+            Operator::Mul(F64) => ctx.f64_mul()?,
+            Operator::Sub(F64) => ctx.f64_sub()?,
+            Operator::Div(SF64) => ctx.f64_div()?,
+            Operator::Min(Size::_64) => ctx.f64_min()?,
+            Operator::Max(Size::_64) => ctx.f64_max()?,
+            Operator::Copysign(Size::_64) => ctx.f64_copysign()?,
+            Operator::Sqrt(Size::_64) => ctx.f64_sqrt()?,
+            Operator::Neg(Size::_64) => ctx.f64_neg()?,
+            Operator::Abs(Size::_64) => ctx.f64_abs()?,
+            Operator::Floor(Size::_64) => ctx.f64_floor()?,
+            Operator::Ceil(Size::_64) => ctx.f64_ceil()?,
+            Operator::Nearest(Size::_64) => ctx.f64_nearest()?,
+            Operator::Trunc(Size::_64) => ctx.f64_trunc()?,
+            Operator::Eq(F64) => ctx.f64_eq()?,
+            Operator::Ne(F64) => ctx.f64_ne()?,
+            Operator::Gt(SF64) => ctx.f64_gt()?,
+            Operator::Ge(SF64) => ctx.f64_ge()?,
+            Operator::Lt(SF64) => ctx.f64_lt()?,
+            Operator::Le(SF64) => ctx.f64_le()?,
+            Operator::Drop(range) => ctx.drop(range)?,
+            Operator::Const(val) => ctx.const_(val)?,
+            Operator::I32WrapFromI64 => ctx.i32_wrap_from_i64()?,
+            Operator::I32ReinterpretFromF32 => ctx.i32_reinterpret_from_f32()?,
+            Operator::I64ReinterpretFromF64 => ctx.i64_reinterpret_from_f64()?,
+            Operator::F32ReinterpretFromI32 => ctx.f32_reinterpret_from_i32()?,
+            Operator::F64ReinterpretFromI64 => ctx.f64_reinterpret_from_i64()?,
+            Operator::ITruncFromF {
+                input_ty: Size::_32,
+                output_ty: sint::I32,
+            } => {
+                ctx.i32_truncate_f32_s()?;
+            }
+            Operator::ITruncFromF {
+                input_ty: Size::_32,
+                output_ty: sint::U32,
+            } => {
+                ctx.i32_truncate_f32_u()?;
+            }
+            Operator::ITruncFromF {
+                input_ty: Size::_64,
+                output_ty: sint::I32,
+            } => {
+                ctx.i32_truncate_f64_s()?;
+            }
+            Operator::ITruncFromF {
+                input_ty: Size::_64,
+                output_ty: sint::U32,
+            } => {
+                ctx.i32_truncate_f64_u()?;
+            }
+            Operator::ITruncFromF {
+                input_ty: Size::_32,
+                output_ty: sint::I64,
+            } => {
+                ctx.i64_truncate_f32_s()?;
+            }
+            Operator::ITruncFromF {
+                input_ty: Size::_32,
+                output_ty: sint::U64,
+            } => {
+                ctx.i64_truncate_f32_u()?;
+            }
+            Operator::ITruncFromF {
+                input_ty: Size::_64,
+                output_ty: sint::I64,
+            } => {
+                ctx.i64_truncate_f64_s()?;
+            }
+            Operator::ITruncFromF {
+                input_ty: Size::_64,
+                output_ty: sint::U64,
+            } => {
+                ctx.i64_truncate_f64_u()?;
+            }
+            Operator::Extend {
+                sign: Signedness::Unsigned,
+            } => ctx.i32_extend_u()?,
+            Operator::Extend {
+                sign: Signedness::Signed,
+            } => ctx.i32_extend_s()?,
+            Operator::FConvertFromI {
+                input_ty: sint::I32,
+                output_ty: Size::_32,
+            } => ctx.f32_convert_from_i32_s()?,
+            Operator::FConvertFromI {
+                input_ty: sint::I32,
+                output_ty: Size::_64,
+            } => ctx.f64_convert_from_i32_s()?,
+            Operator::FConvertFromI {
+                input_ty: sint::I64,
+                output_ty: Size::_32,
+            } => ctx.f32_convert_from_i64_s()?,
+            Operator::FConvertFromI {
+                input_ty: sint::I64,
+                output_ty: Size::_64,
+            } => ctx.f64_convert_from_i64_s()?,
+            Operator::FConvertFromI {
+                input_ty: sint::U32,
+                output_ty: Size::_32,
+            } => ctx.f32_convert_from_i32_u()?,
+            Operator::FConvertFromI {
+                input_ty: sint::U32,
+                output_ty: Size::_64,
+            } => ctx.f64_convert_from_i32_u()?,
+            Operator::FConvertFromI {
+                input_ty: sint::U64,
+                output_ty: Size::_32,
+            } => ctx.f32_convert_from_i64_u()?,
+            Operator::FConvertFromI {
+                input_ty: sint::U64,
+                output_ty: Size::_64,
+            } => ctx.f64_convert_from_i64_u()?,
+            Operator::F64PromoteFromF32 => ctx.f64_from_f32()?,
+            Operator::F32DemoteFromF64 => ctx.f32_from_f64()?,
+            Operator::Load8 {
+                ty: sint::U32,
+                memarg,
+            } => ctx.i32_load8_u(memarg.offset)?,
+            Operator::Load16 {
+                ty: sint::U32,
+                memarg,
+            } => ctx.i32_load16_u(memarg.offset)?,
+            Operator::Load8 {
+                ty: sint::I32,
+                memarg,
+            } => ctx.i32_load8_s(memarg.offset)?,
+            Operator::Load16 {
+                ty: sint::I32,
+                memarg,
+            } => ctx.i32_load16_s(memarg.offset)?,
+            Operator::Load8 {
+                ty: sint::U64,
+                memarg,
+            } => ctx.i64_load8_u(memarg.offset)?,
+            Operator::Load16 {
+                ty: sint::U64,
+                memarg,
+            } => ctx.i64_load16_u(memarg.offset)?,
+            Operator::Load8 {
+                ty: sint::I64,
+                memarg,
+            } => ctx.i64_load8_s(memarg.offset)?,
+            Operator::Load16 {
+                ty: sint::I64,
+                memarg,
+            } => ctx.i64_load16_s(memarg.offset)?,
+            Operator::Load32 {
+                sign: Signedness::Unsigned,
+                memarg,
+            } => ctx.i64_load32_u(memarg.offset)?,
+            Operator::Load32 {
+                sign: Signedness::Signed,
+                memarg,
+            } => ctx.i64_load32_s(memarg.offset)?,
+            Operator::Load { ty: I32, memarg } => ctx.i32_load(memarg.offset)?,
+            Operator::Load { ty: F32, memarg } => ctx.f32_load(memarg.offset)?,
+            Operator::Load { ty: I64, memarg } => ctx.i64_load(memarg.offset)?,
+            Operator::Load { ty: F64, memarg } => ctx.f64_load(memarg.offset)?,
+            Operator::Store8 { memarg, .. } => ctx.store8(memarg.offset)?,
+            Operator::Store16 { memarg, .. } => ctx.store16(memarg.offset)?,
+            Operator::Store32 { memarg }
+            | Operator::Store { ty: I32, memarg }
+            | Operator::Store { ty: F32, memarg } => ctx.store32(memarg.offset)?,
+            Operator::Store { ty: I64, memarg } | Operator::Store { ty: F64, memarg } => {
+                ctx.store64(memarg.offset)?
+            }
+            Operator::GlobalGet(idx) => ctx.get_global(idx)?,
+            Operator::GlobalSet(idx) => ctx.set_global(idx)?,
+            Operator::Select => {
+                ctx.select()?;
+            }
+            Operator::MemorySize { .. } => {
+                ctx.memory_size()?;
+            }
+            Operator::MemoryGrow { .. } => {
+                ctx.memory_grow()?;
+            }
+            Operator::Call { function_index } => {
+                let callee_ty = module_context.func_type(function_index);
+
+                if let Some(defined_index) = module_context.defined_func_index(function_index) {
+                    if function_index == func_idx {
+                        ctx.call_direct_self(
+                            defined_index,
+                            callee_ty.params().iter().map(|t| t.to_microwasm_type()),
+                            callee_ty.returns().iter().map(|t| t.to_microwasm_type()),
+                        )?;
+                    } else {
+                        ctx.call_direct(
+                            function_index,
+                            callee_ty.params().iter().map(|t| t.to_microwasm_type()),
+                            callee_ty.returns().iter().map(|t| t.to_microwasm_type()),
+                        )?;
+                    }
+                } else {
+                    ctx.call_direct_imported(
+                        function_index,
+                        callee_ty.params().iter().map(|t| t.to_microwasm_type()),
+                        callee_ty.returns().iter().map(|t| t.to_microwasm_type()),
+                    )?;
+                }
+            }
+            Operator::CallIndirect {
+                type_index,
+                table_index,
+            } => {
+                if table_index != 0 {
+                    return Err(Error::Microwasm("table_index not equal to 0".to_string()));
+                }
+
+                let callee_ty = module_context.signature(type_index);
+
+                // TODO: this implementation assumes that this function is locally defined.
+
+                ctx.call_indirect(
+                    type_index,
+                    callee_ty.params().iter().map(|t| t.to_microwasm_type()),
+                    callee_ty.returns().iter().map(|t| t.to_microwasm_type()),
+                )?;
+            }
+        }
+    }
+
+    ctx.epilogue();
+
+    mem::replace(&mut session.op_offset_map, op_offset_map);
+
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/lightbeam/lib.rs.html b/api/src/lightbeam/lib.rs.html new file mode 100644 index 000000000000..cc95862d4d28 --- /dev/null +++ b/api/src/lightbeam/lib.rs.html @@ -0,0 +1,47 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+
+#![cfg_attr(test, feature(test))]
+#![feature(proc_macro_hygiene)]
+
+#[cfg(test)]
+extern crate test;
+
+mod backend;
+mod disassemble;
+mod error;
+mod function_body;
+mod microwasm;
+mod module;
+mod translate_sections;
+
+#[cfg(test)]
+mod benches;
+
+pub use crate::backend::CodeGenSession;
+pub use crate::function_body::translate_wasm as translate_function;
+pub use crate::module::{
+    translate, ExecutableModule, ExecutionError, ModuleContext, Signature, TranslatedModule,
+};
+
+
\ No newline at end of file diff --git a/api/src/lightbeam/microwasm.rs.html b/api/src/lightbeam/microwasm.rs.html new file mode 100644 index 000000000000..9abab2f21814 --- /dev/null +++ b/api/src/lightbeam/microwasm.rs.html @@ -0,0 +1,4519 @@ +microwasm.rs.html -- source
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+1182
+1183
+1184
+1185
+1186
+1187
+1188
+1189
+1190
+1191
+1192
+1193
+1194
+1195
+1196
+1197
+1198
+1199
+1200
+1201
+1202
+1203
+1204
+1205
+1206
+1207
+1208
+1209
+1210
+1211
+1212
+1213
+1214
+1215
+1216
+1217
+1218
+1219
+1220
+1221
+1222
+1223
+1224
+1225
+1226
+1227
+1228
+1229
+1230
+1231
+1232
+1233
+1234
+1235
+1236
+1237
+1238
+1239
+1240
+1241
+1242
+1243
+1244
+1245
+1246
+1247
+1248
+1249
+1250
+1251
+1252
+1253
+1254
+1255
+1256
+1257
+1258
+1259
+1260
+1261
+1262
+1263
+1264
+1265
+1266
+1267
+1268
+1269
+1270
+1271
+1272
+1273
+1274
+1275
+1276
+1277
+1278
+1279
+1280
+1281
+1282
+1283
+1284
+1285
+1286
+1287
+1288
+1289
+1290
+1291
+1292
+1293
+1294
+1295
+1296
+1297
+1298
+1299
+1300
+1301
+1302
+1303
+1304
+1305
+1306
+1307
+1308
+1309
+1310
+1311
+1312
+1313
+1314
+1315
+1316
+1317
+1318
+1319
+1320
+1321
+1322
+1323
+1324
+1325
+1326
+1327
+1328
+1329
+1330
+1331
+1332
+1333
+1334
+1335
+1336
+1337
+1338
+1339
+1340
+1341
+1342
+1343
+1344
+1345
+1346
+1347
+1348
+1349
+1350
+1351
+1352
+1353
+1354
+1355
+1356
+1357
+1358
+1359
+1360
+1361
+1362
+1363
+1364
+1365
+1366
+1367
+1368
+1369
+1370
+1371
+1372
+1373
+1374
+1375
+1376
+1377
+1378
+1379
+1380
+1381
+1382
+1383
+1384
+1385
+1386
+1387
+1388
+1389
+1390
+1391
+1392
+1393
+1394
+1395
+1396
+1397
+1398
+1399
+1400
+1401
+1402
+1403
+1404
+1405
+1406
+1407
+1408
+1409
+1410
+1411
+1412
+1413
+1414
+1415
+1416
+1417
+1418
+1419
+1420
+1421
+1422
+1423
+1424
+1425
+1426
+1427
+1428
+1429
+1430
+1431
+1432
+1433
+1434
+1435
+1436
+1437
+1438
+1439
+1440
+1441
+1442
+1443
+1444
+1445
+1446
+1447
+1448
+1449
+1450
+1451
+1452
+1453
+1454
+1455
+1456
+1457
+1458
+1459
+1460
+1461
+1462
+1463
+1464
+1465
+1466
+1467
+1468
+1469
+1470
+1471
+1472
+1473
+1474
+1475
+1476
+1477
+1478
+1479
+1480
+1481
+1482
+1483
+1484
+1485
+1486
+1487
+1488
+1489
+1490
+1491
+1492
+1493
+1494
+1495
+1496
+1497
+1498
+1499
+1500
+1501
+1502
+1503
+1504
+1505
+1506
+1507
+1508
+1509
+1510
+1511
+1512
+1513
+1514
+1515
+1516
+1517
+1518
+1519
+1520
+1521
+1522
+1523
+1524
+1525
+1526
+1527
+1528
+1529
+1530
+1531
+1532
+1533
+1534
+1535
+1536
+1537
+1538
+1539
+1540
+1541
+1542
+1543
+1544
+1545
+1546
+1547
+1548
+1549
+1550
+1551
+1552
+1553
+1554
+1555
+1556
+1557
+1558
+1559
+1560
+1561
+1562
+1563
+1564
+1565
+1566
+1567
+1568
+1569
+1570
+1571
+1572
+1573
+1574
+1575
+1576
+1577
+1578
+1579
+1580
+1581
+1582
+1583
+1584
+1585
+1586
+1587
+1588
+1589
+1590
+1591
+1592
+1593
+1594
+1595
+1596
+1597
+1598
+1599
+1600
+1601
+1602
+1603
+1604
+1605
+1606
+1607
+1608
+1609
+1610
+1611
+1612
+1613
+1614
+1615
+1616
+1617
+1618
+1619
+1620
+1621
+1622
+1623
+1624
+1625
+1626
+1627
+1628
+1629
+1630
+1631
+1632
+1633
+1634
+1635
+1636
+1637
+1638
+1639
+1640
+1641
+1642
+1643
+1644
+1645
+1646
+1647
+1648
+1649
+1650
+1651
+1652
+1653
+1654
+1655
+1656
+1657
+1658
+1659
+1660
+1661
+1662
+1663
+1664
+1665
+1666
+1667
+1668
+1669
+1670
+1671
+1672
+1673
+1674
+1675
+1676
+1677
+1678
+1679
+1680
+1681
+1682
+1683
+1684
+1685
+1686
+1687
+1688
+1689
+1690
+1691
+1692
+1693
+1694
+1695
+1696
+1697
+1698
+1699
+1700
+1701
+1702
+1703
+1704
+1705
+1706
+1707
+1708
+1709
+1710
+1711
+1712
+1713
+1714
+1715
+1716
+1717
+1718
+1719
+1720
+1721
+1722
+1723
+1724
+1725
+1726
+1727
+1728
+1729
+1730
+1731
+1732
+1733
+1734
+1735
+1736
+1737
+1738
+1739
+1740
+1741
+1742
+1743
+1744
+1745
+1746
+1747
+1748
+1749
+1750
+1751
+1752
+1753
+1754
+1755
+1756
+1757
+1758
+1759
+1760
+1761
+1762
+1763
+1764
+1765
+1766
+1767
+1768
+1769
+1770
+1771
+1772
+1773
+1774
+1775
+1776
+1777
+1778
+1779
+1780
+1781
+1782
+1783
+1784
+1785
+1786
+1787
+1788
+1789
+1790
+1791
+1792
+1793
+1794
+1795
+1796
+1797
+1798
+1799
+1800
+1801
+1802
+1803
+1804
+1805
+1806
+1807
+1808
+1809
+1810
+1811
+1812
+1813
+1814
+1815
+1816
+1817
+1818
+1819
+1820
+1821
+1822
+1823
+1824
+1825
+1826
+1827
+1828
+1829
+1830
+1831
+1832
+1833
+1834
+1835
+1836
+1837
+1838
+1839
+1840
+1841
+1842
+1843
+1844
+1845
+1846
+1847
+1848
+1849
+1850
+1851
+1852
+1853
+1854
+1855
+1856
+1857
+1858
+1859
+1860
+1861
+1862
+1863
+1864
+1865
+1866
+1867
+1868
+1869
+1870
+1871
+1872
+1873
+1874
+1875
+1876
+1877
+1878
+1879
+1880
+1881
+1882
+1883
+1884
+1885
+1886
+1887
+1888
+1889
+1890
+1891
+1892
+1893
+1894
+1895
+1896
+1897
+1898
+1899
+1900
+1901
+1902
+1903
+1904
+1905
+1906
+1907
+1908
+1909
+1910
+1911
+1912
+1913
+1914
+1915
+1916
+1917
+1918
+1919
+1920
+1921
+1922
+1923
+1924
+1925
+1926
+1927
+1928
+1929
+1930
+1931
+1932
+1933
+1934
+1935
+1936
+1937
+1938
+1939
+1940
+1941
+1942
+1943
+1944
+1945
+1946
+1947
+1948
+1949
+1950
+1951
+1952
+1953
+1954
+1955
+1956
+1957
+1958
+1959
+1960
+1961
+1962
+1963
+1964
+1965
+1966
+1967
+1968
+1969
+1970
+1971
+1972
+1973
+1974
+1975
+1976
+1977
+1978
+1979
+1980
+1981
+1982
+1983
+1984
+1985
+1986
+1987
+1988
+1989
+1990
+1991
+1992
+1993
+1994
+1995
+1996
+1997
+1998
+1999
+2000
+2001
+2002
+2003
+2004
+2005
+2006
+2007
+2008
+2009
+2010
+2011
+2012
+2013
+2014
+2015
+2016
+2017
+2018
+2019
+2020
+2021
+2022
+2023
+2024
+2025
+2026
+2027
+2028
+2029
+2030
+2031
+2032
+2033
+2034
+2035
+2036
+2037
+2038
+2039
+2040
+2041
+2042
+2043
+2044
+2045
+2046
+2047
+2048
+2049
+2050
+2051
+2052
+2053
+2054
+2055
+2056
+2057
+2058
+2059
+2060
+2061
+2062
+2063
+2064
+2065
+2066
+2067
+2068
+2069
+2070
+2071
+2072
+2073
+2074
+2075
+2076
+2077
+2078
+2079
+2080
+2081
+2082
+2083
+2084
+2085
+2086
+2087
+2088
+2089
+2090
+2091
+2092
+2093
+2094
+2095
+2096
+2097
+2098
+2099
+2100
+2101
+2102
+2103
+2104
+2105
+2106
+2107
+2108
+2109
+2110
+2111
+2112
+2113
+2114
+2115
+2116
+2117
+2118
+2119
+2120
+2121
+2122
+2123
+2124
+2125
+2126
+2127
+2128
+2129
+2130
+2131
+2132
+2133
+2134
+2135
+2136
+2137
+2138
+2139
+2140
+2141
+2142
+2143
+2144
+2145
+2146
+2147
+2148
+2149
+2150
+2151
+2152
+2153
+2154
+2155
+2156
+2157
+2158
+2159
+2160
+2161
+2162
+2163
+2164
+2165
+2166
+2167
+2168
+2169
+2170
+2171
+2172
+2173
+2174
+2175
+2176
+2177
+2178
+2179
+2180
+2181
+2182
+2183
+2184
+2185
+2186
+2187
+2188
+2189
+2190
+2191
+2192
+2193
+2194
+2195
+2196
+2197
+2198
+2199
+2200
+2201
+2202
+2203
+2204
+2205
+2206
+2207
+2208
+2209
+2210
+2211
+2212
+2213
+2214
+2215
+2216
+2217
+2218
+2219
+2220
+2221
+2222
+2223
+2224
+2225
+2226
+2227
+2228
+2229
+2230
+2231
+2232
+2233
+2234
+2235
+2236
+2237
+2238
+2239
+2240
+2241
+2242
+2243
+2244
+2245
+2246
+2247
+2248
+2249
+2250
+2251
+2252
+2253
+2254
+2255
+2256
+2257
+2258
+
+use crate::error::Error;
+use crate::module::{ModuleContext, SigType, Signature};
+use smallvec::{smallvec, SmallVec};
+use std::{
+    convert::TryInto,
+    fmt,
+    iter::{self, FromIterator},
+    ops::RangeInclusive,
+};
+use wasmparser::{
+    FunctionBody, Ieee32 as WasmIeee32, Ieee64 as WasmIeee64,
+    MemoryImmediate as WasmMemoryImmediate, Operator as WasmOperator, OperatorsReader,
+};
+
+pub fn dis<L>(
+    mut out: impl std::io::Write,
+    function_name: impl fmt::Display,
+    microwasm: impl IntoIterator<Item = Operator<L>>,
+) -> std::io::Result<()>
+where
+    BrTarget<L>: fmt::Display,
+    L: Clone,
+{
+    writeln!(out, ".fn_{}:", function_name)?;
+
+    let p = "      ";
+    for op in microwasm {
+        if op.is_label() || op.is_block() {
+            writeln!(out, "{}", op)?;
+        } else {
+            writeln!(out, "{}{}", p, op)?;
+        }
+    }
+
+    Ok(())
+}
+
+/// A constant value embedded in the instructions
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub enum Value {
+    I32(i32),
+    I64(i64),
+    F32(Ieee32),
+    F64(Ieee64),
+}
+
+impl fmt::Display for Value {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        match self {
+            Value::I32(v) => write!(f, "{}i32", v),
+            Value::I64(v) => write!(f, "{}i64", v),
+            Value::F32(v) => write!(f, "{}f32", f32::from_bits(v.to_bits())),
+            Value::F64(v) => write!(f, "{}f64", f64::from_bits(v.to_bits())),
+        }
+    }
+}
+
+impl Value {
+    pub fn as_int(self) -> Option<i64> {
+        self.as_i64().or_else(|| self.as_i32().map(|i| i as _))
+    }
+
+    pub fn as_bytes(self) -> i64 {
+        match self {
+            Value::I32(val) => val as _,
+            Value::I64(val) => val,
+            Value::F32(val) => val.0 as _,
+            Value::F64(val) => val.0 as _,
+        }
+    }
+
+    pub fn as_i32(self) -> Option<i32> {
+        match self {
+            Value::I32(val) => Some(val),
+            _ => None,
+        }
+    }
+
+    pub fn as_i64(self) -> Option<i64> {
+        match self {
+            Value::I64(val) => Some(val),
+            _ => None,
+        }
+    }
+
+    pub fn as_f32(self) -> Option<Ieee32> {
+        match self {
+            Value::F32(val) => Some(val),
+            _ => None,
+        }
+    }
+
+    pub fn as_f64(self) -> Option<Ieee64> {
+        match self {
+            Value::F64(val) => Some(val),
+            _ => None,
+        }
+    }
+
+    pub fn type_(&self) -> SignlessType {
+        match self {
+            Value::I32(_) => Type::Int(Size::_32),
+            Value::I64(_) => Type::Int(Size::_64),
+            Value::F32(Ieee32(_)) => Type::Float(Size::_32),
+            Value::F64(Ieee64(_)) => Type::Float(Size::_64),
+        }
+    }
+
+    fn default_for_type(ty: SignlessType) -> Self {
+        match ty {
+            Type::Int(Size::_32) => Value::I32(0),
+            Type::Int(Size::_64) => Value::I64(0),
+            Type::Float(Size::_32) => Value::F32(Ieee32(0)),
+            Type::Float(Size::_64) => Value::F64(Ieee64(0)),
+        }
+    }
+}
+
+impl From<i32> for Value {
+    fn from(other: i32) -> Self {
+        Value::I32(other)
+    }
+}
+impl From<i64> for Value {
+    fn from(other: i64) -> Self {
+        Value::I64(other)
+    }
+}
+impl From<u32> for Value {
+    fn from(other: u32) -> Self {
+        Value::I32(other as _)
+    }
+}
+impl From<u64> for Value {
+    fn from(other: u64) -> Self {
+        Value::I64(other as _)
+    }
+}
+impl From<Ieee32> for Value {
+    fn from(other: Ieee32) -> Self {
+        Value::F32(other)
+    }
+}
+impl From<Ieee64> for Value {
+    fn from(other: Ieee64) -> Self {
+        Value::F64(other)
+    }
+}
+
+/// Whether to interpret an integer as signed or unsigned
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub enum Signedness {
+    Signed,
+    Unsigned,
+}
+
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub enum Size {
+    _32,
+    _64,
+}
+
+type Int = Size;
+type Float = Size;
+
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub struct SignfulInt(pub Signedness, pub Size);
+
+#[derive(Debug, Copy, Clone, PartialEq, Eq)]
+pub enum Type<I> {
+    Int(I),
+    Float(Size),
+}
+
+pub trait IntoType<T> {
+    fn into_type() -> T;
+}
+
+impl IntoType<SignlessType> for i32 {
+    fn into_type() -> SignlessType {
+        I32
+    }
+}
+
+impl IntoType<SignlessType> for i64 {
+    fn into_type() -> SignlessType {
+        I64
+    }
+}
+
+impl IntoType<SignlessType> for u32 {
+    fn into_type() -> SignlessType {
+        I32
+    }
+}
+
+impl IntoType<SignlessType> for u64 {
+    fn into_type() -> SignlessType {
+        I64
+    }
+}
+
+impl IntoType<SignlessType> for f32 {
+    fn into_type() -> SignlessType {
+        F32
+    }
+}
+
+impl IntoType<SignlessType> for f64 {
+    fn into_type() -> SignlessType {
+        F64
+    }
+}
+
+impl<I> Type<I> {
+    pub fn for_<T: IntoType<Self>>() -> Self {
+        T::into_type()
+    }
+}
+
+impl fmt::Display for SignfulType {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        match self {
+            Type::Int(i) => write!(f, "{}", i),
+            Type::Float(Size::_32) => write!(f, "f32"),
+            Type::Float(Size::_64) => write!(f, "f64"),
+        }
+    }
+}
+
+impl fmt::Display for SignlessType {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        match self {
+            Type::Int(Size::_32) => write!(f, "i32"),
+            Type::Int(Size::_64) => write!(f, "i64"),
+            Type::Float(Size::_32) => write!(f, "f32"),
+            Type::Float(Size::_64) => write!(f, "f64"),
+        }
+    }
+}
+
+impl fmt::Display for SignfulInt {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        match self {
+            SignfulInt(Signedness::Signed, Size::_32) => write!(f, "i32"),
+            SignfulInt(Signedness::Unsigned, Size::_32) => write!(f, "u32"),
+            SignfulInt(Signedness::Signed, Size::_64) => write!(f, "i64"),
+            SignfulInt(Signedness::Unsigned, Size::_64) => write!(f, "u64"),
+        }
+    }
+}
+
+pub type SignlessType = Type<Size>;
+pub type SignfulType = Type<SignfulInt>;
+
+pub const I32: SignlessType = Type::Int(Size::_32);
+pub const I64: SignlessType = Type::Int(Size::_64);
+pub const F32: SignlessType = Type::Float(Size::_32);
+pub const F64: SignlessType = Type::Float(Size::_64);
+
+pub mod sint {
+    use super::{Signedness, SignfulInt, Size};
+
+    pub const I32: SignfulInt = SignfulInt(Signedness::Signed, Size::_32);
+    pub const I64: SignfulInt = SignfulInt(Signedness::Signed, Size::_64);
+    pub const U32: SignfulInt = SignfulInt(Signedness::Unsigned, Size::_32);
+    pub const U64: SignfulInt = SignfulInt(Signedness::Unsigned, Size::_64);
+}
+
+pub const SI32: SignfulType = Type::Int(sint::I32);
+pub const SI64: SignfulType = Type::Int(sint::I64);
+pub const SU32: SignfulType = Type::Int(sint::U32);
+pub const SU64: SignfulType = Type::Int(sint::U64);
+pub const SF32: SignfulType = Type::Float(Size::_32);
+pub const SF64: SignfulType = Type::Float(Size::_64);
+
+impl SignlessType {
+    pub fn from_wasm(other: wasmparser::Type) -> Result<Self, Error> {
+        use wasmparser::Type;
+
+        match other {
+            Type::I32 => Ok(I32),
+            Type::I64 => Ok(I64),
+            Type::F32 => Ok(F32),
+            Type::F64 => Ok(F64),
+            Type::EmptyBlockType => Err(Error::Microwasm(
+                "SignlessType with EmptyBlockType".to_string(),
+            )),
+            _ => Err(Error::Microwasm("SignlessType unimplemented".to_string())),
+        }
+    }
+}
+
+fn create_returns_from_wasm_type(
+    ty: wasmparser::TypeOrFuncType,
+) -> Result<Vec<SignlessType>, Error> {
+    match ty {
+        wasmparser::TypeOrFuncType::Type(ty) => Ok(Vec::from_iter(Type::from_wasm(ty))),
+        wasmparser::TypeOrFuncType::FuncType(_) => {
+            Err(Error::Microwasm("Unsupported func type".to_string()))
+        }
+    }
+}
+
+#[derive(Debug, Clone)]
+pub struct BrTable<L> {
+    pub targets: Vec<BrTargetDrop<L>>,
+    pub default: BrTargetDrop<L>,
+}
+
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub enum NameTag {
+    Header,
+    Else,
+    End,
+}
+
+pub type WasmLabel = (u32, NameTag);
+
+pub type OperatorFromWasm = Operator<WasmLabel>;
+
+#[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)]
+pub enum BrTarget<L> {
+    Return,
+    Label(L),
+}
+
+impl<L> BrTarget<L> {
+    pub fn label(&self) -> Option<&L> {
+        match self {
+            BrTarget::Return => None,
+            BrTarget::Label(l) => Some(l),
+        }
+    }
+}
+
+impl<L> From<L> for BrTarget<L> {
+    fn from(other: L) -> Self {
+        BrTarget::Label(other)
+    }
+}
+
+impl fmt::Display for BrTarget<WasmLabel> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        match self {
+            BrTarget::Return => write!(f, ".return"),
+            BrTarget::Label((i, NameTag::Header)) => write!(f, ".L{}", i),
+            BrTarget::Label((i, NameTag::Else)) => write!(f, ".L{}_else", i),
+            BrTarget::Label((i, NameTag::End)) => write!(f, ".L{}_end", i),
+        }
+    }
+}
+
+impl fmt::Display for BrTarget<&str> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        match self {
+            BrTarget::Return => write!(f, ".return"),
+            BrTarget::Label(l) => write!(f, ".L{}", l),
+        }
+    }
+}
+
+#[derive(Debug, Clone, Hash, PartialEq, Eq)]
+pub struct BrTargetDrop<L> {
+    pub target: BrTarget<L>,
+    pub to_drop: Option<RangeInclusive<u32>>,
+}
+
+impl<L> From<BrTarget<L>> for BrTargetDrop<L> {
+    fn from(other: BrTarget<L>) -> Self {
+        BrTargetDrop {
+            target: other,
+            to_drop: None,
+        }
+    }
+}
+
+impl<L> fmt::Display for BrTargetDrop<L>
+where
+    BrTarget<L>: fmt::Display,
+{
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        if let Some(drop) = &self.to_drop {
+            write!(
+                f,
+                "({}, drop {}..={})",
+                self.target,
+                drop.start(),
+                drop.end()
+            )
+        } else {
+            write!(f, "{}", self.target)
+        }
+    }
+}
+
+#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
+pub struct Ieee32(u32);
+#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
+pub struct Ieee64(u64);
+
+impl Ieee32 {
+    pub fn to_bits(self) -> u32 {
+        self.0
+    }
+
+    pub fn from_bits(other: u32) -> Self {
+        Ieee32(other)
+    }
+}
+
+impl From<WasmIeee32> for Ieee32 {
+    fn from(other: WasmIeee32) -> Self {
+        Self::from_bits(other.bits())
+    }
+}
+
+impl Ieee64 {
+    pub fn to_bits(self) -> u64 {
+        self.0
+    }
+
+    pub fn from_bits(other: u64) -> Self {
+        Ieee64(other)
+    }
+}
+
+impl From<WasmIeee64> for Ieee64 {
+    fn from(other: WasmIeee64) -> Self {
+        Self::from_bits(other.bits())
+    }
+}
+
+#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
+pub struct MemoryImmediate {
+    pub flags: u32,
+    pub offset: u32,
+}
+
+impl From<WasmMemoryImmediate> for MemoryImmediate {
+    fn from(other: WasmMemoryImmediate) -> Self {
+        MemoryImmediate {
+            flags: other.flags,
+            offset: other.offset,
+        }
+    }
+}
+
+// TODO: Explicit VmCtx?
+#[derive(Debug, Clone)]
+pub enum Operator<Label> {
+    /// Explicit trap instruction
+    Unreachable,
+    /// Define metadata for a block - its label, its signature, whether it has backwards callers etc. It
+    /// is an error to branch to a block that has yet to be defined.
+    Block {
+        label: Label,
+        // TODO: Do we need this?
+        params: Vec<SignlessType>,
+        // TODO: Ideally we'd have `num_backwards_callers` but we can't know that for WebAssembly
+        has_backwards_callers: bool,
+        num_callers: Option<u32>,
+    },
+    /// Start a new block. It is an error if the previous block has not been closed by emitting a `Br` or
+    /// `BrTable`.
+    Label(Label),
+    /// Unconditionally break to a new block. This the parameters off the stack and passes them into
+    /// the new block. Any remaining elements on the stack are discarded.
+    Br {
+        /// Returning from the function is just calling the "return" block
+        target: BrTarget<Label>,
+    },
+    /// Pop a value off the top of the stack, jump to the `else_` label if this value is `true`
+    /// and the `then` label otherwise. The `then` and `else_` blocks must have the same parameters.
+    BrIf {
+        /// Label to jump to if the value at the top of the stack is true
+        then: BrTargetDrop<Label>,
+        /// Label to jump to if the value at the top of the stack is false
+        else_: BrTargetDrop<Label>,
+    },
+    /// Pop a value off the top of the stack, jump to `table[value.min(table.len() - 1)]`. All elements
+    /// in the table must have the same parameters.
+    BrTable(
+        /// The table of labels to jump to - the index should be clamped to the length of the table
+        BrTable<Label>,
+    ),
+    /// Call a function
+    Call {
+        function_index: u32,
+    },
+    /// Pop an `i32` off the top of the stack, index into the table at `table_index` and call that function
+    CallIndirect {
+        type_index: u32,
+        table_index: u32,
+    },
+    /// Pop an element off of the stack and discard it.
+    Drop(RangeInclusive<u32>),
+    /// Pop an `i32` off of the stack and 2 elements off of the stack, call them `A` and `B` where `A` is the
+    /// first element popped and `B` is the second. If the `i32` is 0 then discard `B` and push `A` back onto
+    /// the stack, otherwise discard `A` and push `B` back onto the stack.
+    Select,
+    /// Duplicate the element at depth `depth` to the top of the stack. This can be used to implement
+    /// `LocalGet`.
+    Pick(u32),
+    /// Swap the top element of the stack with the element at depth `depth`. This can be used to implement
+    /// `LocalSet`.
+    // TODO: Is it better to have `Swap`, to have `Pull` (which moves the `nth` element instead of swapping)
+    //       or to have both?
+    Swap(u32),
+    GlobalGet(u32),
+    GlobalSet(u32),
+    Load {
+        ty: SignlessType,
+        memarg: MemoryImmediate,
+    },
+    Load8 {
+        ty: SignfulInt,
+        memarg: MemoryImmediate,
+    },
+    Load16 {
+        ty: SignfulInt,
+        memarg: MemoryImmediate,
+    },
+    // Only available for {I,U}64
+    // TODO: Roll this into `Load` somehow?
+    Load32 {
+        sign: Signedness,
+        memarg: MemoryImmediate,
+    },
+    Store {
+        ty: SignlessType,
+        memarg: MemoryImmediate,
+    },
+    Store8 {
+        /// `ty` on integers
+        ty: Int,
+        memarg: MemoryImmediate,
+    },
+    Store16 {
+        /// `ty` on integers
+        ty: Int,
+        memarg: MemoryImmediate,
+    },
+    // Only available for I64
+    // TODO: Roll this into `Store` somehow?
+    Store32 {
+        memarg: MemoryImmediate,
+    },
+    MemorySize {
+        reserved: u32,
+    },
+    MemoryGrow {
+        reserved: u32,
+    },
+    Const(Value),
+    Eq(SignlessType),
+    Ne(SignlessType),
+    /// `eqz` on integers
+    Eqz(Int),
+    Lt(SignfulType),
+    Gt(SignfulType),
+    Le(SignfulType),
+    Ge(SignfulType),
+    Add(SignlessType),
+    Sub(SignlessType),
+    Mul(SignlessType),
+    /// `clz` on integers
+    Clz(Int),
+    /// `ctz` on integers
+    Ctz(Int),
+    /// `popcnt` on integers
+    Popcnt(Int),
+    Div(SignfulType),
+    Rem(SignfulInt),
+    And(Int),
+    Or(Int),
+    Xor(Int),
+    Shl(Int),
+    Shr(SignfulInt),
+    Rotl(Int),
+    Rotr(Int),
+    Abs(Float),
+    Neg(Float),
+    Ceil(Float),
+    Floor(Float),
+    Trunc(Float),
+    Nearest(Float),
+    Sqrt(Float),
+    Min(Float),
+    Max(Float),
+    Copysign(Float),
+    I32WrapFromI64,
+    ITruncFromF {
+        input_ty: Float,
+        output_ty: SignfulInt,
+    },
+    FConvertFromI {
+        input_ty: SignfulInt,
+        output_ty: Float,
+    },
+    F32DemoteFromF64,
+    F64PromoteFromF32,
+    I32ReinterpretFromF32,
+    I64ReinterpretFromF64,
+    F32ReinterpretFromI32,
+    F64ReinterpretFromI64,
+    // Only available for input I32 and output I64
+    Extend {
+        sign: Signedness,
+    },
+}
+
+impl<L> Operator<L> {
+    pub fn is_label(&self) -> bool {
+        match self {
+            Operator::Label(..) => true,
+            _ => false,
+        }
+    }
+
+    pub fn is_block(&self) -> bool {
+        match self {
+            Operator::Block { .. } => true,
+            _ => false,
+        }
+    }
+
+    pub fn end(params: Vec<SignlessType>, label: L) -> Self {
+        Operator::Block {
+            params,
+            label,
+            has_backwards_callers: false,
+            // TODO
+            num_callers: None,
+        }
+    }
+
+    pub fn block(params: Vec<SignlessType>, label: L) -> Self {
+        Operator::Block {
+            params,
+            label,
+            has_backwards_callers: false,
+            num_callers: Some(1),
+        }
+    }
+
+    pub fn loop_(params: Vec<SignlessType>, label: L) -> Self {
+        Operator::Block {
+            params,
+            label,
+            has_backwards_callers: true,
+            num_callers: None,
+        }
+    }
+}
+
+impl<L> fmt::Display for Operator<L>
+where
+    BrTarget<L>: fmt::Display,
+    L: Clone,
+{
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        match self {
+            Operator::Unreachable => write!(f, "unreachable"),
+            Operator::Label(label) => write!(f, "{}:", BrTarget::Label(label.clone())),
+            Operator::Block {
+                label,
+                params,
+                has_backwards_callers,
+                num_callers,
+            } => {
+                write!(f, "def {} :: [", BrTarget::Label(label.clone()))?;
+                let mut iter = params.iter();
+                if let Some(p) = iter.next() {
+                    write!(f, "{}", p)?;
+                    for p in iter {
+                        write!(f, ", {}", p)?;
+                    }
+                }
+                write!(f, "]")?;
+
+                if *has_backwards_callers {
+                    write!(f, " has_backwards_callers")?;
+                }
+
+                if let Some(n) = num_callers {
+                    write!(f, " num_callers={}", n)?;
+                }
+
+                Ok(())
+            }
+            Operator::Br { target } => write!(f, "br {}", target),
+            Operator::BrIf { then, else_ } => write!(f, "br_if {}, {}", then, else_),
+            Operator::BrTable(BrTable { targets, default }) => {
+                write!(f, "br_table [")?;
+                let mut iter = targets.iter();
+                if let Some(p) = iter.next() {
+                    write!(f, "{}", p)?;
+                    for p in iter {
+                        write!(f, ", {}", p)?;
+                    }
+                }
+
+                write!(f, "], {}", default)
+            }
+            Operator::Call { function_index } => write!(f, "call {}", function_index),
+            Operator::CallIndirect { .. } => write!(f, "call_indirect"),
+            Operator::Drop(range) => {
+                write!(f, "drop")?;
+
+                match range.clone().into_inner() {
+                    (0, 0) => {}
+                    (start, end) if start == end => {
+                        write!(f, " {}", start)?;
+                    }
+                    (start, end) => {
+                        write!(f, " {}..={}", start, end)?;
+                    }
+                }
+
+                Ok(())
+            }
+            Operator::Select => write!(f, "select"),
+            Operator::Pick(depth) => write!(f, "pick {}", depth),
+            Operator::Swap(depth) => write!(f, "swap {}", depth),
+            Operator::Load { ty, memarg } => {
+                write!(f, "{}.load {}, {}", ty, memarg.flags, memarg.offset)
+            }
+            Operator::Load8 { ty, memarg } => {
+                write!(f, "{}.load8 {}, {}", ty, memarg.flags, memarg.offset)
+            }
+            Operator::Load16 { ty, memarg } => {
+                write!(f, "{}.load16 {}, {}", ty, memarg.flags, memarg.offset)
+            }
+            Operator::Load32 { sign, memarg } => write!(
+                f,
+                "{}.load32 {}, {}",
+                SignfulInt(*sign, Size::_64),
+                memarg.flags,
+                memarg.offset
+            ),
+            Operator::Store { ty, memarg } => {
+                write!(f, "{}.store {}, {}", ty, memarg.flags, memarg.offset)
+            }
+            Operator::Store8 { ty, memarg } => write!(
+                f,
+                "{}.store8 {}, {}",
+                SignfulInt(Signedness::Unsigned, *ty),
+                memarg.flags,
+                memarg.offset
+            ),
+            Operator::Store16 { ty, memarg } => write!(
+                f,
+                "{}.store16 {}, {}",
+                SignfulInt(Signedness::Unsigned, *ty),
+                memarg.flags,
+                memarg.offset
+            ),
+            Operator::Store32 { memarg } => {
+                write!(f, "u64.store32 {}, {}", memarg.flags, memarg.offset)
+            }
+            Operator::MemorySize { .. } => write!(f, "memory.size"),
+            Operator::MemoryGrow { .. } => write!(f, "memory.grow"),
+            Operator::Const(val) => write!(f, "const {}", val),
+            Operator::Eq(ty) => write!(f, "{}.eq", ty),
+            Operator::Ne(ty) => write!(f, "{}.ne", ty),
+            Operator::Eqz(ty) => write!(f, "{}.eqz", SignfulInt(Signedness::Unsigned, *ty)),
+            Operator::Lt(ty) => write!(f, "{}.lt", ty),
+            Operator::Gt(ty) => write!(f, "{}.gt", ty),
+            Operator::Le(ty) => write!(f, "{}.le", ty),
+            Operator::Ge(ty) => write!(f, "{}.ge", ty),
+            Operator::Add(ty) => write!(f, "{}.add", ty),
+            Operator::Sub(ty) => write!(f, "{}.sub", ty),
+            Operator::Mul(ty) => write!(f, "{}.mul", ty),
+            Operator::Clz(ty) => write!(f, "{}.clz", SignfulInt(Signedness::Unsigned, *ty)),
+            Operator::Ctz(ty) => write!(f, "{}.ctz", SignfulInt(Signedness::Unsigned, *ty)),
+            Operator::Popcnt(ty) => write!(f, "{}.popcnt", SignfulInt(Signedness::Unsigned, *ty)),
+            Operator::Div(ty) => write!(f, "{}.div", ty),
+            Operator::Rem(ty) => write!(f, "{}.rem", ty),
+            Operator::And(ty) => write!(f, "{}.and", SignfulInt(Signedness::Unsigned, *ty)),
+            Operator::Or(ty) => write!(f, "{}.or", SignfulInt(Signedness::Unsigned, *ty)),
+            Operator::Xor(ty) => write!(f, "{}.xor", SignfulInt(Signedness::Unsigned, *ty)),
+            Operator::Shl(ty) => write!(f, "{}.shl", SignfulInt(Signedness::Unsigned, *ty)),
+            Operator::Shr(ty) => write!(f, "{}.shr", ty),
+            Operator::Rotl(ty) => write!(f, "{}.rotl", SignfulInt(Signedness::Unsigned, *ty)),
+            Operator::Rotr(ty) => write!(f, "{}.rotr", SignfulInt(Signedness::Unsigned, *ty)),
+            Operator::Abs(ty) => write!(f, "{}.abs", Type::<Int>::Float(*ty)),
+            Operator::Neg(ty) => write!(f, "{}.neg", Type::<Int>::Float(*ty)),
+            Operator::Ceil(ty) => write!(f, "{}.ceil", Type::<Int>::Float(*ty)),
+            Operator::Floor(ty) => write!(f, "{}.floor", Type::<Int>::Float(*ty)),
+            Operator::Trunc(ty) => write!(f, "{}.trunc", Type::<Int>::Float(*ty)),
+            Operator::Nearest(ty) => write!(f, "{}.nearest", Type::<Int>::Float(*ty)),
+            Operator::Sqrt(ty) => write!(f, "{}.sqrt", Type::<Int>::Float(*ty)),
+            Operator::Min(ty) => write!(f, "{}.min", Type::<Int>::Float(*ty)),
+            Operator::Max(ty) => write!(f, "{}.max", Type::<Int>::Float(*ty)),
+            Operator::Copysign(ty) => write!(f, "{}.copysign", Type::<Int>::Float(*ty)),
+            Operator::I32WrapFromI64 => write!(f, "i32.wrap_from.i64"),
+            Operator::F32DemoteFromF64 => write!(f, "f32.demote_from.f64"),
+            Operator::F64PromoteFromF32 => write!(f, "f64.promote_from.f32"),
+            Operator::I32ReinterpretFromF32 => write!(f, "i32.reinterpret_from.f32"),
+            Operator::I64ReinterpretFromF64 => write!(f, "i64.reinterpret_from.f64"),
+            Operator::F32ReinterpretFromI32 => write!(f, "f32.reinterpret_from.i32"),
+            Operator::F64ReinterpretFromI64 => write!(f, "f64.reinterpret_from.i64"),
+            Operator::FConvertFromI {
+                input_ty,
+                output_ty,
+            } => write!(
+                f,
+                "{}.convert_from.{}",
+                Type::Float::<Int>(*output_ty),
+                input_ty,
+            ),
+            Operator::GlobalGet(index) => write!(f, "global.get {}", index),
+            Operator::GlobalSet(index) => write!(f, "global.set {}", index),
+            Operator::ITruncFromF {
+                input_ty,
+                output_ty,
+            } => write!(
+                f,
+                "{}.truncate_from.{}",
+                output_ty,
+                Type::<Int>::Float(*input_ty)
+            ),
+            Operator::Extend { sign } => write!(
+                f,
+                "{}.extend_from.{}",
+                SignfulInt(*sign, Size::_64),
+                SignfulInt(*sign, Size::_32)
+            ),
+        }
+    }
+}
+
+// TODO: If we return a `Vec<<T as MicrowasmReceiver>::Item>` will that convert to (essentially) a no-op
+//       in the case that `Item` is a ZST? That is important for ensuring that we don't do unnecessary
+//       work when we're directly generating asm.
+/// WIP: Trait to abstract over either producing a stream of Microwasm or directly producing assembly
+/// from the Wasm. This should give a significant speedup since we don't need to allocate any vectors
+/// or pay the cost of branches - we can just use iterators and direct function calls.
+pub trait MicrowasmReceiver<Label> {
+    type Item;
+
+    fn unreachable(&mut self) -> Self::Item;
+    fn block(
+        &mut self,
+        label: Label,
+        params: impl Iterator<Item = SignlessType>,
+        has_backwards_callers: bool,
+        num_callers: Option<u32>,
+    ) -> Self::Item;
+    fn label(&mut self, _: Label) -> Self::Item;
+    fn br(&mut self, target: BrTarget<Label>) -> Self::Item;
+    fn br_if(&mut self, then: BrTargetDrop<Label>, else_: BrTargetDrop<Label>) -> Self::Item;
+    fn br_table(&mut self, _: BrTable<Label>) -> Self::Item;
+    fn call(&mut self, function_index: u32) -> Self::Item;
+    fn call_indirect(&mut self, type_index: u32, table_index: u32) -> Self::Item;
+    fn drop(&mut self, _: RangeInclusive<u32>) -> Self::Item;
+    fn select(&mut self) -> Self::Item;
+    fn pick(&mut self, _: u32) -> Self::Item;
+    fn swap(&mut self, _: u32) -> Self::Item;
+    fn get_global(&mut self, index: u32) -> Self::Item;
+    fn set_global(&mut self, index: u32) -> Self::Item;
+    fn load(&mut self, ty: SignlessType, memarg: MemoryImmediate) -> Self::Item;
+    fn load8(&mut self, ty: SignfulInt, memarg: MemoryImmediate) -> Self::Item;
+    fn load16(&mut self, ty: SignfulInt, memarg: MemoryImmediate) -> Self::Item;
+    fn load32(&mut self, sign: Signedness, memarg: MemoryImmediate) -> Self::Item;
+    fn store(&mut self, ty: SignlessType, memarg: MemoryImmediate) -> Self::Item;
+    fn store8(&mut self, ty: Int, memarg: MemoryImmediate) -> Self::Item;
+    fn store16(&mut self, ty: Int, memarg: MemoryImmediate) -> Self::Item;
+    fn store32(&mut self, memarg: MemoryImmediate) -> Self::Item;
+    fn memory_size(&mut self, reserved: u32) -> Self::Item;
+    fn memory_grow(&mut self, reserved: u32) -> Self::Item;
+    fn const_(&mut self, _: Value) -> Self::Item;
+    fn ref_null(&mut self) -> Self::Item;
+    fn ref_is_null(&mut self) -> Self::Item;
+    fn eq(&mut self, _: SignlessType) -> Self::Item;
+    fn ne(&mut self, _: SignlessType) -> Self::Item;
+    fn eqz(&mut self, _: Int) -> Self::Item;
+    fn lt(&mut self, _: SignfulType) -> Self::Item;
+    fn gt(&mut self, _: SignfulType) -> Self::Item;
+    fn le(&mut self, _: SignfulType) -> Self::Item;
+    fn ge(&mut self, _: SignfulType) -> Self::Item;
+    fn add(&mut self, _: SignlessType) -> Self::Item;
+    fn sub(&mut self, _: SignlessType) -> Self::Item;
+    fn mul(&mut self, _: SignlessType) -> Self::Item;
+    fn clz(&mut self, _: Int) -> Self::Item;
+    fn ctz(&mut self, _: Int) -> Self::Item;
+    fn popcnt(&mut self, _: Int) -> Self::Item;
+    fn div(&mut self, _: SignfulType) -> Self::Item;
+    fn rem(&mut self, _: SignfulInt) -> Self::Item;
+    fn and(&mut self, _: Int) -> Self::Item;
+    fn or(&mut self, _: Int) -> Self::Item;
+    fn xor(&mut self, _: Int) -> Self::Item;
+    fn shl(&mut self, _: Int) -> Self::Item;
+    fn shr(&mut self, _: SignfulInt) -> Self::Item;
+    fn rotl(&mut self, _: Int) -> Self::Item;
+    fn rotr(&mut self, _: Int) -> Self::Item;
+    fn abs(&mut self, _: Float) -> Self::Item;
+    fn neg(&mut self, _: Float) -> Self::Item;
+    fn ceil(&mut self, _: Float) -> Self::Item;
+    fn floor(&mut self, _: Float) -> Self::Item;
+    fn trunc(&mut self, _: Float) -> Self::Item;
+    fn nearest(&mut self, _: Float) -> Self::Item;
+    fn sqrt(&mut self, _: Float) -> Self::Item;
+    fn min(&mut self, _: Float) -> Self::Item;
+    fn max(&mut self, _: Float) -> Self::Item;
+    fn copysign(&mut self, _: Float) -> Self::Item;
+    fn i32_wrap_from_i64(&mut self) -> Self::Item;
+    fn i_trunc_from_f(&mut self, input_ty: Float, output_ty: SignfulInt) -> Self::Item;
+    fn f_convert_from_i(&mut self, input_ty: SignfulInt, output_ty: Float) -> Self::Item;
+    fn f32_demote_from_f64(&mut self) -> Self::Item;
+    fn f64_promote_from_f32(&mut self) -> Self::Item;
+    fn i32_reinterpret_from_f32(&mut self) -> Self::Item;
+    fn i64_reinterpret_from_f64(&mut self) -> Self::Item;
+    fn f32_reinterpret_from_i32(&mut self) -> Self::Item;
+    fn f64_reinterpret_from_i64(&mut self) -> Self::Item;
+    fn extend(&mut self, sign: Signedness) -> Self::Item;
+    fn i_sat_trunc_from_f(&mut self, input_ty: Float, output_ty: SignfulInt) -> Self::Item;
+    fn memory_init(&mut self, segment: u32) -> Self::Item;
+    fn data_drop(&mut self, segment: u32) -> Self::Item;
+    fn memory_copy(&mut self) -> Self::Item;
+    fn memory_fill(&mut self) -> Self::Item;
+    fn table_init(&mut self, segment: u32) -> Self::Item;
+    fn elem_drop(&mut self, segment: u32) -> Self::Item;
+    fn table_copy(&mut self) -> Self::Item;
+}
+
+/// Type of a control frame.
+#[derive(Debug, Clone, PartialEq)]
+enum ControlFrameKind {
+    /// A regular block frame.
+    ///
+    /// Can be used for an implicit function block.
+    Block {
+        needs_end_label: bool,
+    },
+    Function,
+    /// Loop frame (branching to the beginning of block).
+    Loop,
+    /// True-subblock of if expression.
+    If {
+        has_else: bool,
+    },
+}
+
+#[derive(Debug, Clone, PartialEq)]
+struct ControlFrame {
+    id: u32,
+    arguments: u32,
+    returns: Vec<SignlessType>,
+    kind: ControlFrameKind,
+}
+
+impl ControlFrame {
+    fn needs_end_label(&self) -> bool {
+        match self.kind {
+            ControlFrameKind::Block { needs_end_label } => needs_end_label,
+            ControlFrameKind::If { .. } => true,
+            ControlFrameKind::Loop | ControlFrameKind::Function => false,
+        }
+    }
+
+    fn mark_branched_to(&mut self) {
+        if let ControlFrameKind::Block { needs_end_label } = &mut self.kind {
+            *needs_end_label = true
+        }
+    }
+
+    fn br_target(&self) -> BrTarget<(u32, NameTag)> {
+        match self.kind {
+            ControlFrameKind::Loop => BrTarget::Label((self.id, NameTag::Header)),
+            ControlFrameKind::Function => BrTarget::Return,
+            ControlFrameKind::Block { .. } | ControlFrameKind::If { .. } => {
+                BrTarget::Label((self.id, NameTag::End))
+            }
+        }
+    }
+}
+
+pub struct MicrowasmConv<'a, 'b, M> {
+    // TODO: Maybe have a `ConvInner` type and have this wrap an `Option` so that
+    //       we can dealloc everything when we've finished emitting
+    is_done: bool,
+    consts_to_emit: Option<Vec<Value>>,
+    stack: Vec<SignlessType>,
+    internal: OperatorsReader<'a>,
+    module: &'b M,
+    current_id: u32,
+    control_frames: Vec<ControlFrame>,
+    unreachable: bool,
+}
+
+#[derive(Debug)]
+enum SigT {
+    T,
+    Concrete(SignlessType),
+}
+
+impl From<SignlessType> for SigT {
+    fn from(other: SignlessType) -> SigT {
+        SigT::Concrete(other)
+    }
+}
+
+#[derive(Debug)]
+pub struct OpSig {
+    input: SmallVec<[SigT; 3]>,
+    output: SmallVec<[SigT; 3]>,
+}
+
+impl OpSig {
+    #[inline(always)]
+    fn new<I0, I1>(input: I0, output: I1) -> Self
+    where
+        I0: IntoIterator<Item = SigT>,
+        I1: IntoIterator<Item = SigT>,
+    {
+        OpSig {
+            input: SmallVec::from_iter(input),
+            output: SmallVec::from_iter(output),
+        }
+    }
+
+    fn none() -> Self {
+        Self::new(None, None)
+    }
+}
+
+impl<T> From<&'_ T> for OpSig
+where
+    T: Signature,
+{
+    fn from(other: &T) -> Self {
+        OpSig::new(
+            other
+                .params()
+                .iter()
+                .map(|t| SigT::Concrete(t.to_microwasm_type())),
+            other
+                .returns()
+                .iter()
+                .map(|t| SigT::Concrete(t.to_microwasm_type())),
+        )
+    }
+}
+
+impl<'a, 'b, M: ModuleContext> MicrowasmConv<'a, 'b, M>
+where
+    for<'any> &'any M::Signature: Into<OpSig>,
+{
+    pub fn new(
+        context: &'b M,
+        params: impl IntoIterator<Item = SignlessType>,
+        returns: impl IntoIterator<Item = SignlessType>,
+        reader: &'a FunctionBody,
+    ) -> Result<Self, Error> {
+        let locals_reader = reader
+            .get_locals_reader()
+            .map_err(|_| Error::Microwasm("Failed to get locals reader".to_string()))?;
+        let mut locals = Vec::from_iter(params);
+        let mut consts = Vec::new();
+
+        for loc in locals_reader {
+            let (count, ty) =
+                loc.map_err(|_| Error::Microwasm("Getting local failed".to_string()))?;
+            let ty = Type::from_wasm(ty)
+                .map_err(|_| Error::Microwasm("Invalid local type".to_string()))?;
+
+            locals.extend(std::iter::repeat(ty).take(count as _));
+            consts.extend(
+                std::iter::repeat(ty)
+                    .map(Value::default_for_type)
+                    .take(count as _),
+            )
+        }
+
+        let num_locals = locals.len() as _;
+
+        let operators_reader = reader
+            .get_operators_reader()
+            .map_err(|_| Error::Microwasm("Failed to get operators reader".to_string()))?;
+        let mut out = Self {
+            is_done: false,
+            stack: locals,
+            module: context,
+            consts_to_emit: Some(consts),
+            internal: operators_reader,
+            current_id: 0,
+            control_frames: vec![],
+            unreachable: false,
+        };
+
+        let id = out.next_id();
+        out.control_frames.push(ControlFrame {
+            id,
+            arguments: num_locals,
+            returns: returns.into_iter().collect(),
+            kind: ControlFrameKind::Function,
+        });
+
+        Ok(out)
+    }
+
+    fn op_sig(&self, op: &WasmOperator) -> Result<OpSig, Error> {
+        use self::SigT::T;
+        use std::iter::{empty as none, once};
+
+        #[inline(always)]
+        fn one<A>(a: A) -> impl IntoIterator<Item = SigT>
+        where
+            A: Into<SigT>,
+        {
+            once(a.into())
+        }
+
+        #[inline(always)]
+        fn two<A, B>(a: A, b: B) -> impl IntoIterator<Item = SigT>
+        where
+            A: Into<SigT>,
+            B: Into<SigT>,
+        {
+            once(a.into()).chain(once(b.into()))
+        }
+
+        #[inline(always)]
+        fn three<A, B, C>(a: A, b: B, c: C) -> impl IntoIterator<Item = SigT>
+        where
+            A: Into<SigT>,
+            B: Into<SigT>,
+            C: Into<SigT>,
+        {
+            once(a.into()).chain(once(b.into())).chain(once(c.into()))
+        }
+
+        macro_rules! sig {
+            (@iter $a:expr, $b:expr, $c:expr) => { three($a, $b, $c) };
+            (@iter $a:expr, $b:expr) => { two($a, $b) };
+            (@iter $a:expr) => { one($a) };
+            (@iter) => { none() };
+            (($($t:expr),*) -> ($($o:expr),*)) => {
+                OpSig::new(sig!(@iter $($t),*), sig!(@iter $($o),*))
+            };
+        }
+
+        let o = match op {
+            WasmOperator::Unreachable => OpSig::none(),
+            WasmOperator::Nop => OpSig::none(),
+
+            WasmOperator::Block { .. } => OpSig::none(),
+            WasmOperator::Loop { .. } => OpSig::none(),
+            WasmOperator::If { .. } => sig!((I32) -> ()),
+            WasmOperator::Else => OpSig::none(),
+            WasmOperator::End => OpSig::none(),
+
+            WasmOperator::Br { .. } => OpSig::none(),
+            WasmOperator::BrIf { .. } => sig!((I32) -> ()),
+            WasmOperator::BrTable { .. } => sig!((I32) -> ()),
+            WasmOperator::Return => OpSig::none(),
+
+            WasmOperator::Call { function_index } => {
+                let func_type = self.module.func_type(*function_index);
+                func_type.into()
+            }
+            WasmOperator::CallIndirect { index, .. } => {
+                let func_type = self.module.signature(*index);
+                let mut out = func_type.into();
+                out.input.push(I32.into());
+                out
+            }
+
+            WasmOperator::Drop => sig!((T) -> ()),
+
+            // `Select` pops 3 elements and pushes 1
+            WasmOperator::Select => sig!((T, T, I32) -> (T)),
+
+            WasmOperator::LocalGet { local_index } => {
+                let ty = self.stack[*local_index as usize];
+
+                sig!(() -> (ty))
+            }
+            WasmOperator::LocalSet { local_index } => {
+                let ty = self.stack[*local_index as usize];
+
+                sig!((ty) -> ())
+            }
+            WasmOperator::LocalTee { local_index } => {
+                let ty = self.stack[*local_index as usize];
+
+                sig!((ty) -> (ty))
+            }
+
+            WasmOperator::GlobalGet { global_index } => {
+                sig!(() -> (self.module.global_type(*global_index).to_microwasm_type()))
+            }
+            WasmOperator::GlobalSet { global_index } => {
+                sig!((self.module.global_type(*global_index).to_microwasm_type()) -> ())
+            }
+
+            WasmOperator::F32Load { .. } => sig!((I32) -> (F32)),
+            WasmOperator::F64Load { .. } => sig!((I32) -> (F64)),
+
+            WasmOperator::I32Load { .. }
+            | WasmOperator::I32Load8S { .. }
+            | WasmOperator::I32Load8U { .. }
+            | WasmOperator::I32Load16S { .. }
+            | WasmOperator::I32Load16U { .. } => sig!((I32) -> (I32)),
+
+            WasmOperator::I64Load { .. }
+            | WasmOperator::I64Load8S { .. }
+            | WasmOperator::I64Load8U { .. }
+            | WasmOperator::I64Load16S { .. }
+            | WasmOperator::I64Load16U { .. }
+            | WasmOperator::I64Load32S { .. }
+            | WasmOperator::I64Load32U { .. } => sig!((I32) -> (I64)),
+
+            WasmOperator::F32Store { .. } => sig!((I32, F32) -> ()),
+            WasmOperator::F64Store { .. } => sig!((I32, F64) -> ()),
+            WasmOperator::I32Store { .. }
+            | WasmOperator::I32Store8 { .. }
+            | WasmOperator::I32Store16 { .. } => sig!((I32, I32) -> ()),
+            WasmOperator::I64Store { .. }
+            | WasmOperator::I64Store8 { .. }
+            | WasmOperator::I64Store16 { .. }
+            | WasmOperator::I64Store32 { .. } => sig!((I32, I64) -> ()),
+
+            WasmOperator::MemorySize { .. } => sig!(() -> (I32)),
+            WasmOperator::MemoryGrow { .. } => sig!((I32) -> (I32)),
+
+            WasmOperator::I32Const { .. } => sig!(() -> (I32)),
+            WasmOperator::I64Const { .. } => sig!(() -> (I64)),
+            WasmOperator::F32Const { .. } => sig!(() -> (F32)),
+            WasmOperator::F64Const { .. } => sig!(() -> (F64)),
+
+            WasmOperator::RefNull => {
+                return Err(Error::Microwasm("RefNull unimplemented".to_string()))
+            }
+            WasmOperator::RefIsNull => {
+                return Err(Error::Microwasm("RefIsNull unimplemented".to_string()))
+            }
+
+            // All comparison operators remove 2 elements and push 1
+            WasmOperator::I32Eqz => sig!((I32) -> (I32)),
+            WasmOperator::I32Eq
+            | WasmOperator::I32Ne
+            | WasmOperator::I32LtS
+            | WasmOperator::I32LtU
+            | WasmOperator::I32GtS
+            | WasmOperator::I32GtU
+            | WasmOperator::I32LeS
+            | WasmOperator::I32LeU
+            | WasmOperator::I32GeS
+            | WasmOperator::I32GeU => sig!((I32, I32) -> (I32)),
+
+            WasmOperator::I64Eqz => sig!((I64) -> (I32)),
+            WasmOperator::I64Eq
+            | WasmOperator::I64Ne
+            | WasmOperator::I64LtS
+            | WasmOperator::I64LtU
+            | WasmOperator::I64GtS
+            | WasmOperator::I64GtU
+            | WasmOperator::I64LeS
+            | WasmOperator::I64LeU
+            | WasmOperator::I64GeS
+            | WasmOperator::I64GeU => sig!((I64, I64) -> (I32)),
+
+            WasmOperator::F32Eq
+            | WasmOperator::F32Ne
+            | WasmOperator::F32Lt
+            | WasmOperator::F32Gt
+            | WasmOperator::F32Le
+            | WasmOperator::F32Ge => sig!((F32, F32) -> (I32)),
+
+            WasmOperator::F64Eq
+            | WasmOperator::F64Ne
+            | WasmOperator::F64Lt
+            | WasmOperator::F64Gt
+            | WasmOperator::F64Le
+            | WasmOperator::F64Ge => sig!((F64, F64) -> (I32)),
+
+            WasmOperator::I32Clz | WasmOperator::I32Ctz | WasmOperator::I32Popcnt => {
+                sig!((I32) -> (I32))
+            }
+            WasmOperator::I64Clz | WasmOperator::I64Ctz | WasmOperator::I64Popcnt => {
+                sig!((I64) -> (I64))
+            }
+
+            WasmOperator::I32Add
+            | WasmOperator::I32Sub
+            | WasmOperator::I32Mul
+            | WasmOperator::I32DivS
+            | WasmOperator::I32DivU
+            | WasmOperator::I32RemS
+            | WasmOperator::I32RemU
+            | WasmOperator::I32And
+            | WasmOperator::I32Or
+            | WasmOperator::I32Xor
+            | WasmOperator::I32Shl
+            | WasmOperator::I32ShrS
+            | WasmOperator::I32ShrU
+            | WasmOperator::I32Rotl
+            | WasmOperator::I32Rotr => sig!((I32, I32) -> (I32)),
+
+            WasmOperator::I64Add
+            | WasmOperator::I64Sub
+            | WasmOperator::I64Mul
+            | WasmOperator::I64DivS
+            | WasmOperator::I64DivU
+            | WasmOperator::I64RemS
+            | WasmOperator::I64RemU
+            | WasmOperator::I64And
+            | WasmOperator::I64Or
+            | WasmOperator::I64Xor
+            | WasmOperator::I64Shl
+            | WasmOperator::I64ShrS
+            | WasmOperator::I64ShrU
+            | WasmOperator::I64Rotl
+            | WasmOperator::I64Rotr => sig!((I64, I64) -> (I64)),
+
+            WasmOperator::F32Abs
+            | WasmOperator::F32Neg
+            | WasmOperator::F32Ceil
+            | WasmOperator::F32Floor
+            | WasmOperator::F32Trunc
+            | WasmOperator::F32Nearest
+            | WasmOperator::F32Sqrt => sig!((F32) -> (F32)),
+
+            WasmOperator::F64Abs
+            | WasmOperator::F64Neg
+            | WasmOperator::F64Ceil
+            | WasmOperator::F64Floor
+            | WasmOperator::F64Trunc
+            | WasmOperator::F64Nearest
+            | WasmOperator::F64Sqrt => sig!((F64) -> (F64)),
+
+            WasmOperator::F32Add
+            | WasmOperator::F32Sub
+            | WasmOperator::F32Mul
+            | WasmOperator::F32Div
+            | WasmOperator::F32Min
+            | WasmOperator::F32Max
+            | WasmOperator::F32Copysign => sig!((F32, F32) -> (F32)),
+
+            WasmOperator::F64Add
+            | WasmOperator::F64Sub
+            | WasmOperator::F64Mul
+            | WasmOperator::F64Div
+            | WasmOperator::F64Min
+            | WasmOperator::F64Max
+            | WasmOperator::F64Copysign => sig!((F64, F64) -> (F64)),
+
+            WasmOperator::I32WrapI64 => sig!((I64) -> (I32)),
+            WasmOperator::I32TruncF32S | WasmOperator::I32TruncF32U => sig!((F32) -> (I32)),
+            WasmOperator::I32TruncF64S | WasmOperator::I32TruncF64U => sig!((F64) -> (I32)),
+            WasmOperator::I64ExtendI32S | WasmOperator::I64ExtendI32U => sig!((I32) -> (I64)),
+            WasmOperator::I64TruncF32S | WasmOperator::I64TruncF32U => sig!((F32) -> (I64)),
+            WasmOperator::I64TruncF64S | WasmOperator::I64TruncF64U => sig!((F64) -> (I64)),
+            WasmOperator::F32ConvertI32S | WasmOperator::F32ConvertI32U => sig!((I32) -> (F32)),
+            WasmOperator::F32ConvertI64S | WasmOperator::F32ConvertI64U => sig!((I64) -> (F32)),
+            WasmOperator::F32DemoteF64 => sig!((F64) -> (F32)),
+            WasmOperator::F64ConvertI32S | WasmOperator::F64ConvertI32U => sig!((I32) -> (F64)),
+            WasmOperator::F64ConvertI64S | WasmOperator::F64ConvertI64U => sig!((I64) -> (F64)),
+            WasmOperator::F64PromoteF32 => sig!((F32) -> (F64)),
+            WasmOperator::I32ReinterpretF32 => sig!((F32) -> (I32)),
+            WasmOperator::I64ReinterpretF64 => sig!((F64) -> (I64)),
+            WasmOperator::F32ReinterpretI32 => sig!((I32) -> (F32)),
+            WasmOperator::F64ReinterpretI64 => sig!((I64) -> (F64)),
+
+            WasmOperator::I32Extend8S => sig!((I32) -> (I32)),
+            WasmOperator::I32Extend16S => sig!((I32) -> (I32)),
+            WasmOperator::I64Extend8S => sig!((I32) -> (I64)),
+            WasmOperator::I64Extend16S => sig!((I32) -> (I64)),
+            WasmOperator::I64Extend32S => sig!((I32) -> (I64)),
+
+            _ => return Err(Error::Microwasm("Opcode Unimplemented".to_string())),
+        };
+        Ok(o)
+    }
+
+    fn next_id(&mut self) -> u32 {
+        let id = self.current_id;
+        self.current_id += 1;
+        id
+    }
+
+    fn nth_block(&self, n: usize) -> &ControlFrame {
+        self.control_frames.iter().rev().nth(n).unwrap()
+    }
+
+    fn nth_block_mut(&mut self, n: usize) -> &mut ControlFrame {
+        self.control_frames.iter_mut().rev().nth(n).unwrap()
+    }
+
+    fn function_block(&self) -> &ControlFrame {
+        self.control_frames.first().unwrap()
+    }
+
+    fn local_depth(&self, idx: u32) -> i32 {
+        self.stack.len() as i32 - 1 - idx as i32
+    }
+
+    fn apply_op(&mut self, sig: OpSig) -> Result<(), Error> {
+        let mut ty_param = None;
+
+        for p in sig.input.iter().rev() {
+            let stack_ty = match self.stack.pop() {
+                Some(e) => e,
+                None => return Err(Error::Microwasm("Stack is empty".to_string())),
+            };
+
+            let ty = match p {
+                SigT::T => {
+                    if let Some(t) = ty_param {
+                        t
+                    } else {
+                        ty_param = Some(stack_ty);
+                        stack_ty
+                    }
+                }
+                SigT::Concrete(ty) => *ty,
+            };
+
+            debug_assert_eq!(ty, stack_ty);
+        }
+
+        for p in sig.output.into_iter().rev() {
+            let ty = match p {
+                SigT::T => match ty_param {
+                    Some(e) => e,
+                    None => return Err(Error::Microwasm("Type parameter was not set".to_string())),
+                },
+                SigT::Concrete(ty) => ty,
+            };
+            self.stack.push(ty);
+        }
+        Ok(())
+    }
+
+    fn block_params(&self) -> Vec<SignlessType> {
+        self.stack.clone()
+    }
+
+    fn block_params_with_wasm_type(
+        &self,
+        ty: wasmparser::TypeOrFuncType,
+    ) -> Result<Vec<SignlessType>, Error> {
+        let mut out = self.block_params();
+        let return_wasm_type = create_returns_from_wasm_type(ty)?;
+        out.extend(return_wasm_type);
+        Ok(out)
+    }
+}
+
+impl<'a, 'b, M: ModuleContext> Iterator for MicrowasmConv<'a, 'b, M>
+where
+    for<'any> &'any M::Signature: Into<OpSig>,
+{
+    type Item = Result<SmallVec<[OperatorFromWasm; 1]>, Error>;
+
+    fn next(&mut self) -> Option<Result<SmallVec<[OperatorFromWasm; 1]>, Error>> {
+        macro_rules! to_drop {
+            ($block:expr) => {{
+                let block = &$block;
+                let first_non_local_depth = block.returns.len() as u32;
+
+                (|| {
+                    let last_non_local_depth = (self.stack.len() as u32)
+                        .checked_sub(1)?
+                        .checked_sub(block.arguments)?;
+
+                    if first_non_local_depth <= last_non_local_depth {
+                        Some(first_non_local_depth..=last_non_local_depth)
+                    } else {
+                        None
+                    }
+                })()
+            }};
+        }
+
+        if self.is_done {
+            return None;
+        }
+
+        if let Some(consts) = self.consts_to_emit.take() {
+            return Some(Ok(consts.into_iter().map(Operator::Const).collect()));
+        }
+
+        if self.unreachable {
+            self.unreachable = false;
+            let mut depth = 0;
+
+            // `if..then..else`/`br_if` means that there may be branches in which
+            // the instruction that caused us to mark this as unreachable to not
+            // be executed. Tracking this in the microwasm translation step is
+            // very complicated so we just do basic code removal here and leave
+            // the removal of uncalled blocks to the backend.
+            return Some(Ok(loop {
+                let op = match self.internal.read() {
+                    Err(e) => return Some(Err(e.into())),
+                    Ok(o) => o,
+                };
+                match op {
+                    WasmOperator::Block { .. }
+                    | WasmOperator::Loop { .. }
+                    | WasmOperator::If { .. } => {
+                        depth += 1;
+                    }
+                    WasmOperator::Else => {
+                        if depth == 0 {
+                            let block = match self.control_frames.last_mut() {
+                                Some(e) => e,
+                                None => {
+                                    return Some(Err(Error::Microwasm(
+                                        "unreachable Block else Failed".to_string(),
+                                    )))
+                                }
+                            };
+
+                            self.stack.truncate(block.arguments as _);
+
+                            if let ControlFrameKind::If { has_else, .. } = &mut block.kind {
+                                *has_else = true;
+                            }
+
+                            break smallvec![Operator::Label((block.id, NameTag::Else))];
+                        }
+                    }
+                    WasmOperator::End => {
+                        if depth == 0 {
+                            let block = match self.control_frames.pop() {
+                                Some(e) => e,
+                                None => {
+                                    return Some(Err(Error::Microwasm(
+                                        "unreachable Block end Failed".to_string(),
+                                    )))
+                                }
+                            };
+
+                            if self.control_frames.is_empty() {
+                                self.is_done = true;
+                                return None;
+                            }
+
+                            self.stack.truncate(block.arguments as _);
+                            self.stack.extend(block.returns);
+
+                            let end_label = (block.id, NameTag::End);
+
+                            if let ControlFrameKind::If {
+                                has_else: false, ..
+                            } = block.kind
+                            {
+                                break smallvec![
+                                    Operator::Label((block.id, NameTag::Else)),
+                                    Operator::Br {
+                                        target: BrTarget::Label(end_label),
+                                    },
+                                    Operator::Label(end_label),
+                                ];
+                            } else {
+                                break smallvec![Operator::Label((block.id, NameTag::End))];
+                            }
+                        } else {
+                            depth -= 1;
+                        }
+                    }
+                    _ => {}
+                }
+            }));
+        }
+
+        let op = match self.internal.read() {
+            Err(e) => return Some(Err(e.into())),
+            Ok(o) => o,
+        };
+
+        let op_sig = match self.op_sig(&op) {
+            Ok(o) => o,
+            Err(e) => return Some(Err(e)),
+        };
+
+        match self.apply_op(op_sig) {
+            Ok(o) => o,
+            Err(e) => return Some(Err(e)),
+        };
+
+        Some(Ok(match op {
+            WasmOperator::Unreachable => {
+                self.unreachable = true;
+                smallvec![Operator::Unreachable]
+            }
+            WasmOperator::Nop => smallvec![],
+            WasmOperator::Block { ty } => {
+                let id = self.next_id();
+                let return_type_wasm = match create_returns_from_wasm_type(ty) {
+                    Ok(o) => o,
+                    Err(e) => return Some(Err(e)),
+                };
+                let block_param_type_wasm = match self.block_params_with_wasm_type(ty) {
+                    Err(e) => return Some(Err(e)),
+                    Ok(o) => o,
+                };
+                self.control_frames.push(ControlFrame {
+                    id,
+                    arguments: self.stack.len() as u32,
+                    returns: return_type_wasm,
+                    kind: ControlFrameKind::Block {
+                        needs_end_label: false,
+                    },
+                });
+                smallvec![Operator::end(block_param_type_wasm, (id, NameTag::End))]
+            }
+            WasmOperator::Loop { ty } => {
+                let id = self.next_id();
+                let return_type_wasm = match create_returns_from_wasm_type(ty) {
+                    Ok(o) => o,
+                    Err(e) => return Some(Err(e)),
+                };
+                let block_param_type_wasm = match self.block_params_with_wasm_type(ty) {
+                    Ok(o) => o,
+                    Err(e) => return Some(Err(e)),
+                };
+                self.control_frames.push(ControlFrame {
+                    id,
+                    arguments: self.stack.len() as u32,
+                    returns: return_type_wasm,
+                    kind: ControlFrameKind::Loop,
+                });
+                let label = (id, NameTag::Header);
+                smallvec![
+                    Operator::loop_(self.block_params(), label),
+                    Operator::end(block_param_type_wasm, (id, NameTag::End)),
+                    Operator::Br {
+                        target: BrTarget::Label(label),
+                    },
+                    Operator::Label(label),
+                ]
+            }
+            WasmOperator::If { ty } => {
+                let id = self.next_id();
+                let return_type_wasm = match create_returns_from_wasm_type(ty) {
+                    Ok(o) => o,
+                    Err(e) => return Some(Err(e)),
+                };
+                let block_param_type_wasm = match self.block_params_with_wasm_type(ty) {
+                    Ok(o) => o,
+                    Err(e) => return Some(Err(e)),
+                };
+                self.control_frames.push(ControlFrame {
+                    id,
+                    arguments: self.stack.len() as u32,
+                    returns: return_type_wasm,
+                    kind: ControlFrameKind::If { has_else: false },
+                });
+                let (then, else_, end) = (
+                    (id, NameTag::Header),
+                    (id, NameTag::Else),
+                    (id, NameTag::End),
+                );
+                smallvec![
+                    Operator::block(self.block_params(), then),
+                    Operator::block(self.block_params(), else_),
+                    Operator::end(block_param_type_wasm, end),
+                    Operator::BrIf {
+                        then: BrTarget::Label(then).into(),
+                        else_: BrTarget::Label(else_).into()
+                    },
+                    Operator::Label(then),
+                ]
+            }
+            WasmOperator::Else => {
+                // We don't pop it since we're still in the second block.
+                let block = match self.control_frames.last() {
+                    Some(e) => e,
+                    None => return Some(Err(Error::Microwasm("Block else Failed".to_string()))),
+                };
+                let to_drop = to_drop!(block);
+                let block = match self.control_frames.last_mut() {
+                    Some(e) => e,
+                    None => return Some(Err(Error::Microwasm("Block else Failed".to_string()))),
+                };
+
+                if let ControlFrameKind::If { has_else, .. } = &mut block.kind {
+                    *has_else = true;
+                }
+
+                self.stack.truncate(block.arguments as _);
+
+                let label = (block.id, NameTag::Else);
+
+                SmallVec::from_iter(
+                    to_drop
+                        .into_iter()
+                        .map(Operator::Drop)
+                        .chain(iter::once(Operator::Br {
+                            target: BrTarget::Label((block.id, NameTag::End)),
+                        }))
+                        .chain(iter::once(Operator::Label(label))),
+                )
+            }
+            WasmOperator::End => {
+                let block = match self.control_frames.pop() {
+                    Some(e) => e,
+                    None => return Some(Err(Error::Microwasm("Block End Failed".to_string()))),
+                };
+
+                let to_drop = to_drop!(block);
+
+                self.stack.truncate(block.arguments as _);
+                self.stack.extend(block.returns.iter().cloned());
+
+                if let ControlFrameKind::If {
+                    has_else: false, ..
+                } = block.kind
+                {
+                    let else_ = (block.id, NameTag::Else);
+                    let end = (block.id, NameTag::End);
+
+                    to_drop
+                        .map(Operator::Drop)
+                        .into_iter()
+                        .chain::<SmallVec<[_; 4]>>(smallvec![
+                            Operator::Br {
+                                target: BrTarget::Label(end),
+                            },
+                            Operator::Label(else_),
+                            Operator::Br {
+                                target: BrTarget::Label(end),
+                            },
+                            Operator::Label(end),
+                        ])
+                        .collect()
+                } else {
+                    SmallVec::from_iter(if self.control_frames.is_empty() {
+                        self.is_done = true;
+
+                        None.into_iter()
+                            .chain(Some(Operator::Br {
+                                target: BrTarget::Return,
+                            }))
+                            .chain(None)
+                    } else if block.needs_end_label() {
+                        let label = (block.id, NameTag::End);
+
+                        to_drop
+                            .map(Operator::Drop)
+                            .into_iter()
+                            .chain(Some(Operator::Br {
+                                target: BrTarget::Label(label),
+                            }))
+                            .chain(Some(Operator::Label(label)))
+                    } else {
+                        to_drop
+                            .map(Operator::Drop)
+                            .into_iter()
+                            .chain(None)
+                            .chain(None)
+                    })
+                }
+            }
+            // TODO: If we're breaking out of the function block we want
+            //       to drop locals too (see code for `WasmOperator::End`)
+            WasmOperator::Br { relative_depth } => {
+                self.unreachable = true;
+                let to_drop = to_drop!(self.nth_block(relative_depth as _));
+
+                let block = self.nth_block_mut(relative_depth as _);
+                block.mark_branched_to();
+                SmallVec::from_iter(to_drop.into_iter().map(Operator::Drop).chain(iter::once(
+                    Operator::Br {
+                        target: block.br_target(),
+                    },
+                )))
+            }
+            WasmOperator::BrIf { relative_depth } => {
+                let to_drop = to_drop!(self.nth_block(relative_depth as _));
+
+                let label = (self.next_id(), NameTag::Header);
+                let params = self.block_params();
+                let block = self.nth_block_mut(relative_depth as _);
+                block.mark_branched_to();
+
+                smallvec![
+                    Operator::block(params, label),
+                    Operator::BrIf {
+                        then: BrTargetDrop {
+                            to_drop,
+                            target: block.br_target()
+                        },
+                        else_: BrTarget::Label(label).into(),
+                    },
+                    Operator::Label(label),
+                ]
+            }
+            WasmOperator::BrTable { table } => {
+                self.unreachable = true;
+                let (entries, default) = match table.read_table() {
+                    Ok(o) => o,
+                    Err(e) => return Some(Err(e.into())),
+                };
+                let targets = entries
+                    .iter()
+                    .map(|depth| {
+                        self.nth_block_mut(*depth as _).mark_branched_to();
+                        let block = self.nth_block(*depth as _);
+
+                        let target = block.br_target();
+                        BrTargetDrop {
+                            to_drop: to_drop!(block),
+                            target,
+                        }
+                    })
+                    .collect();
+
+                self.nth_block_mut(default as _).mark_branched_to();
+
+                let default = self.nth_block(default as _);
+                let target = default.br_target();
+                let default = BrTargetDrop {
+                    to_drop: to_drop!(default),
+                    target,
+                };
+
+                smallvec![Operator::BrTable(BrTable { targets, default })]
+            }
+            WasmOperator::Return => {
+                self.unreachable = true;
+
+                let block = self.function_block();
+                let to_drop = to_drop!(block);
+
+                SmallVec::from_iter(to_drop.into_iter().map(Operator::Drop).chain(iter::once(
+                    Operator::Br {
+                        target: block.br_target(),
+                    },
+                )))
+            }
+            WasmOperator::Call { function_index } => smallvec![Operator::Call { function_index }],
+            WasmOperator::CallIndirect { index, table_index } => {
+                smallvec![Operator::CallIndirect {
+                    type_index: index,
+                    table_index,
+                }]
+            }
+            WasmOperator::Drop => smallvec![Operator::Drop(0..=0)],
+            WasmOperator::Select => smallvec![Operator::Select],
+
+            WasmOperator::LocalGet { local_index } => {
+                // `- 1` because we apply the stack difference _before_ this point
+                let depth = self.local_depth(local_index).checked_sub(1)?;
+                let depth = match depth.try_into() {
+                    Ok(o) => o,
+                    Err(_) => {
+                        return Some(Err(Error::Microwasm(
+                            "LocalGet - Local out of range".to_string(),
+                        )))
+                    }
+                };
+                smallvec![Operator::Pick(depth)]
+            }
+            WasmOperator::LocalSet { local_index } => {
+                // `+ 1` because we apply the stack difference _before_ this point
+                let depth = self.local_depth(local_index).checked_add(1)?;
+                let depth = match depth.try_into() {
+                    Ok(o) => o,
+                    Err(_) => {
+                        return Some(Err(Error::Microwasm(
+                            "LocalSet - Local out of range".to_string(),
+                        )))
+                    }
+                };
+                smallvec![Operator::Swap(depth), Operator::Drop(0..=0)]
+            }
+            WasmOperator::LocalTee { local_index } => {
+                // `+ 1` because we `pick` before `swap`
+                let depth = self.local_depth(local_index).checked_add(1)?;
+                let depth = match depth.try_into() {
+                    Ok(o) => o,
+                    Err(_) => {
+                        return Some(Err(Error::Microwasm(
+                            "LocalTee - Local out of range".to_string(),
+                        )))
+                    }
+                };
+                smallvec![
+                    Operator::Pick(0),
+                    Operator::Swap(depth),
+                    Operator::Drop(0..=0),
+                ]
+            }
+            WasmOperator::GlobalGet { global_index } => {
+                smallvec![Operator::GlobalGet(global_index)]
+            }
+            WasmOperator::GlobalSet { global_index } => {
+                smallvec![Operator::GlobalSet(global_index)]
+            }
+
+            WasmOperator::I32Load { memarg } => smallvec![Operator::Load {
+                ty: I32,
+                memarg: memarg.into()
+            }],
+            WasmOperator::I64Load { memarg } => smallvec![Operator::Load {
+                ty: I64,
+                memarg: memarg.into()
+            }],
+            WasmOperator::F32Load { memarg } => smallvec![Operator::Load {
+                ty: F32,
+                memarg: memarg.into()
+            }],
+            WasmOperator::F64Load { memarg } => smallvec![Operator::Load {
+                ty: F64,
+                memarg: memarg.into()
+            }],
+            WasmOperator::I32Load8S { memarg } => smallvec![Operator::Load8 {
+                ty: sint::I32,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I32Load8U { memarg } => smallvec![Operator::Load8 {
+                ty: sint::U32,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I32Load16S { memarg } => smallvec![Operator::Load16 {
+                ty: sint::I32,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I32Load16U { memarg } => smallvec![Operator::Load16 {
+                ty: sint::U32,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I64Load8S { memarg } => smallvec![Operator::Load8 {
+                ty: sint::I64,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I64Load8U { memarg } => smallvec![Operator::Load8 {
+                ty: sint::U64,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I64Load16S { memarg } => smallvec![Operator::Load16 {
+                ty: sint::I64,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I64Load16U { memarg } => smallvec![Operator::Load16 {
+                ty: sint::U64,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I64Load32S { memarg } => smallvec![Operator::Load32 {
+                sign: Signedness::Signed,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I64Load32U { memarg } => smallvec![Operator::Load32 {
+                sign: Signedness::Unsigned,
+                memarg: memarg.into(),
+            }],
+
+            WasmOperator::I32Store { memarg } => smallvec![Operator::Store {
+                ty: I32,
+                memarg: memarg.into()
+            }],
+            WasmOperator::I64Store { memarg } => smallvec![Operator::Store {
+                ty: I64,
+                memarg: memarg.into()
+            }],
+            WasmOperator::F32Store { memarg } => smallvec![Operator::Store {
+                ty: F32,
+                memarg: memarg.into()
+            }],
+            WasmOperator::F64Store { memarg } => smallvec![Operator::Store {
+                ty: F64,
+                memarg: memarg.into()
+            }],
+
+            WasmOperator::I32Store8 { memarg } => smallvec![Operator::Store8 {
+                ty: Size::_32,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I32Store16 { memarg } => smallvec![Operator::Store16 {
+                ty: Size::_32,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I64Store8 { memarg } => smallvec![Operator::Store8 {
+                ty: Size::_64,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I64Store16 { memarg } => smallvec![Operator::Store16 {
+                ty: Size::_64,
+                memarg: memarg.into(),
+            }],
+            WasmOperator::I64Store32 { memarg } => smallvec![Operator::Store32 {
+                memarg: memarg.into()
+            }],
+            WasmOperator::MemorySize { reserved } => smallvec![Operator::MemorySize { reserved }],
+            WasmOperator::MemoryGrow { reserved } => smallvec![Operator::MemoryGrow { reserved }],
+            WasmOperator::I32Const { value } => smallvec![Operator::Const(Value::I32(value))],
+            WasmOperator::I64Const { value } => smallvec![Operator::Const(Value::I64(value))],
+            WasmOperator::F32Const { value } => {
+                smallvec![Operator::Const(Value::F32(value.into()))]
+            }
+            WasmOperator::F64Const { value } => {
+                smallvec![Operator::Const(Value::F64(value.into()))]
+            }
+            WasmOperator::RefNull => {
+                return Some(Err(Error::Microwasm("RefNull unimplemented".to_string())))
+            }
+            WasmOperator::RefIsNull => {
+                return Some(Err(Error::Microwasm("RefIsNull unimplemented".to_string())))
+            }
+            WasmOperator::I32Eqz => smallvec![Operator::Eqz(Size::_32)],
+            WasmOperator::I32Eq => smallvec![Operator::Eq(I32)],
+            WasmOperator::I32Ne => smallvec![Operator::Ne(I32)],
+            WasmOperator::I32LtS => smallvec![Operator::Lt(SI32)],
+            WasmOperator::I32LtU => smallvec![Operator::Lt(SU32)],
+            WasmOperator::I32GtS => smallvec![Operator::Gt(SI32)],
+            WasmOperator::I32GtU => smallvec![Operator::Gt(SU32)],
+            WasmOperator::I32LeS => smallvec![Operator::Le(SI32)],
+            WasmOperator::I32LeU => smallvec![Operator::Le(SU32)],
+            WasmOperator::I32GeS => smallvec![Operator::Ge(SI32)],
+            WasmOperator::I32GeU => smallvec![Operator::Ge(SU32)],
+            WasmOperator::I64Eqz => smallvec![Operator::Eqz(Size::_64)],
+            WasmOperator::I64Eq => smallvec![Operator::Eq(I64)],
+            WasmOperator::I64Ne => smallvec![Operator::Ne(I64)],
+            WasmOperator::I64LtS => smallvec![Operator::Lt(SI64)],
+            WasmOperator::I64LtU => smallvec![Operator::Lt(SU64)],
+            WasmOperator::I64GtS => smallvec![Operator::Gt(SI64)],
+            WasmOperator::I64GtU => smallvec![Operator::Gt(SU64)],
+            WasmOperator::I64LeS => smallvec![Operator::Le(SI64)],
+            WasmOperator::I64LeU => smallvec![Operator::Le(SU64)],
+            WasmOperator::I64GeS => smallvec![Operator::Ge(SI64)],
+            WasmOperator::I64GeU => smallvec![Operator::Ge(SU64)],
+            WasmOperator::F32Eq => smallvec![Operator::Eq(F32)],
+            WasmOperator::F32Ne => smallvec![Operator::Ne(F32)],
+            WasmOperator::F32Lt => smallvec![Operator::Lt(SF32)],
+            WasmOperator::F32Gt => smallvec![Operator::Gt(SF32)],
+            WasmOperator::F32Le => smallvec![Operator::Le(SF32)],
+            WasmOperator::F32Ge => smallvec![Operator::Ge(SF32)],
+            WasmOperator::F64Eq => smallvec![Operator::Eq(F64)],
+            WasmOperator::F64Ne => smallvec![Operator::Ne(F64)],
+            WasmOperator::F64Lt => smallvec![Operator::Lt(SF64)],
+            WasmOperator::F64Gt => smallvec![Operator::Gt(SF64)],
+            WasmOperator::F64Le => smallvec![Operator::Le(SF64)],
+            WasmOperator::F64Ge => smallvec![Operator::Ge(SF64)],
+            WasmOperator::I32Clz => smallvec![Operator::Clz(Size::_32)],
+            WasmOperator::I32Ctz => smallvec![Operator::Ctz(Size::_32)],
+            WasmOperator::I32Popcnt => smallvec![Operator::Popcnt(Size::_32)],
+            WasmOperator::I32Add => smallvec![Operator::Add(I32)],
+            WasmOperator::I32Sub => smallvec![Operator::Sub(I32)],
+            WasmOperator::I32Mul => smallvec![Operator::Mul(I32)],
+            WasmOperator::I32DivS => smallvec![Operator::Div(SI32)],
+            WasmOperator::I32DivU => smallvec![Operator::Div(SU32)],
+            // Unlike Wasm, our `rem_s` instruction _does_ trap on `-1`. Instead
+            // of handling this complexity in the backend, we handle it here
+            // (where it's way easier to debug).
+            WasmOperator::I32RemS => smallvec![Operator::Rem(sint::I32),],
+
+            WasmOperator::I32RemU => smallvec![Operator::Rem(sint::U32),],
+            WasmOperator::I32And => smallvec![Operator::And(Size::_32)],
+            WasmOperator::I32Or => smallvec![Operator::Or(Size::_32)],
+            WasmOperator::I32Xor => smallvec![Operator::Xor(Size::_32)],
+            WasmOperator::I32Shl => smallvec![Operator::Shl(Size::_32)],
+            WasmOperator::I32ShrS => smallvec![Operator::Shr(sint::I32)],
+            WasmOperator::I32ShrU => smallvec![Operator::Shr(sint::U32)],
+            WasmOperator::I32Rotl => smallvec![Operator::Rotl(Size::_32)],
+            WasmOperator::I32Rotr => smallvec![Operator::Rotr(Size::_32)],
+            WasmOperator::I64Clz => smallvec![Operator::Clz(Size::_64)],
+            WasmOperator::I64Ctz => smallvec![Operator::Ctz(Size::_64)],
+            WasmOperator::I64Popcnt => smallvec![Operator::Popcnt(Size::_64)],
+            WasmOperator::I64Add => smallvec![Operator::Add(I64)],
+            WasmOperator::I64Sub => smallvec![Operator::Sub(I64)],
+            WasmOperator::I64Mul => smallvec![Operator::Mul(I64)],
+            WasmOperator::I64DivS => smallvec![Operator::Div(SI64)],
+            WasmOperator::I64DivU => smallvec![Operator::Div(SU64)],
+            WasmOperator::I64RemS => smallvec![Operator::Rem(sint::I64),],
+
+            WasmOperator::I64RemU => smallvec![Operator::Rem(sint::U64)],
+            WasmOperator::I64And => smallvec![Operator::And(Size::_64)],
+            WasmOperator::I64Or => smallvec![Operator::Or(Size::_64)],
+            WasmOperator::I64Xor => smallvec![Operator::Xor(Size::_64)],
+            WasmOperator::I64Shl => smallvec![Operator::Shl(Size::_64)],
+            WasmOperator::I64ShrS => smallvec![Operator::Shr(sint::I64)],
+            WasmOperator::I64ShrU => smallvec![Operator::Shr(sint::U64)],
+            WasmOperator::I64Rotl => smallvec![Operator::Rotl(Size::_64)],
+            WasmOperator::I64Rotr => smallvec![Operator::Rotr(Size::_64)],
+            WasmOperator::F32Abs => smallvec![Operator::Abs(Size::_32)],
+            WasmOperator::F32Neg => smallvec![Operator::Neg(Size::_32)],
+            WasmOperator::F32Ceil => smallvec![Operator::Ceil(Size::_32)],
+            WasmOperator::F32Floor => smallvec![Operator::Floor(Size::_32)],
+            WasmOperator::F32Trunc => smallvec![Operator::Trunc(Size::_32)],
+            WasmOperator::F32Nearest => smallvec![Operator::Nearest(Size::_32)],
+            WasmOperator::F32Sqrt => smallvec![Operator::Sqrt(Size::_32)],
+            WasmOperator::F32Add => smallvec![Operator::Add(F32)],
+            WasmOperator::F32Sub => smallvec![Operator::Sub(F32)],
+            WasmOperator::F32Mul => smallvec![Operator::Mul(F32)],
+            WasmOperator::F32Div => smallvec![Operator::Div(SF32)],
+            WasmOperator::F32Min => smallvec![Operator::Min(Size::_32)],
+            WasmOperator::F32Max => smallvec![Operator::Max(Size::_32)],
+            WasmOperator::F32Copysign => smallvec![Operator::Copysign(Size::_32)],
+            WasmOperator::F64Abs => smallvec![Operator::Abs(Size::_64)],
+            WasmOperator::F64Neg => smallvec![Operator::Neg(Size::_64)],
+            WasmOperator::F64Ceil => smallvec![Operator::Ceil(Size::_64)],
+            WasmOperator::F64Floor => smallvec![Operator::Floor(Size::_64)],
+            WasmOperator::F64Trunc => smallvec![Operator::Trunc(Size::_64)],
+            WasmOperator::F64Nearest => smallvec![Operator::Nearest(Size::_64)],
+            WasmOperator::F64Sqrt => smallvec![Operator::Sqrt(Size::_64)],
+            WasmOperator::F64Add => smallvec![Operator::Add(F64)],
+            WasmOperator::F64Sub => smallvec![Operator::Sub(F64)],
+            WasmOperator::F64Mul => smallvec![Operator::Mul(F64)],
+            WasmOperator::F64Div => smallvec![Operator::Div(SF64)],
+            WasmOperator::F64Min => smallvec![Operator::Min(Size::_64)],
+            WasmOperator::F64Max => smallvec![Operator::Max(Size::_64)],
+            WasmOperator::F64Copysign => smallvec![Operator::Copysign(Size::_64)],
+            WasmOperator::I32WrapI64 => smallvec![Operator::I32WrapFromI64],
+            WasmOperator::I32TruncF32S => smallvec![Operator::ITruncFromF {
+                input_ty: Size::_32,
+                output_ty: sint::I32
+            }],
+            WasmOperator::I32TruncF32U => smallvec![Operator::ITruncFromF {
+                input_ty: Size::_32,
+                output_ty: sint::U32
+            }],
+            WasmOperator::I32TruncF64S => smallvec![Operator::ITruncFromF {
+                input_ty: Size::_64,
+                output_ty: sint::I32
+            }],
+            WasmOperator::I32TruncF64U => smallvec![Operator::ITruncFromF {
+                input_ty: Size::_64,
+                output_ty: sint::U32
+            }],
+            WasmOperator::I64ExtendI32S => smallvec![Operator::Extend {
+                sign: Signedness::Signed
+            }],
+            WasmOperator::I64ExtendI32U => smallvec![Operator::Extend {
+                sign: Signedness::Unsigned
+            }],
+            WasmOperator::I64TruncF32S => smallvec![Operator::ITruncFromF {
+                input_ty: Size::_32,
+                output_ty: sint::I64,
+            }],
+            WasmOperator::I64TruncF32U => smallvec![Operator::ITruncFromF {
+                input_ty: Size::_32,
+                output_ty: sint::U64,
+            }],
+            WasmOperator::I64TruncF64S => smallvec![Operator::ITruncFromF {
+                input_ty: Size::_64,
+                output_ty: sint::I64,
+            }],
+            WasmOperator::I64TruncF64U => smallvec![Operator::ITruncFromF {
+                input_ty: Size::_64,
+                output_ty: sint::U64,
+            }],
+            WasmOperator::F32ConvertI32S => smallvec![Operator::FConvertFromI {
+                input_ty: sint::I32,
+                output_ty: Size::_32
+            }],
+            WasmOperator::F32ConvertI32U => smallvec![Operator::FConvertFromI {
+                input_ty: sint::U32,
+                output_ty: Size::_32
+            }],
+            WasmOperator::F32ConvertI64S => smallvec![Operator::FConvertFromI {
+                input_ty: sint::I64,
+                output_ty: Size::_32
+            }],
+            WasmOperator::F32ConvertI64U => smallvec![Operator::FConvertFromI {
+                input_ty: sint::U64,
+                output_ty: Size::_32
+            }],
+            WasmOperator::F64ConvertI32S => smallvec![Operator::FConvertFromI {
+                input_ty: sint::I32,
+                output_ty: Size::_64
+            }],
+            WasmOperator::F64ConvertI32U => smallvec![Operator::FConvertFromI {
+                input_ty: sint::U32,
+                output_ty: Size::_64
+            }],
+            WasmOperator::F64ConvertI64S => smallvec![Operator::FConvertFromI {
+                input_ty: sint::I64,
+                output_ty: Size::_64
+            }],
+            WasmOperator::F64ConvertI64U => smallvec![Operator::FConvertFromI {
+                input_ty: sint::U64,
+                output_ty: Size::_64
+            }],
+            WasmOperator::F32DemoteF64 => smallvec![Operator::F32DemoteFromF64],
+            WasmOperator::F64PromoteF32 => smallvec![Operator::F64PromoteFromF32],
+            WasmOperator::I32ReinterpretF32 => smallvec![Operator::I32ReinterpretFromF32],
+            WasmOperator::I64ReinterpretF64 => smallvec![Operator::I64ReinterpretFromF64],
+            WasmOperator::F32ReinterpretI32 => smallvec![Operator::F32ReinterpretFromI32],
+            WasmOperator::F64ReinterpretI64 => smallvec![Operator::F64ReinterpretFromI64],
+            WasmOperator::I32Extend8S => {
+                return Some(Err(Error::Microwasm(
+                    "I32Extend8S unimplemented".to_string(),
+                )))
+            }
+            WasmOperator::I32Extend16S => {
+                return Some(Err(Error::Microwasm(
+                    "I32Extend16S unimplemented".to_string(),
+                )))
+            }
+            WasmOperator::I64Extend8S => {
+                return Some(Err(Error::Microwasm(
+                    "I64Extend8S unimplemented".to_string(),
+                )))
+            }
+            WasmOperator::I64Extend16S => {
+                return Some(Err(Error::Microwasm(
+                    "I64Extend16S unimplemented".to_string(),
+                )))
+            }
+            WasmOperator::I64Extend32S => {
+                return Some(Err(Error::Microwasm(
+                    "I64Extend32S unimplemented".to_string(),
+                )))
+            }
+
+            // 0xFC operators
+            // Non-trapping Float-to-int Conversions
+            WasmOperator::I32TruncSatF32S => {
+                return Some(Err(Error::Microwasm(
+                    "I32TruncSatF32S unimplemented".to_string(),
+                )))
+            }
+            WasmOperator::I32TruncSatF32U => {
+                return Some(Err(Error::Microwasm(
+                    "I32TruncSatF32U unimplemented".to_string(),
+                )))
+            }
+            WasmOperator::I32TruncSatF64S => {
+                return Some(Err(Error::Microwasm(
+                    "I32TruncSatF64S unimplemented".to_string(),
+                )))
+            }
+            WasmOperator::I32TruncSatF64U => {
+                return Some(Err(Error::Microwasm(
+                    "I32TruncSatF64U unimplemented".to_string(),
+                )))
+            }
+            WasmOperator::I64TruncSatF32S => {
+                return Some(Err(Error::Microwasm(
+                    "I64TruncSatF32S unimplemented".to_string(),
+                )))
+            }
+            WasmOperator::I64TruncSatF32U => {
+                return Some(Err(Error::Microwasm(
+                    "I64TruncSatF32U unimplemented".to_string(),
+                )))
+            }
+            WasmOperator::I64TruncSatF64S => {
+                return Some(Err(Error::Microwasm(
+                    "I64TruncSatF64S unimplemented".to_string(),
+                )))
+            }
+            WasmOperator::I64TruncSatF64U => {
+                return Some(Err(Error::Microwasm(
+                    "I64TruncSatF64U unimplemented".to_string(),
+                )))
+            }
+
+            _other => return Some(Err(Error::Microwasm("Opcode unimplemented".to_string()))),
+        }))
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/lightbeam/module.rs.html b/api/src/lightbeam/module.rs.html new file mode 100644 index 000000000000..e366efb79523 --- /dev/null +++ b/api/src/lightbeam/module.rs.html @@ -0,0 +1,1315 @@ +module.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+
+use crate::backend::TranslatedCodeSection;
+use crate::error::Error;
+use crate::microwasm;
+use crate::translate_sections;
+use cranelift_codegen::{
+    ir::{self, AbiParam, Signature as CraneliftSignature},
+    isa,
+};
+use memoffset::offset_of;
+
+use std::{convert::TryInto, mem};
+use thiserror::Error;
+use wasmparser::{FuncType, MemoryType, ModuleReader, SectionCode, Type};
+
+pub trait AsValueType {
+    const TYPE: Type;
+}
+
+pub trait TypeList {
+    const TYPE_LIST: &'static [Type];
+}
+
+impl<T> TypeList for T
+where
+    T: AsValueType,
+{
+    const TYPE_LIST: &'static [Type] = &[T::TYPE];
+}
+
+impl AsValueType for i32 {
+    const TYPE: Type = Type::I32;
+}
+impl AsValueType for i64 {
+    const TYPE: Type = Type::I64;
+}
+impl AsValueType for u32 {
+    const TYPE: Type = Type::I32;
+}
+impl AsValueType for u64 {
+    const TYPE: Type = Type::I64;
+}
+impl AsValueType for f32 {
+    const TYPE: Type = Type::F32;
+}
+impl AsValueType for f64 {
+    const TYPE: Type = Type::F64;
+}
+
+pub trait FunctionArgs<O> {
+    type FuncType;
+
+    unsafe fn call(self, func: Self::FuncType, vm_ctx: *const u8) -> O;
+    fn into_func(start: *const u8) -> Self::FuncType;
+}
+
+type VmCtxPtr = u64;
+
+macro_rules! impl_function_args {
+    ($first:ident $(, $rest:ident)*) => {
+        impl<Output, $first, $($rest),*> FunctionArgs<Output> for ($first, $($rest),*) {
+            type FuncType = unsafe extern "sysv64" fn(VmCtxPtr, $first $(, $rest)*) -> Output;
+
+            #[allow(non_snake_case)]
+            unsafe fn call(self, func: Self::FuncType, vm_ctx: *const u8) -> Output {
+                let ($first, $($rest),*) = self;
+                func(vm_ctx as VmCtxPtr, $first $(, $rest)*)
+            }
+
+            fn into_func(start: *const u8) -> Self::FuncType {
+                unsafe { mem::transmute(start) }
+            }
+        }
+
+        impl<$first: AsValueType, $($rest: AsValueType),*> TypeList for ($first, $($rest),*) {
+            const TYPE_LIST: &'static [Type] = &[$first::TYPE, $($rest::TYPE),*];
+        }
+
+        impl_function_args!($($rest),*);
+    };
+    () => {
+        impl<Output> FunctionArgs<Output> for () {
+            type FuncType = unsafe extern "sysv64" fn(VmCtxPtr) -> Output;
+
+            unsafe fn call(self, func: Self::FuncType, vm_ctx: *const u8) -> Output {
+                func(vm_ctx as VmCtxPtr)
+            }
+
+            fn into_func(start: *const u8) -> Self::FuncType {
+                unsafe { mem::transmute(start) }
+            }
+        }
+
+        impl TypeList for () {
+            const TYPE_LIST: &'static [Type] = &[];
+        }
+    };
+}
+
+impl_function_args!(A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S);
+
+#[derive(Default)]
+pub struct TranslatedModule {
+    translated_code_section: Option<TranslatedCodeSection>,
+    ctx: SimpleContext,
+    // TODO: Should we wrap this in a `Mutex` so that calling functions from multiple
+    //       threads doesn't cause data races?
+    memory: Option<MemoryType>,
+}
+
+impl TranslatedModule {
+    pub fn instantiate(self) -> ExecutableModule {
+        let mem_size = self.memory.map(|m| m.limits.initial).unwrap_or(0) as usize;
+        let mem: BoxSlice<_> = vec![0u8; mem_size * WASM_PAGE_SIZE]
+            .into_boxed_slice()
+            .into();
+
+        let ctx = if mem.len > 0 {
+            Some(Box::new(VmCtx { mem }) as Box<VmCtx>)
+        } else {
+            None
+        };
+
+        ExecutableModule {
+            module: self,
+            context: ctx,
+        }
+    }
+
+    pub fn disassemble(&self) {
+        self.translated_code_section
+            .as_ref()
+            .expect("no code section")
+            .disassemble();
+    }
+}
+
+#[derive(Debug, Copy, Clone, PartialEq, Eq, Error)]
+pub enum ExecutionError {
+    #[error("function index out of bounds")]
+    FuncIndexOutOfBounds,
+    #[error("type mismatch")]
+    TypeMismatch,
+}
+
+pub struct ExecutableModule {
+    module: TranslatedModule,
+    context: Option<Box<VmCtx>>,
+}
+
+impl ExecutableModule {
+    /// Executes the function identified by `func_idx`.
+    ///
+    /// # Safety
+    ///
+    /// Executes the function _without_ checking the argument types.
+    /// This can cause undefined memory to be accessed.
+    pub unsafe fn execute_func_unchecked<Args: FunctionArgs<T>, T>(
+        &self,
+        func_idx: u32,
+        args: Args,
+    ) -> T {
+        let code_section = self
+            .module
+            .translated_code_section
+            .as_ref()
+            .expect("no code section");
+        let start_buf = code_section.func_start(func_idx as usize);
+
+        args.call(
+            Args::into_func(start_buf),
+            self.context
+                .as_ref()
+                .map(|ctx| (&**ctx) as *const VmCtx as *const u8)
+                .unwrap_or(std::ptr::null()),
+        )
+    }
+
+    pub fn execute_func<Args: FunctionArgs<T> + TypeList, T: TypeList>(
+        &self,
+        func_idx: u32,
+        args: Args,
+    ) -> Result<T, ExecutionError> {
+        let module = &self.module;
+
+        if func_idx as usize >= module.ctx.func_ty_indicies.len() {
+            return Err(ExecutionError::FuncIndexOutOfBounds);
+        }
+
+        let type_ = module.ctx.func_type(func_idx);
+
+        // TODO: Handle "compatible" types (i.e. f32 and i32)
+        if (&type_.params[..], &type_.returns[..]) != (Args::TYPE_LIST, T::TYPE_LIST) {
+            return Err(ExecutionError::TypeMismatch);
+        }
+
+        Ok(unsafe { self.execute_func_unchecked(func_idx, args) })
+    }
+
+    pub fn disassemble(&self) {
+        self.module.disassemble();
+    }
+}
+
+struct BoxSlice<T> {
+    len: usize,
+    ptr: *mut T,
+}
+
+impl<T> From<Box<[T]>> for BoxSlice<T> {
+    fn from(mut other: Box<[T]>) -> Self {
+        let out = BoxSlice {
+            len: other.len(),
+            ptr: other.as_mut_ptr(),
+        };
+        mem::forget(other);
+        out
+    }
+}
+
+unsafe impl<T: Send> Send for BoxSlice<T> {}
+unsafe impl<T: Sync> Sync for BoxSlice<T> {}
+
+impl<T> Drop for BoxSlice<T> {
+    fn drop(&mut self) {
+        unsafe { Vec::from_raw_parts(self.ptr, self.len, self.len) };
+    }
+}
+
+type BoxByteSlice = BoxSlice<u8>;
+
+pub struct VmCtx {
+    mem: BoxByteSlice,
+}
+
+impl VmCtx {
+    pub fn offset_of_memory_ptr() -> u32 {
+        (offset_of!(VmCtx, mem) + offset_of!(BoxByteSlice, ptr))
+            .try_into()
+            .expect("Offset exceeded size of u32")
+    }
+
+    pub fn offset_of_memory_len() -> u32 {
+        (offset_of!(VmCtx, mem) + offset_of!(BoxByteSlice, len))
+            .try_into()
+            .expect("Offset exceeded size of u32")
+    }
+}
+
+#[derive(Default, Debug)]
+pub struct SimpleContext {
+    types: Vec<FuncType>,
+    func_ty_indicies: Vec<u32>,
+}
+
+pub const WASM_PAGE_SIZE: usize = 65_536;
+
+pub trait Signature {
+    type Type: SigType;
+
+    fn params(&self) -> &[Self::Type];
+    fn returns(&self) -> &[Self::Type];
+}
+
+pub trait SigType {
+    fn to_microwasm_type(&self) -> microwasm::SignlessType;
+}
+
+impl SigType for ir::Type {
+    fn to_microwasm_type(&self) -> microwasm::SignlessType {
+        use crate::microwasm::{Size::*, Type::*};
+
+        if self.is_int() {
+            match self.bits() {
+                32 => Int(_32),
+                64 => Int(_64),
+                _ => unimplemented!(),
+            }
+        } else if self.is_float() {
+            match self.bits() {
+                32 => Float(_32),
+                64 => Float(_64),
+                _ => unimplemented!(),
+            }
+        } else {
+            unimplemented!()
+        }
+    }
+}
+
+impl SigType for AbiParam {
+    fn to_microwasm_type(&self) -> microwasm::SignlessType {
+        self.value_type.to_microwasm_type()
+    }
+}
+
+impl Signature for CraneliftSignature {
+    type Type = AbiParam;
+
+    fn params(&self) -> &[Self::Type] {
+        // TODO: We want to instead add the `VMContext` to the signature used by
+        //       cranelift, removing the special-casing from the internals.
+        assert_eq!(self.params[0].purpose, ir::ArgumentPurpose::VMContext);
+        assert_eq!(self.call_conv, isa::CallConv::SystemV);
+        &self.params[1..]
+    }
+
+    fn returns(&self) -> &[Self::Type] {
+        assert_eq!(self.call_conv, isa::CallConv::SystemV);
+        &self.returns
+    }
+}
+
+impl SigType for wasmparser::Type {
+    fn to_microwasm_type(&self) -> microwasm::SignlessType {
+        microwasm::Type::from_wasm(*self).unwrap()
+    }
+}
+
+impl Signature for FuncType {
+    type Type = wasmparser::Type;
+
+    fn params(&self) -> &[Self::Type] {
+        &*self.params
+    }
+
+    fn returns(&self) -> &[Self::Type] {
+        &*self.returns
+    }
+}
+
+pub trait ModuleContext {
+    type Signature: Signature;
+    type GlobalType: SigType;
+
+    fn vmctx_vmglobal_definition(&self, index: u32) -> u32;
+    fn vmctx_vmglobal_import_from(&self, index: u32) -> u32;
+    fn vmctx_vmmemory_import_from(&self, memory_index: u32) -> u32;
+    fn vmctx_vmmemory_definition(&self, defined_memory_index: u32) -> u32;
+    fn vmctx_vmmemory_definition_base(&self, defined_memory_index: u32) -> u32;
+    fn vmctx_vmmemory_definition_current_length(&self, defined_memory_index: u32) -> u32;
+    fn vmmemory_definition_base(&self) -> u8;
+    fn vmmemory_definition_current_length(&self) -> u8;
+    fn vmctx_vmtable_import_from(&self, table_index: u32) -> u32;
+    fn vmctx_vmtable_definition(&self, defined_table_index: u32) -> u32;
+    fn vmctx_vmtable_definition_base(&self, defined_table_index: u32) -> u32;
+    fn vmctx_vmtable_definition_current_elements(&self, defined_table_index: u32) -> u32;
+    fn vmctx_vmfunction_import_body(&self, func_index: u32) -> u32;
+    fn vmctx_vmfunction_import_vmctx(&self, func_index: u32) -> u32;
+    fn vmtable_definition_base(&self) -> u8;
+    fn vmtable_definition_current_elements(&self) -> u8;
+    fn vmctx_vmshared_signature_id(&self, signature_idx: u32) -> u32;
+    fn vmcaller_checked_anyfunc_type_index(&self) -> u8;
+    fn vmcaller_checked_anyfunc_func_ptr(&self) -> u8;
+    fn vmcaller_checked_anyfunc_vmctx(&self) -> u8;
+    fn size_of_vmcaller_checked_anyfunc(&self) -> u8;
+
+    fn defined_table_index(&self, table_index: u32) -> Option<u32>;
+    fn defined_memory_index(&self, index: u32) -> Option<u32>;
+
+    fn defined_global_index(&self, global_index: u32) -> Option<u32>;
+    fn global_type(&self, global_index: u32) -> &Self::GlobalType;
+
+    fn func_type_index(&self, func_idx: u32) -> u32;
+    fn signature(&self, index: u32) -> &Self::Signature;
+
+    fn func_index(&self, defined_func_index: u32) -> u32;
+    fn defined_func_index(&self, func_index: u32) -> Option<u32>;
+
+    fn defined_func_type(&self, defined_func_idx: u32) -> &Self::Signature {
+        self.func_type(self.func_index(defined_func_idx))
+    }
+
+    fn func_type(&self, func_idx: u32) -> &Self::Signature {
+        self.signature(self.func_type_index(func_idx))
+    }
+
+    fn emit_memory_bounds_check(&self) -> bool {
+        true
+    }
+}
+
+impl ModuleContext for SimpleContext {
+    type Signature = FuncType;
+    type GlobalType = wasmparser::Type;
+
+    // TODO: We don't support external functions yet
+    fn func_index(&self, func_idx: u32) -> u32 {
+        func_idx
+    }
+
+    fn defined_func_index(&self, func_idx: u32) -> Option<u32> {
+        Some(func_idx)
+    }
+
+    fn func_type_index(&self, func_idx: u32) -> u32 {
+        self.func_ty_indicies[func_idx as usize]
+    }
+
+    fn defined_global_index(&self, _index: u32) -> Option<u32> {
+        unimplemented!()
+    }
+
+    fn global_type(&self, _global_index: u32) -> &Self::GlobalType {
+        unimplemented!()
+    }
+
+    fn signature(&self, index: u32) -> &Self::Signature {
+        &self.types[index as usize]
+    }
+
+    fn vmctx_vmglobal_definition(&self, _index: u32) -> u32 {
+        unimplemented!()
+    }
+
+    fn vmctx_vmglobal_import_from(&self, _index: u32) -> u32 {
+        unimplemented!()
+    }
+
+    fn defined_memory_index(&self, _index: u32) -> Option<u32> {
+        unimplemented!()
+    }
+
+    fn defined_table_index(&self, index: u32) -> Option<u32> {
+        Some(index)
+    }
+
+    fn vmctx_vmfunction_import_body(&self, _func_index: u32) -> u32 {
+        unimplemented!()
+    }
+    fn vmctx_vmfunction_import_vmctx(&self, _func_index: u32) -> u32 {
+        unimplemented!()
+    }
+
+    fn vmctx_vmtable_import_from(&self, _table_index: u32) -> u32 {
+        unimplemented!()
+    }
+
+    fn vmctx_vmmemory_definition(&self, _defined_memory_index: u32) -> u32 {
+        unimplemented!()
+    }
+    fn vmctx_vmmemory_import_from(&self, _memory_index: u32) -> u32 {
+        unimplemented!()
+    }
+    fn vmmemory_definition_base(&self) -> u8 {
+        unimplemented!()
+    }
+    fn vmmemory_definition_current_length(&self) -> u8 {
+        unimplemented!()
+    }
+    fn vmctx_vmmemory_definition_base(&self, defined_memory_index: u32) -> u32 {
+        assert_eq!(defined_memory_index, 0);
+        VmCtx::offset_of_memory_ptr()
+    }
+
+    fn vmctx_vmmemory_definition_current_length(&self, defined_memory_index: u32) -> u32 {
+        assert_eq!(defined_memory_index, 0);
+        VmCtx::offset_of_memory_len()
+    }
+
+    fn vmctx_vmtable_definition(&self, _defined_table_index: u32) -> u32 {
+        unimplemented!()
+    }
+
+    fn vmctx_vmtable_definition_base(&self, _defined_table_index: u32) -> u32 {
+        unimplemented!()
+    }
+
+    fn vmctx_vmtable_definition_current_elements(&self, _defined_table_index: u32) -> u32 {
+        unimplemented!()
+    }
+
+    fn vmtable_definition_base(&self) -> u8 {
+        unimplemented!()
+    }
+
+    fn vmtable_definition_current_elements(&self) -> u8 {
+        unimplemented!()
+    }
+
+    fn vmcaller_checked_anyfunc_vmctx(&self) -> u8 {
+        unimplemented!()
+    }
+
+    fn vmcaller_checked_anyfunc_type_index(&self) -> u8 {
+        unimplemented!()
+    }
+
+    fn vmcaller_checked_anyfunc_func_ptr(&self) -> u8 {
+        unimplemented!()
+    }
+
+    fn size_of_vmcaller_checked_anyfunc(&self) -> u8 {
+        unimplemented!()
+    }
+
+    fn vmctx_vmshared_signature_id(&self, _signature_idx: u32) -> u32 {
+        unimplemented!()
+    }
+
+    // TODO: type of a global
+}
+
+pub fn translate(data: &[u8]) -> Result<ExecutableModule, Error> {
+    translate_only(data).map(|m| m.instantiate())
+}
+
+/// Translate from a slice of bytes holding a wasm module.
+pub fn translate_only(data: &[u8]) -> Result<TranslatedModule, Error> {
+    let mut reader = ModuleReader::new(data)?;
+    let mut output = TranslatedModule::default();
+
+    reader.skip_custom_sections()?;
+    if reader.eof() {
+        return Ok(output);
+    }
+    let mut section = reader.read()?;
+
+    if let SectionCode::Type = section.code {
+        let types_reader = section.get_type_section_reader()?;
+        output.ctx.types = translate_sections::type_(types_reader)?;
+
+        reader.skip_custom_sections()?;
+        if reader.eof() {
+            return Ok(output);
+        }
+        section = reader.read()?;
+    }
+
+    if let SectionCode::Import = section.code {
+        let imports = section.get_import_section_reader()?;
+        translate_sections::import(imports)?;
+
+        reader.skip_custom_sections()?;
+        if reader.eof() {
+            return Ok(output);
+        }
+        section = reader.read()?;
+    }
+
+    if let SectionCode::Function = section.code {
+        let functions = section.get_function_section_reader()?;
+        output.ctx.func_ty_indicies = translate_sections::function(functions)?;
+
+        reader.skip_custom_sections()?;
+        if reader.eof() {
+            return Ok(output);
+        }
+        section = reader.read()?;
+    }
+
+    if let SectionCode::Table = section.code {
+        let tables = section.get_table_section_reader()?;
+        translate_sections::table(tables)?;
+
+        reader.skip_custom_sections()?;
+        if reader.eof() {
+            return Ok(output);
+        }
+        section = reader.read()?;
+    }
+
+    if let SectionCode::Memory = section.code {
+        let memories = section.get_memory_section_reader()?;
+        let mem = translate_sections::memory(memories)?;
+
+        if mem.len() > 1 {
+            return Err(Error::Input(
+                "Multiple memory sections not yet implemented".to_string(),
+            ));
+        }
+
+        if !mem.is_empty() {
+            let mem = mem[0];
+            if Some(mem.limits.initial) != mem.limits.maximum {
+                return Err(Error::Input(
+                    "Custom memory limits not supported in lightbeam".to_string(),
+                ));
+            }
+            output.memory = Some(mem);
+        }
+
+        reader.skip_custom_sections()?;
+        if reader.eof() {
+            return Ok(output);
+        }
+        section = reader.read()?;
+    }
+
+    if let SectionCode::Global = section.code {
+        let globals = section.get_global_section_reader()?;
+        translate_sections::global(globals)?;
+
+        reader.skip_custom_sections()?;
+        if reader.eof() {
+            return Ok(output);
+        }
+        section = reader.read()?;
+    }
+
+    if let SectionCode::Export = section.code {
+        let exports = section.get_export_section_reader()?;
+        translate_sections::export(exports)?;
+
+        reader.skip_custom_sections()?;
+        if reader.eof() {
+            return Ok(output);
+        }
+        section = reader.read()?;
+    }
+
+    if let SectionCode::Start = section.code {
+        let start = section.get_start_section_content()?;
+        translate_sections::start(start)?;
+
+        reader.skip_custom_sections()?;
+        if reader.eof() {
+            return Ok(output);
+        }
+        section = reader.read()?;
+    }
+
+    if let SectionCode::Element = section.code {
+        let elements = section.get_element_section_reader()?;
+        translate_sections::element(elements)?;
+
+        reader.skip_custom_sections()?;
+        if reader.eof() {
+            return Ok(output);
+        }
+        section = reader.read()?;
+    }
+
+    if let SectionCode::Code = section.code {
+        let code = section.get_code_section_reader()?;
+        output.translated_code_section = Some(translate_sections::code(code, &output.ctx)?);
+
+        reader.skip_custom_sections()?;
+        if reader.eof() {
+            return Ok(output);
+        }
+        section = reader.read()?;
+    }
+
+    if let SectionCode::Data = section.code {
+        let data = section.get_data_section_reader()?;
+        translate_sections::data(data)?;
+    }
+
+    if !reader.eof() {
+        return Err(Error::Input(
+            "Unexpected data found after the end of the module".to_string(),
+        ));
+    }
+
+    Ok(output)
+}
+
+
\ No newline at end of file diff --git a/api/src/lightbeam/translate_sections.rs.html b/api/src/lightbeam/translate_sections.rs.html new file mode 100644 index 000000000000..83bb5027f992 --- /dev/null +++ b/api/src/lightbeam/translate_sections.rs.html @@ -0,0 +1,263 @@ +translate_sections.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+
+use crate::backend::{CodeGenSession, TranslatedCodeSection};
+use crate::error::Error;
+use crate::function_body;
+use crate::module::SimpleContext;
+use cranelift_codegen::{binemit, ir};
+use wasmparser::{
+    CodeSectionReader, DataSectionReader, ElementSectionReader, ExportSectionReader, FuncType,
+    FunctionSectionReader, GlobalSectionReader, ImportSectionReader, MemorySectionReader,
+    MemoryType, TableSectionReader, TableType, TypeSectionReader,
+};
+
+/// Parses the Type section of the wasm module.
+pub fn type_(types_reader: TypeSectionReader) -> Result<Vec<FuncType>, Error> {
+    types_reader
+        .into_iter()
+        .map(|r| r.map_err(Into::into))
+        .collect()
+}
+
+/// Parses the Import section of the wasm module.
+pub fn import(imports: ImportSectionReader) -> Result<(), Error> {
+    for entry in imports {
+        entry?; // TODO
+    }
+    Ok(())
+}
+
+/// Parses the Function section of the wasm module.
+pub fn function(functions: FunctionSectionReader) -> Result<Vec<u32>, Error> {
+    functions
+        .into_iter()
+        .map(|r| r.map_err(Into::into))
+        .collect()
+}
+
+/// Parses the Table section of the wasm module.
+pub fn table(tables: TableSectionReader) -> Result<Vec<TableType>, Error> {
+    tables.into_iter().map(|r| r.map_err(Into::into)).collect()
+}
+
+/// Parses the Memory section of the wasm module.
+pub fn memory(memories: MemorySectionReader) -> Result<Vec<MemoryType>, Error> {
+    memories
+        .into_iter()
+        .map(|r| r.map_err(Into::into))
+        .collect()
+}
+
+/// Parses the Global section of the wasm module.
+pub fn global(globals: GlobalSectionReader) -> Result<(), Error> {
+    for entry in globals {
+        entry?; // TODO
+    }
+    Ok(())
+}
+
+/// Parses the Export section of the wasm module.
+pub fn export(exports: ExportSectionReader) -> Result<(), Error> {
+    for entry in exports {
+        entry?; // TODO
+    }
+    Ok(())
+}
+
+/// Parses the Start section of the wasm module.
+pub fn start(_index: u32) -> Result<(), Error> {
+    // TODO
+    Ok(())
+}
+
+/// Parses the Element section of the wasm module.
+pub fn element(elements: ElementSectionReader) -> Result<(), Error> {
+    for entry in elements {
+        entry?;
+    }
+
+    Ok(())
+}
+
+struct UnimplementedRelocSink;
+
+impl binemit::RelocSink for UnimplementedRelocSink {
+    fn reloc_block(&mut self, _: binemit::CodeOffset, _: binemit::Reloc, _: binemit::CodeOffset) {
+        unimplemented!()
+    }
+
+    fn reloc_external(
+        &mut self,
+        _: binemit::CodeOffset,
+        _: binemit::Reloc,
+        _: &ir::ExternalName,
+        _: binemit::Addend,
+    ) {
+        unimplemented!()
+    }
+
+    fn reloc_constant(&mut self, _: binemit::CodeOffset, _: binemit::Reloc, _: ir::ConstantOffset) {
+        unimplemented!()
+    }
+
+    fn reloc_jt(&mut self, _: binemit::CodeOffset, _: binemit::Reloc, _: ir::JumpTable) {
+        unimplemented!()
+    }
+}
+
+/// Parses the Code section of the wasm module.
+pub fn code(
+    code: CodeSectionReader,
+    translation_ctx: &SimpleContext,
+) -> Result<TranslatedCodeSection, Error> {
+    let func_count = code.get_count();
+    let mut session = CodeGenSession::new(func_count, translation_ctx);
+
+    for (idx, body) in code.into_iter().enumerate() {
+        let body = body?;
+        let mut relocs = UnimplementedRelocSink;
+
+        function_body::translate_wasm(&mut session, &mut relocs, idx as u32, &body)?;
+    }
+
+    Ok(session.into_translated_code_section()?)
+}
+
+/// Parses the Data section of the wasm module.
+pub fn data(data: DataSectionReader) -> Result<(), Error> {
+    for entry in data {
+        entry?; // TODO
+    }
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/ctx.rs.html b/api/src/wasi_common/ctx.rs.html new file mode 100644 index 000000000000..6e66418a4f87 --- /dev/null +++ b/api/src/wasi_common/ctx.rs.html @@ -0,0 +1,673 @@ +ctx.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+
+use crate::fdentry::FdEntry;
+use crate::{wasi, Error, Result};
+use std::borrow::Borrow;
+use std::collections::HashMap;
+use std::env;
+use std::ffi::{CString, OsString};
+use std::fs::File;
+use std::path::{Path, PathBuf};
+
+enum PendingFdEntry {
+    Thunk(fn() -> Result<FdEntry>),
+    File(File),
+}
+
+impl std::fmt::Debug for PendingFdEntry {
+    fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        match self {
+            Self::Thunk(f) => write!(
+                fmt,
+                "PendingFdEntry::Thunk({:p})",
+                f as *const fn() -> Result<FdEntry>
+            ),
+            Self::File(f) => write!(fmt, "PendingFdEntry::File({:?})", f),
+        }
+    }
+}
+
+#[derive(Debug, Eq, Hash, PartialEq)]
+enum PendingCString {
+    Bytes(Vec<u8>),
+    OsString(OsString),
+}
+
+impl From<Vec<u8>> for PendingCString {
+    fn from(bytes: Vec<u8>) -> Self {
+        Self::Bytes(bytes)
+    }
+}
+
+impl From<OsString> for PendingCString {
+    fn from(s: OsString) -> Self {
+        Self::OsString(s)
+    }
+}
+
+impl PendingCString {
+    fn into_string(self) -> Result<String> {
+        match self {
+            Self::Bytes(v) => String::from_utf8(v).map_err(|_| Error::EILSEQ),
+            Self::OsString(s) => s.into_string().map_err(|_| Error::EILSEQ),
+        }
+    }
+
+    /// Create a `CString` containing valid UTF-8, or fail with `Error::EILSEQ`.
+    fn into_utf8_cstring(self) -> Result<CString> {
+        self.into_string()
+            .and_then(|s| CString::new(s).map_err(|_| Error::EILSEQ))
+    }
+}
+
+/// A builder allowing customizable construction of `WasiCtx` instances.
+pub struct WasiCtxBuilder {
+    fds: HashMap<wasi::__wasi_fd_t, PendingFdEntry>,
+    preopens: Vec<(PathBuf, File)>,
+    args: Vec<PendingCString>,
+    env: HashMap<PendingCString, PendingCString>,
+}
+
+impl WasiCtxBuilder {
+    /// Builder for a new `WasiCtx`.
+    pub fn new() -> Self {
+        let mut builder = Self {
+            fds: HashMap::new(),
+            preopens: Vec::new(),
+            args: vec![],
+            env: HashMap::new(),
+        };
+
+        builder.fds.insert(0, PendingFdEntry::Thunk(FdEntry::null));
+        builder.fds.insert(1, PendingFdEntry::Thunk(FdEntry::null));
+        builder.fds.insert(2, PendingFdEntry::Thunk(FdEntry::null));
+
+        builder
+    }
+
+    /// Add arguments to the command-line arguments list.
+    ///
+    /// Arguments must be valid UTF-8 with no NUL bytes, or else `WasiCtxBuilder::build()` will fail
+    /// with `Error::EILSEQ`.
+    pub fn args<S: AsRef<[u8]>>(mut self, args: impl IntoIterator<Item = S>) -> Self {
+        self.args = args
+            .into_iter()
+            .map(|arg| arg.as_ref().to_vec().into())
+            .collect();
+        self
+    }
+
+    /// Add an argument to the command-line arguments list.
+    ///
+    /// Arguments must be valid UTF-8 with no NUL bytes, or else `WasiCtxBuilder::build()` will fail
+    /// with `Error::EILSEQ`.
+    pub fn arg<S: AsRef<[u8]>>(mut self, arg: S) -> Self {
+        self.args.push(arg.as_ref().to_vec().into());
+        self
+    }
+
+    /// Inherit the command-line arguments from the host process.
+    ///
+    /// If any arguments from the host process contain invalid UTF-8, `WasiCtxBuilder::build()` will
+    /// fail with `Error::EILSEQ`.
+    pub fn inherit_args(mut self) -> Self {
+        self.args = env::args_os().map(PendingCString::OsString).collect();
+        self
+    }
+
+    /// Inherit the stdin, stdout, and stderr streams from the host process.
+    pub fn inherit_stdio(mut self) -> Self {
+        self.fds
+            .insert(0, PendingFdEntry::Thunk(FdEntry::duplicate_stdin));
+        self.fds
+            .insert(1, PendingFdEntry::Thunk(FdEntry::duplicate_stdout));
+        self.fds
+            .insert(2, PendingFdEntry::Thunk(FdEntry::duplicate_stderr));
+        self
+    }
+
+    /// Inherit the environment variables from the host process.
+    ///
+    /// If any environment variables from the host process contain invalid Unicode (UTF-16 for
+    /// Windows, UTF-8 for other platforms), `WasiCtxBuilder::build()` will fail with
+    /// `Error::EILSEQ`.
+    pub fn inherit_env(mut self) -> Self {
+        self.env = std::env::vars_os()
+            .map(|(k, v)| (k.into(), v.into()))
+            .collect();
+        self
+    }
+
+    /// Add an entry to the environment.
+    ///
+    /// Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else
+    /// `WasiCtxBuilder::build()` will fail with `Error::EILSEQ`.
+    pub fn env<S: AsRef<[u8]>>(mut self, k: S, v: S) -> Self {
+        self.env
+            .insert(k.as_ref().to_vec().into(), v.as_ref().to_vec().into());
+        self
+    }
+
+    /// Add entries to the environment.
+    ///
+    /// Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else
+    /// `WasiCtxBuilder::build()` will fail with `Error::EILSEQ`.
+    pub fn envs<S: AsRef<[u8]>, T: Borrow<(S, S)>>(
+        mut self,
+        envs: impl IntoIterator<Item = T>,
+    ) -> Self {
+        self.env = envs
+            .into_iter()
+            .map(|t| {
+                let (k, v) = t.borrow();
+                (k.as_ref().to_vec().into(), v.as_ref().to_vec().into())
+            })
+            .collect();
+        self
+    }
+
+    /// Provide a File to use as stdin
+    pub fn stdin(mut self, file: File) -> Self {
+        self.fds.insert(0, PendingFdEntry::File(file));
+        self
+    }
+
+    /// Provide a File to use as stdout
+    pub fn stdout(mut self, file: File) -> Self {
+        self.fds.insert(1, PendingFdEntry::File(file));
+        self
+    }
+
+    /// Provide a File to use as stderr
+    pub fn stderr(mut self, file: File) -> Self {
+        self.fds.insert(2, PendingFdEntry::File(file));
+        self
+    }
+
+    /// Add a preopened directory.
+    pub fn preopened_dir<P: AsRef<Path>>(mut self, dir: File, guest_path: P) -> Self {
+        self.preopens.push((guest_path.as_ref().to_owned(), dir));
+        self
+    }
+
+    /// Build a `WasiCtx`, consuming this `WasiCtxBuilder`.
+    ///
+    /// If any of the arguments or environment variables in this builder cannot be converted into
+    /// `CString`s, either due to NUL bytes or Unicode conversions, this returns `Error::EILSEQ`.
+    pub fn build(self) -> Result<WasiCtx> {
+        // Process arguments and environment variables into `CString`s, failing quickly if they
+        // contain any NUL bytes, or if conversion from `OsString` fails.
+        let args = self
+            .args
+            .into_iter()
+            .map(|arg| arg.into_utf8_cstring())
+            .collect::<Result<Vec<CString>>>()?;
+
+        let env = self
+            .env
+            .into_iter()
+            .map(|(k, v)| {
+                k.into_string().and_then(|mut pair| {
+                    v.into_string().and_then(|v| {
+                        pair.push('=');
+                        pair.push_str(v.as_str());
+                        // We have valid UTF-8, but the keys and values have not yet been checked
+                        // for NULs, so we do a final check here.
+                        CString::new(pair).map_err(|_| Error::EILSEQ)
+                    })
+                })
+            })
+            .collect::<Result<Vec<CString>>>()?;
+
+        let mut fds: HashMap<wasi::__wasi_fd_t, FdEntry> = HashMap::new();
+        // Populate the non-preopen fds.
+        for (fd, pending) in self.fds {
+            log::debug!("WasiCtx inserting ({:?}, {:?})", fd, pending);
+            match pending {
+                PendingFdEntry::Thunk(f) => {
+                    fds.insert(fd, f()?);
+                }
+                PendingFdEntry::File(f) => {
+                    fds.insert(fd, FdEntry::from(f)?);
+                }
+            }
+        }
+        // Then add the preopen fds. Startup code in the guest starts looking at fd 3 for preopens,
+        // so we start from there. This variable is initially 2, though, because the loop
+        // immediately does the increment and check for overflow.
+        let mut preopen_fd: wasi::__wasi_fd_t = 2;
+        for (guest_path, dir) in self.preopens {
+            // We do the increment at the beginning of the loop body, so that we don't overflow
+            // unnecessarily if we have exactly the maximum number of file descriptors.
+            preopen_fd = preopen_fd.checked_add(1).ok_or(Error::ENFILE)?;
+
+            if !dir.metadata()?.is_dir() {
+                return Err(Error::EBADF);
+            }
+
+            // We don't currently allow setting file descriptors other than 0-2, but this will avoid
+            // collisions if we restore that functionality in the future.
+            while fds.contains_key(&preopen_fd) {
+                preopen_fd = preopen_fd.checked_add(1).ok_or(Error::ENFILE)?;
+            }
+            let mut fe = FdEntry::from(dir)?;
+            fe.preopen_path = Some(guest_path);
+            log::debug!("WasiCtx inserting ({:?}, {:?})", preopen_fd, fe);
+            fds.insert(preopen_fd, fe);
+            log::debug!("WasiCtx fds = {:?}", fds);
+        }
+
+        Ok(WasiCtx { args, env, fds })
+    }
+}
+
+#[derive(Debug)]
+pub struct WasiCtx {
+    fds: HashMap<wasi::__wasi_fd_t, FdEntry>,
+    pub(crate) args: Vec<CString>,
+    pub(crate) env: Vec<CString>,
+}
+
+impl WasiCtx {
+    /// Make a new `WasiCtx` with some default settings.
+    ///
+    /// - File descriptors 0, 1, and 2 inherit stdin, stdout, and stderr from the host process.
+    ///
+    /// - Environment variables are inherited from the host process.
+    ///
+    /// To override these behaviors, use `WasiCtxBuilder`.
+    pub fn new<S: AsRef<[u8]>>(args: impl IntoIterator<Item = S>) -> Result<Self> {
+        WasiCtxBuilder::new()
+            .args(args)
+            .inherit_stdio()
+            .inherit_env()
+            .build()
+    }
+
+    /// Check if `WasiCtx` contains the specified raw WASI `fd`.
+    pub(crate) unsafe fn contains_fd_entry(&self, fd: wasi::__wasi_fd_t) -> bool {
+        self.fds.contains_key(&fd)
+    }
+
+    /// Get an immutable `FdEntry` corresponding to the specified raw WASI `fd`.
+    pub(crate) unsafe fn get_fd_entry(&self, fd: wasi::__wasi_fd_t) -> Result<&FdEntry> {
+        self.fds.get(&fd).ok_or(Error::EBADF)
+    }
+
+    /// Get a mutable `FdEntry` corresponding to the specified raw WASI `fd`.
+    pub(crate) unsafe fn get_fd_entry_mut(
+        &mut self,
+        fd: wasi::__wasi_fd_t,
+    ) -> Result<&mut FdEntry> {
+        self.fds.get_mut(&fd).ok_or(Error::EBADF)
+    }
+
+    /// Insert the specified `FdEntry` into the `WasiCtx` object.
+    ///
+    /// The `FdEntry` will automatically get another free raw WASI `fd` assigned. Note that
+    /// the two subsequent free raw WASI `fd`s do not have to be stored contiguously.
+    pub(crate) fn insert_fd_entry(&mut self, fe: FdEntry) -> Result<wasi::__wasi_fd_t> {
+        // Never insert where stdio handles are expected to be.
+        let mut fd = 3;
+        while self.fds.contains_key(&fd) {
+            if let Some(next_fd) = fd.checked_add(1) {
+                fd = next_fd;
+            } else {
+                return Err(Error::EMFILE);
+            }
+        }
+        self.fds.insert(fd, fe);
+        Ok(fd)
+    }
+
+    /// Insert the specified `FdEntry` with the specified raw WASI `fd` key into the `WasiCtx`
+    /// object.
+    pub(crate) fn insert_fd_entry_at(
+        &mut self,
+        fd: wasi::__wasi_fd_t,
+        fe: FdEntry,
+    ) -> Option<FdEntry> {
+        self.fds.insert(fd, fe)
+    }
+
+    /// Remove `FdEntry` corresponding to the specified raw WASI `fd` from the `WasiCtx` object.
+    pub(crate) fn remove_fd_entry(&mut self, fd: wasi::__wasi_fd_t) -> Result<FdEntry> {
+        self.fds.remove(&fd).ok_or(Error::EBADF)
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/error.rs.html b/api/src/wasi_common/error.rs.html new file mode 100644 index 000000000000..1d52fb10b50d --- /dev/null +++ b/api/src/wasi_common/error.rs.html @@ -0,0 +1,527 @@ +error.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+
+// Due to https://github.com/rust-lang/rust/issues/64247
+#![allow(clippy::use_self)]
+use crate::wasi;
+use std::convert::Infallible;
+use std::num::TryFromIntError;
+use std::{ffi, str};
+use thiserror::Error;
+
+#[derive(Clone, Copy, Debug, Error, Eq, PartialEq)]
+#[repr(u16)]
+#[error("{:?} ({})", self, wasi::strerror(*self as wasi::__wasi_errno_t))]
+pub enum WasiError {
+    ESUCCESS = wasi::__WASI_ERRNO_SUCCESS,
+    E2BIG = wasi::__WASI_ERRNO_2BIG,
+    EACCES = wasi::__WASI_ERRNO_ACCES,
+    EADDRINUSE = wasi::__WASI_ERRNO_ADDRINUSE,
+    EADDRNOTAVAIL = wasi::__WASI_ERRNO_ADDRNOTAVAIL,
+    EAFNOSUPPORT = wasi::__WASI_ERRNO_AFNOSUPPORT,
+    EAGAIN = wasi::__WASI_ERRNO_AGAIN,
+    EALREADY = wasi::__WASI_ERRNO_ALREADY,
+    EBADF = wasi::__WASI_ERRNO_BADF,
+    EBADMSG = wasi::__WASI_ERRNO_BADMSG,
+    EBUSY = wasi::__WASI_ERRNO_BUSY,
+    ECANCELED = wasi::__WASI_ERRNO_CANCELED,
+    ECHILD = wasi::__WASI_ERRNO_CHILD,
+    ECONNABORTED = wasi::__WASI_ERRNO_CONNABORTED,
+    ECONNREFUSED = wasi::__WASI_ERRNO_CONNREFUSED,
+    ECONNRESET = wasi::__WASI_ERRNO_CONNRESET,
+    EDEADLK = wasi::__WASI_ERRNO_DEADLK,
+    EDESTADDRREQ = wasi::__WASI_ERRNO_DESTADDRREQ,
+    EDOM = wasi::__WASI_ERRNO_DOM,
+    EDQUOT = wasi::__WASI_ERRNO_DQUOT,
+    EEXIST = wasi::__WASI_ERRNO_EXIST,
+    EFAULT = wasi::__WASI_ERRNO_FAULT,
+    EFBIG = wasi::__WASI_ERRNO_FBIG,
+    EHOSTUNREACH = wasi::__WASI_ERRNO_HOSTUNREACH,
+    EIDRM = wasi::__WASI_ERRNO_IDRM,
+    EILSEQ = wasi::__WASI_ERRNO_ILSEQ,
+    EINPROGRESS = wasi::__WASI_ERRNO_INPROGRESS,
+    EINTR = wasi::__WASI_ERRNO_INTR,
+    EINVAL = wasi::__WASI_ERRNO_INVAL,
+    EIO = wasi::__WASI_ERRNO_IO,
+    EISCONN = wasi::__WASI_ERRNO_ISCONN,
+    EISDIR = wasi::__WASI_ERRNO_ISDIR,
+    ELOOP = wasi::__WASI_ERRNO_LOOP,
+    EMFILE = wasi::__WASI_ERRNO_MFILE,
+    EMLINK = wasi::__WASI_ERRNO_MLINK,
+    EMSGSIZE = wasi::__WASI_ERRNO_MSGSIZE,
+    EMULTIHOP = wasi::__WASI_ERRNO_MULTIHOP,
+    ENAMETOOLONG = wasi::__WASI_ERRNO_NAMETOOLONG,
+    ENETDOWN = wasi::__WASI_ERRNO_NETDOWN,
+    ENETRESET = wasi::__WASI_ERRNO_NETRESET,
+    ENETUNREACH = wasi::__WASI_ERRNO_NETUNREACH,
+    ENFILE = wasi::__WASI_ERRNO_NFILE,
+    ENOBUFS = wasi::__WASI_ERRNO_NOBUFS,
+    ENODEV = wasi::__WASI_ERRNO_NODEV,
+    ENOENT = wasi::__WASI_ERRNO_NOENT,
+    ENOEXEC = wasi::__WASI_ERRNO_NOEXEC,
+    ENOLCK = wasi::__WASI_ERRNO_NOLCK,
+    ENOLINK = wasi::__WASI_ERRNO_NOLINK,
+    ENOMEM = wasi::__WASI_ERRNO_NOMEM,
+    ENOMSG = wasi::__WASI_ERRNO_NOMSG,
+    ENOPROTOOPT = wasi::__WASI_ERRNO_NOPROTOOPT,
+    ENOSPC = wasi::__WASI_ERRNO_NOSPC,
+    ENOSYS = wasi::__WASI_ERRNO_NOSYS,
+    ENOTCONN = wasi::__WASI_ERRNO_NOTCONN,
+    ENOTDIR = wasi::__WASI_ERRNO_NOTDIR,
+    ENOTEMPTY = wasi::__WASI_ERRNO_NOTEMPTY,
+    ENOTRECOVERABLE = wasi::__WASI_ERRNO_NOTRECOVERABLE,
+    ENOTSOCK = wasi::__WASI_ERRNO_NOTSOCK,
+    ENOTSUP = wasi::__WASI_ERRNO_NOTSUP,
+    ENOTTY = wasi::__WASI_ERRNO_NOTTY,
+    ENXIO = wasi::__WASI_ERRNO_NXIO,
+    EOVERFLOW = wasi::__WASI_ERRNO_OVERFLOW,
+    EOWNERDEAD = wasi::__WASI_ERRNO_OWNERDEAD,
+    EPERM = wasi::__WASI_ERRNO_PERM,
+    EPIPE = wasi::__WASI_ERRNO_PIPE,
+    EPROTO = wasi::__WASI_ERRNO_PROTO,
+    EPROTONOSUPPORT = wasi::__WASI_ERRNO_PROTONOSUPPORT,
+    EPROTOTYPE = wasi::__WASI_ERRNO_PROTOTYPE,
+    ERANGE = wasi::__WASI_ERRNO_RANGE,
+    EROFS = wasi::__WASI_ERRNO_ROFS,
+    ESPIPE = wasi::__WASI_ERRNO_SPIPE,
+    ESRCH = wasi::__WASI_ERRNO_SRCH,
+    ESTALE = wasi::__WASI_ERRNO_STALE,
+    ETIMEDOUT = wasi::__WASI_ERRNO_TIMEDOUT,
+    ETXTBSY = wasi::__WASI_ERRNO_TXTBSY,
+    EXDEV = wasi::__WASI_ERRNO_XDEV,
+    ENOTCAPABLE = wasi::__WASI_ERRNO_NOTCAPABLE,
+}
+
+impl WasiError {
+    pub fn as_raw_errno(self) -> wasi::__wasi_errno_t {
+        self as wasi::__wasi_errno_t
+    }
+}
+
+#[derive(Debug, Error)]
+pub enum Error {
+    #[error("WASI error code: {0}")]
+    Wasi(#[from] WasiError),
+    #[error("IO error: {0}")]
+    Io(#[from] std::io::Error),
+    #[cfg(unix)]
+    #[error("Yanix error: {0}")]
+    Yanix(#[from] yanix::YanixError),
+}
+
+impl From<TryFromIntError> for Error {
+    fn from(_: TryFromIntError) -> Self {
+        Self::EOVERFLOW
+    }
+}
+
+impl From<Infallible> for Error {
+    fn from(_: Infallible) -> Self {
+        unreachable!()
+    }
+}
+
+impl From<str::Utf8Error> for Error {
+    fn from(_: str::Utf8Error) -> Self {
+        Self::EILSEQ
+    }
+}
+
+impl From<ffi::NulError> for Error {
+    fn from(_: ffi::NulError) -> Self {
+        Self::EILSEQ
+    }
+}
+
+impl From<&ffi::NulError> for Error {
+    fn from(_: &ffi::NulError) -> Self {
+        Self::EILSEQ
+    }
+}
+
+impl Error {
+    pub(crate) fn as_wasi_error(&self) -> WasiError {
+        match self {
+            Self::Wasi(err) => *err,
+            Self::Io(err) => {
+                let err = match err.raw_os_error() {
+                    Some(code) => Self::from_raw_os_error(code),
+                    None => {
+                        log::debug!("Inconvertible OS error: {}", err);
+                        Self::EIO
+                    }
+                };
+                err.as_wasi_error()
+            }
+            #[cfg(unix)]
+            Self::Yanix(err) => {
+                use yanix::YanixError::*;
+                let err: Self = match err {
+                    Errno(errno) => (*errno).into(),
+                    NulError(err) => err.into(),
+                    TryFromIntError(err) => (*err).into(),
+                };
+                err.as_wasi_error()
+            }
+        }
+    }
+
+    pub const ESUCCESS: Self = Error::Wasi(WasiError::ESUCCESS);
+    pub const E2BIG: Self = Error::Wasi(WasiError::E2BIG);
+    pub const EACCES: Self = Error::Wasi(WasiError::EACCES);
+    pub const EADDRINUSE: Self = Error::Wasi(WasiError::EADDRINUSE);
+    pub const EADDRNOTAVAIL: Self = Error::Wasi(WasiError::EADDRNOTAVAIL);
+    pub const EAFNOSUPPORT: Self = Error::Wasi(WasiError::EAFNOSUPPORT);
+    pub const EAGAIN: Self = Error::Wasi(WasiError::EAGAIN);
+    pub const EALREADY: Self = Error::Wasi(WasiError::EALREADY);
+    pub const EBADF: Self = Error::Wasi(WasiError::EBADF);
+    pub const EBADMSG: Self = Error::Wasi(WasiError::EBADMSG);
+    pub const EBUSY: Self = Error::Wasi(WasiError::EBUSY);
+    pub const ECANCELED: Self = Error::Wasi(WasiError::ECANCELED);
+    pub const ECHILD: Self = Error::Wasi(WasiError::ECHILD);
+    pub const ECONNABORTED: Self = Error::Wasi(WasiError::ECONNABORTED);
+    pub const ECONNREFUSED: Self = Error::Wasi(WasiError::ECONNREFUSED);
+    pub const ECONNRESET: Self = Error::Wasi(WasiError::ECONNRESET);
+    pub const EDEADLK: Self = Error::Wasi(WasiError::EDEADLK);
+    pub const EDESTADDRREQ: Self = Error::Wasi(WasiError::EDESTADDRREQ);
+    pub const EDOM: Self = Error::Wasi(WasiError::EDOM);
+    pub const EDQUOT: Self = Error::Wasi(WasiError::EDQUOT);
+    pub const EEXIST: Self = Error::Wasi(WasiError::EEXIST);
+    pub const EFAULT: Self = Error::Wasi(WasiError::EFAULT);
+    pub const EFBIG: Self = Error::Wasi(WasiError::EFBIG);
+    pub const EHOSTUNREACH: Self = Error::Wasi(WasiError::EHOSTUNREACH);
+    pub const EIDRM: Self = Error::Wasi(WasiError::EIDRM);
+    pub const EILSEQ: Self = Error::Wasi(WasiError::EILSEQ);
+    pub const EINPROGRESS: Self = Error::Wasi(WasiError::EINPROGRESS);
+    pub const EINTR: Self = Error::Wasi(WasiError::EINTR);
+    pub const EINVAL: Self = Error::Wasi(WasiError::EINVAL);
+    pub const EIO: Self = Error::Wasi(WasiError::EIO);
+    pub const EISCONN: Self = Error::Wasi(WasiError::EISCONN);
+    pub const EISDIR: Self = Error::Wasi(WasiError::EISDIR);
+    pub const ELOOP: Self = Error::Wasi(WasiError::ELOOP);
+    pub const EMFILE: Self = Error::Wasi(WasiError::EMFILE);
+    pub const EMLINK: Self = Error::Wasi(WasiError::EMLINK);
+    pub const EMSGSIZE: Self = Error::Wasi(WasiError::EMSGSIZE);
+    pub const EMULTIHOP: Self = Error::Wasi(WasiError::EMULTIHOP);
+    pub const ENAMETOOLONG: Self = Error::Wasi(WasiError::ENAMETOOLONG);
+    pub const ENETDOWN: Self = Error::Wasi(WasiError::ENETDOWN);
+    pub const ENETRESET: Self = Error::Wasi(WasiError::ENETRESET);
+    pub const ENETUNREACH: Self = Error::Wasi(WasiError::ENETUNREACH);
+    pub const ENFILE: Self = Error::Wasi(WasiError::ENFILE);
+    pub const ENOBUFS: Self = Error::Wasi(WasiError::ENOBUFS);
+    pub const ENODEV: Self = Error::Wasi(WasiError::ENODEV);
+    pub const ENOENT: Self = Error::Wasi(WasiError::ENOENT);
+    pub const ENOEXEC: Self = Error::Wasi(WasiError::ENOEXEC);
+    pub const ENOLCK: Self = Error::Wasi(WasiError::ENOLCK);
+    pub const ENOLINK: Self = Error::Wasi(WasiError::ENOLINK);
+    pub const ENOMEM: Self = Error::Wasi(WasiError::ENOMEM);
+    pub const ENOMSG: Self = Error::Wasi(WasiError::ENOMSG);
+    pub const ENOPROTOOPT: Self = Error::Wasi(WasiError::ENOPROTOOPT);
+    pub const ENOSPC: Self = Error::Wasi(WasiError::ENOSPC);
+    pub const ENOSYS: Self = Error::Wasi(WasiError::ENOSYS);
+    pub const ENOTCONN: Self = Error::Wasi(WasiError::ENOTCONN);
+    pub const ENOTDIR: Self = Error::Wasi(WasiError::ENOTDIR);
+    pub const ENOTEMPTY: Self = Error::Wasi(WasiError::ENOTEMPTY);
+    pub const ENOTRECOVERABLE: Self = Error::Wasi(WasiError::ENOTRECOVERABLE);
+    pub const ENOTSOCK: Self = Error::Wasi(WasiError::ENOTSOCK);
+    pub const ENOTSUP: Self = Error::Wasi(WasiError::ENOTSUP);
+    pub const ENOTTY: Self = Error::Wasi(WasiError::ENOTTY);
+    pub const ENXIO: Self = Error::Wasi(WasiError::ENXIO);
+    pub const EOVERFLOW: Self = Error::Wasi(WasiError::EOVERFLOW);
+    pub const EOWNERDEAD: Self = Error::Wasi(WasiError::EOWNERDEAD);
+    pub const EPERM: Self = Error::Wasi(WasiError::EPERM);
+    pub const EPIPE: Self = Error::Wasi(WasiError::EPIPE);
+    pub const EPROTO: Self = Error::Wasi(WasiError::EPROTO);
+    pub const EPROTONOSUPPORT: Self = Error::Wasi(WasiError::EPROTONOSUPPORT);
+    pub const EPROTOTYPE: Self = Error::Wasi(WasiError::EPROTOTYPE);
+    pub const ERANGE: Self = Error::Wasi(WasiError::ERANGE);
+    pub const EROFS: Self = Error::Wasi(WasiError::EROFS);
+    pub const ESPIPE: Self = Error::Wasi(WasiError::ESPIPE);
+    pub const ESRCH: Self = Error::Wasi(WasiError::ESRCH);
+    pub const ESTALE: Self = Error::Wasi(WasiError::ESTALE);
+    pub const ETIMEDOUT: Self = Error::Wasi(WasiError::ETIMEDOUT);
+    pub const ETXTBSY: Self = Error::Wasi(WasiError::ETXTBSY);
+    pub const EXDEV: Self = Error::Wasi(WasiError::EXDEV);
+    pub const ENOTCAPABLE: Self = Error::Wasi(WasiError::ENOTCAPABLE);
+}
+
+pub(crate) trait FromRawOsError {
+    fn from_raw_os_error(code: i32) -> Self;
+}
+
+pub(crate) type Result<T> = std::result::Result<T, Error>;
+
+pub(crate) trait AsWasiError {
+    fn as_wasi_error(&self) -> WasiError;
+}
+
+impl<T> AsWasiError for Result<T> {
+    fn as_wasi_error(&self) -> WasiError {
+        self.as_ref()
+            .err()
+            .unwrap_or(&Error::ESUCCESS)
+            .as_wasi_error()
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/fdentry.rs.html b/api/src/wasi_common/fdentry.rs.html new file mode 100644 index 000000000000..a1483c77303a --- /dev/null +++ b/api/src/wasi_common/fdentry.rs.html @@ -0,0 +1,439 @@ +fdentry.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+
+use crate::sys::dev_null;
+use crate::sys::fdentry_impl::{
+    descriptor_as_oshandle, determine_type_and_access_rights, OsHandle,
+};
+use crate::{wasi, Error, Result};
+use std::marker::PhantomData;
+use std::mem::ManuallyDrop;
+use std::ops::{Deref, DerefMut};
+use std::path::PathBuf;
+use std::{fs, io};
+
+#[derive(Debug)]
+pub(crate) enum Descriptor {
+    OsHandle(OsHandle),
+    Stdin,
+    Stdout,
+    Stderr,
+}
+
+impl Descriptor {
+    /// Return a reference to the `OsHandle` treating it as an actual file/dir, and
+    /// allowing operations which require an actual file and not just a stream or
+    /// socket file descriptor.
+    pub(crate) fn as_file(&self) -> Result<&OsHandle> {
+        match self {
+            Self::OsHandle(file) => Ok(file),
+            _ => Err(Error::EBADF),
+        }
+    }
+
+    /// Like `as_file`, but return a mutable reference.
+    pub(crate) fn as_file_mut(&mut self) -> Result<&mut OsHandle> {
+        match self {
+            Self::OsHandle(file) => Ok(file),
+            _ => Err(Error::EBADF),
+        }
+    }
+
+    /// Return an `OsHandle`, which may be a stream or socket file descriptor.
+    pub(crate) fn as_os_handle<'descriptor>(&'descriptor self) -> OsHandleRef<'descriptor> {
+        descriptor_as_oshandle(self)
+    }
+}
+
+/// An abstraction struct serving as a wrapper for a host `Descriptor` object which requires
+/// certain base rights `rights_base` and inheriting rights `rights_inheriting` in order to be
+/// accessed correctly.
+///
+/// Here, the `descriptor` field stores the host `Descriptor` object (such as a file descriptor, or
+/// stdin handle), and accessing it can only be done via the provided `FdEntry::as_descriptor` and
+/// `FdEntry::as_descriptor_mut` methods which require a set of base and inheriting rights to be
+/// specified, verifying whether the stored `Descriptor` object is valid for the rights specified.
+#[derive(Debug)]
+pub(crate) struct FdEntry {
+    pub(crate) file_type: wasi::__wasi_filetype_t,
+    descriptor: Descriptor,
+    pub(crate) rights_base: wasi::__wasi_rights_t,
+    pub(crate) rights_inheriting: wasi::__wasi_rights_t,
+    pub(crate) preopen_path: Option<PathBuf>,
+    // TODO: directories
+}
+
+impl FdEntry {
+    pub(crate) fn from(file: fs::File) -> Result<Self> {
+        unsafe { determine_type_and_access_rights(&file) }.map(
+            |(file_type, rights_base, rights_inheriting)| Self {
+                file_type,
+                descriptor: Descriptor::OsHandle(OsHandle::from(file)),
+                rights_base,
+                rights_inheriting,
+                preopen_path: None,
+            },
+        )
+    }
+
+    pub(crate) fn duplicate_stdin() -> Result<Self> {
+        unsafe { determine_type_and_access_rights(&io::stdin()) }.map(
+            |(file_type, rights_base, rights_inheriting)| Self {
+                file_type,
+                descriptor: Descriptor::Stdin,
+                rights_base,
+                rights_inheriting,
+                preopen_path: None,
+            },
+        )
+    }
+
+    pub(crate) fn duplicate_stdout() -> Result<Self> {
+        unsafe { determine_type_and_access_rights(&io::stdout()) }.map(
+            |(file_type, rights_base, rights_inheriting)| Self {
+                file_type,
+                descriptor: Descriptor::Stdout,
+                rights_base,
+                rights_inheriting,
+                preopen_path: None,
+            },
+        )
+    }
+
+    pub(crate) fn duplicate_stderr() -> Result<Self> {
+        unsafe { determine_type_and_access_rights(&io::stderr()) }.map(
+            |(file_type, rights_base, rights_inheriting)| Self {
+                file_type,
+                descriptor: Descriptor::Stderr,
+                rights_base,
+                rights_inheriting,
+                preopen_path: None,
+            },
+        )
+    }
+
+    pub(crate) fn null() -> Result<Self> {
+        Self::from(dev_null()?)
+    }
+
+    /// Convert this `FdEntry` into a host `Descriptor` object provided the specified
+    /// `rights_base` and `rights_inheriting` rights are set on this `FdEntry` object.
+    ///
+    /// The `FdEntry` can only be converted into a valid `Descriptor` object if
+    /// the specified set of base rights `rights_base`, and inheriting rights `rights_inheriting`
+    /// is a subset of rights attached to this `FdEntry`. The check is performed using
+    /// `FdEntry::validate_rights` method. If the check fails, `Error::ENOTCAPABLE` is returned.
+    pub(crate) fn as_descriptor(
+        &self,
+        rights_base: wasi::__wasi_rights_t,
+        rights_inheriting: wasi::__wasi_rights_t,
+    ) -> Result<&Descriptor> {
+        self.validate_rights(rights_base, rights_inheriting)?;
+        Ok(&self.descriptor)
+    }
+
+    /// Convert this `FdEntry` into a mutable host `Descriptor` object provided the specified
+    /// `rights_base` and `rights_inheriting` rights are set on this `FdEntry` object.
+    ///
+    /// The `FdEntry` can only be converted into a valid `Descriptor` object if
+    /// the specified set of base rights `rights_base`, and inheriting rights `rights_inheriting`
+    /// is a subset of rights attached to this `FdEntry`. The check is performed using
+    /// `FdEntry::validate_rights` method. If the check fails, `Error::ENOTCAPABLE` is returned.
+    pub(crate) fn as_descriptor_mut(
+        &mut self,
+        rights_base: wasi::__wasi_rights_t,
+        rights_inheriting: wasi::__wasi_rights_t,
+    ) -> Result<&mut Descriptor> {
+        self.validate_rights(rights_base, rights_inheriting)?;
+        Ok(&mut self.descriptor)
+    }
+
+    /// Check if this `FdEntry` object satisfies the specified base rights `rights_base`, and
+    /// inheriting rights `rights_inheriting`; i.e., if rights attached to this `FdEntry` object
+    /// are a superset.
+    ///
+    /// Upon unsuccessful check, `Error::ENOTCAPABLE` is returned.
+    fn validate_rights(
+        &self,
+        rights_base: wasi::__wasi_rights_t,
+        rights_inheriting: wasi::__wasi_rights_t,
+    ) -> Result<()> {
+        let missing_base = !self.rights_base & rights_base;
+        let missing_inheriting = !self.rights_inheriting & rights_inheriting;
+        if missing_base != 0 || missing_inheriting != 0 {
+            log::trace!(
+                "     | validate_rights failed: required: \
+                 rights_base = {:#x}, rights_inheriting = {:#x}; \
+                 actual: rights_base = {:#x}, rights_inheriting = {:#x}; \
+                 missing_base = {:#x}, missing_inheriting = {:#x}",
+                rights_base,
+                rights_inheriting,
+                self.rights_base,
+                self.rights_inheriting,
+                missing_base,
+                missing_inheriting
+            );
+            Err(Error::ENOTCAPABLE)
+        } else {
+            Ok(())
+        }
+    }
+
+    /// Test whether this descriptor is considered a tty within WASI.
+    /// Note that since WASI itself lacks an `isatty` syscall and relies
+    /// on a conservative approximation, we use the same approximation here.
+    pub(crate) fn isatty(&self) -> bool {
+        self.file_type == wasi::__WASI_FILETYPE_CHARACTER_DEVICE
+            && (self.rights_base & (wasi::__WASI_RIGHTS_FD_SEEK | wasi::__WASI_RIGHTS_FD_TELL)) == 0
+    }
+}
+
+/// This allows an `OsHandle` to be temporarily borrowed from a
+/// `Descriptor`. The `Descriptor` continues to own the resource,
+/// and `OsHandleRef`'s lifetime parameter ensures that it doesn't
+/// outlive the `Descriptor`.
+pub(crate) struct OsHandleRef<'descriptor> {
+    handle: ManuallyDrop<OsHandle>,
+    _ref: PhantomData<&'descriptor Descriptor>,
+}
+
+impl<'descriptor> OsHandleRef<'descriptor> {
+    pub(crate) fn new(handle: ManuallyDrop<OsHandle>) -> Self {
+        OsHandleRef {
+            handle,
+            _ref: PhantomData,
+        }
+    }
+}
+
+impl<'descriptor> Deref for OsHandleRef<'descriptor> {
+    type Target = fs::File;
+
+    fn deref(&self) -> &Self::Target {
+        &self.handle
+    }
+}
+
+impl<'descriptor> DerefMut for OsHandleRef<'descriptor> {
+    fn deref_mut(&mut self) -> &mut Self::Target {
+        &mut self.handle
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/fs/dir.rs.html b/api/src/wasi_common/fs/dir.rs.html new file mode 100644 index 000000000000..5209ed7ab9a3 --- /dev/null +++ b/api/src/wasi_common/fs/dir.rs.html @@ -0,0 +1,435 @@ +dir.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+
+use crate::fs::{File, OpenOptions, ReadDir};
+use crate::{host, hostcalls, wasi, WasiCtx};
+#[cfg(unix)]
+use std::os::unix::ffi::OsStrExt;
+use std::{io, path::Path};
+
+/// A reference to an open directory on the filesystem.
+///
+/// TODO: Implement `Dir`-using versions of `std::fs`'s free functions:
+/// `copy`, `create_dir`, `create_dir_all`, `hard_link`, `metadata`,
+/// `read_link`, `read_to_string`, `remove_dir`, `remove_dir_all`,
+/// `remove_file`, `rename`, `set_permissions`, `symlink_metadata`, and
+/// `write`.
+///
+/// Unlike `std::fs`, this API has no `canonicalize`, because absolute paths
+/// don't interoperate well with the capability-oriented security model.
+pub struct Dir<'ctx> {
+    ctx: &'ctx mut WasiCtx,
+    fd: wasi::__wasi_fd_t,
+}
+
+impl<'ctx> Dir<'ctx> {
+    /// Constructs a new instance of `Self` from the given raw WASI file descriptor.
+    pub unsafe fn from_raw_wasi_fd(ctx: &'ctx mut WasiCtx, fd: wasi::__wasi_fd_t) -> Self {
+        Self { ctx, fd }
+    }
+
+    /// Attempts to open a file in read-only mode.
+    ///
+    /// This corresponds to [`std::fs::File::open`], but only accesses paths
+    /// relative to and within `self`.
+    ///
+    /// TODO: Not yet implemented. Refactor the hostcalls functions to split out the
+    /// encoding/decoding parts from the underlying functionality, so that we can call
+    /// into the underlying functionality directly.
+    ///
+    /// [`std::fs::File::open`]: https://doc.rust-lang.org/std/fs/struct.File.html#method.open
+    pub fn open_file<P: AsRef<Path>>(&mut self, path: P) -> io::Result<File> {
+        let path = path.as_ref();
+        let mut fd = 0;
+
+        // TODO: Refactor the hostcalls functions to split out the encoding/decoding
+        // parts from the underlying functionality, so that we can call into the
+        // underlying functionality directly.
+        //
+        // TODO: Set the requested rights to be readonly.
+        //
+        // TODO: Handle paths for non-Unix platforms which don't have `as_bytes()`
+        // on `OsStrExt`.
+        unimplemented!("Dir::open_file");
+        /*
+        wasi_errno_to_io_error(hostcalls::path_open(
+            self.ctx,
+            self.fd,
+            wasi::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW,
+            path.as_os_str().as_bytes(),
+            path.as_os_str().len(),
+            0,
+            !0,
+            !0,
+            0,
+            &mut fd,
+        ))?;
+        */
+
+        let ctx = self.ctx;
+        Ok(unsafe { File::from_raw_wasi_fd(ctx, fd) })
+    }
+
+    /// Opens a file at `path` with the options specified by `self`.
+    ///
+    /// This corresponds to [`std::fs::OpenOptions::open`].
+    ///
+    /// Instead of being a method on `OpenOptions`, this is a method on `Dir`,
+    /// and it only accesses functions relative to and within `self`.
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::OpenOptions::open`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.open
+    pub fn open_file_with<P: AsRef<Path>>(
+        &mut self,
+        path: P,
+        options: &OpenOptions,
+    ) -> io::Result<File> {
+        unimplemented!("Dir::open_file_with");
+    }
+
+    /// Attempts to open a directory.
+    ///
+    /// TODO: Not yet implemented. See the comment in `open_file`.
+    pub fn open_dir<P: AsRef<Path>>(&mut self, path: P) -> io::Result<Self> {
+        let path = path.as_ref();
+        let mut fd = 0;
+
+        // TODO: See the comment in `open_file`.
+        unimplemented!("Dir::open_dir");
+        /*
+        wasi_errno_to_io_error(hostcalls::path_open(
+            self.ctx,
+            self.fd,
+            wasi::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW,
+            path.as_os_str().as_bytes(),
+            wasi::__WASI_OFLAGS_DIRECTORY,
+            !0,
+            !0,
+            0,
+            &mut fd,
+        ))?;
+        */
+
+        let ctx = self.ctx;
+        Ok(unsafe { Dir::from_raw_wasi_fd(ctx, fd) })
+    }
+
+    /// Opens a file in write-only mode.
+    ///
+    /// This corresponds to [`std::fs::File::create`], but only accesses paths
+    /// relative to and within `self`.
+    ///
+    /// TODO: Not yet implemented. See the comment in `open_file`.
+    ///
+    /// [`std::fs::File::create`]: https://doc.rust-lang.org/std/fs/struct.File.html#method.create
+    pub fn create_file<P: AsRef<Path>>(&mut self, path: P) -> io::Result<File> {
+        let path = path.as_ref();
+        let mut fd = 0;
+
+        // TODO: See the comments in `open_file`.
+        //
+        // TODO: Set the requested rights to be read+write.
+        unimplemented!("Dir::create_file");
+        /*
+        wasi_errno_to_io_error(hostcalls::path_open(
+            self.ctx,
+            self.fd,
+            wasi::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW,
+            path.as_os_str().as_bytes(),
+            path.as_os_str().len(),
+            wasi::__WASI_OFLAGS_CREAT | wasi::__WASI_OFLAGS_TRUNC,
+            !0,
+            !0,
+            0,
+            &mut fd,
+        ))?;
+        */
+
+        let ctx = self.ctx;
+        Ok(unsafe { File::from_raw_wasi_fd(ctx, fd) })
+    }
+
+    /// Returns an iterator over the entries within a directory.
+    ///
+    /// This corresponds to [`std::fs::read_dir`], but reads the directory
+    /// represented by `self`.
+    ///
+    /// TODO: Not yet implemented. We may need to wait until we have the ability
+    /// to duplicate file descriptors before we can implement read safely. For
+    /// now, use `into_read` instead.
+    ///
+    /// [`std::fs::read_dir`]: https://doc.rust-lang.org/std/fs/fn.read_dir.html
+    pub fn read(&mut self) -> io::Result<ReadDir> {
+        unimplemented!("Dir::read")
+    }
+
+    /// Consumes self and returns an iterator over the entries within a directory
+    /// in the manner of `read`.
+    pub fn into_read(self) -> ReadDir {
+        unsafe { ReadDir::from_raw_wasi_fd(self.fd) }
+    }
+
+    /// Read the entire contents of a file into a bytes vector.
+    ///
+    /// This corresponds to [`std::fs::read`], but only accesses paths
+    /// relative to and within `self`.
+    ///
+    /// [`std::fs::read`]: https://doc.rust-lang.org/std/fs/fn.read.html
+    pub fn read_file<P: AsRef<Path>>(&mut self, path: P) -> io::Result<Vec<u8>> {
+        use io::Read;
+        let mut file = self.open_file(path)?;
+        let mut bytes = Vec::with_capacity(initial_buffer_size(&file));
+        file.read_to_end(&mut bytes)?;
+        Ok(bytes)
+    }
+
+    /// Returns an iterator over the entries within a directory.
+    ///
+    /// This corresponds to [`std::fs::read_dir`], but only accesses paths
+    /// relative to and within `self`.
+    ///
+    /// [`std::fs::read_dir`]: https://doc.rust-lang.org/std/fs/fn.read_dir.html
+    pub fn read_dir<P: AsRef<Path>>(&mut self, path: P) -> io::Result<ReadDir> {
+        self.open_dir(path)?.read()
+    }
+}
+
+impl<'ctx> Drop for Dir<'ctx> {
+    fn drop(&mut self) {
+        // Note that errors are ignored when closing a file descriptor. The
+        // reason for this is that if an error occurs we don't actually know if
+        // the file descriptor was closed or not, and if we retried (for
+        // something like EINTR), we might close another valid file descriptor
+        // opened after we closed ours.
+        let _ = unsafe { hostcalls::fd_close(self.ctx, &mut [], self.fd) };
+    }
+}
+
+/// Indicates how large a buffer to pre-allocate before reading the entire file.
+///
+/// Derived from the function of the same name in libstd.
+fn initial_buffer_size(file: &File) -> usize {
+    // Allocate one extra byte so the buffer doesn't need to grow before the
+    // final `read` call at the end of the file.  Don't worry about `usize`
+    // overflow because reading will fail regardless in that case.
+    file.metadata().map(|m| m.len() as usize + 1).unwrap_or(0)
+}
+
+// TODO: impl Debug for Dir
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/fs/dir_builder.rs.html b/api/src/wasi_common/fs/dir_builder.rs.html new file mode 100644 index 000000000000..5f633ddded40 --- /dev/null +++ b/api/src/wasi_common/fs/dir_builder.rs.html @@ -0,0 +1,101 @@ +dir_builder.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+
+use std::{io, path::Path};
+
+/// A builder used to create directories in various manners.
+///
+/// This corresponds to [`std::fs::DirBuilder`].
+///
+/// TODO: Not yet implemented.
+///
+/// [`std::fs::DirBuilder`]: https://doc.rust-lang.org/std/fs/struct.DirBuilder.html
+pub struct DirBuilder {}
+
+impl DirBuilder {
+    /// Creates a new set of options with default mode/security settings for all platforms and also non-recursive.
+    ///
+    /// This corresponds to [`std::fs::DirBuilder::new`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::DirBuilder::new`]: https://doc.rust-lang.org/std/fs/struct.DirBuilder.html#method.new
+    pub fn new() -> Self {
+        unimplemented!("DirBuilder::new");
+    }
+
+    /// Indicates that directories should be created recursively, creating all parent directories.
+    ///
+    /// This corresponds to [`std::fs::DirBuilder::recursive`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::DirBuilder::recursive`]: https://doc.rust-lang.org/std/fs/struct.DirBuilder.html#method.recursive
+    pub fn recursive(&mut self, recursive: bool) -> &mut Self {
+        unimplemented!("DirBuilder::recursive");
+    }
+
+    /// Creates the specified directory with the options configured in this builder.
+    ///
+    /// This corresponds to [`std::fs::DirBuilder::create`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::DirBuilder::create`]: https://doc.rust-lang.org/std/fs/struct.DirBuilder.html#method.create
+    pub fn create<P: AsRef<Path>>(&self, path: P) -> io::Result<()> {
+        unimplemented!("DirBuilder::create");
+    }
+}
+
+// TODO: functions from DirBuilderExt?
+
+// TODO: impl Debug for DirBuilder
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/fs/dir_entry.rs.html b/api/src/wasi_common/fs/dir_entry.rs.html new file mode 100644 index 000000000000..458d0293b05a --- /dev/null +++ b/api/src/wasi_common/fs/dir_entry.rs.html @@ -0,0 +1,109 @@ +dir_entry.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+
+use crate::fs::{FileType, Metadata};
+use std::{ffi, io};
+
+/// Entries returned by the ReadDir iterator.
+///
+/// This corresponds to [`std::fs::DirEntry`].
+///
+/// Unlike `std::fs::DirEntry`, this API has no `DirEntry::path`, because
+/// absolute paths don't interoperate well with the capability-oriented
+/// security model.
+///
+/// TODO: Not yet implemented.
+///
+/// [`std::fs::DirEntry`]: https://doc.rust-lang.org/std/fs/struct.DirEntry.html
+pub struct DirEntry {}
+
+impl DirEntry {
+    /// Returns the metadata for the file that this entry points at.
+    ///
+    /// This corresponds to [`std::fs::DirEntry::metadata`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::DirEntry::metadata`]: https://doc.rust-lang.org/std/fs/struct.DirEntry.html#method.metadata
+    pub fn metadata(&self) -> io::Result<Metadata> {
+        unimplemented!("DirEntry::metadata");
+    }
+
+    /// Returns the file type for the file that this entry points at.
+    ///
+    /// This to [`std::fs::DirEntry::file_type`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::DirEntry::file_type`]: https://doc.rust-lang.org/std/fs/struct.DirEntry.html#method.file_type
+    pub fn file_type(&self) -> io::Result<FileType> {
+        unimplemented!("DirEntry::file_type");
+    }
+
+    /// Returns the bare file name of this directory entry without any other leading path component.
+    ///
+    /// This corresponds to [`std::fs::DirEntry::file_name`], though it returns
+    /// `String` rather than `OsString`.
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::DirEntry::file_name`]: https://doc.rust-lang.org/std/fs/struct.DirEntry.html#method.file_name
+    pub fn file_name(&self) -> String {
+        unimplemented!("DirEntry::file_name");
+    }
+}
+
+// TODO: impl Debug for DirEntry
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/fs/file.rs.html b/api/src/wasi_common/fs/file.rs.html new file mode 100644 index 000000000000..177f47954277 --- /dev/null +++ b/api/src/wasi_common/fs/file.rs.html @@ -0,0 +1,235 @@ +file.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+
+use crate::fs::Metadata;
+use crate::{host, hostcalls, hostcalls_impl, wasi, Result, WasiCtx};
+use std::io;
+
+/// A reference to an open file on the filesystem.
+///
+/// This corresponds to [`std::fs::File`].
+///
+/// Note that this `File` has no `open` or `create` methods. To open or create
+/// a file, you must first obtain a [`Dir`] containing the file, and then call
+/// [`Dir::open_file`] or [`Dir::create_file`].
+///
+/// [`std::fs::File`]: https://doc.rust-lang.org/std/fs/struct.File.html
+/// [`Dir`]: struct.Dir.html
+/// [`Dir::open_file`]: struct.Dir.html#method.open_file
+/// [`Dir::create_file`]: struct.Dir.html#method.create_file
+pub struct File<'ctx> {
+    ctx: &'ctx mut WasiCtx,
+    fd: wasi::__wasi_fd_t,
+}
+
+impl<'ctx> File<'ctx> {
+    /// Constructs a new instance of `Self` from the given raw WASI file descriptor.
+    ///
+    /// This corresponds to [`std::fs::File::from_raw_fd`].
+    ///
+    /// [`std::fs::File::from_raw_fd`]: https://doc.rust-lang.org/std/fs/struct.File.html#method.from_raw_fd
+    pub unsafe fn from_raw_wasi_fd(ctx: &'ctx mut WasiCtx, fd: wasi::__wasi_fd_t) -> Self {
+        Self { ctx, fd }
+    }
+
+    /// Attempts to sync all OS-internal metadata to disk.
+    ///
+    /// This corresponds to [`std::fs::File::sync_all`].
+    ///
+    /// [`std::fs::File::sync_all`]: https://doc.rust-lang.org/std/fs/struct.File.html#method.sync_all
+    pub fn sync_all(&self) -> Result<()> {
+        unsafe {
+            hostcalls_impl::fd_sync(self.ctx, &mut [], self.fd)?;
+        }
+        Ok(())
+    }
+
+    /// This function is similar to `sync_all`, except that it may not synchronize
+    /// file metadata to the filesystem.
+    ///
+    /// This corresponds to [`std::fs::File::sync_data`].
+    ///
+    /// [`std::fs::File::sync_data`]: https://doc.rust-lang.org/std/fs/struct.File.html#method.sync_data
+    pub fn sync_data(&self) -> Result<()> {
+        unsafe {
+            hostcalls_impl::fd_datasync(self.ctx, &mut [], self.fd)?;
+        }
+        Ok(())
+    }
+
+    /// Truncates or extends the underlying file, updating the size of this file
+    /// to become size.
+    ///
+    /// This corresponds to [`std::fs::File::set_len`].
+    ///
+    /// [`std::fs::File::set_len`]: https://doc.rust-lang.org/std/fs/struct.File.html#method.set_len
+    pub fn set_len(&self, size: u64) -> Result<()> {
+        unsafe {
+            hostcalls_impl::fd_filestat_set_size(self.ctx, &mut [], self.fd, size)?;
+        }
+        Ok(())
+    }
+
+    /// Queries metadata about the underlying file.
+    ///
+    /// This corresponds to [`std::fs::File::metadata`].
+    ///
+    /// [`std::fs::File::metadata`]: https://doc.rust-lang.org/std/fs/struct.File.html#method.metadata
+    pub fn metadata(&self) -> Result<Metadata> {
+        Ok(Metadata {})
+    }
+}
+
+impl<'ctx> Drop for File<'ctx> {
+    fn drop(&mut self) {
+        // Note that errors are ignored when closing a file descriptor. The
+        // reason for this is that if an error occurs we don't actually know if
+        // the file descriptor was closed or not, and if we retried (for
+        // something like EINTR), we might close another valid file descriptor
+        // opened after we closed ours.
+        let _ = unsafe { hostcalls::fd_close(self.ctx, &mut [], self.fd) };
+    }
+}
+
+impl<'ctx> io::Read for File<'ctx> {
+    /// TODO: Not yet implemented. See the comment in `Dir::open_file`.
+    fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
+        let iov = [host::__wasi_iovec_t {
+            buf: buf.as_mut_ptr() as *mut u8,
+            buf_len: buf.len(),
+        }];
+        let mut nread = 0;
+
+        // TODO: See the comment in `Dir::open_file`.
+        unimplemented!("File::read");
+        /*
+        wasi_errno_to_io_error(unsafe {
+            hostcalls::fd_read(self.ctx, self.fd, &iov, 1, &mut nread)
+        })?;
+        */
+
+        Ok(nread)
+    }
+}
+
+// TODO: traits to implement: Write, Seek
+
+// TODO: functions from FileExt?
+
+// TODO: impl Debug for File
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/fs/file_type.rs.html b/api/src/wasi_common/fs/file_type.rs.html new file mode 100644 index 000000000000..0b6a06a2e9c9 --- /dev/null +++ b/api/src/wasi_common/fs/file_type.rs.html @@ -0,0 +1,101 @@ +file_type.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+
+/// A structure representing a type of file with accessors for each file type.
+/// It is returned by `Metadata::file_type` method.
+///
+/// This corresponds to [`std::fs::FileType`].
+///
+/// TODO: Not yet implemented.
+///
+/// [`std::fs::FileType`]: https://doc.rust-lang.org/std/fs/struct.FileType.html
+#[derive(Copy, Clone, Eq, PartialEq, Hash)]
+pub struct FileType {}
+
+impl FileType {
+    /// Tests whether this file type represents a directory.
+    ///
+    /// This corresponds to [`std::fs::FileType::is_dir`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::FileType::is_dir`]: https://doc.rust-lang.org/std/fs/struct.FileType.html#method.is_dir
+    pub fn is_dir(&self) -> bool {
+        unimplemented!("FileType::is_dir");
+    }
+
+    /// Tests whether this file type represents a regular file.
+    ///
+    /// This corresponds to [`std::fs::FileType::is_file`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::FileType::is_file`]: https://doc.rust-lang.org/std/fs/struct.FileType.html#method.is_file
+    pub fn is_file(&self) -> bool {
+        unimplemented!("FileType::is_file");
+    }
+
+    /// Tests whether this file type represents a symbolic link.
+    ///
+    /// This corresponds to [`std::fs::FileType::is_symlink`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::FileType::is_symlink`]: https://doc.rust-lang.org/std/fs/struct.FileType.html#method.is_symlink
+    pub fn is_symlink(&self) -> bool {
+        unimplemented!("FileType::is_symlink");
+    }
+}
+
+// TODO: functions from FileTypeExt?
+
+// TODO: impl Debug for FileType
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/fs/metadata.rs.html b/api/src/wasi_common/fs/metadata.rs.html new file mode 100644 index 000000000000..4c621b6f1328 --- /dev/null +++ b/api/src/wasi_common/fs/metadata.rs.html @@ -0,0 +1,215 @@ +metadata.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+
+use crate::fs::{FileType, Permissions};
+use std::{io, time::SystemTime};
+
+/// Metadata information about a file.
+///
+/// This corresponds to [`std::fs::Metadata`].
+///
+/// TODO: Not yet implemented.
+///
+/// [`std::fs::Metadata`]: https://doc.rust-lang.org/std/fs/struct.Metadata.html
+#[derive(Clone)]
+pub struct Metadata {}
+
+impl Metadata {
+    /// Returns the file type for this metadata.
+    ///
+    /// This corresponds to [`std::fs::Metadata::file_type`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::Metadata::file_type`]: https://doc.rust-lang.org/std/fs/struct.Metadata.html#method.file_type
+    pub fn file_type(&self) -> FileType {
+        unimplemented!("Metadata::file_type");
+    }
+
+    /// Returns true if this metadata is for a directory.
+    ///
+    /// This corresponds to [`std::fs::Metadata::is_dir`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::Metadata::is_dir`]: https://doc.rust-lang.org/std/fs/struct.Metadata.html#method.is_dir
+    pub fn is_dir(&self) -> bool {
+        unimplemented!("Metadata::is_dir");
+    }
+
+    /// Returns true if this metadata is for a regular file.
+    ///
+    /// This corresponds to [`std::fs::Metadata::is_file`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::Metadata::is_file`]: https://doc.rust-lang.org/std/fs/struct.Metadata.html#method.is_file
+    pub fn is_file(&self) -> bool {
+        unimplemented!("Metadata::is_file");
+    }
+
+    /// Returns the size of the file, in bytes, this metadata is for.
+    ///
+    /// This corresponds to [`std::fs::Metadata::len`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::Metadata::len`]: https://doc.rust-lang.org/std/fs/struct.Metadata.html#method.len
+    pub fn len(&self) -> u64 {
+        unimplemented!("Metadata::len");
+    }
+
+    /// Returns the permissions of the file this metadata is for.
+    ///
+    /// This corresponds to [`std::fs::Metadata::permissions`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::Metadata::permissions`]: https://doc.rust-lang.org/std/fs/struct.Metadata.html#method.permissions
+    pub fn permissions(&self) -> Permissions {
+        unimplemented!("Metadata::permissions");
+    }
+
+    /// Returns the last modification time listed in this metadata.
+    ///
+    /// This corresponds to [`std::fs::Metadata::modified`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::Metadata::modified`]: https://doc.rust-lang.org/std/fs/struct.Metadata.html#method.modified
+    pub fn modified(&self) -> io::Result<SystemTime> {
+        unimplemented!("Metadata::modified");
+    }
+
+    /// Returns the last access time of this metadata.
+    ///
+    /// This corresponds to [`std::fs::Metadata::accessed`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::Metadata::accessed`]: https://doc.rust-lang.org/std/fs/struct.Metadata.html#method.accessed
+    pub fn accessed(&self) -> io::Result<SystemTime> {
+        unimplemented!("Metadata::accessed");
+    }
+
+    /// Returns the creation time listed in this metadata.
+    ///
+    /// This corresponds to [`std::fs::Metadata::created`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::Metadata::created`]: https://doc.rust-lang.org/std/fs/struct.Metadata.html#method.created
+    pub fn created(&self) -> io::Result<SystemTime> {
+        unimplemented!("Metadata::created");
+    }
+}
+
+// TODO: Functions from MetadataExt?
+
+// TODO: impl Debug for Metadata
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/fs/mod.rs.html b/api/src/wasi_common/fs/mod.rs.html new file mode 100644 index 000000000000..de0515178742 --- /dev/null +++ b/api/src/wasi_common/fs/mod.rs.html @@ -0,0 +1,103 @@ +mod.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+
+//! A very experimental module modeled providing a high-level and safe
+//! filesystem interface, modeled after `std::fs`, implemented on top of
+//! WASI functions.
+//!
+//! Most functions in this API are not yet implemented!
+//!
+//! This corresponds to [`std::fs`].
+//!
+//! Instead of [`std::fs`'s free functions] which operate on paths, this
+//! crate has methods on [`Dir`] which operate on paths which must be
+//! relative to and within the directory.
+//!
+//! Since all functions which expose raw file descriptors are `unsafe`,
+//! I/O handles in this API are unforgeable (unsafe code notwithstanding).
+//! This combined with WASI's lack of absolute paths provides a natural
+//! capability-oriented interface.
+//!
+//! [`std::fs`]: https://doc.rust-lang.org/std/fs/index.html
+//! [`std::fs`'s free functions]: https://doc.rust-lang.org/std/fs/index.html#functions
+//! [`DIR`]: struct.Dir.html
+
+// TODO: When more things are implemented, remove these.
+#![allow(
+    unused_imports,
+    unreachable_code,
+    unused_variables,
+    unused_mut,
+    unused_unsafe,
+    dead_code
+)]
+
+mod dir;
+mod dir_builder;
+mod dir_entry;
+mod file;
+mod file_type;
+mod metadata;
+mod open_options;
+mod permissions;
+mod readdir;
+
+pub use dir::*;
+pub use dir_builder::*;
+pub use dir_entry::*;
+pub use file::*;
+pub use file_type::*;
+pub use metadata::*;
+pub use open_options::*;
+pub use permissions::*;
+pub use readdir::*;
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/fs/open_options.rs.html b/api/src/wasi_common/fs/open_options.rs.html new file mode 100644 index 000000000000..7910f4bd099a --- /dev/null +++ b/api/src/wasi_common/fs/open_options.rs.html @@ -0,0 +1,201 @@ +open_options.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+
+/// Options and flags which can be used to configure how a file is opened.
+///
+/// This corresponds to [`std::fs::OpenOptions`].
+///
+/// Note that this `OpenOptions` has no `open` method. To open a file with
+/// an `OptionOptions`, you must first obtain a [`Dir`] containing the file, and
+/// then call [`Dir::open_file_with`].
+///
+/// [`std::fs::OpenOptions`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html
+/// [`Dir`]: struct.Dir.html
+/// [`Dir::open_file_with`]: struct.Dir.html#method.open_file_with
+pub struct OpenOptions {
+    pub(crate) read: bool,
+    pub(crate) write: bool,
+    pub(crate) append: bool,
+    pub(crate) truncate: bool,
+    pub(crate) create: bool,
+    pub(crate) create_new: bool,
+}
+
+impl OpenOptions {
+    /// Creates a blank new set of options ready for configuration.
+    ///
+    /// This corresponds to [`std::fs::OpenOptions::new`].
+    ///
+    /// [`std::fs::OpenOptions::new`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.new
+    pub fn new() -> Self {
+        Self {
+            read: false,
+            write: false,
+            append: false,
+            truncate: false,
+            create: false,
+            create_new: false,
+        }
+    }
+
+    /// Sets the option for read access.
+    ///
+    /// This corresponds to [`std::fs::OpenOptions::read`].
+    ///
+    /// [`std::fs::OpenOptions::read`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.read
+    pub fn read(&mut self, read: bool) -> &mut Self {
+        self.read = read;
+        self
+    }
+
+    /// Sets the option for write access.
+    ///
+    /// This corresponds to [`std::fs::OpenOptions::write`].
+    ///
+    /// [`std::fs::OpenOptions::write`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.write
+    pub fn write(&mut self, write: bool) -> &mut Self {
+        self.write = write;
+        self
+    }
+
+    /// Sets the option for the append mode.
+    ///
+    /// This corresponds to [`std::fs::OpenOptions::append`].
+    ///
+    /// [`std::fs::OpenOptions::append`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.append
+    pub fn append(&mut self, append: bool) -> &mut Self {
+        self.append = append;
+        self
+    }
+
+    /// Sets the option for truncating a previous file.
+    ///
+    /// This corresponds to [`std::fs::OpenOptions::truncate`].
+    ///
+    /// [`std::fs::OpenOptions::truncate`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.truncate
+    pub fn truncate(&mut self, truncate: bool) -> &mut Self {
+        self.truncate = truncate;
+        self
+    }
+
+    /// Sets the option to create a new file.
+    ///
+    /// This corresponds to [`std::fs::OpenOptions::create`].
+    ///
+    /// [`std::fs::OpenOptions::create`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.create
+    pub fn create(&mut self, create: bool) -> &mut Self {
+        self.create = create;
+        self
+    }
+
+    /// Sets the option to always create a new file.
+    ///
+    /// This corresponds to [`std::fs::OpenOptions::create_new`].
+    ///
+    /// [`std::fs::OpenOptions::create_new`]: https://doc.rust-lang.org/std/fs/struct.OpenOptions.html#method.create_new
+    pub fn create_new(&mut self, create_new: bool) -> &mut Self {
+        self.create_new = create_new;
+        self
+    }
+}
+
+// TODO: Functions from OpenOptionsExt?
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/fs/permissions.rs.html b/api/src/wasi_common/fs/permissions.rs.html new file mode 100644 index 000000000000..c3f9ab56d170 --- /dev/null +++ b/api/src/wasi_common/fs/permissions.rs.html @@ -0,0 +1,77 @@ +permissions.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+/// Representation of the various permissions on a file.
+///
+/// This corresponds to [`std::fs::Permissions`].
+///
+/// TODO: Not yet implemented.
+///
+/// [`std::fs::Permissions`]: https://doc.rust-lang.org/std/fs/struct.Permissions.html
+#[derive(Eq, PartialEq, Clone)]
+pub struct Permissions {}
+
+impl Permissions {
+    /// Returns true if these permissions describe a readonly (unwritable) file.
+    ///
+    /// This corresponds to [`std::fs::Permissions::readonly`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::Permissions::readonly`]: https://doc.rust-lang.org/std/fs/struct.Permissions.html#method.readonly
+    pub fn readonly(&self) -> bool {
+        unimplemented!("Permissions::readonly");
+    }
+
+    /// Modifies the readonly flag for this set of permissions.
+    ///
+    /// This corresponds to [`std::fs::Permissions::set_readonly`].
+    ///
+    /// TODO: Not yet implemented.
+    ///
+    /// [`std::fs::Permissions::set_readonly`]: https://doc.rust-lang.org/std/fs/struct.Permissions.html#method.set_readonly
+    pub fn set_readonly(&mut self, readonly: bool) {
+        unimplemented!("Permissions::set_readonly");
+    }
+}
+
+// TODO: functions from PermissionsExt?
+
+// TODO: impl Debug for Permissions
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/fs/readdir.rs.html b/api/src/wasi_common/fs/readdir.rs.html new file mode 100644 index 000000000000..2903f19ddccc --- /dev/null +++ b/api/src/wasi_common/fs/readdir.rs.html @@ -0,0 +1,67 @@ +readdir.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
+use crate::fs::DirEntry;
+use crate::{hostcalls, wasi};
+
+/// Iterator over the entries in a directory.
+///
+/// This corresponds to [`std::fs::ReadDir`].
+///
+/// TODO: Not yet implemented.
+///
+/// [`std::fs::ReadDir`]: https://doc.rust-lang.org/std/fs/struct.ReadDir.html
+pub struct ReadDir {
+    fd: wasi::__wasi_fd_t,
+}
+
+impl ReadDir {
+    /// Constructs a new instance of `Self` from the given raw WASI file descriptor.
+    pub unsafe fn from_raw_wasi_fd(fd: wasi::__wasi_fd_t) -> Self {
+        Self { fd }
+    }
+}
+
+/// TODO: Not yet implemented.
+impl Iterator for ReadDir {
+    type Item = DirEntry;
+
+    /// TODO: Not yet implemented.
+    fn next(&mut self) -> Option<Self::Item> {
+        unimplemented!("ReadDir::next");
+    }
+}
+
+// TODO: impl Debug for ReadDir
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/helpers.rs.html b/api/src/wasi_common/helpers.rs.html new file mode 100644 index 000000000000..3b8349e4de93 --- /dev/null +++ b/api/src/wasi_common/helpers.rs.html @@ -0,0 +1,23 @@ +helpers.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+
+use crate::{Error, Result};
+use std::str;
+
+/// Creates not-owned WASI path from byte slice.
+///
+/// NB WASI spec requires bytes to be valid UTF-8. Otherwise,
+/// `__WASI_ERRNO_ILSEQ` error is returned.
+pub(crate) fn path_from_slice<'a>(s: &'a [u8]) -> Result<&'a str> {
+    str::from_utf8(s).map_err(|_| Error::EILSEQ)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/host.rs.html b/api/src/wasi_common/host.rs.html new file mode 100644 index 000000000000..423e59209691 --- /dev/null +++ b/api/src/wasi_common/host.rs.html @@ -0,0 +1,339 @@ +host.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+
+//! WASI host types. These are types that contain raw pointers and `usize`
+//! values, and so are platform-specific.
+
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+
+use crate::wasi::*;
+use crate::{Error, Result};
+use std::{convert::TryInto, io, mem, slice};
+use wig::witx_host_types;
+
+witx_host_types!("snapshot" "wasi_snapshot_preview1");
+
+pub(crate) unsafe fn ciovec_to_host(ciovec: &__wasi_ciovec_t) -> io::IoSlice {
+    let slice = slice::from_raw_parts(ciovec.buf as *const u8, ciovec.buf_len);
+    io::IoSlice::new(slice)
+}
+
+pub(crate) unsafe fn iovec_to_host_mut(iovec: &mut __wasi_iovec_t) -> io::IoSliceMut {
+    let slice = slice::from_raw_parts_mut(iovec.buf as *mut u8, iovec.buf_len);
+    io::IoSliceMut::new(slice)
+}
+
+#[allow(dead_code)] // trouble with sockets
+#[derive(Clone, Copy, Debug)]
+#[repr(u8)]
+pub(crate) enum FileType {
+    Unknown = __WASI_FILETYPE_UNKNOWN,
+    BlockDevice = __WASI_FILETYPE_BLOCK_DEVICE,
+    CharacterDevice = __WASI_FILETYPE_CHARACTER_DEVICE,
+    Directory = __WASI_FILETYPE_DIRECTORY,
+    RegularFile = __WASI_FILETYPE_REGULAR_FILE,
+    SocketDgram = __WASI_FILETYPE_SOCKET_DGRAM,
+    SocketStream = __WASI_FILETYPE_SOCKET_STREAM,
+    Symlink = __WASI_FILETYPE_SYMBOLIC_LINK,
+}
+
+impl FileType {
+    pub(crate) fn to_wasi(&self) -> __wasi_filetype_t {
+        *self as __wasi_filetype_t
+    }
+}
+
+#[derive(Debug, Clone)]
+pub(crate) struct Dirent {
+    pub name: String,
+    pub ftype: FileType,
+    pub ino: u64,
+    pub cookie: __wasi_dircookie_t,
+}
+
+impl Dirent {
+    /// Serialize the directory entry to the format define by `__wasi_fd_readdir`,
+    /// so that the serialized entries can be concatenated by the implementation.
+    pub fn to_wasi_raw(&self) -> Result<Vec<u8>> {
+        let name = self.name.as_bytes();
+        let namlen = name.len();
+        let dirent_size = mem::size_of::<__wasi_dirent_t>();
+        let offset = dirent_size.checked_add(namlen).ok_or(Error::EOVERFLOW)?;
+
+        let mut raw = Vec::<u8>::with_capacity(offset);
+        raw.resize(offset, 0);
+
+        let sys_dirent = raw.as_mut_ptr() as *mut __wasi_dirent_t;
+        unsafe {
+            sys_dirent.write_unaligned(__wasi_dirent_t {
+                d_namlen: namlen.try_into()?,
+                d_ino: self.ino,
+                d_next: self.cookie,
+                d_type: self.ftype.to_wasi(),
+            });
+        }
+
+        let sys_name = unsafe { sys_dirent.offset(1) as *mut u8 };
+        let sys_name = unsafe { slice::from_raw_parts_mut(sys_name, namlen) };
+        sys_name.copy_from_slice(&name);
+
+        Ok(raw)
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_t>(),
+            16usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).pr_type as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_t),
+                "::",
+                stringify!(pr_type)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).u as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_t),
+                "::",
+                stringify!(u)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_dir_t>(),
+            8usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_dir_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_dir_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_dir_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_prestat_dir_t>())).pr_name_len as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_dir_t),
+                "::",
+                stringify!(pr_name_len)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_u_t>(),
+            8usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_u))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_u_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_u))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_u_t>())).dir as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_u_t),
+                "::",
+                stringify!(dir)
+            )
+        );
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/hostcalls_impl/fs.rs.html b/api/src/wasi_common/hostcalls_impl/fs.rs.html new file mode 100644 index 000000000000..7876d86c3595 --- /dev/null +++ b/api/src/wasi_common/hostcalls_impl/fs.rs.html @@ -0,0 +1,2187 @@ +fs.rs.html -- source
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+
+#![allow(non_camel_case_types)]
+use super::fs_helpers::path_get;
+use crate::ctx::WasiCtx;
+use crate::fdentry::{Descriptor, FdEntry};
+use crate::helpers::*;
+use crate::memory::*;
+use crate::sandboxed_tty_writer::SandboxedTTYWriter;
+use crate::sys::hostcalls_impl::fs_helpers::path_open_rights;
+use crate::sys::{host_impl, hostcalls_impl};
+use crate::{helpers, host, wasi, wasi32, Error, Result};
+use filetime::{set_file_handle_times, FileTime};
+use log::trace;
+use std::fs::File;
+use std::io::{self, Read, Seek, SeekFrom, Write};
+use std::ops::DerefMut;
+use std::time::{Duration, SystemTime, UNIX_EPOCH};
+
+pub(crate) unsafe fn fd_close(
+    wasi_ctx: &mut WasiCtx,
+    _memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+) -> Result<()> {
+    trace!("fd_close(fd={:?})", fd);
+
+    if let Ok(fe) = wasi_ctx.get_fd_entry(fd) {
+        // can't close preopened files
+        if fe.preopen_path.is_some() {
+            return Err(Error::ENOTSUP);
+        }
+    }
+
+    wasi_ctx.remove_fd_entry(fd)?;
+    Ok(())
+}
+
+pub(crate) unsafe fn fd_datasync(
+    wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+) -> Result<()> {
+    trace!("fd_datasync(fd={:?})", fd);
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_DATASYNC, 0)?
+        .as_file()?;
+
+    fd.sync_data().map_err(Into::into)
+}
+
+pub(crate) unsafe fn fd_pread(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    iovs_ptr: wasi32::uintptr_t,
+    iovs_len: wasi32::size_t,
+    offset: wasi::__wasi_filesize_t,
+    nread: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_pread(fd={:?}, iovs_ptr={:#x?}, iovs_len={:?}, offset={}, nread={:#x?})",
+        fd,
+        iovs_ptr,
+        iovs_len,
+        offset,
+        nread
+    );
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_READ | wasi::__WASI_RIGHTS_FD_SEEK, 0)?
+        .as_file()?;
+
+    let iovs = dec_iovec_slice(memory, iovs_ptr, iovs_len)?;
+
+    if offset > i64::max_value() as u64 {
+        return Err(Error::EIO);
+    }
+    let buf_size = iovs.iter().map(|v| v.buf_len).sum();
+    let mut buf = vec![0; buf_size];
+    let host_nread = hostcalls_impl::fd_pread(fd, &mut buf, offset)?;
+    let mut buf_offset = 0;
+    let mut left = host_nread;
+    for iov in &iovs {
+        if left == 0 {
+            break;
+        }
+        let vec_len = std::cmp::min(iov.buf_len, left);
+        std::slice::from_raw_parts_mut(iov.buf as *mut u8, vec_len)
+            .copy_from_slice(&buf[buf_offset..buf_offset + vec_len]);
+        buf_offset += vec_len;
+        left -= vec_len;
+    }
+
+    trace!("     | *nread={:?}", host_nread);
+
+    enc_usize_byref(memory, nread, host_nread)
+}
+
+pub(crate) unsafe fn fd_pwrite(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    iovs_ptr: wasi32::uintptr_t,
+    iovs_len: wasi32::size_t,
+    offset: wasi::__wasi_filesize_t,
+    nwritten: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_pwrite(fd={:?}, iovs_ptr={:#x?}, iovs_len={:?}, offset={}, nwritten={:#x?})",
+        fd,
+        iovs_ptr,
+        iovs_len,
+        offset,
+        nwritten
+    );
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(
+            wasi::__WASI_RIGHTS_FD_WRITE | wasi::__WASI_RIGHTS_FD_SEEK,
+            0,
+        )?
+        .as_file()?;
+    let iovs = dec_ciovec_slice(memory, iovs_ptr, iovs_len)?;
+
+    if offset > i64::max_value() as u64 {
+        return Err(Error::EIO);
+    }
+    let buf_size = iovs.iter().map(|v| v.buf_len).sum();
+    let mut buf = Vec::with_capacity(buf_size);
+    for iov in &iovs {
+        buf.extend_from_slice(std::slice::from_raw_parts(
+            iov.buf as *const u8,
+            iov.buf_len,
+        ));
+    }
+    let host_nwritten = hostcalls_impl::fd_pwrite(fd, &buf, offset)?;
+
+    trace!("     | *nwritten={:?}", host_nwritten);
+
+    enc_usize_byref(memory, nwritten, host_nwritten)
+}
+
+pub(crate) unsafe fn fd_read(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    iovs_ptr: wasi32::uintptr_t,
+    iovs_len: wasi32::size_t,
+    nread: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_read(fd={:?}, iovs_ptr={:#x?}, iovs_len={:?}, nread={:#x?})",
+        fd,
+        iovs_ptr,
+        iovs_len,
+        nread
+    );
+
+    let mut iovs = dec_iovec_slice(memory, iovs_ptr, iovs_len)?;
+    let mut iovs: Vec<io::IoSliceMut> = iovs
+        .iter_mut()
+        .map(|vec| host::iovec_to_host_mut(vec))
+        .collect();
+
+    let maybe_host_nread = match wasi_ctx
+        .get_fd_entry_mut(fd)?
+        .as_descriptor_mut(wasi::__WASI_RIGHTS_FD_READ, 0)?
+    {
+        Descriptor::OsHandle(file) => file.read_vectored(&mut iovs),
+        Descriptor::Stdin => io::stdin().read_vectored(&mut iovs),
+        _ => return Err(Error::EBADF),
+    };
+
+    let host_nread = maybe_host_nread?;
+
+    trace!("     | *nread={:?}", host_nread);
+
+    enc_usize_byref(memory, nread, host_nread)
+}
+
+pub(crate) unsafe fn fd_renumber(
+    wasi_ctx: &mut WasiCtx,
+    _memory: &mut [u8],
+    from: wasi::__wasi_fd_t,
+    to: wasi::__wasi_fd_t,
+) -> Result<()> {
+    trace!("fd_renumber(from={:?}, to={:?})", from, to);
+
+    if !wasi_ctx.contains_fd_entry(from) {
+        return Err(Error::EBADF);
+    }
+
+    // Don't allow renumbering over a pre-opened resource.
+    // TODO: Eventually, we do want to permit this, once libpreopen in
+    // userspace is capable of removing entries from its tables as well.
+    let from_fe = wasi_ctx.get_fd_entry(from)?;
+    if from_fe.preopen_path.is_some() {
+        return Err(Error::ENOTSUP);
+    }
+    if let Ok(to_fe) = wasi_ctx.get_fd_entry(to) {
+        if to_fe.preopen_path.is_some() {
+            return Err(Error::ENOTSUP);
+        }
+    }
+
+    let fe = wasi_ctx.remove_fd_entry(from)?;
+    wasi_ctx.insert_fd_entry_at(to, fe);
+
+    Ok(())
+}
+
+pub(crate) unsafe fn fd_seek(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    offset: wasi::__wasi_filedelta_t,
+    whence: wasi::__wasi_whence_t,
+    newoffset: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_seek(fd={:?}, offset={:?}, whence={}, newoffset={:#x?})",
+        fd,
+        offset,
+        wasi::whence_to_str(whence),
+        newoffset
+    );
+
+    let rights = if offset == 0 && whence == wasi::__WASI_WHENCE_CUR {
+        wasi::__WASI_RIGHTS_FD_TELL
+    } else {
+        wasi::__WASI_RIGHTS_FD_SEEK | wasi::__WASI_RIGHTS_FD_TELL
+    };
+    let fd = wasi_ctx
+        .get_fd_entry_mut(fd)?
+        .as_descriptor_mut(rights, 0)?
+        .as_file_mut()?;
+
+    let pos = match whence {
+        wasi::__WASI_WHENCE_CUR => SeekFrom::Current(offset),
+        wasi::__WASI_WHENCE_END => SeekFrom::End(offset),
+        wasi::__WASI_WHENCE_SET => SeekFrom::Start(offset as u64),
+        _ => return Err(Error::EINVAL),
+    };
+    let host_newoffset = fd.seek(pos)?;
+
+    trace!("     | *newoffset={:?}", host_newoffset);
+
+    enc_filesize_byref(memory, newoffset, host_newoffset)
+}
+
+pub(crate) unsafe fn fd_tell(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    newoffset: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!("fd_tell(fd={:?}, newoffset={:#x?})", fd, newoffset);
+
+    let fd = wasi_ctx
+        .get_fd_entry_mut(fd)?
+        .as_descriptor_mut(wasi::__WASI_RIGHTS_FD_TELL, 0)?
+        .as_file_mut()?;
+
+    let host_offset = fd.seek(SeekFrom::Current(0))?;
+
+    trace!("     | *newoffset={:?}", host_offset);
+
+    enc_filesize_byref(memory, newoffset, host_offset)
+}
+
+pub(crate) unsafe fn fd_fdstat_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    fdstat_ptr: wasi32::uintptr_t, // *mut wasi::__wasi_fdstat_t
+) -> Result<()> {
+    trace!("fd_fdstat_get(fd={:?}, fdstat_ptr={:#x?})", fd, fdstat_ptr);
+
+    let mut fdstat = dec_fdstat_byref(memory, fdstat_ptr)?;
+    let host_fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(0, 0)?
+        .as_os_handle();
+
+    let fs_flags = hostcalls_impl::fd_fdstat_get(&host_fd)?;
+
+    let fe = wasi_ctx.get_fd_entry(fd)?;
+    fdstat.fs_filetype = fe.file_type;
+    fdstat.fs_rights_base = fe.rights_base;
+    fdstat.fs_rights_inheriting = fe.rights_inheriting;
+    fdstat.fs_flags = fs_flags;
+
+    trace!("     | *buf={:?}", fdstat);
+
+    enc_fdstat_byref(memory, fdstat_ptr, fdstat)
+}
+
+pub(crate) unsafe fn fd_fdstat_set_flags(
+    wasi_ctx: &mut WasiCtx,
+    _memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    fdflags: wasi::__wasi_fdflags_t,
+) -> Result<()> {
+    trace!("fd_fdstat_set_flags(fd={:?}, fdflags={:#x?})", fd, fdflags);
+
+    let descriptor = wasi_ctx
+        .get_fd_entry_mut(fd)?
+        .as_descriptor_mut(wasi::__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS, 0)?;
+
+    if let Some(new_handle) =
+        hostcalls_impl::fd_fdstat_set_flags(&descriptor.as_os_handle(), fdflags)?
+    {
+        *descriptor = Descriptor::OsHandle(new_handle);
+    }
+
+    Ok(())
+}
+
+pub(crate) unsafe fn fd_fdstat_set_rights(
+    wasi_ctx: &mut WasiCtx,
+    _memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    fs_rights_base: wasi::__wasi_rights_t,
+    fs_rights_inheriting: wasi::__wasi_rights_t,
+) -> Result<()> {
+    trace!(
+        "fd_fdstat_set_rights(fd={:?}, fs_rights_base={:#x?}, fs_rights_inheriting={:#x?})",
+        fd,
+        fs_rights_base,
+        fs_rights_inheriting
+    );
+
+    let fe = wasi_ctx.get_fd_entry_mut(fd)?;
+    if fe.rights_base & fs_rights_base != fs_rights_base
+        || fe.rights_inheriting & fs_rights_inheriting != fs_rights_inheriting
+    {
+        return Err(Error::ENOTCAPABLE);
+    }
+    fe.rights_base = fs_rights_base;
+    fe.rights_inheriting = fs_rights_inheriting;
+
+    Ok(())
+}
+
+pub(crate) unsafe fn fd_sync(
+    wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+) -> Result<()> {
+    trace!("fd_sync(fd={:?})", fd);
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_SYNC, 0)?
+        .as_file()?;
+    fd.sync_all().map_err(Into::into)
+}
+
+pub(crate) unsafe fn fd_write(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    iovs_ptr: wasi32::uintptr_t,
+    iovs_len: wasi32::size_t,
+    nwritten: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_write(fd={:?}, iovs_ptr={:#x?}, iovs_len={:?}, nwritten={:#x?})",
+        fd,
+        iovs_ptr,
+        iovs_len,
+        nwritten
+    );
+
+    let iovs = dec_ciovec_slice(memory, iovs_ptr, iovs_len)?;
+    let iovs: Vec<io::IoSlice> = iovs.iter().map(|vec| host::ciovec_to_host(vec)).collect();
+
+    // perform unbuffered writes
+    let entry = wasi_ctx.get_fd_entry_mut(fd)?;
+    let isatty = entry.isatty();
+    let desc = entry.as_descriptor_mut(wasi::__WASI_RIGHTS_FD_WRITE, 0)?;
+    let host_nwritten = match desc {
+        Descriptor::OsHandle(file) => {
+            if isatty {
+                SandboxedTTYWriter::new(file.deref_mut()).write_vectored(&iovs)?
+            } else {
+                file.write_vectored(&iovs)?
+            }
+        }
+        Descriptor::Stdin => return Err(Error::EBADF),
+        Descriptor::Stdout => {
+            // lock for the duration of the scope
+            let stdout = io::stdout();
+            let mut stdout = stdout.lock();
+            let nwritten = if isatty {
+                SandboxedTTYWriter::new(&mut stdout).write_vectored(&iovs)?
+            } else {
+                stdout.write_vectored(&iovs)?
+            };
+            stdout.flush()?;
+            nwritten
+        }
+        // Always sanitize stderr, even if it's not directly connected to a tty,
+        // because stderr is meant for diagnostics rather than binary output,
+        // and may be redirected to a file which could end up being displayed
+        // on a tty later.
+        Descriptor::Stderr => SandboxedTTYWriter::new(&mut io::stderr()).write_vectored(&iovs)?,
+    };
+
+    trace!("     | *nwritten={:?}", host_nwritten);
+
+    enc_usize_byref(memory, nwritten, host_nwritten)
+}
+
+pub(crate) unsafe fn fd_advise(
+    wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    offset: wasi::__wasi_filesize_t,
+    len: wasi::__wasi_filesize_t,
+    advice: wasi::__wasi_advice_t,
+) -> Result<()> {
+    trace!(
+        "fd_advise(fd={:?}, offset={}, len={}, advice={:?})",
+        fd,
+        offset,
+        len,
+        advice
+    );
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_ADVISE, 0)?
+        .as_file()?;
+
+    hostcalls_impl::fd_advise(fd, advice, offset, len)
+}
+
+pub(crate) unsafe fn fd_allocate(
+    wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    offset: wasi::__wasi_filesize_t,
+    len: wasi::__wasi_filesize_t,
+) -> Result<()> {
+    trace!("fd_allocate(fd={:?}, offset={}, len={})", fd, offset, len);
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_ALLOCATE, 0)?
+        .as_file()?;
+
+    let metadata = fd.metadata()?;
+
+    let current_size = metadata.len();
+    let wanted_size = offset.checked_add(len).ok_or(Error::E2BIG)?;
+    // This check will be unnecessary when rust-lang/rust#63326 is fixed
+    if wanted_size > i64::max_value() as u64 {
+        return Err(Error::E2BIG);
+    }
+
+    if wanted_size > current_size {
+        fd.set_len(wanted_size).map_err(Into::into)
+    } else {
+        Ok(())
+    }
+}
+
+pub(crate) unsafe fn path_create_directory(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_create_directory(dirfd={:?}, path_ptr={:#x?}, path_len={})",
+        dirfd,
+        path_ptr,
+        path_len,
+    );
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(helpers::path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let rights = wasi::__WASI_RIGHTS_PATH_OPEN | wasi::__WASI_RIGHTS_PATH_CREATE_DIRECTORY;
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(fe, rights, 0, 0, path, false)?;
+
+    hostcalls_impl::path_create_directory(resolved)
+}
+
+pub(crate) unsafe fn path_link(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    old_dirfd: wasi::__wasi_fd_t,
+    old_flags: wasi::__wasi_lookupflags_t,
+    old_path_ptr: wasi32::uintptr_t,
+    old_path_len: wasi32::size_t,
+    new_dirfd: wasi::__wasi_fd_t,
+    new_path_ptr: wasi32::uintptr_t,
+    new_path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_link(old_dirfd={:?}, old_flags={:?}, old_path_ptr={:#x?}, old_path_len={}, new_dirfd={:?}, new_path_ptr={:#x?}, new_path_len={})",
+        old_dirfd,
+        old_flags,
+        old_path_ptr,
+        old_path_len,
+        new_dirfd,
+        new_path_ptr,
+        new_path_len,
+    );
+
+    let old_path = dec_slice_of_u8(memory, old_path_ptr, old_path_len).and_then(path_from_slice)?;
+    let new_path = dec_slice_of_u8(memory, new_path_ptr, new_path_len).and_then(path_from_slice)?;
+
+    trace!("     | (old_path_ptr,old_path_len)='{}'", old_path);
+    trace!("     | (new_path_ptr,new_path_len)='{}'", new_path);
+
+    let old_fe = wasi_ctx.get_fd_entry(old_dirfd)?;
+    let new_fe = wasi_ctx.get_fd_entry(new_dirfd)?;
+    let resolved_old = path_get(
+        old_fe,
+        wasi::__WASI_RIGHTS_PATH_LINK_SOURCE,
+        0,
+        0,
+        old_path,
+        false,
+    )?;
+    let resolved_new = path_get(
+        new_fe,
+        wasi::__WASI_RIGHTS_PATH_LINK_TARGET,
+        0,
+        0,
+        new_path,
+        false,
+    )?;
+
+    hostcalls_impl::path_link(resolved_old, resolved_new)
+}
+
+pub(crate) unsafe fn path_open(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    dirflags: wasi::__wasi_lookupflags_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+    oflags: wasi::__wasi_oflags_t,
+    fs_rights_base: wasi::__wasi_rights_t,
+    fs_rights_inheriting: wasi::__wasi_rights_t,
+    fs_flags: wasi::__wasi_fdflags_t,
+    fd_out_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "path_open(dirfd={:?}, dirflags={:?}, path_ptr={:#x?}, path_len={:?}, oflags={:#x?}, fs_rights_base={:#x?}, fs_rights_inheriting={:#x?}, fs_flags={:#x?}, fd_out_ptr={:#x?})",
+        dirfd,
+        dirflags,
+        path_ptr,
+        path_len,
+        oflags,
+        fs_rights_base,
+        fs_rights_inheriting,
+        fs_flags,
+        fd_out_ptr
+    );
+
+    // pre-encode fd_out_ptr to -1 in case of error in opening a path
+    enc_fd_byref(memory, fd_out_ptr, wasi::__wasi_fd_t::max_value())?;
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let (needed_base, needed_inheriting) =
+        path_open_rights(fs_rights_base, fs_rights_inheriting, oflags, fs_flags);
+    trace!(
+        "     | needed_base = {}, needed_inheriting = {}",
+        needed_base,
+        needed_inheriting
+    );
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(
+        fe,
+        needed_base,
+        needed_inheriting,
+        dirflags,
+        path,
+        oflags & wasi::__WASI_OFLAGS_CREAT != 0,
+    )?;
+
+    // which open mode do we need?
+    let read = fs_rights_base & (wasi::__WASI_RIGHTS_FD_READ | wasi::__WASI_RIGHTS_FD_READDIR) != 0;
+    let write = fs_rights_base
+        & (wasi::__WASI_RIGHTS_FD_DATASYNC
+            | wasi::__WASI_RIGHTS_FD_WRITE
+            | wasi::__WASI_RIGHTS_FD_ALLOCATE
+            | wasi::__WASI_RIGHTS_FD_FILESTAT_SET_SIZE)
+        != 0;
+
+    trace!(
+        "     | calling path_open impl: read={}, write={}",
+        read,
+        write
+    );
+    let fd = hostcalls_impl::path_open(resolved, read, write, oflags, fs_flags)?;
+
+    let mut fe = FdEntry::from(fd)?;
+    // We need to manually deny the rights which are not explicitly requested
+    // because FdEntry::from will assign maximal consistent rights.
+    fe.rights_base &= fs_rights_base;
+    fe.rights_inheriting &= fs_rights_inheriting;
+    let guest_fd = wasi_ctx.insert_fd_entry(fe)?;
+
+    trace!("     | *fd={:?}", guest_fd);
+
+    enc_fd_byref(memory, fd_out_ptr, guest_fd)
+}
+
+pub(crate) unsafe fn path_readlink(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+    buf_ptr: wasi32::uintptr_t,
+    buf_len: wasi32::size_t,
+    buf_used: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "path_readlink(dirfd={:?}, path_ptr={:#x?}, path_len={:?}, buf_ptr={:#x?}, buf_len={}, buf_used={:#x?})",
+        dirfd,
+        path_ptr,
+        path_len,
+        buf_ptr,
+        buf_len,
+        buf_used,
+    );
+
+    enc_usize_byref(memory, buf_used, 0)?;
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(helpers::path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", &path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(fe, wasi::__WASI_RIGHTS_PATH_READLINK, 0, 0, &path, false)?;
+
+    let mut buf = dec_slice_of_mut_u8(memory, buf_ptr, buf_len)?;
+
+    let host_bufused = hostcalls_impl::path_readlink(resolved, &mut buf)?;
+
+    trace!("     | (buf_ptr,*buf_used)={:?}", buf);
+    trace!("     | *buf_used={:?}", host_bufused);
+
+    enc_usize_byref(memory, buf_used, host_bufused)
+}
+
+pub(crate) unsafe fn path_rename(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    old_dirfd: wasi::__wasi_fd_t,
+    old_path_ptr: wasi32::uintptr_t,
+    old_path_len: wasi32::size_t,
+    new_dirfd: wasi::__wasi_fd_t,
+    new_path_ptr: wasi32::uintptr_t,
+    new_path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_rename(old_dirfd={:?}, old_path_ptr={:#x?}, old_path_len={:?}, new_dirfd={:?}, new_path_ptr={:#x?}, new_path_len={:?})",
+        old_dirfd,
+        old_path_ptr,
+        old_path_len,
+        new_dirfd,
+        new_path_ptr,
+        new_path_len,
+    );
+
+    let old_path = dec_slice_of_u8(memory, old_path_ptr, old_path_len).and_then(path_from_slice)?;
+    let new_path = dec_slice_of_u8(memory, new_path_ptr, new_path_len).and_then(path_from_slice)?;
+
+    trace!("     | (old_path_ptr,old_path_len)='{}'", old_path);
+    trace!("     | (new_path_ptr,new_path_len)='{}'", new_path);
+
+    let old_fe = wasi_ctx.get_fd_entry(old_dirfd)?;
+    let new_fe = wasi_ctx.get_fd_entry(new_dirfd)?;
+    let resolved_old = path_get(
+        old_fe,
+        wasi::__WASI_RIGHTS_PATH_RENAME_SOURCE,
+        0,
+        0,
+        old_path,
+        true,
+    )?;
+    let resolved_new = path_get(
+        new_fe,
+        wasi::__WASI_RIGHTS_PATH_RENAME_TARGET,
+        0,
+        0,
+        new_path,
+        true,
+    )?;
+
+    log::debug!("path_rename resolved_old={:?}", resolved_old);
+    log::debug!("path_rename resolved_new={:?}", resolved_new);
+
+    hostcalls_impl::path_rename(resolved_old, resolved_new)
+}
+
+pub(crate) unsafe fn fd_filestat_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    filestat_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_filestat_get(fd={:?}, filestat_ptr={:#x?})",
+        fd,
+        filestat_ptr
+    );
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_FILESTAT_GET, 0)?
+        .as_file()?;
+    let host_filestat = hostcalls_impl::fd_filestat_get(fd)?;
+
+    trace!("     | *filestat_ptr={:?}", host_filestat);
+
+    enc_filestat_byref(memory, filestat_ptr, host_filestat)
+}
+
+pub(crate) unsafe fn fd_filestat_set_times(
+    wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    st_atim: wasi::__wasi_timestamp_t,
+    st_mtim: wasi::__wasi_timestamp_t,
+    fst_flags: wasi::__wasi_fstflags_t,
+) -> Result<()> {
+    trace!(
+        "fd_filestat_set_times(fd={:?}, st_atim={}, st_mtim={}, fst_flags={:#x?})",
+        fd,
+        st_atim,
+        st_mtim,
+        fst_flags
+    );
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_FILESTAT_SET_TIMES, 0)?
+        .as_file()?;
+
+    fd_filestat_set_times_impl(fd, st_atim, st_mtim, fst_flags)
+}
+
+pub(crate) fn fd_filestat_set_times_impl(
+    fd: &File,
+    st_atim: wasi::__wasi_timestamp_t,
+    st_mtim: wasi::__wasi_timestamp_t,
+    fst_flags: wasi::__wasi_fstflags_t,
+) -> Result<()> {
+    let set_atim = fst_flags & wasi::__WASI_FSTFLAGS_ATIM != 0;
+    let set_atim_now = fst_flags & wasi::__WASI_FSTFLAGS_ATIM_NOW != 0;
+    let set_mtim = fst_flags & wasi::__WASI_FSTFLAGS_MTIM != 0;
+    let set_mtim_now = fst_flags & wasi::__WASI_FSTFLAGS_MTIM_NOW != 0;
+
+    if (set_atim && set_atim_now) || (set_mtim && set_mtim_now) {
+        return Err(Error::EINVAL);
+    }
+    let atim = if set_atim {
+        let time = UNIX_EPOCH + Duration::from_nanos(st_atim);
+        Some(FileTime::from_system_time(time))
+    } else if set_atim_now {
+        let time = SystemTime::now();
+        Some(FileTime::from_system_time(time))
+    } else {
+        None
+    };
+
+    let mtim = if set_mtim {
+        let time = UNIX_EPOCH + Duration::from_nanos(st_mtim);
+        Some(FileTime::from_system_time(time))
+    } else if set_mtim_now {
+        let time = SystemTime::now();
+        Some(FileTime::from_system_time(time))
+    } else {
+        None
+    };
+    set_file_handle_times(fd, atim, mtim).map_err(Into::into)
+}
+
+pub(crate) unsafe fn fd_filestat_set_size(
+    wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    st_size: wasi::__wasi_filesize_t,
+) -> Result<()> {
+    trace!("fd_filestat_set_size(fd={:?}, st_size={})", fd, st_size);
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_FILESTAT_SET_SIZE, 0)?
+        .as_file()?;
+
+    // This check will be unnecessary when rust-lang/rust#63326 is fixed
+    if st_size > i64::max_value() as u64 {
+        return Err(Error::E2BIG);
+    }
+    fd.set_len(st_size).map_err(Into::into)
+}
+
+pub(crate) unsafe fn path_filestat_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    dirflags: wasi::__wasi_lookupflags_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+    filestat_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "path_filestat_get(dirfd={:?}, dirflags={:?}, path_ptr={:#x?}, path_len={}, filestat_ptr={:#x?})",
+        dirfd,
+        dirflags,
+        path_ptr,
+        path_len,
+        filestat_ptr
+    );
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(
+        fe,
+        wasi::__WASI_RIGHTS_PATH_FILESTAT_GET,
+        0,
+        dirflags,
+        path,
+        false,
+    )?;
+    let host_filestat = hostcalls_impl::path_filestat_get(resolved, dirflags)?;
+
+    trace!("     | *filestat_ptr={:?}", host_filestat);
+
+    enc_filestat_byref(memory, filestat_ptr, host_filestat)
+}
+
+pub(crate) unsafe fn path_filestat_set_times(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    dirflags: wasi::__wasi_lookupflags_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+    st_atim: wasi::__wasi_timestamp_t,
+    st_mtim: wasi::__wasi_timestamp_t,
+    fst_flags: wasi::__wasi_fstflags_t,
+) -> Result<()> {
+    trace!(
+        "path_filestat_set_times(dirfd={:?}, dirflags={:?}, path_ptr={:#x?}, path_len={}, st_atim={}, st_mtim={}, fst_flags={:#x?})",
+        dirfd,
+        dirflags,
+        path_ptr,
+        path_len,
+        st_atim, st_mtim,
+        fst_flags
+    );
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(
+        fe,
+        wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES,
+        0,
+        dirflags,
+        path,
+        false,
+    )?;
+
+    hostcalls_impl::path_filestat_set_times(resolved, dirflags, st_atim, st_mtim, fst_flags)
+}
+
+pub(crate) unsafe fn path_symlink(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    old_path_ptr: wasi32::uintptr_t,
+    old_path_len: wasi32::size_t,
+    dirfd: wasi::__wasi_fd_t,
+    new_path_ptr: wasi32::uintptr_t,
+    new_path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_symlink(old_path_ptr={:#x?}, old_path_len={}, dirfd={:?}, new_path_ptr={:#x?}, new_path_len={})",
+        old_path_ptr,
+        old_path_len,
+        dirfd,
+        new_path_ptr,
+        new_path_len
+    );
+
+    let old_path = dec_slice_of_u8(memory, old_path_ptr, old_path_len).and_then(path_from_slice)?;
+    let new_path = dec_slice_of_u8(memory, new_path_ptr, new_path_len).and_then(path_from_slice)?;
+
+    trace!("     | (old_path_ptr,old_path_len)='{}'", old_path);
+    trace!("     | (new_path_ptr,new_path_len)='{}'", new_path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved_new = path_get(fe, wasi::__WASI_RIGHTS_PATH_SYMLINK, 0, 0, new_path, true)?;
+
+    hostcalls_impl::path_symlink(old_path, resolved_new)
+}
+
+pub(crate) unsafe fn path_unlink_file(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_unlink_file(dirfd={:?}, path_ptr={:#x?}, path_len={})",
+        dirfd,
+        path_ptr,
+        path_len
+    );
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(fe, wasi::__WASI_RIGHTS_PATH_UNLINK_FILE, 0, 0, path, false)?;
+
+    hostcalls_impl::path_unlink_file(resolved)
+}
+
+pub(crate) unsafe fn path_remove_directory(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_remove_directory(dirfd={:?}, path_ptr={:#x?}, path_len={})",
+        dirfd,
+        path_ptr,
+        path_len
+    );
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(
+        fe,
+        wasi::__WASI_RIGHTS_PATH_REMOVE_DIRECTORY,
+        0,
+        0,
+        path,
+        true,
+    )?;
+
+    log::debug!("path_remove_directory resolved={:?}", resolved);
+
+    hostcalls_impl::path_remove_directory(resolved)
+}
+
+pub(crate) unsafe fn fd_prestat_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    prestat_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_prestat_get(fd={:?}, prestat_ptr={:#x?})",
+        fd,
+        prestat_ptr
+    );
+
+    // TODO: should we validate any rights here?
+    let fe = wasi_ctx.get_fd_entry(fd)?;
+    let po_path = fe.preopen_path.as_ref().ok_or(Error::ENOTSUP)?;
+    if fe.file_type != wasi::__WASI_FILETYPE_DIRECTORY {
+        return Err(Error::ENOTDIR);
+    }
+
+    let path = host_impl::path_from_host(po_path.as_os_str())?;
+
+    enc_prestat_byref(
+        memory,
+        prestat_ptr,
+        host::__wasi_prestat_t {
+            pr_type: wasi::__WASI_PREOPENTYPE_DIR,
+            u: host::__wasi_prestat_u_t {
+                dir: host::__wasi_prestat_dir_t {
+                    pr_name_len: path.len(),
+                },
+            },
+        },
+    )
+}
+
+pub(crate) unsafe fn fd_prestat_dir_name(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "fd_prestat_dir_name(fd={:?}, path_ptr={:#x?}, path_len={})",
+        fd,
+        path_ptr,
+        path_len
+    );
+
+    // TODO: should we validate any rights here?
+    let fe = wasi_ctx.get_fd_entry(fd)?;
+    let po_path = fe.preopen_path.as_ref().ok_or(Error::ENOTSUP)?;
+    if fe.file_type != wasi::__WASI_FILETYPE_DIRECTORY {
+        return Err(Error::ENOTDIR);
+    }
+
+    let path = host_impl::path_from_host(po_path.as_os_str())?;
+
+    if path.len() > dec_usize(path_len) {
+        return Err(Error::ENAMETOOLONG);
+    }
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    enc_slice_of_u8(memory, path.as_bytes(), path_ptr)
+}
+
+pub(crate) unsafe fn fd_readdir(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    buf: wasi32::uintptr_t,
+    buf_len: wasi32::size_t,
+    cookie: wasi::__wasi_dircookie_t,
+    buf_used: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_readdir(fd={:?}, buf={:#x?}, buf_len={}, cookie={:#x?}, buf_used={:#x?})",
+        fd,
+        buf,
+        buf_len,
+        cookie,
+        buf_used,
+    );
+
+    enc_usize_byref(memory, buf_used, 0)?;
+
+    let file = wasi_ctx
+        .get_fd_entry_mut(fd)?
+        .as_descriptor_mut(wasi::__WASI_RIGHTS_FD_READDIR, 0)?
+        .as_file_mut()?;
+    let mut host_buf = dec_slice_of_mut_u8(memory, buf, buf_len)?;
+
+    trace!("     | (buf,buf_len)={:?}", host_buf);
+
+    let iter = hostcalls_impl::fd_readdir(file, cookie)?;
+    let mut host_bufused = 0;
+    for dirent in iter {
+        let dirent_raw = dirent?.to_wasi_raw()?;
+        let offset = dirent_raw.len();
+        if host_buf.len() < offset {
+            break;
+        } else {
+            host_buf[0..offset].copy_from_slice(&dirent_raw);
+            host_bufused += offset;
+            host_buf = &mut host_buf[offset..];
+        }
+    }
+
+    trace!("     | *buf_used={:?}", host_bufused);
+
+    enc_usize_byref(memory, buf_used, host_bufused)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/hostcalls_impl/fs_helpers.rs.html b/api/src/wasi_common/hostcalls_impl/fs_helpers.rs.html new file mode 100644 index 000000000000..6fb4a8d0b83a --- /dev/null +++ b/api/src/wasi_common/hostcalls_impl/fs_helpers.rs.html @@ -0,0 +1,429 @@ +fs_helpers.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+
+#![allow(non_camel_case_types)]
+use crate::sys::host_impl;
+use crate::sys::hostcalls_impl::fs_helpers::*;
+use crate::{error::WasiError, fdentry::FdEntry, wasi, Error, Result};
+use std::fs::File;
+use std::path::{Component, Path};
+
+#[derive(Debug)]
+pub(crate) struct PathGet {
+    dirfd: File,
+    path: String,
+}
+
+impl PathGet {
+    pub(crate) fn dirfd(&self) -> &File {
+        &self.dirfd
+    }
+
+    pub(crate) fn path(&self) -> &str {
+        &self.path
+    }
+}
+
+/// Normalizes a path to ensure that the target path is located under the directory provided.
+///
+/// This is a workaround for not having Capsicum support in the OS.
+pub(crate) fn path_get(
+    fe: &FdEntry,
+    rights_base: wasi::__wasi_rights_t,
+    rights_inheriting: wasi::__wasi_rights_t,
+    dirflags: wasi::__wasi_lookupflags_t,
+    path: &str,
+    needs_final_component: bool,
+) -> Result<PathGet> {
+    const MAX_SYMLINK_EXPANSIONS: usize = 128;
+
+    if path.contains('\0') {
+        // if contains NUL, return EILSEQ
+        return Err(Error::EILSEQ);
+    }
+
+    if fe.file_type != wasi::__WASI_FILETYPE_DIRECTORY {
+        // if `dirfd` doesn't refer to a directory, return `ENOTDIR`.
+        return Err(Error::ENOTDIR);
+    }
+
+    let dirfd = fe
+        .as_descriptor(rights_base, rights_inheriting)?
+        .as_file()?
+        .try_clone()?;
+
+    // Stack of directory file descriptors. Index 0 always corresponds with the directory provided
+    // to this function. Entering a directory causes a file descriptor to be pushed, while handling
+    // ".." entries causes an entry to be popped. Index 0 cannot be popped, as this would imply
+    // escaping the base directory.
+    let mut dir_stack = vec![dirfd];
+
+    // Stack of paths left to process. This is initially the `path` argument to this function, but
+    // any symlinks we encounter are processed by pushing them on the stack.
+    let mut path_stack = vec![path.to_owned()];
+
+    // Track the number of symlinks we've expanded, so we can return `ELOOP` after too many.
+    let mut symlink_expansions = 0;
+
+    // TODO: rewrite this using a custom posix path type, with a component iterator that respects
+    // trailing slashes. This version does way too much allocation, and is way too fiddly.
+    loop {
+        match path_stack.pop() {
+            Some(cur_path) => {
+                log::debug!("path_get cur_path = {:?}", cur_path);
+
+                let ends_with_slash = cur_path.ends_with('/');
+                let mut components = Path::new(&cur_path).components();
+                let head = match components.next() {
+                    None => return Err(Error::ENOENT),
+                    Some(p) => p,
+                };
+                let tail = components.as_path();
+
+                if tail.components().next().is_some() {
+                    let mut tail = host_impl::path_from_host(tail.as_os_str())?;
+                    if ends_with_slash {
+                        tail.push('/');
+                    }
+                    path_stack.push(tail);
+                }
+
+                log::debug!("path_get path_stack = {:?}", path_stack);
+
+                match head {
+                    Component::Prefix(_) | Component::RootDir => {
+                        // path is absolute!
+                        return Err(Error::ENOTCAPABLE);
+                    }
+                    Component::CurDir => {
+                        // "." so skip
+                    }
+                    Component::ParentDir => {
+                        // ".." so pop a dir
+                        let _ = dir_stack.pop().ok_or(Error::ENOTCAPABLE)?;
+
+                        // we're not allowed to pop past the original directory
+                        if dir_stack.is_empty() {
+                            return Err(Error::ENOTCAPABLE);
+                        }
+                    }
+                    Component::Normal(head) => {
+                        let mut head = host_impl::path_from_host(head)?;
+                        if ends_with_slash {
+                            // preserve trailing slash
+                            head.push('/');
+                        }
+
+                        if !path_stack.is_empty() || (ends_with_slash && !needs_final_component) {
+                            match openat(dir_stack.last().ok_or(Error::ENOTCAPABLE)?, &head) {
+                                Ok(new_dir) => {
+                                    dir_stack.push(new_dir);
+                                }
+                                Err(e) => {
+                                    match e.as_wasi_error() {
+                                        WasiError::ELOOP
+                                        | WasiError::EMLINK
+                                        | WasiError::ENOTDIR =>
+                                        // Check to see if it was a symlink. Linux indicates
+                                        // this with ENOTDIR because of the O_DIRECTORY flag.
+                                        {
+                                            // attempt symlink expansion
+                                            let mut link_path = readlinkat(
+                                                dir_stack.last().ok_or(Error::ENOTCAPABLE)?,
+                                                &head,
+                                            )?;
+
+                                            symlink_expansions += 1;
+                                            if symlink_expansions > MAX_SYMLINK_EXPANSIONS {
+                                                return Err(Error::ELOOP);
+                                            }
+
+                                            if head.ends_with('/') {
+                                                link_path.push('/');
+                                            }
+
+                                            log::debug!(
+                                                "attempted symlink expansion link_path={:?}",
+                                                link_path
+                                            );
+
+                                            path_stack.push(link_path);
+                                        }
+                                        _ => {
+                                            return Err(e);
+                                        }
+                                    }
+                                }
+                            }
+
+                            continue;
+                        } else if ends_with_slash
+                            || (dirflags & wasi::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW) != 0
+                        {
+                            // if there's a trailing slash, or if `LOOKUP_SYMLINK_FOLLOW` is set, attempt
+                            // symlink expansion
+                            match readlinkat(dir_stack.last().ok_or(Error::ENOTCAPABLE)?, &head) {
+                                Ok(mut link_path) => {
+                                    symlink_expansions += 1;
+                                    if symlink_expansions > MAX_SYMLINK_EXPANSIONS {
+                                        return Err(Error::ELOOP);
+                                    }
+
+                                    if head.ends_with('/') {
+                                        link_path.push('/');
+                                    }
+
+                                    log::debug!(
+                                        "attempted symlink expansion link_path={:?}",
+                                        link_path
+                                    );
+
+                                    path_stack.push(link_path);
+                                    continue;
+                                }
+                                Err(e) => {
+                                    if e.as_wasi_error() != WasiError::EINVAL
+                                        && e.as_wasi_error() != WasiError::ENOENT
+                                        // this handles the cases when trying to link to
+                                        // a destination that already exists, and the target
+                                        // path contains a slash
+                                        && e.as_wasi_error() != WasiError::ENOTDIR
+                                    {
+                                        return Err(e);
+                                    }
+                                }
+                            }
+                        }
+
+                        // not a symlink, so we're done;
+                        return Ok(PathGet {
+                            dirfd: dir_stack.pop().ok_or(Error::ENOTCAPABLE)?,
+                            path: head,
+                        });
+                    }
+                }
+            }
+            None => {
+                // no further components to process. means we've hit a case like "." or "a/..", or if the
+                // input path has trailing slashes and `needs_final_component` is not set
+                return Ok(PathGet {
+                    dirfd: dir_stack.pop().ok_or(Error::ENOTCAPABLE)?,
+                    path: String::from("."),
+                });
+            }
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/hostcalls_impl/misc.rs.html b/api/src/wasi_common/hostcalls_impl/misc.rs.html new file mode 100644 index 000000000000..e11531b758f9 --- /dev/null +++ b/api/src/wasi_common/hostcalls_impl/misc.rs.html @@ -0,0 +1,689 @@ +misc.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+
+#![allow(non_camel_case_types)]
+use crate::ctx::WasiCtx;
+use crate::fdentry::Descriptor;
+use crate::memory::*;
+use crate::sys::hostcalls_impl;
+use crate::{wasi, wasi32, Error, Result};
+use log::{error, trace};
+use std::convert::TryFrom;
+
+pub(crate) fn args_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    argv_ptr: wasi32::uintptr_t,
+    argv_buf: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "args_get(argv_ptr={:#x?}, argv_buf={:#x?})",
+        argv_ptr,
+        argv_buf,
+    );
+
+    let mut argv_buf_offset = 0;
+    let mut argv = vec![];
+
+    for arg in &wasi_ctx.args {
+        let arg_bytes = arg.as_bytes_with_nul();
+        let arg_ptr = argv_buf + argv_buf_offset;
+
+        enc_slice_of_u8(memory, arg_bytes, arg_ptr)?;
+
+        argv.push(arg_ptr);
+
+        let len = wasi32::uintptr_t::try_from(arg_bytes.len())?;
+        argv_buf_offset = argv_buf_offset.checked_add(len).ok_or(Error::EOVERFLOW)?;
+    }
+
+    enc_slice_of_wasi32_uintptr(memory, argv.as_slice(), argv_ptr)
+}
+
+pub(crate) fn args_sizes_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    argc_ptr: wasi32::uintptr_t,
+    argv_buf_size_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "args_sizes_get(argc_ptr={:#x?}, argv_buf_size_ptr={:#x?})",
+        argc_ptr,
+        argv_buf_size_ptr,
+    );
+
+    let argc = wasi_ctx.args.len();
+    let argv_size = wasi_ctx
+        .args
+        .iter()
+        .map(|arg| arg.as_bytes_with_nul().len())
+        .sum();
+
+    trace!("     | *argc_ptr={:?}", argc);
+
+    enc_usize_byref(memory, argc_ptr, argc)?;
+
+    trace!("     | *argv_buf_size_ptr={:?}", argv_size);
+
+    enc_usize_byref(memory, argv_buf_size_ptr, argv_size)
+}
+
+pub(crate) fn environ_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    environ_ptr: wasi32::uintptr_t,
+    environ_buf: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "environ_get(environ_ptr={:#x?}, environ_buf={:#x?})",
+        environ_ptr,
+        environ_buf,
+    );
+
+    let mut environ_buf_offset = 0;
+    let mut environ = vec![];
+
+    for pair in &wasi_ctx.env {
+        let env_bytes = pair.as_bytes_with_nul();
+        let env_ptr = environ_buf + environ_buf_offset;
+
+        enc_slice_of_u8(memory, env_bytes, env_ptr)?;
+
+        environ.push(env_ptr);
+
+        let len = wasi32::uintptr_t::try_from(env_bytes.len())?;
+        environ_buf_offset = environ_buf_offset
+            .checked_add(len)
+            .ok_or(Error::EOVERFLOW)?;
+    }
+
+    enc_slice_of_wasi32_uintptr(memory, environ.as_slice(), environ_ptr)
+}
+
+pub(crate) fn environ_sizes_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    environ_count_ptr: wasi32::uintptr_t,
+    environ_size_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "environ_sizes_get(environ_count_ptr={:#x?}, environ_size_ptr={:#x?})",
+        environ_count_ptr,
+        environ_size_ptr,
+    );
+
+    let environ_count = wasi_ctx.env.len();
+    let environ_size = wasi_ctx
+        .env
+        .iter()
+        .try_fold(0, |acc: u32, pair| {
+            acc.checked_add(pair.as_bytes_with_nul().len() as u32)
+        })
+        .ok_or(Error::EOVERFLOW)?;
+
+    trace!("     | *environ_count_ptr={:?}", environ_count);
+
+    enc_usize_byref(memory, environ_count_ptr, environ_count)?;
+
+    trace!("     | *environ_size_ptr={:?}", environ_size);
+
+    enc_usize_byref(memory, environ_size_ptr, environ_size as usize)
+}
+
+pub(crate) fn random_get(
+    _wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    buf_ptr: wasi32::uintptr_t,
+    buf_len: wasi32::size_t,
+) -> Result<()> {
+    trace!("random_get(buf_ptr={:#x?}, buf_len={:?})", buf_ptr, buf_len);
+
+    let buf = dec_slice_of_mut_u8(memory, buf_ptr, buf_len)?;
+
+    getrandom::getrandom(buf).map_err(|err| {
+        error!("getrandom failure: {:?}", err);
+        Error::EIO
+    })
+}
+
+pub(crate) fn clock_res_get(
+    _wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    clock_id: wasi::__wasi_clockid_t,
+    resolution_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "clock_res_get(clock_id={:?}, resolution_ptr={:#x?})",
+        clock_id,
+        resolution_ptr,
+    );
+
+    let resolution = hostcalls_impl::clock_res_get(clock_id)?;
+
+    trace!("     | *resolution_ptr={:?}", resolution);
+
+    enc_timestamp_byref(memory, resolution_ptr, resolution)
+}
+
+pub(crate) fn clock_time_get(
+    _wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    clock_id: wasi::__wasi_clockid_t,
+    precision: wasi::__wasi_timestamp_t,
+    time_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "clock_time_get(clock_id={:?}, precision={:?}, time_ptr={:#x?})",
+        clock_id,
+        precision,
+        time_ptr,
+    );
+
+    let time = hostcalls_impl::clock_time_get(clock_id)?;
+
+    trace!("     | *time_ptr={:?}", time);
+
+    enc_timestamp_byref(memory, time_ptr, time)
+}
+
+pub(crate) fn sched_yield(_wasi_ctx: &WasiCtx, _memory: &mut [u8]) -> Result<()> {
+    trace!("sched_yield()");
+
+    std::thread::yield_now();
+
+    Ok(())
+}
+
+pub(crate) fn poll_oneoff(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    input: wasi32::uintptr_t,
+    output: wasi32::uintptr_t,
+    nsubscriptions: wasi32::size_t,
+    nevents: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "poll_oneoff(input={:#x?}, output={:#x?}, nsubscriptions={}, nevents={:#x?})",
+        input,
+        output,
+        nsubscriptions,
+        nevents,
+    );
+
+    if u64::from(nsubscriptions) > wasi::__wasi_filesize_t::max_value() {
+        return Err(Error::EINVAL);
+    }
+
+    enc_int_byref(memory, nevents, 0)?;
+
+    let subscriptions = dec_subscriptions(memory, input, nsubscriptions)?;
+    let mut events = Vec::new();
+
+    let mut timeout: Option<ClockEventData> = None;
+    let mut fd_events = Vec::new();
+
+    // As mandated by the WASI spec:
+    // > If `nsubscriptions` is 0, returns `errno::inval`.
+    if subscriptions.is_empty() {
+        return Err(Error::EINVAL);
+    }
+    for subscription in subscriptions {
+        match subscription.r#type {
+            wasi::__WASI_EVENTTYPE_CLOCK => {
+                let clock = unsafe { subscription.u.clock };
+                let delay = wasi_clock_to_relative_ns_delay(clock)?;
+
+                log::debug!("poll_oneoff event.u.clock = {:?}", clock);
+                log::debug!("poll_oneoff delay = {:?}ns", delay);
+
+                let current = ClockEventData {
+                    delay,
+                    userdata: subscription.userdata,
+                };
+                let timeout = timeout.get_or_insert(current);
+                if current.delay < timeout.delay {
+                    *timeout = current;
+                }
+            }
+            r#type
+                if r#type == wasi::__WASI_EVENTTYPE_FD_READ
+                    || r#type == wasi::__WASI_EVENTTYPE_FD_WRITE =>
+            {
+                let wasi_fd = unsafe { subscription.u.fd_readwrite.file_descriptor };
+                let rights = if r#type == wasi::__WASI_EVENTTYPE_FD_READ {
+                    wasi::__WASI_RIGHTS_FD_READ | wasi::__WASI_RIGHTS_POLL_FD_READWRITE
+                } else {
+                    wasi::__WASI_RIGHTS_FD_WRITE | wasi::__WASI_RIGHTS_POLL_FD_READWRITE
+                };
+
+                match unsafe {
+                    wasi_ctx
+                        .get_fd_entry(wasi_fd)
+                        .and_then(|fe| fe.as_descriptor(rights, 0))
+                } {
+                    Ok(descriptor) => fd_events.push(FdEventData {
+                        descriptor,
+                        r#type: subscription.r#type,
+                        userdata: subscription.userdata,
+                    }),
+                    Err(err) => {
+                        let event = wasi::__wasi_event_t {
+                            userdata: subscription.userdata,
+                            r#type,
+                            error: err.as_wasi_error().as_raw_errno(),
+                            u: wasi::__wasi_event_u_t {
+                                fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                                    nbytes: 0,
+                                    flags: 0,
+                                },
+                            },
+                        };
+                        events.push(event);
+                    }
+                };
+            }
+            _ => unreachable!(),
+        }
+    }
+
+    log::debug!("poll_oneoff timeout = {:?}", timeout);
+    log::debug!("poll_oneoff fd_events = {:?}", fd_events);
+
+    // The underlying implementation should successfully and immediately return
+    // if no events have been passed. Such situation may occur if all provided
+    // events have been filtered out as errors in the code above.
+    hostcalls_impl::poll_oneoff(timeout, fd_events, &mut events)?;
+
+    let events_count = u32::try_from(events.len()).map_err(|_| Error::EOVERFLOW)?;
+
+    enc_events(memory, output, nsubscriptions, events)?;
+
+    trace!("     | *nevents={:?}", events_count);
+
+    enc_int_byref(memory, nevents, events_count)
+}
+
+fn wasi_clock_to_relative_ns_delay(wasi_clock: wasi::__wasi_subscription_clock_t) -> Result<u128> {
+    use std::time::SystemTime;
+
+    if wasi_clock.flags != wasi::__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME {
+        return Ok(u128::from(wasi_clock.timeout));
+    }
+    let now: u128 = SystemTime::now()
+        .duration_since(SystemTime::UNIX_EPOCH)
+        .map_err(|_| Error::ENOTCAPABLE)?
+        .as_nanos();
+    let deadline = u128::from(wasi_clock.timeout);
+    Ok(deadline.saturating_sub(now))
+}
+
+#[derive(Debug, Copy, Clone)]
+pub(crate) struct ClockEventData {
+    pub(crate) delay: u128, // delay is expressed in nanoseconds
+    pub(crate) userdata: wasi::__wasi_userdata_t,
+}
+
+#[derive(Debug)]
+pub(crate) struct FdEventData<'a> {
+    pub(crate) descriptor: &'a Descriptor,
+    pub(crate) r#type: wasi::__wasi_eventtype_t,
+    pub(crate) userdata: wasi::__wasi_userdata_t,
+}
+
+pub(crate) fn proc_exit(_wasi_ctx: &WasiCtx, _memory: &mut [u8], rval: wasi::__wasi_exitcode_t) {
+    trace!("proc_exit(rval={:?})", rval);
+    // TODO: Rather than call std::process::exit here, we should trigger a
+    // stack unwind similar to a trap.
+    std::process::exit(rval as i32);
+}
+
+pub(crate) fn proc_raise(
+    _wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    _sig: wasi::__wasi_signal_t,
+) -> Result<()> {
+    unimplemented!("proc_raise")
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/hostcalls_impl/mod.rs.html b/api/src/wasi_common/hostcalls_impl/mod.rs.html new file mode 100644 index 000000000000..8173fdb8fbb5 --- /dev/null +++ b/api/src/wasi_common/hostcalls_impl/mod.rs.html @@ -0,0 +1,21 @@ +mod.rs.html -- source
1
+2
+3
+4
+5
+6
+7
+8
+9
+
+mod fs;
+mod fs_helpers;
+mod misc;
+mod sock;
+
+pub(crate) use self::fs::*;
+pub(crate) use self::fs_helpers::PathGet;
+pub(crate) use self::misc::*;
+pub(crate) use self::sock::*;
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/hostcalls_impl/sock.rs.html b/api/src/wasi_common/hostcalls_impl/sock.rs.html new file mode 100644 index 000000000000..df5aad176bb6 --- /dev/null +++ b/api/src/wasi_common/hostcalls_impl/sock.rs.html @@ -0,0 +1,75 @@ +sock.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+
+use crate::ctx::WasiCtx;
+use crate::{wasi, wasi32, Result};
+
+pub fn sock_recv(
+    _wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    _sock: wasi::__wasi_fd_t,
+    _ri_data: wasi32::uintptr_t,
+    _ri_data_len: wasi32::size_t,
+    _ri_flags: wasi::__wasi_riflags_t,
+    _ro_datalen: wasi32::uintptr_t,
+    _ro_flags: wasi32::uintptr_t,
+) -> Result<()> {
+    unimplemented!("sock_recv")
+}
+
+pub fn sock_send(
+    _wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    _sock: wasi::__wasi_fd_t,
+    _si_data: wasi32::uintptr_t,
+    _si_data_len: wasi32::size_t,
+    _si_flags: wasi::__wasi_siflags_t,
+    _so_datalen: wasi32::uintptr_t,
+) -> Result<()> {
+    unimplemented!("sock_send")
+}
+
+pub fn sock_shutdown(
+    _wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    _sock: wasi::__wasi_fd_t,
+    _how: wasi::__wasi_sdflags_t,
+) -> Result<()> {
+    unimplemented!("sock_shutdown")
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/lib.rs.html b/api/src/wasi_common/lib.rs.html new file mode 100644 index 000000000000..e8054ff9187b --- /dev/null +++ b/api/src/wasi_common/lib.rs.html @@ -0,0 +1,95 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+
+#![deny(
+    // missing_docs,
+    trivial_numeric_casts,
+    unused_extern_crates,
+    unstable_features,
+    clippy::use_self
+)]
+#![warn(unused_import_braces)]
+#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../clippy.toml")))]
+#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    warn(
+        clippy::float_arithmetic,
+        clippy::mut_mut,
+        clippy::nonminimal_bool,
+        clippy::option_map_unwrap_or,
+        clippy::option_map_unwrap_or_else,
+        clippy::unicode_not_nfc,
+        clippy::use_self
+    )
+)]
+
+mod ctx;
+mod error;
+mod fdentry;
+pub mod fs;
+mod helpers;
+mod host;
+mod hostcalls_impl;
+mod memory;
+pub mod old;
+mod sandboxed_tty_writer;
+mod sys;
+pub mod wasi;
+pub mod wasi32;
+
+pub mod hostcalls {
+    wig::define_hostcalls!("snapshot" "wasi_snapshot_preview1");
+}
+
+pub use ctx::{WasiCtx, WasiCtxBuilder};
+pub use sys::preopen_dir;
+
+pub use error::Error;
+pub(crate) use error::Result;
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/memory.rs.html b/api/src/wasi_common/memory.rs.html new file mode 100644 index 000000000000..e5603fae4e1e --- /dev/null +++ b/api/src/wasi_common/memory.rs.html @@ -0,0 +1,961 @@ +memory.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+
+//! Functions to store and load data to and from wasm linear memory,
+//! transforming them from and to host data types.
+//!
+//! Endianness concerns are completely encapsulated in this file, so
+//! that users outside this file holding a `wasi::*` value never need
+//! to consider what endianness it's in. Inside this file,
+//! wasm linear-memory-ordered values are called "raw" values, and
+//! are not held for long durations.
+
+#![allow(unused)]
+use crate::{host, wasi, wasi32, Error, Result};
+use num::PrimInt;
+use std::convert::TryFrom;
+use std::mem::{align_of, size_of};
+use std::{ptr, slice};
+
+fn dec_ptr(memory: &[u8], ptr: wasi32::uintptr_t, len: usize) -> Result<*const u8> {
+    // check for overflow
+    let checked_len = (ptr as usize).checked_add(len).ok_or(Error::EFAULT)?;
+
+    // translate the pointer
+    memory
+        .get(ptr as usize..checked_len)
+        .ok_or(Error::EFAULT)
+        .map(|mem| mem.as_ptr())
+}
+
+fn dec_ptr_mut(memory: &mut [u8], ptr: wasi32::uintptr_t, len: usize) -> Result<*mut u8> {
+    // check for overflow
+    let checked_len = (ptr as usize).checked_add(len).ok_or(Error::EFAULT)?;
+
+    // translate the pointer
+    memory
+        .get_mut(ptr as usize..checked_len)
+        .ok_or(Error::EFAULT)
+        .map(|mem| mem.as_mut_ptr())
+}
+
+fn dec_ptr_to<'memory, T>(memory: &'memory [u8], ptr: wasi32::uintptr_t) -> Result<&'memory T> {
+    // check that the ptr is aligned
+    if ptr as usize % align_of::<T>() != 0 {
+        return Err(Error::EINVAL);
+    }
+
+    dec_ptr(memory, ptr, size_of::<T>()).map(|p| unsafe { &*(p as *const T) })
+}
+
+fn dec_ptr_to_mut<'memory, T>(
+    memory: &'memory mut [u8],
+    ptr: wasi32::uintptr_t,
+) -> Result<&'memory mut T> {
+    // check that the ptr is aligned
+    if ptr as usize % align_of::<T>() != 0 {
+        return Err(Error::EINVAL);
+    }
+
+    dec_ptr_mut(memory, ptr, size_of::<T>()).map(|p| unsafe { &mut *(p as *mut T) })
+}
+
+/// This function does not perform endianness conversions!
+fn dec_raw_byref<T>(memory: &[u8], ptr: wasi32::uintptr_t) -> Result<T> {
+    dec_ptr_to::<T>(memory, ptr).map(|p| unsafe { ptr::read(p) })
+}
+
+/// This function does not perform endianness conversions!
+fn enc_raw_byref<T>(memory: &mut [u8], ptr: wasi32::uintptr_t, t: T) -> Result<()> {
+    dec_ptr_to_mut::<T>(memory, ptr).map(|p| unsafe { ptr::write(p, t) })
+}
+
+pub(crate) fn dec_int_byref<T>(memory: &[u8], ptr: wasi32::uintptr_t) -> Result<T>
+where
+    T: PrimInt,
+{
+    dec_raw_byref::<T>(memory, ptr).map(|i| PrimInt::from_le(i))
+}
+
+pub(crate) fn enc_int_byref<T>(memory: &mut [u8], ptr: wasi32::uintptr_t, t: T) -> Result<()>
+where
+    T: PrimInt,
+{
+    enc_raw_byref::<T>(memory, ptr, PrimInt::to_le(t))
+}
+
+fn check_slice_of<T>(ptr: wasi32::uintptr_t, len: wasi32::size_t) -> Result<(usize, usize)> {
+    // check alignment, and that length doesn't overflow
+    if ptr as usize % align_of::<T>() != 0 {
+        return Err(Error::EINVAL);
+    }
+    let len = dec_usize(len);
+    let len_bytes = if let Some(len) = size_of::<T>().checked_mul(len) {
+        len
+    } else {
+        return Err(Error::EOVERFLOW);
+    };
+
+    Ok((len, len_bytes))
+}
+
+fn dec_raw_slice_of<'memory, T>(
+    memory: &'memory [u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<&'memory [T]> {
+    let (len, len_bytes) = check_slice_of::<T>(ptr, len)?;
+    let ptr = dec_ptr(memory, ptr, len_bytes)? as *const T;
+    Ok(unsafe { slice::from_raw_parts(ptr, len) })
+}
+
+fn dec_raw_slice_of_mut<'memory, T>(
+    memory: &'memory mut [u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<&'memory mut [T]> {
+    let (len, len_bytes) = check_slice_of::<T>(ptr, len)?;
+    let ptr = dec_ptr_mut(memory, ptr, len_bytes)? as *mut T;
+    Ok(unsafe { slice::from_raw_parts_mut(ptr, len) })
+}
+
+fn raw_slice_for_enc<'memory, T>(
+    memory: &'memory mut [u8],
+    slice: &[T],
+    ptr: wasi32::uintptr_t,
+) -> Result<&'memory mut [T]> {
+    // check alignment
+    if ptr as usize % align_of::<T>() != 0 {
+        return Err(Error::EINVAL);
+    }
+    // check that length doesn't overflow
+    let len_bytes = if let Some(len) = size_of::<T>().checked_mul(slice.len()) {
+        len
+    } else {
+        return Err(Error::EOVERFLOW);
+    };
+
+    // get the pointer into guest memory
+    let ptr = dec_ptr_mut(memory, ptr, len_bytes)? as *mut T;
+
+    Ok(unsafe { slice::from_raw_parts_mut(ptr, slice.len()) })
+}
+
+pub(crate) fn dec_slice_of_u8<'memory>(
+    memory: &'memory [u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<&'memory [u8]> {
+    dec_raw_slice_of::<u8>(memory, ptr, len)
+}
+
+pub(crate) fn dec_slice_of_mut_u8<'memory>(
+    memory: &'memory mut [u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<&'memory mut [u8]> {
+    dec_raw_slice_of_mut::<u8>(memory, ptr, len)
+}
+
+pub(crate) fn enc_slice_of_u8(
+    memory: &mut [u8],
+    slice: &[u8],
+    ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    let output = raw_slice_for_enc::<u8>(memory, slice, ptr)?;
+
+    output.copy_from_slice(slice);
+
+    Ok(())
+}
+
+pub(crate) fn enc_slice_of_wasi32_uintptr(
+    memory: &mut [u8],
+    slice: &[wasi32::uintptr_t],
+    ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    let mut output_iter = raw_slice_for_enc::<wasi32::uintptr_t>(memory, slice, ptr)?.into_iter();
+
+    for p in slice {
+        *output_iter.next().unwrap() = PrimInt::to_le(*p);
+    }
+
+    Ok(())
+}
+
+macro_rules! dec_enc_scalar {
+    ($ty:ident, $dec_byref:ident, $enc_byref:ident) => {
+        pub(crate) fn $dec_byref(memory: &mut [u8], ptr: wasi32::uintptr_t) -> Result<wasi::$ty> {
+            dec_int_byref::<wasi::$ty>(memory, ptr)
+        }
+
+        pub(crate) fn $enc_byref(
+            memory: &mut [u8],
+            ptr: wasi32::uintptr_t,
+            x: wasi::$ty,
+        ) -> Result<()> {
+            enc_int_byref::<wasi::$ty>(memory, ptr, x)
+        }
+    };
+}
+
+pub(crate) fn dec_ciovec_slice(
+    memory: &[u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<Vec<host::__wasi_ciovec_t>> {
+    let raw_slice = dec_raw_slice_of::<wasi32::__wasi_ciovec_t>(memory, ptr, len)?;
+
+    raw_slice
+        .iter()
+        .map(|raw_iov| {
+            let len = dec_usize(PrimInt::from_le(raw_iov.buf_len));
+            let buf = PrimInt::from_le(raw_iov.buf);
+            Ok(host::__wasi_ciovec_t {
+                buf: dec_ptr(memory, buf, len)? as *const u8,
+                buf_len: len,
+            })
+        })
+        .collect()
+}
+
+pub(crate) fn dec_iovec_slice(
+    memory: &[u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<Vec<host::__wasi_iovec_t>> {
+    let raw_slice = dec_raw_slice_of::<wasi32::__wasi_iovec_t>(memory, ptr, len)?;
+
+    raw_slice
+        .iter()
+        .map(|raw_iov| {
+            let len = dec_usize(PrimInt::from_le(raw_iov.buf_len));
+            let buf = PrimInt::from_le(raw_iov.buf);
+            Ok(host::__wasi_iovec_t {
+                buf: dec_ptr(memory, buf, len)? as *mut u8,
+                buf_len: len,
+            })
+        })
+        .collect()
+}
+
+dec_enc_scalar!(__wasi_clockid_t, dec_clockid_byref, enc_clockid_byref);
+dec_enc_scalar!(__wasi_errno_t, dec_errno_byref, enc_errno_byref);
+dec_enc_scalar!(__wasi_exitcode_t, dec_exitcode_byref, enc_exitcode_byref);
+dec_enc_scalar!(__wasi_fd_t, dec_fd_byref, enc_fd_byref);
+dec_enc_scalar!(__wasi_fdflags_t, dec_fdflags_byref, enc_fdflags_byref);
+dec_enc_scalar!(__wasi_device_t, dev_device_byref, enc_device_byref);
+dec_enc_scalar!(__wasi_inode_t, dev_inode_byref, enc_inode_byref);
+dec_enc_scalar!(__wasi_linkcount_t, dev_linkcount_byref, enc_linkcount_byref);
+
+pub(crate) fn dec_filestat_byref(
+    memory: &mut [u8],
+    filestat_ptr: wasi32::uintptr_t,
+) -> Result<wasi::__wasi_filestat_t> {
+    let raw = dec_raw_byref::<wasi::__wasi_filestat_t>(memory, filestat_ptr)?;
+
+    Ok(wasi::__wasi_filestat_t {
+        dev: PrimInt::from_le(raw.dev),
+        ino: PrimInt::from_le(raw.ino),
+        filetype: PrimInt::from_le(raw.filetype),
+        nlink: PrimInt::from_le(raw.nlink),
+        size: PrimInt::from_le(raw.size),
+        atim: PrimInt::from_le(raw.atim),
+        mtim: PrimInt::from_le(raw.mtim),
+        ctim: PrimInt::from_le(raw.ctim),
+    })
+}
+
+pub(crate) fn enc_filestat_byref(
+    memory: &mut [u8],
+    filestat_ptr: wasi32::uintptr_t,
+    filestat: wasi::__wasi_filestat_t,
+) -> Result<()> {
+    let raw = wasi::__wasi_filestat_t {
+        dev: PrimInt::to_le(filestat.dev),
+        ino: PrimInt::to_le(filestat.ino),
+        filetype: PrimInt::to_le(filestat.filetype),
+        nlink: PrimInt::to_le(filestat.nlink),
+        size: PrimInt::to_le(filestat.size),
+        atim: PrimInt::to_le(filestat.atim),
+        mtim: PrimInt::to_le(filestat.mtim),
+        ctim: PrimInt::to_le(filestat.ctim),
+    };
+
+    enc_raw_byref::<wasi::__wasi_filestat_t>(memory, filestat_ptr, raw)
+}
+
+pub(crate) fn dec_fdstat_byref(
+    memory: &mut [u8],
+    fdstat_ptr: wasi32::uintptr_t,
+) -> Result<wasi::__wasi_fdstat_t> {
+    let raw = dec_raw_byref::<wasi::__wasi_fdstat_t>(memory, fdstat_ptr)?;
+
+    Ok(wasi::__wasi_fdstat_t {
+        fs_filetype: PrimInt::from_le(raw.fs_filetype),
+        fs_flags: PrimInt::from_le(raw.fs_flags),
+        fs_rights_base: PrimInt::from_le(raw.fs_rights_base),
+        fs_rights_inheriting: PrimInt::from_le(raw.fs_rights_inheriting),
+    })
+}
+
+pub(crate) fn enc_fdstat_byref(
+    memory: &mut [u8],
+    fdstat_ptr: wasi32::uintptr_t,
+    fdstat: wasi::__wasi_fdstat_t,
+) -> Result<()> {
+    let raw = wasi::__wasi_fdstat_t {
+        fs_filetype: PrimInt::to_le(fdstat.fs_filetype),
+        fs_flags: PrimInt::to_le(fdstat.fs_flags),
+        fs_rights_base: PrimInt::to_le(fdstat.fs_rights_base),
+        fs_rights_inheriting: PrimInt::to_le(fdstat.fs_rights_inheriting),
+    };
+
+    enc_raw_byref::<wasi::__wasi_fdstat_t>(memory, fdstat_ptr, raw)
+}
+
+dec_enc_scalar!(__wasi_filedelta_t, dec_filedelta_byref, enc_filedelta_byref);
+dec_enc_scalar!(__wasi_filesize_t, dec_filesize_byref, enc_filesize_byref);
+dec_enc_scalar!(__wasi_filetype_t, dec_filetype_byref, enc_filetype_byref);
+
+dec_enc_scalar!(
+    __wasi_lookupflags_t,
+    dec_lookupflags_byref,
+    enc_lookupflags_byref
+);
+
+dec_enc_scalar!(__wasi_oflags_t, dec_oflags_byref, enc_oflags_byref);
+
+pub(crate) fn dec_prestat_byref(
+    memory: &mut [u8],
+    prestat_ptr: wasi32::uintptr_t,
+) -> Result<host::__wasi_prestat_t> {
+    let raw = dec_raw_byref::<wasi32::__wasi_prestat_t>(memory, prestat_ptr)?;
+
+    match PrimInt::from_le(raw.pr_type) {
+        wasi::__WASI_PREOPENTYPE_DIR => Ok(host::__wasi_prestat_t {
+            pr_type: wasi::__WASI_PREOPENTYPE_DIR,
+            u: host::__wasi_prestat_u_t {
+                dir: host::__wasi_prestat_dir_t {
+                    pr_name_len: dec_usize(PrimInt::from_le(unsafe { raw.u.dir.pr_name_len })),
+                },
+            },
+        }),
+        _ => Err(Error::EINVAL),
+    }
+}
+
+pub(crate) fn enc_prestat_byref(
+    memory: &mut [u8],
+    prestat_ptr: wasi32::uintptr_t,
+    prestat: host::__wasi_prestat_t,
+) -> Result<()> {
+    let raw = match prestat.pr_type {
+        wasi::__WASI_PREOPENTYPE_DIR => Ok(wasi32::__wasi_prestat_t {
+            pr_type: PrimInt::to_le(wasi::__WASI_PREOPENTYPE_DIR),
+            u: wasi32::__wasi_prestat_u_t {
+                dir: wasi32::__wasi_prestat_dir_t {
+                    pr_name_len: enc_usize(unsafe { prestat.u.dir.pr_name_len }),
+                },
+            },
+        }),
+        _ => Err(Error::EINVAL),
+    }?;
+
+    enc_raw_byref::<wasi32::__wasi_prestat_t>(memory, prestat_ptr, raw)
+}
+
+dec_enc_scalar!(__wasi_rights_t, dec_rights_byref, enc_rights_byref);
+dec_enc_scalar!(__wasi_timestamp_t, dec_timestamp_byref, enc_timestamp_byref);
+
+pub(crate) fn dec_usize(size: wasi32::size_t) -> usize {
+    usize::try_from(size).unwrap()
+}
+
+pub(crate) fn enc_usize(size: usize) -> wasi32::size_t {
+    wasi32::size_t::try_from(size).unwrap()
+}
+
+pub(crate) fn enc_usize_byref(
+    memory: &mut [u8],
+    usize_ptr: wasi32::uintptr_t,
+    host_usize: usize,
+) -> Result<()> {
+    enc_int_byref::<wasi32::size_t>(memory, usize_ptr, enc_usize(host_usize))
+}
+
+dec_enc_scalar!(__wasi_whence_t, dec_whence_byref, enc_whence_byref);
+
+dec_enc_scalar!(
+    __wasi_subclockflags_t,
+    dec_subclockflags_byref,
+    enc_subclockflags_byref
+);
+
+dec_enc_scalar!(
+    __wasi_eventrwflags_t,
+    dec_eventrwflags_byref,
+    enc_eventrwflags_byref
+);
+
+dec_enc_scalar!(__wasi_eventtype_t, dec_eventtype_byref, enc_eventtype_byref);
+dec_enc_scalar!(__wasi_userdata_t, dec_userdata_byref, enc_userdata_byref);
+
+pub(crate) fn dec_subscriptions(
+    memory: &mut [u8],
+    input: wasi32::uintptr_t,
+    nsubscriptions: wasi32::size_t,
+) -> Result<Vec<wasi::__wasi_subscription_t>> {
+    let raw_input_slice =
+        dec_raw_slice_of::<wasi::__wasi_subscription_t>(memory, input, nsubscriptions)?;
+
+    raw_input_slice
+        .into_iter()
+        .map(|raw_subscription| {
+            let userdata = PrimInt::from_le(raw_subscription.userdata);
+            let r#type = PrimInt::from_le(raw_subscription.r#type);
+            let raw_u = raw_subscription.u;
+            let u = match r#type {
+                wasi::__WASI_EVENTTYPE_CLOCK => wasi::__wasi_subscription_u_t {
+                    clock: unsafe {
+                        wasi::__wasi_subscription_clock_t {
+                            id: PrimInt::from_le(raw_u.clock.id),
+                            timeout: PrimInt::from_le(raw_u.clock.timeout),
+                            precision: PrimInt::from_le(raw_u.clock.precision),
+                            flags: PrimInt::from_le(raw_u.clock.flags),
+                        }
+                    },
+                },
+                wasi::__WASI_EVENTTYPE_FD_READ | wasi::__WASI_EVENTTYPE_FD_WRITE => {
+                    wasi::__wasi_subscription_u_t {
+                        fd_readwrite: wasi::__wasi_subscription_fd_readwrite_t {
+                            file_descriptor: PrimInt::from_le(unsafe {
+                                raw_u.fd_readwrite.file_descriptor
+                            }),
+                        },
+                    }
+                }
+                _ => return Err(Error::EINVAL),
+            };
+            Ok(wasi::__wasi_subscription_t {
+                userdata,
+                r#type,
+                u,
+            })
+        })
+        .collect::<Result<Vec<_>>>()
+}
+
+pub(crate) fn enc_events(
+    memory: &mut [u8],
+    output: wasi32::uintptr_t,
+    nsubscriptions: wasi32::size_t,
+    events: Vec<wasi::__wasi_event_t>,
+) -> Result<()> {
+    let mut raw_output_iter =
+        dec_raw_slice_of_mut::<wasi::__wasi_event_t>(memory, output, nsubscriptions)?.into_iter();
+
+    for event in events.iter() {
+        *raw_output_iter
+            .next()
+            .expect("the number of events cannot exceed the number of subscriptions") = {
+            let fd_readwrite = unsafe { event.u.fd_readwrite };
+            wasi::__wasi_event_t {
+                userdata: PrimInt::to_le(event.userdata),
+                r#type: PrimInt::to_le(event.r#type),
+                error: PrimInt::to_le(event.error),
+                u: wasi::__wasi_event_u_t {
+                    fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                        nbytes: PrimInt::to_le(fd_readwrite.nbytes),
+                        flags: PrimInt::to_le(fd_readwrite.flags),
+                    },
+                },
+            }
+        };
+    }
+
+    Ok(())
+}
+
+dec_enc_scalar!(__wasi_advice_t, dec_advice_byref, enc_advice_byref);
+dec_enc_scalar!(__wasi_fstflags_t, dec_fstflags_byref, enc_fstflags_byref);
+dec_enc_scalar!(__wasi_dircookie_t, dec_dircookie_byref, enc_dircookie_byref);
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/mod.rs.html b/api/src/wasi_common/old/mod.rs.html new file mode 100644 index 000000000000..2ab98ebb6a76 --- /dev/null +++ b/api/src/wasi_common/old/mod.rs.html @@ -0,0 +1,5 @@ +mod.rs.html -- source
1
+
+pub mod snapshot_0;
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/ctx.rs.html b/api/src/wasi_common/old/snapshot_0/ctx.rs.html new file mode 100644 index 000000000000..c58a9b97ea17 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/ctx.rs.html @@ -0,0 +1,673 @@ +ctx.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+
+use crate::old::snapshot_0::fdentry::FdEntry;
+use crate::old::snapshot_0::{wasi, Error, Result};
+use std::borrow::Borrow;
+use std::collections::HashMap;
+use std::env;
+use std::ffi::{CString, OsString};
+use std::fs::File;
+use std::path::{Path, PathBuf};
+
+enum PendingFdEntry {
+    Thunk(fn() -> Result<FdEntry>),
+    File(File),
+}
+
+impl std::fmt::Debug for PendingFdEntry {
+    fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        match self {
+            Self::Thunk(f) => write!(
+                fmt,
+                "PendingFdEntry::Thunk({:p})",
+                f as *const fn() -> Result<FdEntry>
+            ),
+            Self::File(f) => write!(fmt, "PendingFdEntry::File({:?})", f),
+        }
+    }
+}
+
+#[derive(Debug, Eq, Hash, PartialEq)]
+enum PendingCString {
+    Bytes(Vec<u8>),
+    OsString(OsString),
+}
+
+impl From<Vec<u8>> for PendingCString {
+    fn from(bytes: Vec<u8>) -> Self {
+        Self::Bytes(bytes)
+    }
+}
+
+impl From<OsString> for PendingCString {
+    fn from(s: OsString) -> Self {
+        Self::OsString(s)
+    }
+}
+
+impl PendingCString {
+    fn into_string(self) -> Result<String> {
+        match self {
+            Self::Bytes(v) => String::from_utf8(v).map_err(|_| Error::EILSEQ),
+            Self::OsString(s) => s.into_string().map_err(|_| Error::EILSEQ),
+        }
+    }
+
+    /// Create a `CString` containing valid UTF-8, or fail with `Error::EILSEQ`.
+    fn into_utf8_cstring(self) -> Result<CString> {
+        self.into_string()
+            .and_then(|s| CString::new(s).map_err(|_| Error::EILSEQ))
+    }
+}
+
+/// A builder allowing customizable construction of `WasiCtx` instances.
+pub struct WasiCtxBuilder {
+    fds: HashMap<wasi::__wasi_fd_t, PendingFdEntry>,
+    preopens: Vec<(PathBuf, File)>,
+    args: Vec<PendingCString>,
+    env: HashMap<PendingCString, PendingCString>,
+}
+
+impl WasiCtxBuilder {
+    /// Builder for a new `WasiCtx`.
+    pub fn new() -> Self {
+        let mut builder = Self {
+            fds: HashMap::new(),
+            preopens: Vec::new(),
+            args: vec![],
+            env: HashMap::new(),
+        };
+
+        builder.fds.insert(0, PendingFdEntry::Thunk(FdEntry::null));
+        builder.fds.insert(1, PendingFdEntry::Thunk(FdEntry::null));
+        builder.fds.insert(2, PendingFdEntry::Thunk(FdEntry::null));
+
+        builder
+    }
+
+    /// Add arguments to the command-line arguments list.
+    ///
+    /// Arguments must be valid UTF-8 with no NUL bytes, or else `WasiCtxBuilder::build()` will fail
+    /// with `Error::EILSEQ`.
+    pub fn args<S: AsRef<[u8]>>(mut self, args: impl IntoIterator<Item = S>) -> Self {
+        self.args = args
+            .into_iter()
+            .map(|arg| arg.as_ref().to_vec().into())
+            .collect();
+        self
+    }
+
+    /// Add an argument to the command-line arguments list.
+    ///
+    /// Arguments must be valid UTF-8 with no NUL bytes, or else `WasiCtxBuilder::build()` will fail
+    /// with `Error::EILSEQ`.
+    pub fn arg<S: AsRef<[u8]>>(mut self, arg: S) -> Self {
+        self.args.push(arg.as_ref().to_vec().into());
+        self
+    }
+
+    /// Inherit the command-line arguments from the host process.
+    ///
+    /// If any arguments from the host process contain invalid UTF-8, `WasiCtxBuilder::build()` will
+    /// fail with `Error::EILSEQ`.
+    pub fn inherit_args(mut self) -> Self {
+        self.args = env::args_os().map(PendingCString::OsString).collect();
+        self
+    }
+
+    /// Inherit the stdin, stdout, and stderr streams from the host process.
+    pub fn inherit_stdio(mut self) -> Self {
+        self.fds
+            .insert(0, PendingFdEntry::Thunk(FdEntry::duplicate_stdin));
+        self.fds
+            .insert(1, PendingFdEntry::Thunk(FdEntry::duplicate_stdout));
+        self.fds
+            .insert(2, PendingFdEntry::Thunk(FdEntry::duplicate_stderr));
+        self
+    }
+
+    /// Inherit the environment variables from the host process.
+    ///
+    /// If any environment variables from the host process contain invalid Unicode (UTF-16 for
+    /// Windows, UTF-8 for other platforms), `WasiCtxBuilder::build()` will fail with
+    /// `Error::EILSEQ`.
+    pub fn inherit_env(mut self) -> Self {
+        self.env = std::env::vars_os()
+            .map(|(k, v)| (k.into(), v.into()))
+            .collect();
+        self
+    }
+
+    /// Add an entry to the environment.
+    ///
+    /// Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else
+    /// `WasiCtxBuilder::build()` will fail with `Error::EILSEQ`.
+    pub fn env<S: AsRef<[u8]>>(mut self, k: S, v: S) -> Self {
+        self.env
+            .insert(k.as_ref().to_vec().into(), v.as_ref().to_vec().into());
+        self
+    }
+
+    /// Add entries to the environment.
+    ///
+    /// Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else
+    /// `WasiCtxBuilder::build()` will fail with `Error::EILSEQ`.
+    pub fn envs<S: AsRef<[u8]>, T: Borrow<(S, S)>>(
+        mut self,
+        envs: impl IntoIterator<Item = T>,
+    ) -> Self {
+        self.env = envs
+            .into_iter()
+            .map(|t| {
+                let (k, v) = t.borrow();
+                (k.as_ref().to_vec().into(), v.as_ref().to_vec().into())
+            })
+            .collect();
+        self
+    }
+
+    /// Provide a File to use as stdin
+    pub fn stdin(mut self, file: File) -> Self {
+        self.fds.insert(0, PendingFdEntry::File(file));
+        self
+    }
+
+    /// Provide a File to use as stdout
+    pub fn stdout(mut self, file: File) -> Self {
+        self.fds.insert(1, PendingFdEntry::File(file));
+        self
+    }
+
+    /// Provide a File to use as stderr
+    pub fn stderr(mut self, file: File) -> Self {
+        self.fds.insert(2, PendingFdEntry::File(file));
+        self
+    }
+
+    /// Add a preopened directory.
+    pub fn preopened_dir<P: AsRef<Path>>(mut self, dir: File, guest_path: P) -> Self {
+        self.preopens.push((guest_path.as_ref().to_owned(), dir));
+        self
+    }
+
+    /// Build a `WasiCtx`, consuming this `WasiCtxBuilder`.
+    ///
+    /// If any of the arguments or environment variables in this builder cannot be converted into
+    /// `CString`s, either due to NUL bytes or Unicode conversions, this returns `Error::EILSEQ`.
+    pub fn build(self) -> Result<WasiCtx> {
+        // Process arguments and environment variables into `CString`s, failing quickly if they
+        // contain any NUL bytes, or if conversion from `OsString` fails.
+        let args = self
+            .args
+            .into_iter()
+            .map(|arg| arg.into_utf8_cstring())
+            .collect::<Result<Vec<CString>>>()?;
+
+        let env = self
+            .env
+            .into_iter()
+            .map(|(k, v)| {
+                k.into_string().and_then(|mut pair| {
+                    v.into_string().and_then(|v| {
+                        pair.push('=');
+                        pair.push_str(v.as_str());
+                        // We have valid UTF-8, but the keys and values have not yet been checked
+                        // for NULs, so we do a final check here.
+                        CString::new(pair).map_err(|_| Error::EILSEQ)
+                    })
+                })
+            })
+            .collect::<Result<Vec<CString>>>()?;
+
+        let mut fds: HashMap<wasi::__wasi_fd_t, FdEntry> = HashMap::new();
+        // Populate the non-preopen fds.
+        for (fd, pending) in self.fds {
+            log::debug!("WasiCtx inserting ({:?}, {:?})", fd, pending);
+            match pending {
+                PendingFdEntry::Thunk(f) => {
+                    fds.insert(fd, f()?);
+                }
+                PendingFdEntry::File(f) => {
+                    fds.insert(fd, FdEntry::from(f)?);
+                }
+            }
+        }
+        // Then add the preopen fds. Startup code in the guest starts looking at fd 3 for preopens,
+        // so we start from there. This variable is initially 2, though, because the loop
+        // immediately does the increment and check for overflow.
+        let mut preopen_fd: wasi::__wasi_fd_t = 2;
+        for (guest_path, dir) in self.preopens {
+            // We do the increment at the beginning of the loop body, so that we don't overflow
+            // unnecessarily if we have exactly the maximum number of file descriptors.
+            preopen_fd = preopen_fd.checked_add(1).ok_or(Error::ENFILE)?;
+
+            if !dir.metadata()?.is_dir() {
+                return Err(Error::EBADF);
+            }
+
+            // We don't currently allow setting file descriptors other than 0-2, but this will avoid
+            // collisions if we restore that functionality in the future.
+            while fds.contains_key(&preopen_fd) {
+                preopen_fd = preopen_fd.checked_add(1).ok_or(Error::ENFILE)?;
+            }
+            let mut fe = FdEntry::from(dir)?;
+            fe.preopen_path = Some(guest_path);
+            log::debug!("WasiCtx inserting ({:?}, {:?})", preopen_fd, fe);
+            fds.insert(preopen_fd, fe);
+            log::debug!("WasiCtx fds = {:?}", fds);
+        }
+
+        Ok(WasiCtx { args, env, fds })
+    }
+}
+
+#[derive(Debug)]
+pub struct WasiCtx {
+    fds: HashMap<wasi::__wasi_fd_t, FdEntry>,
+    pub(crate) args: Vec<CString>,
+    pub(crate) env: Vec<CString>,
+}
+
+impl WasiCtx {
+    /// Make a new `WasiCtx` with some default settings.
+    ///
+    /// - File descriptors 0, 1, and 2 inherit stdin, stdout, and stderr from the host process.
+    ///
+    /// - Environment variables are inherited from the host process.
+    ///
+    /// To override these behaviors, use `WasiCtxBuilder`.
+    pub fn new<S: AsRef<[u8]>>(args: impl IntoIterator<Item = S>) -> Result<Self> {
+        WasiCtxBuilder::new()
+            .args(args)
+            .inherit_stdio()
+            .inherit_env()
+            .build()
+    }
+
+    /// Check if `WasiCtx` contains the specified raw WASI `fd`.
+    pub(crate) unsafe fn contains_fd_entry(&self, fd: wasi::__wasi_fd_t) -> bool {
+        self.fds.contains_key(&fd)
+    }
+
+    /// Get an immutable `FdEntry` corresponding to the specified raw WASI `fd`.
+    pub(crate) unsafe fn get_fd_entry(&self, fd: wasi::__wasi_fd_t) -> Result<&FdEntry> {
+        self.fds.get(&fd).ok_or(Error::EBADF)
+    }
+
+    /// Get a mutable `FdEntry` corresponding to the specified raw WASI `fd`.
+    pub(crate) unsafe fn get_fd_entry_mut(
+        &mut self,
+        fd: wasi::__wasi_fd_t,
+    ) -> Result<&mut FdEntry> {
+        self.fds.get_mut(&fd).ok_or(Error::EBADF)
+    }
+
+    /// Insert the specified `FdEntry` into the `WasiCtx` object.
+    ///
+    /// The `FdEntry` will automatically get another free raw WASI `fd` assigned. Note that
+    /// the two subsequent free raw WASI `fd`s do not have to be stored contiguously.
+    pub(crate) fn insert_fd_entry(&mut self, fe: FdEntry) -> Result<wasi::__wasi_fd_t> {
+        // Never insert where stdio handles are expected to be.
+        let mut fd = 3;
+        while self.fds.contains_key(&fd) {
+            if let Some(next_fd) = fd.checked_add(1) {
+                fd = next_fd;
+            } else {
+                return Err(Error::EMFILE);
+            }
+        }
+        self.fds.insert(fd, fe);
+        Ok(fd)
+    }
+
+    /// Insert the specified `FdEntry` with the specified raw WASI `fd` key into the `WasiCtx`
+    /// object.
+    pub(crate) fn insert_fd_entry_at(
+        &mut self,
+        fd: wasi::__wasi_fd_t,
+        fe: FdEntry,
+    ) -> Option<FdEntry> {
+        self.fds.insert(fd, fe)
+    }
+
+    /// Remove `FdEntry` corresponding to the specified raw WASI `fd` from the `WasiCtx` object.
+    pub(crate) fn remove_fd_entry(&mut self, fd: wasi::__wasi_fd_t) -> Result<FdEntry> {
+        self.fds.remove(&fd).ok_or(Error::EBADF)
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/error.rs.html b/api/src/wasi_common/old/snapshot_0/error.rs.html new file mode 100644 index 000000000000..5d809edd28e6 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/error.rs.html @@ -0,0 +1,497 @@ +error.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+
+// Due to https://github.com/rust-lang/rust/issues/64247
+#![allow(clippy::use_self)]
+use crate::old::snapshot_0::wasi;
+use std::convert::Infallible;
+use std::num::TryFromIntError;
+use std::{ffi, str};
+use thiserror::Error;
+
+#[derive(Clone, Copy, Debug, Error, Eq, PartialEq)]
+#[repr(u16)]
+#[error("{:?} ({})", self, wasi::strerror(*self as wasi::__wasi_errno_t))]
+pub enum WasiError {
+    ESUCCESS = wasi::__WASI_ERRNO_SUCCESS,
+    E2BIG = wasi::__WASI_ERRNO_2BIG,
+    EACCES = wasi::__WASI_ERRNO_ACCES,
+    EADDRINUSE = wasi::__WASI_ERRNO_ADDRINUSE,
+    EADDRNOTAVAIL = wasi::__WASI_ERRNO_ADDRNOTAVAIL,
+    EAFNOSUPPORT = wasi::__WASI_ERRNO_AFNOSUPPORT,
+    EAGAIN = wasi::__WASI_ERRNO_AGAIN,
+    EALREADY = wasi::__WASI_ERRNO_ALREADY,
+    EBADF = wasi::__WASI_ERRNO_BADF,
+    EBADMSG = wasi::__WASI_ERRNO_BADMSG,
+    EBUSY = wasi::__WASI_ERRNO_BUSY,
+    ECANCELED = wasi::__WASI_ERRNO_CANCELED,
+    ECHILD = wasi::__WASI_ERRNO_CHILD,
+    ECONNABORTED = wasi::__WASI_ERRNO_CONNABORTED,
+    ECONNREFUSED = wasi::__WASI_ERRNO_CONNREFUSED,
+    ECONNRESET = wasi::__WASI_ERRNO_CONNRESET,
+    EDEADLK = wasi::__WASI_ERRNO_DEADLK,
+    EDESTADDRREQ = wasi::__WASI_ERRNO_DESTADDRREQ,
+    EDOM = wasi::__WASI_ERRNO_DOM,
+    EDQUOT = wasi::__WASI_ERRNO_DQUOT,
+    EEXIST = wasi::__WASI_ERRNO_EXIST,
+    EFAULT = wasi::__WASI_ERRNO_FAULT,
+    EFBIG = wasi::__WASI_ERRNO_FBIG,
+    EHOSTUNREACH = wasi::__WASI_ERRNO_HOSTUNREACH,
+    EIDRM = wasi::__WASI_ERRNO_IDRM,
+    EILSEQ = wasi::__WASI_ERRNO_ILSEQ,
+    EINPROGRESS = wasi::__WASI_ERRNO_INPROGRESS,
+    EINTR = wasi::__WASI_ERRNO_INTR,
+    EINVAL = wasi::__WASI_ERRNO_INVAL,
+    EIO = wasi::__WASI_ERRNO_IO,
+    EISCONN = wasi::__WASI_ERRNO_ISCONN,
+    EISDIR = wasi::__WASI_ERRNO_ISDIR,
+    ELOOP = wasi::__WASI_ERRNO_LOOP,
+    EMFILE = wasi::__WASI_ERRNO_MFILE,
+    EMLINK = wasi::__WASI_ERRNO_MLINK,
+    EMSGSIZE = wasi::__WASI_ERRNO_MSGSIZE,
+    EMULTIHOP = wasi::__WASI_ERRNO_MULTIHOP,
+    ENAMETOOLONG = wasi::__WASI_ERRNO_NAMETOOLONG,
+    ENETDOWN = wasi::__WASI_ERRNO_NETDOWN,
+    ENETRESET = wasi::__WASI_ERRNO_NETRESET,
+    ENETUNREACH = wasi::__WASI_ERRNO_NETUNREACH,
+    ENFILE = wasi::__WASI_ERRNO_NFILE,
+    ENOBUFS = wasi::__WASI_ERRNO_NOBUFS,
+    ENODEV = wasi::__WASI_ERRNO_NODEV,
+    ENOENT = wasi::__WASI_ERRNO_NOENT,
+    ENOEXEC = wasi::__WASI_ERRNO_NOEXEC,
+    ENOLCK = wasi::__WASI_ERRNO_NOLCK,
+    ENOLINK = wasi::__WASI_ERRNO_NOLINK,
+    ENOMEM = wasi::__WASI_ERRNO_NOMEM,
+    ENOMSG = wasi::__WASI_ERRNO_NOMSG,
+    ENOPROTOOPT = wasi::__WASI_ERRNO_NOPROTOOPT,
+    ENOSPC = wasi::__WASI_ERRNO_NOSPC,
+    ENOSYS = wasi::__WASI_ERRNO_NOSYS,
+    ENOTCONN = wasi::__WASI_ERRNO_NOTCONN,
+    ENOTDIR = wasi::__WASI_ERRNO_NOTDIR,
+    ENOTEMPTY = wasi::__WASI_ERRNO_NOTEMPTY,
+    ENOTRECOVERABLE = wasi::__WASI_ERRNO_NOTRECOVERABLE,
+    ENOTSOCK = wasi::__WASI_ERRNO_NOTSOCK,
+    ENOTSUP = wasi::__WASI_ERRNO_NOTSUP,
+    ENOTTY = wasi::__WASI_ERRNO_NOTTY,
+    ENXIO = wasi::__WASI_ERRNO_NXIO,
+    EOVERFLOW = wasi::__WASI_ERRNO_OVERFLOW,
+    EOWNERDEAD = wasi::__WASI_ERRNO_OWNERDEAD,
+    EPERM = wasi::__WASI_ERRNO_PERM,
+    EPIPE = wasi::__WASI_ERRNO_PIPE,
+    EPROTO = wasi::__WASI_ERRNO_PROTO,
+    EPROTONOSUPPORT = wasi::__WASI_ERRNO_PROTONOSUPPORT,
+    EPROTOTYPE = wasi::__WASI_ERRNO_PROTOTYPE,
+    ERANGE = wasi::__WASI_ERRNO_RANGE,
+    EROFS = wasi::__WASI_ERRNO_ROFS,
+    ESPIPE = wasi::__WASI_ERRNO_SPIPE,
+    ESRCH = wasi::__WASI_ERRNO_SRCH,
+    ESTALE = wasi::__WASI_ERRNO_STALE,
+    ETIMEDOUT = wasi::__WASI_ERRNO_TIMEDOUT,
+    ETXTBSY = wasi::__WASI_ERRNO_TXTBSY,
+    EXDEV = wasi::__WASI_ERRNO_XDEV,
+    ENOTCAPABLE = wasi::__WASI_ERRNO_NOTCAPABLE,
+}
+
+impl WasiError {
+    pub fn as_raw_errno(self) -> wasi::__wasi_errno_t {
+        self as wasi::__wasi_errno_t
+    }
+}
+
+#[derive(Debug, Error)]
+pub enum Error {
+    #[error("WASI error code: {0}")]
+    Wasi(#[from] WasiError),
+    #[error("IO error: {0}")]
+    Io(#[from] std::io::Error),
+    #[cfg(unix)]
+    #[error("Yanix error: {0}")]
+    Yanix(#[from] yanix::YanixError),
+}
+
+impl From<TryFromIntError> for Error {
+    fn from(_: TryFromIntError) -> Self {
+        Self::EOVERFLOW
+    }
+}
+
+impl From<Infallible> for Error {
+    fn from(_: Infallible) -> Self {
+        unreachable!()
+    }
+}
+
+impl From<str::Utf8Error> for Error {
+    fn from(_: str::Utf8Error) -> Self {
+        Self::EILSEQ
+    }
+}
+
+impl From<ffi::NulError> for Error {
+    fn from(_: ffi::NulError) -> Self {
+        Self::EILSEQ
+    }
+}
+
+impl From<&ffi::NulError> for Error {
+    fn from(_: &ffi::NulError) -> Self {
+        Self::EILSEQ
+    }
+}
+
+impl Error {
+    pub(crate) fn as_wasi_error(&self) -> WasiError {
+        match self {
+            Self::Wasi(err) => *err,
+            Self::Io(err) => {
+                let err = match err.raw_os_error() {
+                    Some(code) => Self::from_raw_os_error(code),
+                    None => {
+                        log::debug!("Inconvertible OS error: {}", err);
+                        Self::EIO
+                    }
+                };
+                err.as_wasi_error()
+            }
+            #[cfg(unix)]
+            Self::Yanix(err) => {
+                use yanix::YanixError::*;
+                let err: Self = match err {
+                    Errno(errno) => (*errno).into(),
+                    NulError(err) => err.into(),
+                    TryFromIntError(err) => (*err).into(),
+                };
+                err.as_wasi_error()
+            }
+        }
+    }
+
+    pub const ESUCCESS: Self = Error::Wasi(WasiError::ESUCCESS);
+    pub const E2BIG: Self = Error::Wasi(WasiError::E2BIG);
+    pub const EACCES: Self = Error::Wasi(WasiError::EACCES);
+    pub const EADDRINUSE: Self = Error::Wasi(WasiError::EADDRINUSE);
+    pub const EADDRNOTAVAIL: Self = Error::Wasi(WasiError::EADDRNOTAVAIL);
+    pub const EAFNOSUPPORT: Self = Error::Wasi(WasiError::EAFNOSUPPORT);
+    pub const EAGAIN: Self = Error::Wasi(WasiError::EAGAIN);
+    pub const EALREADY: Self = Error::Wasi(WasiError::EALREADY);
+    pub const EBADF: Self = Error::Wasi(WasiError::EBADF);
+    pub const EBADMSG: Self = Error::Wasi(WasiError::EBADMSG);
+    pub const EBUSY: Self = Error::Wasi(WasiError::EBUSY);
+    pub const ECANCELED: Self = Error::Wasi(WasiError::ECANCELED);
+    pub const ECHILD: Self = Error::Wasi(WasiError::ECHILD);
+    pub const ECONNABORTED: Self = Error::Wasi(WasiError::ECONNABORTED);
+    pub const ECONNREFUSED: Self = Error::Wasi(WasiError::ECONNREFUSED);
+    pub const ECONNRESET: Self = Error::Wasi(WasiError::ECONNRESET);
+    pub const EDEADLK: Self = Error::Wasi(WasiError::EDEADLK);
+    pub const EDESTADDRREQ: Self = Error::Wasi(WasiError::EDESTADDRREQ);
+    pub const EDOM: Self = Error::Wasi(WasiError::EDOM);
+    pub const EDQUOT: Self = Error::Wasi(WasiError::EDQUOT);
+    pub const EEXIST: Self = Error::Wasi(WasiError::EEXIST);
+    pub const EFAULT: Self = Error::Wasi(WasiError::EFAULT);
+    pub const EFBIG: Self = Error::Wasi(WasiError::EFBIG);
+    pub const EHOSTUNREACH: Self = Error::Wasi(WasiError::EHOSTUNREACH);
+    pub const EIDRM: Self = Error::Wasi(WasiError::EIDRM);
+    pub const EILSEQ: Self = Error::Wasi(WasiError::EILSEQ);
+    pub const EINPROGRESS: Self = Error::Wasi(WasiError::EINPROGRESS);
+    pub const EINTR: Self = Error::Wasi(WasiError::EINTR);
+    pub const EINVAL: Self = Error::Wasi(WasiError::EINVAL);
+    pub const EIO: Self = Error::Wasi(WasiError::EIO);
+    pub const EISCONN: Self = Error::Wasi(WasiError::EISCONN);
+    pub const EISDIR: Self = Error::Wasi(WasiError::EISDIR);
+    pub const ELOOP: Self = Error::Wasi(WasiError::ELOOP);
+    pub const EMFILE: Self = Error::Wasi(WasiError::EMFILE);
+    pub const EMLINK: Self = Error::Wasi(WasiError::EMLINK);
+    pub const EMSGSIZE: Self = Error::Wasi(WasiError::EMSGSIZE);
+    pub const EMULTIHOP: Self = Error::Wasi(WasiError::EMULTIHOP);
+    pub const ENAMETOOLONG: Self = Error::Wasi(WasiError::ENAMETOOLONG);
+    pub const ENETDOWN: Self = Error::Wasi(WasiError::ENETDOWN);
+    pub const ENETRESET: Self = Error::Wasi(WasiError::ENETRESET);
+    pub const ENETUNREACH: Self = Error::Wasi(WasiError::ENETUNREACH);
+    pub const ENFILE: Self = Error::Wasi(WasiError::ENFILE);
+    pub const ENOBUFS: Self = Error::Wasi(WasiError::ENOBUFS);
+    pub const ENODEV: Self = Error::Wasi(WasiError::ENODEV);
+    pub const ENOENT: Self = Error::Wasi(WasiError::ENOENT);
+    pub const ENOEXEC: Self = Error::Wasi(WasiError::ENOEXEC);
+    pub const ENOLCK: Self = Error::Wasi(WasiError::ENOLCK);
+    pub const ENOLINK: Self = Error::Wasi(WasiError::ENOLINK);
+    pub const ENOMEM: Self = Error::Wasi(WasiError::ENOMEM);
+    pub const ENOMSG: Self = Error::Wasi(WasiError::ENOMSG);
+    pub const ENOPROTOOPT: Self = Error::Wasi(WasiError::ENOPROTOOPT);
+    pub const ENOSPC: Self = Error::Wasi(WasiError::ENOSPC);
+    pub const ENOSYS: Self = Error::Wasi(WasiError::ENOSYS);
+    pub const ENOTCONN: Self = Error::Wasi(WasiError::ENOTCONN);
+    pub const ENOTDIR: Self = Error::Wasi(WasiError::ENOTDIR);
+    pub const ENOTEMPTY: Self = Error::Wasi(WasiError::ENOTEMPTY);
+    pub const ENOTRECOVERABLE: Self = Error::Wasi(WasiError::ENOTRECOVERABLE);
+    pub const ENOTSOCK: Self = Error::Wasi(WasiError::ENOTSOCK);
+    pub const ENOTSUP: Self = Error::Wasi(WasiError::ENOTSUP);
+    pub const ENOTTY: Self = Error::Wasi(WasiError::ENOTTY);
+    pub const ENXIO: Self = Error::Wasi(WasiError::ENXIO);
+    pub const EOVERFLOW: Self = Error::Wasi(WasiError::EOVERFLOW);
+    pub const EOWNERDEAD: Self = Error::Wasi(WasiError::EOWNERDEAD);
+    pub const EPERM: Self = Error::Wasi(WasiError::EPERM);
+    pub const EPIPE: Self = Error::Wasi(WasiError::EPIPE);
+    pub const EPROTO: Self = Error::Wasi(WasiError::EPROTO);
+    pub const EPROTONOSUPPORT: Self = Error::Wasi(WasiError::EPROTONOSUPPORT);
+    pub const EPROTOTYPE: Self = Error::Wasi(WasiError::EPROTOTYPE);
+    pub const ERANGE: Self = Error::Wasi(WasiError::ERANGE);
+    pub const EROFS: Self = Error::Wasi(WasiError::EROFS);
+    pub const ESPIPE: Self = Error::Wasi(WasiError::ESPIPE);
+    pub const ESRCH: Self = Error::Wasi(WasiError::ESRCH);
+    pub const ESTALE: Self = Error::Wasi(WasiError::ESTALE);
+    pub const ETIMEDOUT: Self = Error::Wasi(WasiError::ETIMEDOUT);
+    pub const ETXTBSY: Self = Error::Wasi(WasiError::ETXTBSY);
+    pub const EXDEV: Self = Error::Wasi(WasiError::EXDEV);
+    pub const ENOTCAPABLE: Self = Error::Wasi(WasiError::ENOTCAPABLE);
+}
+
+pub(crate) trait FromRawOsError {
+    fn from_raw_os_error(code: i32) -> Self;
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/fdentry.rs.html b/api/src/wasi_common/old/snapshot_0/fdentry.rs.html new file mode 100644 index 000000000000..fb210b88f641 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/fdentry.rs.html @@ -0,0 +1,419 @@ +fdentry.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+
+use crate::old::snapshot_0::sys::dev_null;
+use crate::old::snapshot_0::sys::fdentry_impl::{
+    descriptor_as_oshandle, determine_type_and_access_rights, OsHandle,
+};
+use crate::old::snapshot_0::{wasi, Error, Result};
+use std::marker::PhantomData;
+use std::mem::ManuallyDrop;
+use std::ops::{Deref, DerefMut};
+use std::path::PathBuf;
+use std::{fs, io};
+
+#[derive(Debug)]
+pub(crate) enum Descriptor {
+    OsHandle(OsHandle),
+    Stdin,
+    Stdout,
+    Stderr,
+}
+
+impl Descriptor {
+    /// Return a reference to the `OsHandle` treating it as an actual file/dir, and
+    /// allowing operations which require an actual file and not just a stream or
+    /// socket file descriptor.
+    pub(crate) fn as_file(&self) -> Result<&OsHandle> {
+        match self {
+            Self::OsHandle(file) => Ok(file),
+            _ => Err(Error::EBADF),
+        }
+    }
+
+    /// Like `as_file`, but return a mutable reference.
+    pub(crate) fn as_file_mut(&mut self) -> Result<&mut OsHandle> {
+        match self {
+            Self::OsHandle(file) => Ok(file),
+            _ => Err(Error::EBADF),
+        }
+    }
+
+    /// Return an `OsHandle`, which may be a stream or socket file descriptor.
+    pub(crate) fn as_os_handle<'descriptor>(&'descriptor self) -> OsHandleRef<'descriptor> {
+        descriptor_as_oshandle(self)
+    }
+}
+
+/// An abstraction struct serving as a wrapper for a host `Descriptor` object which requires
+/// certain base rights `rights_base` and inheriting rights `rights_inheriting` in order to be
+/// accessed correctly.
+///
+/// Here, the `descriptor` field stores the host `Descriptor` object (such as a file descriptor, or
+/// stdin handle), and accessing it can only be done via the provided `FdEntry::as_descriptor` and
+/// `FdEntry::as_descriptor_mut` methods which require a set of base and inheriting rights to be
+/// specified, verifying whether the stored `Descriptor` object is valid for the rights specified.
+#[derive(Debug)]
+pub(crate) struct FdEntry {
+    pub(crate) file_type: wasi::__wasi_filetype_t,
+    descriptor: Descriptor,
+    pub(crate) rights_base: wasi::__wasi_rights_t,
+    pub(crate) rights_inheriting: wasi::__wasi_rights_t,
+    pub(crate) preopen_path: Option<PathBuf>,
+    // TODO: directories
+}
+
+impl FdEntry {
+    /// Create an FdEntry with *maximal* possible rights from a given `File`.
+    /// If this is not desired, the rights of the resulting `FdEntry` should
+    /// be manually restricted.
+    pub(crate) fn from(file: fs::File) -> Result<Self> {
+        unsafe { determine_type_and_access_rights(&file) }.map(
+            |(file_type, rights_base, rights_inheriting)| Self {
+                file_type,
+                descriptor: Descriptor::OsHandle(OsHandle::from(file)),
+                rights_base,
+                rights_inheriting,
+                preopen_path: None,
+            },
+        )
+    }
+
+    pub(crate) fn duplicate_stdin() -> Result<Self> {
+        unsafe { determine_type_and_access_rights(&io::stdin()) }.map(
+            |(file_type, rights_base, rights_inheriting)| Self {
+                file_type,
+                descriptor: Descriptor::Stdin,
+                rights_base,
+                rights_inheriting,
+                preopen_path: None,
+            },
+        )
+    }
+
+    pub(crate) fn duplicate_stdout() -> Result<Self> {
+        unsafe { determine_type_and_access_rights(&io::stdout()) }.map(
+            |(file_type, rights_base, rights_inheriting)| Self {
+                file_type,
+                descriptor: Descriptor::Stdout,
+                rights_base,
+                rights_inheriting,
+                preopen_path: None,
+            },
+        )
+    }
+
+    pub(crate) fn duplicate_stderr() -> Result<Self> {
+        unsafe { determine_type_and_access_rights(&io::stderr()) }.map(
+            |(file_type, rights_base, rights_inheriting)| Self {
+                file_type,
+                descriptor: Descriptor::Stderr,
+                rights_base,
+                rights_inheriting,
+                preopen_path: None,
+            },
+        )
+    }
+
+    pub(crate) fn null() -> Result<Self> {
+        Self::from(dev_null()?)
+    }
+
+    /// Convert this `FdEntry` into a host `Descriptor` object provided the specified
+    /// `rights_base` and `rights_inheriting` rights are set on this `FdEntry` object.
+    ///
+    /// The `FdEntry` can only be converted into a valid `Descriptor` object if
+    /// the specified set of base rights `rights_base`, and inheriting rights `rights_inheriting`
+    /// is a subset of rights attached to this `FdEntry`. The check is performed using
+    /// `FdEntry::validate_rights` method. If the check fails, `Error::ENOTCAPABLE` is returned.
+    pub(crate) fn as_descriptor(
+        &self,
+        rights_base: wasi::__wasi_rights_t,
+        rights_inheriting: wasi::__wasi_rights_t,
+    ) -> Result<&Descriptor> {
+        self.validate_rights(rights_base, rights_inheriting)?;
+        Ok(&self.descriptor)
+    }
+
+    /// Convert this `FdEntry` into a mutable host `Descriptor` object provided the specified
+    /// `rights_base` and `rights_inheriting` rights are set on this `FdEntry` object.
+    ///
+    /// The `FdEntry` can only be converted into a valid `Descriptor` object if
+    /// the specified set of base rights `rights_base`, and inheriting rights `rights_inheriting`
+    /// is a subset of rights attached to this `FdEntry`. The check is performed using
+    /// `FdEntry::validate_rights` method. If the check fails, `Error::ENOTCAPABLE` is returned.
+    pub(crate) fn as_descriptor_mut(
+        &mut self,
+        rights_base: wasi::__wasi_rights_t,
+        rights_inheriting: wasi::__wasi_rights_t,
+    ) -> Result<&mut Descriptor> {
+        self.validate_rights(rights_base, rights_inheriting)?;
+        Ok(&mut self.descriptor)
+    }
+
+    /// Check if this `FdEntry` object satisfies the specified base rights `rights_base`, and
+    /// inheriting rights `rights_inheriting`; i.e., if rights attached to this `FdEntry` object
+    /// are a superset.
+    ///
+    /// Upon unsuccessful check, `Error::ENOTCAPABLE` is returned.
+    fn validate_rights(
+        &self,
+        rights_base: wasi::__wasi_rights_t,
+        rights_inheriting: wasi::__wasi_rights_t,
+    ) -> Result<()> {
+        if !self.rights_base & rights_base != 0 || !self.rights_inheriting & rights_inheriting != 0
+        {
+            Err(Error::ENOTCAPABLE)
+        } else {
+            Ok(())
+        }
+    }
+
+    /// Test whether this descriptor is considered a tty within WASI.
+    /// Note that since WASI itself lacks an `isatty` syscall and relies
+    /// on a conservative approximation, we use the same approximation here.
+    pub(crate) fn isatty(&self) -> bool {
+        self.file_type == wasi::__WASI_FILETYPE_CHARACTER_DEVICE
+            && (self.rights_base & (wasi::__WASI_RIGHTS_FD_SEEK | wasi::__WASI_RIGHTS_FD_TELL)) == 0
+    }
+}
+
+/// This allows an `OsHandle` to be temporarily borrowed from a
+/// `Descriptor`. The `Descriptor` continues to own the resource,
+/// and `OsHandleRef`'s lifetime parameter ensures that it doesn't
+/// outlive the `Descriptor`.
+pub(crate) struct OsHandleRef<'descriptor> {
+    handle: ManuallyDrop<OsHandle>,
+    _ref: PhantomData<&'descriptor Descriptor>,
+}
+
+impl<'descriptor> OsHandleRef<'descriptor> {
+    pub(crate) fn new(handle: ManuallyDrop<OsHandle>) -> Self {
+        OsHandleRef {
+            handle,
+            _ref: PhantomData,
+        }
+    }
+}
+
+impl<'descriptor> Deref for OsHandleRef<'descriptor> {
+    type Target = fs::File;
+
+    fn deref(&self) -> &Self::Target {
+        &self.handle
+    }
+}
+
+impl<'descriptor> DerefMut for OsHandleRef<'descriptor> {
+    fn deref_mut(&mut self) -> &mut Self::Target {
+        &mut self.handle
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/helpers.rs.html b/api/src/wasi_common/old/snapshot_0/helpers.rs.html new file mode 100644 index 000000000000..fc713469fffe --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/helpers.rs.html @@ -0,0 +1,23 @@ +helpers.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+
+use crate::old::snapshot_0::{Error, Result};
+use std::str;
+
+/// Creates not-owned WASI path from byte slice.
+///
+/// NB WASI spec requires bytes to be valid UTF-8. Otherwise,
+/// `__WASI_ERRNO_ILSEQ` error is returned.
+pub(crate) fn path_from_slice<'a>(s: &'a [u8]) -> Result<&'a str> {
+    str::from_utf8(s).map_err(|_| Error::EILSEQ)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/host.rs.html b/api/src/wasi_common/old/snapshot_0/host.rs.html new file mode 100644 index 000000000000..dba09a995a90 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/host.rs.html @@ -0,0 +1,339 @@ +host.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+
+//! WASI host types. These are types that contain raw pointers and `usize`
+//! values, and so are platform-specific.
+
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+
+use crate::old::snapshot_0::wasi::*;
+use crate::old::snapshot_0::{Error, Result};
+use std::{convert::TryInto, io, mem, slice};
+use wig::witx_host_types;
+
+witx_host_types!("old/snapshot_0" "wasi_unstable");
+
+pub(crate) unsafe fn ciovec_to_host(ciovec: &__wasi_ciovec_t) -> io::IoSlice {
+    let slice = slice::from_raw_parts(ciovec.buf as *const u8, ciovec.buf_len);
+    io::IoSlice::new(slice)
+}
+
+pub(crate) unsafe fn iovec_to_host_mut(iovec: &mut __wasi_iovec_t) -> io::IoSliceMut {
+    let slice = slice::from_raw_parts_mut(iovec.buf as *mut u8, iovec.buf_len);
+    io::IoSliceMut::new(slice)
+}
+
+#[allow(dead_code)] // trouble with sockets
+#[derive(Clone, Copy, Debug)]
+#[repr(u8)]
+pub(crate) enum FileType {
+    Unknown = __WASI_FILETYPE_UNKNOWN,
+    BlockDevice = __WASI_FILETYPE_BLOCK_DEVICE,
+    CharacterDevice = __WASI_FILETYPE_CHARACTER_DEVICE,
+    Directory = __WASI_FILETYPE_DIRECTORY,
+    RegularFile = __WASI_FILETYPE_REGULAR_FILE,
+    SocketDgram = __WASI_FILETYPE_SOCKET_DGRAM,
+    SocketStream = __WASI_FILETYPE_SOCKET_STREAM,
+    Symlink = __WASI_FILETYPE_SYMBOLIC_LINK,
+}
+
+impl FileType {
+    pub(crate) fn to_wasi(&self) -> __wasi_filetype_t {
+        *self as __wasi_filetype_t
+    }
+}
+
+#[derive(Debug, Clone)]
+pub(crate) struct Dirent {
+    pub name: String,
+    pub ftype: FileType,
+    pub ino: u64,
+    pub cookie: __wasi_dircookie_t,
+}
+
+impl Dirent {
+    /// Serialize the directory entry to the format define by `__wasi_fd_readdir`,
+    /// so that the serialized entries can be concatenated by the implementation.
+    pub fn to_wasi_raw(&self) -> Result<Vec<u8>> {
+        let name = self.name.as_bytes();
+        let namlen = name.len();
+        let dirent_size = mem::size_of::<__wasi_dirent_t>();
+        let offset = dirent_size.checked_add(namlen).ok_or(Error::EOVERFLOW)?;
+
+        let mut raw = Vec::<u8>::with_capacity(offset);
+        raw.resize(offset, 0);
+
+        let sys_dirent = raw.as_mut_ptr() as *mut __wasi_dirent_t;
+        unsafe {
+            sys_dirent.write_unaligned(__wasi_dirent_t {
+                d_namlen: namlen.try_into()?,
+                d_ino: self.ino,
+                d_next: self.cookie,
+                d_type: self.ftype.to_wasi(),
+            });
+        }
+
+        let sys_name = unsafe { sys_dirent.offset(1) as *mut u8 };
+        let sys_name = unsafe { slice::from_raw_parts_mut(sys_name, namlen) };
+        sys_name.copy_from_slice(&name);
+
+        Ok(raw)
+    }
+}
+
+#[cfg(test)]
+mod test {
+    use super::*;
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_t>(),
+            16usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).pr_type as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_t),
+                "::",
+                stringify!(pr_type)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).u as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_t),
+                "::",
+                stringify!(u)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_dir_t>(),
+            8usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_dir_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_dir_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_dir_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_prestat_dir_t>())).pr_name_len as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_dir_t),
+                "::",
+                stringify!(pr_name_len)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_u_t>(),
+            8usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_u_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_u_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_u_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_u_t>())).dir as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_u_t),
+                "::",
+                stringify!(dir)
+            )
+        );
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/hostcalls_impl/fs.rs.html b/api/src/wasi_common/old/snapshot_0/hostcalls_impl/fs.rs.html new file mode 100644 index 000000000000..aa174da6d609 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/hostcalls_impl/fs.rs.html @@ -0,0 +1,2153 @@ +fs.rs.html -- source
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+
+#![allow(non_camel_case_types)]
+use super::fs_helpers::path_get;
+use crate::old::snapshot_0::ctx::WasiCtx;
+use crate::old::snapshot_0::fdentry::{Descriptor, FdEntry};
+use crate::old::snapshot_0::helpers::*;
+use crate::old::snapshot_0::memory::*;
+use crate::old::snapshot_0::sys::fdentry_impl::determine_type_rights;
+use crate::old::snapshot_0::sys::hostcalls_impl::fs_helpers::path_open_rights;
+use crate::old::snapshot_0::sys::{host_impl, hostcalls_impl};
+use crate::old::snapshot_0::{helpers, host, wasi, wasi32, Error, Result};
+use crate::sandboxed_tty_writer::SandboxedTTYWriter;
+use filetime::{set_file_handle_times, FileTime};
+use log::trace;
+use std::fs::File;
+use std::io::{self, Read, Seek, SeekFrom, Write};
+use std::ops::DerefMut;
+use std::time::{Duration, SystemTime, UNIX_EPOCH};
+
+pub(crate) unsafe fn fd_close(
+    wasi_ctx: &mut WasiCtx,
+    _mem: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+) -> Result<()> {
+    trace!("fd_close(fd={:?})", fd);
+
+    if let Ok(fe) = wasi_ctx.get_fd_entry(fd) {
+        // can't close preopened files
+        if fe.preopen_path.is_some() {
+            return Err(Error::ENOTSUP);
+        }
+    }
+
+    wasi_ctx.remove_fd_entry(fd)?;
+    Ok(())
+}
+
+pub(crate) unsafe fn fd_datasync(
+    wasi_ctx: &WasiCtx,
+    _mem: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+) -> Result<()> {
+    trace!("fd_datasync(fd={:?})", fd);
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_DATASYNC, 0)?
+        .as_file()?;
+
+    fd.sync_data().map_err(Into::into)
+}
+
+pub(crate) unsafe fn fd_pread(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    iovs_ptr: wasi32::uintptr_t,
+    iovs_len: wasi32::size_t,
+    offset: wasi::__wasi_filesize_t,
+    nread: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_pread(fd={:?}, iovs_ptr={:#x?}, iovs_len={:?}, offset={}, nread={:#x?})",
+        fd,
+        iovs_ptr,
+        iovs_len,
+        offset,
+        nread
+    );
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_READ | wasi::__WASI_RIGHTS_FD_SEEK, 0)?
+        .as_file()?;
+
+    let iovs = dec_iovec_slice(memory, iovs_ptr, iovs_len)?;
+
+    if offset > i64::max_value() as u64 {
+        return Err(Error::EIO);
+    }
+    let buf_size = iovs.iter().map(|v| v.buf_len).sum();
+    let mut buf = vec![0; buf_size];
+    let host_nread = hostcalls_impl::fd_pread(fd, &mut buf, offset)?;
+    let mut buf_offset = 0;
+    let mut left = host_nread;
+    for iov in &iovs {
+        if left == 0 {
+            break;
+        }
+        let vec_len = std::cmp::min(iov.buf_len, left);
+        std::slice::from_raw_parts_mut(iov.buf as *mut u8, vec_len)
+            .copy_from_slice(&buf[buf_offset..buf_offset + vec_len]);
+        buf_offset += vec_len;
+        left -= vec_len;
+    }
+
+    trace!("     | *nread={:?}", host_nread);
+
+    enc_usize_byref(memory, nread, host_nread)
+}
+
+pub(crate) unsafe fn fd_pwrite(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    iovs_ptr: wasi32::uintptr_t,
+    iovs_len: wasi32::size_t,
+    offset: wasi::__wasi_filesize_t,
+    nwritten: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_pwrite(fd={:?}, iovs_ptr={:#x?}, iovs_len={:?}, offset={}, nwritten={:#x?})",
+        fd,
+        iovs_ptr,
+        iovs_len,
+        offset,
+        nwritten
+    );
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(
+            wasi::__WASI_RIGHTS_FD_WRITE | wasi::__WASI_RIGHTS_FD_SEEK,
+            0,
+        )?
+        .as_file()?;
+    let iovs = dec_ciovec_slice(memory, iovs_ptr, iovs_len)?;
+
+    if offset > i64::max_value() as u64 {
+        return Err(Error::EIO);
+    }
+    let buf_size = iovs.iter().map(|v| v.buf_len).sum();
+    let mut buf = Vec::with_capacity(buf_size);
+    for iov in &iovs {
+        buf.extend_from_slice(std::slice::from_raw_parts(
+            iov.buf as *const u8,
+            iov.buf_len,
+        ));
+    }
+    let host_nwritten = hostcalls_impl::fd_pwrite(fd, &buf, offset)?;
+
+    trace!("     | *nwritten={:?}", host_nwritten);
+
+    enc_usize_byref(memory, nwritten, host_nwritten)
+}
+
+pub(crate) unsafe fn fd_read(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    iovs_ptr: wasi32::uintptr_t,
+    iovs_len: wasi32::size_t,
+    nread: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_read(fd={:?}, iovs_ptr={:#x?}, iovs_len={:?}, nread={:#x?})",
+        fd,
+        iovs_ptr,
+        iovs_len,
+        nread
+    );
+
+    let mut iovs = dec_iovec_slice(memory, iovs_ptr, iovs_len)?;
+    let mut iovs: Vec<io::IoSliceMut> = iovs
+        .iter_mut()
+        .map(|vec| host::iovec_to_host_mut(vec))
+        .collect();
+
+    let maybe_host_nread = match wasi_ctx
+        .get_fd_entry_mut(fd)?
+        .as_descriptor_mut(wasi::__WASI_RIGHTS_FD_READ, 0)?
+    {
+        Descriptor::OsHandle(file) => file.read_vectored(&mut iovs),
+        Descriptor::Stdin => io::stdin().read_vectored(&mut iovs),
+        _ => return Err(Error::EBADF),
+    };
+
+    let host_nread = maybe_host_nread?;
+
+    trace!("     | *nread={:?}", host_nread);
+
+    enc_usize_byref(memory, nread, host_nread)
+}
+
+pub(crate) unsafe fn fd_renumber(
+    wasi_ctx: &mut WasiCtx,
+    _mem: &mut [u8],
+    from: wasi::__wasi_fd_t,
+    to: wasi::__wasi_fd_t,
+) -> Result<()> {
+    trace!("fd_renumber(from={:?}, to={:?})", from, to);
+
+    if !wasi_ctx.contains_fd_entry(from) {
+        return Err(Error::EBADF);
+    }
+
+    // Don't allow renumbering over a pre-opened resource.
+    // TODO: Eventually, we do want to permit this, once libpreopen in
+    // userspace is capable of removing entries from its tables as well.
+    let from_fe = wasi_ctx.get_fd_entry(from)?;
+    if from_fe.preopen_path.is_some() {
+        return Err(Error::ENOTSUP);
+    }
+    if let Ok(to_fe) = wasi_ctx.get_fd_entry(to) {
+        if to_fe.preopen_path.is_some() {
+            return Err(Error::ENOTSUP);
+        }
+    }
+
+    let fe = wasi_ctx.remove_fd_entry(from)?;
+    wasi_ctx.insert_fd_entry_at(to, fe);
+
+    Ok(())
+}
+
+pub(crate) unsafe fn fd_seek(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    offset: wasi::__wasi_filedelta_t,
+    whence: wasi::__wasi_whence_t,
+    newoffset: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_seek(fd={:?}, offset={:?}, whence={}, newoffset={:#x?})",
+        fd,
+        offset,
+        wasi::whence_to_str(whence),
+        newoffset
+    );
+
+    let rights = if offset == 0 && whence == wasi::__WASI_WHENCE_CUR {
+        wasi::__WASI_RIGHTS_FD_TELL
+    } else {
+        wasi::__WASI_RIGHTS_FD_SEEK | wasi::__WASI_RIGHTS_FD_TELL
+    };
+    let fd = wasi_ctx
+        .get_fd_entry_mut(fd)?
+        .as_descriptor_mut(rights, 0)?
+        .as_file_mut()?;
+
+    let pos = match whence {
+        wasi::__WASI_WHENCE_CUR => SeekFrom::Current(offset),
+        wasi::__WASI_WHENCE_END => SeekFrom::End(offset),
+        wasi::__WASI_WHENCE_SET => SeekFrom::Start(offset as u64),
+        _ => return Err(Error::EINVAL),
+    };
+    let host_newoffset = fd.seek(pos)?;
+
+    trace!("     | *newoffset={:?}", host_newoffset);
+
+    enc_filesize_byref(memory, newoffset, host_newoffset)
+}
+
+pub(crate) unsafe fn fd_tell(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    newoffset: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!("fd_tell(fd={:?}, newoffset={:#x?})", fd, newoffset);
+
+    let fd = wasi_ctx
+        .get_fd_entry_mut(fd)?
+        .as_descriptor_mut(wasi::__WASI_RIGHTS_FD_TELL, 0)?
+        .as_file_mut()?;
+
+    let host_offset = fd.seek(SeekFrom::Current(0))?;
+
+    trace!("     | *newoffset={:?}", host_offset);
+
+    enc_filesize_byref(memory, newoffset, host_offset)
+}
+
+pub(crate) unsafe fn fd_fdstat_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    fdstat_ptr: wasi32::uintptr_t, // *mut wasi::__wasi_fdstat_t
+) -> Result<()> {
+    trace!("fd_fdstat_get(fd={:?}, fdstat_ptr={:#x?})", fd, fdstat_ptr);
+
+    let mut fdstat = dec_fdstat_byref(memory, fdstat_ptr)?;
+    let host_fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(0, 0)?
+        .as_os_handle();
+
+    let fs_flags = hostcalls_impl::fd_fdstat_get(&host_fd)?;
+
+    let fe = wasi_ctx.get_fd_entry(fd)?;
+    fdstat.fs_filetype = fe.file_type;
+    fdstat.fs_rights_base = fe.rights_base;
+    fdstat.fs_rights_inheriting = fe.rights_inheriting;
+    fdstat.fs_flags = fs_flags;
+
+    trace!("     | *buf={:?}", fdstat);
+
+    enc_fdstat_byref(memory, fdstat_ptr, fdstat)
+}
+
+pub(crate) unsafe fn fd_fdstat_set_flags(
+    wasi_ctx: &WasiCtx,
+    _mem: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    fdflags: wasi::__wasi_fdflags_t,
+) -> Result<()> {
+    trace!("fd_fdstat_set_flags(fd={:?}, fdflags={:#x?})", fd, fdflags);
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(0, 0)?
+        .as_os_handle();
+
+    hostcalls_impl::fd_fdstat_set_flags(&fd, fdflags)
+}
+
+pub(crate) unsafe fn fd_fdstat_set_rights(
+    wasi_ctx: &mut WasiCtx,
+    _mem: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    fs_rights_base: wasi::__wasi_rights_t,
+    fs_rights_inheriting: wasi::__wasi_rights_t,
+) -> Result<()> {
+    trace!(
+        "fd_fdstat_set_rights(fd={:?}, fs_rights_base={:#x?}, fs_rights_inheriting={:#x?})",
+        fd,
+        fs_rights_base,
+        fs_rights_inheriting
+    );
+
+    let fe = wasi_ctx.get_fd_entry_mut(fd)?;
+    if fe.rights_base & fs_rights_base != fs_rights_base
+        || fe.rights_inheriting & fs_rights_inheriting != fs_rights_inheriting
+    {
+        return Err(Error::ENOTCAPABLE);
+    }
+    fe.rights_base = fs_rights_base;
+    fe.rights_inheriting = fs_rights_inheriting;
+
+    Ok(())
+}
+
+pub(crate) unsafe fn fd_sync(
+    wasi_ctx: &WasiCtx,
+    _mem: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+) -> Result<()> {
+    trace!("fd_sync(fd={:?})", fd);
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_SYNC, 0)?
+        .as_file()?;
+    fd.sync_all().map_err(Into::into)
+}
+
+pub(crate) unsafe fn fd_write(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    iovs_ptr: wasi32::uintptr_t,
+    iovs_len: wasi32::size_t,
+    nwritten: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_write(fd={:?}, iovs_ptr={:#x?}, iovs_len={:?}, nwritten={:#x?})",
+        fd,
+        iovs_ptr,
+        iovs_len,
+        nwritten
+    );
+
+    let iovs = dec_ciovec_slice(memory, iovs_ptr, iovs_len)?;
+    let iovs: Vec<io::IoSlice> = iovs.iter().map(|vec| host::ciovec_to_host(vec)).collect();
+
+    // perform unbuffered writes
+    let entry = wasi_ctx.get_fd_entry_mut(fd)?;
+    let isatty = entry.isatty();
+    let desc = entry.as_descriptor_mut(wasi::__WASI_RIGHTS_FD_WRITE, 0)?;
+    let host_nwritten = match desc {
+        Descriptor::OsHandle(file) => {
+            if isatty {
+                SandboxedTTYWriter::new(file.deref_mut()).write_vectored(&iovs)?
+            } else {
+                file.write_vectored(&iovs)?
+            }
+        }
+        Descriptor::Stdin => return Err(Error::EBADF),
+        Descriptor::Stdout => {
+            // lock for the duration of the scope
+            let stdout = io::stdout();
+            let mut stdout = stdout.lock();
+            let nwritten = if isatty {
+                SandboxedTTYWriter::new(&mut stdout).write_vectored(&iovs)?
+            } else {
+                stdout.write_vectored(&iovs)?
+            };
+            stdout.flush()?;
+            nwritten
+        }
+        // Always sanitize stderr, even if it's not directly connected to a tty,
+        // because stderr is meant for diagnostics rather than binary output,
+        // and may be redirected to a file which could end up being displayed
+        // on a tty later.
+        Descriptor::Stderr => SandboxedTTYWriter::new(&mut io::stderr()).write_vectored(&iovs)?,
+    };
+
+    trace!("     | *nwritten={:?}", host_nwritten);
+
+    enc_usize_byref(memory, nwritten, host_nwritten)
+}
+
+pub(crate) unsafe fn fd_advise(
+    wasi_ctx: &WasiCtx,
+    _mem: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    offset: wasi::__wasi_filesize_t,
+    len: wasi::__wasi_filesize_t,
+    advice: wasi::__wasi_advice_t,
+) -> Result<()> {
+    trace!(
+        "fd_advise(fd={:?}, offset={}, len={}, advice={:?})",
+        fd,
+        offset,
+        len,
+        advice
+    );
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_ADVISE, 0)?
+        .as_file()?;
+
+    hostcalls_impl::fd_advise(fd, advice, offset, len)
+}
+
+pub(crate) unsafe fn fd_allocate(
+    wasi_ctx: &WasiCtx,
+    _mem: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    offset: wasi::__wasi_filesize_t,
+    len: wasi::__wasi_filesize_t,
+) -> Result<()> {
+    trace!("fd_allocate(fd={:?}, offset={}, len={})", fd, offset, len);
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_ALLOCATE, 0)?
+        .as_file()?;
+
+    let metadata = fd.metadata()?;
+
+    let current_size = metadata.len();
+    let wanted_size = offset.checked_add(len).ok_or(Error::E2BIG)?;
+    // This check will be unnecessary when rust-lang/rust#63326 is fixed
+    if wanted_size > i64::max_value() as u64 {
+        return Err(Error::E2BIG);
+    }
+
+    if wanted_size > current_size {
+        fd.set_len(wanted_size).map_err(Into::into)
+    } else {
+        Ok(())
+    }
+}
+
+pub(crate) unsafe fn path_create_directory(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_create_directory(dirfd={:?}, path_ptr={:#x?}, path_len={})",
+        dirfd,
+        path_ptr,
+        path_len,
+    );
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(helpers::path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let rights = wasi::__WASI_RIGHTS_PATH_OPEN | wasi::__WASI_RIGHTS_PATH_CREATE_DIRECTORY;
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(fe, rights, 0, 0, path, false)?;
+
+    hostcalls_impl::path_create_directory(resolved)
+}
+
+pub(crate) unsafe fn path_link(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    old_dirfd: wasi::__wasi_fd_t,
+    old_flags: wasi::__wasi_lookupflags_t,
+    old_path_ptr: wasi32::uintptr_t,
+    old_path_len: wasi32::size_t,
+    new_dirfd: wasi::__wasi_fd_t,
+    new_path_ptr: wasi32::uintptr_t,
+    new_path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_link(old_dirfd={:?}, old_flags={:?}, old_path_ptr={:#x?}, old_path_len={}, new_dirfd={:?}, new_path_ptr={:#x?}, new_path_len={})",
+        old_dirfd,
+        old_flags,
+        old_path_ptr,
+        old_path_len,
+        new_dirfd,
+        new_path_ptr,
+        new_path_len,
+    );
+
+    let old_path = dec_slice_of_u8(memory, old_path_ptr, old_path_len).and_then(path_from_slice)?;
+    let new_path = dec_slice_of_u8(memory, new_path_ptr, new_path_len).and_then(path_from_slice)?;
+
+    trace!("     | (old_path_ptr,old_path_len)='{}'", old_path);
+    trace!("     | (new_path_ptr,new_path_len)='{}'", new_path);
+
+    let old_fe = wasi_ctx.get_fd_entry(old_dirfd)?;
+    let new_fe = wasi_ctx.get_fd_entry(new_dirfd)?;
+    let resolved_old = path_get(
+        old_fe,
+        wasi::__WASI_RIGHTS_PATH_LINK_SOURCE,
+        0,
+        0,
+        old_path,
+        false,
+    )?;
+    let resolved_new = path_get(
+        new_fe,
+        wasi::__WASI_RIGHTS_PATH_LINK_TARGET,
+        0,
+        0,
+        new_path,
+        false,
+    )?;
+
+    hostcalls_impl::path_link(resolved_old, resolved_new)
+}
+
+pub(crate) unsafe fn path_open(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    dirflags: wasi::__wasi_lookupflags_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+    oflags: wasi::__wasi_oflags_t,
+    fs_rights_base: wasi::__wasi_rights_t,
+    fs_rights_inheriting: wasi::__wasi_rights_t,
+    fs_flags: wasi::__wasi_fdflags_t,
+    fd_out_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "path_open(dirfd={:?}, dirflags={:?}, path_ptr={:#x?}, path_len={:?}, oflags={:#x?}, fs_rights_base={:#x?}, fs_rights_inheriting={:#x?}, fs_flags={:#x?}, fd_out_ptr={:#x?})",
+        dirfd,
+        dirflags,
+        path_ptr,
+        path_len,
+        oflags,
+        fs_rights_base,
+        fs_rights_inheriting,
+        fs_flags,
+        fd_out_ptr
+    );
+
+    // pre-encode fd_out_ptr to -1 in case of error in opening a path
+    enc_fd_byref(memory, fd_out_ptr, wasi::__wasi_fd_t::max_value())?;
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let (needed_base, needed_inheriting) =
+        path_open_rights(fs_rights_base, fs_rights_inheriting, oflags, fs_flags);
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(
+        fe,
+        needed_base,
+        needed_inheriting,
+        dirflags,
+        path,
+        oflags & wasi::__WASI_OFLAGS_CREAT != 0,
+    )?;
+
+    // which open mode do we need?
+    let read = fs_rights_base & (wasi::__WASI_RIGHTS_FD_READ | wasi::__WASI_RIGHTS_FD_READDIR) != 0;
+    let write = fs_rights_base
+        & (wasi::__WASI_RIGHTS_FD_DATASYNC
+            | wasi::__WASI_RIGHTS_FD_WRITE
+            | wasi::__WASI_RIGHTS_FD_ALLOCATE
+            | wasi::__WASI_RIGHTS_FD_FILESTAT_SET_SIZE)
+        != 0;
+
+    let fd = hostcalls_impl::path_open(resolved, read, write, oflags, fs_flags)?;
+
+    // Determine the type of the new file descriptor and which rights contradict with this type
+    let (_ty, max_base, max_inheriting) = determine_type_rights(&fd)?;
+    let mut fe = FdEntry::from(fd)?;
+    fe.rights_base &= max_base;
+    fe.rights_inheriting &= max_inheriting;
+    let guest_fd = wasi_ctx.insert_fd_entry(fe)?;
+
+    trace!("     | *fd={:?}", guest_fd);
+
+    enc_fd_byref(memory, fd_out_ptr, guest_fd)
+}
+
+pub(crate) unsafe fn path_readlink(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+    buf_ptr: wasi32::uintptr_t,
+    buf_len: wasi32::size_t,
+    buf_used: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "path_readlink(dirfd={:?}, path_ptr={:#x?}, path_len={:?}, buf_ptr={:#x?}, buf_len={}, buf_used={:#x?})",
+        dirfd,
+        path_ptr,
+        path_len,
+        buf_ptr,
+        buf_len,
+        buf_used,
+    );
+
+    enc_usize_byref(memory, buf_used, 0)?;
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(helpers::path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", &path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(fe, wasi::__WASI_RIGHTS_PATH_READLINK, 0, 0, &path, false)?;
+
+    let mut buf = dec_slice_of_mut_u8(memory, buf_ptr, buf_len)?;
+
+    let host_bufused = hostcalls_impl::path_readlink(resolved, &mut buf)?;
+
+    trace!("     | (buf_ptr,*buf_used)={:?}", buf);
+    trace!("     | *buf_used={:?}", host_bufused);
+
+    enc_usize_byref(memory, buf_used, host_bufused)
+}
+
+pub(crate) unsafe fn path_rename(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    old_dirfd: wasi::__wasi_fd_t,
+    old_path_ptr: wasi32::uintptr_t,
+    old_path_len: wasi32::size_t,
+    new_dirfd: wasi::__wasi_fd_t,
+    new_path_ptr: wasi32::uintptr_t,
+    new_path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_rename(old_dirfd={:?}, old_path_ptr={:#x?}, old_path_len={:?}, new_dirfd={:?}, new_path_ptr={:#x?}, new_path_len={:?})",
+        old_dirfd,
+        old_path_ptr,
+        old_path_len,
+        new_dirfd,
+        new_path_ptr,
+        new_path_len,
+    );
+
+    let old_path = dec_slice_of_u8(memory, old_path_ptr, old_path_len).and_then(path_from_slice)?;
+    let new_path = dec_slice_of_u8(memory, new_path_ptr, new_path_len).and_then(path_from_slice)?;
+
+    trace!("     | (old_path_ptr,old_path_len)='{}'", old_path);
+    trace!("     | (new_path_ptr,new_path_len)='{}'", new_path);
+
+    let old_fe = wasi_ctx.get_fd_entry(old_dirfd)?;
+    let new_fe = wasi_ctx.get_fd_entry(new_dirfd)?;
+    let resolved_old = path_get(
+        old_fe,
+        wasi::__WASI_RIGHTS_PATH_RENAME_SOURCE,
+        0,
+        0,
+        old_path,
+        true,
+    )?;
+    let resolved_new = path_get(
+        new_fe,
+        wasi::__WASI_RIGHTS_PATH_RENAME_TARGET,
+        0,
+        0,
+        new_path,
+        true,
+    )?;
+
+    log::debug!("path_rename resolved_old={:?}", resolved_old);
+    log::debug!("path_rename resolved_new={:?}", resolved_new);
+
+    hostcalls_impl::path_rename(resolved_old, resolved_new)
+}
+
+pub(crate) unsafe fn fd_filestat_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    filestat_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_filestat_get(fd={:?}, filestat_ptr={:#x?})",
+        fd,
+        filestat_ptr
+    );
+
+    let fd = wasi_ctx.get_fd_entry(fd)?.as_descriptor(0, 0)?.as_file()?;
+    let host_filestat = hostcalls_impl::fd_filestat_get(fd)?;
+
+    trace!("     | *filestat_ptr={:?}", host_filestat);
+
+    enc_filestat_byref(memory, filestat_ptr, host_filestat)
+}
+
+pub(crate) unsafe fn fd_filestat_set_times(
+    wasi_ctx: &WasiCtx,
+    _mem: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    st_atim: wasi::__wasi_timestamp_t,
+    st_mtim: wasi::__wasi_timestamp_t,
+    fst_flags: wasi::__wasi_fstflags_t,
+) -> Result<()> {
+    trace!(
+        "fd_filestat_set_times(fd={:?}, st_atim={}, st_mtim={}, fst_flags={:#x?})",
+        fd,
+        st_atim,
+        st_mtim,
+        fst_flags
+    );
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_FILESTAT_SET_TIMES, 0)?
+        .as_file()?;
+
+    fd_filestat_set_times_impl(fd, st_atim, st_mtim, fst_flags)
+}
+
+pub(crate) fn fd_filestat_set_times_impl(
+    fd: &File,
+    st_atim: wasi::__wasi_timestamp_t,
+    st_mtim: wasi::__wasi_timestamp_t,
+    fst_flags: wasi::__wasi_fstflags_t,
+) -> Result<()> {
+    let set_atim = fst_flags & wasi::__WASI_FSTFLAGS_ATIM != 0;
+    let set_atim_now = fst_flags & wasi::__WASI_FSTFLAGS_ATIM_NOW != 0;
+    let set_mtim = fst_flags & wasi::__WASI_FSTFLAGS_MTIM != 0;
+    let set_mtim_now = fst_flags & wasi::__WASI_FSTFLAGS_MTIM_NOW != 0;
+
+    if (set_atim && set_atim_now) || (set_mtim && set_mtim_now) {
+        return Err(Error::EINVAL);
+    }
+    let atim = if set_atim {
+        let time = UNIX_EPOCH + Duration::from_nanos(st_atim);
+        Some(FileTime::from_system_time(time))
+    } else if set_atim_now {
+        let time = SystemTime::now();
+        Some(FileTime::from_system_time(time))
+    } else {
+        None
+    };
+
+    let mtim = if set_mtim {
+        let time = UNIX_EPOCH + Duration::from_nanos(st_mtim);
+        Some(FileTime::from_system_time(time))
+    } else if set_mtim_now {
+        let time = SystemTime::now();
+        Some(FileTime::from_system_time(time))
+    } else {
+        None
+    };
+    set_file_handle_times(fd, atim, mtim).map_err(Into::into)
+}
+
+pub(crate) unsafe fn fd_filestat_set_size(
+    wasi_ctx: &WasiCtx,
+    _mem: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    st_size: wasi::__wasi_filesize_t,
+) -> Result<()> {
+    trace!("fd_filestat_set_size(fd={:?}, st_size={})", fd, st_size);
+
+    let fd = wasi_ctx
+        .get_fd_entry(fd)?
+        .as_descriptor(wasi::__WASI_RIGHTS_FD_FILESTAT_SET_SIZE, 0)?
+        .as_file()?;
+
+    // This check will be unnecessary when rust-lang/rust#63326 is fixed
+    if st_size > i64::max_value() as u64 {
+        return Err(Error::E2BIG);
+    }
+    fd.set_len(st_size).map_err(Into::into)
+}
+
+pub(crate) unsafe fn path_filestat_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    dirflags: wasi::__wasi_lookupflags_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+    filestat_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "path_filestat_get(dirfd={:?}, dirflags={:?}, path_ptr={:#x?}, path_len={}, filestat_ptr={:#x?})",
+        dirfd,
+        dirflags,
+        path_ptr,
+        path_len,
+        filestat_ptr
+    );
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(
+        fe,
+        wasi::__WASI_RIGHTS_PATH_FILESTAT_GET,
+        0,
+        dirflags,
+        path,
+        false,
+    )?;
+    let host_filestat = hostcalls_impl::path_filestat_get(resolved, dirflags)?;
+
+    trace!("     | *filestat_ptr={:?}", host_filestat);
+
+    enc_filestat_byref(memory, filestat_ptr, host_filestat)
+}
+
+pub(crate) unsafe fn path_filestat_set_times(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    dirflags: wasi::__wasi_lookupflags_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+    st_atim: wasi::__wasi_timestamp_t,
+    st_mtim: wasi::__wasi_timestamp_t,
+    fst_flags: wasi::__wasi_fstflags_t,
+) -> Result<()> {
+    trace!(
+        "path_filestat_set_times(dirfd={:?}, dirflags={:?}, path_ptr={:#x?}, path_len={}, st_atim={}, st_mtim={}, fst_flags={:#x?})",
+        dirfd,
+        dirflags,
+        path_ptr,
+        path_len,
+        st_atim, st_mtim,
+        fst_flags
+    );
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(
+        fe,
+        wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES,
+        0,
+        dirflags,
+        path,
+        false,
+    )?;
+
+    hostcalls_impl::path_filestat_set_times(resolved, dirflags, st_atim, st_mtim, fst_flags)
+}
+
+pub(crate) unsafe fn path_symlink(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    old_path_ptr: wasi32::uintptr_t,
+    old_path_len: wasi32::size_t,
+    dirfd: wasi::__wasi_fd_t,
+    new_path_ptr: wasi32::uintptr_t,
+    new_path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_symlink(old_path_ptr={:#x?}, old_path_len={}, dirfd={:?}, new_path_ptr={:#x?}, new_path_len={})",
+        old_path_ptr,
+        old_path_len,
+        dirfd,
+        new_path_ptr,
+        new_path_len
+    );
+
+    let old_path = dec_slice_of_u8(memory, old_path_ptr, old_path_len).and_then(path_from_slice)?;
+    let new_path = dec_slice_of_u8(memory, new_path_ptr, new_path_len).and_then(path_from_slice)?;
+
+    trace!("     | (old_path_ptr,old_path_len)='{}'", old_path);
+    trace!("     | (new_path_ptr,new_path_len)='{}'", new_path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved_new = path_get(fe, wasi::__WASI_RIGHTS_PATH_SYMLINK, 0, 0, new_path, true)?;
+
+    hostcalls_impl::path_symlink(old_path, resolved_new)
+}
+
+pub(crate) unsafe fn path_unlink_file(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_unlink_file(dirfd={:?}, path_ptr={:#x?}, path_len={})",
+        dirfd,
+        path_ptr,
+        path_len
+    );
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(fe, wasi::__WASI_RIGHTS_PATH_UNLINK_FILE, 0, 0, path, false)?;
+
+    hostcalls_impl::path_unlink_file(resolved)
+}
+
+pub(crate) unsafe fn path_remove_directory(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    dirfd: wasi::__wasi_fd_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "path_remove_directory(dirfd={:?}, path_ptr={:#x?}, path_len={})",
+        dirfd,
+        path_ptr,
+        path_len
+    );
+
+    let path = dec_slice_of_u8(memory, path_ptr, path_len).and_then(path_from_slice)?;
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    let fe = wasi_ctx.get_fd_entry(dirfd)?;
+    let resolved = path_get(
+        fe,
+        wasi::__WASI_RIGHTS_PATH_REMOVE_DIRECTORY,
+        0,
+        0,
+        path,
+        true,
+    )?;
+
+    log::debug!("path_remove_directory resolved={:?}", resolved);
+
+    hostcalls_impl::path_remove_directory(resolved)
+}
+
+pub(crate) unsafe fn fd_prestat_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    prestat_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_prestat_get(fd={:?}, prestat_ptr={:#x?})",
+        fd,
+        prestat_ptr
+    );
+
+    // TODO: should we validate any rights here?
+    let fe = wasi_ctx.get_fd_entry(fd)?;
+    let po_path = fe.preopen_path.as_ref().ok_or(Error::ENOTSUP)?;
+    if fe.file_type != wasi::__WASI_FILETYPE_DIRECTORY {
+        return Err(Error::ENOTDIR);
+    }
+
+    let path = host_impl::path_from_host(po_path.as_os_str())?;
+
+    enc_prestat_byref(
+        memory,
+        prestat_ptr,
+        host::__wasi_prestat_t {
+            pr_type: wasi::__WASI_PREOPENTYPE_DIR,
+            u: host::__wasi_prestat_u_t {
+                dir: host::__wasi_prestat_dir_t {
+                    pr_name_len: path.len(),
+                },
+            },
+        },
+    )
+}
+
+pub(crate) unsafe fn fd_prestat_dir_name(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    path_ptr: wasi32::uintptr_t,
+    path_len: wasi32::size_t,
+) -> Result<()> {
+    trace!(
+        "fd_prestat_dir_name(fd={:?}, path_ptr={:#x?}, path_len={})",
+        fd,
+        path_ptr,
+        path_len
+    );
+
+    // TODO: should we validate any rights here?
+    let fe = wasi_ctx.get_fd_entry(fd)?;
+    let po_path = fe.preopen_path.as_ref().ok_or(Error::ENOTSUP)?;
+    if fe.file_type != wasi::__WASI_FILETYPE_DIRECTORY {
+        return Err(Error::ENOTDIR);
+    }
+
+    let path = host_impl::path_from_host(po_path.as_os_str())?;
+
+    if path.len() > dec_usize(path_len) {
+        return Err(Error::ENAMETOOLONG);
+    }
+
+    trace!("     | (path_ptr,path_len)='{}'", path);
+
+    enc_slice_of_u8(memory, path.as_bytes(), path_ptr)
+}
+
+pub(crate) unsafe fn fd_readdir(
+    wasi_ctx: &mut WasiCtx,
+    memory: &mut [u8],
+    fd: wasi::__wasi_fd_t,
+    buf: wasi32::uintptr_t,
+    buf_len: wasi32::size_t,
+    cookie: wasi::__wasi_dircookie_t,
+    buf_used: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "fd_readdir(fd={:?}, buf={:#x?}, buf_len={}, cookie={:#x?}, buf_used={:#x?})",
+        fd,
+        buf,
+        buf_len,
+        cookie,
+        buf_used,
+    );
+
+    enc_usize_byref(memory, buf_used, 0)?;
+
+    let file = wasi_ctx
+        .get_fd_entry_mut(fd)?
+        .as_descriptor_mut(wasi::__WASI_RIGHTS_FD_READDIR, 0)?
+        .as_file_mut()?;
+    let mut host_buf = dec_slice_of_mut_u8(memory, buf, buf_len)?;
+
+    trace!("     | (buf,buf_len)={:?}", host_buf);
+
+    let iter = hostcalls_impl::fd_readdir(file, cookie)?;
+    let mut host_bufused = 0;
+    for dirent in iter {
+        let dirent_raw = dirent?.to_wasi_raw()?;
+        let offset = dirent_raw.len();
+        if host_buf.len() < offset {
+            break;
+        } else {
+            host_buf[0..offset].copy_from_slice(&dirent_raw);
+            host_bufused += offset;
+            host_buf = &mut host_buf[offset..];
+        }
+    }
+
+    trace!("     | *buf_used={:?}", host_bufused);
+
+    enc_usize_byref(memory, buf_used, host_bufused)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/hostcalls_impl/fs_helpers.rs.html b/api/src/wasi_common/old/snapshot_0/hostcalls_impl/fs_helpers.rs.html new file mode 100644 index 000000000000..9f4d1f59f407 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/hostcalls_impl/fs_helpers.rs.html @@ -0,0 +1,429 @@ +fs_helpers.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+
+#![allow(non_camel_case_types)]
+use crate::old::snapshot_0::sys::host_impl;
+use crate::old::snapshot_0::sys::hostcalls_impl::fs_helpers::*;
+use crate::old::snapshot_0::{error::WasiError, fdentry::FdEntry, wasi, Error, Result};
+use std::fs::File;
+use std::path::{Component, Path};
+
+#[derive(Debug)]
+pub(crate) struct PathGet {
+    dirfd: File,
+    path: String,
+}
+
+impl PathGet {
+    pub(crate) fn dirfd(&self) -> &File {
+        &self.dirfd
+    }
+
+    pub(crate) fn path(&self) -> &str {
+        &self.path
+    }
+}
+
+/// Normalizes a path to ensure that the target path is located under the directory provided.
+///
+/// This is a workaround for not having Capsicum support in the OS.
+pub(crate) fn path_get(
+    fe: &FdEntry,
+    rights_base: wasi::__wasi_rights_t,
+    rights_inheriting: wasi::__wasi_rights_t,
+    dirflags: wasi::__wasi_lookupflags_t,
+    path: &str,
+    needs_final_component: bool,
+) -> Result<PathGet> {
+    const MAX_SYMLINK_EXPANSIONS: usize = 128;
+
+    if path.contains('\0') {
+        // if contains NUL, return EILSEQ
+        return Err(Error::EILSEQ);
+    }
+
+    if fe.file_type != wasi::__WASI_FILETYPE_DIRECTORY {
+        // if `dirfd` doesn't refer to a directory, return `ENOTDIR`.
+        return Err(Error::ENOTDIR);
+    }
+
+    let dirfd = fe
+        .as_descriptor(rights_base, rights_inheriting)?
+        .as_file()?
+        .try_clone()?;
+
+    // Stack of directory file descriptors. Index 0 always corresponds with the directory provided
+    // to this function. Entering a directory causes a file descriptor to be pushed, while handling
+    // ".." entries causes an entry to be popped. Index 0 cannot be popped, as this would imply
+    // escaping the base directory.
+    let mut dir_stack = vec![dirfd];
+
+    // Stack of paths left to process. This is initially the `path` argument to this function, but
+    // any symlinks we encounter are processed by pushing them on the stack.
+    let mut path_stack = vec![path.to_owned()];
+
+    // Track the number of symlinks we've expanded, so we can return `ELOOP` after too many.
+    let mut symlink_expansions = 0;
+
+    // TODO: rewrite this using a custom posix path type, with a component iterator that respects
+    // trailing slashes. This version does way too much allocation, and is way too fiddly.
+    loop {
+        match path_stack.pop() {
+            Some(cur_path) => {
+                log::debug!("path_get cur_path = {:?}", cur_path);
+
+                let ends_with_slash = cur_path.ends_with('/');
+                let mut components = Path::new(&cur_path).components();
+                let head = match components.next() {
+                    None => return Err(Error::ENOENT),
+                    Some(p) => p,
+                };
+                let tail = components.as_path();
+
+                if tail.components().next().is_some() {
+                    let mut tail = host_impl::path_from_host(tail.as_os_str())?;
+                    if ends_with_slash {
+                        tail.push('/');
+                    }
+                    path_stack.push(tail);
+                }
+
+                log::debug!("path_get path_stack = {:?}", path_stack);
+
+                match head {
+                    Component::Prefix(_) | Component::RootDir => {
+                        // path is absolute!
+                        return Err(Error::ENOTCAPABLE);
+                    }
+                    Component::CurDir => {
+                        // "." so skip
+                    }
+                    Component::ParentDir => {
+                        // ".." so pop a dir
+                        let _ = dir_stack.pop().ok_or(Error::ENOTCAPABLE)?;
+
+                        // we're not allowed to pop past the original directory
+                        if dir_stack.is_empty() {
+                            return Err(Error::ENOTCAPABLE);
+                        }
+                    }
+                    Component::Normal(head) => {
+                        let mut head = host_impl::path_from_host(head)?;
+                        if ends_with_slash {
+                            // preserve trailing slash
+                            head.push('/');
+                        }
+
+                        if !path_stack.is_empty() || (ends_with_slash && !needs_final_component) {
+                            match openat(dir_stack.last().ok_or(Error::ENOTCAPABLE)?, &head) {
+                                Ok(new_dir) => {
+                                    dir_stack.push(new_dir);
+                                }
+                                Err(e) => {
+                                    match e.as_wasi_error() {
+                                        WasiError::ELOOP
+                                        | WasiError::EMLINK
+                                        | WasiError::ENOTDIR =>
+                                        // Check to see if it was a symlink. Linux indicates
+                                        // this with ENOTDIR because of the O_DIRECTORY flag.
+                                        {
+                                            // attempt symlink expansion
+                                            let mut link_path = readlinkat(
+                                                dir_stack.last().ok_or(Error::ENOTCAPABLE)?,
+                                                &head,
+                                            )?;
+
+                                            symlink_expansions += 1;
+                                            if symlink_expansions > MAX_SYMLINK_EXPANSIONS {
+                                                return Err(Error::ELOOP);
+                                            }
+
+                                            if head.ends_with('/') {
+                                                link_path.push('/');
+                                            }
+
+                                            log::debug!(
+                                                "attempted symlink expansion link_path={:?}",
+                                                link_path
+                                            );
+
+                                            path_stack.push(link_path);
+                                        }
+                                        _ => {
+                                            return Err(e);
+                                        }
+                                    }
+                                }
+                            }
+
+                            continue;
+                        } else if ends_with_slash
+                            || (dirflags & wasi::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW) != 0
+                        {
+                            // if there's a trailing slash, or if `LOOKUP_SYMLINK_FOLLOW` is set, attempt
+                            // symlink expansion
+                            match readlinkat(dir_stack.last().ok_or(Error::ENOTCAPABLE)?, &head) {
+                                Ok(mut link_path) => {
+                                    symlink_expansions += 1;
+                                    if symlink_expansions > MAX_SYMLINK_EXPANSIONS {
+                                        return Err(Error::ELOOP);
+                                    }
+
+                                    if head.ends_with('/') {
+                                        link_path.push('/');
+                                    }
+
+                                    log::debug!(
+                                        "attempted symlink expansion link_path={:?}",
+                                        link_path
+                                    );
+
+                                    path_stack.push(link_path);
+                                    continue;
+                                }
+                                Err(e) => {
+                                    if e.as_wasi_error() != WasiError::EINVAL
+                                        && e.as_wasi_error() != WasiError::ENOENT
+                                        // this handles the cases when trying to link to
+                                        // a destination that already exists, and the target
+                                        // path contains a slash
+                                        && e.as_wasi_error() != WasiError::ENOTDIR
+                                    {
+                                        return Err(e);
+                                    }
+                                }
+                            }
+                        }
+
+                        // not a symlink, so we're done;
+                        return Ok(PathGet {
+                            dirfd: dir_stack.pop().ok_or(Error::ENOTCAPABLE)?,
+                            path: head,
+                        });
+                    }
+                }
+            }
+            None => {
+                // no further components to process. means we've hit a case like "." or "a/..", or if the
+                // input path has trailing slashes and `needs_final_component` is not set
+                return Ok(PathGet {
+                    dirfd: dir_stack.pop().ok_or(Error::ENOTCAPABLE)?,
+                    path: String::from("."),
+                });
+            }
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/hostcalls_impl/misc.rs.html b/api/src/wasi_common/old/snapshot_0/hostcalls_impl/misc.rs.html new file mode 100644 index 000000000000..64fc83d67c0a --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/hostcalls_impl/misc.rs.html @@ -0,0 +1,671 @@ +misc.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+
+#![allow(non_camel_case_types)]
+use crate::old::snapshot_0::ctx::WasiCtx;
+use crate::old::snapshot_0::fdentry::Descriptor;
+use crate::old::snapshot_0::memory::*;
+use crate::old::snapshot_0::sys::hostcalls_impl;
+use crate::old::snapshot_0::{wasi, wasi32, Error, Result};
+use log::{error, trace};
+use std::convert::TryFrom;
+
+pub(crate) fn args_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    argv_ptr: wasi32::uintptr_t,
+    argv_buf: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "args_get(argv_ptr={:#x?}, argv_buf={:#x?})",
+        argv_ptr,
+        argv_buf,
+    );
+
+    let mut argv_buf_offset = 0;
+    let mut argv = vec![];
+
+    for arg in &wasi_ctx.args {
+        let arg_bytes = arg.as_bytes_with_nul();
+        let arg_ptr = argv_buf + argv_buf_offset;
+
+        enc_slice_of_u8(memory, arg_bytes, arg_ptr)?;
+
+        argv.push(arg_ptr);
+
+        let len = wasi32::uintptr_t::try_from(arg_bytes.len())?;
+        argv_buf_offset = argv_buf_offset.checked_add(len).ok_or(Error::EOVERFLOW)?;
+    }
+
+    enc_slice_of_wasi32_uintptr(memory, argv.as_slice(), argv_ptr)
+}
+
+pub(crate) fn args_sizes_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    argc_ptr: wasi32::uintptr_t,
+    argv_buf_size_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "args_sizes_get(argc_ptr={:#x?}, argv_buf_size_ptr={:#x?})",
+        argc_ptr,
+        argv_buf_size_ptr,
+    );
+
+    let argc = wasi_ctx.args.len();
+    let argv_size = wasi_ctx
+        .args
+        .iter()
+        .map(|arg| arg.as_bytes_with_nul().len())
+        .sum();
+
+    trace!("     | *argc_ptr={:?}", argc);
+
+    enc_usize_byref(memory, argc_ptr, argc)?;
+
+    trace!("     | *argv_buf_size_ptr={:?}", argv_size);
+
+    enc_usize_byref(memory, argv_buf_size_ptr, argv_size)
+}
+
+pub(crate) fn environ_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    environ_ptr: wasi32::uintptr_t,
+    environ_buf: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "environ_get(environ_ptr={:#x?}, environ_buf={:#x?})",
+        environ_ptr,
+        environ_buf,
+    );
+
+    let mut environ_buf_offset = 0;
+    let mut environ = vec![];
+
+    for pair in &wasi_ctx.env {
+        let env_bytes = pair.as_bytes_with_nul();
+        let env_ptr = environ_buf + environ_buf_offset;
+
+        enc_slice_of_u8(memory, env_bytes, env_ptr)?;
+
+        environ.push(env_ptr);
+
+        let len = wasi32::uintptr_t::try_from(env_bytes.len())?;
+        environ_buf_offset = environ_buf_offset
+            .checked_add(len)
+            .ok_or(Error::EOVERFLOW)?;
+    }
+
+    enc_slice_of_wasi32_uintptr(memory, environ.as_slice(), environ_ptr)
+}
+
+pub(crate) fn environ_sizes_get(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    environ_count_ptr: wasi32::uintptr_t,
+    environ_size_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "environ_sizes_get(environ_count_ptr={:#x?}, environ_size_ptr={:#x?})",
+        environ_count_ptr,
+        environ_size_ptr,
+    );
+
+    let environ_count = wasi_ctx.env.len();
+    let environ_size = wasi_ctx
+        .env
+        .iter()
+        .try_fold(0, |acc: u32, pair| {
+            acc.checked_add(pair.as_bytes_with_nul().len() as u32)
+        })
+        .ok_or(Error::EOVERFLOW)?;
+
+    trace!("     | *environ_count_ptr={:?}", environ_count);
+
+    enc_usize_byref(memory, environ_count_ptr, environ_count)?;
+
+    trace!("     | *environ_size_ptr={:?}", environ_size);
+
+    enc_usize_byref(memory, environ_size_ptr, environ_size as usize)
+}
+
+pub(crate) fn random_get(
+    _wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    buf_ptr: wasi32::uintptr_t,
+    buf_len: wasi32::size_t,
+) -> Result<()> {
+    trace!("random_get(buf_ptr={:#x?}, buf_len={:?})", buf_ptr, buf_len);
+
+    let buf = dec_slice_of_mut_u8(memory, buf_ptr, buf_len)?;
+
+    getrandom::getrandom(buf).map_err(|err| {
+        error!("getrandom failure: {:?}", err);
+        Error::EIO
+    })
+}
+
+pub(crate) fn clock_res_get(
+    _wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    clock_id: wasi::__wasi_clockid_t,
+    resolution_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "clock_res_get(clock_id={:?}, resolution_ptr={:#x?})",
+        clock_id,
+        resolution_ptr,
+    );
+
+    let resolution = hostcalls_impl::clock_res_get(clock_id)?;
+
+    trace!("     | *resolution_ptr={:?}", resolution);
+
+    enc_timestamp_byref(memory, resolution_ptr, resolution)
+}
+
+pub(crate) fn clock_time_get(
+    _wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    clock_id: wasi::__wasi_clockid_t,
+    precision: wasi::__wasi_timestamp_t,
+    time_ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "clock_time_get(clock_id={:?}, precision={:?}, time_ptr={:#x?})",
+        clock_id,
+        precision,
+        time_ptr,
+    );
+
+    let time = hostcalls_impl::clock_time_get(clock_id)?;
+
+    trace!("     | *time_ptr={:?}", time);
+
+    enc_timestamp_byref(memory, time_ptr, time)
+}
+
+pub(crate) fn sched_yield(_wasi_ctx: &WasiCtx, _memory: &mut [u8]) -> Result<()> {
+    trace!("sched_yield()");
+
+    std::thread::yield_now();
+
+    Ok(())
+}
+
+pub(crate) fn poll_oneoff(
+    wasi_ctx: &WasiCtx,
+    memory: &mut [u8],
+    input: wasi32::uintptr_t,
+    output: wasi32::uintptr_t,
+    nsubscriptions: wasi32::size_t,
+    nevents: wasi32::uintptr_t,
+) -> Result<()> {
+    trace!(
+        "poll_oneoff(input={:#x?}, output={:#x?}, nsubscriptions={}, nevents={:#x?})",
+        input,
+        output,
+        nsubscriptions,
+        nevents,
+    );
+
+    if u64::from(nsubscriptions) > wasi::__wasi_filesize_t::max_value() {
+        return Err(Error::EINVAL);
+    }
+
+    enc_int_byref(memory, nevents, 0)?;
+
+    let subscriptions = dec_subscriptions(memory, input, nsubscriptions)?;
+    let mut events = Vec::new();
+
+    let mut timeout: Option<ClockEventData> = None;
+    let mut fd_events = Vec::new();
+    for subscription in subscriptions {
+        match subscription.r#type {
+            wasi::__WASI_EVENTTYPE_CLOCK => {
+                let clock = unsafe { subscription.u.clock };
+                let delay = wasi_clock_to_relative_ns_delay(clock)?;
+
+                log::debug!("poll_oneoff event.u.clock = {:?}", clock);
+                log::debug!("poll_oneoff delay = {:?}ns", delay);
+
+                let current = ClockEventData {
+                    delay,
+                    userdata: subscription.userdata,
+                };
+                let timeout = timeout.get_or_insert(current);
+                if current.delay < timeout.delay {
+                    *timeout = current;
+                }
+            }
+            r#type
+                if r#type == wasi::__WASI_EVENTTYPE_FD_READ
+                    || r#type == wasi::__WASI_EVENTTYPE_FD_WRITE =>
+            {
+                let wasi_fd = unsafe { subscription.u.fd_readwrite.file_descriptor };
+                let rights = if r#type == wasi::__WASI_EVENTTYPE_FD_READ {
+                    wasi::__WASI_RIGHTS_FD_READ
+                } else {
+                    wasi::__WASI_RIGHTS_FD_WRITE
+                };
+
+                match unsafe {
+                    wasi_ctx
+                        .get_fd_entry(wasi_fd)
+                        .and_then(|fe| fe.as_descriptor(rights, 0))
+                } {
+                    Ok(descriptor) => fd_events.push(FdEventData {
+                        descriptor,
+                        r#type: subscription.r#type,
+                        userdata: subscription.userdata,
+                    }),
+                    Err(err) => {
+                        let event = wasi::__wasi_event_t {
+                            userdata: subscription.userdata,
+                            r#type,
+                            error: err.as_wasi_error().as_raw_errno(),
+                            u: wasi::__wasi_event_u_t {
+                                fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                                    nbytes: 0,
+                                    flags: 0,
+                                },
+                            },
+                        };
+                        events.push(event);
+                    }
+                };
+            }
+            _ => unreachable!(),
+        }
+    }
+
+    log::debug!("poll_oneoff timeout = {:?}", timeout);
+    log::debug!("poll_oneoff fd_events = {:?}", fd_events);
+
+    hostcalls_impl::poll_oneoff(timeout, fd_events, &mut events)?;
+
+    let events_count = u32::try_from(events.len()).map_err(|_| Error::EOVERFLOW)?;
+
+    enc_events(memory, output, nsubscriptions, events)?;
+
+    trace!("     | *nevents={:?}", events_count);
+
+    enc_int_byref(memory, nevents, events_count)
+}
+
+fn wasi_clock_to_relative_ns_delay(wasi_clock: wasi::__wasi_subscription_clock_t) -> Result<u128> {
+    use std::time::SystemTime;
+
+    if wasi_clock.flags != wasi::__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME {
+        return Ok(u128::from(wasi_clock.timeout));
+    }
+    let now: u128 = SystemTime::now()
+        .duration_since(SystemTime::UNIX_EPOCH)
+        .map_err(|_| Error::ENOTCAPABLE)?
+        .as_nanos();
+    let deadline = u128::from(wasi_clock.timeout);
+    Ok(deadline.saturating_sub(now))
+}
+
+#[derive(Debug, Copy, Clone)]
+pub(crate) struct ClockEventData {
+    pub(crate) delay: u128, // delay is expressed in nanoseconds
+    pub(crate) userdata: wasi::__wasi_userdata_t,
+}
+
+#[derive(Debug)]
+pub(crate) struct FdEventData<'a> {
+    pub(crate) descriptor: &'a Descriptor,
+    pub(crate) r#type: wasi::__wasi_eventtype_t,
+    pub(crate) userdata: wasi::__wasi_userdata_t,
+}
+
+pub(crate) fn proc_exit(_wasi_ctx: &WasiCtx, _memory: &mut [u8], rval: wasi::__wasi_exitcode_t) {
+    trace!("proc_exit(rval={:?})", rval);
+    // TODO: Rather than call std::process::exit here, we should trigger a
+    // stack unwind similar to a trap.
+    std::process::exit(rval as i32);
+}
+
+pub(crate) fn proc_raise(
+    _wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    _sig: wasi::__wasi_signal_t,
+) -> Result<()> {
+    unimplemented!("proc_raise")
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/hostcalls_impl/mod.rs.html b/api/src/wasi_common/old/snapshot_0/hostcalls_impl/mod.rs.html new file mode 100644 index 000000000000..c976ff606d7a --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/hostcalls_impl/mod.rs.html @@ -0,0 +1,21 @@ +mod.rs.html -- source
1
+2
+3
+4
+5
+6
+7
+8
+9
+
+mod fs;
+mod fs_helpers;
+mod misc;
+mod sock;
+
+pub(crate) use self::fs::*;
+pub(crate) use self::fs_helpers::PathGet;
+pub(crate) use self::misc::*;
+pub(crate) use self::sock::*;
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/hostcalls_impl/sock.rs.html b/api/src/wasi_common/old/snapshot_0/hostcalls_impl/sock.rs.html new file mode 100644 index 000000000000..0cad22cc5437 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/hostcalls_impl/sock.rs.html @@ -0,0 +1,73 @@ +sock.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+
+use crate::old::snapshot_0::{wasi, wasi32, Result, WasiCtx};
+
+pub fn sock_recv(
+    _wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    _sock: wasi::__wasi_fd_t,
+    _ri_data: wasi32::uintptr_t,
+    _ri_data_len: wasi32::size_t,
+    _ri_flags: wasi::__wasi_riflags_t,
+    _ro_datalen: wasi32::uintptr_t,
+    _ro_flags: wasi32::uintptr_t,
+) -> Result<()> {
+    unimplemented!("sock_recv")
+}
+
+pub fn sock_send(
+    _wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    _sock: wasi::__wasi_fd_t,
+    _si_data: wasi32::uintptr_t,
+    _si_data_len: wasi32::size_t,
+    _si_flags: wasi::__wasi_siflags_t,
+    _so_datalen: wasi32::uintptr_t,
+) -> Result<()> {
+    unimplemented!("sock_send")
+}
+
+pub fn sock_shutdown(
+    _wasi_ctx: &WasiCtx,
+    _memory: &mut [u8],
+    _sock: wasi::__wasi_fd_t,
+    _how: wasi::__wasi_sdflags_t,
+) -> Result<()> {
+    unimplemented!("sock_shutdown")
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/memory.rs.html b/api/src/wasi_common/old/snapshot_0/memory.rs.html new file mode 100644 index 000000000000..e90bb01fac67 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/memory.rs.html @@ -0,0 +1,963 @@ +memory.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+
+//! Functions to store and load data to and from wasm linear memory,
+//! transforming them from and to host data types.
+//!
+//! Endianness concerns are completely encapsulated in this file, so
+//! that users outside this file holding a `wasi::*` value never need
+//! to consider what endianness it's in. Inside this file,
+//! wasm linear-memory-ordered values are called "raw" values, and
+//! are not held for long durations.
+
+#![allow(unused)]
+use crate::old::snapshot_0::{host, wasi, wasi32, Error, Result};
+use num::PrimInt;
+use std::convert::TryFrom;
+use std::mem::{align_of, size_of};
+use std::{ptr, slice};
+
+fn dec_ptr(memory: &[u8], ptr: wasi32::uintptr_t, len: usize) -> Result<*const u8> {
+    // check for overflow
+    let checked_len = (ptr as usize).checked_add(len).ok_or(Error::EFAULT)?;
+
+    // translate the pointer
+    memory
+        .get(ptr as usize..checked_len)
+        .ok_or(Error::EFAULT)
+        .map(|mem| mem.as_ptr())
+}
+
+fn dec_ptr_mut(memory: &mut [u8], ptr: wasi32::uintptr_t, len: usize) -> Result<*mut u8> {
+    // check for overflow
+    let checked_len = (ptr as usize).checked_add(len).ok_or(Error::EFAULT)?;
+
+    // translate the pointer
+    memory
+        .get_mut(ptr as usize..checked_len)
+        .ok_or(Error::EFAULT)
+        .map(|mem| mem.as_mut_ptr())
+}
+
+fn dec_ptr_to<'memory, T>(memory: &'memory [u8], ptr: wasi32::uintptr_t) -> Result<&'memory T> {
+    // check that the ptr is aligned
+    if ptr as usize % align_of::<T>() != 0 {
+        return Err(Error::EINVAL);
+    }
+
+    dec_ptr(memory, ptr, size_of::<T>()).map(|p| unsafe { &*(p as *const T) })
+}
+
+fn dec_ptr_to_mut<'memory, T>(
+    memory: &'memory mut [u8],
+    ptr: wasi32::uintptr_t,
+) -> Result<&'memory mut T> {
+    // check that the ptr is aligned
+    if ptr as usize % align_of::<T>() != 0 {
+        return Err(Error::EINVAL);
+    }
+
+    dec_ptr_mut(memory, ptr, size_of::<T>()).map(|p| unsafe { &mut *(p as *mut T) })
+}
+
+/// This function does not perform endianness conversions!
+fn dec_raw_byref<T>(memory: &[u8], ptr: wasi32::uintptr_t) -> Result<T> {
+    dec_ptr_to::<T>(memory, ptr).map(|p| unsafe { ptr::read(p) })
+}
+
+/// This function does not perform endianness conversions!
+fn enc_raw_byref<T>(memory: &mut [u8], ptr: wasi32::uintptr_t, t: T) -> Result<()> {
+    dec_ptr_to_mut::<T>(memory, ptr).map(|p| unsafe { ptr::write(p, t) })
+}
+
+pub(crate) fn dec_int_byref<T>(memory: &[u8], ptr: wasi32::uintptr_t) -> Result<T>
+where
+    T: PrimInt,
+{
+    dec_raw_byref::<T>(memory, ptr).map(|i| PrimInt::from_le(i))
+}
+
+pub(crate) fn enc_int_byref<T>(memory: &mut [u8], ptr: wasi32::uintptr_t, t: T) -> Result<()>
+where
+    T: PrimInt,
+{
+    enc_raw_byref::<T>(memory, ptr, PrimInt::to_le(t))
+}
+
+fn check_slice_of<T>(ptr: wasi32::uintptr_t, len: wasi32::size_t) -> Result<(usize, usize)> {
+    // check alignment, and that length doesn't overflow
+    if ptr as usize % align_of::<T>() != 0 {
+        return Err(Error::EINVAL);
+    }
+    let len = dec_usize(len);
+    let len_bytes = if let Some(len) = size_of::<T>().checked_mul(len) {
+        len
+    } else {
+        return Err(Error::EOVERFLOW);
+    };
+
+    Ok((len, len_bytes))
+}
+
+fn dec_raw_slice_of<'memory, T>(
+    memory: &'memory [u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<&'memory [T]> {
+    let (len, len_bytes) = check_slice_of::<T>(ptr, len)?;
+    let ptr = dec_ptr(memory, ptr, len_bytes)? as *const T;
+    Ok(unsafe { slice::from_raw_parts(ptr, len) })
+}
+
+fn dec_raw_slice_of_mut<'memory, T>(
+    memory: &'memory mut [u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<&'memory mut [T]> {
+    let (len, len_bytes) = check_slice_of::<T>(ptr, len)?;
+    let ptr = dec_ptr_mut(memory, ptr, len_bytes)? as *mut T;
+    Ok(unsafe { slice::from_raw_parts_mut(ptr, len) })
+}
+
+fn raw_slice_for_enc<'memory, T>(
+    memory: &'memory mut [u8],
+    slice: &[T],
+    ptr: wasi32::uintptr_t,
+) -> Result<&'memory mut [T]> {
+    // check alignment
+    if ptr as usize % align_of::<T>() != 0 {
+        return Err(Error::EINVAL);
+    }
+    // check that length doesn't overflow
+    let len_bytes = if let Some(len) = size_of::<T>().checked_mul(slice.len()) {
+        len
+    } else {
+        return Err(Error::EOVERFLOW);
+    };
+
+    // get the pointer into guest memory
+    let ptr = dec_ptr_mut(memory, ptr, len_bytes)? as *mut T;
+
+    Ok(unsafe { slice::from_raw_parts_mut(ptr, slice.len()) })
+}
+
+pub(crate) fn dec_slice_of_u8<'memory>(
+    memory: &'memory [u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<&'memory [u8]> {
+    dec_raw_slice_of::<u8>(memory, ptr, len)
+}
+
+pub(crate) fn dec_slice_of_mut_u8<'memory>(
+    memory: &'memory mut [u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<&'memory mut [u8]> {
+    dec_raw_slice_of_mut::<u8>(memory, ptr, len)
+}
+
+pub(crate) fn enc_slice_of_u8(
+    memory: &mut [u8],
+    slice: &[u8],
+    ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    let output = raw_slice_for_enc::<u8>(memory, slice, ptr)?;
+
+    output.copy_from_slice(slice);
+
+    Ok(())
+}
+
+pub(crate) fn enc_slice_of_wasi32_uintptr(
+    memory: &mut [u8],
+    slice: &[wasi32::uintptr_t],
+    ptr: wasi32::uintptr_t,
+) -> Result<()> {
+    let mut output_iter = raw_slice_for_enc::<wasi32::uintptr_t>(memory, slice, ptr)?.into_iter();
+
+    for p in slice {
+        *output_iter.next().unwrap() = PrimInt::to_le(*p);
+    }
+
+    Ok(())
+}
+
+macro_rules! dec_enc_scalar {
+    ($ty:ident, $dec_byref:ident, $enc_byref:ident) => {
+        pub(crate) fn $dec_byref(memory: &mut [u8], ptr: wasi32::uintptr_t) -> Result<wasi::$ty> {
+            dec_int_byref::<wasi::$ty>(memory, ptr)
+        }
+
+        pub(crate) fn $enc_byref(
+            memory: &mut [u8],
+            ptr: wasi32::uintptr_t,
+            x: wasi::$ty,
+        ) -> Result<()> {
+            enc_int_byref::<wasi::$ty>(memory, ptr, x)
+        }
+    };
+}
+
+pub(crate) fn dec_ciovec_slice(
+    memory: &[u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<Vec<host::__wasi_ciovec_t>> {
+    let raw_slice = dec_raw_slice_of::<wasi32::__wasi_ciovec_t>(memory, ptr, len)?;
+
+    raw_slice
+        .iter()
+        .map(|raw_iov| {
+            let len = dec_usize(PrimInt::from_le(raw_iov.buf_len));
+            let buf = PrimInt::from_le(raw_iov.buf);
+            Ok(host::__wasi_ciovec_t {
+                buf: dec_ptr(memory, buf, len)? as *const u8,
+                buf_len: len,
+            })
+        })
+        .collect()
+}
+
+pub(crate) fn dec_iovec_slice(
+    memory: &[u8],
+    ptr: wasi32::uintptr_t,
+    len: wasi32::size_t,
+) -> Result<Vec<host::__wasi_iovec_t>> {
+    let raw_slice = dec_raw_slice_of::<wasi32::__wasi_iovec_t>(memory, ptr, len)?;
+
+    raw_slice
+        .iter()
+        .map(|raw_iov| {
+            let len = dec_usize(PrimInt::from_le(raw_iov.buf_len));
+            let buf = PrimInt::from_le(raw_iov.buf);
+            Ok(host::__wasi_iovec_t {
+                buf: dec_ptr(memory, buf, len)? as *mut u8,
+                buf_len: len,
+            })
+        })
+        .collect()
+}
+
+dec_enc_scalar!(__wasi_clockid_t, dec_clockid_byref, enc_clockid_byref);
+dec_enc_scalar!(__wasi_errno_t, dec_errno_byref, enc_errno_byref);
+dec_enc_scalar!(__wasi_exitcode_t, dec_exitcode_byref, enc_exitcode_byref);
+dec_enc_scalar!(__wasi_fd_t, dec_fd_byref, enc_fd_byref);
+dec_enc_scalar!(__wasi_fdflags_t, dec_fdflags_byref, enc_fdflags_byref);
+dec_enc_scalar!(__wasi_device_t, dev_device_byref, enc_device_byref);
+dec_enc_scalar!(__wasi_inode_t, dev_inode_byref, enc_inode_byref);
+dec_enc_scalar!(__wasi_linkcount_t, dev_linkcount_byref, enc_linkcount_byref);
+
+pub(crate) fn dec_filestat_byref(
+    memory: &mut [u8],
+    filestat_ptr: wasi32::uintptr_t,
+) -> Result<wasi::__wasi_filestat_t> {
+    let raw = dec_raw_byref::<wasi::__wasi_filestat_t>(memory, filestat_ptr)?;
+
+    Ok(wasi::__wasi_filestat_t {
+        dev: PrimInt::from_le(raw.dev),
+        ino: PrimInt::from_le(raw.ino),
+        filetype: PrimInt::from_le(raw.filetype),
+        nlink: PrimInt::from_le(raw.nlink),
+        size: PrimInt::from_le(raw.size),
+        atim: PrimInt::from_le(raw.atim),
+        mtim: PrimInt::from_le(raw.mtim),
+        ctim: PrimInt::from_le(raw.ctim),
+    })
+}
+
+pub(crate) fn enc_filestat_byref(
+    memory: &mut [u8],
+    filestat_ptr: wasi32::uintptr_t,
+    filestat: wasi::__wasi_filestat_t,
+) -> Result<()> {
+    let raw = wasi::__wasi_filestat_t {
+        dev: PrimInt::to_le(filestat.dev),
+        ino: PrimInt::to_le(filestat.ino),
+        filetype: PrimInt::to_le(filestat.filetype),
+        nlink: PrimInt::to_le(filestat.nlink),
+        size: PrimInt::to_le(filestat.size),
+        atim: PrimInt::to_le(filestat.atim),
+        mtim: PrimInt::to_le(filestat.mtim),
+        ctim: PrimInt::to_le(filestat.ctim),
+    };
+
+    enc_raw_byref::<wasi::__wasi_filestat_t>(memory, filestat_ptr, raw)
+}
+
+pub(crate) fn dec_fdstat_byref(
+    memory: &mut [u8],
+    fdstat_ptr: wasi32::uintptr_t,
+) -> Result<wasi::__wasi_fdstat_t> {
+    let raw = dec_raw_byref::<wasi::__wasi_fdstat_t>(memory, fdstat_ptr)?;
+
+    Ok(wasi::__wasi_fdstat_t {
+        fs_filetype: PrimInt::from_le(raw.fs_filetype),
+        fs_flags: PrimInt::from_le(raw.fs_flags),
+        fs_rights_base: PrimInt::from_le(raw.fs_rights_base),
+        fs_rights_inheriting: PrimInt::from_le(raw.fs_rights_inheriting),
+    })
+}
+
+pub(crate) fn enc_fdstat_byref(
+    memory: &mut [u8],
+    fdstat_ptr: wasi32::uintptr_t,
+    fdstat: wasi::__wasi_fdstat_t,
+) -> Result<()> {
+    let raw = wasi::__wasi_fdstat_t {
+        fs_filetype: PrimInt::to_le(fdstat.fs_filetype),
+        fs_flags: PrimInt::to_le(fdstat.fs_flags),
+        fs_rights_base: PrimInt::to_le(fdstat.fs_rights_base),
+        fs_rights_inheriting: PrimInt::to_le(fdstat.fs_rights_inheriting),
+    };
+
+    enc_raw_byref::<wasi::__wasi_fdstat_t>(memory, fdstat_ptr, raw)
+}
+
+dec_enc_scalar!(__wasi_filedelta_t, dec_filedelta_byref, enc_filedelta_byref);
+dec_enc_scalar!(__wasi_filesize_t, dec_filesize_byref, enc_filesize_byref);
+dec_enc_scalar!(__wasi_filetype_t, dec_filetype_byref, enc_filetype_byref);
+
+dec_enc_scalar!(
+    __wasi_lookupflags_t,
+    dec_lookupflags_byref,
+    enc_lookupflags_byref
+);
+
+dec_enc_scalar!(__wasi_oflags_t, dec_oflags_byref, enc_oflags_byref);
+
+pub(crate) fn dec_prestat_byref(
+    memory: &mut [u8],
+    prestat_ptr: wasi32::uintptr_t,
+) -> Result<host::__wasi_prestat_t> {
+    let raw = dec_raw_byref::<wasi32::__wasi_prestat_t>(memory, prestat_ptr)?;
+
+    match PrimInt::from_le(raw.pr_type) {
+        wasi::__WASI_PREOPENTYPE_DIR => Ok(host::__wasi_prestat_t {
+            pr_type: wasi::__WASI_PREOPENTYPE_DIR,
+            u: host::__wasi_prestat_u_t {
+                dir: host::__wasi_prestat_dir_t {
+                    pr_name_len: dec_usize(PrimInt::from_le(unsafe { raw.u.dir.pr_name_len })),
+                },
+            },
+        }),
+        _ => Err(Error::EINVAL),
+    }
+}
+
+pub(crate) fn enc_prestat_byref(
+    memory: &mut [u8],
+    prestat_ptr: wasi32::uintptr_t,
+    prestat: host::__wasi_prestat_t,
+) -> Result<()> {
+    let raw = match prestat.pr_type {
+        wasi::__WASI_PREOPENTYPE_DIR => Ok(wasi32::__wasi_prestat_t {
+            pr_type: PrimInt::to_le(wasi::__WASI_PREOPENTYPE_DIR),
+            u: wasi32::__wasi_prestat_u_t {
+                dir: wasi32::__wasi_prestat_dir_t {
+                    pr_name_len: enc_usize(unsafe { prestat.u.dir.pr_name_len }),
+                },
+            },
+        }),
+        _ => Err(Error::EINVAL),
+    }?;
+
+    enc_raw_byref::<wasi32::__wasi_prestat_t>(memory, prestat_ptr, raw)
+}
+
+dec_enc_scalar!(__wasi_rights_t, dec_rights_byref, enc_rights_byref);
+dec_enc_scalar!(__wasi_timestamp_t, dec_timestamp_byref, enc_timestamp_byref);
+
+pub(crate) fn dec_usize(size: wasi32::size_t) -> usize {
+    usize::try_from(size).unwrap()
+}
+
+pub(crate) fn enc_usize(size: usize) -> wasi32::size_t {
+    wasi32::size_t::try_from(size).unwrap()
+}
+
+pub(crate) fn enc_usize_byref(
+    memory: &mut [u8],
+    usize_ptr: wasi32::uintptr_t,
+    host_usize: usize,
+) -> Result<()> {
+    enc_int_byref::<wasi32::size_t>(memory, usize_ptr, enc_usize(host_usize))
+}
+
+dec_enc_scalar!(__wasi_whence_t, dec_whence_byref, enc_whence_byref);
+
+dec_enc_scalar!(
+    __wasi_subclockflags_t,
+    dec_subclockflags_byref,
+    enc_subclockflags_byref
+);
+
+dec_enc_scalar!(
+    __wasi_eventrwflags_t,
+    dec_eventrwflags_byref,
+    enc_eventrwflags_byref
+);
+
+dec_enc_scalar!(__wasi_eventtype_t, dec_eventtype_byref, enc_eventtype_byref);
+dec_enc_scalar!(__wasi_userdata_t, dec_userdata_byref, enc_userdata_byref);
+
+pub(crate) fn dec_subscriptions(
+    memory: &mut [u8],
+    input: wasi32::uintptr_t,
+    nsubscriptions: wasi32::size_t,
+) -> Result<Vec<wasi::__wasi_subscription_t>> {
+    let raw_input_slice =
+        dec_raw_slice_of::<wasi::__wasi_subscription_t>(memory, input, nsubscriptions)?;
+
+    raw_input_slice
+        .into_iter()
+        .map(|raw_subscription| {
+            let userdata = PrimInt::from_le(raw_subscription.userdata);
+            let r#type = PrimInt::from_le(raw_subscription.r#type);
+            let raw_u = raw_subscription.u;
+            let u = match r#type {
+                wasi::__WASI_EVENTTYPE_CLOCK => wasi::__wasi_subscription_u_t {
+                    clock: unsafe {
+                        wasi::__wasi_subscription_clock_t {
+                            identifier: PrimInt::from_le(raw_u.clock.identifier),
+                            id: PrimInt::from_le(raw_u.clock.id),
+                            timeout: PrimInt::from_le(raw_u.clock.timeout),
+                            precision: PrimInt::from_le(raw_u.clock.precision),
+                            flags: PrimInt::from_le(raw_u.clock.flags),
+                        }
+                    },
+                },
+                wasi::__WASI_EVENTTYPE_FD_READ | wasi::__WASI_EVENTTYPE_FD_WRITE => {
+                    wasi::__wasi_subscription_u_t {
+                        fd_readwrite: wasi::__wasi_subscription_fd_readwrite_t {
+                            file_descriptor: PrimInt::from_le(unsafe {
+                                raw_u.fd_readwrite.file_descriptor
+                            }),
+                        },
+                    }
+                }
+                _ => return Err(Error::EINVAL),
+            };
+            Ok(wasi::__wasi_subscription_t {
+                userdata,
+                r#type,
+                u,
+            })
+        })
+        .collect::<Result<Vec<_>>>()
+}
+
+pub(crate) fn enc_events(
+    memory: &mut [u8],
+    output: wasi32::uintptr_t,
+    nsubscriptions: wasi32::size_t,
+    events: Vec<wasi::__wasi_event_t>,
+) -> Result<()> {
+    let mut raw_output_iter =
+        dec_raw_slice_of_mut::<wasi::__wasi_event_t>(memory, output, nsubscriptions)?.into_iter();
+
+    for event in events.iter() {
+        *raw_output_iter
+            .next()
+            .expect("the number of events cannot exceed the number of subscriptions") = {
+            let fd_readwrite = unsafe { event.u.fd_readwrite };
+            wasi::__wasi_event_t {
+                userdata: PrimInt::to_le(event.userdata),
+                r#type: PrimInt::to_le(event.r#type),
+                error: PrimInt::to_le(event.error),
+                u: wasi::__wasi_event_u_t {
+                    fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                        nbytes: PrimInt::to_le(fd_readwrite.nbytes),
+                        flags: PrimInt::to_le(fd_readwrite.flags),
+                    },
+                },
+            }
+        };
+    }
+
+    Ok(())
+}
+
+dec_enc_scalar!(__wasi_advice_t, dec_advice_byref, enc_advice_byref);
+dec_enc_scalar!(__wasi_fstflags_t, dec_fstflags_byref, enc_fstflags_byref);
+dec_enc_scalar!(__wasi_dircookie_t, dec_dircookie_byref, enc_dircookie_byref);
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/mod.rs.html b/api/src/wasi_common/old/snapshot_0/mod.rs.html new file mode 100644 index 000000000000..e4a97d715c50 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/mod.rs.html @@ -0,0 +1,41 @@ +mod.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+
+mod ctx;
+mod error;
+mod fdentry;
+mod helpers;
+mod host;
+mod hostcalls_impl;
+mod memory;
+mod sys;
+pub mod wasi;
+pub mod wasi32;
+
+pub mod hostcalls {
+    wig::define_hostcalls!("old/snapshot_0" "wasi_unstable");
+}
+
+pub use ctx::{WasiCtx, WasiCtxBuilder};
+
+pub type Error = error::Error;
+pub type Result<T> = std::result::Result<T, Error>;
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/mod.rs.html b/api/src/wasi_common/old/snapshot_0/sys/mod.rs.html new file mode 100644 index 000000000000..20924ea301dc --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/mod.rs.html @@ -0,0 +1,29 @@ +mod.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+
+use cfg_if::cfg_if;
+
+cfg_if! {
+    if #[cfg(unix)] {
+        mod unix;
+        pub(crate) use self::unix::*;
+    } else if #[cfg(windows)] {
+        mod windows;
+        pub(crate) use self::windows::*;
+    } else {
+        compile_error!("wasi-common doesn't compile for this platform yet");
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/fdentry_impl.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/fdentry_impl.rs.html new file mode 100644 index 000000000000..71bd637bb3cc --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/fdentry_impl.rs.html @@ -0,0 +1,263 @@ +fdentry_impl.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+
+use crate::old::snapshot_0::fdentry::{Descriptor, OsHandleRef};
+use crate::old::snapshot_0::{sys::unix::sys_impl, wasi, Error, Result};
+use std::fs::File;
+use std::io;
+use std::mem::ManuallyDrop;
+use std::os::unix::prelude::{AsRawFd, FileTypeExt, FromRawFd, RawFd};
+
+pub(crate) use sys_impl::oshandle::*;
+
+impl AsRawFd for Descriptor {
+    fn as_raw_fd(&self) -> RawFd {
+        match self {
+            Self::OsHandle(file) => file.as_raw_fd(),
+            Self::Stdin => io::stdin().as_raw_fd(),
+            Self::Stdout => io::stdout().as_raw_fd(),
+            Self::Stderr => io::stderr().as_raw_fd(),
+        }
+    }
+}
+
+pub(crate) fn descriptor_as_oshandle<'lifetime>(
+    desc: &'lifetime Descriptor,
+) -> OsHandleRef<'lifetime> {
+    OsHandleRef::new(ManuallyDrop::new(OsHandle::from(unsafe {
+        File::from_raw_fd(desc.as_raw_fd())
+    })))
+}
+
+/// This function is unsafe because it operates on a raw file descriptor.
+pub(crate) unsafe fn determine_type_and_access_rights<Fd: AsRawFd>(
+    fd: &Fd,
+) -> Result<(
+    wasi::__wasi_filetype_t,
+    wasi::__wasi_rights_t,
+    wasi::__wasi_rights_t,
+)> {
+    let (file_type, mut rights_base, rights_inheriting) = determine_type_rights(fd)?;
+
+    use yanix::{fcntl, file::OFlag};
+    let flags = fcntl::get_status_flags(fd.as_raw_fd())?;
+    let accmode = flags & OFlag::ACCMODE;
+    if accmode == OFlag::RDONLY {
+        rights_base &= !wasi::__WASI_RIGHTS_FD_WRITE;
+    } else if accmode == OFlag::WRONLY {
+        rights_base &= !wasi::__WASI_RIGHTS_FD_READ;
+    }
+
+    Ok((file_type, rights_base, rights_inheriting))
+}
+
+/// This function is unsafe because it operates on a raw file descriptor.
+pub(crate) unsafe fn determine_type_rights<Fd: AsRawFd>(
+    fd: &Fd,
+) -> Result<(
+    wasi::__wasi_filetype_t,
+    wasi::__wasi_rights_t,
+    wasi::__wasi_rights_t,
+)> {
+    let (file_type, rights_base, rights_inheriting) = {
+        // we just make a `File` here for convenience; we don't want it to close when it drops
+        let file = std::mem::ManuallyDrop::new(std::fs::File::from_raw_fd(fd.as_raw_fd()));
+        let ft = file.metadata()?.file_type();
+        if ft.is_block_device() {
+            log::debug!("Host fd {:?} is a block device", fd.as_raw_fd());
+            (
+                wasi::__WASI_FILETYPE_BLOCK_DEVICE,
+                wasi::RIGHTS_BLOCK_DEVICE_BASE,
+                wasi::RIGHTS_BLOCK_DEVICE_INHERITING,
+            )
+        } else if ft.is_char_device() {
+            log::debug!("Host fd {:?} is a char device", fd.as_raw_fd());
+            use yanix::file::isatty;
+            if isatty(fd.as_raw_fd())? {
+                (
+                    wasi::__WASI_FILETYPE_CHARACTER_DEVICE,
+                    wasi::RIGHTS_TTY_BASE,
+                    wasi::RIGHTS_TTY_BASE,
+                )
+            } else {
+                (
+                    wasi::__WASI_FILETYPE_CHARACTER_DEVICE,
+                    wasi::RIGHTS_CHARACTER_DEVICE_BASE,
+                    wasi::RIGHTS_CHARACTER_DEVICE_INHERITING,
+                )
+            }
+        } else if ft.is_dir() {
+            log::debug!("Host fd {:?} is a directory", fd.as_raw_fd());
+            (
+                wasi::__WASI_FILETYPE_DIRECTORY,
+                wasi::RIGHTS_DIRECTORY_BASE,
+                wasi::RIGHTS_DIRECTORY_INHERITING,
+            )
+        } else if ft.is_file() {
+            log::debug!("Host fd {:?} is a file", fd.as_raw_fd());
+            (
+                wasi::__WASI_FILETYPE_REGULAR_FILE,
+                wasi::RIGHTS_REGULAR_FILE_BASE,
+                wasi::RIGHTS_REGULAR_FILE_INHERITING,
+            )
+        } else if ft.is_socket() {
+            log::debug!("Host fd {:?} is a socket", fd.as_raw_fd());
+            use yanix::socket::{get_socket_type, SockType};
+            match get_socket_type(fd.as_raw_fd())? {
+                SockType::Datagram => (
+                    wasi::__WASI_FILETYPE_SOCKET_DGRAM,
+                    wasi::RIGHTS_SOCKET_BASE,
+                    wasi::RIGHTS_SOCKET_INHERITING,
+                ),
+                SockType::Stream => (
+                    wasi::__WASI_FILETYPE_SOCKET_STREAM,
+                    wasi::RIGHTS_SOCKET_BASE,
+                    wasi::RIGHTS_SOCKET_INHERITING,
+                ),
+                _ => return Err(Error::EINVAL),
+            }
+        } else if ft.is_fifo() {
+            log::debug!("Host fd {:?} is a fifo", fd.as_raw_fd());
+            (
+                wasi::__WASI_FILETYPE_UNKNOWN,
+                wasi::RIGHTS_REGULAR_FILE_BASE,
+                wasi::RIGHTS_REGULAR_FILE_INHERITING,
+            )
+        } else {
+            log::debug!("Host fd {:?} is unknown", fd.as_raw_fd());
+            return Err(Error::EINVAL);
+        }
+    };
+
+    Ok((file_type, rights_base, rights_inheriting))
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/filetime.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/filetime.rs.html new file mode 100644 index 000000000000..d748900c2ef6 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/filetime.rs.html @@ -0,0 +1,137 @@ +filetime.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+
+//! This internal module consists of helper types and functions for dealing
+//! with setting the file times (mainly in `path_filestat_set_times` syscall for now).
+//!
+//! The vast majority of the code contained within and in platform-specific implementations
+//! (`super::linux::filetime` and `super::bsd::filetime`) is based on the [filetime] crate.
+//! Kudos @alexcrichton!
+//!
+//! [filetime]: https://github.com/alexcrichton/filetime
+use crate::old::snapshot_0::Result;
+use std::convert::TryInto;
+
+pub(crate) use super::sys_impl::filetime::*;
+
+cfg_if::cfg_if! {
+    if #[cfg(not(target_os = "emscripten"))] {
+        fn filetime_to_timespec(ft: &filetime::FileTime) -> Result<libc::timespec> {
+            Ok(
+                libc::timespec {
+                    tv_sec: ft.seconds(),
+                    tv_nsec: ft.nanoseconds().try_into()?,
+                }
+            )
+        }
+    } else {
+        fn filetime_to_timespec(ft: &filetime::FileTime) -> Result<libc::timespec> {
+            Ok(
+                libc::timespec {
+                    tv_sec: ft.seconds().try_into()?,
+                    tv_nsec: ft.nanoseconds().try_into()?,
+                }
+            )
+        }
+    }
+}
+
+/// A wrapper `enum` around `filetime::FileTime` struct, but unlike the original, this
+/// type allows the possibility of specifying `FileTime::Now` as a valid enumeration which,
+/// in turn, if `utimensat` is available on the host, will use a special const setting
+/// `UTIME_NOW`.
+#[derive(Debug, Copy, Clone)]
+pub(crate) enum FileTime {
+    Now,
+    Omit,
+    FileTime(filetime::FileTime),
+}
+
+/// Converts `FileTime` to `libc::timespec`. If `FileTime::Now` variant is specified, this
+/// resolves to `UTIME_NOW` special const, `FileTime::Omit` variant resolves to `UTIME_OMIT`, and
+/// `FileTime::FileTime(ft)` where `ft := filetime::FileTime` uses [filetime] crate's original
+/// implementation which can be found here: [filetime::unix::to_timespec].
+///
+/// [filetime]: https://github.com/alexcrichton/filetime
+/// [filetime::unix::to_timespec]: https://github.com/alexcrichton/filetime/blob/master/src/unix/mod.rs#L30
+pub(crate) fn to_timespec(ft: &FileTime) -> Result<libc::timespec> {
+    let ts = match ft {
+        FileTime::Now => libc::timespec {
+            tv_sec: 0,
+            tv_nsec: UTIME_NOW,
+        },
+        FileTime::Omit => libc::timespec {
+            tv_sec: 0,
+            tv_nsec: UTIME_OMIT,
+        },
+        FileTime::FileTime(ft) => filetime_to_timespec(ft)?,
+    };
+    Ok(ts)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/host_impl.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/host_impl.rs.html new file mode 100644 index 000000000000..5dda58e5ac3f --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/host_impl.rs.html @@ -0,0 +1,523 @@ +host_impl.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+
+//! WASI host types specific to *nix host.
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+#![allow(dead_code)]
+use crate::old::snapshot_0::host::FileType;
+use crate::old::snapshot_0::{
+    error::FromRawOsError, helpers, sys::unix::sys_impl, wasi, Error, Result,
+};
+use std::ffi::OsStr;
+use std::os::unix::prelude::OsStrExt;
+use yanix::{
+    file::{OFlag, SFlag},
+    Errno,
+};
+
+pub(crate) use sys_impl::host_impl::*;
+
+impl FromRawOsError for Error {
+    fn from_raw_os_error(code: i32) -> Self {
+        Self::from(Errno::from_i32(code))
+    }
+}
+
+impl From<Errno> for Error {
+    fn from(errno: Errno) -> Self {
+        match errno {
+            Errno::EPERM => Self::EPERM,
+            Errno::ENOENT => Self::ENOENT,
+            Errno::ESRCH => Self::ESRCH,
+            Errno::EINTR => Self::EINTR,
+            Errno::EIO => Self::EIO,
+            Errno::ENXIO => Self::ENXIO,
+            Errno::E2BIG => Self::E2BIG,
+            Errno::ENOEXEC => Self::ENOEXEC,
+            Errno::EBADF => Self::EBADF,
+            Errno::ECHILD => Self::ECHILD,
+            Errno::EAGAIN => Self::EAGAIN,
+            Errno::ENOMEM => Self::ENOMEM,
+            Errno::EACCES => Self::EACCES,
+            Errno::EFAULT => Self::EFAULT,
+            Errno::EBUSY => Self::EBUSY,
+            Errno::EEXIST => Self::EEXIST,
+            Errno::EXDEV => Self::EXDEV,
+            Errno::ENODEV => Self::ENODEV,
+            Errno::ENOTDIR => Self::ENOTDIR,
+            Errno::EISDIR => Self::EISDIR,
+            Errno::EINVAL => Self::EINVAL,
+            Errno::ENFILE => Self::ENFILE,
+            Errno::EMFILE => Self::EMFILE,
+            Errno::ENOTTY => Self::ENOTTY,
+            Errno::ETXTBSY => Self::ETXTBSY,
+            Errno::EFBIG => Self::EFBIG,
+            Errno::ENOSPC => Self::ENOSPC,
+            Errno::ESPIPE => Self::ESPIPE,
+            Errno::EROFS => Self::EROFS,
+            Errno::EMLINK => Self::EMLINK,
+            Errno::EPIPE => Self::EPIPE,
+            Errno::EDOM => Self::EDOM,
+            Errno::ERANGE => Self::ERANGE,
+            Errno::EDEADLK => Self::EDEADLK,
+            Errno::ENAMETOOLONG => Self::ENAMETOOLONG,
+            Errno::ENOLCK => Self::ENOLCK,
+            Errno::ENOSYS => Self::ENOSYS,
+            Errno::ENOTEMPTY => Self::ENOTEMPTY,
+            Errno::ELOOP => Self::ELOOP,
+            Errno::ENOMSG => Self::ENOMSG,
+            Errno::EIDRM => Self::EIDRM,
+            Errno::ENOLINK => Self::ENOLINK,
+            Errno::EPROTO => Self::EPROTO,
+            Errno::EMULTIHOP => Self::EMULTIHOP,
+            Errno::EBADMSG => Self::EBADMSG,
+            Errno::EOVERFLOW => Self::EOVERFLOW,
+            Errno::EILSEQ => Self::EILSEQ,
+            Errno::ENOTSOCK => Self::ENOTSOCK,
+            Errno::EDESTADDRREQ => Self::EDESTADDRREQ,
+            Errno::EMSGSIZE => Self::EMSGSIZE,
+            Errno::EPROTOTYPE => Self::EPROTOTYPE,
+            Errno::ENOPROTOOPT => Self::ENOPROTOOPT,
+            Errno::EPROTONOSUPPORT => Self::EPROTONOSUPPORT,
+            Errno::EAFNOSUPPORT => Self::EAFNOSUPPORT,
+            Errno::EADDRINUSE => Self::EADDRINUSE,
+            Errno::EADDRNOTAVAIL => Self::EADDRNOTAVAIL,
+            Errno::ENETDOWN => Self::ENETDOWN,
+            Errno::ENETUNREACH => Self::ENETUNREACH,
+            Errno::ENETRESET => Self::ENETRESET,
+            Errno::ECONNABORTED => Self::ECONNABORTED,
+            Errno::ECONNRESET => Self::ECONNRESET,
+            Errno::ENOBUFS => Self::ENOBUFS,
+            Errno::EISCONN => Self::EISCONN,
+            Errno::ENOTCONN => Self::ENOTCONN,
+            Errno::ETIMEDOUT => Self::ETIMEDOUT,
+            Errno::ECONNREFUSED => Self::ECONNREFUSED,
+            Errno::EHOSTUNREACH => Self::EHOSTUNREACH,
+            Errno::EALREADY => Self::EALREADY,
+            Errno::EINPROGRESS => Self::EINPROGRESS,
+            Errno::ESTALE => Self::ESTALE,
+            Errno::EDQUOT => Self::EDQUOT,
+            Errno::ECANCELED => Self::ECANCELED,
+            Errno::EOWNERDEAD => Self::EOWNERDEAD,
+            Errno::ENOTRECOVERABLE => Self::ENOTRECOVERABLE,
+        }
+    }
+}
+
+pub(crate) fn nix_from_fdflags(fdflags: wasi::__wasi_fdflags_t) -> OFlag {
+    let mut nix_flags = OFlag::empty();
+    if fdflags & wasi::__WASI_FDFLAGS_APPEND != 0 {
+        nix_flags.insert(OFlag::APPEND);
+    }
+    if fdflags & wasi::__WASI_FDFLAGS_DSYNC != 0 {
+        nix_flags.insert(OFlag::DSYNC);
+    }
+    if fdflags & wasi::__WASI_FDFLAGS_NONBLOCK != 0 {
+        nix_flags.insert(OFlag::NONBLOCK);
+    }
+    if fdflags & wasi::__WASI_FDFLAGS_RSYNC != 0 {
+        nix_flags.insert(O_RSYNC);
+    }
+    if fdflags & wasi::__WASI_FDFLAGS_SYNC != 0 {
+        nix_flags.insert(OFlag::SYNC);
+    }
+    nix_flags
+}
+
+pub(crate) fn fdflags_from_nix(oflags: OFlag) -> wasi::__wasi_fdflags_t {
+    let mut fdflags = 0;
+    if oflags.contains(OFlag::APPEND) {
+        fdflags |= wasi::__WASI_FDFLAGS_APPEND;
+    }
+    if oflags.contains(OFlag::DSYNC) {
+        fdflags |= wasi::__WASI_FDFLAGS_DSYNC;
+    }
+    if oflags.contains(OFlag::NONBLOCK) {
+        fdflags |= wasi::__WASI_FDFLAGS_NONBLOCK;
+    }
+    if oflags.contains(O_RSYNC) {
+        fdflags |= wasi::__WASI_FDFLAGS_RSYNC;
+    }
+    if oflags.contains(OFlag::SYNC) {
+        fdflags |= wasi::__WASI_FDFLAGS_SYNC;
+    }
+    fdflags
+}
+
+pub(crate) fn nix_from_oflags(oflags: wasi::__wasi_oflags_t) -> OFlag {
+    let mut nix_flags = OFlag::empty();
+    if oflags & wasi::__WASI_OFLAGS_CREAT != 0 {
+        nix_flags.insert(OFlag::CREAT);
+    }
+    if oflags & wasi::__WASI_OFLAGS_DIRECTORY != 0 {
+        nix_flags.insert(OFlag::DIRECTORY);
+    }
+    if oflags & wasi::__WASI_OFLAGS_EXCL != 0 {
+        nix_flags.insert(OFlag::EXCL);
+    }
+    if oflags & wasi::__WASI_OFLAGS_TRUNC != 0 {
+        nix_flags.insert(OFlag::TRUNC);
+    }
+    nix_flags
+}
+
+pub(crate) fn filetype_from_nix(sflags: SFlag) -> FileType {
+    if sflags.contains(SFlag::IFCHR) {
+        FileType::CharacterDevice
+    } else if sflags.contains(SFlag::IFBLK) {
+        FileType::BlockDevice
+    } else if sflags.contains(SFlag::IFSOCK) {
+        FileType::SocketStream
+    } else if sflags.contains(SFlag::IFDIR) {
+        FileType::Directory
+    } else if sflags.contains(SFlag::IFREG) {
+        FileType::RegularFile
+    } else if sflags.contains(SFlag::IFLNK) {
+        FileType::Symlink
+    } else {
+        FileType::Unknown
+    }
+}
+
+pub(crate) fn filestat_from_nix(filestat: libc::stat) -> Result<wasi::__wasi_filestat_t> {
+    use std::convert::TryInto;
+
+    fn filestat_to_timestamp(secs: u64, nsecs: u64) -> Result<wasi::__wasi_timestamp_t> {
+        secs.checked_mul(1_000_000_000)
+            .and_then(|sec_nsec| sec_nsec.checked_add(nsecs))
+            .ok_or(Error::EOVERFLOW)
+    }
+
+    let filetype = SFlag::from_bits_truncate(filestat.st_mode);
+    let dev = stdev_from_nix(filestat.st_dev)?;
+    let ino = stino_from_nix(filestat.st_ino)?;
+    let atim = filestat_to_timestamp(
+        filestat.st_atime.try_into()?,
+        filestat.st_atime_nsec.try_into()?,
+    )?;
+    let ctim = filestat_to_timestamp(
+        filestat.st_ctime.try_into()?,
+        filestat.st_ctime_nsec.try_into()?,
+    )?;
+    let mtim = filestat_to_timestamp(
+        filestat.st_mtime.try_into()?,
+        filestat.st_mtime_nsec.try_into()?,
+    )?;
+
+    Ok(wasi::__wasi_filestat_t {
+        dev,
+        ino,
+        nlink: stnlink_from_nix(filestat.st_nlink)?,
+        size: filestat.st_size as wasi::__wasi_filesize_t,
+        atim,
+        ctim,
+        mtim,
+        filetype: filetype_from_nix(filetype).to_wasi(),
+    })
+}
+
+pub(crate) fn dirent_filetype_from_host(
+    host_entry: &libc::dirent,
+) -> Result<wasi::__wasi_filetype_t> {
+    match host_entry.d_type {
+        libc::DT_FIFO => Ok(wasi::__WASI_FILETYPE_UNKNOWN),
+        libc::DT_CHR => Ok(wasi::__WASI_FILETYPE_CHARACTER_DEVICE),
+        libc::DT_DIR => Ok(wasi::__WASI_FILETYPE_DIRECTORY),
+        libc::DT_BLK => Ok(wasi::__WASI_FILETYPE_BLOCK_DEVICE),
+        libc::DT_REG => Ok(wasi::__WASI_FILETYPE_REGULAR_FILE),
+        libc::DT_LNK => Ok(wasi::__WASI_FILETYPE_SYMBOLIC_LINK),
+        libc::DT_SOCK => {
+            // TODO how to discriminate between STREAM and DGRAM?
+            // Perhaps, we should create a more general WASI filetype
+            // such as __WASI_FILETYPE_SOCKET, and then it would be
+            // up to the client to check whether it's actually
+            // STREAM or DGRAM?
+            Ok(wasi::__WASI_FILETYPE_UNKNOWN)
+        }
+        libc::DT_UNKNOWN => Ok(wasi::__WASI_FILETYPE_UNKNOWN),
+        _ => Err(Error::EINVAL),
+    }
+}
+
+/// Creates owned WASI path from OS string.
+///
+/// NB WASI spec requires OS string to be valid UTF-8. Otherwise,
+/// `__WASI_ERRNO_ILSEQ` error is returned.
+pub(crate) fn path_from_host<S: AsRef<OsStr>>(s: S) -> Result<String> {
+    helpers::path_from_slice(s.as_ref().as_bytes()).map(String::from)
+}
+
+impl From<yanix::dir::FileType> for FileType {
+    fn from(ft: yanix::dir::FileType) -> Self {
+        use yanix::dir::FileType::*;
+        match ft {
+            RegularFile => Self::RegularFile,
+            Symlink => Self::Symlink,
+            Directory => Self::Directory,
+            BlockDevice => Self::BlockDevice,
+            CharacterDevice => Self::CharacterDevice,
+            /* Unknown | Socket | Fifo */ _ => Self::Unknown,
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/fs.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/fs.rs.html new file mode 100644 index 000000000000..b7fee2fb6fe2 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/fs.rs.html @@ -0,0 +1,631 @@ +fs.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+
+#![allow(non_camel_case_types)]
+#![allow(unused_unsafe)]
+use crate::old::snapshot_0::host::Dirent;
+use crate::old::snapshot_0::hostcalls_impl::PathGet;
+use crate::old::snapshot_0::sys::{fdentry_impl::OsHandle, host_impl, unix::sys_impl};
+use crate::old::snapshot_0::{wasi, Error, Result};
+use std::convert::TryInto;
+use std::fs::File;
+use std::os::unix::fs::FileExt;
+use std::os::unix::prelude::{AsRawFd, FromRawFd};
+
+pub(crate) use sys_impl::hostcalls_impl::*;
+
+pub(crate) fn fd_pread(
+    file: &File,
+    buf: &mut [u8],
+    offset: wasi::__wasi_filesize_t,
+) -> Result<usize> {
+    file.read_at(buf, offset).map_err(Into::into)
+}
+
+pub(crate) fn fd_pwrite(file: &File, buf: &[u8], offset: wasi::__wasi_filesize_t) -> Result<usize> {
+    file.write_at(buf, offset).map_err(Into::into)
+}
+
+pub(crate) fn fd_fdstat_get(fd: &File) -> Result<wasi::__wasi_fdflags_t> {
+    unsafe { yanix::fcntl::get_status_flags(fd.as_raw_fd()) }
+        .map(host_impl::fdflags_from_nix)
+        .map_err(Into::into)
+}
+
+pub(crate) fn fd_fdstat_set_flags(fd: &File, fdflags: wasi::__wasi_fdflags_t) -> Result<()> {
+    let nix_flags = host_impl::nix_from_fdflags(fdflags);
+    unsafe { yanix::fcntl::set_status_flags(fd.as_raw_fd(), nix_flags) }.map_err(Into::into)
+}
+
+pub(crate) fn fd_advise(
+    file: &File,
+    advice: wasi::__wasi_advice_t,
+    offset: wasi::__wasi_filesize_t,
+    len: wasi::__wasi_filesize_t,
+) -> Result<()> {
+    use yanix::fadvise::{posix_fadvise, PosixFadviseAdvice};
+    let offset = offset.try_into()?;
+    let len = len.try_into()?;
+    let host_advice = match advice {
+        wasi::__WASI_ADVICE_DONTNEED => PosixFadviseAdvice::DontNeed,
+        wasi::__WASI_ADVICE_SEQUENTIAL => PosixFadviseAdvice::Sequential,
+        wasi::__WASI_ADVICE_WILLNEED => PosixFadviseAdvice::WillNeed,
+        wasi::__WASI_ADVICE_NOREUSE => PosixFadviseAdvice::NoReuse,
+        wasi::__WASI_ADVICE_RANDOM => PosixFadviseAdvice::Random,
+        wasi::__WASI_ADVICE_NORMAL => PosixFadviseAdvice::Normal,
+        _ => return Err(Error::EINVAL),
+    };
+    unsafe { posix_fadvise(file.as_raw_fd(), offset, len, host_advice) }.map_err(Into::into)
+}
+
+pub(crate) fn path_create_directory(resolved: PathGet) -> Result<()> {
+    use yanix::file::{mkdirat, Mode};
+    unsafe {
+        mkdirat(
+            resolved.dirfd().as_raw_fd(),
+            resolved.path(),
+            Mode::from_bits_truncate(0o777),
+        )
+    }
+    .map_err(Into::into)
+}
+
+pub(crate) fn path_link(resolved_old: PathGet, resolved_new: PathGet) -> Result<()> {
+    use yanix::file::{linkat, AtFlag};
+    unsafe {
+        linkat(
+            resolved_old.dirfd().as_raw_fd(),
+            resolved_old.path(),
+            resolved_new.dirfd().as_raw_fd(),
+            resolved_new.path(),
+            AtFlag::SYMLINK_FOLLOW,
+        )
+    }
+    .map_err(Into::into)
+}
+
+pub(crate) fn path_open(
+    resolved: PathGet,
+    read: bool,
+    write: bool,
+    oflags: wasi::__wasi_oflags_t,
+    fs_flags: wasi::__wasi_fdflags_t,
+) -> Result<File> {
+    use yanix::{
+        file::{fstatat, openat, AtFlag, Mode, OFlag, SFlag},
+        Errno,
+    };
+
+    let mut nix_all_oflags = if read && write {
+        OFlag::RDWR
+    } else if write {
+        OFlag::WRONLY
+    } else {
+        OFlag::RDONLY
+    };
+
+    // on non-Capsicum systems, we always want nofollow
+    nix_all_oflags.insert(OFlag::NOFOLLOW);
+
+    // convert open flags
+    nix_all_oflags.insert(host_impl::nix_from_oflags(oflags));
+
+    // convert file descriptor flags
+    nix_all_oflags.insert(host_impl::nix_from_fdflags(fs_flags));
+
+    // Call openat. Use mode 0o666 so that we follow whatever the user's
+    // umask is, but don't set the executable flag, because it isn't yet
+    // meaningful for WASI programs to create executable files.
+
+    log::debug!("path_open resolved = {:?}", resolved);
+    log::debug!("path_open oflags = {:?}", nix_all_oflags);
+
+    let new_fd = match unsafe {
+        openat(
+            resolved.dirfd().as_raw_fd(),
+            resolved.path(),
+            nix_all_oflags,
+            Mode::from_bits_truncate(0o666),
+        )
+    } {
+        Ok(fd) => fd,
+        Err(e) => {
+            if let yanix::YanixError::Errno(errno) = e {
+                match errno {
+                    // Linux returns ENXIO instead of EOPNOTSUPP when opening a socket
+                    Errno::ENXIO => {
+                        if let Ok(stat) = unsafe {
+                            fstatat(
+                                resolved.dirfd().as_raw_fd(),
+                                resolved.path(),
+                                AtFlag::SYMLINK_NOFOLLOW,
+                            )
+                        } {
+                            if SFlag::from_bits_truncate(stat.st_mode).contains(SFlag::IFSOCK) {
+                                return Err(Error::ENOTSUP);
+                            } else {
+                                return Err(Error::ENXIO);
+                            }
+                        } else {
+                            return Err(Error::ENXIO);
+                        }
+                    }
+                    // Linux returns ENOTDIR instead of ELOOP when using O_NOFOLLOW|O_DIRECTORY
+                    // on a symlink.
+                    Errno::ENOTDIR
+                        if !(nix_all_oflags & (OFlag::NOFOLLOW | OFlag::DIRECTORY)).is_empty() =>
+                    {
+                        if let Ok(stat) = unsafe {
+                            fstatat(
+                                resolved.dirfd().as_raw_fd(),
+                                resolved.path(),
+                                AtFlag::SYMLINK_NOFOLLOW,
+                            )
+                        } {
+                            if SFlag::from_bits_truncate(stat.st_mode).contains(SFlag::IFLNK) {
+                                return Err(Error::ELOOP);
+                            }
+                        }
+                        return Err(Error::ENOTDIR);
+                    }
+                    // FreeBSD returns EMLINK instead of ELOOP when using O_NOFOLLOW on
+                    // a symlink.
+                    Errno::EMLINK if !(nix_all_oflags & OFlag::NOFOLLOW).is_empty() => {
+                        return Err(Error::ELOOP);
+                    }
+                    errno => return Err(errno.into()),
+                }
+            } else {
+                return Err(e.into());
+            }
+        }
+    };
+
+    log::debug!("path_open (host) new_fd = {:?}", new_fd);
+
+    // Determine the type of the new file descriptor and which rights contradict with this type
+    Ok(unsafe { File::from_raw_fd(new_fd) })
+}
+
+pub(crate) fn path_readlink(resolved: PathGet, buf: &mut [u8]) -> Result<usize> {
+    use std::cmp::min;
+    use yanix::file::readlinkat;
+    let read_link = unsafe { readlinkat(resolved.dirfd().as_raw_fd(), resolved.path()) }
+        .map_err(Into::into)
+        .and_then(host_impl::path_from_host)?;
+    let copy_len = min(read_link.len(), buf.len());
+    if copy_len > 0 {
+        buf[..copy_len].copy_from_slice(&read_link.as_bytes()[..copy_len]);
+    }
+    Ok(copy_len)
+}
+
+pub(crate) fn fd_filestat_get(file: &std::fs::File) -> Result<wasi::__wasi_filestat_t> {
+    use yanix::file::fstat;
+    unsafe { fstat(file.as_raw_fd()) }
+        .map_err(Into::into)
+        .and_then(host_impl::filestat_from_nix)
+}
+
+pub(crate) fn path_filestat_get(
+    resolved: PathGet,
+    dirflags: wasi::__wasi_lookupflags_t,
+) -> Result<wasi::__wasi_filestat_t> {
+    use yanix::file::{fstatat, AtFlag};
+    let atflags = match dirflags {
+        0 => AtFlag::empty(),
+        _ => AtFlag::SYMLINK_NOFOLLOW,
+    };
+    unsafe { fstatat(resolved.dirfd().as_raw_fd(), resolved.path(), atflags) }
+        .map_err(Into::into)
+        .and_then(host_impl::filestat_from_nix)
+}
+
+pub(crate) fn path_filestat_set_times(
+    resolved: PathGet,
+    dirflags: wasi::__wasi_lookupflags_t,
+    st_atim: wasi::__wasi_timestamp_t,
+    st_mtim: wasi::__wasi_timestamp_t,
+    fst_flags: wasi::__wasi_fstflags_t,
+) -> Result<()> {
+    use super::super::filetime::*;
+    use std::time::{Duration, UNIX_EPOCH};
+
+    let set_atim = fst_flags & wasi::__WASI_FSTFLAGS_ATIM != 0;
+    let set_atim_now = fst_flags & wasi::__WASI_FSTFLAGS_ATIM_NOW != 0;
+    let set_mtim = fst_flags & wasi::__WASI_FSTFLAGS_MTIM != 0;
+    let set_mtim_now = fst_flags & wasi::__WASI_FSTFLAGS_MTIM_NOW != 0;
+
+    if (set_atim && set_atim_now) || (set_mtim && set_mtim_now) {
+        return Err(Error::EINVAL);
+    }
+
+    let symlink_nofollow = wasi::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW != dirflags;
+    let atim = if set_atim {
+        let time = UNIX_EPOCH + Duration::from_nanos(st_atim);
+        FileTime::FileTime(filetime::FileTime::from_system_time(time))
+    } else if set_atim_now {
+        FileTime::Now
+    } else {
+        FileTime::Omit
+    };
+    let mtim = if set_mtim {
+        let time = UNIX_EPOCH + Duration::from_nanos(st_mtim);
+        FileTime::FileTime(filetime::FileTime::from_system_time(time))
+    } else if set_mtim_now {
+        FileTime::Now
+    } else {
+        FileTime::Omit
+    };
+
+    utimensat(
+        resolved.dirfd(),
+        resolved.path(),
+        atim,
+        mtim,
+        symlink_nofollow,
+    )
+    .map_err(Into::into)
+}
+
+pub(crate) fn path_remove_directory(resolved: PathGet) -> Result<()> {
+    use yanix::file::{unlinkat, AtFlag};
+    unsafe {
+        unlinkat(
+            resolved.dirfd().as_raw_fd(),
+            resolved.path(),
+            AtFlag::REMOVEDIR,
+        )
+    }
+    .map_err(Into::into)
+}
+
+pub(crate) fn fd_readdir<'a>(
+    os_handle: &'a mut OsHandle,
+    cookie: wasi::__wasi_dircookie_t,
+) -> Result<impl Iterator<Item = Result<Dirent>> + 'a> {
+    use yanix::dir::{DirIter, Entry, EntryExt, SeekLoc};
+
+    // Get an instance of `Dir`; this is host-specific due to intricasies
+    // of managing a dir stream between Linux and BSD *nixes
+    let mut dir = fd_readdir_impl::get_dir_from_os_handle(os_handle)?;
+
+    // Seek if needed. Unless cookie is wasi::__WASI_DIRCOOKIE_START,
+    // new items may not be returned to the caller.
+    if cookie == wasi::__WASI_DIRCOOKIE_START {
+        log::trace!("     | fd_readdir: doing rewinddir");
+        dir.rewind();
+    } else {
+        log::trace!("     | fd_readdir: doing seekdir to {}", cookie);
+        let loc = unsafe { SeekLoc::from_raw(cookie as i64)? };
+        dir.seek(loc);
+    }
+
+    Ok(DirIter::new(dir).map(|entry| {
+        let entry: Entry = entry?;
+        Ok(Dirent {
+            name: entry
+                // TODO can we reuse path_from_host for CStr?
+                .file_name()
+                .to_str()?
+                .to_owned(),
+            ino: entry.ino(),
+            ftype: entry.file_type().into(),
+            cookie: entry.seek_loc()?.to_raw().try_into()?,
+        })
+    }))
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/fs_helpers.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/fs_helpers.rs.html new file mode 100644 index 000000000000..d332c7aa3030 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/fs_helpers.rs.html @@ -0,0 +1,135 @@ +fs_helpers.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+
+#![allow(non_camel_case_types)]
+#![allow(unused_unsafe)]
+use crate::old::snapshot_0::sys::host_impl;
+use crate::old::snapshot_0::{wasi, Result};
+use std::fs::File;
+use yanix::file::OFlag;
+
+pub(crate) fn path_open_rights(
+    rights_base: wasi::__wasi_rights_t,
+    rights_inheriting: wasi::__wasi_rights_t,
+    oflags: wasi::__wasi_oflags_t,
+    fs_flags: wasi::__wasi_fdflags_t,
+) -> (wasi::__wasi_rights_t, wasi::__wasi_rights_t) {
+    // which rights are needed on the dirfd?
+    let mut needed_base = wasi::__WASI_RIGHTS_PATH_OPEN;
+    let mut needed_inheriting = rights_base | rights_inheriting;
+
+    // convert open flags
+    let oflags = host_impl::nix_from_oflags(oflags);
+    if oflags.contains(OFlag::CREAT) {
+        needed_base |= wasi::__WASI_RIGHTS_PATH_CREATE_FILE;
+    }
+    if oflags.contains(OFlag::TRUNC) {
+        needed_base |= wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE;
+    }
+
+    // convert file descriptor flags
+    let fdflags = host_impl::nix_from_fdflags(fs_flags);
+    if fdflags.contains(OFlag::DSYNC) {
+        needed_inheriting |= wasi::__WASI_RIGHTS_FD_DATASYNC;
+    }
+    if fdflags.intersects(host_impl::O_RSYNC | OFlag::SYNC) {
+        needed_inheriting |= wasi::__WASI_RIGHTS_FD_SYNC;
+    }
+
+    (needed_base, needed_inheriting)
+}
+
+pub(crate) fn openat(dirfd: &File, path: &str) -> Result<File> {
+    use std::os::unix::prelude::{AsRawFd, FromRawFd};
+    use yanix::file::{openat, Mode};
+
+    log::debug!("path_get openat path = {:?}", path);
+
+    unsafe {
+        openat(
+            dirfd.as_raw_fd(),
+            path,
+            OFlag::RDONLY | OFlag::DIRECTORY | OFlag::NOFOLLOW,
+            Mode::empty(),
+        )
+    }
+    .map(|new_fd| unsafe { File::from_raw_fd(new_fd) })
+    .map_err(Into::into)
+}
+
+pub(crate) fn readlinkat(dirfd: &File, path: &str) -> Result<String> {
+    use std::os::unix::prelude::AsRawFd;
+    use yanix::file::readlinkat;
+
+    log::debug!("path_get readlinkat path = {:?}", path);
+
+    unsafe { readlinkat(dirfd.as_raw_fd(), path) }
+        .map_err(Into::into)
+        .and_then(host_impl::path_from_host)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/misc.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/misc.rs.html new file mode 100644 index 000000000000..5f98765ef037 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/misc.rs.html @@ -0,0 +1,413 @@ +misc.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+
+#![allow(non_camel_case_types)]
+#![allow(unused_unsafe)]
+use crate::old::snapshot_0::hostcalls_impl::{ClockEventData, FdEventData};
+use crate::old::snapshot_0::{wasi, Error, Result};
+use yanix::clock::{clock_getres, clock_gettime, ClockId};
+
+fn wasi_clock_id_to_unix(clock_id: wasi::__wasi_clockid_t) -> Result<ClockId> {
+    // convert the supported clocks to libc types, or return EINVAL
+    match clock_id {
+        wasi::__WASI_CLOCKID_REALTIME => Ok(ClockId::Realtime),
+        wasi::__WASI_CLOCKID_MONOTONIC => Ok(ClockId::Monotonic),
+        wasi::__WASI_CLOCKID_PROCESS_CPUTIME_ID => Ok(ClockId::ProcessCPUTime),
+        wasi::__WASI_CLOCKID_THREAD_CPUTIME_ID => Ok(ClockId::ThreadCPUTime),
+        _ => Err(Error::EINVAL),
+    }
+}
+
+pub(crate) fn clock_res_get(clock_id: wasi::__wasi_clockid_t) -> Result<wasi::__wasi_timestamp_t> {
+    let clock_id = wasi_clock_id_to_unix(clock_id)?;
+    let timespec = clock_getres(clock_id)?;
+
+    // convert to nanoseconds, returning EOVERFLOW in case of overflow;
+    // this is freelancing a bit from the spec but seems like it'll
+    // be an unusual situation to hit
+    (timespec.tv_sec as wasi::__wasi_timestamp_t)
+        .checked_mul(1_000_000_000)
+        .and_then(|sec_ns| sec_ns.checked_add(timespec.tv_nsec as wasi::__wasi_timestamp_t))
+        .map_or(Err(Error::EOVERFLOW), |resolution| {
+            // a supported clock can never return zero; this case will probably never get hit, but
+            // make sure we follow the spec
+            if resolution == 0 {
+                Err(Error::EINVAL)
+            } else {
+                Ok(resolution)
+            }
+        })
+}
+
+pub(crate) fn clock_time_get(clock_id: wasi::__wasi_clockid_t) -> Result<wasi::__wasi_timestamp_t> {
+    let clock_id = wasi_clock_id_to_unix(clock_id)?;
+    let timespec = clock_gettime(clock_id)?;
+
+    // convert to nanoseconds, returning EOVERFLOW in case of overflow; this is freelancing a bit
+    // from the spec but seems like it'll be an unusual situation to hit
+    (timespec.tv_sec as wasi::__wasi_timestamp_t)
+        .checked_mul(1_000_000_000)
+        .and_then(|sec_ns| sec_ns.checked_add(timespec.tv_nsec as wasi::__wasi_timestamp_t))
+        .map_or(Err(Error::EOVERFLOW), Ok)
+}
+
+pub(crate) fn poll_oneoff(
+    timeout: Option<ClockEventData>,
+    fd_events: Vec<FdEventData>,
+    events: &mut Vec<wasi::__wasi_event_t>,
+) -> Result<()> {
+    use std::{convert::TryInto, os::unix::prelude::AsRawFd};
+    use yanix::{
+        poll::{poll, PollFd, PollFlags},
+        Errno,
+    };
+
+    if fd_events.is_empty() && timeout.is_none() {
+        return Ok(());
+    }
+
+    let mut poll_fds: Vec<_> = fd_events
+        .iter()
+        .map(|event| {
+            let mut flags = PollFlags::empty();
+            match event.r#type {
+                wasi::__WASI_EVENTTYPE_FD_READ => flags.insert(PollFlags::POLLIN),
+                wasi::__WASI_EVENTTYPE_FD_WRITE => flags.insert(PollFlags::POLLOUT),
+                // An event on a file descriptor can currently only be of type FD_READ or FD_WRITE
+                // Nothing else has been defined in the specification, and these are also the only two
+                // events we filtered before. If we get something else here, the code has a serious bug.
+                _ => unreachable!(),
+            };
+            unsafe { PollFd::new(event.descriptor.as_raw_fd(), flags) }
+        })
+        .collect();
+
+    let poll_timeout = timeout.map_or(-1, |timeout| {
+        let delay = timeout.delay / 1_000_000; // poll syscall requires delay to expressed in milliseconds
+        delay.try_into().unwrap_or(libc::c_int::max_value())
+    });
+    log::debug!("poll_oneoff poll_timeout = {:?}", poll_timeout);
+
+    let ready = loop {
+        match poll(&mut poll_fds, poll_timeout) {
+            Err(_) => {
+                if Errno::last() == Errno::EINTR {
+                    continue;
+                }
+                return Err(Errno::last().into());
+            }
+            Ok(ready) => break ready,
+        }
+    };
+
+    Ok(if ready == 0 {
+        poll_oneoff_handle_timeout_event(timeout.expect("timeout should not be None"), events)
+    } else {
+        let ready_events = fd_events.into_iter().zip(poll_fds.into_iter()).take(ready);
+        poll_oneoff_handle_fd_event(ready_events, events)?
+    })
+}
+
+fn poll_oneoff_handle_timeout_event(
+    timeout: ClockEventData,
+    events: &mut Vec<wasi::__wasi_event_t>,
+) {
+    events.push(wasi::__wasi_event_t {
+        userdata: timeout.userdata,
+        r#type: wasi::__WASI_EVENTTYPE_CLOCK,
+        error: wasi::__WASI_ERRNO_SUCCESS,
+        u: wasi::__wasi_event_u_t {
+            fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                nbytes: 0,
+                flags: 0,
+            },
+        },
+    });
+}
+
+fn poll_oneoff_handle_fd_event<'a>(
+    ready_events: impl Iterator<Item = (FdEventData<'a>, yanix::poll::PollFd)>,
+    events: &mut Vec<wasi::__wasi_event_t>,
+) -> Result<()> {
+    use std::{convert::TryInto, os::unix::prelude::AsRawFd};
+    use yanix::{file::fionread, poll::PollFlags};
+
+    for (fd_event, poll_fd) in ready_events {
+        log::debug!("poll_oneoff_handle_fd_event fd_event = {:?}", fd_event);
+        log::debug!("poll_oneoff_handle_fd_event poll_fd = {:?}", poll_fd);
+
+        let revents = match poll_fd.revents() {
+            Some(revents) => revents,
+            None => continue,
+        };
+
+        log::debug!("poll_oneoff_handle_fd_event revents = {:?}", revents);
+
+        let nbytes = if fd_event.r#type == wasi::__WASI_EVENTTYPE_FD_READ {
+            unsafe { fionread(fd_event.descriptor.as_raw_fd())? }
+        } else {
+            0
+        };
+
+        let output_event = if revents.contains(PollFlags::POLLNVAL) {
+            wasi::__wasi_event_t {
+                userdata: fd_event.userdata,
+                r#type: fd_event.r#type,
+                error: wasi::__WASI_ERRNO_BADF,
+                u: wasi::__wasi_event_u_t {
+                    fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                        nbytes: 0,
+                        flags: wasi::__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP,
+                    },
+                },
+            }
+        } else if revents.contains(PollFlags::POLLERR) {
+            wasi::__wasi_event_t {
+                userdata: fd_event.userdata,
+                r#type: fd_event.r#type,
+                error: wasi::__WASI_ERRNO_IO,
+                u: wasi::__wasi_event_u_t {
+                    fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                        nbytes: 0,
+                        flags: wasi::__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP,
+                    },
+                },
+            }
+        } else if revents.contains(PollFlags::POLLHUP) {
+            wasi::__wasi_event_t {
+                userdata: fd_event.userdata,
+                r#type: fd_event.r#type,
+                error: wasi::__WASI_ERRNO_SUCCESS,
+                u: wasi::__wasi_event_u_t {
+                    fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                        nbytes: 0,
+                        flags: wasi::__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP,
+                    },
+                },
+            }
+        } else if revents.contains(PollFlags::POLLIN) | revents.contains(PollFlags::POLLOUT) {
+            wasi::__wasi_event_t {
+                userdata: fd_event.userdata,
+                r#type: fd_event.r#type,
+                error: wasi::__WASI_ERRNO_SUCCESS,
+                u: wasi::__wasi_event_u_t {
+                    fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                        nbytes: nbytes.try_into()?,
+                        flags: 0,
+                    },
+                },
+            }
+        } else {
+            continue;
+        };
+
+        events.push(output_event);
+    }
+
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/mod.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/mod.rs.html new file mode 100644 index 000000000000..dec27fe9144a --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/hostcalls_impl/mod.rs.html @@ -0,0 +1,19 @@ +mod.rs.html -- source
1
+2
+3
+4
+5
+6
+7
+8
+
+//! Unix-specific hostcalls that implement
+//! [WASI](https://github.com/bytecodealliance/wasmtime-wasi/blob/wasi/docs/WASI-overview.md).
+mod fs;
+pub(crate) mod fs_helpers;
+mod misc;
+
+pub(crate) use self::fs::*;
+pub(crate) use self::misc::*;
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/linux/filetime.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/filetime.rs.html new file mode 100644 index 000000000000..7d13ec94fb23 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/filetime.rs.html @@ -0,0 +1,125 @@ +filetime.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+
+//! This internal module consists of helper types and functions for dealing
+//! with setting the file times specific to Linux.
+use crate::old::snapshot_0::{sys::unix::filetime::FileTime, Result};
+use std::fs::File;
+use std::io;
+use std::sync::atomic::{AtomicBool, Ordering::Relaxed};
+
+pub(crate) const UTIME_NOW: i64 = 1_073_741_823;
+pub(crate) const UTIME_OMIT: i64 = 1_073_741_822;
+
+/// Wrapper for `utimensat` syscall, however, with an added twist such that `utimensat` symbol
+/// is firstly resolved (i.e., we check whether it exists on the host), and only used if that is
+/// the case. Otherwise, the syscall resorts to a less accurate `utimesat` emulated syscall.
+/// The original implementation can be found here: [filetime::unix::linux::set_times]
+///
+/// [filetime::unix::linux::set_times]: https://github.com/alexcrichton/filetime/blob/master/src/unix/linux.rs#L64
+pub(crate) fn utimensat(
+    dirfd: &File,
+    path: &str,
+    atime: FileTime,
+    mtime: FileTime,
+    symlink_nofollow: bool,
+) -> Result<()> {
+    use crate::old::snapshot_0::sys::unix::filetime::to_timespec;
+    use std::ffi::CString;
+    use std::os::unix::prelude::*;
+
+    let flags = if symlink_nofollow {
+        libc::AT_SYMLINK_NOFOLLOW
+    } else {
+        0
+    };
+
+    // Attempt to use the `utimensat` syscall, but if it's not supported by the
+    // current kernel then fall back to an older syscall.
+    static INVALID: AtomicBool = AtomicBool::new(false);
+    if !INVALID.load(Relaxed) {
+        let p = CString::new(path.as_bytes())?;
+        let times = [to_timespec(&atime)?, to_timespec(&mtime)?];
+        let rc = unsafe {
+            libc::syscall(
+                libc::SYS_utimensat,
+                dirfd.as_raw_fd(),
+                p.as_ptr(),
+                times.as_ptr(),
+                flags,
+            )
+        };
+        if rc == 0 {
+            return Ok(());
+        }
+        let err = io::Error::last_os_error();
+        if err.raw_os_error() == Some(libc::ENOSYS) {
+            INVALID.store(true, Relaxed);
+        } else {
+            return Err(err.into());
+        }
+    }
+
+    super::utimesat::utimesat(dirfd, path, atime, mtime, symlink_nofollow)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/linux/host_impl.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/host_impl.rs.html new file mode 100644 index 000000000000..329d1fd3fff2 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/host_impl.rs.html @@ -0,0 +1,35 @@ +host_impl.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+
+use crate::old::snapshot_0::{wasi, Result};
+use std::convert::TryInto;
+
+pub(crate) const O_RSYNC: yanix::file::OFlag = yanix::file::OFlag::RSYNC;
+
+pub(crate) fn stdev_from_nix(dev: libc::dev_t) -> Result<wasi::__wasi_device_t> {
+    Ok(wasi::__wasi_device_t::from(dev))
+}
+
+pub(crate) fn stino_from_nix(ino: libc::ino_t) -> Result<wasi::__wasi_inode_t> {
+    Ok(wasi::__wasi_device_t::from(ino))
+}
+
+pub(crate) fn stnlink_from_nix(nlink: libc::nlink_t) -> Result<wasi::__wasi_linkcount_t> {
+    nlink.try_into().map_err(Into::into)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/linux/hostcalls_impl.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/hostcalls_impl.rs.html new file mode 100644 index 000000000000..ad931aa10eff --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/hostcalls_impl.rs.html @@ -0,0 +1,123 @@ +hostcalls_impl.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+
+use crate::old::snapshot_0::hostcalls_impl::PathGet;
+use crate::old::snapshot_0::Result;
+use std::os::unix::prelude::AsRawFd;
+
+pub(crate) fn path_unlink_file(resolved: PathGet) -> Result<()> {
+    use yanix::file::{unlinkat, AtFlag};
+    unsafe {
+        unlinkat(
+            resolved.dirfd().as_raw_fd(),
+            resolved.path(),
+            AtFlag::empty(),
+        )
+    }
+    .map_err(Into::into)
+}
+
+pub(crate) fn path_symlink(old_path: &str, resolved: PathGet) -> Result<()> {
+    use yanix::file::symlinkat;
+
+    log::debug!("path_symlink old_path = {:?}", old_path);
+    log::debug!("path_symlink resolved = {:?}", resolved);
+
+    unsafe { symlinkat(old_path, resolved.dirfd().as_raw_fd(), resolved.path()) }
+        .map_err(Into::into)
+}
+
+pub(crate) fn path_rename(resolved_old: PathGet, resolved_new: PathGet) -> Result<()> {
+    use yanix::file::renameat;
+    unsafe {
+        renameat(
+            resolved_old.dirfd().as_raw_fd(),
+            resolved_old.path(),
+            resolved_new.dirfd().as_raw_fd(),
+            resolved_new.path(),
+        )
+    }
+    .map_err(Into::into)
+}
+
+pub(crate) mod fd_readdir_impl {
+    use crate::old::snapshot_0::sys::fdentry_impl::OsHandle;
+    use crate::old::snapshot_0::Result;
+    use yanix::dir::Dir;
+
+    pub(crate) fn get_dir_from_os_handle(os_handle: &mut OsHandle) -> Result<Box<Dir>> {
+        // We need to duplicate the fd, because `opendir(3)`:
+        //     After a successful call to fdopendir(), fd is used internally by the implementation,
+        //     and should not otherwise be used by the application.
+        // `opendir(3p)` also says that it's undefined behavior to
+        // modify the state of the fd in a different way than by accessing DIR*.
+        //
+        // Still, rewinddir will be needed because the two file descriptors
+        // share progress. But we can safely execute closedir now.
+        let fd = os_handle.try_clone()?;
+        // TODO This doesn't look very clean. Can we do something about it?
+        // Boxing is needed here in order to satisfy `yanix`'s trait requirement for the `DirIter`
+        // where `T: Deref<Target = Dir>`.
+        Ok(Box::new(Dir::from(fd)?))
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/linux/mod.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/mod.rs.html new file mode 100644 index 000000000000..a00c0b3628e8 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/mod.rs.html @@ -0,0 +1,13 @@ +mod.rs.html -- source
1
+2
+3
+4
+5
+
+pub(crate) mod filetime;
+pub(crate) mod host_impl;
+pub(crate) mod hostcalls_impl;
+pub(crate) mod oshandle;
+pub(crate) mod utimesat;
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/linux/oshandle.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/oshandle.rs.html new file mode 100644 index 000000000000..99d3f36ee09a --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/oshandle.rs.html @@ -0,0 +1,67 @@ +oshandle.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
+use std::fs;
+use std::ops::{Deref, DerefMut};
+use std::os::unix::prelude::{AsRawFd, RawFd};
+
+#[derive(Debug)]
+pub(crate) struct OsHandle(fs::File);
+
+impl From<fs::File> for OsHandle {
+    fn from(file: fs::File) -> Self {
+        Self(file)
+    }
+}
+
+impl AsRawFd for OsHandle {
+    fn as_raw_fd(&self) -> RawFd {
+        self.0.as_raw_fd()
+    }
+}
+
+impl Deref for OsHandle {
+    type Target = fs::File;
+
+    fn deref(&self) -> &Self::Target {
+        &self.0
+    }
+}
+
+impl DerefMut for OsHandle {
+    fn deref_mut(&mut self) -> &mut Self::Target {
+        &mut self.0
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/linux/utimesat.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/utimesat.rs.html new file mode 100644 index 000000000000..611c692fec5e --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/linux/utimesat.rs.html @@ -0,0 +1,179 @@ +utimesat.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+
+use crate::old::snapshot_0::sys::unix::filetime::FileTime;
+use crate::old::snapshot_0::Result;
+use std::{fs, io};
+
+/// Combines `openat` with `utimes` to emulate `utimensat` on platforms where it is
+/// not available. The logic for setting file times is based on [filetime::unix::set_file_handles_times].
+///
+/// [filetime::unix::set_file_handles_times]: https://github.com/alexcrichton/filetime/blob/master/src/unix/utimes.rs#L24
+pub(crate) fn utimesat(
+    dirfd: &fs::File,
+    path: &str,
+    atime: FileTime,
+    mtime: FileTime,
+    symlink_nofollow: bool,
+) -> Result<()> {
+    use std::ffi::CString;
+    use std::os::unix::prelude::*;
+    // emulate *at syscall by reading the path from a combination of
+    // (fd, path)
+    let p = CString::new(path.as_bytes())?;
+    let mut flags = libc::O_RDWR;
+    if symlink_nofollow {
+        flags |= libc::O_NOFOLLOW;
+    }
+    let fd = unsafe { libc::openat(dirfd.as_raw_fd(), p.as_ptr(), flags) };
+    let f = unsafe { fs::File::from_raw_fd(fd) };
+    let (atime, mtime) = get_times(atime, mtime, || f.metadata().map_err(Into::into))?;
+    let times = [to_timeval(atime), to_timeval(mtime)];
+    let rc = unsafe { libc::futimes(f.as_raw_fd(), times.as_ptr()) };
+    if rc == 0 {
+        Ok(())
+    } else {
+        Err(io::Error::last_os_error().into())
+    }
+}
+
+/// Converts `filetime::FileTime` to `libc::timeval`. This function was taken directly from
+/// [filetime] crate.
+///
+/// [filetime]: https://github.com/alexcrichton/filetime/blob/master/src/unix/utimes.rs#L93
+fn to_timeval(ft: filetime::FileTime) -> libc::timeval {
+    libc::timeval {
+        tv_sec: ft.seconds(),
+        tv_usec: (ft.nanoseconds() / 1000) as libc::suseconds_t,
+    }
+}
+
+/// For a provided pair of access and modified `FileTime`s, converts the input to
+/// `filetime::FileTime` used later in `utimensat` function. For variants `FileTime::Now`
+/// and `FileTime::Omit`, this function will make two syscalls: either accessing current
+/// system time, or accessing the file's metadata.
+///
+/// The original implementation can be found here: [filetime::unix::get_times].
+///
+/// [filetime::unix::get_times]: https://github.com/alexcrichton/filetime/blob/master/src/unix/utimes.rs#L42
+fn get_times(
+    atime: FileTime,
+    mtime: FileTime,
+    current: impl Fn() -> Result<fs::Metadata>,
+) -> Result<(filetime::FileTime, filetime::FileTime)> {
+    use std::time::SystemTime;
+
+    let atime = match atime {
+        FileTime::Now => {
+            let time = SystemTime::now();
+            filetime::FileTime::from_system_time(time)
+        }
+        FileTime::Omit => {
+            let meta = current()?;
+            filetime::FileTime::from_last_access_time(&meta)
+        }
+        FileTime::FileTime(ft) => ft,
+    };
+
+    let mtime = match mtime {
+        FileTime::Now => {
+            let time = SystemTime::now();
+            filetime::FileTime::from_system_time(time)
+        }
+        FileTime::Omit => {
+            let meta = current()?;
+            filetime::FileTime::from_last_modification_time(&meta)
+        }
+        FileTime::FileTime(ft) => ft,
+    };
+
+    Ok((atime, mtime))
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/sys/unix/mod.rs.html b/api/src/wasi_common/old/snapshot_0/sys/unix/mod.rs.html new file mode 100644 index 000000000000..1fc7768c2533 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/sys/unix/mod.rs.html @@ -0,0 +1,71 @@ +mod.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+
+pub(crate) mod fdentry_impl;
+pub(crate) mod host_impl;
+pub(crate) mod hostcalls_impl;
+
+mod filetime;
+
+cfg_if::cfg_if! {
+    if #[cfg(target_os = "linux")] {
+        mod linux;
+        use self::linux as sys_impl;
+    } else if #[cfg(target_os = "emscripten")] {
+        mod emscripten;
+        use self::emscripten as sys_impl;
+    } else if #[cfg(any(target_os = "macos",
+                        target_os = "netbsd",
+                        target_os = "freebsd",
+                        target_os = "openbsd",
+                        target_os = "ios",
+                        target_os = "dragonfly"))] {
+        mod bsd;
+        use self::bsd as sys_impl;
+    }
+}
+
+use crate::old::snapshot_0::Result;
+use std::fs::{File, OpenOptions};
+
+pub(crate) fn dev_null() -> Result<File> {
+    OpenOptions::new()
+        .read(true)
+        .write(true)
+        .open("/dev/null")
+        .map_err(Into::into)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/wasi.rs.html b/api/src/wasi_common/old/snapshot_0/wasi.rs.html new file mode 100644 index 000000000000..54f7426ba952 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/wasi.rs.html @@ -0,0 +1,1751 @@ +wasi.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+
+//! Types and constants shared between 32-bit and 64-bit wasi. Types involving
+//! pointer or `usize`-sized data are excluded here, so this file only contains
+//! fixed-size types, so it's host/target independent.
+
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+#![allow(dead_code)]
+
+use wig::witx_wasi_types;
+
+witx_wasi_types!("old/snapshot_0" "wasi_unstable");
+
+pub(crate) const RIGHTS_ALL: __wasi_rights_t = __WASI_RIGHTS_FD_DATASYNC
+    | __WASI_RIGHTS_FD_READ
+    | __WASI_RIGHTS_FD_SEEK
+    | __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
+    | __WASI_RIGHTS_FD_SYNC
+    | __WASI_RIGHTS_FD_TELL
+    | __WASI_RIGHTS_FD_WRITE
+    | __WASI_RIGHTS_FD_ADVISE
+    | __WASI_RIGHTS_FD_ALLOCATE
+    | __WASI_RIGHTS_PATH_CREATE_DIRECTORY
+    | __WASI_RIGHTS_PATH_CREATE_FILE
+    | __WASI_RIGHTS_PATH_LINK_SOURCE
+    | __WASI_RIGHTS_PATH_LINK_TARGET
+    | __WASI_RIGHTS_PATH_OPEN
+    | __WASI_RIGHTS_FD_READDIR
+    | __WASI_RIGHTS_PATH_READLINK
+    | __WASI_RIGHTS_PATH_RENAME_SOURCE
+    | __WASI_RIGHTS_PATH_RENAME_TARGET
+    | __WASI_RIGHTS_PATH_FILESTAT_GET
+    | __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE
+    | __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES
+    | __WASI_RIGHTS_FD_FILESTAT_GET
+    | __WASI_RIGHTS_FD_FILESTAT_SET_SIZE
+    | __WASI_RIGHTS_FD_FILESTAT_SET_TIMES
+    | __WASI_RIGHTS_PATH_SYMLINK
+    | __WASI_RIGHTS_PATH_UNLINK_FILE
+    | __WASI_RIGHTS_PATH_REMOVE_DIRECTORY
+    | __WASI_RIGHTS_POLL_FD_READWRITE
+    | __WASI_RIGHTS_SOCK_SHUTDOWN;
+
+// Block and character device interaction is outside the scope of
+// WASI. Simply allow everything.
+pub(crate) const RIGHTS_BLOCK_DEVICE_BASE: __wasi_rights_t = RIGHTS_ALL;
+pub(crate) const RIGHTS_BLOCK_DEVICE_INHERITING: __wasi_rights_t = RIGHTS_ALL;
+pub(crate) const RIGHTS_CHARACTER_DEVICE_BASE: __wasi_rights_t = RIGHTS_ALL;
+pub(crate) const RIGHTS_CHARACTER_DEVICE_INHERITING: __wasi_rights_t = RIGHTS_ALL;
+
+// Only allow directory operations on directories. Directories can only
+// yield file descriptors to other directories and files.
+pub(crate) const RIGHTS_DIRECTORY_BASE: __wasi_rights_t = __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
+    | __WASI_RIGHTS_FD_SYNC
+    | __WASI_RIGHTS_FD_ADVISE
+    | __WASI_RIGHTS_PATH_CREATE_DIRECTORY
+    | __WASI_RIGHTS_PATH_CREATE_FILE
+    | __WASI_RIGHTS_PATH_LINK_SOURCE
+    | __WASI_RIGHTS_PATH_LINK_TARGET
+    | __WASI_RIGHTS_PATH_OPEN
+    | __WASI_RIGHTS_FD_READDIR
+    | __WASI_RIGHTS_PATH_READLINK
+    | __WASI_RIGHTS_PATH_RENAME_SOURCE
+    | __WASI_RIGHTS_PATH_RENAME_TARGET
+    | __WASI_RIGHTS_PATH_FILESTAT_GET
+    | __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE
+    | __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES
+    | __WASI_RIGHTS_FD_FILESTAT_GET
+    | __WASI_RIGHTS_FD_FILESTAT_SET_TIMES
+    | __WASI_RIGHTS_PATH_SYMLINK
+    | __WASI_RIGHTS_PATH_UNLINK_FILE
+    | __WASI_RIGHTS_PATH_REMOVE_DIRECTORY
+    | __WASI_RIGHTS_POLL_FD_READWRITE;
+pub(crate) const RIGHTS_DIRECTORY_INHERITING: __wasi_rights_t =
+    RIGHTS_DIRECTORY_BASE | RIGHTS_REGULAR_FILE_BASE;
+
+// Operations that apply to regular files.
+pub(crate) const RIGHTS_REGULAR_FILE_BASE: __wasi_rights_t = __WASI_RIGHTS_FD_DATASYNC
+    | __WASI_RIGHTS_FD_READ
+    | __WASI_RIGHTS_FD_SEEK
+    | __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
+    | __WASI_RIGHTS_FD_SYNC
+    | __WASI_RIGHTS_FD_TELL
+    | __WASI_RIGHTS_FD_WRITE
+    | __WASI_RIGHTS_FD_ADVISE
+    | __WASI_RIGHTS_FD_ALLOCATE
+    | __WASI_RIGHTS_FD_FILESTAT_GET
+    | __WASI_RIGHTS_FD_FILESTAT_SET_SIZE
+    | __WASI_RIGHTS_FD_FILESTAT_SET_TIMES
+    | __WASI_RIGHTS_POLL_FD_READWRITE;
+pub(crate) const RIGHTS_REGULAR_FILE_INHERITING: __wasi_rights_t = 0;
+
+// Operations that apply to sockets and socket pairs.
+pub(crate) const RIGHTS_SOCKET_BASE: __wasi_rights_t = __WASI_RIGHTS_FD_READ
+    | __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
+    | __WASI_RIGHTS_FD_WRITE
+    | __WASI_RIGHTS_FD_FILESTAT_GET
+    | __WASI_RIGHTS_POLL_FD_READWRITE
+    | __WASI_RIGHTS_SOCK_SHUTDOWN;
+pub(crate) const RIGHTS_SOCKET_INHERITING: __wasi_rights_t = RIGHTS_ALL;
+
+// Operations that apply to TTYs.
+pub(crate) const RIGHTS_TTY_BASE: __wasi_rights_t = __WASI_RIGHTS_FD_READ
+    | __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
+    | __WASI_RIGHTS_FD_WRITE
+    | __WASI_RIGHTS_FD_FILESTAT_GET
+    | __WASI_RIGHTS_POLL_FD_READWRITE;
+#[allow(unused)]
+pub(crate) const RIGHTS_TTY_INHERITING: __wasi_rights_t = 0;
+
+pub fn whence_to_str(whence: __wasi_whence_t) -> &'static str {
+    match whence {
+        __WASI_WHENCE_CUR => "__WASI_WHENCE_CUR",
+        __WASI_WHENCE_END => "__WASI_WHENCE_END",
+        __WASI_WHENCE_SET => "__WASI_WHENCE_SET",
+        other => panic!("Undefined whence value {:?}", other),
+    }
+}
+
+pub const __WASI_DIRCOOKIE_START: __wasi_dircookie_t = 0;
+
+#[cfg(test)]
+mod test {
+    use super::*;
+
+    #[test]
+    fn bindgen_test_layout_wasi_dirent_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_dirent_t>(),
+            24usize,
+            concat!("Size of: ", stringify!(__wasi_dirent_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_next as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_next)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_ino as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_ino)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_namlen as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_namlen)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_type as *const _ as usize },
+            20usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_type)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_event_fd_readwrite_t>(),
+            16usize,
+            concat!("Size of: ", stringify!(__wasi_event_fd_readwrite_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_event_fd_readwrite_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_event_fd_readwrite_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_event_fd_readwrite_t>())).nbytes as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_fd_readwrite_t),
+                "::",
+                stringify!(nbytes)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_event_fd_readwrite_t>())).flags as *const _ as usize
+            },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_fd_readwrite_t),
+                "::",
+                stringify!(flags)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_event_t___wasi_event_u() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_event_u_t>(),
+            16usize,
+            concat!("Size of: ", stringify!(__wasi_event_u_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_event_u_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_event_u_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_event_u_t>())).fd_readwrite as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_u_t),
+                "::",
+                stringify!(fd_readwrite)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_event_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_event_t>(),
+            32usize,
+            concat!("Size of: ", stringify!(__wasi_event_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_event_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_event_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).userdata as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(userdata)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).error as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(error)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).r#type as *const _ as usize },
+            10usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(r#type)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).u as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(u)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout_wasi_event_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_event_t>(),
+            32usize,
+            concat!("Size of: ", stringify!(__wasi_event_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).userdata as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(userdata)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).error as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(error)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).r#type as *const _ as usize },
+            10usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(r#type)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout_wasi_fdstat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_fdstat_t>(),
+            24usize,
+            concat!("Size of: ", stringify!(__wasi_fdstat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_filetype as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_filetype)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_flags as *const _ as usize },
+            2usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_flags)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_base as *const _ as usize
+            },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_rights_base)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_inheriting as *const _
+                    as usize
+            },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_rights_inheriting)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout_wasi_filestat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_filestat_t>(),
+            56usize,
+            concat!("Size of: ", stringify!(__wasi_filestat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).dev as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_dev)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).ino as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_ino)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).filetype as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_filetype)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).nlink as *const _ as usize },
+            20usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_nlink)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).size as *const _ as usize },
+            24usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_size)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).atim as *const _ as usize },
+            32usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_atim)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).mtim as *const _ as usize },
+            40usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_mtim)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).ctim as *const _ as usize },
+            48usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_ctim)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_subscription_clock_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_subscription_clock_t>(),
+            40usize,
+            concat!("Size of: ", stringify!(__wasi_subscription_clock_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_subscription_clock_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_subscription_clock_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_clock_t>())).identifier as *const _
+                    as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_clock_t),
+                "::",
+                stringify!(identifier)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_clock_t>())).id as *const _ as usize
+            },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_clock_t),
+                "::",
+                stringify!(clock_id)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_clock_t>())).timeout as *const _ as usize
+            },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_clock_t),
+                "::",
+                stringify!(timeout)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_clock_t>())).precision as *const _
+                    as usize
+            },
+            24usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_clock_t),
+                "::",
+                stringify!(precision)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_clock_t>())).flags as *const _ as usize
+            },
+            32usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_clock_t),
+                "::",
+                stringify!(flags)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t(
+    ) {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_subscription_fd_readwrite_t>(),
+            4usize,
+            concat!("Size of: ", stringify!(__wasi_subscription_fd_readwrite_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_subscription_fd_readwrite_t>(),
+            4usize,
+            concat!(
+                "Alignment of ",
+                stringify!(__wasi_subscription_fd_readwrite_t)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_fd_readwrite_t>())).file_descriptor
+                    as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_fd_readwrite_t),
+                "::",
+                stringify!(fd)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_subscription_t___wasi_subscription_u() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_subscription_u_t>(),
+            40usize,
+            concat!("Size of: ", stringify!(__wasi_subscription_u_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_subscription_u_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_subscription_u_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_u_t>())).clock as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_u_t),
+                "::",
+                stringify!(clock)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_u_t>())).fd_readwrite as *const _
+                    as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_u_t),
+                "::",
+                stringify!(fd_readwrite)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_subscription_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_subscription_t>(),
+            56usize,
+            concat!("Size of: ", stringify!(__wasi_subscription_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_subscription_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_subscription_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_t>())).userdata as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_t),
+                "::",
+                stringify!(userdata)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_t>())).r#type as *const _ as usize
+            },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_t),
+                "::",
+                stringify!(r#type)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_subscription_t>())).u as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_t),
+                "::",
+                stringify!(u)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_filestat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_filestat_t>(),
+            56usize,
+            concat!("Size of: ", stringify!(__wasi_filestat_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_filestat_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_filestat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).dev as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_dev)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).ino as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_ino)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).filetype as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_filetype)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).nlink as *const _ as usize },
+            20usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_nlink)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).size as *const _ as usize },
+            24usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_size)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).atim as *const _ as usize },
+            32usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_atim)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).mtim as *const _ as usize },
+            40usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_mtim)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).ctim as *const _ as usize },
+            48usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_ctim)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_fdstat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_fdstat_t>(),
+            24usize,
+            concat!("Size of: ", stringify!(__wasi_fdstat_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_fdstat_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_fdstat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_filetype as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_filetype)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_flags as *const _ as usize },
+            2usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_flags)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_base as *const _ as usize
+            },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_rights_base)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_inheriting as *const _
+                    as usize
+            },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_rights_inheriting)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_dirent_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_dirent_t>(),
+            24usize,
+            concat!("Size of: ", stringify!(__wasi_dirent_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_dirent_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_dirent_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_next as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_next)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_ino as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_ino)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_namlen as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_namlen)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_type as *const _ as usize },
+            20usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_type)
+            )
+        );
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/old/snapshot_0/wasi32.rs.html b/api/src/wasi_common/old/snapshot_0/wasi32.rs.html new file mode 100644 index 000000000000..0e5702b5ea82 --- /dev/null +++ b/api/src/wasi_common/old/snapshot_0/wasi32.rs.html @@ -0,0 +1,347 @@ +wasi32.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+
+//! Types and constants specific to 32-bit wasi. These are similar to the types
+//! in the `host` module, but pointers and `usize` values are replaced with
+//! `u32`-sized types.
+
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+#![allow(dead_code)]
+
+use crate::old::snapshot_0::wasi::*;
+use wig::witx_wasi32_types;
+
+pub type uintptr_t = u32;
+pub type size_t = u32;
+
+witx_wasi32_types!("old/snapshot_0" "wasi_unstable");
+
+#[cfg(test)]
+mod test {
+    use super::*;
+
+    #[test]
+    fn bindgen_test_layout_wasi_ciovec_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_ciovec_t>(),
+            8usize,
+            concat!("Size of: ", stringify!(__wasi_ciovec_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_ciovec_t>(),
+            4usize,
+            concat!("Alignment of ", stringify!(__wasi_ciovec_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_ciovec_t>())).buf as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_ciovec_t),
+                "::",
+                stringify!(buf)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_ciovec_t>())).buf_len as *const _ as usize },
+            4usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_ciovec_t),
+                "::",
+                stringify!(buf_len)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout_wasi_iovec_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_iovec_t>(),
+            8usize,
+            concat!("Size of: ", stringify!(__wasi_iovec_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_iovec_t>(),
+            4usize,
+            concat!("Alignment of ", stringify!(__wasi_iovec_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_iovec_t>())).buf as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_iovec_t),
+                "::",
+                stringify!(buf)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_iovec_t>())).buf_len as *const _ as usize },
+            4usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_iovec_t),
+                "::",
+                stringify!(buf_len)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_dir_t>(),
+            4usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_dir_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_dir_t>(),
+            4usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_dir_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_prestat_dir_t>())).pr_name_len as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_dir_t),
+                "::",
+                stringify!(pr_name_len)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_u_t>(),
+            4usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_u_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_u_t>(),
+            4usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_u_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_u_t>())).dir as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_u_t),
+                "::",
+                stringify!(dir)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_t>(),
+            8usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_t>(),
+            4usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).pr_type as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_t),
+                "::",
+                stringify!(pr_type)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).u as *const _ as usize },
+            4usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_t),
+                "::",
+                stringify!(u)
+            )
+        );
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sandboxed_tty_writer.rs.html b/api/src/wasi_common/sandboxed_tty_writer.rs.html new file mode 100644 index 000000000000..3359781a3977 --- /dev/null +++ b/api/src/wasi_common/sandboxed_tty_writer.rs.html @@ -0,0 +1,401 @@ +sandboxed_tty_writer.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+
+use std::io::{IoSlice, Result, Write};
+
+/// An adapter around a `Write` stream that guarantees that its output
+/// is valid UTF-8 and contains no control characters. It does this by
+/// replacing characters with inert control pictures and replacement
+/// characters.
+pub(crate) struct SandboxedTTYWriter<'writer, Writer>
+where
+    Writer: Write,
+{
+    inner: &'writer mut Writer,
+}
+
+impl<'writer, Writer> SandboxedTTYWriter<'writer, Writer>
+where
+    Writer: Write,
+{
+    /// Construct a new `SandboxedTTYWriter` with the given inner `Writer`.
+    pub(crate) fn new(inner: &'writer mut Writer) -> Self {
+        Self { inner }
+    }
+
+    /// Write a single character to the output.
+    pub(crate) fn write_char(&mut self, c: char) -> Result<()> {
+        self.inner.write(
+            match c {
+                '\u{0000}' => '␀',
+                '\u{0001}' => '␁',
+                '\u{0002}' => '␂',
+                '\u{0003}' => '␃',
+                '\u{0004}' => '␄',
+                '\u{0005}' => '␅',
+                '\u{0006}' => '␆',
+                '\u{0007}' => '␇',
+                '\u{0008}' => '␈',
+                '\u{0009}' => '\t',
+                '\u{000A}' => '\n',
+                '\u{000B}' => '␋',
+                '\u{000C}' => '␌',
+                '\u{000D}' => '\r',
+                '\u{000E}' => '␎',
+                '\u{000F}' => '␏',
+                '\u{0010}' => '␐',
+                '\u{0011}' => '␑',
+                '\u{0012}' => '␒',
+                '\u{0013}' => '␓',
+                '\u{0014}' => '␔',
+                '\u{0015}' => '␕',
+                '\u{0016}' => '␖',
+                '\u{0017}' => '␗',
+                '\u{0018}' => '␘',
+                '\u{0019}' => '␙',
+                '\u{001A}' => '␚',
+                '\u{001B}' => '␛',
+                '\u{001C}' => '␜',
+                '\u{001D}' => '␝',
+                '\u{001E}' => '␞',
+                '\u{001F}' => '␟',
+                '\u{007F}' => '␡',
+                x if x.is_control() => '�',
+                x => x,
+            }
+            .encode_utf8(&mut [0; 4]) // UTF-8 encoding of a `char` is at most 4 bytes.
+            .as_bytes(),
+        )?;
+
+        Ok(())
+    }
+
+    /// Write a string to the output.
+    pub(crate) fn write_str(&mut self, s: &str) -> Result<usize> {
+        let mut result = 0;
+
+        for c in s.chars() {
+            self.write_char(c)?;
+            // Note that we use the encoding length of the given char, rather than
+            // how many bytes we actually wrote, because our users don't know about
+            // what's really being written.
+            result += c.len_utf8();
+        }
+
+        Ok(result)
+    }
+}
+
+impl<'writer, Writer> Write for SandboxedTTYWriter<'writer, Writer>
+where
+    Writer: Write,
+{
+    fn write(&mut self, buf: &[u8]) -> Result<usize> {
+        let mut input = buf;
+        let mut result = 0;
+
+        // Decode the string without heap-allocating it. See the example here
+        // for more details:
+        // https://doc.rust-lang.org/std/str/struct.Utf8Error.html#examples
+        loop {
+            match std::str::from_utf8(input) {
+                Ok(valid) => {
+                    result += self.write_str(valid)?;
+                    break;
+                }
+                Err(error) => {
+                    let (valid, after_valid) = input.split_at(error.valid_up_to());
+                    result += self.write_str(unsafe { std::str::from_utf8_unchecked(valid) })?;
+                    self.write_char('�')?;
+
+                    if let Some(invalid_sequence_length) = error.error_len() {
+                        // An invalid sequence was encountered. Tell the application we've
+                        // written those bytes (though actually, we replaced them with U+FFFD).
+                        result += invalid_sequence_length;
+                        // Set up `input` to resume writing after the end of the sequence.
+                        input = &after_valid[invalid_sequence_length..];
+                    } else {
+                        // The end of the buffer was encountered unexpectedly. Tell the application
+                        // we've written out the remainder of the buffer.
+                        result += after_valid.len();
+                        break;
+                    }
+                }
+            }
+        }
+
+        return Ok(result);
+    }
+
+    fn write_vectored(&mut self, bufs: &[IoSlice]) -> Result<usize> {
+        // Terminal output is [not expected to be atomic], so just write all the
+        // individual buffers in sequence.
+        //
+        // [not expected to be atomic]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html#tag_16_474_08
+        let mut total_written = 0;
+
+        for buf in bufs {
+            let written = self.write(buf)?;
+
+            total_written += written;
+
+            // Stop at the first point where the OS writes less than we asked.
+            if written < buf.len() {
+                break;
+            }
+        }
+
+        Ok(total_written)
+    }
+
+    fn flush(&mut self) -> Result<()> {
+        self.inner.flush()
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::SandboxedTTYWriter;
+    use std::io::{Result, Write};
+
+    #[test]
+    fn basic() -> Result<()> {
+        let mut buffer = Vec::new();
+        let mut safe = SandboxedTTYWriter::new(&mut buffer);
+        safe.write_str("a\0b\u{0080}")?;
+        safe.write_char('\u{0007}')?;
+        safe.write(&[0x80])?;
+        safe.write(&[0xed, 0xa0, 0x80, 0xff, 0xfe])?;
+        assert_eq!(
+            buffer,
+            "a\u{2400}b\u{FFFD}\u{2407}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}".as_bytes()
+        );
+        Ok(())
+    }
+
+    #[test]
+    fn how_many_replacements() -> Result<()> {
+        // See https://hsivonen.fi/broken-utf-8/ for background.
+
+        let mut buffer = Vec::new();
+        let mut safe = SandboxedTTYWriter::new(&mut buffer);
+        safe.write(&[0x80, 0x80, 0x80, 0x80])?;
+        assert_eq!(buffer, "\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}".as_bytes());
+
+        let mut buffer = Vec::new();
+        let mut safe = SandboxedTTYWriter::new(&mut buffer);
+        safe.write(&[0xF0, 0x80, 0x80, 0x41])?;
+        assert_eq!(buffer, "\u{FFFD}\u{FFFD}\u{FFFD}A".as_bytes());
+
+        let mut buffer = Vec::new();
+        let mut safe = SandboxedTTYWriter::new(&mut buffer);
+        safe.write(&[0xF0, 0x80, 0x80])?;
+        assert_eq!(buffer, "\u{FFFD}\u{FFFD}\u{FFFD}".as_bytes());
+
+        let mut buffer = Vec::new();
+        let mut safe = SandboxedTTYWriter::new(&mut buffer);
+        safe.write(&[0xF4, 0x80, 0x80, 0xC0])?;
+        assert_eq!(buffer, "\u{FFFD}\u{FFFD}".as_bytes());
+
+        Ok(())
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/mod.rs.html b/api/src/wasi_common/sys/mod.rs.html new file mode 100644 index 000000000000..ca6d061ca330 --- /dev/null +++ b/api/src/wasi_common/sys/mod.rs.html @@ -0,0 +1,33 @@ +mod.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+
+use cfg_if::cfg_if;
+
+cfg_if! {
+    if #[cfg(unix)] {
+        mod unix;
+        pub(crate) use unix::*;
+        pub use unix::preopen_dir;
+    } else if #[cfg(windows)] {
+        mod windows;
+        pub(crate) use windows::*;
+        pub use windows::preopen_dir;
+    } else {
+        compile_error!("wasi-common doesn't compile for this platform yet");
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/fdentry_impl.rs.html b/api/src/wasi_common/sys/unix/fdentry_impl.rs.html new file mode 100644 index 000000000000..54d4ff33bf4c --- /dev/null +++ b/api/src/wasi_common/sys/unix/fdentry_impl.rs.html @@ -0,0 +1,273 @@ +fdentry_impl.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+
+use crate::fdentry::{Descriptor, OsHandleRef};
+use crate::{sys::unix::sys_impl, wasi, Error, Result};
+use std::fs::File;
+use std::io;
+use std::mem::ManuallyDrop;
+use std::os::unix::prelude::{AsRawFd, FileTypeExt, FromRawFd, RawFd};
+
+pub(crate) use sys_impl::oshandle::*;
+
+impl AsRawFd for Descriptor {
+    fn as_raw_fd(&self) -> RawFd {
+        match self {
+            Self::OsHandle(file) => file.as_raw_fd(),
+            Self::Stdin => io::stdin().as_raw_fd(),
+            Self::Stdout => io::stdout().as_raw_fd(),
+            Self::Stderr => io::stderr().as_raw_fd(),
+        }
+    }
+}
+
+pub(crate) fn descriptor_as_oshandle<'lifetime>(
+    desc: &'lifetime Descriptor,
+) -> OsHandleRef<'lifetime> {
+    OsHandleRef::new(ManuallyDrop::new(OsHandle::from(unsafe {
+        File::from_raw_fd(desc.as_raw_fd())
+    })))
+}
+
+/// Returns the set of all possible rights that are both relevant for the file
+/// type and consistent with the open mode.
+///
+/// This function is unsafe because it operates on a raw file descriptor.
+pub(crate) unsafe fn determine_type_and_access_rights<Fd: AsRawFd>(
+    fd: &Fd,
+) -> Result<(
+    wasi::__wasi_filetype_t,
+    wasi::__wasi_rights_t,
+    wasi::__wasi_rights_t,
+)> {
+    let (file_type, mut rights_base, rights_inheriting) = determine_type_rights(fd)?;
+
+    use yanix::{fcntl, file::OFlag};
+    let flags = fcntl::get_status_flags(fd.as_raw_fd())?;
+    let accmode = flags & OFlag::ACCMODE;
+    if accmode == OFlag::RDONLY {
+        rights_base &= !wasi::__WASI_RIGHTS_FD_WRITE;
+    } else if accmode == OFlag::WRONLY {
+        rights_base &= !wasi::__WASI_RIGHTS_FD_READ;
+    }
+
+    Ok((file_type, rights_base, rights_inheriting))
+}
+
+/// Returns the set of all possible rights that are relevant for file type.
+///
+/// This function is unsafe because it operates on a raw file descriptor.
+pub(crate) unsafe fn determine_type_rights<Fd: AsRawFd>(
+    fd: &Fd,
+) -> Result<(
+    wasi::__wasi_filetype_t,
+    wasi::__wasi_rights_t,
+    wasi::__wasi_rights_t,
+)> {
+    let (file_type, rights_base, rights_inheriting) = {
+        // we just make a `File` here for convenience; we don't want it to close when it drops
+        let file = std::mem::ManuallyDrop::new(std::fs::File::from_raw_fd(fd.as_raw_fd()));
+        let ft = file.metadata()?.file_type();
+        if ft.is_block_device() {
+            log::debug!("Host fd {:?} is a block device", fd.as_raw_fd());
+            (
+                wasi::__WASI_FILETYPE_BLOCK_DEVICE,
+                wasi::RIGHTS_BLOCK_DEVICE_BASE,
+                wasi::RIGHTS_BLOCK_DEVICE_INHERITING,
+            )
+        } else if ft.is_char_device() {
+            log::debug!("Host fd {:?} is a char device", fd.as_raw_fd());
+            use yanix::file::isatty;
+            if isatty(fd.as_raw_fd())? {
+                (
+                    wasi::__WASI_FILETYPE_CHARACTER_DEVICE,
+                    wasi::RIGHTS_TTY_BASE,
+                    wasi::RIGHTS_TTY_BASE,
+                )
+            } else {
+                (
+                    wasi::__WASI_FILETYPE_CHARACTER_DEVICE,
+                    wasi::RIGHTS_CHARACTER_DEVICE_BASE,
+                    wasi::RIGHTS_CHARACTER_DEVICE_INHERITING,
+                )
+            }
+        } else if ft.is_dir() {
+            log::debug!("Host fd {:?} is a directory", fd.as_raw_fd());
+            (
+                wasi::__WASI_FILETYPE_DIRECTORY,
+                wasi::RIGHTS_DIRECTORY_BASE,
+                wasi::RIGHTS_DIRECTORY_INHERITING,
+            )
+        } else if ft.is_file() {
+            log::debug!("Host fd {:?} is a file", fd.as_raw_fd());
+            (
+                wasi::__WASI_FILETYPE_REGULAR_FILE,
+                wasi::RIGHTS_REGULAR_FILE_BASE,
+                wasi::RIGHTS_REGULAR_FILE_INHERITING,
+            )
+        } else if ft.is_socket() {
+            log::debug!("Host fd {:?} is a socket", fd.as_raw_fd());
+            use yanix::socket::{get_socket_type, SockType};
+            match get_socket_type(fd.as_raw_fd())? {
+                SockType::Datagram => (
+                    wasi::__WASI_FILETYPE_SOCKET_DGRAM,
+                    wasi::RIGHTS_SOCKET_BASE,
+                    wasi::RIGHTS_SOCKET_INHERITING,
+                ),
+                SockType::Stream => (
+                    wasi::__WASI_FILETYPE_SOCKET_STREAM,
+                    wasi::RIGHTS_SOCKET_BASE,
+                    wasi::RIGHTS_SOCKET_INHERITING,
+                ),
+                _ => return Err(Error::EINVAL),
+            }
+        } else if ft.is_fifo() {
+            log::debug!("Host fd {:?} is a fifo", fd.as_raw_fd());
+            (
+                wasi::__WASI_FILETYPE_UNKNOWN,
+                wasi::RIGHTS_REGULAR_FILE_BASE,
+                wasi::RIGHTS_REGULAR_FILE_INHERITING,
+            )
+        } else {
+            log::debug!("Host fd {:?} is unknown", fd.as_raw_fd());
+            return Err(Error::EINVAL);
+        }
+    };
+
+    Ok((file_type, rights_base, rights_inheriting))
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/filetime.rs.html b/api/src/wasi_common/sys/unix/filetime.rs.html new file mode 100644 index 000000000000..a330058ce64e --- /dev/null +++ b/api/src/wasi_common/sys/unix/filetime.rs.html @@ -0,0 +1,137 @@ +filetime.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+
+//! This internal module consists of helper types and functions for dealing
+//! with setting the file times (mainly in `path_filestat_set_times` syscall for now).
+//!
+//! The vast majority of the code contained within and in platform-specific implementations
+//! (`super::linux::filetime` and `super::bsd::filetime`) is based on the [filetime] crate.
+//! Kudos @alexcrichton!
+//!
+//! [filetime]: https://github.com/alexcrichton/filetime
+use crate::Result;
+use std::convert::TryInto;
+
+pub(crate) use super::sys_impl::filetime::*;
+
+cfg_if::cfg_if! {
+    if #[cfg(not(target_os = "emscripten"))] {
+        fn filetime_to_timespec(ft: &filetime::FileTime) -> Result<libc::timespec> {
+            Ok(
+                libc::timespec {
+                    tv_sec: ft.seconds(),
+                    tv_nsec: ft.nanoseconds().try_into()?,
+                }
+            )
+        }
+    } else {
+        fn filetime_to_timespec(ft: &filetime::FileTime) -> Result<libc::timespec> {
+            Ok(
+                libc::timespec {
+                    tv_sec: ft.seconds().try_into()?,
+                    tv_nsec: ft.nanoseconds().try_into()?,
+                }
+            )
+        }
+    }
+}
+
+/// A wrapper `enum` around `filetime::FileTime` struct, but unlike the original, this
+/// type allows the possibility of specifying `FileTime::Now` as a valid enumeration which,
+/// in turn, if `utimensat` is available on the host, will use a special const setting
+/// `UTIME_NOW`.
+#[derive(Debug, Copy, Clone)]
+pub(crate) enum FileTime {
+    Now,
+    Omit,
+    FileTime(filetime::FileTime),
+}
+
+/// Converts `FileTime` to `libc::timespec`. If `FileTime::Now` variant is specified, this
+/// resolves to `UTIME_NOW` special const, `FileTime::Omit` variant resolves to `UTIME_OMIT`, and
+/// `FileTime::FileTime(ft)` where `ft := filetime::FileTime` uses [filetime] crate's original
+/// implementation which can be found here: [filetime::unix::to_timespec].
+///
+/// [filetime]: https://github.com/alexcrichton/filetime
+/// [filetime::unix::to_timespec]: https://github.com/alexcrichton/filetime/blob/master/src/unix/mod.rs#L30
+pub(crate) fn to_timespec(ft: &FileTime) -> Result<libc::timespec> {
+    let ts = match ft {
+        FileTime::Now => libc::timespec {
+            tv_sec: 0,
+            tv_nsec: UTIME_NOW,
+        },
+        FileTime::Omit => libc::timespec {
+            tv_sec: 0,
+            tv_nsec: UTIME_OMIT,
+        },
+        FileTime::FileTime(ft) => filetime_to_timespec(ft)?,
+    };
+    Ok(ts)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/host_impl.rs.html b/api/src/wasi_common/sys/unix/host_impl.rs.html new file mode 100644 index 000000000000..39f6543c51dd --- /dev/null +++ b/api/src/wasi_common/sys/unix/host_impl.rs.html @@ -0,0 +1,519 @@ +host_impl.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+
+//! WASI host types specific to *nix host.
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+#![allow(dead_code)]
+use crate::host::FileType;
+use crate::{error::FromRawOsError, helpers, sys::unix::sys_impl, wasi, Error, Result};
+use std::ffi::OsStr;
+use std::os::unix::prelude::OsStrExt;
+use yanix::{
+    file::{OFlag, SFlag},
+    Errno,
+};
+
+pub(crate) use sys_impl::host_impl::*;
+
+impl FromRawOsError for Error {
+    fn from_raw_os_error(code: i32) -> Self {
+        Self::from(Errno::from_i32(code))
+    }
+}
+
+impl From<Errno> for Error {
+    fn from(errno: Errno) -> Self {
+        match errno {
+            Errno::EPERM => Self::EPERM,
+            Errno::ENOENT => Self::ENOENT,
+            Errno::ESRCH => Self::ESRCH,
+            Errno::EINTR => Self::EINTR,
+            Errno::EIO => Self::EIO,
+            Errno::ENXIO => Self::ENXIO,
+            Errno::E2BIG => Self::E2BIG,
+            Errno::ENOEXEC => Self::ENOEXEC,
+            Errno::EBADF => Self::EBADF,
+            Errno::ECHILD => Self::ECHILD,
+            Errno::EAGAIN => Self::EAGAIN,
+            Errno::ENOMEM => Self::ENOMEM,
+            Errno::EACCES => Self::EACCES,
+            Errno::EFAULT => Self::EFAULT,
+            Errno::EBUSY => Self::EBUSY,
+            Errno::EEXIST => Self::EEXIST,
+            Errno::EXDEV => Self::EXDEV,
+            Errno::ENODEV => Self::ENODEV,
+            Errno::ENOTDIR => Self::ENOTDIR,
+            Errno::EISDIR => Self::EISDIR,
+            Errno::EINVAL => Self::EINVAL,
+            Errno::ENFILE => Self::ENFILE,
+            Errno::EMFILE => Self::EMFILE,
+            Errno::ENOTTY => Self::ENOTTY,
+            Errno::ETXTBSY => Self::ETXTBSY,
+            Errno::EFBIG => Self::EFBIG,
+            Errno::ENOSPC => Self::ENOSPC,
+            Errno::ESPIPE => Self::ESPIPE,
+            Errno::EROFS => Self::EROFS,
+            Errno::EMLINK => Self::EMLINK,
+            Errno::EPIPE => Self::EPIPE,
+            Errno::EDOM => Self::EDOM,
+            Errno::ERANGE => Self::ERANGE,
+            Errno::EDEADLK => Self::EDEADLK,
+            Errno::ENAMETOOLONG => Self::ENAMETOOLONG,
+            Errno::ENOLCK => Self::ENOLCK,
+            Errno::ENOSYS => Self::ENOSYS,
+            Errno::ENOTEMPTY => Self::ENOTEMPTY,
+            Errno::ELOOP => Self::ELOOP,
+            Errno::ENOMSG => Self::ENOMSG,
+            Errno::EIDRM => Self::EIDRM,
+            Errno::ENOLINK => Self::ENOLINK,
+            Errno::EPROTO => Self::EPROTO,
+            Errno::EMULTIHOP => Self::EMULTIHOP,
+            Errno::EBADMSG => Self::EBADMSG,
+            Errno::EOVERFLOW => Self::EOVERFLOW,
+            Errno::EILSEQ => Self::EILSEQ,
+            Errno::ENOTSOCK => Self::ENOTSOCK,
+            Errno::EDESTADDRREQ => Self::EDESTADDRREQ,
+            Errno::EMSGSIZE => Self::EMSGSIZE,
+            Errno::EPROTOTYPE => Self::EPROTOTYPE,
+            Errno::ENOPROTOOPT => Self::ENOPROTOOPT,
+            Errno::EPROTONOSUPPORT => Self::EPROTONOSUPPORT,
+            Errno::EAFNOSUPPORT => Self::EAFNOSUPPORT,
+            Errno::EADDRINUSE => Self::EADDRINUSE,
+            Errno::EADDRNOTAVAIL => Self::EADDRNOTAVAIL,
+            Errno::ENETDOWN => Self::ENETDOWN,
+            Errno::ENETUNREACH => Self::ENETUNREACH,
+            Errno::ENETRESET => Self::ENETRESET,
+            Errno::ECONNABORTED => Self::ECONNABORTED,
+            Errno::ECONNRESET => Self::ECONNRESET,
+            Errno::ENOBUFS => Self::ENOBUFS,
+            Errno::EISCONN => Self::EISCONN,
+            Errno::ENOTCONN => Self::ENOTCONN,
+            Errno::ETIMEDOUT => Self::ETIMEDOUT,
+            Errno::ECONNREFUSED => Self::ECONNREFUSED,
+            Errno::EHOSTUNREACH => Self::EHOSTUNREACH,
+            Errno::EALREADY => Self::EALREADY,
+            Errno::EINPROGRESS => Self::EINPROGRESS,
+            Errno::ESTALE => Self::ESTALE,
+            Errno::EDQUOT => Self::EDQUOT,
+            Errno::ECANCELED => Self::ECANCELED,
+            Errno::EOWNERDEAD => Self::EOWNERDEAD,
+            Errno::ENOTRECOVERABLE => Self::ENOTRECOVERABLE,
+        }
+    }
+}
+
+pub(crate) fn nix_from_fdflags(fdflags: wasi::__wasi_fdflags_t) -> OFlag {
+    let mut nix_flags = OFlag::empty();
+    if fdflags & wasi::__WASI_FDFLAGS_APPEND != 0 {
+        nix_flags.insert(OFlag::APPEND);
+    }
+    if fdflags & wasi::__WASI_FDFLAGS_DSYNC != 0 {
+        nix_flags.insert(OFlag::DSYNC);
+    }
+    if fdflags & wasi::__WASI_FDFLAGS_NONBLOCK != 0 {
+        nix_flags.insert(OFlag::NONBLOCK);
+    }
+    if fdflags & wasi::__WASI_FDFLAGS_RSYNC != 0 {
+        nix_flags.insert(O_RSYNC);
+    }
+    if fdflags & wasi::__WASI_FDFLAGS_SYNC != 0 {
+        nix_flags.insert(OFlag::SYNC);
+    }
+    nix_flags
+}
+
+pub(crate) fn fdflags_from_nix(oflags: OFlag) -> wasi::__wasi_fdflags_t {
+    let mut fdflags = 0;
+    if oflags.contains(OFlag::APPEND) {
+        fdflags |= wasi::__WASI_FDFLAGS_APPEND;
+    }
+    if oflags.contains(OFlag::DSYNC) {
+        fdflags |= wasi::__WASI_FDFLAGS_DSYNC;
+    }
+    if oflags.contains(OFlag::NONBLOCK) {
+        fdflags |= wasi::__WASI_FDFLAGS_NONBLOCK;
+    }
+    if oflags.contains(O_RSYNC) {
+        fdflags |= wasi::__WASI_FDFLAGS_RSYNC;
+    }
+    if oflags.contains(OFlag::SYNC) {
+        fdflags |= wasi::__WASI_FDFLAGS_SYNC;
+    }
+    fdflags
+}
+
+pub(crate) fn nix_from_oflags(oflags: wasi::__wasi_oflags_t) -> OFlag {
+    let mut nix_flags = OFlag::empty();
+    if oflags & wasi::__WASI_OFLAGS_CREAT != 0 {
+        nix_flags.insert(OFlag::CREAT);
+    }
+    if oflags & wasi::__WASI_OFLAGS_DIRECTORY != 0 {
+        nix_flags.insert(OFlag::DIRECTORY);
+    }
+    if oflags & wasi::__WASI_OFLAGS_EXCL != 0 {
+        nix_flags.insert(OFlag::EXCL);
+    }
+    if oflags & wasi::__WASI_OFLAGS_TRUNC != 0 {
+        nix_flags.insert(OFlag::TRUNC);
+    }
+    nix_flags
+}
+
+pub(crate) fn filetype_from_nix(sflags: SFlag) -> FileType {
+    if sflags.contains(SFlag::IFCHR) {
+        FileType::CharacterDevice
+    } else if sflags.contains(SFlag::IFBLK) {
+        FileType::BlockDevice
+    } else if sflags.contains(SFlag::IFSOCK) {
+        FileType::SocketStream
+    } else if sflags.contains(SFlag::IFDIR) {
+        FileType::Directory
+    } else if sflags.contains(SFlag::IFREG) {
+        FileType::RegularFile
+    } else if sflags.contains(SFlag::IFLNK) {
+        FileType::Symlink
+    } else {
+        FileType::Unknown
+    }
+}
+
+pub(crate) fn filestat_from_nix(filestat: libc::stat) -> Result<wasi::__wasi_filestat_t> {
+    use std::convert::TryInto;
+
+    fn filestat_to_timestamp(secs: u64, nsecs: u64) -> Result<wasi::__wasi_timestamp_t> {
+        secs.checked_mul(1_000_000_000)
+            .and_then(|sec_nsec| sec_nsec.checked_add(nsecs))
+            .ok_or(Error::EOVERFLOW)
+    }
+
+    let filetype = SFlag::from_bits_truncate(filestat.st_mode);
+    let dev = stdev_from_nix(filestat.st_dev)?;
+    let ino = stino_from_nix(filestat.st_ino)?;
+    let atim = filestat_to_timestamp(
+        filestat.st_atime.try_into()?,
+        filestat.st_atime_nsec.try_into()?,
+    )?;
+    let ctim = filestat_to_timestamp(
+        filestat.st_ctime.try_into()?,
+        filestat.st_ctime_nsec.try_into()?,
+    )?;
+    let mtim = filestat_to_timestamp(
+        filestat.st_mtime.try_into()?,
+        filestat.st_mtime_nsec.try_into()?,
+    )?;
+
+    Ok(wasi::__wasi_filestat_t {
+        dev,
+        ino,
+        nlink: wasi::__wasi_linkcount_t::from(filestat.st_nlink),
+        size: filestat.st_size as wasi::__wasi_filesize_t,
+        atim,
+        ctim,
+        mtim,
+        filetype: filetype_from_nix(filetype).to_wasi(),
+    })
+}
+
+pub(crate) fn dirent_filetype_from_host(
+    host_entry: &libc::dirent,
+) -> Result<wasi::__wasi_filetype_t> {
+    match host_entry.d_type {
+        libc::DT_FIFO => Ok(wasi::__WASI_FILETYPE_UNKNOWN),
+        libc::DT_CHR => Ok(wasi::__WASI_FILETYPE_CHARACTER_DEVICE),
+        libc::DT_DIR => Ok(wasi::__WASI_FILETYPE_DIRECTORY),
+        libc::DT_BLK => Ok(wasi::__WASI_FILETYPE_BLOCK_DEVICE),
+        libc::DT_REG => Ok(wasi::__WASI_FILETYPE_REGULAR_FILE),
+        libc::DT_LNK => Ok(wasi::__WASI_FILETYPE_SYMBOLIC_LINK),
+        libc::DT_SOCK => {
+            // TODO how to discriminate between STREAM and DGRAM?
+            // Perhaps, we should create a more general WASI filetype
+            // such as __WASI_FILETYPE_SOCKET, and then it would be
+            // up to the client to check whether it's actually
+            // STREAM or DGRAM?
+            Ok(wasi::__WASI_FILETYPE_UNKNOWN)
+        }
+        libc::DT_UNKNOWN => Ok(wasi::__WASI_FILETYPE_UNKNOWN),
+        _ => Err(Error::EINVAL),
+    }
+}
+
+/// Creates owned WASI path from OS string.
+///
+/// NB WASI spec requires OS string to be valid UTF-8. Otherwise,
+/// `__WASI_ERRNO_ILSEQ` error is returned.
+pub(crate) fn path_from_host<S: AsRef<OsStr>>(s: S) -> Result<String> {
+    helpers::path_from_slice(s.as_ref().as_bytes()).map(String::from)
+}
+
+impl From<yanix::dir::FileType> for FileType {
+    fn from(ft: yanix::dir::FileType) -> Self {
+        use yanix::dir::FileType::*;
+        match ft {
+            RegularFile => Self::RegularFile,
+            Symlink => Self::Symlink,
+            Directory => Self::Directory,
+            BlockDevice => Self::BlockDevice,
+            CharacterDevice => Self::CharacterDevice,
+            /* Unknown | Socket | Fifo */ _ => Self::Unknown,
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/hostcalls_impl/fs.rs.html b/api/src/wasi_common/sys/unix/hostcalls_impl/fs.rs.html new file mode 100644 index 000000000000..3bad0b5c9f6b --- /dev/null +++ b/api/src/wasi_common/sys/unix/hostcalls_impl/fs.rs.html @@ -0,0 +1,641 @@ +fs.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+
+#![allow(non_camel_case_types)]
+#![allow(unused_unsafe)]
+use crate::host::Dirent;
+use crate::hostcalls_impl::PathGet;
+use crate::sys::{fdentry_impl::OsHandle, host_impl, unix::sys_impl};
+use crate::{wasi, Error, Result};
+use std::convert::TryInto;
+use std::fs::File;
+use std::os::unix::fs::FileExt;
+use std::os::unix::prelude::{AsRawFd, FromRawFd};
+
+pub(crate) use sys_impl::hostcalls_impl::*;
+
+pub(crate) fn fd_pread(
+    file: &File,
+    buf: &mut [u8],
+    offset: wasi::__wasi_filesize_t,
+) -> Result<usize> {
+    file.read_at(buf, offset).map_err(Into::into)
+}
+
+pub(crate) fn fd_pwrite(file: &File, buf: &[u8], offset: wasi::__wasi_filesize_t) -> Result<usize> {
+    file.write_at(buf, offset).map_err(Into::into)
+}
+
+pub(crate) fn fd_fdstat_get(fd: &File) -> Result<wasi::__wasi_fdflags_t> {
+    unsafe { yanix::fcntl::get_status_flags(fd.as_raw_fd()) }
+        .map(host_impl::fdflags_from_nix)
+        .map_err(Into::into)
+}
+
+pub(crate) fn fd_fdstat_set_flags(
+    fd: &File,
+    fdflags: wasi::__wasi_fdflags_t,
+) -> Result<Option<OsHandle>> {
+    let nix_flags = host_impl::nix_from_fdflags(fdflags);
+    unsafe { yanix::fcntl::set_status_flags(fd.as_raw_fd(), nix_flags) }
+        .map(|_| None)
+        .map_err(Into::into)
+}
+
+pub(crate) fn fd_advise(
+    file: &File,
+    advice: wasi::__wasi_advice_t,
+    offset: wasi::__wasi_filesize_t,
+    len: wasi::__wasi_filesize_t,
+) -> Result<()> {
+    use yanix::fadvise::{posix_fadvise, PosixFadviseAdvice};
+    let offset = offset.try_into()?;
+    let len = len.try_into()?;
+    let host_advice = match advice {
+        wasi::__WASI_ADVICE_DONTNEED => PosixFadviseAdvice::DontNeed,
+        wasi::__WASI_ADVICE_SEQUENTIAL => PosixFadviseAdvice::Sequential,
+        wasi::__WASI_ADVICE_WILLNEED => PosixFadviseAdvice::WillNeed,
+        wasi::__WASI_ADVICE_NOREUSE => PosixFadviseAdvice::NoReuse,
+        wasi::__WASI_ADVICE_RANDOM => PosixFadviseAdvice::Random,
+        wasi::__WASI_ADVICE_NORMAL => PosixFadviseAdvice::Normal,
+        _ => return Err(Error::EINVAL),
+    };
+    unsafe { posix_fadvise(file.as_raw_fd(), offset, len, host_advice) }.map_err(Into::into)
+}
+
+pub(crate) fn path_create_directory(resolved: PathGet) -> Result<()> {
+    use yanix::file::{mkdirat, Mode};
+    unsafe {
+        mkdirat(
+            resolved.dirfd().as_raw_fd(),
+            resolved.path(),
+            Mode::from_bits_truncate(0o777),
+        )
+    }
+    .map_err(Into::into)
+}
+
+pub(crate) fn path_link(resolved_old: PathGet, resolved_new: PathGet) -> Result<()> {
+    use yanix::file::{linkat, AtFlag};
+    unsafe {
+        linkat(
+            resolved_old.dirfd().as_raw_fd(),
+            resolved_old.path(),
+            resolved_new.dirfd().as_raw_fd(),
+            resolved_new.path(),
+            AtFlag::SYMLINK_FOLLOW,
+        )
+    }
+    .map_err(Into::into)
+}
+
+pub(crate) fn path_open(
+    resolved: PathGet,
+    read: bool,
+    write: bool,
+    oflags: wasi::__wasi_oflags_t,
+    fs_flags: wasi::__wasi_fdflags_t,
+) -> Result<File> {
+    use yanix::{
+        file::{fstatat, openat, AtFlag, Mode, OFlag, SFlag},
+        Errno,
+    };
+
+    let mut nix_all_oflags = if read && write {
+        OFlag::RDWR
+    } else if write {
+        OFlag::WRONLY
+    } else {
+        OFlag::RDONLY
+    };
+
+    // on non-Capsicum systems, we always want nofollow
+    nix_all_oflags.insert(OFlag::NOFOLLOW);
+
+    // convert open flags
+    nix_all_oflags.insert(host_impl::nix_from_oflags(oflags));
+
+    // convert file descriptor flags
+    nix_all_oflags.insert(host_impl::nix_from_fdflags(fs_flags));
+
+    // Call openat. Use mode 0o666 so that we follow whatever the user's
+    // umask is, but don't set the executable flag, because it isn't yet
+    // meaningful for WASI programs to create executable files.
+
+    log::debug!("path_open resolved = {:?}", resolved);
+    log::debug!("path_open oflags = {:?}", nix_all_oflags);
+
+    let new_fd = match unsafe {
+        openat(
+            resolved.dirfd().as_raw_fd(),
+            resolved.path(),
+            nix_all_oflags,
+            Mode::from_bits_truncate(0o666),
+        )
+    } {
+        Ok(fd) => fd,
+        Err(e) => {
+            if let yanix::YanixError::Errno(errno) = e {
+                match errno {
+                    // Linux returns ENXIO instead of EOPNOTSUPP when opening a socket
+                    Errno::ENXIO => {
+                        if let Ok(stat) = unsafe {
+                            fstatat(
+                                resolved.dirfd().as_raw_fd(),
+                                resolved.path(),
+                                AtFlag::SYMLINK_NOFOLLOW,
+                            )
+                        } {
+                            if SFlag::from_bits_truncate(stat.st_mode).contains(SFlag::IFSOCK) {
+                                return Err(Error::ENOTSUP);
+                            } else {
+                                return Err(Error::ENXIO);
+                            }
+                        } else {
+                            return Err(Error::ENXIO);
+                        }
+                    }
+                    // Linux returns ENOTDIR instead of ELOOP when using O_NOFOLLOW|O_DIRECTORY
+                    // on a symlink.
+                    Errno::ENOTDIR
+                        if !(nix_all_oflags & (OFlag::NOFOLLOW | OFlag::DIRECTORY)).is_empty() =>
+                    {
+                        if let Ok(stat) = unsafe {
+                            fstatat(
+                                resolved.dirfd().as_raw_fd(),
+                                resolved.path(),
+                                AtFlag::SYMLINK_NOFOLLOW,
+                            )
+                        } {
+                            if SFlag::from_bits_truncate(stat.st_mode).contains(SFlag::IFLNK) {
+                                return Err(Error::ELOOP);
+                            }
+                        }
+                        return Err(Error::ENOTDIR);
+                    }
+                    // FreeBSD returns EMLINK instead of ELOOP when using O_NOFOLLOW on
+                    // a symlink.
+                    Errno::EMLINK if !(nix_all_oflags & OFlag::NOFOLLOW).is_empty() => {
+                        return Err(Error::ELOOP);
+                    }
+                    errno => return Err(errno.into()),
+                }
+            } else {
+                return Err(e.into());
+            }
+        }
+    };
+
+    log::debug!("path_open (host) new_fd = {:?}", new_fd);
+
+    // Determine the type of the new file descriptor and which rights contradict with this type
+    Ok(unsafe { File::from_raw_fd(new_fd) })
+}
+
+pub(crate) fn path_readlink(resolved: PathGet, buf: &mut [u8]) -> Result<usize> {
+    use std::cmp::min;
+    use yanix::file::readlinkat;
+    let read_link = unsafe { readlinkat(resolved.dirfd().as_raw_fd(), resolved.path()) }
+        .map_err(Into::into)
+        .and_then(host_impl::path_from_host)?;
+    let copy_len = min(read_link.len(), buf.len());
+    if copy_len > 0 {
+        buf[..copy_len].copy_from_slice(&read_link.as_bytes()[..copy_len]);
+    }
+    Ok(copy_len)
+}
+
+pub(crate) fn fd_filestat_get(file: &std::fs::File) -> Result<wasi::__wasi_filestat_t> {
+    use yanix::file::fstat;
+    unsafe { fstat(file.as_raw_fd()) }
+        .map_err(Into::into)
+        .and_then(host_impl::filestat_from_nix)
+}
+
+pub(crate) fn path_filestat_get(
+    resolved: PathGet,
+    dirflags: wasi::__wasi_lookupflags_t,
+) -> Result<wasi::__wasi_filestat_t> {
+    use yanix::file::{fstatat, AtFlag};
+    let atflags = match dirflags {
+        0 => AtFlag::empty(),
+        _ => AtFlag::SYMLINK_NOFOLLOW,
+    };
+    unsafe { fstatat(resolved.dirfd().as_raw_fd(), resolved.path(), atflags) }
+        .map_err(Into::into)
+        .and_then(host_impl::filestat_from_nix)
+}
+
+pub(crate) fn path_filestat_set_times(
+    resolved: PathGet,
+    dirflags: wasi::__wasi_lookupflags_t,
+    st_atim: wasi::__wasi_timestamp_t,
+    st_mtim: wasi::__wasi_timestamp_t,
+    fst_flags: wasi::__wasi_fstflags_t,
+) -> Result<()> {
+    use super::super::filetime::*;
+    use std::time::{Duration, UNIX_EPOCH};
+
+    let set_atim = fst_flags & wasi::__WASI_FSTFLAGS_ATIM != 0;
+    let set_atim_now = fst_flags & wasi::__WASI_FSTFLAGS_ATIM_NOW != 0;
+    let set_mtim = fst_flags & wasi::__WASI_FSTFLAGS_MTIM != 0;
+    let set_mtim_now = fst_flags & wasi::__WASI_FSTFLAGS_MTIM_NOW != 0;
+
+    if (set_atim && set_atim_now) || (set_mtim && set_mtim_now) {
+        return Err(Error::EINVAL);
+    }
+
+    let symlink_nofollow = wasi::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW != dirflags;
+    let atim = if set_atim {
+        let time = UNIX_EPOCH + Duration::from_nanos(st_atim);
+        FileTime::FileTime(filetime::FileTime::from_system_time(time))
+    } else if set_atim_now {
+        FileTime::Now
+    } else {
+        FileTime::Omit
+    };
+    let mtim = if set_mtim {
+        let time = UNIX_EPOCH + Duration::from_nanos(st_mtim);
+        FileTime::FileTime(filetime::FileTime::from_system_time(time))
+    } else if set_mtim_now {
+        FileTime::Now
+    } else {
+        FileTime::Omit
+    };
+
+    utimensat(
+        resolved.dirfd(),
+        resolved.path(),
+        atim,
+        mtim,
+        symlink_nofollow,
+    )
+    .map_err(Into::into)
+}
+
+pub(crate) fn path_remove_directory(resolved: PathGet) -> Result<()> {
+    use yanix::file::{unlinkat, AtFlag};
+    unsafe {
+        unlinkat(
+            resolved.dirfd().as_raw_fd(),
+            resolved.path(),
+            AtFlag::REMOVEDIR,
+        )
+    }
+    .map_err(Into::into)
+}
+
+pub(crate) fn fd_readdir<'a>(
+    os_handle: &'a mut OsHandle,
+    cookie: wasi::__wasi_dircookie_t,
+) -> Result<impl Iterator<Item = Result<Dirent>> + 'a> {
+    use yanix::dir::{DirIter, Entry, EntryExt, SeekLoc};
+
+    // Get an instance of `Dir`; this is host-specific due to intricasies
+    // of managing a dir stream between Linux and BSD *nixes
+    let mut dir = fd_readdir_impl::get_dir_from_os_handle(os_handle)?;
+
+    // Seek if needed. Unless cookie is wasi::__WASI_DIRCOOKIE_START,
+    // new items may not be returned to the caller.
+    if cookie == wasi::__WASI_DIRCOOKIE_START {
+        log::trace!("     | fd_readdir: doing rewinddir");
+        dir.rewind();
+    } else {
+        log::trace!("     | fd_readdir: doing seekdir to {}", cookie);
+        let loc = unsafe { SeekLoc::from_raw(cookie as i64)? };
+        dir.seek(loc);
+    }
+
+    Ok(DirIter::new(dir).map(|entry| {
+        let entry: Entry = entry?;
+        Ok(Dirent {
+            name: entry
+                // TODO can we reuse path_from_host for CStr?
+                .file_name()
+                .to_str()?
+                .to_owned(),
+            ino: entry.ino(),
+            ftype: entry.file_type().into(),
+            cookie: entry.seek_loc()?.to_raw().try_into()?,
+        })
+    }))
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/hostcalls_impl/fs_helpers.rs.html b/api/src/wasi_common/sys/unix/hostcalls_impl/fs_helpers.rs.html new file mode 100644 index 000000000000..2b7287f37870 --- /dev/null +++ b/api/src/wasi_common/sys/unix/hostcalls_impl/fs_helpers.rs.html @@ -0,0 +1,135 @@ +fs_helpers.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+
+#![allow(non_camel_case_types)]
+#![allow(unused_unsafe)]
+use crate::sys::host_impl;
+use crate::{wasi, Result};
+use std::fs::File;
+use yanix::file::OFlag;
+
+pub(crate) fn path_open_rights(
+    rights_base: wasi::__wasi_rights_t,
+    rights_inheriting: wasi::__wasi_rights_t,
+    oflags: wasi::__wasi_oflags_t,
+    fs_flags: wasi::__wasi_fdflags_t,
+) -> (wasi::__wasi_rights_t, wasi::__wasi_rights_t) {
+    // which rights are needed on the dirfd?
+    let mut needed_base = wasi::__WASI_RIGHTS_PATH_OPEN;
+    let mut needed_inheriting = rights_base | rights_inheriting;
+
+    // convert open flags
+    let oflags = host_impl::nix_from_oflags(oflags);
+    if oflags.contains(OFlag::CREAT) {
+        needed_base |= wasi::__WASI_RIGHTS_PATH_CREATE_FILE;
+    }
+    if oflags.contains(OFlag::TRUNC) {
+        needed_base |= wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE;
+    }
+
+    // convert file descriptor flags
+    let fdflags = host_impl::nix_from_fdflags(fs_flags);
+    if fdflags.contains(OFlag::DSYNC) {
+        needed_inheriting |= wasi::__WASI_RIGHTS_FD_DATASYNC;
+    }
+    if fdflags.intersects(host_impl::O_RSYNC | OFlag::SYNC) {
+        needed_inheriting |= wasi::__WASI_RIGHTS_FD_SYNC;
+    }
+
+    (needed_base, needed_inheriting)
+}
+
+pub(crate) fn openat(dirfd: &File, path: &str) -> Result<File> {
+    use std::os::unix::prelude::{AsRawFd, FromRawFd};
+    use yanix::file::{openat, Mode};
+
+    log::debug!("path_get openat path = {:?}", path);
+
+    unsafe {
+        openat(
+            dirfd.as_raw_fd(),
+            path,
+            OFlag::RDONLY | OFlag::DIRECTORY | OFlag::NOFOLLOW,
+            Mode::empty(),
+        )
+    }
+    .map(|new_fd| unsafe { File::from_raw_fd(new_fd) })
+    .map_err(Into::into)
+}
+
+pub(crate) fn readlinkat(dirfd: &File, path: &str) -> Result<String> {
+    use std::os::unix::prelude::AsRawFd;
+    use yanix::file::readlinkat;
+
+    log::debug!("path_get readlinkat path = {:?}", path);
+
+    unsafe { readlinkat(dirfd.as_raw_fd(), path) }
+        .map_err(Into::into)
+        .and_then(host_impl::path_from_host)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/hostcalls_impl/misc.rs.html b/api/src/wasi_common/sys/unix/hostcalls_impl/misc.rs.html new file mode 100644 index 000000000000..088c4cf293ca --- /dev/null +++ b/api/src/wasi_common/sys/unix/hostcalls_impl/misc.rs.html @@ -0,0 +1,413 @@ +misc.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+
+#![allow(non_camel_case_types)]
+#![allow(unused_unsafe)]
+use crate::hostcalls_impl::{ClockEventData, FdEventData};
+use crate::{wasi, Error, Result};
+use yanix::clock::{clock_getres, clock_gettime, ClockId};
+
+fn wasi_clock_id_to_unix(clock_id: wasi::__wasi_clockid_t) -> Result<ClockId> {
+    // convert the supported clocks to libc types, or return EINVAL
+    match clock_id {
+        wasi::__WASI_CLOCKID_REALTIME => Ok(ClockId::Realtime),
+        wasi::__WASI_CLOCKID_MONOTONIC => Ok(ClockId::Monotonic),
+        wasi::__WASI_CLOCKID_PROCESS_CPUTIME_ID => Ok(ClockId::ProcessCPUTime),
+        wasi::__WASI_CLOCKID_THREAD_CPUTIME_ID => Ok(ClockId::ThreadCPUTime),
+        _ => Err(Error::EINVAL),
+    }
+}
+
+pub(crate) fn clock_res_get(clock_id: wasi::__wasi_clockid_t) -> Result<wasi::__wasi_timestamp_t> {
+    let clock_id = wasi_clock_id_to_unix(clock_id)?;
+    let timespec = clock_getres(clock_id)?;
+
+    // convert to nanoseconds, returning EOVERFLOW in case of overflow;
+    // this is freelancing a bit from the spec but seems like it'll
+    // be an unusual situation to hit
+    (timespec.tv_sec as wasi::__wasi_timestamp_t)
+        .checked_mul(1_000_000_000)
+        .and_then(|sec_ns| sec_ns.checked_add(timespec.tv_nsec as wasi::__wasi_timestamp_t))
+        .map_or(Err(Error::EOVERFLOW), |resolution| {
+            // a supported clock can never return zero; this case will probably never get hit, but
+            // make sure we follow the spec
+            if resolution == 0 {
+                Err(Error::EINVAL)
+            } else {
+                Ok(resolution)
+            }
+        })
+}
+
+pub(crate) fn clock_time_get(clock_id: wasi::__wasi_clockid_t) -> Result<wasi::__wasi_timestamp_t> {
+    let clock_id = wasi_clock_id_to_unix(clock_id)?;
+    let timespec = clock_gettime(clock_id)?;
+
+    // convert to nanoseconds, returning EOVERFLOW in case of overflow; this is freelancing a bit
+    // from the spec but seems like it'll be an unusual situation to hit
+    (timespec.tv_sec as wasi::__wasi_timestamp_t)
+        .checked_mul(1_000_000_000)
+        .and_then(|sec_ns| sec_ns.checked_add(timespec.tv_nsec as wasi::__wasi_timestamp_t))
+        .map_or(Err(Error::EOVERFLOW), Ok)
+}
+
+pub(crate) fn poll_oneoff(
+    timeout: Option<ClockEventData>,
+    fd_events: Vec<FdEventData>,
+    events: &mut Vec<wasi::__wasi_event_t>,
+) -> Result<()> {
+    use std::{convert::TryInto, os::unix::prelude::AsRawFd};
+    use yanix::{
+        poll::{poll, PollFd, PollFlags},
+        Errno,
+    };
+
+    if fd_events.is_empty() && timeout.is_none() {
+        return Ok(());
+    }
+
+    let mut poll_fds: Vec<_> = fd_events
+        .iter()
+        .map(|event| {
+            let mut flags = PollFlags::empty();
+            match event.r#type {
+                wasi::__WASI_EVENTTYPE_FD_READ => flags.insert(PollFlags::POLLIN),
+                wasi::__WASI_EVENTTYPE_FD_WRITE => flags.insert(PollFlags::POLLOUT),
+                // An event on a file descriptor can currently only be of type FD_READ or FD_WRITE
+                // Nothing else has been defined in the specification, and these are also the only two
+                // events we filtered before. If we get something else here, the code has a serious bug.
+                _ => unreachable!(),
+            };
+            unsafe { PollFd::new(event.descriptor.as_raw_fd(), flags) }
+        })
+        .collect();
+
+    let poll_timeout = timeout.map_or(-1, |timeout| {
+        let delay = timeout.delay / 1_000_000; // poll syscall requires delay to expressed in milliseconds
+        delay.try_into().unwrap_or(libc::c_int::max_value())
+    });
+    log::debug!("poll_oneoff poll_timeout = {:?}", poll_timeout);
+
+    let ready = loop {
+        match poll(&mut poll_fds, poll_timeout) {
+            Err(_) => {
+                if Errno::last() == Errno::EINTR {
+                    continue;
+                }
+                return Err(Errno::last().into());
+            }
+            Ok(ready) => break ready,
+        }
+    };
+
+    Ok(if ready == 0 {
+        poll_oneoff_handle_timeout_event(timeout.expect("timeout should not be None"), events)
+    } else {
+        let ready_events = fd_events.into_iter().zip(poll_fds.into_iter()).take(ready);
+        poll_oneoff_handle_fd_event(ready_events, events)?
+    })
+}
+
+fn poll_oneoff_handle_timeout_event(
+    timeout: ClockEventData,
+    events: &mut Vec<wasi::__wasi_event_t>,
+) {
+    events.push(wasi::__wasi_event_t {
+        userdata: timeout.userdata,
+        r#type: wasi::__WASI_EVENTTYPE_CLOCK,
+        error: wasi::__WASI_ERRNO_SUCCESS,
+        u: wasi::__wasi_event_u_t {
+            fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                nbytes: 0,
+                flags: 0,
+            },
+        },
+    });
+}
+
+fn poll_oneoff_handle_fd_event<'a>(
+    ready_events: impl Iterator<Item = (FdEventData<'a>, yanix::poll::PollFd)>,
+    events: &mut Vec<wasi::__wasi_event_t>,
+) -> Result<()> {
+    use std::{convert::TryInto, os::unix::prelude::AsRawFd};
+    use yanix::{file::fionread, poll::PollFlags};
+
+    for (fd_event, poll_fd) in ready_events {
+        log::debug!("poll_oneoff_handle_fd_event fd_event = {:?}", fd_event);
+        log::debug!("poll_oneoff_handle_fd_event poll_fd = {:?}", poll_fd);
+
+        let revents = match poll_fd.revents() {
+            Some(revents) => revents,
+            None => continue,
+        };
+
+        log::debug!("poll_oneoff_handle_fd_event revents = {:?}", revents);
+
+        let nbytes = if fd_event.r#type == wasi::__WASI_EVENTTYPE_FD_READ {
+            unsafe { fionread(fd_event.descriptor.as_raw_fd())? }
+        } else {
+            0
+        };
+
+        let output_event = if revents.contains(PollFlags::POLLNVAL) {
+            wasi::__wasi_event_t {
+                userdata: fd_event.userdata,
+                r#type: fd_event.r#type,
+                error: wasi::__WASI_ERRNO_BADF,
+                u: wasi::__wasi_event_u_t {
+                    fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                        nbytes: 0,
+                        flags: wasi::__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP,
+                    },
+                },
+            }
+        } else if revents.contains(PollFlags::POLLERR) {
+            wasi::__wasi_event_t {
+                userdata: fd_event.userdata,
+                r#type: fd_event.r#type,
+                error: wasi::__WASI_ERRNO_IO,
+                u: wasi::__wasi_event_u_t {
+                    fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                        nbytes: 0,
+                        flags: wasi::__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP,
+                    },
+                },
+            }
+        } else if revents.contains(PollFlags::POLLHUP) {
+            wasi::__wasi_event_t {
+                userdata: fd_event.userdata,
+                r#type: fd_event.r#type,
+                error: wasi::__WASI_ERRNO_SUCCESS,
+                u: wasi::__wasi_event_u_t {
+                    fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                        nbytes: 0,
+                        flags: wasi::__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP,
+                    },
+                },
+            }
+        } else if revents.contains(PollFlags::POLLIN) | revents.contains(PollFlags::POLLOUT) {
+            wasi::__wasi_event_t {
+                userdata: fd_event.userdata,
+                r#type: fd_event.r#type,
+                error: wasi::__WASI_ERRNO_SUCCESS,
+                u: wasi::__wasi_event_u_t {
+                    fd_readwrite: wasi::__wasi_event_fd_readwrite_t {
+                        nbytes: nbytes.try_into()?,
+                        flags: 0,
+                    },
+                },
+            }
+        } else {
+            continue;
+        };
+
+        events.push(output_event);
+    }
+
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/hostcalls_impl/mod.rs.html b/api/src/wasi_common/sys/unix/hostcalls_impl/mod.rs.html new file mode 100644 index 000000000000..30628eb6892e --- /dev/null +++ b/api/src/wasi_common/sys/unix/hostcalls_impl/mod.rs.html @@ -0,0 +1,19 @@ +mod.rs.html -- source
1
+2
+3
+4
+5
+6
+7
+8
+
+//! Unix-specific hostcalls that implement
+//! [WASI](https://github.com/bytecodealliance/wasmtime-wasi/blob/wasi/docs/WASI-overview.md).
+mod fs;
+pub(crate) mod fs_helpers;
+mod misc;
+
+pub(crate) use self::fs::*;
+pub(crate) use self::misc::*;
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/linux/filetime.rs.html b/api/src/wasi_common/sys/unix/linux/filetime.rs.html new file mode 100644 index 000000000000..31de74147335 --- /dev/null +++ b/api/src/wasi_common/sys/unix/linux/filetime.rs.html @@ -0,0 +1,125 @@ +filetime.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+
+//! This internal module consists of helper types and functions for dealing
+//! with setting the file times specific to Linux.
+use crate::{sys::unix::filetime::FileTime, Result};
+use std::fs::File;
+use std::io;
+use std::sync::atomic::{AtomicBool, Ordering::Relaxed};
+
+pub(crate) const UTIME_NOW: i64 = 1_073_741_823;
+pub(crate) const UTIME_OMIT: i64 = 1_073_741_822;
+
+/// Wrapper for `utimensat` syscall, however, with an added twist such that `utimensat` symbol
+/// is firstly resolved (i.e., we check whether it exists on the host), and only used if that is
+/// the case. Otherwise, the syscall resorts to a less accurate `utimesat` emulated syscall.
+/// The original implementation can be found here: [filetime::unix::linux::set_times]
+///
+/// [filetime::unix::linux::set_times]: https://github.com/alexcrichton/filetime/blob/master/src/unix/linux.rs#L64
+pub(crate) fn utimensat(
+    dirfd: &File,
+    path: &str,
+    atime: FileTime,
+    mtime: FileTime,
+    symlink_nofollow: bool,
+) -> Result<()> {
+    use crate::sys::unix::filetime::to_timespec;
+    use std::ffi::CString;
+    use std::os::unix::prelude::*;
+
+    let flags = if symlink_nofollow {
+        libc::AT_SYMLINK_NOFOLLOW
+    } else {
+        0
+    };
+
+    // Attempt to use the `utimensat` syscall, but if it's not supported by the
+    // current kernel then fall back to an older syscall.
+    static INVALID: AtomicBool = AtomicBool::new(false);
+    if !INVALID.load(Relaxed) {
+        let p = CString::new(path.as_bytes())?;
+        let times = [to_timespec(&atime)?, to_timespec(&mtime)?];
+        let rc = unsafe {
+            libc::syscall(
+                libc::SYS_utimensat,
+                dirfd.as_raw_fd(),
+                p.as_ptr(),
+                times.as_ptr(),
+                flags,
+            )
+        };
+        if rc == 0 {
+            return Ok(());
+        }
+        let err = io::Error::last_os_error();
+        if err.raw_os_error() == Some(libc::ENOSYS) {
+            INVALID.store(true, Relaxed);
+        } else {
+            return Err(err.into());
+        }
+    }
+
+    super::utimesat::utimesat(dirfd, path, atime, mtime, symlink_nofollow)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/linux/host_impl.rs.html b/api/src/wasi_common/sys/unix/linux/host_impl.rs.html new file mode 100644 index 000000000000..052bc15723cd --- /dev/null +++ b/api/src/wasi_common/sys/unix/linux/host_impl.rs.html @@ -0,0 +1,25 @@ +host_impl.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+
+use crate::{wasi, Result};
+
+pub(crate) const O_RSYNC: yanix::file::OFlag = yanix::file::OFlag::RSYNC;
+
+pub(crate) fn stdev_from_nix(dev: libc::dev_t) -> Result<wasi::__wasi_device_t> {
+    Ok(wasi::__wasi_device_t::from(dev))
+}
+
+pub(crate) fn stino_from_nix(ino: libc::ino_t) -> Result<wasi::__wasi_inode_t> {
+    Ok(wasi::__wasi_device_t::from(ino))
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/linux/hostcalls_impl.rs.html b/api/src/wasi_common/sys/unix/linux/hostcalls_impl.rs.html new file mode 100644 index 000000000000..33eb9ab07bce --- /dev/null +++ b/api/src/wasi_common/sys/unix/linux/hostcalls_impl.rs.html @@ -0,0 +1,123 @@ +hostcalls_impl.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+
+use crate::hostcalls_impl::PathGet;
+use crate::Result;
+use std::os::unix::prelude::AsRawFd;
+
+pub(crate) fn path_unlink_file(resolved: PathGet) -> Result<()> {
+    use yanix::file::{unlinkat, AtFlag};
+    unsafe {
+        unlinkat(
+            resolved.dirfd().as_raw_fd(),
+            resolved.path(),
+            AtFlag::empty(),
+        )
+    }
+    .map_err(Into::into)
+}
+
+pub(crate) fn path_symlink(old_path: &str, resolved: PathGet) -> Result<()> {
+    use yanix::file::symlinkat;
+
+    log::debug!("path_symlink old_path = {:?}", old_path);
+    log::debug!("path_symlink resolved = {:?}", resolved);
+
+    unsafe { symlinkat(old_path, resolved.dirfd().as_raw_fd(), resolved.path()) }
+        .map_err(Into::into)
+}
+
+pub(crate) fn path_rename(resolved_old: PathGet, resolved_new: PathGet) -> Result<()> {
+    use yanix::file::renameat;
+    unsafe {
+        renameat(
+            resolved_old.dirfd().as_raw_fd(),
+            resolved_old.path(),
+            resolved_new.dirfd().as_raw_fd(),
+            resolved_new.path(),
+        )
+    }
+    .map_err(Into::into)
+}
+
+pub(crate) mod fd_readdir_impl {
+    use crate::sys::fdentry_impl::OsHandle;
+    use crate::Result;
+    use yanix::dir::Dir;
+
+    pub(crate) fn get_dir_from_os_handle(os_handle: &mut OsHandle) -> Result<Box<Dir>> {
+        // We need to duplicate the fd, because `opendir(3)`:
+        //     After a successful call to fdopendir(), fd is used internally by the implementation,
+        //     and should not otherwise be used by the application.
+        // `opendir(3p)` also says that it's undefined behavior to
+        // modify the state of the fd in a different way than by accessing DIR*.
+        //
+        // Still, rewinddir will be needed because the two file descriptors
+        // share progress. But we can safely execute closedir now.
+        let fd = os_handle.try_clone()?;
+        // TODO This doesn't look very clean. Can we do something about it?
+        // Boxing is needed here in order to satisfy `yanix`'s trait requirement for the `DirIter`
+        // where `T: Deref<Target = Dir>`.
+        Ok(Box::new(Dir::from(fd)?))
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/linux/mod.rs.html b/api/src/wasi_common/sys/unix/linux/mod.rs.html new file mode 100644 index 000000000000..d353f44e58bd --- /dev/null +++ b/api/src/wasi_common/sys/unix/linux/mod.rs.html @@ -0,0 +1,13 @@ +mod.rs.html -- source
1
+2
+3
+4
+5
+
+pub(crate) mod filetime;
+pub(crate) mod host_impl;
+pub(crate) mod hostcalls_impl;
+pub(crate) mod oshandle;
+pub(crate) mod utimesat;
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/linux/oshandle.rs.html b/api/src/wasi_common/sys/unix/linux/oshandle.rs.html new file mode 100644 index 000000000000..9b3d70ca2ae9 --- /dev/null +++ b/api/src/wasi_common/sys/unix/linux/oshandle.rs.html @@ -0,0 +1,67 @@ +oshandle.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
+use std::fs;
+use std::ops::{Deref, DerefMut};
+use std::os::unix::prelude::{AsRawFd, RawFd};
+
+#[derive(Debug)]
+pub(crate) struct OsHandle(fs::File);
+
+impl From<fs::File> for OsHandle {
+    fn from(file: fs::File) -> Self {
+        Self(file)
+    }
+}
+
+impl AsRawFd for OsHandle {
+    fn as_raw_fd(&self) -> RawFd {
+        self.0.as_raw_fd()
+    }
+}
+
+impl Deref for OsHandle {
+    type Target = fs::File;
+
+    fn deref(&self) -> &Self::Target {
+        &self.0
+    }
+}
+
+impl DerefMut for OsHandle {
+    fn deref_mut(&mut self) -> &mut Self::Target {
+        &mut self.0
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/linux/utimesat.rs.html b/api/src/wasi_common/sys/unix/linux/utimesat.rs.html new file mode 100644 index 000000000000..c5db0975d79f --- /dev/null +++ b/api/src/wasi_common/sys/unix/linux/utimesat.rs.html @@ -0,0 +1,179 @@ +utimesat.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+
+use crate::sys::unix::filetime::FileTime;
+use crate::Result;
+use std::{fs, io};
+
+/// Combines `openat` with `utimes` to emulate `utimensat` on platforms where it is
+/// not available. The logic for setting file times is based on [filetime::unix::set_file_handles_times].
+///
+/// [filetime::unix::set_file_handles_times]: https://github.com/alexcrichton/filetime/blob/master/src/unix/utimes.rs#L24
+pub(crate) fn utimesat(
+    dirfd: &fs::File,
+    path: &str,
+    atime: FileTime,
+    mtime: FileTime,
+    symlink_nofollow: bool,
+) -> Result<()> {
+    use std::ffi::CString;
+    use std::os::unix::prelude::*;
+    // emulate *at syscall by reading the path from a combination of
+    // (fd, path)
+    let p = CString::new(path.as_bytes())?;
+    let mut flags = libc::O_RDWR;
+    if symlink_nofollow {
+        flags |= libc::O_NOFOLLOW;
+    }
+    let fd = unsafe { libc::openat(dirfd.as_raw_fd(), p.as_ptr(), flags) };
+    let f = unsafe { fs::File::from_raw_fd(fd) };
+    let (atime, mtime) = get_times(atime, mtime, || f.metadata().map_err(Into::into))?;
+    let times = [to_timeval(atime), to_timeval(mtime)];
+    let rc = unsafe { libc::futimes(f.as_raw_fd(), times.as_ptr()) };
+    if rc == 0 {
+        Ok(())
+    } else {
+        Err(io::Error::last_os_error().into())
+    }
+}
+
+/// Converts `filetime::FileTime` to `libc::timeval`. This function was taken directly from
+/// [filetime] crate.
+///
+/// [filetime]: https://github.com/alexcrichton/filetime/blob/master/src/unix/utimes.rs#L93
+fn to_timeval(ft: filetime::FileTime) -> libc::timeval {
+    libc::timeval {
+        tv_sec: ft.seconds(),
+        tv_usec: (ft.nanoseconds() / 1000) as libc::suseconds_t,
+    }
+}
+
+/// For a provided pair of access and modified `FileTime`s, converts the input to
+/// `filetime::FileTime` used later in `utimensat` function. For variants `FileTime::Now`
+/// and `FileTime::Omit`, this function will make two syscalls: either accessing current
+/// system time, or accessing the file's metadata.
+///
+/// The original implementation can be found here: [filetime::unix::get_times].
+///
+/// [filetime::unix::get_times]: https://github.com/alexcrichton/filetime/blob/master/src/unix/utimes.rs#L42
+fn get_times(
+    atime: FileTime,
+    mtime: FileTime,
+    current: impl Fn() -> Result<fs::Metadata>,
+) -> Result<(filetime::FileTime, filetime::FileTime)> {
+    use std::time::SystemTime;
+
+    let atime = match atime {
+        FileTime::Now => {
+            let time = SystemTime::now();
+            filetime::FileTime::from_system_time(time)
+        }
+        FileTime::Omit => {
+            let meta = current()?;
+            filetime::FileTime::from_last_access_time(&meta)
+        }
+        FileTime::FileTime(ft) => ft,
+    };
+
+    let mtime = match mtime {
+        FileTime::Now => {
+            let time = SystemTime::now();
+            filetime::FileTime::from_system_time(time)
+        }
+        FileTime::Omit => {
+            let meta = current()?;
+            filetime::FileTime::from_last_modification_time(&meta)
+        }
+        FileTime::FileTime(ft) => ft,
+    };
+
+    Ok((atime, mtime))
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/sys/unix/mod.rs.html b/api/src/wasi_common/sys/unix/mod.rs.html new file mode 100644 index 000000000000..9fac963df044 --- /dev/null +++ b/api/src/wasi_common/sys/unix/mod.rs.html @@ -0,0 +1,81 @@ +mod.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+
+pub(crate) mod fdentry_impl;
+pub(crate) mod host_impl;
+pub(crate) mod hostcalls_impl;
+
+mod filetime;
+
+cfg_if::cfg_if! {
+    if #[cfg(target_os = "linux")] {
+        mod linux;
+        use self::linux as sys_impl;
+    } else if #[cfg(target_os = "emscripten")] {
+        mod emscripten;
+        use self::emscripten as sys_impl;
+    } else if #[cfg(any(target_os = "macos",
+                        target_os = "netbsd",
+                        target_os = "freebsd",
+                        target_os = "openbsd",
+                        target_os = "ios",
+                        target_os = "dragonfly"))] {
+        mod bsd;
+        use self::bsd as sys_impl;
+    }
+}
+
+use crate::Result;
+use std::fs::{File, OpenOptions};
+use std::path::Path;
+
+pub(crate) fn dev_null() -> Result<File> {
+    OpenOptions::new()
+        .read(true)
+        .write(true)
+        .open("/dev/null")
+        .map_err(Into::into)
+}
+
+pub fn preopen_dir<P: AsRef<Path>>(path: P) -> Result<File> {
+    File::open(path).map_err(Into::into)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/wasi.rs.html b/api/src/wasi_common/wasi.rs.html new file mode 100644 index 000000000000..54187beecdc2 --- /dev/null +++ b/api/src/wasi_common/wasi.rs.html @@ -0,0 +1,1725 @@ +wasi.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+
+//! Types and constants shared between 32-bit and 64-bit wasi. Types involving
+//! pointer or `usize`-sized data are excluded here, so this file only contains
+//! fixed-size types, so it's host/target independent.
+
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+#![allow(dead_code)]
+
+use wig::witx_wasi_types;
+
+witx_wasi_types!("snapshot" "wasi_snapshot_preview1");
+
+pub(crate) const RIGHTS_ALL: __wasi_rights_t = __WASI_RIGHTS_FD_DATASYNC
+    | __WASI_RIGHTS_FD_READ
+    | __WASI_RIGHTS_FD_SEEK
+    | __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
+    | __WASI_RIGHTS_FD_SYNC
+    | __WASI_RIGHTS_FD_TELL
+    | __WASI_RIGHTS_FD_WRITE
+    | __WASI_RIGHTS_FD_ADVISE
+    | __WASI_RIGHTS_FD_ALLOCATE
+    | __WASI_RIGHTS_PATH_CREATE_DIRECTORY
+    | __WASI_RIGHTS_PATH_CREATE_FILE
+    | __WASI_RIGHTS_PATH_LINK_SOURCE
+    | __WASI_RIGHTS_PATH_LINK_TARGET
+    | __WASI_RIGHTS_PATH_OPEN
+    | __WASI_RIGHTS_FD_READDIR
+    | __WASI_RIGHTS_PATH_READLINK
+    | __WASI_RIGHTS_PATH_RENAME_SOURCE
+    | __WASI_RIGHTS_PATH_RENAME_TARGET
+    | __WASI_RIGHTS_PATH_FILESTAT_GET
+    | __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE
+    | __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES
+    | __WASI_RIGHTS_FD_FILESTAT_GET
+    | __WASI_RIGHTS_FD_FILESTAT_SET_SIZE
+    | __WASI_RIGHTS_FD_FILESTAT_SET_TIMES
+    | __WASI_RIGHTS_PATH_SYMLINK
+    | __WASI_RIGHTS_PATH_UNLINK_FILE
+    | __WASI_RIGHTS_PATH_REMOVE_DIRECTORY
+    | __WASI_RIGHTS_POLL_FD_READWRITE
+    | __WASI_RIGHTS_SOCK_SHUTDOWN;
+
+// Block and character device interaction is outside the scope of
+// WASI. Simply allow everything.
+pub(crate) const RIGHTS_BLOCK_DEVICE_BASE: __wasi_rights_t = RIGHTS_ALL;
+pub(crate) const RIGHTS_BLOCK_DEVICE_INHERITING: __wasi_rights_t = RIGHTS_ALL;
+pub(crate) const RIGHTS_CHARACTER_DEVICE_BASE: __wasi_rights_t = RIGHTS_ALL;
+pub(crate) const RIGHTS_CHARACTER_DEVICE_INHERITING: __wasi_rights_t = RIGHTS_ALL;
+
+// Only allow directory operations on directories. Directories can only
+// yield file descriptors to other directories and files.
+pub(crate) const RIGHTS_DIRECTORY_BASE: __wasi_rights_t = __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
+    | __WASI_RIGHTS_FD_SYNC
+    | __WASI_RIGHTS_FD_ADVISE
+    | __WASI_RIGHTS_PATH_CREATE_DIRECTORY
+    | __WASI_RIGHTS_PATH_CREATE_FILE
+    | __WASI_RIGHTS_PATH_LINK_SOURCE
+    | __WASI_RIGHTS_PATH_LINK_TARGET
+    | __WASI_RIGHTS_PATH_OPEN
+    | __WASI_RIGHTS_FD_READDIR
+    | __WASI_RIGHTS_PATH_READLINK
+    | __WASI_RIGHTS_PATH_RENAME_SOURCE
+    | __WASI_RIGHTS_PATH_RENAME_TARGET
+    | __WASI_RIGHTS_PATH_FILESTAT_GET
+    | __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE
+    | __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES
+    | __WASI_RIGHTS_FD_FILESTAT_GET
+    | __WASI_RIGHTS_FD_FILESTAT_SET_TIMES
+    | __WASI_RIGHTS_PATH_SYMLINK
+    | __WASI_RIGHTS_PATH_UNLINK_FILE
+    | __WASI_RIGHTS_PATH_REMOVE_DIRECTORY
+    | __WASI_RIGHTS_POLL_FD_READWRITE;
+pub(crate) const RIGHTS_DIRECTORY_INHERITING: __wasi_rights_t =
+    RIGHTS_DIRECTORY_BASE | RIGHTS_REGULAR_FILE_BASE;
+
+// Operations that apply to regular files.
+pub(crate) const RIGHTS_REGULAR_FILE_BASE: __wasi_rights_t = __WASI_RIGHTS_FD_DATASYNC
+    | __WASI_RIGHTS_FD_READ
+    | __WASI_RIGHTS_FD_SEEK
+    | __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
+    | __WASI_RIGHTS_FD_SYNC
+    | __WASI_RIGHTS_FD_TELL
+    | __WASI_RIGHTS_FD_WRITE
+    | __WASI_RIGHTS_FD_ADVISE
+    | __WASI_RIGHTS_FD_ALLOCATE
+    | __WASI_RIGHTS_FD_FILESTAT_GET
+    | __WASI_RIGHTS_FD_FILESTAT_SET_SIZE
+    | __WASI_RIGHTS_FD_FILESTAT_SET_TIMES
+    | __WASI_RIGHTS_POLL_FD_READWRITE;
+pub(crate) const RIGHTS_REGULAR_FILE_INHERITING: __wasi_rights_t = 0;
+
+// Operations that apply to sockets and socket pairs.
+pub(crate) const RIGHTS_SOCKET_BASE: __wasi_rights_t = __WASI_RIGHTS_FD_READ
+    | __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
+    | __WASI_RIGHTS_FD_WRITE
+    | __WASI_RIGHTS_FD_FILESTAT_GET
+    | __WASI_RIGHTS_POLL_FD_READWRITE
+    | __WASI_RIGHTS_SOCK_SHUTDOWN;
+pub(crate) const RIGHTS_SOCKET_INHERITING: __wasi_rights_t = RIGHTS_ALL;
+
+// Operations that apply to TTYs.
+pub(crate) const RIGHTS_TTY_BASE: __wasi_rights_t = __WASI_RIGHTS_FD_READ
+    | __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
+    | __WASI_RIGHTS_FD_WRITE
+    | __WASI_RIGHTS_FD_FILESTAT_GET
+    | __WASI_RIGHTS_POLL_FD_READWRITE;
+#[allow(unused)]
+pub(crate) const RIGHTS_TTY_INHERITING: __wasi_rights_t = 0;
+
+pub fn whence_to_str(whence: __wasi_whence_t) -> &'static str {
+    match whence {
+        __WASI_WHENCE_CUR => "__WASI_WHENCE_CUR",
+        __WASI_WHENCE_END => "__WASI_WHENCE_END",
+        __WASI_WHENCE_SET => "__WASI_WHENCE_SET",
+        other => panic!("Undefined whence value {:?}", other),
+    }
+}
+
+pub const __WASI_DIRCOOKIE_START: __wasi_dircookie_t = 0;
+
+#[cfg(test)]
+mod test {
+    use super::*;
+
+    #[test]
+    fn bindgen_test_layout_wasi_dirent_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_dirent_t>(),
+            24usize,
+            concat!("Size of: ", stringify!(__wasi_dirent_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_next as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_next)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_ino as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_ino)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_namlen as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_namlen)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_type as *const _ as usize },
+            20usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_type)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_event_t___wasi_event_u___wasi_event_u_fd_readwrite_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_event_fd_readwrite_t>(),
+            16usize,
+            concat!("Size of: ", stringify!(__wasi_event_fd_readwrite_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_event_fd_readwrite_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_event_fd_readwrite_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_event_fd_readwrite_t>())).nbytes as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_fd_readwrite_t),
+                "::",
+                stringify!(nbytes)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_event_fd_readwrite_t>())).flags as *const _ as usize
+            },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_fd_readwrite_t),
+                "::",
+                stringify!(flags)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_event_t___wasi_event_u() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_event_u_t>(),
+            16usize,
+            concat!("Size of: ", stringify!(__wasi_event_u_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_event_u_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_event_u_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_event_u_t>())).fd_readwrite as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_u_t),
+                "::",
+                stringify!(fd_readwrite)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_event_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_event_t>(),
+            32usize,
+            concat!("Size of: ", stringify!(__wasi_event_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_event_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_event_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).userdata as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(userdata)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).error as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(error)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).r#type as *const _ as usize },
+            10usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(r#type)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).u as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(u)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout_wasi_event_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_event_t>(),
+            32usize,
+            concat!("Size of: ", stringify!(__wasi_event_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).userdata as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(userdata)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).error as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(error)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_event_t>())).r#type as *const _ as usize },
+            10usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_event_t),
+                "::",
+                stringify!(r#type)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout_wasi_fdstat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_fdstat_t>(),
+            24usize,
+            concat!("Size of: ", stringify!(__wasi_fdstat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_filetype as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_filetype)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_flags as *const _ as usize },
+            2usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_flags)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_base as *const _ as usize
+            },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_rights_base)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_inheriting as *const _
+                    as usize
+            },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_rights_inheriting)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout_wasi_filestat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_filestat_t>(),
+            64usize,
+            concat!("Size of: ", stringify!(__wasi_filestat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).dev as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_dev)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).ino as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_ino)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).filetype as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_filetype)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).nlink as *const _ as usize },
+            24usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_nlink)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).size as *const _ as usize },
+            32usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_size)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).atim as *const _ as usize },
+            40usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_atim)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).mtim as *const _ as usize },
+            48usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_mtim)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).ctim as *const _ as usize },
+            56usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_ctim)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_subscription_clock_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_subscription_clock_t>(),
+            32usize,
+            concat!("Size of: ", stringify!(__wasi_subscription_clock_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_subscription_clock_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_subscription_clock_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_clock_t>())).id as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_clock_t),
+                "::",
+                stringify!(clock_id)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_clock_t>())).timeout as *const _ as usize
+            },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_clock_t),
+                "::",
+                stringify!(timeout)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_clock_t>())).precision as *const _
+                    as usize
+            },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_clock_t),
+                "::",
+                stringify!(precision)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_clock_t>())).flags as *const _ as usize
+            },
+            24usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_clock_t),
+                "::",
+                stringify!(flags)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_subscription_t___wasi_subscription_u___wasi_subscription_u_fd_readwrite_t(
+    ) {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_subscription_fd_readwrite_t>(),
+            4usize,
+            concat!("Size of: ", stringify!(__wasi_subscription_fd_readwrite_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_subscription_fd_readwrite_t>(),
+            4usize,
+            concat!(
+                "Alignment of ",
+                stringify!(__wasi_subscription_fd_readwrite_t)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_fd_readwrite_t>())).file_descriptor
+                    as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_fd_readwrite_t),
+                "::",
+                stringify!(fd)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_subscription_t___wasi_subscription_u() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_subscription_u_t>(),
+            32usize,
+            concat!("Size of: ", stringify!(__wasi_subscription_u_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_subscription_u_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_subscription_u_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_u_t>())).clock as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_u_t),
+                "::",
+                stringify!(clock)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_u_t>())).fd_readwrite as *const _
+                    as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_u_t),
+                "::",
+                stringify!(fd_readwrite)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_subscription_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_subscription_t>(),
+            48usize,
+            concat!("Size of: ", stringify!(__wasi_subscription_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_subscription_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_subscription_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_t>())).userdata as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_t),
+                "::",
+                stringify!(userdata)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_subscription_t>())).r#type as *const _ as usize
+            },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_t),
+                "::",
+                stringify!(r#type)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_subscription_t>())).u as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_subscription_t),
+                "::",
+                stringify!(u)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_filestat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_filestat_t>(),
+            64usize,
+            concat!("Size of: ", stringify!(__wasi_filestat_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_filestat_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_filestat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).dev as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_dev)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).ino as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_ino)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).filetype as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_filetype)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).nlink as *const _ as usize },
+            24usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_nlink)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).size as *const _ as usize },
+            32usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_size)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).atim as *const _ as usize },
+            40usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_atim)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).mtim as *const _ as usize },
+            48usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_mtim)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_filestat_t>())).ctim as *const _ as usize },
+            56usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_filestat_t),
+                "::",
+                stringify!(st_ctim)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_fdstat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_fdstat_t>(),
+            24usize,
+            concat!("Size of: ", stringify!(__wasi_fdstat_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_fdstat_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_fdstat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_filetype as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_filetype)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_flags as *const _ as usize },
+            2usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_flags)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_base as *const _ as usize
+            },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_rights_base)
+            )
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_fdstat_t>())).fs_rights_inheriting as *const _
+                    as usize
+            },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_fdstat_t),
+                "::",
+                stringify!(fs_rights_inheriting)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_dirent_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_dirent_t>(),
+            24usize,
+            concat!("Size of: ", stringify!(__wasi_dirent_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_dirent_t>(),
+            8usize,
+            concat!("Alignment of ", stringify!(__wasi_dirent_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_next as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_next)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_ino as *const _ as usize },
+            8usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_ino)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_namlen as *const _ as usize },
+            16usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_namlen)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_dirent_t>())).d_type as *const _ as usize },
+            20usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_dirent_t),
+                "::",
+                stringify!(d_type)
+            )
+        );
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasi_common/wasi32.rs.html b/api/src/wasi_common/wasi32.rs.html new file mode 100644 index 000000000000..6b8adb4946a9 --- /dev/null +++ b/api/src/wasi_common/wasi32.rs.html @@ -0,0 +1,347 @@ +wasi32.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+
+//! Types and constants specific to 32-bit wasi. These are similar to the types
+//! in the `host` module, but pointers and `usize` values are replaced with
+//! `u32`-sized types.
+
+#![allow(non_camel_case_types)]
+#![allow(non_snake_case)]
+#![allow(dead_code)]
+
+use crate::wasi::*;
+use wig::witx_wasi32_types;
+
+pub type uintptr_t = u32;
+pub type size_t = u32;
+
+witx_wasi32_types!("snapshot" "wasi_snapshot_preview1");
+
+#[cfg(test)]
+mod test {
+    use super::*;
+
+    #[test]
+    fn bindgen_test_layout_wasi_ciovec_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_ciovec_t>(),
+            8usize,
+            concat!("Size of: ", stringify!(__wasi_ciovec_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_ciovec_t>(),
+            4usize,
+            concat!("Alignment of ", stringify!(__wasi_ciovec_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_ciovec_t>())).buf as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_ciovec_t),
+                "::",
+                stringify!(buf)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_ciovec_t>())).buf_len as *const _ as usize },
+            4usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_ciovec_t),
+                "::",
+                stringify!(buf_len)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout_wasi_iovec_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_iovec_t>(),
+            8usize,
+            concat!("Size of: ", stringify!(__wasi_iovec_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_iovec_t>(),
+            4usize,
+            concat!("Alignment of ", stringify!(__wasi_iovec_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_iovec_t>())).buf as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_iovec_t),
+                "::",
+                stringify!(buf)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_iovec_t>())).buf_len as *const _ as usize },
+            4usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_iovec_t),
+                "::",
+                stringify!(buf_len)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u___wasi_prestat_u_dir_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_dir_t>(),
+            4usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_dir_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_dir_t>(),
+            4usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_dir_t))
+        );
+        assert_eq!(
+            unsafe {
+                &(*(::std::ptr::null::<__wasi_prestat_dir_t>())).pr_name_len as *const _ as usize
+            },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_dir_t),
+                "::",
+                stringify!(pr_name_len)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t___wasi_prestat_u() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_u_t>(),
+            4usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_u_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_u_t>(),
+            4usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_u_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_u_t>())).dir as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_u_t),
+                "::",
+                stringify!(dir)
+            )
+        );
+    }
+
+    #[test]
+    fn bindgen_test_layout___wasi_prestat_t() {
+        assert_eq!(
+            ::std::mem::size_of::<__wasi_prestat_t>(),
+            8usize,
+            concat!("Size of: ", stringify!(__wasi_prestat_t))
+        );
+        assert_eq!(
+            ::std::mem::align_of::<__wasi_prestat_t>(),
+            4usize,
+            concat!("Alignment of ", stringify!(__wasi_prestat_t))
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).pr_type as *const _ as usize },
+            0usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_t),
+                "::",
+                stringify!(pr_type)
+            )
+        );
+        assert_eq!(
+            unsafe { &(*(::std::ptr::null::<__wasi_prestat_t>())).u as *const _ as usize },
+            4usize,
+            concat!(
+                "Offset of field: ",
+                stringify!(__wasi_prestat_t),
+                "::",
+                stringify!(u)
+            )
+        );
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/callable.rs.html b/api/src/wasmtime/callable.rs.html new file mode 100644 index 000000000000..b295d9228c13 --- /dev/null +++ b/api/src/wasmtime/callable.rs.html @@ -0,0 +1,455 @@ +callable.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+
+use crate::runtime::Store;
+use crate::trampoline::generate_func_export;
+use crate::trap::Trap;
+use crate::types::FuncType;
+use crate::values::Val;
+use std::ptr;
+use std::rc::Rc;
+use wasmtime_environ::ir;
+use wasmtime_jit::InstanceHandle;
+use wasmtime_runtime::Export;
+
+/// A trait representing a function that can be imported and called from inside
+/// WebAssembly.
+/// # Example
+/// ```
+/// use wasmtime::Val;
+///
+/// struct TimesTwo;
+///
+/// impl wasmtime::Callable for TimesTwo {
+///     fn call(&self, params: &[Val], results: &mut [Val]) -> Result<(), wasmtime::Trap> {
+///         let mut value = params[0].unwrap_i32();
+///         value *= 2;
+///         results[0] = value.into();
+///
+///         Ok(())
+///     }
+/// }
+///
+/// # fn main () -> Result<(), Box<dyn std::error::Error>> {
+/// // Simple module that imports our host function ("times_two") and re-exports
+/// // it as "run".
+/// let wat = r#"
+///    (module
+///      (func $times_two (import "" "times_two") (param i32) (result i32))
+///      (func
+///        (export "run")
+///        (param i32)
+///        (result i32)
+///        (local.get 0)
+///        (call $times_two))
+///    )
+/// "#;
+///
+/// // Initialise environment and our module.
+/// let store = wasmtime::Store::default();
+/// let module = wasmtime::Module::new(&store, wat)?;
+///
+/// // Define the type of the function we're going to call.
+/// let times_two_type = wasmtime::FuncType::new(
+///     // Parameters
+///     Box::new([wasmtime::ValType::I32]),
+///     // Results
+///     Box::new([wasmtime::ValType::I32])
+/// );
+///
+/// // Build a reference to the "times_two" function that can be used.
+/// let times_two_function =
+///     wasmtime::Func::new(&store, times_two_type, std::rc::Rc::new(TimesTwo));
+///
+/// // Create module instance that imports our function
+/// let instance = wasmtime::Instance::new(
+///     &module,
+///     &[times_two_function.into()]
+/// )?;
+///
+/// // Get "run" function from the exports.
+/// let run_function = instance.exports()[0].func().unwrap();
+///
+/// // Borrow and call "run". Returning any error message from Wasm as a string.
+/// let original = 5i32;
+/// let results = run_function
+///     .call(&[original.into()])
+///     .map_err(|trap| trap.to_string())?;
+///
+/// // Compare that the results returned matches what we expect.
+/// assert_eq!(original * 2, results[0].unwrap_i32());
+/// # Ok(())
+/// # }
+/// ```
+pub trait Callable {
+    /// What is called when the function is invoked in WebAssembly.
+    /// `params` is an immutable list of parameters provided to the function.
+    /// `results` is mutable list of results to be potentially set by your
+    /// function. Produces a `Trap` if the function encounters any errors.
+    fn call(&self, params: &[Val], results: &mut [Val]) -> Result<(), Trap>;
+}
+
+pub(crate) trait WrappedCallable {
+    fn call(&self, params: &[Val], results: &mut [Val]) -> Result<(), Trap>;
+    fn signature(&self) -> &ir::Signature {
+        match self.wasmtime_export() {
+            Export::Function { signature, .. } => signature,
+            _ => panic!("unexpected export type in Callable"),
+        }
+    }
+    fn wasmtime_handle(&self) -> &InstanceHandle;
+    fn wasmtime_export(&self) -> &Export;
+}
+
+pub(crate) struct WasmtimeFn {
+    store: Store,
+    instance: InstanceHandle,
+    export: Export,
+}
+
+impl WasmtimeFn {
+    pub fn new(store: &Store, instance: InstanceHandle, export: Export) -> WasmtimeFn {
+        WasmtimeFn {
+            store: store.clone(),
+            instance,
+            export,
+        }
+    }
+}
+
+impl WrappedCallable for WasmtimeFn {
+    fn call(&self, params: &[Val], results: &mut [Val]) -> Result<(), Trap> {
+        use std::cmp::max;
+        use std::mem;
+
+        let (vmctx, body, signature) = match self.wasmtime_export() {
+            Export::Function {
+                vmctx,
+                address,
+                signature,
+            } => (*vmctx, *address, signature.clone()),
+            _ => panic!("unexpected export type in Callable"),
+        };
+        if signature.params.len() - 2 != params.len() {
+            return Err(Trap::new(format!(
+                "expected {} arguments, got {}",
+                signature.params.len() - 2,
+                params.len()
+            )));
+        }
+        if signature.returns.len() != results.len() {
+            return Err(Trap::new(format!(
+                "expected {} results, got {}",
+                signature.returns.len(),
+                results.len()
+            )));
+        }
+
+        let value_size = mem::size_of::<u128>();
+        let mut values_vec = vec![0; max(params.len(), results.len())];
+
+        // Store the argument values into `values_vec`.
+        let param_tys = signature.params.iter().skip(2);
+        for ((arg, slot), ty) in params.iter().zip(&mut values_vec).zip(param_tys) {
+            if arg.ty().get_wasmtime_type() != Some(ty.value_type) {
+                return Err(Trap::new("argument type mismatch"));
+            }
+            unsafe {
+                arg.write_value_to(slot);
+            }
+        }
+
+        // Get the trampoline to call for this function.
+        let exec_code_buf = self
+            .store
+            .compiler_mut()
+            .get_published_trampoline(&signature, value_size)
+            .map_err(|e| Trap::new(format!("trampoline error: {:?}", e)))?;
+
+        // Call the trampoline.
+        if let Err(error) = unsafe {
+            wasmtime_runtime::wasmtime_call_trampoline(
+                vmctx,
+                ptr::null_mut(),
+                exec_code_buf,
+                body,
+                values_vec.as_mut_ptr() as *mut u8,
+            )
+        } {
+            return Err(Trap::from_jit(error));
+        }
+
+        // Load the return values out of `values_vec`.
+        for (index, abi_param) in signature.returns.iter().enumerate() {
+            unsafe {
+                let ptr = values_vec.as_ptr().add(index);
+
+                results[index] = Val::read_value_from(ptr, abi_param.value_type);
+            }
+        }
+
+        Ok(())
+    }
+    fn wasmtime_handle(&self) -> &InstanceHandle {
+        &self.instance
+    }
+    fn wasmtime_export(&self) -> &Export {
+        &self.export
+    }
+}
+
+pub struct NativeCallable {
+    callable: Rc<dyn Callable + 'static>,
+    instance: InstanceHandle,
+    export: Export,
+}
+
+impl NativeCallable {
+    pub(crate) fn new(callable: Rc<dyn Callable + 'static>, ft: &FuncType, store: &Store) -> Self {
+        let (instance, export) =
+            generate_func_export(ft, &callable, store).expect("generated func");
+        NativeCallable {
+            callable,
+            instance,
+            export,
+        }
+    }
+}
+
+impl WrappedCallable for NativeCallable {
+    fn call(&self, params: &[Val], results: &mut [Val]) -> Result<(), Trap> {
+        self.callable.call(params, results)
+    }
+    fn wasmtime_handle(&self) -> &InstanceHandle {
+        &self.instance
+    }
+    fn wasmtime_export(&self) -> &Export {
+        &self.export
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/externals.rs.html b/api/src/wasmtime/externals.rs.html new file mode 100644 index 000000000000..0199dddfc649 --- /dev/null +++ b/api/src/wasmtime/externals.rs.html @@ -0,0 +1,1219 @@ +externals.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+
+use crate::trampoline::{generate_global_export, generate_memory_export, generate_table_export};
+use crate::values::{from_checked_anyfunc, into_checked_anyfunc, Val};
+use crate::Mutability;
+use crate::{ExternType, GlobalType, MemoryType, TableType, ValType};
+use crate::{Func, Store};
+use anyhow::{anyhow, bail, Result};
+use std::slice;
+use wasmtime_environ::wasm;
+use wasmtime_runtime::InstanceHandle;
+
+// Externals
+
+/// An external item to a WebAssembly module, or a list of what can possibly be
+/// exported from a wasm module.
+///
+/// This is both returned from [`Instance::exports`](crate::Instance::exports)
+/// as well as required by [`Instance::new`](crate::Instance::new). In other
+/// words, this is the type of extracted values from an instantiated module, and
+/// it's also used to provide imported values when instantiating a module.
+#[derive(Clone)]
+pub enum Extern {
+    /// A WebAssembly `func` which can be called.
+    Func(Func),
+    /// A WebAssembly `global` which acts like a `Cell<T>` of sorts, supporting
+    /// `get` and `set` operations.
+    Global(Global),
+    /// A WebAssembly `table` which is an array of `Val` types.
+    Table(Table),
+    /// A WebAssembly linear memory.
+    Memory(Memory),
+}
+
+impl Extern {
+    /// Returns the underlying `Func`, if this external is a function.
+    ///
+    /// Returns `None` if this is not a function.
+    pub fn func(&self) -> Option<&Func> {
+        match self {
+            Extern::Func(func) => Some(func),
+            _ => None,
+        }
+    }
+
+    /// Returns the underlying `Global`, if this external is a global.
+    ///
+    /// Returns `None` if this is not a global.
+    pub fn global(&self) -> Option<&Global> {
+        match self {
+            Extern::Global(global) => Some(global),
+            _ => None,
+        }
+    }
+
+    /// Returns the underlying `Table`, if this external is a table.
+    ///
+    /// Returns `None` if this is not a table.
+    pub fn table(&self) -> Option<&Table> {
+        match self {
+            Extern::Table(table) => Some(table),
+            _ => None,
+        }
+    }
+
+    /// Returns the underlying `Memory`, if this external is a memory.
+    ///
+    /// Returns `None` if this is not a memory.
+    pub fn memory(&self) -> Option<&Memory> {
+        match self {
+            Extern::Memory(memory) => Some(memory),
+            _ => None,
+        }
+    }
+
+    /// Returns the type associated with this `Extern`.
+    pub fn ty(&self) -> ExternType {
+        match self {
+            Extern::Func(ft) => ExternType::Func(ft.ty().clone()),
+            Extern::Memory(ft) => ExternType::Memory(ft.ty().clone()),
+            Extern::Table(tt) => ExternType::Table(tt.ty().clone()),
+            Extern::Global(gt) => ExternType::Global(gt.ty().clone()),
+        }
+    }
+
+    pub(crate) fn get_wasmtime_export(&self) -> wasmtime_runtime::Export {
+        match self {
+            Extern::Func(f) => f.wasmtime_export().clone(),
+            Extern::Global(g) => g.wasmtime_export().clone(),
+            Extern::Memory(m) => m.wasmtime_export().clone(),
+            Extern::Table(t) => t.wasmtime_export().clone(),
+        }
+    }
+
+    pub(crate) fn from_wasmtime_export(
+        store: &Store,
+        instance_handle: InstanceHandle,
+        export: wasmtime_runtime::Export,
+    ) -> Extern {
+        match export {
+            wasmtime_runtime::Export::Function { .. } => {
+                Extern::Func(Func::from_wasmtime_function(export, store, instance_handle))
+            }
+            wasmtime_runtime::Export::Memory { .. } => {
+                Extern::Memory(Memory::from_wasmtime_memory(export, store, instance_handle))
+            }
+            wasmtime_runtime::Export::Global { .. } => {
+                Extern::Global(Global::from_wasmtime_global(export, store, instance_handle))
+            }
+            wasmtime_runtime::Export::Table { .. } => {
+                Extern::Table(Table::from_wasmtime_table(export, store, instance_handle))
+            }
+        }
+    }
+}
+
+impl From<Func> for Extern {
+    fn from(r: Func) -> Self {
+        Extern::Func(r)
+    }
+}
+
+impl From<Global> for Extern {
+    fn from(r: Global) -> Self {
+        Extern::Global(r)
+    }
+}
+
+impl From<Memory> for Extern {
+    fn from(r: Memory) -> Self {
+        Extern::Memory(r)
+    }
+}
+
+impl From<Table> for Extern {
+    fn from(r: Table) -> Self {
+        Extern::Table(r)
+    }
+}
+
+/// A WebAssembly `global` value which can be read and written to.
+///
+/// A `global` in WebAssembly is sort of like a global variable within an
+/// [`Instance`](crate::Instance). The `global.get` and `global.set`
+/// instructions will modify and read global values in a wasm module. Globals
+/// can either be imported or exported from wasm modules.
+///
+/// If you're familiar with Rust already you can think of a `Global` as a sort
+/// of `Rc<Cell<Val>>`, more or less.
+///
+/// # `Global` and `Clone`
+///
+/// Globals are internally reference counted so you can `clone` a `Global`. The
+/// cloning process only performs a shallow clone, so two cloned `Global`
+/// instances are equivalent in their functionality.
+#[derive(Clone)]
+pub struct Global {
+    _store: Store,
+    ty: GlobalType,
+    wasmtime_export: wasmtime_runtime::Export,
+    wasmtime_handle: InstanceHandle,
+}
+
+impl Global {
+    /// Creates a new WebAssembly `global` value with the provide type `ty` and
+    /// initial value `val`.
+    ///
+    /// The `store` argument provided is used as a general global cache for
+    /// information, and otherwise the `ty` and `val` arguments are used to
+    /// initialize the global.
+    ///
+    /// # Errors
+    ///
+    /// Returns an error if the `ty` provided does not match the type of the
+    /// value `val`.
+    pub fn new(store: &Store, ty: GlobalType, val: Val) -> Result<Global> {
+        if val.ty() != *ty.content() {
+            bail!("value provided does not match the type of this global");
+        }
+        let (wasmtime_handle, wasmtime_export) = generate_global_export(store, &ty, val)?;
+        Ok(Global {
+            _store: store.clone(),
+            ty,
+            wasmtime_export,
+            wasmtime_handle,
+        })
+    }
+
+    /// Returns the underlying type of this `global`.
+    pub fn ty(&self) -> &GlobalType {
+        &self.ty
+    }
+
+    fn wasmtime_global_definition(&self) -> *mut wasmtime_runtime::VMGlobalDefinition {
+        match self.wasmtime_export {
+            wasmtime_runtime::Export::Global { definition, .. } => definition,
+            _ => panic!("global definition not found"),
+        }
+    }
+
+    /// Returns the current [`Val`] of this global.
+    pub fn get(&self) -> Val {
+        let definition = unsafe { &mut *self.wasmtime_global_definition() };
+        unsafe {
+            match self.ty().content() {
+                ValType::I32 => Val::from(*definition.as_i32()),
+                ValType::I64 => Val::from(*definition.as_i64()),
+                ValType::F32 => Val::F32(*definition.as_u32()),
+                ValType::F64 => Val::F64(*definition.as_u64()),
+                _ => unimplemented!("Global::get for {:?}", self.ty().content()),
+            }
+        }
+    }
+
+    /// Attempts to set the current value of this global to [`Val`].
+    ///
+    /// # Errors
+    ///
+    /// Returns an error if this global has a different type than `Val`, or if
+    /// it's not a mutable global.
+    pub fn set(&self, val: Val) -> Result<()> {
+        if self.ty().mutability() != Mutability::Var {
+            bail!("immutable global cannot be set");
+        }
+        if val.ty() != *self.ty().content() {
+            bail!(
+                "global of type {:?} cannot be set to {:?}",
+                self.ty().content(),
+                val.ty()
+            );
+        }
+        let definition = unsafe { &mut *self.wasmtime_global_definition() };
+        unsafe {
+            match val {
+                Val::I32(i) => *definition.as_i32_mut() = i,
+                Val::I64(i) => *definition.as_i64_mut() = i,
+                Val::F32(f) => *definition.as_u32_mut() = f,
+                Val::F64(f) => *definition.as_u64_mut() = f,
+                _ => unimplemented!("Global::set for {:?}", val.ty()),
+            }
+        }
+        Ok(())
+    }
+
+    pub(crate) fn wasmtime_export(&self) -> &wasmtime_runtime::Export {
+        &self.wasmtime_export
+    }
+
+    pub(crate) fn from_wasmtime_global(
+        export: wasmtime_runtime::Export,
+        store: &Store,
+        wasmtime_handle: InstanceHandle,
+    ) -> Global {
+        let global = if let wasmtime_runtime::Export::Global { ref global, .. } = export {
+            global
+        } else {
+            panic!("wasmtime export is not global")
+        };
+        // The original export is coming from wasmtime_runtime itself we should
+        // support all the types coming out of it, so assert such here.
+        let ty = GlobalType::from_wasmtime_global(&global)
+            .expect("core wasm global type should be supported");
+        Global {
+            _store: store.clone(),
+            ty: ty,
+            wasmtime_export: export,
+            wasmtime_handle,
+        }
+    }
+}
+
+/// A WebAssembly `table`, or an array of values.
+///
+/// Like [`Memory`] a table is an indexed array of values, but unlike [`Memory`]
+/// it's an array of WebAssembly values rather than bytes. One of the most
+/// common usages of a table is a function table for wasm modules, where each
+/// element has the `Func` type.
+///
+/// Tables, like globals, are not threadsafe and can only be used on one thread.
+/// Tables can be grown in size and each element can be read/written.
+///
+/// # `Table` and `Clone`
+///
+/// Tables are internally reference counted so you can `clone` a `Table`. The
+/// cloning process only performs a shallow clone, so two cloned `Table`
+/// instances are equivalent in their functionality.
+#[derive(Clone)]
+pub struct Table {
+    store: Store,
+    ty: TableType,
+    wasmtime_handle: InstanceHandle,
+    wasmtime_export: wasmtime_runtime::Export,
+}
+
+fn set_table_item(
+    handle: &mut InstanceHandle,
+    table_index: wasm::DefinedTableIndex,
+    item_index: u32,
+    item: wasmtime_runtime::VMCallerCheckedAnyfunc,
+) -> Result<()> {
+    handle
+        .table_set(table_index, item_index, item)
+        .map_err(|()| anyhow!("table element index out of bounds"))
+}
+
+impl Table {
+    /// Creates a new `Table` with the given parameters.
+    ///
+    /// * `store` - a global cache to store information in
+    /// * `ty` - the type of this table, containing both the element type as
+    ///   well as the initial size and maximum size, if any.
+    /// * `init` - the initial value to fill all table entries with, if the
+    ///   table starts with an initial size.
+    ///
+    /// # Errors
+    ///
+    /// Returns an error if `init` does not match the element type of the table.
+    pub fn new(store: &Store, ty: TableType, init: Val) -> Result<Table> {
+        let item = into_checked_anyfunc(init, store)?;
+        let (mut wasmtime_handle, wasmtime_export) = generate_table_export(store, &ty)?;
+
+        // Initialize entries with the init value.
+        match wasmtime_export {
+            wasmtime_runtime::Export::Table { definition, .. } => {
+                let index = wasmtime_handle.table_index(unsafe { &*definition });
+                let len = unsafe { (*definition).current_elements };
+                for i in 0..len {
+                    set_table_item(&mut wasmtime_handle, index, i, item.clone())?;
+                }
+            }
+            _ => unreachable!("export should be a table"),
+        }
+
+        Ok(Table {
+            store: store.clone(),
+            ty,
+            wasmtime_handle,
+            wasmtime_export,
+        })
+    }
+
+    /// Returns the underlying type of this table, including its element type as
+    /// well as the maximum/minimum lower bounds.
+    pub fn ty(&self) -> &TableType {
+        &self.ty
+    }
+
+    fn wasmtime_table_index(&self) -> wasm::DefinedTableIndex {
+        match self.wasmtime_export {
+            wasmtime_runtime::Export::Table { definition, .. } => {
+                self.wasmtime_handle.table_index(unsafe { &*definition })
+            }
+            _ => panic!("global definition not found"),
+        }
+    }
+
+    /// Returns the table element value at `index`.
+    ///
+    /// Returns `None` if `index` is out of bounds.
+    pub fn get(&self, index: u32) -> Option<Val> {
+        let table_index = self.wasmtime_table_index();
+        let item = self.wasmtime_handle.table_get(table_index, index)?;
+        Some(from_checked_anyfunc(item, &self.store))
+    }
+
+    /// Writes the `val` provided into `index` within this table.
+    ///
+    /// # Errors
+    ///
+    /// Returns an error if `index` is out of bounds or if `val` does not have
+    /// the right type to be stored in this table.
+    pub fn set(&self, index: u32, val: Val) -> Result<()> {
+        let table_index = self.wasmtime_table_index();
+        let mut wasmtime_handle = self.wasmtime_handle.clone();
+        let item = into_checked_anyfunc(val, &self.store)?;
+        set_table_item(&mut wasmtime_handle, table_index, index, item)
+    }
+
+    /// Returns the current size of this table.
+    pub fn size(&self) -> u32 {
+        match self.wasmtime_export {
+            wasmtime_runtime::Export::Table { definition, .. } => unsafe {
+                (*definition).current_elements
+            },
+            _ => panic!("global definition not found"),
+        }
+    }
+
+    /// Grows the size of this table by `delta` more elements, initialization
+    /// all new elements to `init`.
+    ///
+    /// # Errors
+    ///
+    /// Returns an error if the table cannot be grown by `delta`, for example
+    /// if it would cause the table to exceed its maximum size. Also returns an
+    /// error if `init` is not of the right type.
+    pub fn grow(&self, delta: u32, init: Val) -> Result<u32> {
+        let index = self.wasmtime_table_index();
+        let item = into_checked_anyfunc(init, &self.store)?;
+        if let Some(len) = self.wasmtime_handle.clone().table_grow(index, delta) {
+            let mut wasmtime_handle = self.wasmtime_handle.clone();
+            for i in 0..delta {
+                let i = len - (delta - i);
+                set_table_item(&mut wasmtime_handle, index, i, item.clone())?;
+            }
+            Ok(len)
+        } else {
+            bail!("failed to grow table by `{}`", delta)
+        }
+    }
+
+    pub(crate) fn wasmtime_export(&self) -> &wasmtime_runtime::Export {
+        &self.wasmtime_export
+    }
+
+    pub(crate) fn from_wasmtime_table(
+        export: wasmtime_runtime::Export,
+        store: &Store,
+        instance_handle: wasmtime_runtime::InstanceHandle,
+    ) -> Table {
+        let table = if let wasmtime_runtime::Export::Table { ref table, .. } = export {
+            table
+        } else {
+            panic!("wasmtime export is not table")
+        };
+        let ty = TableType::from_wasmtime_table(&table.table);
+        Table {
+            store: store.clone(),
+            ty: ty,
+            wasmtime_handle: instance_handle,
+            wasmtime_export: export,
+        }
+    }
+}
+
+/// A WebAssembly linear memory.
+///
+/// WebAssembly memories represent a contiguous array of bytes that have a size
+/// that is always a multiple of the WebAssembly page size, currently 64
+/// kilobytes.
+///
+/// WebAssembly memory is used for global data, statics in C/C++/Rust, shadow
+/// stack memory, etc. Accessing wasm memory is generally quite fast!
+///
+/// # `Memory` and `Clone`
+///
+/// Memories are internally reference counted so you can `clone` a `Memory`. The
+/// cloning process only performs a shallow clone, so two cloned `Memory`
+/// instances are equivalent in their functionality.
+///
+/// # `Memory` and threads
+///
+/// It is intended that `Memory` is safe to share between threads. At this time
+/// this is not implemented in `wasmtime`, however. This is planned to be
+/// implemented though!
+#[derive(Clone)]
+pub struct Memory {
+    _store: Store,
+    ty: MemoryType,
+    wasmtime_handle: InstanceHandle,
+    wasmtime_export: wasmtime_runtime::Export,
+}
+
+impl Memory {
+    /// Creates a new WebAssembly memory given the configuration of `ty`.
+    ///
+    /// The `store` argument is a general location for cache information, and
+    /// otherwise the memory will immediately be allocated according to the
+    /// type's configuration. All WebAssembly memory is initialized to zero.
+    pub fn new(store: &Store, ty: MemoryType) -> Memory {
+        let (wasmtime_handle, wasmtime_export) =
+            generate_memory_export(store, &ty).expect("generated memory");
+        Memory {
+            _store: store.clone(),
+            ty,
+            wasmtime_handle,
+            wasmtime_export,
+        }
+    }
+
+    /// Returns the underlying type of this memory.
+    pub fn ty(&self) -> &MemoryType {
+        &self.ty
+    }
+
+    fn wasmtime_memory_definition(&self) -> *mut wasmtime_runtime::VMMemoryDefinition {
+        match self.wasmtime_export {
+            wasmtime_runtime::Export::Memory { definition, .. } => definition,
+            _ => panic!("memory definition not found"),
+        }
+    }
+
+    /// Returns this memory as a slice view that can be read natively in Rust.
+    ///
+    /// # Safety
+    ///
+    /// This is an unsafe operation because there is no guarantee that the
+    /// following operations do not happen concurrently while the slice is in
+    /// use:
+    ///
+    /// * Data could be modified by calling into a wasm module.
+    /// * Memory could be relocated through growth by calling into a wasm
+    ///   module.
+    /// * When threads are supported, non-atomic reads will race with other
+    ///   writes.
+    ///
+    /// Extreme care need be taken when the data of a `Memory` is read. The
+    /// above invariants all need to be upheld at a bare minimum, and in
+    /// general you'll need to ensure that while you're looking at slice you're
+    /// the only one who can possibly look at the slice and read/write it.
+    ///
+    /// Be sure to keep in mind that `Memory` is reference counted, meaning
+    /// that there may be other users of this `Memory` instance elsewhere in
+    /// your program. Additionally `Memory` can be shared and used in any number
+    /// of wasm instances, so calling any wasm code should be considered
+    /// dangerous while you're holding a slice of memory.
+    pub unsafe fn data_unchecked(&self) -> &[u8] {
+        self.data_unchecked_mut()
+    }
+
+    /// Returns this memory as a slice view that can be read and written
+    /// natively in Rust.
+    ///
+    /// # Safety
+    ///
+    /// All of the same safety caveats of [`Memory::data_unchecked`] apply
+    /// here, doubly so because this is returning a mutable slice! As a
+    /// double-extra reminder, remember that `Memory` is reference counted, so
+    /// you can very easily acquire two mutable slices by simply calling this
+    /// function twice. Extreme caution should be used when using this method,
+    /// and in general you probably want to result to unsafe accessors and the
+    /// `data` methods below.
+    pub unsafe fn data_unchecked_mut(&self) -> &mut [u8] {
+        let definition = &*self.wasmtime_memory_definition();
+        slice::from_raw_parts_mut(definition.base, definition.current_length)
+    }
+
+    /// Returns the base pointer, in the host's address space, that the memory
+    /// is located at.
+    ///
+    /// When reading and manipulating memory be sure to read up on the caveats
+    /// of [`Memory::data_unchecked`] to make sure that you can safely
+    /// read/write the memory.
+    pub fn data_ptr(&self) -> *mut u8 {
+        unsafe { (*self.wasmtime_memory_definition()).base }
+    }
+
+    /// Returns the byte length of this memory.
+    ///
+    /// The returned value will be a multiple of the wasm page size, 64k.
+    pub fn data_size(&self) -> usize {
+        unsafe { (*self.wasmtime_memory_definition()).current_length }
+    }
+
+    /// Returns the size, in pages, of this wasm memory.
+    pub fn size(&self) -> u32 {
+        (self.data_size() / wasmtime_environ::WASM_PAGE_SIZE as usize) as u32
+    }
+
+    /// Grows this WebAssembly memory by `delta` pages.
+    ///
+    /// This will attempt to add `delta` more pages of memory on to the end of
+    /// this `Memory` instance. If successful this may relocate the memory and
+    /// cause [`Memory::data_ptr`] to return a new value. Additionally previous
+    /// slices into this memory may no longer be valid.
+    ///
+    /// On success returns the number of pages this memory previously had
+    /// before the growth succeeded.
+    ///
+    /// # Errors
+    ///
+    /// Returns an error if memory could not be grown, for example if it exceeds
+    /// the maximum limits of this memory.
+    pub fn grow(&self, delta: u32) -> Result<u32> {
+        match self.wasmtime_export {
+            wasmtime_runtime::Export::Memory { definition, .. } => {
+                let definition = unsafe { &(*definition) };
+                let index = self.wasmtime_handle.memory_index(definition);
+                self.wasmtime_handle
+                    .clone()
+                    .memory_grow(index, delta)
+                    .ok_or_else(|| anyhow!("failed to grow memory"))
+            }
+            _ => panic!("memory definition not found"),
+        }
+    }
+
+    pub(crate) fn wasmtime_export(&self) -> &wasmtime_runtime::Export {
+        &self.wasmtime_export
+    }
+
+    pub(crate) fn from_wasmtime_memory(
+        export: wasmtime_runtime::Export,
+        store: &Store,
+        instance_handle: wasmtime_runtime::InstanceHandle,
+    ) -> Memory {
+        let memory = if let wasmtime_runtime::Export::Memory { ref memory, .. } = export {
+            memory
+        } else {
+            panic!("wasmtime export is not memory")
+        };
+        let ty = MemoryType::from_wasmtime_memory(&memory.memory);
+        Memory {
+            _store: store.clone(),
+            ty: ty,
+            wasmtime_handle: instance_handle,
+            wasmtime_export: export,
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/frame_info.rs.html b/api/src/wasmtime/frame_info.rs.html new file mode 100644 index 000000000000..7d182f28b534 --- /dev/null +++ b/api/src/wasmtime/frame_info.rs.html @@ -0,0 +1,369 @@ +frame_info.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+
+use crate::module::Names;
+use std::collections::BTreeMap;
+use std::sync::{Arc, RwLock};
+use wasmtime_environ::entity::EntityRef;
+use wasmtime_environ::wasm::FuncIndex;
+use wasmtime_jit::CompiledModule;
+
+lazy_static::lazy_static! {
+    /// This is a global cache of backtrace frame information for all active
+    ///
+    /// This global cache is used during `Trap` creation to symbolicate frames.
+    /// This is populated on module compilation, and it is cleared out whenever
+    /// all references to a module are dropped.
+    pub static ref FRAME_INFO: GlobalFrameInfo = GlobalFrameInfo::default();
+}
+
+#[derive(Default)]
+pub struct GlobalFrameInfo {
+    /// An internal map that keeps track of backtrace frame information for
+    /// each module.
+    ///
+    /// This map is morally a map of ranges to a map of information for that
+    /// module. Each module is expected to reside in a disjoint section of
+    /// contiguous memory. No modules can overlap.
+    ///
+    /// The key of this map is the highest address in the module and the value
+    /// is the module's information, which also contains the start address.
+    ranges: RwLock<BTreeMap<usize, ModuleFrameInfo>>,
+}
+
+/// An RAII structure used to unregister a module's frame information when the
+/// module is destroyed.
+pub struct GlobalFrameInfoRegistration {
+    /// The key that will be removed from the global `ranges` map when this is
+    /// dropped.
+    key: usize,
+}
+
+struct ModuleFrameInfo {
+    start: usize,
+    functions: BTreeMap<usize, (usize, FuncIndex)>,
+    names: Arc<Names>,
+}
+
+impl GlobalFrameInfo {
+    /// Registers a new compiled module's frame information.
+    ///
+    /// This function will register the `names` information for all of the
+    /// compiled functions within `module`. If the `module` has no functions
+    /// then `None` will be returned. Otherwise the returned object, when
+    /// dropped, will be used to unregister all name information from this map.
+    pub fn register(
+        &self,
+        names: &Arc<Names>,
+        module: &CompiledModule,
+    ) -> Option<GlobalFrameInfoRegistration> {
+        let mut min = usize::max_value();
+        let mut max = 0;
+        let mut functions = BTreeMap::new();
+        for (i, allocated) in module.finished_functions() {
+            let (start, end) = unsafe {
+                let ptr = (**allocated).as_ptr();
+                let len = (**allocated).len();
+                (ptr as usize, ptr as usize + len)
+            };
+            if start < min {
+                min = start;
+            }
+            if end > max {
+                max = end;
+            }
+            let func_index = module.module().func_index(i);
+            assert!(functions.insert(end, (start, func_index)).is_none());
+        }
+        if functions.len() == 0 {
+            return None;
+        }
+
+        let mut ranges = self.ranges.write().unwrap();
+        // First up assert that our chunk of jit functions doesn't collide with
+        // any other known chunks of jit functions...
+        if let Some((_, prev)) = ranges.range(max..).next() {
+            assert!(prev.start > max);
+        }
+        if let Some((prev_end, _)) = ranges.range(..=min).next_back() {
+            assert!(*prev_end < min);
+        }
+
+        // ... then insert our range and assert nothing was there previously
+        let prev = ranges.insert(
+            max,
+            ModuleFrameInfo {
+                start: min,
+                functions,
+                names: names.clone(),
+            },
+        );
+        assert!(prev.is_none());
+        Some(GlobalFrameInfoRegistration { key: max })
+    }
+
+    /// Fetches information about a program counter in a backtrace.
+    ///
+    /// Returns an object if this `pc` is known to some previously registered
+    /// module, or returns `None` if no information can be found.
+    pub fn lookup(&self, pc: usize) -> Option<FrameInfo> {
+        let ranges = self.ranges.read().ok()?;
+        let (end, info) = ranges.range(pc..).next()?;
+        if pc < info.start || *end < pc {
+            return None;
+        }
+        let (end, (start, func_index)) = info.functions.range(pc..).next()?;
+        if pc < *start || *end < pc {
+            return None;
+        }
+        Some(FrameInfo {
+            module_name: info.names.module_name.clone(),
+            func_index: func_index.index() as u32,
+            func_name: info.names.module.func_names.get(func_index).cloned(),
+        })
+    }
+}
+
+impl Drop for GlobalFrameInfoRegistration {
+    fn drop(&mut self) {
+        if let Ok(mut map) = FRAME_INFO.ranges.write() {
+            map.remove(&self.key);
+        }
+    }
+}
+
+/// Description of a frame in a backtrace for a [`Trap`].
+///
+/// Whenever a WebAssembly trap occurs an instance of [`Trap`] is created. Each
+/// [`Trap`] has a backtrace of the WebAssembly frames that led to the trap, and
+/// each frame is described by this structure.
+#[derive(Debug)]
+pub struct FrameInfo {
+    module_name: Option<String>,
+    func_index: u32,
+    func_name: Option<String>,
+}
+
+impl FrameInfo {
+    /// Returns the WebAssembly function index for this frame.
+    ///
+    /// This function index is the index in the function index space of the
+    /// WebAssembly module that this frame comes from.
+    pub fn func_index(&self) -> u32 {
+        self.func_index
+    }
+
+    /// Returns the identifer of the module that this frame is for.
+    ///
+    /// Module identifiers are present in the `name` section of a WebAssembly
+    /// binary, but this may not return the exact item in the `name` section.
+    /// Module names can be overwritten at construction time or perhaps inferred
+    /// from file names. The primary purpose of this function is to assist in
+    /// debugging and therefore may be tweaked over time.
+    ///
+    /// This function returns `None` when no name can be found or inferred.
+    pub fn module_name(&self) -> Option<&str> {
+        self.module_name.as_deref()
+    }
+
+    /// Returns a descriptive name of the function for this frame, if one is
+    /// available.
+    ///
+    /// The name of this function may come from the `name` section of the
+    /// WebAssembly binary, or wasmtime may try to infer a better name for it if
+    /// not available, for example the name of the export if it's exported.
+    ///
+    /// This return value is primarily used for debugging and human-readable
+    /// purposes for things like traps. Note that the exact return value may be
+    /// tweaked over time here and isn't guaranteed to be something in
+    /// particular about a wasm module due to its primary purpose of assisting
+    /// in debugging.
+    ///
+    /// This function returns `None` when no name could be inferred.
+    pub fn func_name(&self) -> Option<&str> {
+        self.func_name.as_deref()
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/func.rs.html b/api/src/wasmtime/func.rs.html new file mode 100644 index 000000000000..5ceecbc81a96 --- /dev/null +++ b/api/src/wasmtime/func.rs.html @@ -0,0 +1,1109 @@ +func.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+
+use crate::callable::{NativeCallable, WasmtimeFn, WrappedCallable};
+use crate::{Callable, FuncType, Store, Trap, Val, ValType};
+use std::fmt;
+use std::mem;
+use std::panic::{self, AssertUnwindSafe};
+use std::ptr;
+use std::rc::Rc;
+use wasmtime_jit::InstanceHandle;
+use wasmtime_runtime::{VMContext, VMFunctionBody};
+
+/// A WebAssembly function which can be called.
+///
+/// This type can represent a number of callable items, such as:
+///
+/// * An exported function from a WebAssembly module.
+/// * A user-defined function used to satisfy an import.
+///
+/// These types of callable items are all wrapped up in this `Func` and can be
+/// used to both instantiate an [`Instance`](crate::Instance) as well as be
+/// extracted from an [`Instance`](crate::Instance).
+///
+/// # `Func` and `Clone`
+///
+/// Functions are internally reference counted so you can `clone` a `Func`. The
+/// cloning process only performs a shallow clone, so two cloned `Func`
+/// instances are equivalent in their functionality.
+#[derive(Clone)]
+pub struct Func {
+    _store: Store,
+    callable: Rc<dyn WrappedCallable + 'static>,
+    ty: FuncType,
+}
+
+macro_rules! wrappers {
+    ($(
+        $(#[$doc:meta])*
+        ($name:ident $(,$args:ident)*)
+    )*) => ($(
+        $(#[$doc])*
+        pub fn $name<F, $($args,)* R>(store: &Store, func: F) -> Func
+        where
+            F: Fn($($args),*) -> R + 'static,
+            $($args: WasmTy,)*
+            R: WasmRet,
+        {
+            #[allow(non_snake_case)]
+            unsafe extern "C" fn shim<F, $($args,)* R>(
+                vmctx: *mut VMContext,
+                _caller_vmctx: *mut VMContext,
+                $($args: $args::Abi,)*
+            ) -> R::Abi
+            where
+                F: Fn($($args),*) -> R + 'static,
+                $($args: WasmTy,)*
+                R: WasmRet,
+            {
+                let ret = {
+                    let instance = InstanceHandle::from_vmctx(vmctx);
+                    let func = instance.host_state().downcast_ref::<F>().expect("state");
+                    panic::catch_unwind(AssertUnwindSafe(|| {
+                        func($($args::from_abi(_caller_vmctx, $args)),*)
+                    }))
+                };
+                match ret {
+                    Ok(ret) => ret.into_abi(),
+                    Err(panic) => wasmtime_runtime::resume_panic(panic),
+                }
+            }
+
+            let mut _args = Vec::new();
+            $($args::push(&mut _args);)*
+            let mut ret = Vec::new();
+            R::push(&mut ret);
+            let ty = FuncType::new(_args.into(), ret.into());
+            unsafe {
+                let (instance, export) = crate::trampoline::generate_raw_func_export(
+                    &ty,
+                    std::slice::from_raw_parts_mut(
+                        shim::<F, $($args,)* R> as *mut _,
+                        0,
+                    ),
+                    store,
+                    Box::new(func),
+                )
+                .expect("failed to generate export");
+                let callable = Rc::new(WasmtimeFn::new(store, instance, export));
+                Func::from_wrapped(store, ty, callable)
+            }
+        }
+    )*)
+}
+
+macro_rules! getters {
+    ($(
+        $(#[$doc:meta])*
+        ($name:ident $(,$args:ident)*)
+    )*) => ($(
+        $(#[$doc])*
+        #[allow(non_snake_case)]
+        pub fn $name<$($args,)* R>(&self)
+            -> Option<impl Fn($($args,)*) -> Result<R, Trap>>
+        where
+            $($args: WasmTy,)*
+            R: WasmTy,
+        {
+            // Verify all the paramers match the expected parameters, and that
+            // there are no extra parameters...
+            let mut params = self.ty().params().iter().cloned();
+            $(
+                if !$args::matches(&mut params) {
+                    return None;
+                }
+            )*
+            if !params.next().is_none() {
+                return None;
+            }
+
+            // ... then do the same for the results...
+            let mut results = self.ty().results().iter().cloned();
+            if !R::matches(&mut results) {
+                return None;
+            }
+            if !results.next().is_none() {
+                return None;
+            }
+
+            // ... and then once we've passed the typechecks we can hand out our
+            // object since our `transmute` below should be safe!
+            let (address, vmctx) = match self.wasmtime_export() {
+                wasmtime_runtime::Export::Function { address, vmctx, signature: _} => {
+                    (*address, *vmctx)
+                }
+                _ => return None,
+            };
+            Some(move |$($args: $args),*| -> Result<R, Trap> {
+                unsafe {
+                    let f = mem::transmute::<
+                        *const VMFunctionBody,
+                        unsafe extern "C" fn(
+                            *mut VMContext,
+                            *mut VMContext,
+                            $($args::Abi,)*
+                        ) -> R::Abi,
+                    >(address);
+                    let mut ret = None;
+                    $(let $args = $args.into_abi();)*
+                    wasmtime_runtime::catch_traps(vmctx, || {
+                        ret = Some(f(vmctx, ptr::null_mut(), $($args,)*));
+                    }).map_err(Trap::from_jit)?;
+                    Ok(R::from_abi(vmctx, ret.unwrap()))
+                }
+            })
+        }
+    )*)
+}
+
+impl Func {
+    /// Creates a new `Func` with the given arguments, typically to create a
+    /// user-defined function to pass as an import to a module.
+    ///
+    /// * `store` - a cache of data where information is stored, typically
+    ///   shared with a [`Module`](crate::Module).
+    ///
+    /// * `ty` - the signature of this function, used to indicate what the
+    ///   inputs and outputs are, which must be WebAssembly types.
+    ///
+    /// * `callable` - a type implementing the [`Callable`] trait which
+    ///   is the implementation of this `Func` value.
+    ///
+    /// Note that the implementation of `callable` must adhere to the `ty`
+    /// signature given, error or traps may occur if it does not respect the
+    /// `ty` signature.
+    pub fn new(store: &Store, ty: FuncType, callable: Rc<dyn Callable + 'static>) -> Self {
+        let callable = Rc::new(NativeCallable::new(callable, &ty, &store));
+        Func::from_wrapped(store, ty, callable)
+    }
+
+    wrappers! {
+        /// Creates a new `Func` from the given Rust closure, which takes 0
+        /// arguments.
+        ///
+        /// For more information about this function, see [`Func::wrap1`].
+        (wrap0)
+
+        /// Creates a new `Func` from the given Rust closure, which takes 1
+        /// argument.
+        ///
+        /// This function will create a new `Func` which, when called, will
+        /// execute the given Rust closure. Unlike [`Func::new`] the target
+        /// function being called is known statically so the type signature can
+        /// be inferred. Rust types will map to WebAssembly types as follows:
+        ///
+        ///
+        /// | Rust Argument Type | WebAssembly Type |
+        /// |--------------------|------------------|
+        /// | `i32`              | `i32`            |
+        /// | `i64`              | `i64`            |
+        /// | `f32`              | `f32`            |
+        /// | `f64`              | `f64`            |
+        /// | (not supported)    | `v128`           |
+        /// | (not supported)    | `anyref`         |
+        ///
+        /// Any of the Rust types can be returned from the closure as well, in
+        /// addition to some extra types
+        ///
+        /// | Rust Return Type  | WebAssembly Return Type | Meaning           |
+        /// |-------------------|-------------------------|-------------------|
+        /// | `()`              | nothing                 | no return value   |
+        /// | `Result<T, Trap>` | `T`                     | function may trap |
+        ///
+        /// Note that when using this API (and the related `wrap*` family of
+        /// functions), the intention is to create as thin of a layer as
+        /// possible for when WebAssembly calls the function provided. With
+        /// sufficient inlining and optimization the WebAssembly will call
+        /// straight into `func` provided, with no extra fluff entailed.
+        (wrap1, A)
+
+        /// Creates a new `Func` from the given Rust closure, which takes 2
+        /// arguments.
+        ///
+        /// For more information about this function, see [`Func::wrap1`].
+        (wrap2, A, B)
+
+        /// Creates a new `Func` from the given Rust closure, which takes 3
+        /// arguments.
+        ///
+        /// For more information about this function, see [`Func::wrap1`].
+        (wrap3, A, B, C)
+
+        /// Creates a new `Func` from the given Rust closure, which takes 4
+        /// arguments.
+        ///
+        /// For more information about this function, see [`Func::wrap1`].
+        (wrap4, A, B, C, D)
+
+        /// Creates a new `Func` from the given Rust closure, which takes 5
+        /// arguments.
+        ///
+        /// For more information about this function, see [`Func::wrap1`].
+        (wrap5, A, B, C, D, E)
+
+        /// Creates a new `Func` from the given Rust closure, which takes 6
+        /// arguments.
+        ///
+        /// For more information about this function, see [`Func::wrap1`].
+        (wrap6, A, B, C, D, E, G)
+
+        /// Creates a new `Func` from the given Rust closure, which takes 7
+        /// arguments.
+        ///
+        /// For more information about this function, see [`Func::wrap1`].
+        (wrap7, A, B, C, D, E, G, H)
+
+        /// Creates a new `Func` from the given Rust closure, which takes 8
+        /// arguments.
+        ///
+        /// For more information about this function, see [`Func::wrap1`].
+        (wrap8, A, B, C, D, E, G, H, I)
+
+        /// Creates a new `Func` from the given Rust closure, which takes 9
+        /// arguments.
+        ///
+        /// For more information about this function, see [`Func::wrap1`].
+        (wrap9, A, B, C, D, E, G, H, I, J)
+
+        /// Creates a new `Func` from the given Rust closure, which takes 10
+        /// arguments.
+        ///
+        /// For more information about this function, see [`Func::wrap1`].
+        (wrap10, A, B, C, D, E, G, H, I, J, K)
+    }
+
+    fn from_wrapped(
+        store: &Store,
+        ty: FuncType,
+        callable: Rc<dyn WrappedCallable + 'static>,
+    ) -> Func {
+        Func {
+            _store: store.clone(),
+            callable,
+            ty,
+        }
+    }
+
+    /// Returns the underlying wasm type that this `Func` has.
+    pub fn ty(&self) -> &FuncType {
+        &self.ty
+    }
+
+    /// Returns the number of parameters that this function takes.
+    pub fn param_arity(&self) -> usize {
+        self.ty.params().len()
+    }
+
+    /// Returns the number of results this function produces.
+    pub fn result_arity(&self) -> usize {
+        self.ty.results().len()
+    }
+
+    /// Invokes this function with the `params` given, returning the results and
+    /// any trap, if one occurs.
+    ///
+    /// The `params` here must match the type signature of this `Func`, or a
+    /// trap will occur. If a trap occurs while executing this function, then a
+    /// trap will also be returned.
+    ///
+    /// This function should not panic unless the underlying function itself
+    /// initiates a panic.
+    pub fn call(&self, params: &[Val]) -> Result<Box<[Val]>, Trap> {
+        let mut results = vec![Val::null(); self.result_arity()];
+        self.callable.call(params, &mut results)?;
+        Ok(results.into_boxed_slice())
+    }
+
+    pub(crate) fn wasmtime_export(&self) -> &wasmtime_runtime::Export {
+        self.callable.wasmtime_export()
+    }
+
+    pub(crate) fn from_wasmtime_function(
+        export: wasmtime_runtime::Export,
+        store: &Store,
+        instance_handle: InstanceHandle,
+    ) -> Self {
+        // This is only called with `Export::Function`, and since it's coming
+        // from wasmtime_runtime itself we should support all the types coming
+        // out of it, so assert such here.
+        let ty = if let wasmtime_runtime::Export::Function { signature, .. } = &export {
+            FuncType::from_wasmtime_signature(signature.clone())
+                .expect("core wasm signature should be supported")
+        } else {
+            panic!("expected function export")
+        };
+        let callable = WasmtimeFn::new(store, instance_handle, export);
+        Func::from_wrapped(store, ty, Rc::new(callable))
+    }
+
+    getters! {
+        /// Extracts a natively-callable object from this `Func`, if the
+        /// signature matches.
+        ///
+        /// See the [`Func::get1`] method for more documentation.
+        (get0)
+
+        /// Extracts a natively-callable object from this `Func`, if the
+        /// signature matches.
+        ///
+        /// This function serves as an optimized version of the [`Func::call`]
+        /// method if the type signature of a function is statically known to
+        /// the program. This method is faster than `call` on a few metrics:
+        ///
+        /// * Runtime type-checking only happens once, when this method is
+        ///   called.
+        /// * The result values, if any, aren't boxed into a vector.
+        /// * Arguments and return values don't go through boxing and unboxing.
+        /// * No trampolines are used to transfer control flow to/from JIT code,
+        ///   instead this function jumps directly into JIT code.
+        ///
+        /// For more information about which Rust types match up to which wasm
+        /// types, see the documentation on [`Func::wrap1`].
+        ///
+        /// # Return
+        ///
+        /// This function will return `None` if the type signature asserted
+        /// statically does not match the runtime type signature. `Some`,
+        /// however, will be returned if the underlying function takes one
+        /// parameter of type `A` and returns the parameter `R`. Currently `R`
+        /// can either be `()` (no return values) or one wasm type. At this time
+        /// a multi-value return isn't supported.
+        ///
+        /// The returned closure will always return a `Result<R, Trap>` and an
+        /// `Err` is returned if a trap happens while the wasm is executing.
+        (get1, A)
+
+        /// Extracts a natively-callable object from this `Func`, if the
+        /// signature matches.
+        ///
+        /// See the [`Func::get1`] method for more documentation.
+        (get2, A, B)
+    }
+}
+
+impl fmt::Debug for Func {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "Func")
+    }
+}
+
+/// A trait implemented for types which can be arguments to closures passed to
+/// [`Func::wrap1`] and friends.
+///
+/// This trait should not be implemented by user types. This trait may change at
+/// any time internally. The types which implement this trait, however, are
+/// stable over time.
+///
+/// For more information see [`Func::wrap1`]
+pub trait WasmTy {
+    #[doc(hidden)]
+    type Abi: Copy;
+    #[doc(hidden)]
+    fn push(dst: &mut Vec<ValType>);
+    #[doc(hidden)]
+    fn matches(tys: impl Iterator<Item = ValType>) -> bool;
+    #[doc(hidden)]
+    fn from_abi(vmctx: *mut VMContext, abi: Self::Abi) -> Self;
+    #[doc(hidden)]
+    fn into_abi(self) -> Self::Abi;
+}
+
+impl WasmTy for () {
+    type Abi = ();
+    fn push(_dst: &mut Vec<ValType>) {}
+    fn matches(_tys: impl Iterator<Item = ValType>) -> bool {
+        true
+    }
+    #[inline]
+    fn from_abi(_vmctx: *mut VMContext, abi: Self::Abi) -> Self {
+        abi
+    }
+    #[inline]
+    fn into_abi(self) -> Self::Abi {
+        self
+    }
+}
+
+impl WasmTy for i32 {
+    type Abi = Self;
+    fn push(dst: &mut Vec<ValType>) {
+        dst.push(ValType::I32);
+    }
+    fn matches(mut tys: impl Iterator<Item = ValType>) -> bool {
+        tys.next() == Some(ValType::I32)
+    }
+    #[inline]
+    fn from_abi(_vmctx: *mut VMContext, abi: Self::Abi) -> Self {
+        abi
+    }
+    #[inline]
+    fn into_abi(self) -> Self::Abi {
+        self
+    }
+}
+
+impl WasmTy for i64 {
+    type Abi = Self;
+    fn push(dst: &mut Vec<ValType>) {
+        dst.push(ValType::I64);
+    }
+    fn matches(mut tys: impl Iterator<Item = ValType>) -> bool {
+        tys.next() == Some(ValType::I64)
+    }
+    #[inline]
+    fn from_abi(_vmctx: *mut VMContext, abi: Self::Abi) -> Self {
+        abi
+    }
+    #[inline]
+    fn into_abi(self) -> Self::Abi {
+        self
+    }
+}
+
+impl WasmTy for f32 {
+    type Abi = Self;
+    fn push(dst: &mut Vec<ValType>) {
+        dst.push(ValType::F32);
+    }
+    fn matches(mut tys: impl Iterator<Item = ValType>) -> bool {
+        tys.next() == Some(ValType::F32)
+    }
+    #[inline]
+    fn from_abi(_vmctx: *mut VMContext, abi: Self::Abi) -> Self {
+        abi
+    }
+    #[inline]
+    fn into_abi(self) -> Self::Abi {
+        self
+    }
+}
+
+impl WasmTy for f64 {
+    type Abi = Self;
+    fn push(dst: &mut Vec<ValType>) {
+        dst.push(ValType::F64);
+    }
+    fn matches(mut tys: impl Iterator<Item = ValType>) -> bool {
+        tys.next() == Some(ValType::F64)
+    }
+    #[inline]
+    fn from_abi(_vmctx: *mut VMContext, abi: Self::Abi) -> Self {
+        abi
+    }
+    #[inline]
+    fn into_abi(self) -> Self::Abi {
+        self
+    }
+}
+
+/// A trait implemented for types which can be returned from closures passed to
+/// [`Func::wrap1`] and friends.
+///
+/// This trait should not be implemented by user types. This trait may change at
+/// any time internally. The types which implement this trait, however, are
+/// stable over time.
+///
+/// For more information see [`Func::wrap1`]
+pub trait WasmRet {
+    #[doc(hidden)]
+    type Abi;
+    #[doc(hidden)]
+    fn push(dst: &mut Vec<ValType>);
+    #[doc(hidden)]
+    fn matches(tys: impl Iterator<Item = ValType>) -> bool;
+    #[doc(hidden)]
+    fn into_abi(self) -> Self::Abi;
+}
+
+impl<T: WasmTy> WasmRet for T {
+    type Abi = T::Abi;
+    fn push(dst: &mut Vec<ValType>) {
+        T::push(dst)
+    }
+
+    fn matches(tys: impl Iterator<Item = ValType>) -> bool {
+        T::matches(tys)
+    }
+
+    #[inline]
+    fn into_abi(self) -> Self::Abi {
+        T::into_abi(self)
+    }
+}
+
+impl<T: WasmTy> WasmRet for Result<T, Trap> {
+    type Abi = T::Abi;
+    fn push(dst: &mut Vec<ValType>) {
+        T::push(dst)
+    }
+
+    fn matches(tys: impl Iterator<Item = ValType>) -> bool {
+        T::matches(tys)
+    }
+
+    #[inline]
+    fn into_abi(self) -> Self::Abi {
+        match self {
+            Ok(val) => return val.into_abi(),
+            Err(trap) => handle_trap(trap),
+        }
+
+        fn handle_trap(trap: Trap) -> ! {
+            unsafe { wasmtime_runtime::raise_user_trap(Box::new(trap)) }
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/instance.rs.html b/api/src/wasmtime/instance.rs.html new file mode 100644 index 000000000000..893543b27d26 --- /dev/null +++ b/api/src/wasmtime/instance.rs.html @@ -0,0 +1,361 @@ +instance.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+
+use crate::externals::Extern;
+use crate::module::Module;
+use crate::runtime::Store;
+use crate::trap::Trap;
+use anyhow::{Error, Result};
+use wasmtime_jit::{CompiledModule, Resolver};
+use wasmtime_runtime::{Export, InstanceHandle, InstantiationError};
+
+struct SimpleResolver<'a> {
+    imports: &'a [Extern],
+}
+
+impl Resolver for SimpleResolver<'_> {
+    fn resolve(&mut self, idx: u32, _name: &str, _field: &str) -> Option<Export> {
+        self.imports
+            .get(idx as usize)
+            .map(|i| i.get_wasmtime_export())
+    }
+}
+
+fn instantiate(
+    compiled_module: &CompiledModule,
+    imports: &[Extern],
+) -> Result<InstanceHandle, Error> {
+    let mut resolver = SimpleResolver { imports };
+    unsafe {
+        let instance = compiled_module
+            .instantiate(&mut resolver)
+            .map_err(|e| -> Error {
+                match e {
+                    InstantiationError::StartTrap(trap) => Trap::from_jit(trap).into(),
+                    other => other.into(),
+                }
+            })?;
+        Ok(instance)
+    }
+}
+
+/// An instantiated WebAssembly module.
+///
+/// This type represents the instantiation of a [`Module`]. Once instantiated
+/// you can access the [`exports`](Instance::exports) which are of type
+/// [`Extern`] and provide the ability to call functions, set globals, read
+/// memory, etc. This is where all the fun stuff happens!
+///
+/// An [`Instance`] is created from two inputs, a [`Module`] and a list of
+/// imports, provided as a list of [`Extern`] values. The [`Module`] is the wasm
+/// code that was compiled and we're instantiating, and the [`Extern`] imports
+/// are how we're satisfying the imports of the module provided. On successful
+/// instantiation an [`Instance`] will automatically invoke the wasm `start`
+/// function.
+///
+/// When interacting with any wasm code you'll want to make an [`Instance`] to
+/// call any code or execute anything!
+#[derive(Clone)]
+pub struct Instance {
+    pub(crate) instance_handle: InstanceHandle,
+    module: Module,
+    exports: Box<[Extern]>,
+}
+
+impl Instance {
+    /// Creates a new [`Instance`] from the previously compiled [`Module`] and
+    /// list of `imports` specified.
+    ///
+    /// This method instantiates the `module` provided with the `imports`,
+    /// following the procedure in the [core specification][inst] to
+    /// instantiate. Instantiation can fail for a number of reasons (many
+    /// specified below), but if successful the `start` function will be
+    /// automatically run (if provided) and then the [`Instance`] will be
+    /// returned.
+    ///
+    /// ## Providing Imports
+    ///
+    /// The `imports` array here is a bit tricky. The entries in the list of
+    /// `imports` are intended to correspond 1:1 with the list of imports
+    /// returned by [`Module::imports`]. Before calling [`Instance::new`] you'll
+    /// want to inspect the return value of [`Module::imports`] and, for each
+    /// import type, create an [`Extern`] which corresponds to that type.
+    /// These [`Extern`] values are all then collected into a list and passed to
+    /// this function.
+    ///
+    /// Note that this function is intentionally relatively low level. It is the
+    /// intention that we'll soon provide a [higher level API][issue] which will
+    /// be much more ergonomic for instantiating modules. If you need the full
+    /// power of customization of imports, though, this is the method for you!
+    ///
+    /// ## Errors
+    ///
+    /// This function can fail for a number of reasons, including, but not
+    /// limited to:
+    ///
+    /// * The number of `imports` provided doesn't match the number of imports
+    ///   returned by the `module`'s [`Module::imports`] method.
+    /// * The type of any [`Extern`] doesn't match the corresponding
+    ///   [`ExternType`] entry that it maps to.
+    /// * The `start` function in the instance, if present, traps.
+    /// * Module/instance resource limits are exceeded.
+    ///
+    /// When instantiation fails it's recommended to inspect the return value to
+    /// see why it failed, or bubble it upwards. If you'd like to specifically
+    /// check for trap errors, you can use `error.downcast::<Trap>()`.
+    ///
+    /// [inst]: https://webassembly.github.io/spec/core/exec/modules.html#exec-instantiation
+    /// [issue]: https://github.com/bytecodealliance/wasmtime/issues/727
+    pub fn new(module: &Module, imports: &[Extern]) -> Result<Instance, Error> {
+        let store = module.store();
+        let instance_handle = instantiate(module.compiled_module(), imports)?;
+
+        let exports = {
+            let mut exports = Vec::with_capacity(module.exports().len());
+            for export in module.exports() {
+                let name = export.name().to_string();
+                let export = instance_handle.lookup(&name).expect("export");
+                exports.push(Extern::from_wasmtime_export(
+                    store,
+                    instance_handle.clone(),
+                    export,
+                ));
+            }
+            exports.into_boxed_slice()
+        };
+        module.register_frame_info();
+        Ok(Instance {
+            instance_handle,
+            module: module.clone(),
+            exports,
+        })
+    }
+
+    /// Returns the associated [`Store`] that this `Instance` is compiled into.
+    ///
+    /// This is the [`Store`] that generally serves as a sort of global cache
+    /// for various instance-related things.
+    pub fn store(&self) -> &Store {
+        self.module.store()
+    }
+
+    /// Returns the associated [`Module`] that this `Instance` instantiated.
+    ///
+    /// The corresponding [`Module`] here is a static version of this `Instance`
+    /// which can be used to learn information such as naming information about
+    /// various functions.
+    pub fn module(&self) -> &Module {
+        &self.module
+    }
+
+    /// Returns the list of exported items from this [`Instance`].
+    ///
+    /// Note that the exports here do not have names associated with them,
+    /// they're simply the values that are exported. To learn the value of each
+    /// export you'll need to consult [`Module::exports`]. The list returned
+    /// here maps 1:1 with the list that [`Module::exports`] returns, and
+    /// [`ExportType`] contains the name of each export.
+    pub fn exports(&self) -> &[Extern] {
+        &self.exports
+    }
+
+    /// Looks up an exported [`Extern`] value by name.
+    ///
+    /// This method will search the module for an export named `name` and return
+    /// the value, if found.
+    ///
+    /// Returns `None` if there was no export named `name`.
+    pub fn get_export(&self, name: &str) -> Option<&Extern> {
+        let (i, _) = self
+            .module
+            .exports()
+            .iter()
+            .enumerate()
+            .find(|(_, e)| e.name() == name)?;
+        Some(&self.exports()[i])
+    }
+
+    #[doc(hidden)]
+    pub fn handle(&self) -> &InstanceHandle {
+        &self.instance_handle
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/lib.rs.html b/api/src/wasmtime/lib.rs.html new file mode 100644 index 000000000000..3f5f4ad69db3 --- /dev/null +++ b/api/src/wasmtime/lib.rs.html @@ -0,0 +1,91 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+
+//! Wasmtime's embedding API
+//!
+//! This crate contains a high-level API used to interact with WebAssembly
+//! modules. The API here is intended to mirror the proposed [WebAssembly C
+//! API](https://github.com/WebAssembly/wasm-c-api), with small extensions here
+//! and there to implement Rust idioms. This crate also defines the actual C API
+//! itself for consumption from other languages.
+
+#![deny(missing_docs)]
+
+mod callable;
+mod externals;
+mod frame_info;
+mod func;
+mod instance;
+mod module;
+mod r#ref;
+mod runtime;
+mod trampoline;
+mod trap;
+mod types;
+mod values;
+
+pub use crate::callable::Callable;
+pub use crate::externals::*;
+pub use crate::frame_info::FrameInfo;
+pub use crate::func::{Func, WasmRet, WasmTy};
+pub use crate::instance::Instance;
+pub use crate::module::Module;
+pub use crate::r#ref::{AnyRef, HostInfo, HostRef};
+pub use crate::runtime::{Config, Engine, OptLevel, Store, Strategy};
+pub use crate::trap::Trap;
+pub use crate::types::*;
+pub use crate::values::*;
+
+cfg_if::cfg_if! {
+    if #[cfg(unix)] {
+        pub mod unix;
+    } else if #[cfg(windows)] {
+        pub mod windows;
+    } else {
+        // ... unknown os!
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/module.rs.html b/api/src/wasmtime/module.rs.html new file mode 100644 index 000000000000..b3689918ad08 --- /dev/null +++ b/api/src/wasmtime/module.rs.html @@ -0,0 +1,885 @@ +module.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+
+use crate::frame_info::{GlobalFrameInfoRegistration, FRAME_INFO};
+use crate::runtime::Store;
+use crate::types::{
+    ExportType, ExternType, FuncType, GlobalType, ImportType, Limits, MemoryType, Mutability,
+    TableType, ValType,
+};
+use anyhow::{bail, Error, Result};
+use std::path::Path;
+use std::sync::{Arc, Mutex};
+use wasmparser::{
+    validate, CustomSectionKind, ExternalKind, ImportSectionEntryType, ModuleReader, Name,
+    SectionCode,
+};
+use wasmtime_jit::CompiledModule;
+
+fn into_memory_type(mt: wasmparser::MemoryType) -> Result<MemoryType> {
+    if mt.shared {
+        bail!("shared memories are not supported yet");
+    }
+    Ok(MemoryType::new(Limits::new(
+        mt.limits.initial,
+        mt.limits.maximum,
+    )))
+}
+
+fn into_global_type(gt: wasmparser::GlobalType) -> GlobalType {
+    let mutability = if gt.mutable {
+        Mutability::Var
+    } else {
+        Mutability::Const
+    };
+    GlobalType::new(into_valtype(&gt.content_type), mutability)
+}
+
+// `into_valtype` is used for `map` which requires `&T`.
+#[allow(clippy::trivially_copy_pass_by_ref)]
+fn into_valtype(ty: &wasmparser::Type) -> ValType {
+    use wasmparser::Type::*;
+    match ty {
+        I32 => ValType::I32,
+        I64 => ValType::I64,
+        F32 => ValType::F32,
+        F64 => ValType::F64,
+        V128 => ValType::V128,
+        AnyFunc => ValType::FuncRef,
+        AnyRef => ValType::AnyRef,
+        _ => unimplemented!("types in into_valtype"),
+    }
+}
+
+fn into_func_type(mt: wasmparser::FuncType) -> FuncType {
+    assert_eq!(mt.form, wasmparser::Type::Func);
+    let params = mt.params.iter().map(into_valtype).collect::<Vec<_>>();
+    let returns = mt.returns.iter().map(into_valtype).collect::<Vec<_>>();
+    FuncType::new(params.into_boxed_slice(), returns.into_boxed_slice())
+}
+
+fn into_table_type(tt: wasmparser::TableType) -> TableType {
+    assert!(
+        tt.element_type == wasmparser::Type::AnyFunc || tt.element_type == wasmparser::Type::AnyRef
+    );
+    let ty = into_valtype(&tt.element_type);
+    let limits = Limits::new(tt.limits.initial, tt.limits.maximum);
+    TableType::new(ty, limits)
+}
+
+/// A compiled WebAssembly module, ready to be instantiated.
+///
+/// A `Module` is a compiled in-memory representation of an input WebAssembly
+/// binary. A `Module` is then used to create an [`Instance`](crate::Instance)
+/// through an instantiation process. You cannot call functions or fetch
+/// globals, for example, on a `Module` because it's purely a code
+/// representation. Instead you'll need to create an
+/// [`Instance`](crate::Instance) to interact with the wasm module.
+///
+/// ## Modules and `Clone`
+///
+/// Using `clone` on a `Module` is a cheap operation. It will not create an
+/// entirely new module, but rather just a new reference to the existing module.
+/// In other words it's a shallow copy, not a deep copy.
+#[derive(Clone)]
+pub struct Module {
+    inner: Arc<ModuleInner>,
+}
+
+struct ModuleInner {
+    store: Store,
+    imports: Box<[ImportType]>,
+    exports: Box<[ExportType]>,
+    compiled: CompiledModule,
+    frame_info_registration: Mutex<Option<Option<GlobalFrameInfoRegistration>>>,
+    names: Arc<Names>,
+}
+
+pub struct Names {
+    pub module: Arc<wasmtime_environ::Module>,
+    pub module_name: Option<String>,
+}
+
+impl Module {
+    /// Creates a new WebAssembly `Module` from the given in-memory `bytes`.
+    ///
+    /// The `bytes` provided must be in one of two formats:
+    ///
+    /// * It can be a [binary-encoded][binary] WebAssembly module. This
+    ///   is always supported.
+    /// * It may also be a [text-encoded][text] instance of the WebAssembly
+    ///   text format. This is only supported when the `wat` feature of this
+    ///   crate is enabled. If this is supplied then the text format will be
+    ///   parsed before validation. Note that the `wat` feature is enabled by
+    ///   default.
+    ///
+    /// The data for the wasm module must be loaded in-memory if it's present
+    /// elsewhere, for example on disk. This requires that the entire binary is
+    /// loaded into memory all at once, this API does not support streaming
+    /// compilation of a module.
+    ///
+    /// The WebAssembly binary will be decoded and validated. It will also be
+    /// compiled according to the configuration of the provided `store` and
+    /// cached in this type.
+    ///
+    /// The provided `store` is a global cache for compiled resources as well as
+    /// configuration for what wasm features are enabled. It's recommended to
+    /// share a `store` among modules if possible.
+    ///
+    /// # Errors
+    ///
+    /// This function may fail and return an error. Errors may include
+    /// situations such as:
+    ///
+    /// * The binary provided could not be decoded because it's not a valid
+    ///   WebAssembly binary
+    /// * The WebAssembly binary may not validate (e.g. contains type errors)
+    /// * Implementation-specific limits were exceeded with a valid binary (for
+    ///   example too many locals)
+    /// * The wasm binary may use features that are not enabled in the
+    ///   configuration of `store`
+    /// * If the `wat` feature is enabled and the input is text, then it may be
+    ///   rejected if it fails to parse.
+    ///
+    /// The error returned should contain full information about why module
+    /// creation failed if one is returned.
+    ///
+    /// [binary]: https://webassembly.github.io/spec/core/binary/index.html
+    /// [text]: https://webassembly.github.io/spec/core/text/index.html
+    pub fn new(store: &Store, bytes: impl AsRef<[u8]>) -> Result<Module> {
+        #[cfg(feature = "wat")]
+        let bytes = wat::parse_bytes(bytes.as_ref())?;
+        Module::from_binary(store, bytes.as_ref())
+    }
+
+    /// Creates a new WebAssembly `Module` from the given in-memory `binary`
+    /// data. The provided `name` will be used in traps/backtrace details.
+    ///
+    /// See [`Module::new`] for other details.
+    pub fn new_with_name(store: &Store, bytes: impl AsRef<[u8]>, name: &str) -> Result<Module> {
+        let mut module = Module::new(store, bytes.as_ref())?;
+        let inner = Arc::get_mut(&mut module.inner).unwrap();
+        Arc::get_mut(&mut inner.names).unwrap().module_name = Some(name.to_string());
+        Ok(module)
+    }
+
+    /// Creates a new WebAssembly `Module` from the contents of the given
+    /// `file` on disk.
+    ///
+    /// This is a convenience function that will read the `file` provided and
+    /// pass the bytes to the [`Module::new`] function. For more information
+    /// see [`Module::new`]
+    pub fn from_file(store: &Store, file: impl AsRef<Path>) -> Result<Module> {
+        #[cfg(feature = "wat")]
+        let wasm = wat::parse_file(file)?;
+        #[cfg(not(feature = "wat"))]
+        let wasm = std::fs::read(file)?;
+        Module::new(store, &wasm)
+    }
+
+    /// Creates a new WebAssembly `Module` from the given in-memory `binary`
+    /// data.
+    ///
+    /// This is similar to [`Module::new`] except that it requires that the
+    /// `binary` input is a WebAssembly binary, the text format is not supported
+    /// by this function. It's generally recommended to use [`Module::new`],
+    /// but if it's required to not support the text format this function can be
+    /// used instead.
+    pub fn from_binary(store: &Store, binary: &[u8]) -> Result<Module> {
+        Module::validate(store, binary)?;
+        // Note that the call to `from_binary_unchecked` here should be ok
+        // because we previously validated the binary, meaning we're guaranteed
+        // to pass a valid binary for `store`.
+        unsafe { Module::from_binary_unchecked(store, binary) }
+    }
+
+    /// Creates a new WebAssembly `Module` from the given in-memory `binary`
+    /// data, skipping validation and asserting that `binary` is a valid
+    /// WebAssembly module.
+    ///
+    /// This function is the same as [`Module::new`] except that it skips the
+    /// call to [`Module::validate`] and it does not support the text format of
+    /// WebAssembly. The WebAssembly binary is not validated for
+    /// correctness and it is simply assumed as valid.
+    ///
+    /// For more information about creation of a module and the `store` argument
+    /// see the documentation of [`Module::new`].
+    ///
+    /// # Unsafety
+    ///
+    /// This function is `unsafe` due to the unchecked assumption that the input
+    /// `binary` is valid. If the `binary` is not actually a valid wasm binary it
+    /// may cause invalid machine code to get generated, cause panics, etc.
+    ///
+    /// It is only safe to call this method if [`Module::validate`] succeeds on
+    /// the same arguments passed to this function.
+    ///
+    /// # Errors
+    ///
+    /// This function may fail for many of the same reasons as [`Module::new`].
+    /// While this assumes that the binary is valid it still needs to actually
+    /// be somewhat valid for decoding purposes, and the basics of decoding can
+    /// still fail.
+    pub unsafe fn from_binary_unchecked(store: &Store, binary: &[u8]) -> Result<Module> {
+        let mut ret = Module::compile(store, binary)?;
+        ret.read_imports_and_exports(binary)?;
+        Ok(ret)
+    }
+
+    /// Validates `binary` input data as a WebAssembly binary given the
+    /// configuration in `store`.
+    ///
+    /// This function will perform a speedy validation of the `binary` input
+    /// WebAssembly module (which is in [binary form][binary], the text format
+    /// is not accepted by this function) and return either `Ok` or `Err`
+    /// depending on the results of validation. The `store` argument indicates
+    /// configuration for WebAssembly features, for example, which are used to
+    /// indicate what should be valid and what shouldn't be.
+    ///
+    /// Validation automatically happens as part of [`Module::new`], but is a
+    /// requirement for [`Module::new_unchecked`] to be safe.
+    ///
+    /// # Errors
+    ///
+    /// If validation fails for any reason (type check error, usage of a feature
+    /// that wasn't enabled, etc) then an error with a description of the
+    /// validation issue will be returned.
+    ///
+    /// [binary]: https://webassembly.github.io/spec/core/binary/index.html
+    pub fn validate(store: &Store, binary: &[u8]) -> Result<()> {
+        let config = store.engine().config().validating_config.clone();
+        validate(binary, Some(config)).map_err(Error::new)
+    }
+
+    unsafe fn compile(store: &Store, binary: &[u8]) -> Result<Self> {
+        let compiled = CompiledModule::new(
+            &mut store.compiler_mut(),
+            binary,
+            store.engine().config().debug_info,
+        )?;
+
+        let names = Arc::new(Names {
+            module_name: None,
+            module: compiled.module().clone(),
+        });
+        Ok(Module {
+            inner: Arc::new(ModuleInner {
+                store: store.clone(),
+                imports: Box::new([]),
+                exports: Box::new([]),
+                names,
+                compiled,
+                frame_info_registration: Mutex::new(None),
+            }),
+        })
+    }
+
+    pub(crate) fn compiled_module(&self) -> &CompiledModule {
+        &self.inner.compiled
+    }
+
+    /// Returns identifier/name that this [`Module`] has. This name
+    /// is used in traps/backtrace details.
+    pub fn name(&self) -> Option<&str> {
+        self.inner.names.module_name.as_deref()
+    }
+
+    /// Returns the list of imports that this [`Module`] has and must be
+    /// satisfied.
+    pub fn imports(&self) -> &[ImportType] {
+        &self.inner.imports
+    }
+
+    /// Returns the list of exports that this [`Module`] has and will be
+    /// available after instantiation.
+    pub fn exports(&self) -> &[ExportType] {
+        &self.inner.exports
+    }
+
+    /// Returns the [`Store`] that this [`Module`] was compiled into.
+    pub fn store(&self) -> &Store {
+        &self.inner.store
+    }
+
+    fn read_imports_and_exports(&mut self, binary: &[u8]) -> Result<()> {
+        let inner = Arc::get_mut(&mut self.inner).unwrap();
+        let mut reader = ModuleReader::new(binary)?;
+        let mut imports = Vec::new();
+        let mut exports = Vec::new();
+        let mut memories = Vec::new();
+        let mut tables = Vec::new();
+        let mut func_sig = Vec::new();
+        let mut sigs = Vec::new();
+        let mut globals = Vec::new();
+        while !reader.eof() {
+            let section = reader.read()?;
+            match section.code {
+                SectionCode::Memory => {
+                    let section = section.get_memory_section_reader()?;
+                    memories.reserve_exact(section.get_count() as usize);
+                    for entry in section {
+                        memories.push(into_memory_type(entry?)?);
+                    }
+                }
+                SectionCode::Type => {
+                    let section = section.get_type_section_reader()?;
+                    sigs.reserve_exact(section.get_count() as usize);
+                    for entry in section {
+                        sigs.push(into_func_type(entry?));
+                    }
+                }
+                SectionCode::Function => {
+                    let section = section.get_function_section_reader()?;
+                    func_sig.reserve_exact(section.get_count() as usize);
+                    for entry in section {
+                        func_sig.push(entry?);
+                    }
+                }
+                SectionCode::Global => {
+                    let section = section.get_global_section_reader()?;
+                    globals.reserve_exact(section.get_count() as usize);
+                    for entry in section {
+                        globals.push(into_global_type(entry?.ty));
+                    }
+                }
+                SectionCode::Table => {
+                    let section = section.get_table_section_reader()?;
+                    tables.reserve_exact(section.get_count() as usize);
+                    for entry in section {
+                        tables.push(into_table_type(entry?))
+                    }
+                }
+                SectionCode::Import => {
+                    let section = section.get_import_section_reader()?;
+                    imports.reserve_exact(section.get_count() as usize);
+                    for entry in section {
+                        let entry = entry?;
+                        let r#type = match entry.ty {
+                            ImportSectionEntryType::Function(index) => {
+                                func_sig.push(index);
+                                let sig = &sigs[index as usize];
+                                ExternType::Func(sig.clone())
+                            }
+                            ImportSectionEntryType::Table(tt) => {
+                                let table = into_table_type(tt);
+                                tables.push(table.clone());
+                                ExternType::Table(table)
+                            }
+                            ImportSectionEntryType::Memory(mt) => {
+                                let memory = into_memory_type(mt)?;
+                                memories.push(memory.clone());
+                                ExternType::Memory(memory)
+                            }
+                            ImportSectionEntryType::Global(gt) => {
+                                let global = into_global_type(gt);
+                                globals.push(global.clone());
+                                ExternType::Global(global)
+                            }
+                        };
+                        imports.push(ImportType::new(entry.module, entry.field, r#type));
+                    }
+                }
+                SectionCode::Export => {
+                    let section = section.get_export_section_reader()?;
+                    exports.reserve_exact(section.get_count() as usize);
+                    for entry in section {
+                        let entry = entry?;
+                        let r#type = match entry.kind {
+                            ExternalKind::Function => {
+                                let sig_index = func_sig[entry.index as usize] as usize;
+                                let sig = &sigs[sig_index];
+                                ExternType::Func(sig.clone())
+                            }
+                            ExternalKind::Table => {
+                                ExternType::Table(tables[entry.index as usize].clone())
+                            }
+                            ExternalKind::Memory => {
+                                ExternType::Memory(memories[entry.index as usize].clone())
+                            }
+                            ExternalKind::Global => {
+                                ExternType::Global(globals[entry.index as usize].clone())
+                            }
+                        };
+                        exports.push(ExportType::new(entry.field, r#type));
+                    }
+                }
+                SectionCode::Custom {
+                    kind: CustomSectionKind::Name,
+                    ..
+                } => {
+                    // Read name section. Per spec, ignore invalid custom section.
+                    if let Ok(mut reader) = section.get_name_section_reader() {
+                        while let Ok(entry) = reader.read() {
+                            if let Name::Module(name) = entry {
+                                if let Ok(name) = name.get_name() {
+                                    Arc::get_mut(&mut inner.names).unwrap().module_name =
+                                        Some(name.to_string());
+                                }
+                                break;
+                            }
+                        }
+                    }
+                }
+                _ => {
+                    // skip other sections
+                }
+            }
+        }
+
+        inner.imports = imports.into();
+        inner.exports = exports.into();
+        Ok(())
+    }
+
+    /// Register this module's stack frame information into the global scope.
+    ///
+    /// This is required to ensure that any traps can be properly symbolicated.
+    pub(crate) fn register_frame_info(&self) {
+        let mut info = self.inner.frame_info_registration.lock().unwrap();
+        if info.is_some() {
+            return;
+        }
+        *info = Some(FRAME_INFO.register(&self.inner.names, &self.inner.compiled));
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/ref.rs.html b/api/src/wasmtime/ref.rs.html new file mode 100644 index 000000000000..f8c38ae8c414 --- /dev/null +++ b/api/src/wasmtime/ref.rs.html @@ -0,0 +1,489 @@ +ref.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+
+#![allow(missing_docs)]
+
+use std::any::Any;
+use std::cell::{self, RefCell};
+use std::fmt;
+use std::rc::{Rc, Weak};
+
+pub trait HostInfo {
+    fn finalize(&mut self) {}
+}
+
+trait InternalRefBase: Any {
+    fn as_any(&self) -> &dyn Any;
+    fn host_info(&self) -> Option<cell::RefMut<Box<dyn HostInfo>>>;
+    fn set_host_info(&self, info: Option<Box<dyn HostInfo>>);
+    fn ptr_eq(&self, other: &dyn InternalRefBase) -> bool;
+}
+
+#[derive(Clone)]
+pub struct InternalRef(Rc<dyn InternalRefBase>);
+
+impl InternalRef {
+    pub fn is_ref<T: 'static>(&self) -> bool {
+        let r = self.0.as_any();
+        Any::is::<HostRef<T>>(r)
+    }
+    pub fn get_ref<T: 'static>(&self) -> HostRef<T> {
+        let r = self.0.as_any();
+        r.downcast_ref::<HostRef<T>>()
+            .expect("reference is not T type")
+            .clone()
+    }
+}
+
+struct AnyAndHostInfo {
+    any: Box<dyn Any>,
+    host_info: Option<Box<dyn HostInfo>>,
+}
+
+impl Drop for AnyAndHostInfo {
+    fn drop(&mut self) {
+        if let Some(info) = &mut self.host_info {
+            info.finalize();
+        }
+    }
+}
+
+#[derive(Clone)]
+pub struct OtherRef(Rc<RefCell<AnyAndHostInfo>>);
+
+/// Represents an opaque reference to any data within WebAssembly.
+#[derive(Clone)]
+pub enum AnyRef {
+    /// A reference to no data.
+    Null,
+    /// A reference to data stored internally in `wasmtime`.
+    Ref(InternalRef),
+    /// A reference to data located outside of `wasmtime`.
+    Other(OtherRef),
+}
+
+impl AnyRef {
+    /// Creates a new instance of `AnyRef` from `Box<dyn Any>`.
+    pub fn new(data: Box<dyn Any>) -> Self {
+        let info = AnyAndHostInfo {
+            any: data,
+            host_info: None,
+        };
+        AnyRef::Other(OtherRef(Rc::new(RefCell::new(info))))
+    }
+
+    /// Creates a `Null` reference.
+    pub fn null() -> Self {
+        AnyRef::Null
+    }
+
+    /// Returns the data stored in the reference if available.
+    /// # Panics
+    /// Panics if the variant isn't `AnyRef::Other`.
+    pub fn data(&self) -> cell::Ref<Box<dyn Any>> {
+        match self {
+            AnyRef::Other(OtherRef(r)) => cell::Ref::map(r.borrow(), |r| &r.any),
+            _ => panic!("expected AnyRef::Other"),
+        }
+    }
+
+    /// Returns true if the two `AnyRef<T>`'s point to the same value (not just
+    /// values that compare as equal).
+    pub fn ptr_eq(&self, other: &AnyRef) -> bool {
+        match (self, other) {
+            (AnyRef::Null, AnyRef::Null) => true,
+            (AnyRef::Ref(InternalRef(ref a)), AnyRef::Ref(InternalRef(ref b))) => {
+                a.ptr_eq(b.as_ref())
+            }
+            (AnyRef::Other(OtherRef(ref a)), AnyRef::Other(OtherRef(ref b))) => Rc::ptr_eq(a, b),
+            _ => false,
+        }
+    }
+
+    /// Returns a mutable reference to the host information if available.
+    /// # Panics
+    /// Panics if `AnyRef` is already borrowed or `AnyRef` is `Null`.
+    pub fn host_info(&self) -> Option<cell::RefMut<Box<dyn HostInfo>>> {
+        match self {
+            AnyRef::Null => panic!("null"),
+            AnyRef::Ref(r) => r.0.host_info(),
+            AnyRef::Other(r) => {
+                let info = cell::RefMut::map(r.0.borrow_mut(), |b| &mut b.host_info);
+                if info.is_none() {
+                    return None;
+                }
+                Some(cell::RefMut::map(info, |info| info.as_mut().unwrap()))
+            }
+        }
+    }
+
+    /// Sets the host information for an `AnyRef`.
+    /// # Panics
+    /// Panics if `AnyRef` is already borrowed or `AnyRef` is `Null`.
+    pub fn set_host_info(&self, info: Option<Box<dyn HostInfo>>) {
+        match self {
+            AnyRef::Null => panic!("null"),
+            AnyRef::Ref(r) => r.0.set_host_info(info),
+            AnyRef::Other(r) => {
+                r.0.borrow_mut().host_info = info;
+            }
+        }
+    }
+}
+
+impl fmt::Debug for AnyRef {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match self {
+            AnyRef::Null => write!(f, "null"),
+            AnyRef::Ref(_) => write!(f, "anyref"),
+            AnyRef::Other(_) => write!(f, "other ref"),
+        }
+    }
+}
+
+struct ContentBox<T> {
+    content: T,
+    host_info: Option<Box<dyn HostInfo>>,
+    anyref_data: Weak<dyn InternalRefBase>,
+}
+
+impl<T> Drop for ContentBox<T> {
+    fn drop(&mut self) {
+        if let Some(info) = &mut self.host_info {
+            info.finalize();
+        }
+    }
+}
+
+/// Represents a piece of data located in the host environment.
+pub struct HostRef<T>(Rc<RefCell<ContentBox<T>>>);
+
+impl<T: 'static> HostRef<T> {
+    /// Creates a new `HostRef<T>` from `T`.
+    pub fn new(item: T) -> HostRef<T> {
+        let anyref_data: Weak<HostRef<T>> = Weak::new();
+        let content = ContentBox {
+            content: item,
+            host_info: None,
+            anyref_data,
+        };
+        HostRef(Rc::new(RefCell::new(content)))
+    }
+
+    /// Immutably borrows the wrapped data.
+    /// # Panics
+    /// Panics if the value is currently mutably borrowed.
+    pub fn borrow(&self) -> cell::Ref<T> {
+        cell::Ref::map(self.0.borrow(), |b| &b.content)
+    }
+
+    /// Mutably borrows the wrapped data.
+    /// # Panics
+    /// Panics if the `HostRef<T>` is already borrowed.
+    pub fn borrow_mut(&self) -> cell::RefMut<T> {
+        cell::RefMut::map(self.0.borrow_mut(), |b| &mut b.content)
+    }
+
+    /// Returns true if the two `HostRef<T>`'s point to the same value (not just
+    /// values that compare as equal).
+    pub fn ptr_eq(&self, other: &HostRef<T>) -> bool {
+        Rc::ptr_eq(&self.0, &other.0)
+    }
+
+    /// Returns an opaque reference to the wrapped data in the form of
+    /// an `AnyRef`.
+    /// # Panics
+    /// Panics if `HostRef<T>` is already mutably borrowed.
+    pub fn anyref(&self) -> AnyRef {
+        let r = self.0.borrow_mut().anyref_data.upgrade();
+        if let Some(r) = r {
+            return AnyRef::Ref(InternalRef(r));
+        }
+        let anyref_data: Rc<dyn InternalRefBase> = Rc::new(self.clone());
+        self.0.borrow_mut().anyref_data = Rc::downgrade(&anyref_data);
+        AnyRef::Ref(InternalRef(anyref_data))
+    }
+}
+
+impl<T: 'static> InternalRefBase for HostRef<T> {
+    fn ptr_eq(&self, other: &dyn InternalRefBase) -> bool {
+        if let Some(other) = other.as_any().downcast_ref() {
+            self.ptr_eq(other)
+        } else {
+            false
+        }
+    }
+
+    fn as_any(&self) -> &dyn Any {
+        self
+    }
+
+    fn host_info(&self) -> Option<cell::RefMut<Box<dyn HostInfo>>> {
+        let info = cell::RefMut::map(self.0.borrow_mut(), |b| &mut b.host_info);
+        if info.is_none() {
+            return None;
+        }
+        Some(cell::RefMut::map(info, |info| info.as_mut().unwrap()))
+    }
+
+    fn set_host_info(&self, info: Option<Box<dyn HostInfo>>) {
+        self.0.borrow_mut().host_info = info;
+    }
+}
+
+impl<T> Clone for HostRef<T> {
+    fn clone(&self) -> HostRef<T> {
+        HostRef(self.0.clone())
+    }
+}
+
+impl<T: fmt::Debug> fmt::Debug for HostRef<T> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "Ref(")?;
+        self.0.borrow().content.fmt(f)?;
+        write!(f, ")")
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/runtime.rs.html b/api/src/wasmtime/runtime.rs.html new file mode 100644 index 000000000000..88662160c9ea --- /dev/null +++ b/api/src/wasmtime/runtime.rs.html @@ -0,0 +1,977 @@ +runtime.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+
+use anyhow::Result;
+use std::cell::RefCell;
+use std::fmt;
+use std::path::Path;
+use std::rc::Rc;
+use std::sync::Arc;
+use wasmparser::{OperatorValidatorConfig, ValidatingParserConfig};
+use wasmtime_environ::settings::{self, Configurable};
+use wasmtime_environ::CacheConfig;
+use wasmtime_jit::{native, CompilationStrategy, Compiler};
+
+// Runtime Environment
+
+// Configuration
+
+/// Global configuration options used to create an [`Engine`] and customize its
+/// behavior.
+///
+/// This structure exposed a builder-like interface and is primarily consumed by
+/// [`Engine::new()`]
+#[derive(Clone)]
+pub struct Config {
+    pub(crate) flags: settings::Builder,
+    pub(crate) validating_config: ValidatingParserConfig,
+    pub(crate) debug_info: bool,
+    pub(crate) strategy: CompilationStrategy,
+    pub(crate) cache_config: CacheConfig,
+}
+
+impl Config {
+    /// Creates a new configuration object with the default configuration
+    /// specified.
+    pub fn new() -> Config {
+        let mut flags = settings::builder();
+
+        // There are two possible traps for division, and this way
+        // we get the proper one if code traps.
+        flags
+            .enable("avoid_div_traps")
+            .expect("should be valid flag");
+
+        // Invert cranelift's default-on verification to instead default off.
+        flags
+            .set("enable_verifier", "false")
+            .expect("should be valid flag");
+
+        Config {
+            debug_info: false,
+            validating_config: ValidatingParserConfig {
+                operator_config: OperatorValidatorConfig {
+                    enable_threads: false,
+                    enable_reference_types: false,
+                    enable_bulk_memory: false,
+                    enable_simd: false,
+                    enable_multi_value: false,
+                },
+            },
+            flags,
+            strategy: CompilationStrategy::Auto,
+            cache_config: CacheConfig::new_cache_disabled(),
+        }
+    }
+
+    /// Configures whether DWARF debug information will be emitted during
+    /// compilation.
+    ///
+    /// By default this option is `false`.
+    pub fn debug_info(&mut self, enable: bool) -> &mut Self {
+        self.debug_info = enable;
+        self
+    }
+
+    /// Configures whether the WebAssembly threads proposal will be enabled for
+    /// compilation.
+    ///
+    /// The [WebAssembly threads proposal][threads] is not currently fully
+    /// standardized and is undergoing development. Additionally the support in
+    /// wasmtime itself is still being worked on. Support for this feature can
+    /// be enabled through this method for appropriate wasm modules.
+    ///
+    /// This feature gates items such as shared memories and atomic
+    /// instructions. Note that enabling the threads feature will
+    /// also enable the bulk memory feature.
+    ///
+    /// This is `false` by default.
+    ///
+    /// [threads]: https://github.com/webassembly/threads
+    pub fn wasm_threads(&mut self, enable: bool) -> &mut Self {
+        self.validating_config.operator_config.enable_threads = enable;
+        // The threads proposal depends on the bulk memory proposal
+        if enable {
+            self.wasm_bulk_memory(true);
+        }
+        self
+    }
+
+    /// Configures whether the WebAssembly reference types proposal will be
+    /// enabled for compilation.
+    ///
+    /// The [WebAssembly reference types proposal][proposal] is not currently
+    /// fully standardized and is undergoing development. Additionally the
+    /// support in wasmtime itself is still being worked on. Support for this
+    /// feature can be enabled through this method for appropriate wasm
+    /// modules.
+    ///
+    /// This feature gates items such as the `anyref` type and multiple tables
+    /// being in a module. Note that enabling the reference types feature will
+    /// also enable the bulk memory feature.
+    ///
+    /// This is `false` by default.
+    ///
+    /// [proposal]: https://github.com/webassembly/reference-types
+    pub fn wasm_reference_types(&mut self, enable: bool) -> &mut Self {
+        self.validating_config
+            .operator_config
+            .enable_reference_types = enable;
+        // The reference types proposal depends on the bulk memory proposal
+        if enable {
+            self.wasm_bulk_memory(true);
+        }
+        self
+    }
+
+    /// Configures whether the WebAssembly SIMD proposal will be
+    /// enabled for compilation.
+    ///
+    /// The [WebAssembly SIMD proposal][proposal] is not currently
+    /// fully standardized and is undergoing development. Additionally the
+    /// support in wasmtime itself is still being worked on. Support for this
+    /// feature can be enabled through this method for appropriate wasm
+    /// modules.
+    ///
+    /// This feature gates items such as the `v128` type and all of its
+    /// operators being in a module.
+    ///
+    /// This is `false` by default.
+    ///
+    /// [proposal]: https://github.com/webassembly/simd
+    pub fn wasm_simd(&mut self, enable: bool) -> &mut Self {
+        self.validating_config.operator_config.enable_simd = enable;
+        let val = if enable { "true" } else { "false" };
+        self.flags
+            .set("enable_simd", val)
+            .expect("should be valid flag");
+        self
+    }
+
+    /// Configures whether the WebAssembly bulk memory operations proposal will
+    /// be enabled for compilation.
+    ///
+    /// The [WebAssembly bulk memory operations proposal][proposal] is not
+    /// currently fully standardized and is undergoing development.
+    /// Additionally the support in wasmtime itself is still being worked on.
+    /// Support for this feature can be enabled through this method for
+    /// appropriate wasm modules.
+    ///
+    /// This feature gates items such as the `memory.copy` instruction, passive
+    /// data/table segments, etc, being in a module.
+    ///
+    /// This is `false` by default.
+    ///
+    /// [proposal]: https://github.com/webassembly/bulk-memory-operations
+    pub fn wasm_bulk_memory(&mut self, enable: bool) -> &mut Self {
+        self.validating_config.operator_config.enable_bulk_memory = enable;
+        self
+    }
+
+    /// Configures whether the WebAssembly multi-value proposal will
+    /// be enabled for compilation.
+    ///
+    /// The [WebAssembly multi-value proposal][proposal] is not
+    /// currently fully standardized and is undergoing development.
+    /// Additionally the support in wasmtime itself is still being worked on.
+    /// Support for this feature can be enabled through this method for
+    /// appropriate wasm modules.
+    ///
+    /// This feature gates functions and blocks returning multiple values in a
+    /// module, for example.
+    ///
+    /// This is `false` by default.
+    ///
+    /// [proposal]: https://github.com/webassembly/multi-value
+    pub fn wasm_multi_value(&mut self, enable: bool) -> &mut Self {
+        self.validating_config.operator_config.enable_multi_value = enable;
+        self
+    }
+
+    /// Configures which compilation strategy will be used for wasm modules.
+    ///
+    /// This method can be used to configure which compiler is used for wasm
+    /// modules, and for more documentation consult the [`Strategy`] enumeration
+    /// and its documentation.
+    ///
+    /// The default value for this is `Strategy::Auto`.
+    ///
+    /// # Errors
+    ///
+    /// Some compilation strategies require compile-time options of `wasmtime`
+    /// itself to be set, but if they're not set and the strategy is specified
+    /// here then an error will be returned.
+    pub fn strategy(&mut self, strategy: Strategy) -> Result<&mut Self> {
+        self.strategy = match strategy {
+            Strategy::Auto => CompilationStrategy::Auto,
+            Strategy::Cranelift => CompilationStrategy::Cranelift,
+            #[cfg(feature = "lightbeam")]
+            Strategy::Lightbeam => CompilationStrategy::Lightbeam,
+            #[cfg(not(feature = "lightbeam"))]
+            Strategy::Lightbeam => {
+                anyhow::bail!("lightbeam compilation strategy wasn't enabled at compile time");
+            }
+        };
+        Ok(self)
+    }
+
+    /// Configures whether the debug verifier of Cranelift is enabled or not.
+    ///
+    /// When Cranelift is used as a code generation backend this will configure
+    /// it to have the `enable_verifier` flag which will enable a number of debug
+    /// checks inside of Cranelift. This is largely only useful for the
+    /// developers of wasmtime itself.
+    ///
+    /// The default value for this is `false`
+    pub fn cranelift_debug_verifier(&mut self, enable: bool) -> &mut Self {
+        let val = if enable { "true" } else { "false" };
+        self.flags
+            .set("enable_verifier", val)
+            .expect("should be valid flag");
+        self
+    }
+
+    /// Configures the Cranelift code generator optimization level.
+    ///
+    /// When the Cranelift code generator is used you can configure the
+    /// optimization level used for generated code in a few various ways. For
+    /// more information see the documentation of [`OptLevel`].
+    ///
+    /// The default value for this is `OptLevel::None`.
+    pub fn cranelift_opt_level(&mut self, level: OptLevel) -> &mut Self {
+        let val = match level {
+            OptLevel::None => "none",
+            OptLevel::Speed => "speed",
+            OptLevel::SpeedAndSize => "speed_and_size",
+        };
+        self.flags
+            .set("opt_level", val)
+            .expect("should be valid flag");
+        self
+    }
+
+    /// Loads cache configuration specified at `path`.
+    ///
+    /// This method will read the file specified by `path` on the filesystem and
+    /// attempt to load cache configuration from it. This method can also fail
+    /// due to I/O errors, misconfiguration, syntax errors, etc. For expected
+    /// syntax in the configuration file see the [documentation online][docs].
+    ///
+    /// By default cache configuration is not enabled or loaded.
+    ///
+    /// # Errors
+    ///
+    /// This method can fail due to any error that happens when loading the file
+    /// pointed to by `path` and attempting to load the cache configuration.
+    ///
+    /// [docs]: https://bytecodealliance.github.io/wasmtime/cli-cache.html
+    pub fn cache_config_load(&mut self, path: impl AsRef<Path>) -> Result<&mut Self> {
+        self.cache_config = wasmtime_environ::CacheConfig::from_file(Some(path.as_ref()))?;
+        Ok(self)
+    }
+
+    /// Loads cache configuration from the system default path.
+    ///
+    /// This commit is the same as [`Config::cache_config_load`] except that it
+    /// does not take a path argument and instead loads the default
+    /// configuration present on the system. This is located, for example, on
+    /// Unix at `$HOME/.config/wasmtime/config.toml` and is typically created
+    /// with the `wasmtime config new` command.
+    ///
+    /// By default cache configuration is not enabled or loaded.
+    ///
+    /// # Errors
+    ///
+    /// This method can fail due to any error that happens when loading the
+    /// default system configuration. Note that it is not an error if the
+    /// default config file does not exist, in which case the default settings
+    /// for an enabled cache are applied.
+    ///
+    /// [docs]: https://bytecodealliance.github.io/wasmtime/cli-cache.html
+    pub fn cache_config_load_default(&mut self) -> Result<&mut Self> {
+        self.cache_config = wasmtime_environ::CacheConfig::from_file(None)?;
+        Ok(self)
+    }
+}
+
+impl Default for Config {
+    fn default() -> Config {
+        Config::new()
+    }
+}
+
+impl fmt::Debug for Config {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        let features = &self.validating_config.operator_config;
+        f.debug_struct("Config")
+            .field("debug_info", &self.debug_info)
+            .field("strategy", &self.strategy)
+            .field("wasm_threads", &features.enable_threads)
+            .field("wasm_reference_types", &features.enable_reference_types)
+            .field("wasm_bulk_memory", &features.enable_bulk_memory)
+            .field("wasm_simd", &features.enable_simd)
+            .field("wasm_multi_value", &features.enable_multi_value)
+            .field(
+                "flags",
+                &settings::Flags::new(self.flags.clone()).to_string(),
+            )
+            .finish()
+    }
+}
+
+/// Possible Compilation strategies for a wasm module.
+///
+/// This is used as an argument to the [`Config::strategy`] method.
+#[non_exhaustive]
+#[derive(Clone, Debug)]
+pub enum Strategy {
+    /// An indicator that the compilation strategy should be automatically
+    /// selected.
+    ///
+    /// This is generally what you want for most projects and indicates that the
+    /// `wasmtime` crate itself should make the decision about what the best
+    /// code generator for a wasm module is.
+    ///
+    /// Currently this always defaults to Cranelift, but the default value will
+    /// change over time.
+    Auto,
+
+    /// Currently the default backend, Cranelift aims to be a reasonably fast
+    /// code generator which generates high quality machine code.
+    Cranelift,
+
+    /// A single-pass code generator that is faster than Cranelift but doesn't
+    /// produce as high-quality code.
+    ///
+    /// To successfully pass this argument to [`Config::strategy`] the
+    /// `lightbeam` feature of this crate must be enabled.
+    Lightbeam,
+}
+
+/// Possible optimization levels for the Cranelift codegen backend.
+#[non_exhaustive]
+#[derive(Clone, Debug)]
+pub enum OptLevel {
+    /// No optimizations performed, minimizes compilation time by disabling most
+    /// optimizations.
+    None,
+    /// Generates the fastest possible code, but may take longer.
+    Speed,
+    /// Similar to `speed`, but also performs transformations aimed at reducing
+    /// code size.
+    SpeedAndSize,
+}
+
+// Engine
+
+/// An `Engine` which is a global context for compilation and management of wasm
+/// modules.
+///
+/// An engine can be safely shared across threads and is a cheap cloneable
+/// handle to the actual engine. The engine itself will be deallocate once all
+/// references to it have gone away.
+///
+/// Engines store global configuration preferences such as compilation settings,
+/// enabled features, etc. You'll likely only need at most one of these for a
+/// program.
+///
+/// ## Engines and `Clone`
+///
+/// Using `clone` on an `Engine` is a cheap operation. It will not create an
+/// entirely new engine, but rather just a new reference to the existing engine.
+/// In other words it's a shallow copy, not a deep copy.
+///
+/// ## Engines and `Default`
+///
+/// You can create an engine with default configuration settings using
+/// `Engine::default()`. Be sure to consult the documentation of [`Config`] for
+/// default settings.
+#[derive(Default, Clone)]
+pub struct Engine {
+    config: Arc<Config>,
+}
+
+impl Engine {
+    /// Creates a new [`Engine`] with the specified compilation and
+    /// configuration settings.
+    pub fn new(config: &Config) -> Engine {
+        Engine {
+            config: Arc::new(config.clone()),
+        }
+    }
+
+    /// Returns the configuration settings that this engine is using.
+    pub fn config(&self) -> &Config {
+        &self.config
+    }
+}
+
+// Store
+
+/// A `Store` is a shared cache of information between WebAssembly modules.
+///
+/// Each `Module` is compiled into a `Store` and a `Store` is associated with an
+/// [`Engine`]. You'll use a `Store` to attach to a number of global items in
+/// the production of various items for wasm modules.
+///
+/// # Stores and `Clone`
+///
+/// Using `clone` on a `Store` is a cheap operation. It will not create an
+/// entirely new store, but rather just a new reference to the existing object.
+/// In other words it's a shallow copy, not a deep copy.
+///
+/// ## Stores and `Default`
+///
+/// You can create a store with default configuration settings using
+/// `Store::default()`. This will create a brand new [`Engine`] with default
+/// ocnfiguration (see [`Config`] for more information).
+#[derive(Clone)]
+pub struct Store {
+    // FIXME(#777) should be `Arc` and this type should be thread-safe
+    inner: Rc<StoreInner>,
+}
+
+struct StoreInner {
+    engine: Engine,
+    compiler: RefCell<Compiler>,
+}
+
+impl Store {
+    /// Creates a new store to be associated with the given [`Engine`].
+    pub fn new(engine: &Engine) -> Store {
+        let isa = native::builder().finish(settings::Flags::new(engine.config.flags.clone()));
+        let compiler = Compiler::new(
+            isa,
+            engine.config.strategy,
+            engine.config.cache_config.clone(),
+        );
+        Store {
+            inner: Rc::new(StoreInner {
+                engine: engine.clone(),
+                compiler: RefCell::new(compiler),
+            }),
+        }
+    }
+
+    /// Returns the [`Engine`] that this store is associated with.
+    pub fn engine(&self) -> &Engine {
+        &self.inner.engine
+    }
+
+    pub(crate) fn compiler(&self) -> std::cell::Ref<'_, Compiler> {
+        self.inner.compiler.borrow()
+    }
+
+    pub(crate) fn compiler_mut(&self) -> std::cell::RefMut<'_, Compiler> {
+        self.inner.compiler.borrow_mut()
+    }
+
+    /// Returns whether the stores `a` and `b` refer to the same underlying
+    /// `Store`.
+    ///
+    /// Because the `Store` type is reference counted multiple clones may point
+    /// to the same underlying storage, and this method can be used to determine
+    /// whether two stores are indeed the same.
+    pub fn same(a: &Store, b: &Store) -> bool {
+        Rc::ptr_eq(&a.inner, &b.inner)
+    }
+}
+
+impl Default for Store {
+    fn default() -> Store {
+        Store::new(&Engine::default())
+    }
+}
+
+fn _assert_send_sync() {
+    fn _assert<T: Send + Sync>() {}
+    _assert::<Engine>();
+    _assert::<Config>();
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/trampoline/create_handle.rs.html b/api/src/wasmtime/trampoline/create_handle.rs.html new file mode 100644 index 000000000000..6d3e739787e9 --- /dev/null +++ b/api/src/wasmtime/trampoline/create_handle.rs.html @@ -0,0 +1,97 @@ +create_handle.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+
+//! Support for a calling of an imported function.
+
+use crate::runtime::Store;
+use anyhow::Result;
+use std::any::Any;
+use std::collections::HashSet;
+use std::sync::Arc;
+use wasmtime_environ::entity::PrimaryMap;
+use wasmtime_environ::wasm::DefinedFuncIndex;
+use wasmtime_environ::Module;
+use wasmtime_runtime::{Imports, InstanceHandle, VMFunctionBody};
+
+pub(crate) fn create_handle(
+    module: Module,
+    store: &Store,
+    finished_functions: PrimaryMap<DefinedFuncIndex, *mut [VMFunctionBody]>,
+    state: Box<dyn Any>,
+) -> Result<InstanceHandle> {
+    let imports = Imports::new(
+        HashSet::new(),
+        PrimaryMap::new(),
+        PrimaryMap::new(),
+        PrimaryMap::new(),
+        PrimaryMap::new(),
+    );
+    let data_initializers = Vec::new();
+
+    // Compute indices into the shared signature table.
+    let signatures = module
+        .signatures
+        .values()
+        .map(|sig| store.compiler().signatures().register(sig))
+        .collect::<PrimaryMap<_, _>>();
+
+    unsafe {
+        Ok(InstanceHandle::new(
+            Arc::new(module),
+            store.compiler().trap_registry().register_traps(Vec::new()),
+            finished_functions.into_boxed_slice(),
+            imports,
+            &data_initializers,
+            signatures.into_boxed_slice(),
+            None,
+            state,
+        )?)
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/trampoline/func.rs.html b/api/src/wasmtime/trampoline/func.rs.html new file mode 100644 index 000000000000..ef9d7d01313d --- /dev/null +++ b/api/src/wasmtime/trampoline/func.rs.html @@ -0,0 +1,651 @@ +func.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+
+//! Support for a calling of an imported function.
+
+use super::create_handle::create_handle;
+use crate::{Callable, FuncType, Store, Trap, Val};
+use anyhow::{bail, Result};
+use std::any::Any;
+use std::cmp;
+use std::panic::{self, AssertUnwindSafe};
+use std::rc::Rc;
+use wasmtime_environ::entity::{EntityRef, PrimaryMap};
+use wasmtime_environ::ir::types;
+use wasmtime_environ::isa::TargetIsa;
+use wasmtime_environ::wasm::{DefinedFuncIndex, FuncIndex};
+use wasmtime_environ::{
+    ir, settings, CompiledFunction, CompiledFunctionUnwindInfo, Export, Module,
+};
+use wasmtime_jit::trampoline::ir::{
+    ExternalName, Function, InstBuilder, MemFlags, StackSlotData, StackSlotKind,
+};
+use wasmtime_jit::trampoline::{
+    binemit, pretty_error, Context, FunctionBuilder, FunctionBuilderContext,
+};
+use wasmtime_jit::{native, CodeMemory};
+use wasmtime_runtime::{InstanceHandle, VMContext, VMFunctionBody};
+
+struct TrampolineState {
+    func: Rc<dyn Callable + 'static>,
+    #[allow(dead_code)]
+    code_memory: CodeMemory,
+}
+
+impl TrampolineState {
+    fn new(func: Rc<dyn Callable + 'static>, code_memory: CodeMemory) -> Self {
+        TrampolineState { func, code_memory }
+    }
+}
+
+unsafe extern "C" fn stub_fn(
+    vmctx: *mut VMContext,
+    _caller_vmctx: *mut VMContext,
+    call_id: u32,
+    values_vec: *mut i128,
+) {
+    // Here we are careful to use `catch_unwind` to ensure Rust panics don't
+    // unwind past us. The primary reason for this is that Rust considers it UB
+    // to unwind past an `extern "C"` function. Here we are in an `extern "C"`
+    // function and the cross into wasm was through an `extern "C"` function at
+    // the base of the stack as well. We'll need to wait for assorted RFCs and
+    // language features to enable this to be done in a sound and stable fashion
+    // before avoiding catching the panic here.
+    //
+    // Also note that there are intentionally no local variables on this stack
+    // frame. The reason for that is that some of the "raise" functions we have
+    // below will trigger a longjmp, which won't run local destructors if we
+    // have any. To prevent leaks we avoid having any local destructors by
+    // avoiding local variables.
+    let result = panic::catch_unwind(AssertUnwindSafe(|| call_stub(vmctx, call_id, values_vec)));
+
+    match result {
+        Ok(Ok(())) => {}
+
+        // If a trap was raised (an error returned from the imported function)
+        // then we smuggle the trap through `Box<dyn Error>` through to the
+        // call-site, which gets unwrapped in `Trap::from_jit` later on as we
+        // convert from the internal `Trap` type to our own `Trap` type in this
+        // crate.
+        Ok(Err(trap)) => wasmtime_runtime::raise_user_trap(Box::new(trap)),
+
+        // And finally if the imported function panicked, then we trigger the
+        // form of unwinding that's safe to jump over wasm code on all
+        // platforms.
+        Err(panic) => wasmtime_runtime::resume_panic(panic),
+    }
+
+    unsafe fn call_stub(
+        vmctx: *mut VMContext,
+        call_id: u32,
+        values_vec: *mut i128,
+    ) -> Result<(), Trap> {
+        let instance = InstanceHandle::from_vmctx(vmctx);
+
+        let (args, returns_len) = {
+            let module = instance.module_ref();
+            let signature = &module.signatures[module.functions[FuncIndex::new(call_id as usize)]];
+
+            let mut args = Vec::new();
+            for i in 2..signature.params.len() {
+                args.push(Val::read_value_from(
+                    values_vec.offset(i as isize - 2),
+                    signature.params[i].value_type,
+                ))
+            }
+            (args, signature.returns.len())
+        };
+
+        let mut returns = vec![Val::null(); returns_len];
+        let state = &instance
+            .host_state()
+            .downcast_ref::<TrampolineState>()
+            .expect("state");
+        state.func.call(&args, &mut returns)?;
+
+        let module = instance.module_ref();
+        let signature = &module.signatures[module.functions[FuncIndex::new(call_id as usize)]];
+        for (i, ret) in returns.iter_mut().enumerate() {
+            if ret.ty().get_wasmtime_type() != Some(signature.returns[i].value_type) {
+                return Err(Trap::new(
+                    "`Callable` attempted to return an incompatible value",
+                ));
+            }
+            ret.write_value_to(values_vec.add(i));
+        }
+        Ok(())
+    }
+}
+
+/// Create a trampoline for invoking a Callable.
+fn make_trampoline(
+    isa: &dyn TargetIsa,
+    code_memory: &mut CodeMemory,
+    fn_builder_ctx: &mut FunctionBuilderContext,
+    call_id: u32,
+    signature: &ir::Signature,
+) -> *mut [VMFunctionBody] {
+    // Mostly reverse copy of the similar method from wasmtime's
+    // wasmtime-jit/src/compiler.rs.
+    let pointer_type = isa.pointer_type();
+    let mut stub_sig = ir::Signature::new(isa.frontend_config().default_call_conv);
+
+    // Add the caller/callee `vmctx` parameters.
+    stub_sig.params.push(ir::AbiParam::special(
+        pointer_type,
+        ir::ArgumentPurpose::VMContext,
+    ));
+
+    // Add the caller `vmctx` parameter.
+    stub_sig.params.push(ir::AbiParam::new(pointer_type));
+
+    // Add the `call_id` parameter.
+    stub_sig.params.push(ir::AbiParam::new(types::I32));
+
+    // Add the `values_vec` parameter.
+    stub_sig.params.push(ir::AbiParam::new(pointer_type));
+
+    // Compute the size of the values vector. The vmctx and caller vmctx are passed separately.
+    let value_size = 16;
+    let values_vec_len = ((value_size as usize)
+        * cmp::max(signature.params.len() - 2, signature.returns.len()))
+        as u32;
+
+    let mut context = Context::new();
+    context.func = Function::with_name_signature(ExternalName::user(0, 0), signature.clone());
+    context.func.collect_frame_layout_info();
+
+    let ss = context.func.create_stack_slot(StackSlotData::new(
+        StackSlotKind::ExplicitSlot,
+        values_vec_len,
+    ));
+
+    {
+        let mut builder = FunctionBuilder::new(&mut context.func, fn_builder_ctx);
+        let block0 = builder.create_block();
+
+        builder.append_block_params_for_function_params(block0);
+        builder.switch_to_block(block0);
+        builder.seal_block(block0);
+
+        let values_vec_ptr_val = builder.ins().stack_addr(pointer_type, ss, 0);
+        let mflags = MemFlags::trusted();
+        for i in 2..signature.params.len() {
+            if i == 0 {
+                continue;
+            }
+
+            let val = builder.func.dfg.block_params(block0)[i];
+            builder.ins().store(
+                mflags,
+                val,
+                values_vec_ptr_val,
+                ((i - 2) * value_size) as i32,
+            );
+        }
+
+        let block_params = builder.func.dfg.block_params(block0);
+        let vmctx_ptr_val = block_params[0];
+        let caller_vmctx_ptr_val = block_params[1];
+        let call_id_val = builder.ins().iconst(types::I32, call_id as i64);
+
+        let callee_args = vec![
+            vmctx_ptr_val,
+            caller_vmctx_ptr_val,
+            call_id_val,
+            values_vec_ptr_val,
+        ];
+
+        let new_sig = builder.import_signature(stub_sig);
+
+        let callee_value = builder
+            .ins()
+            .iconst(pointer_type, stub_fn as *const VMFunctionBody as i64);
+        builder
+            .ins()
+            .call_indirect(new_sig, callee_value, &callee_args);
+
+        let mflags = MemFlags::trusted();
+        let mut results = Vec::new();
+        for (i, r) in signature.returns.iter().enumerate() {
+            let load = builder.ins().load(
+                r.value_type,
+                mflags,
+                values_vec_ptr_val,
+                (i * value_size) as i32,
+            );
+            results.push(load);
+        }
+        builder.ins().return_(&results);
+        builder.finalize()
+    }
+
+    let mut code_buf: Vec<u8> = Vec::new();
+    let mut reloc_sink = binemit::TrampolineRelocSink {};
+    let mut trap_sink = binemit::NullTrapSink {};
+    let mut stackmap_sink = binemit::NullStackmapSink {};
+    context
+        .compile_and_emit(
+            isa,
+            &mut code_buf,
+            &mut reloc_sink,
+            &mut trap_sink,
+            &mut stackmap_sink,
+        )
+        .map_err(|error| pretty_error(&context.func, Some(isa), error))
+        .expect("compile_and_emit");
+
+    let unwind_info = CompiledFunctionUnwindInfo::new(isa, &context);
+
+    code_memory
+        .allocate_for_function(&CompiledFunction {
+            body: code_buf,
+            jt_offsets: context.func.jt_offsets,
+            unwind_info,
+        })
+        .expect("allocate_for_function")
+}
+
+pub fn create_handle_with_function(
+    ft: &FuncType,
+    func: &Rc<dyn Callable + 'static>,
+    store: &Store,
+) -> Result<InstanceHandle> {
+    let isa = {
+        let isa_builder = native::builder();
+        let flag_builder = settings::builder();
+        isa_builder.finish(settings::Flags::new(flag_builder))
+    };
+
+    let pointer_type = isa.pointer_type();
+    let sig = match ft.get_wasmtime_signature(pointer_type) {
+        Some(sig) => sig.clone(),
+        None => bail!("not a supported core wasm signature {:?}", ft),
+    };
+
+    let mut fn_builder_ctx = FunctionBuilderContext::new();
+    let mut module = Module::new();
+    let mut finished_functions: PrimaryMap<DefinedFuncIndex, *mut [VMFunctionBody]> =
+        PrimaryMap::new();
+    let mut code_memory = CodeMemory::new();
+
+    let sig_id = module.signatures.push(sig.clone());
+    let func_id = module.functions.push(sig_id);
+    module
+        .exports
+        .insert("trampoline".to_string(), Export::Function(func_id));
+    let trampoline = make_trampoline(
+        isa.as_ref(),
+        &mut code_memory,
+        &mut fn_builder_ctx,
+        func_id.index() as u32,
+        &sig,
+    );
+    code_memory.publish();
+
+    finished_functions.push(trampoline);
+
+    let trampoline_state = TrampolineState::new(func.clone(), code_memory);
+
+    create_handle(
+        module,
+        store,
+        finished_functions,
+        Box::new(trampoline_state),
+    )
+}
+
+pub unsafe fn create_handle_with_raw_function(
+    ft: &FuncType,
+    func: *mut [VMFunctionBody],
+    store: &Store,
+    state: Box<dyn Any>,
+) -> Result<InstanceHandle> {
+    let isa = {
+        let isa_builder = native::builder();
+        let flag_builder = settings::builder();
+        isa_builder.finish(settings::Flags::new(flag_builder))
+    };
+
+    let pointer_type = isa.pointer_type();
+    let sig = match ft.get_wasmtime_signature(pointer_type) {
+        Some(sig) => sig.clone(),
+        None => bail!("not a supported core wasm signature {:?}", ft),
+    };
+
+    let mut module = Module::new();
+    let mut finished_functions = PrimaryMap::new();
+
+    let sig_id = module.signatures.push(sig.clone());
+    let func_id = module.functions.push(sig_id);
+    module
+        .exports
+        .insert("trampoline".to_string(), Export::Function(func_id));
+    finished_functions.push(func);
+
+    create_handle(module, store, finished_functions, state)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/trampoline/global.rs.html b/api/src/wasmtime/trampoline/global.rs.html new file mode 100644 index 000000000000..ff9c0a51a488 --- /dev/null +++ b/api/src/wasmtime/trampoline/global.rs.html @@ -0,0 +1,73 @@ +global.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+
+use super::create_handle::create_handle;
+use crate::Store;
+use crate::{GlobalType, Mutability, Val};
+use anyhow::{bail, Result};
+use wasmtime_environ::entity::PrimaryMap;
+use wasmtime_environ::{wasm, Module};
+use wasmtime_runtime::InstanceHandle;
+
+pub fn create_global(store: &Store, gt: &GlobalType, val: Val) -> Result<InstanceHandle> {
+    let global = wasm::Global {
+        ty: match gt.content().get_wasmtime_type() {
+            Some(t) => t,
+            None => bail!("cannot support {:?} as a wasm global type", gt.content()),
+        },
+        mutability: match gt.mutability() {
+            Mutability::Const => false,
+            Mutability::Var => true,
+        },
+        initializer: match val {
+            Val::I32(i) => wasm::GlobalInit::I32Const(i),
+            Val::I64(i) => wasm::GlobalInit::I64Const(i),
+            Val::F32(f) => wasm::GlobalInit::F32Const(f),
+            Val::F64(f) => wasm::GlobalInit::F64Const(f),
+            _ => unimplemented!("create_global for {:?}", gt),
+        },
+    };
+    let mut module = Module::new();
+    let global_id = module.globals.push(global);
+    module.exports.insert(
+        "global".to_string(),
+        wasmtime_environ::Export::Global(global_id),
+    );
+    let handle = create_handle(module, store, PrimaryMap::new(), Box::new(()))?;
+    Ok(handle)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/trampoline/memory.rs.html b/api/src/wasmtime/trampoline/memory.rs.html new file mode 100644 index 000000000000..a2df2c23e77a --- /dev/null +++ b/api/src/wasmtime/trampoline/memory.rs.html @@ -0,0 +1,57 @@ +memory.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+
+use super::create_handle::create_handle;
+use crate::MemoryType;
+use crate::Store;
+use anyhow::Result;
+use wasmtime_environ::entity::PrimaryMap;
+use wasmtime_environ::{wasm, Module};
+use wasmtime_runtime::InstanceHandle;
+
+pub fn create_handle_with_memory(store: &Store, memory: &MemoryType) -> Result<InstanceHandle> {
+    let mut module = Module::new();
+
+    let memory = wasm::Memory {
+        minimum: memory.limits().min(),
+        maximum: memory.limits().max(),
+        shared: false, // TODO
+    };
+    let tunable = Default::default();
+
+    let memory_plan = wasmtime_environ::MemoryPlan::for_memory(memory, &tunable);
+    let memory_id = module.memory_plans.push(memory_plan);
+    module.exports.insert(
+        "memory".to_string(),
+        wasmtime_environ::Export::Memory(memory_id),
+    );
+
+    create_handle(module, store, PrimaryMap::new(), Box::new(()))
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/trampoline/mod.rs.html b/api/src/wasmtime/trampoline/mod.rs.html new file mode 100644 index 000000000000..7f3eecac1cf6 --- /dev/null +++ b/api/src/wasmtime/trampoline/mod.rs.html @@ -0,0 +1,141 @@ +mod.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+
+//! Utility module to create trampolines in/out WebAssembly module.
+
+mod create_handle;
+mod func;
+mod global;
+mod memory;
+mod table;
+
+use self::func::create_handle_with_function;
+use self::global::create_global;
+use self::memory::create_handle_with_memory;
+use self::table::create_handle_with_table;
+use super::{Callable, FuncType, GlobalType, MemoryType, Store, TableType, Val};
+use anyhow::Result;
+use std::any::Any;
+use std::rc::Rc;
+use wasmtime_runtime::VMFunctionBody;
+
+pub fn generate_func_export(
+    ft: &FuncType,
+    func: &Rc<dyn Callable + 'static>,
+    store: &Store,
+) -> Result<(wasmtime_runtime::InstanceHandle, wasmtime_runtime::Export)> {
+    let instance = create_handle_with_function(ft, func, store)?;
+    let export = instance.lookup("trampoline").expect("trampoline export");
+    Ok((instance, export))
+}
+
+/// Note that this is `unsafe` since `func` must be a valid function pointer and
+/// have a signature which matches `ft`, otherwise the returned
+/// instance/export/etc may exhibit undefined behavior.
+pub unsafe fn generate_raw_func_export(
+    ft: &FuncType,
+    func: *mut [VMFunctionBody],
+    store: &Store,
+    state: Box<dyn Any>,
+) -> Result<(wasmtime_runtime::InstanceHandle, wasmtime_runtime::Export)> {
+    let instance = func::create_handle_with_raw_function(ft, func, store, state)?;
+    let export = instance.lookup("trampoline").expect("trampoline export");
+    Ok((instance, export))
+}
+
+pub fn generate_global_export(
+    store: &Store,
+    gt: &GlobalType,
+    val: Val,
+) -> Result<(wasmtime_runtime::InstanceHandle, wasmtime_runtime::Export)> {
+    let instance = create_global(store, gt, val)?;
+    let export = instance.lookup("global").expect("global export");
+    Ok((instance, export))
+}
+
+pub fn generate_memory_export(
+    store: &Store,
+    m: &MemoryType,
+) -> Result<(wasmtime_runtime::InstanceHandle, wasmtime_runtime::Export)> {
+    let instance = create_handle_with_memory(store, m)?;
+    let export = instance.lookup("memory").expect("memory export");
+    Ok((instance, export))
+}
+
+pub fn generate_table_export(
+    store: &Store,
+    t: &TableType,
+) -> Result<(wasmtime_runtime::InstanceHandle, wasmtime_runtime::Export)> {
+    let instance = create_handle_with_table(store, t)?;
+    let export = instance.lookup("table").expect("table export");
+    Ok((instance, export))
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/trampoline/table.rs.html b/api/src/wasmtime/trampoline/table.rs.html new file mode 100644 index 000000000000..dac37bceac17 --- /dev/null +++ b/api/src/wasmtime/trampoline/table.rs.html @@ -0,0 +1,63 @@ +table.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+
+use super::create_handle::create_handle;
+use crate::Store;
+use crate::{TableType, ValType};
+use anyhow::{bail, Result};
+use wasmtime_environ::entity::PrimaryMap;
+use wasmtime_environ::{wasm, Module};
+use wasmtime_runtime::InstanceHandle;
+
+pub fn create_handle_with_table(store: &Store, table: &TableType) -> Result<InstanceHandle> {
+    let mut module = Module::new();
+
+    let table = wasm::Table {
+        minimum: table.limits().min(),
+        maximum: table.limits().max(),
+        ty: match table.element() {
+            ValType::FuncRef => wasm::TableElementType::Func,
+            _ => bail!("cannot support {:?} as a table element", table.element()),
+        },
+    };
+    let tunable = Default::default();
+
+    let table_plan = wasmtime_environ::TablePlan::for_table(table, &tunable);
+    let table_id = module.table_plans.push(table_plan);
+    module.exports.insert(
+        "table".to_string(),
+        wasmtime_environ::Export::Table(table_id),
+    );
+
+    create_handle(module, store, PrimaryMap::new(), Box::new(()))
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/trap.rs.html b/api/src/wasmtime/trap.rs.html new file mode 100644 index 000000000000..8bb41829f78b --- /dev/null +++ b/api/src/wasmtime/trap.rs.html @@ -0,0 +1,241 @@ +trap.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+
+use crate::frame_info::FRAME_INFO;
+use crate::FrameInfo;
+use backtrace::Backtrace;
+use std::fmt;
+use std::sync::Arc;
+
+/// A struct representing an aborted instruction execution, with a message
+/// indicating the cause.
+#[derive(Clone)]
+pub struct Trap {
+    inner: Arc<TrapInner>,
+}
+
+struct TrapInner {
+    message: String,
+    wasm_trace: Vec<FrameInfo>,
+    native_trace: Backtrace,
+}
+
+fn _assert_trap_is_sync_and_send(t: &Trap) -> (&dyn Sync, &dyn Send) {
+    (t, t)
+}
+
+impl Trap {
+    /// Creates a new `Trap` with `message`.
+    /// # Example
+    /// ```
+    /// let trap = wasmtime::Trap::new("unexpected error");
+    /// assert_eq!("unexpected error", trap.message());
+    /// ```
+    pub fn new<I: Into<String>>(message: I) -> Self {
+        Trap::new_with_trace(message.into(), Backtrace::new_unresolved())
+    }
+
+    pub(crate) fn from_jit(jit: wasmtime_runtime::Trap) -> Self {
+        match jit {
+            wasmtime_runtime::Trap::User(error) => {
+                // Since we're the only one using the wasmtime internals (in
+                // theory) we should only see user errors which were originally
+                // created from our own `Trap` type (see the trampoline module
+                // with functions).
+                //
+                // If this unwrap trips for someone we'll need to tweak the
+                // return type of this function to probably be `anyhow::Error`
+                // or something like that.
+                *error
+                    .downcast()
+                    .expect("only `Trap` user errors are supported")
+            }
+            wasmtime_runtime::Trap::Wasm { desc, backtrace } => {
+                Trap::new_with_trace(desc.to_string(), backtrace)
+            }
+        }
+    }
+
+    fn new_with_trace(message: String, native_trace: Backtrace) -> Self {
+        let mut wasm_trace = Vec::new();
+        for frame in native_trace.frames() {
+            let pc = frame.ip() as usize;
+            if let Some(info) = FRAME_INFO.lookup(pc) {
+                wasm_trace.push(info);
+            }
+        }
+        Trap {
+            inner: Arc::new(TrapInner {
+                message,
+                wasm_trace,
+                native_trace,
+            }),
+        }
+    }
+
+    /// Returns a reference the `message` stored in `Trap`.
+    pub fn message(&self) -> &str {
+        &self.inner.message
+    }
+
+    /// Returns a list of function frames in WebAssembly code that led to this
+    /// trap happening.
+    pub fn trace(&self) -> &[FrameInfo] {
+        &self.inner.wasm_trace
+    }
+}
+
+impl fmt::Debug for Trap {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Trap")
+            .field("message", &self.inner.message)
+            .field("wasm_trace", &self.inner.wasm_trace)
+            .field("native_trace", &self.inner.native_trace)
+            .finish()
+    }
+}
+
+impl fmt::Display for Trap {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "{}", self.inner.message)?;
+        let trace = self.trace();
+        if trace.is_empty() {
+            return Ok(());
+        }
+        writeln!(f, "\nwasm backtrace:")?;
+        for (i, frame) in self.trace().iter().enumerate() {
+            let name = frame.module_name().unwrap_or("<unknown>");
+            write!(f, "  {}: {}!", i, name)?;
+            match frame.func_name() {
+                Some(name) => match rustc_demangle::try_demangle(name) {
+                    Ok(name) => write!(f, "{}", name)?,
+                    Err(_) => write!(f, "{}", name)?,
+                },
+                None => write!(f, "<wasm function {}>", frame.func_index())?,
+            }
+            writeln!(f, "")?;
+        }
+        Ok(())
+    }
+}
+
+impl std::error::Error for Trap {}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/types.rs.html b/api/src/wasmtime/types.rs.html new file mode 100644 index 000000000000..b024d392906d --- /dev/null +++ b/api/src/wasmtime/types.rs.html @@ -0,0 +1,877 @@ +types.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+
+use wasmtime_environ::{ir, wasm};
+
+// Type Representations
+
+// Type attributes
+
+/// Indicator of whether a global is mutable or not
+#[derive(Debug, Clone, Copy, PartialEq)]
+pub enum Mutability {
+    /// The global is constant and its value does not change
+    Const,
+    /// The value of the global can change over time
+    Var,
+}
+
+/// Limits of tables/memories where the units of the limits are defined by the
+/// table/memory types.
+///
+/// A minimum is always available but the maximum may not be present.
+#[derive(Debug, Clone)]
+pub struct Limits {
+    min: u32,
+    max: Option<u32>,
+}
+
+impl Limits {
+    /// Creates a new set of limits with the minimum and maximum both specified.
+    pub fn new(min: u32, max: Option<u32>) -> Limits {
+        Limits { min, max }
+    }
+
+    /// Creates a new `Limits` with the `min` specified and no maximum specified.
+    pub fn at_least(min: u32) -> Limits {
+        Limits::new(min, None)
+    }
+
+    /// Returns the minimum amount for these limits.
+    pub fn min(&self) -> u32 {
+        self.min
+    }
+
+    /// Returns the maximum amount for these limits, if specified.
+    pub fn max(&self) -> Option<u32> {
+        self.max
+    }
+}
+
+// Value Types
+
+/// A list of all possible value types in WebAssembly.
+#[derive(Debug, Clone, Eq, PartialEq)]
+pub enum ValType {
+    /// Signed 32 bit integer.
+    I32,
+    /// Signed 64 bit integer.
+    I64,
+    /// Floating point 32 bit integer.
+    F32,
+    /// Floating point 64 bit integer.
+    F64,
+    /// A 128 bit number.
+    V128,
+    /// A reference to opaque data in the Wasm instance.
+    AnyRef, /* = 128 */
+    /// A reference to a Wasm function.
+    FuncRef,
+}
+
+impl ValType {
+    /// Returns true if `ValType` matches any of the numeric types. (e.g. `I32`,
+    /// `I64`, `F32`, `F64`).
+    pub fn is_num(&self) -> bool {
+        match self {
+            ValType::I32 | ValType::I64 | ValType::F32 | ValType::F64 => true,
+            _ => false,
+        }
+    }
+
+    /// Returns true if `ValType` matches either of the reference types.
+    pub fn is_ref(&self) -> bool {
+        match self {
+            ValType::AnyRef | ValType::FuncRef => true,
+            _ => false,
+        }
+    }
+
+    pub(crate) fn get_wasmtime_type(&self) -> Option<ir::Type> {
+        match self {
+            ValType::I32 => Some(ir::types::I32),
+            ValType::I64 => Some(ir::types::I64),
+            ValType::F32 => Some(ir::types::F32),
+            ValType::F64 => Some(ir::types::F64),
+            ValType::V128 => Some(ir::types::I8X16),
+            _ => None,
+        }
+    }
+
+    pub(crate) fn from_wasmtime_type(ty: ir::Type) -> Option<ValType> {
+        match ty {
+            ir::types::I32 => Some(ValType::I32),
+            ir::types::I64 => Some(ValType::I64),
+            ir::types::F32 => Some(ValType::F32),
+            ir::types::F64 => Some(ValType::F64),
+            ir::types::I8X16 => Some(ValType::V128),
+            _ => None,
+        }
+    }
+}
+
+// External Types
+
+/// A list of all possible types which can be externally referenced from a
+/// WebAssembly module.
+///
+/// This list can be found in [`ImportType`] or [`ExportType`], so these types
+/// can either be imported or exported.
+#[derive(Debug, Clone)]
+pub enum ExternType {
+    /// This external type is the type of a WebAssembly function.
+    Func(FuncType),
+    /// This external type is the type of a WebAssembly global.
+    Global(GlobalType),
+    /// This external type is the type of a WebAssembly table.
+    Table(TableType),
+    /// This external type is the type of a WebAssembly memory.
+    Memory(MemoryType),
+}
+
+macro_rules! accessors {
+    ($(($variant:ident($ty:ty) $get:ident $unwrap:ident))*) => ($(
+        /// Attempt to return the underlying type of this external type,
+        /// returning `None` if it is a different type.
+        pub fn $get(&self) -> Option<&$ty> {
+            if let ExternType::$variant(e) = self {
+                Some(e)
+            } else {
+                None
+            }
+        }
+
+        /// Returns the underlying descriptor of this [`ExternType`], panicking
+        /// if it is a different type.
+        ///
+        /// # Panics
+        ///
+        /// Panics if `self` is not of the right type.
+        pub fn $unwrap(&self) -> &$ty {
+            self.$get().expect(concat!("expected ", stringify!($ty)))
+        }
+    )*)
+}
+
+impl ExternType {
+    accessors! {
+        (Func(FuncType) func unwrap_func)
+        (Global(GlobalType) global unwrap_global)
+        (Table(TableType) table unwrap_table)
+        (Memory(MemoryType) memory unwrap_memory)
+    }
+}
+
+// Function Types
+fn from_wasmtime_abiparam(param: &ir::AbiParam) -> Option<ValType> {
+    assert_eq!(param.purpose, ir::ArgumentPurpose::Normal);
+    ValType::from_wasmtime_type(param.value_type)
+}
+
+/// A descriptor for a function in a WebAssembly module.
+///
+/// WebAssembly functions can have 0 or more parameters and results.
+#[derive(Debug, Clone)]
+pub struct FuncType {
+    params: Box<[ValType]>,
+    results: Box<[ValType]>,
+}
+
+impl FuncType {
+    /// Creates a new function descriptor from the given parameters and results.
+    ///
+    /// The function descriptor returned will represent a function which takes
+    /// `params` as arguments and returns `results` when it is finished.
+    pub fn new(params: Box<[ValType]>, results: Box<[ValType]>) -> FuncType {
+        FuncType { params, results }
+    }
+
+    /// Returns the list of parameter types for this function.
+    pub fn params(&self) -> &[ValType] {
+        &self.params
+    }
+
+    /// Returns the list of result types for this function.
+    pub fn results(&self) -> &[ValType] {
+        &self.results
+    }
+
+    /// Returns `Some` if this function signature was compatible with cranelift,
+    /// or `None` if one of the types/results wasn't supported or compatible
+    /// with cranelift.
+    pub(crate) fn get_wasmtime_signature(&self, pointer_type: ir::Type) -> Option<ir::Signature> {
+        use wasmtime_environ::ir::{types, AbiParam, ArgumentPurpose, Signature};
+        use wasmtime_jit::native;
+        let call_conv = native::call_conv();
+        let mut params = self
+            .params
+            .iter()
+            .map(|p| p.get_wasmtime_type().map(AbiParam::new))
+            .collect::<Option<Vec<_>>>()?;
+        let returns = self
+            .results
+            .iter()
+            .map(|p| p.get_wasmtime_type().map(AbiParam::new))
+            .collect::<Option<Vec<_>>>()?;
+        params.insert(0, AbiParam::special(types::I64, ArgumentPurpose::VMContext));
+        params.insert(1, AbiParam::new(pointer_type));
+
+        Some(Signature {
+            params,
+            returns,
+            call_conv,
+        })
+    }
+
+    /// Returns `None` if any types in the signature can't be converted to the
+    /// types in this crate, but that should very rarely happen and largely only
+    /// indicate a bug in our cranelift integration.
+    pub(crate) fn from_wasmtime_signature(signature: ir::Signature) -> Option<FuncType> {
+        let params = signature
+            .params
+            .iter()
+            .skip(2) // skip the caller/callee vmctx
+            .map(|p| from_wasmtime_abiparam(p))
+            .collect::<Option<Vec<_>>>()?;
+        let results = signature
+            .returns
+            .iter()
+            .map(|p| from_wasmtime_abiparam(p))
+            .collect::<Option<Vec<_>>>()?;
+        Some(FuncType {
+            params: params.into_boxed_slice(),
+            results: results.into_boxed_slice(),
+        })
+    }
+}
+
+// Global Types
+
+/// A WebAssembly global descriptor.
+///
+/// This type describes an instance of a global in a WebAssembly module. Globals
+/// are local to an [`Instance`](crate::Instance) and are either immutable or
+/// mutable.
+#[derive(Debug, Clone)]
+pub struct GlobalType {
+    content: ValType,
+    mutability: Mutability,
+}
+
+impl GlobalType {
+    /// Creates a new global descriptor of the specified `content` type and
+    /// whether or not it's mutable.
+    pub fn new(content: ValType, mutability: Mutability) -> GlobalType {
+        GlobalType {
+            content,
+            mutability,
+        }
+    }
+
+    /// Returns the value type of this global descriptor.
+    pub fn content(&self) -> &ValType {
+        &self.content
+    }
+
+    /// Returns whether or not this global is mutable.
+    pub fn mutability(&self) -> Mutability {
+        self.mutability
+    }
+
+    /// Returns `None` if the wasmtime global has a type that we can't
+    /// represent, but that should only very rarely happen and indicate a bug.
+    pub(crate) fn from_wasmtime_global(global: &wasm::Global) -> Option<GlobalType> {
+        let ty = ValType::from_wasmtime_type(global.ty)?;
+        let mutability = if global.mutability {
+            Mutability::Var
+        } else {
+            Mutability::Const
+        };
+        Some(GlobalType::new(ty, mutability))
+    }
+}
+
+// Table Types
+
+/// A descriptor for a table in a WebAssembly module.
+///
+/// Tables are contiguous chunks of a specific element, typically a `funcref` or
+/// an `anyref`. The most common use for tables is a function table through
+/// which `call_indirect` can invoke other functions.
+#[derive(Debug, Clone)]
+pub struct TableType {
+    element: ValType,
+    limits: Limits,
+}
+
+impl TableType {
+    /// Creates a new table descriptor which will contain the specified
+    /// `element` and have the `limits` applied to its length.
+    pub fn new(element: ValType, limits: Limits) -> TableType {
+        TableType { element, limits }
+    }
+
+    /// Returns the element value type of this table.
+    pub fn element(&self) -> &ValType {
+        &self.element
+    }
+
+    /// Returns the limits, in units of elements, of this table.
+    pub fn limits(&self) -> &Limits {
+        &self.limits
+    }
+
+    pub(crate) fn from_wasmtime_table(table: &wasm::Table) -> TableType {
+        assert!(if let wasm::TableElementType::Func = table.ty {
+            true
+        } else {
+            false
+        });
+        let ty = ValType::FuncRef;
+        let limits = Limits::new(table.minimum, table.maximum);
+        TableType::new(ty, limits)
+    }
+}
+
+// Memory Types
+
+/// A descriptor for a WebAssembly memory type.
+///
+/// Memories are described in units of pages (64KB) and represent contiguous
+/// chunks of addressable memory.
+#[derive(Debug, Clone)]
+pub struct MemoryType {
+    limits: Limits,
+}
+
+impl MemoryType {
+    /// Creates a new descriptor for a WebAssembly memory given the specified
+    /// limits of the memory.
+    pub fn new(limits: Limits) -> MemoryType {
+        MemoryType { limits }
+    }
+
+    /// Returns the limits (in pages) that are configured for this memory.
+    pub fn limits(&self) -> &Limits {
+        &self.limits
+    }
+
+    pub(crate) fn from_wasmtime_memory(memory: &wasm::Memory) -> MemoryType {
+        MemoryType::new(Limits::new(memory.minimum, memory.maximum))
+    }
+}
+
+// Import Types
+
+/// A descriptor for an imported value into a wasm module.
+///
+/// This type is primarily accessed from the
+/// [`Module::imports`](crate::Module::imports) API. Each [`ImportType`]
+/// describes an import into the wasm module with the module/name that it's
+/// imported from as well as the type of item that's being imported.
+#[derive(Debug, Clone)]
+pub struct ImportType {
+    module: String,
+    name: String,
+    ty: ExternType,
+}
+
+impl ImportType {
+    /// Creates a new import descriptor which comes from `module` and `name` and
+    /// is of type `ty`.
+    pub fn new(module: &str, name: &str, ty: ExternType) -> ImportType {
+        ImportType {
+            module: module.to_string(),
+            name: name.to_string(),
+            ty,
+        }
+    }
+
+    /// Returns the module name that this import is expected to come from.
+    pub fn module(&self) -> &str {
+        &self.module
+    }
+
+    /// Returns the field name of the module that this import is expected to
+    /// come from.
+    pub fn name(&self) -> &str {
+        &self.name
+    }
+
+    /// Returns the expected type of this import.
+    pub fn ty(&self) -> &ExternType {
+        &self.ty
+    }
+}
+
+// Export Types
+
+/// A descriptor for an exported WebAssembly value.
+///
+/// This type is primarily accessed from the
+/// [`Module::exports`](crate::Module::exports) accessor and describes what
+/// names are exported from a wasm module and the type of the item that is
+/// exported.
+#[derive(Debug, Clone)]
+pub struct ExportType {
+    name: String,
+    ty: ExternType,
+}
+
+impl ExportType {
+    /// Creates a new export which is exported with the given `name` and has the
+    /// given `ty`.
+    pub fn new(name: &str, ty: ExternType) -> ExportType {
+        ExportType {
+            name: name.to_string(),
+            ty,
+        }
+    }
+
+    /// Returns the name by which this export is known by.
+    pub fn name(&self) -> &str {
+        &self.name
+    }
+
+    /// Returns the type of this export.
+    pub fn ty(&self) -> &ExternType {
+        &self.ty
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/unix.rs.html b/api/src/wasmtime/unix.rs.html new file mode 100644 index 000000000000..3f1ac87a6bd6 --- /dev/null +++ b/api/src/wasmtime/unix.rs.html @@ -0,0 +1,65 @@ +unix.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
+//! Unix-specific extension for the `wasmtime` crate.
+//!
+//! This module is only available on Unix targets, for example Linux and macOS.
+//! It is not available on Windows, for example. Note that the import path for
+//! this module is `wasmtime::unix::...`, which is intended to emphasize that it
+//! is platform-specific.
+//!
+//! The traits contained in this module are intended to extend various types
+//! throughout the `wasmtime` crate with extra functionality that's only
+//! available on Unix.
+
+use crate::Instance;
+
+/// Extensions for the [`Instance`] type only available on Unix.
+pub trait InstanceExt {
+    // TODO: needs more docs?
+    /// The signal handler must be
+    /// [async-signal-safe](http://man7.org/linux/man-pages/man7/signal-safety.7.html).
+    unsafe fn set_signal_handler<H>(&self, handler: H)
+    where
+        H: 'static + Fn(libc::c_int, *const libc::siginfo_t, *const libc::c_void) -> bool;
+}
+
+impl InstanceExt for Instance {
+    unsafe fn set_signal_handler<H>(&self, handler: H)
+    where
+        H: 'static + Fn(libc::c_int, *const libc::siginfo_t, *const libc::c_void) -> bool,
+    {
+        self.instance_handle.clone().set_signal_handler(handler);
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime/values.rs.html b/api/src/wasmtime/values.rs.html new file mode 100644 index 000000000000..258ea50a7c34 --- /dev/null +++ b/api/src/wasmtime/values.rs.html @@ -0,0 +1,451 @@ +values.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+
+use crate::r#ref::AnyRef;
+use crate::{Func, Store, ValType};
+use anyhow::{bail, Result};
+use std::ptr;
+use wasmtime_environ::ir;
+
+/// Possible runtime values that a WebAssembly module can either consume or
+/// produce.
+#[derive(Debug, Clone)]
+pub enum Val {
+    /// A 32-bit integer
+    I32(i32),
+
+    /// A 64-bit integer
+    I64(i64),
+
+    /// A 32-bit float.
+    ///
+    /// Note that the raw bits of the float are stored here, and you can use
+    /// `f32::from_bits` to create an `f32` value.
+    F32(u32),
+
+    /// A 64-bit float.
+    ///
+    /// Note that the raw bits of the float are stored here, and you can use
+    /// `f64::from_bits` to create an `f64` value.
+    F64(u64),
+
+    /// An `anyref` value which can hold opaque data to the wasm instance itself.
+    ///
+    /// Note that this is a nullable value as well.
+    AnyRef(AnyRef),
+
+    /// A first-class reference to a WebAssembly function.
+    FuncRef(Func),
+
+    /// A 128-bit number
+    V128(u128),
+}
+
+macro_rules! accessors {
+    ($bind:ident $(($variant:ident($ty:ty) $get:ident $unwrap:ident $cvt:expr))*) => ($(
+        /// Attempt to access the underlying value of this `Val`, returning
+        /// `None` if it is not the correct type.
+        pub fn $get(&self) -> Option<$ty> {
+            if let Val::$variant($bind) = self {
+                Some($cvt)
+            } else {
+                None
+            }
+        }
+
+        /// Returns the underlying value of this `Val`, panicking if it's the
+        /// wrong type.
+        ///
+        /// # Panics
+        ///
+        /// Panics if `self` is not of the right type.
+        pub fn $unwrap(&self) -> $ty {
+            self.$get().expect(concat!("expected ", stringify!($ty)))
+        }
+    )*)
+}
+
+impl Val {
+    /// Returns a null `anyref` value.
+    pub fn null() -> Val {
+        Val::AnyRef(AnyRef::null())
+    }
+
+    /// Returns the corresponding [`ValType`] for this `Val`.
+    pub fn ty(&self) -> ValType {
+        match self {
+            Val::I32(_) => ValType::I32,
+            Val::I64(_) => ValType::I64,
+            Val::F32(_) => ValType::F32,
+            Val::F64(_) => ValType::F64,
+            Val::AnyRef(_) => ValType::AnyRef,
+            Val::FuncRef(_) => ValType::FuncRef,
+            Val::V128(_) => ValType::V128,
+        }
+    }
+
+    pub(crate) unsafe fn write_value_to(&self, p: *mut i128) {
+        match self {
+            Val::I32(i) => ptr::write(p as *mut i32, *i),
+            Val::I64(i) => ptr::write(p as *mut i64, *i),
+            Val::F32(u) => ptr::write(p as *mut u32, *u),
+            Val::F64(u) => ptr::write(p as *mut u64, *u),
+            Val::V128(b) => ptr::write(p as *mut u128, *b),
+            _ => unimplemented!("Val::write_value_to"),
+        }
+    }
+
+    pub(crate) unsafe fn read_value_from(p: *const i128, ty: ir::Type) -> Val {
+        match ty {
+            ir::types::I32 => Val::I32(ptr::read(p as *const i32)),
+            ir::types::I64 => Val::I64(ptr::read(p as *const i64)),
+            ir::types::F32 => Val::F32(ptr::read(p as *const u32)),
+            ir::types::F64 => Val::F64(ptr::read(p as *const u64)),
+            ir::types::I8X16 => Val::V128(ptr::read(p as *const u128)),
+            _ => unimplemented!("Val::read_value_from"),
+        }
+    }
+
+    accessors! {
+        e
+        (I32(i32) i32 unwrap_i32 *e)
+        (I64(i64) i64 unwrap_i64 *e)
+        (F32(f32) f32 unwrap_f32 f32::from_bits(*e))
+        (F64(f64) f64 unwrap_f64 f64::from_bits(*e))
+        (FuncRef(&Func) funcref unwrap_funcref e)
+        (V128(u128) v128 unwrap_v128 *e)
+    }
+
+    /// Attempt to access the underlying value of this `Val`, returning
+    /// `None` if it is not the correct type.
+    ///
+    /// This will return `Some` for both the `AnyRef` and `FuncRef` types.
+    pub fn anyref(&self) -> Option<AnyRef> {
+        match self {
+            Val::AnyRef(e) => Some(e.clone()),
+            _ => None,
+        }
+    }
+
+    /// Returns the underlying value of this `Val`, panicking if it's the
+    /// wrong type.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `self` is not of the right type.
+    pub fn unwrap_anyref(&self) -> AnyRef {
+        self.anyref().expect("expected anyref")
+    }
+}
+
+impl From<i32> for Val {
+    fn from(val: i32) -> Val {
+        Val::I32(val)
+    }
+}
+
+impl From<i64> for Val {
+    fn from(val: i64) -> Val {
+        Val::I64(val)
+    }
+}
+
+impl From<f32> for Val {
+    fn from(val: f32) -> Val {
+        Val::F32(val.to_bits())
+    }
+}
+
+impl From<f64> for Val {
+    fn from(val: f64) -> Val {
+        Val::F64(val.to_bits())
+    }
+}
+
+impl From<AnyRef> for Val {
+    fn from(val: AnyRef) -> Val {
+        Val::AnyRef(val)
+    }
+}
+
+impl From<Func> for Val {
+    fn from(val: Func) -> Val {
+        Val::FuncRef(val)
+    }
+}
+
+pub(crate) fn into_checked_anyfunc(
+    val: Val,
+    store: &Store,
+) -> Result<wasmtime_runtime::VMCallerCheckedAnyfunc> {
+    Ok(match val {
+        Val::AnyRef(AnyRef::Null) => wasmtime_runtime::VMCallerCheckedAnyfunc {
+            func_ptr: ptr::null(),
+            type_index: wasmtime_runtime::VMSharedSignatureIndex::default(),
+            vmctx: ptr::null_mut(),
+        },
+        Val::FuncRef(f) => {
+            let (vmctx, func_ptr, signature) = match f.wasmtime_export() {
+                wasmtime_runtime::Export::Function {
+                    vmctx,
+                    address,
+                    signature,
+                } => (*vmctx, *address, signature),
+                _ => panic!("expected function export"),
+            };
+            let type_index = store.compiler().signatures().register(signature);
+            wasmtime_runtime::VMCallerCheckedAnyfunc {
+                func_ptr,
+                type_index,
+                vmctx,
+            }
+        }
+        _ => bail!("val is not funcref"),
+    })
+}
+
+pub(crate) fn from_checked_anyfunc(
+    item: wasmtime_runtime::VMCallerCheckedAnyfunc,
+    store: &Store,
+) -> Val {
+    if item.type_index == wasmtime_runtime::VMSharedSignatureIndex::default() {
+        return Val::AnyRef(AnyRef::Null);
+    }
+    let signature = store
+        .compiler()
+        .signatures()
+        .lookup(item.type_index)
+        .expect("signature");
+    let instance_handle = unsafe { wasmtime_runtime::InstanceHandle::from_vmctx(item.vmctx) };
+    let export = wasmtime_runtime::Export::Function {
+        address: item.func_ptr,
+        signature,
+        vmctx: item.vmctx,
+    };
+    let f = Func::from_wasmtime_function(export, store, instance_handle);
+    Val::FuncRef(f)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/gc.rs.html b/api/src/wasmtime_debug/gc.rs.html new file mode 100644 index 000000000000..7597d1df3aef --- /dev/null +++ b/api/src/wasmtime_debug/gc.rs.html @@ -0,0 +1,465 @@ +gc.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+
+use crate::transform::AddressTransform;
+use gimli::constants;
+use gimli::read;
+use gimli::{Reader, UnitSectionOffset};
+use std::collections::{HashMap, HashSet};
+
+#[derive(Debug)]
+pub struct Dependencies {
+    edges: HashMap<UnitSectionOffset, HashSet<UnitSectionOffset>>,
+    roots: HashSet<UnitSectionOffset>,
+}
+
+impl Dependencies {
+    fn new() -> Dependencies {
+        Dependencies {
+            edges: HashMap::new(),
+            roots: HashSet::new(),
+        }
+    }
+
+    fn add_edge(&mut self, a: UnitSectionOffset, b: UnitSectionOffset) {
+        use std::collections::hash_map::Entry;
+        match self.edges.entry(a) {
+            Entry::Occupied(mut o) => {
+                o.get_mut().insert(b);
+            }
+            Entry::Vacant(v) => {
+                let mut set = HashSet::new();
+                set.insert(b);
+                v.insert(set);
+            }
+        }
+    }
+
+    fn add_root(&mut self, root: UnitSectionOffset) {
+        self.roots.insert(root);
+    }
+
+    pub fn get_reachable(&self) -> HashSet<UnitSectionOffset> {
+        let mut reachable = self.roots.clone();
+        let mut queue = Vec::new();
+        for i in self.roots.iter() {
+            if let Some(deps) = self.edges.get(i) {
+                for j in deps {
+                    if reachable.contains(j) {
+                        continue;
+                    }
+                    reachable.insert(*j);
+                    queue.push(*j);
+                }
+            }
+        }
+        while let Some(i) = queue.pop() {
+            if let Some(deps) = self.edges.get(&i) {
+                for j in deps {
+                    if reachable.contains(j) {
+                        continue;
+                    }
+                    reachable.insert(*j);
+                    queue.push(*j);
+                }
+            }
+        }
+        reachable
+    }
+}
+
+pub fn build_dependencies<R: Reader<Offset = usize>>(
+    dwarf: &read::Dwarf<R>,
+    at: &AddressTransform,
+) -> read::Result<Dependencies> {
+    let mut deps = Dependencies::new();
+    let mut units = dwarf.units();
+    while let Some(unit) = units.next()? {
+        build_unit_dependencies(unit, dwarf, at, &mut deps)?;
+    }
+    Ok(deps)
+}
+
+fn build_unit_dependencies<R: Reader<Offset = usize>>(
+    header: read::CompilationUnitHeader<R>,
+    dwarf: &read::Dwarf<R>,
+    at: &AddressTransform,
+    deps: &mut Dependencies,
+) -> read::Result<()> {
+    let unit = dwarf.unit(header)?;
+    let mut tree = unit.entries_tree(None)?;
+    let root = tree.root()?;
+    build_die_dependencies(root, dwarf, &unit, at, deps)?;
+    Ok(())
+}
+
+fn has_die_back_edge<R: Reader<Offset = usize>>(die: &read::DebuggingInformationEntry<R>) -> bool {
+    match die.tag() {
+        constants::DW_TAG_variable
+        | constants::DW_TAG_constant
+        | constants::DW_TAG_inlined_subroutine
+        | constants::DW_TAG_lexical_block
+        | constants::DW_TAG_label
+        | constants::DW_TAG_with_stmt
+        | constants::DW_TAG_try_block
+        | constants::DW_TAG_catch_block
+        | constants::DW_TAG_template_type_parameter
+        | constants::DW_TAG_member
+        | constants::DW_TAG_formal_parameter => true,
+        _ => false,
+    }
+}
+
+fn has_valid_code_range<R: Reader<Offset = usize>>(
+    die: &read::DebuggingInformationEntry<R>,
+    dwarf: &read::Dwarf<R>,
+    unit: &read::Unit<R>,
+    at: &AddressTransform,
+) -> read::Result<bool> {
+    match die.tag() {
+        constants::DW_TAG_subprogram => {
+            if let Some(ranges_attr) = die.attr_value(constants::DW_AT_ranges)? {
+                let offset = match ranges_attr {
+                    read::AttributeValue::RangeListsRef(val) => val,
+                    read::AttributeValue::DebugRngListsIndex(index) => {
+                        dwarf.ranges_offset(unit, index)?
+                    }
+                    _ => return Ok(false),
+                };
+                let mut has_valid_base = if let Some(read::AttributeValue::Addr(low_pc)) =
+                    die.attr_value(constants::DW_AT_low_pc)?
+                {
+                    Some(at.can_translate_address(low_pc))
+                } else {
+                    None
+                };
+                let mut it = dwarf.ranges.raw_ranges(offset, unit.encoding())?;
+                while let Some(range) = it.next()? {
+                    // If at least one of the range addresses can be converted,
+                    // declaring code range as valid.
+                    match range {
+                        read::RawRngListEntry::AddressOrOffsetPair { .. }
+                            if has_valid_base.is_some() =>
+                        {
+                            if has_valid_base.unwrap() {
+                                return Ok(true);
+                            }
+                        }
+                        read::RawRngListEntry::StartEnd { begin, .. }
+                        | read::RawRngListEntry::StartLength { begin, .. }
+                        | read::RawRngListEntry::AddressOrOffsetPair { begin, .. } => {
+                            if at.can_translate_address(begin) {
+                                return Ok(true);
+                            }
+                        }
+                        read::RawRngListEntry::StartxEndx { begin, .. }
+                        | read::RawRngListEntry::StartxLength { begin, .. } => {
+                            let addr = dwarf.address(unit, begin)?;
+                            if at.can_translate_address(addr) {
+                                return Ok(true);
+                            }
+                        }
+                        read::RawRngListEntry::BaseAddress { addr } => {
+                            has_valid_base = Some(at.can_translate_address(addr));
+                        }
+                        read::RawRngListEntry::BaseAddressx { addr } => {
+                            let addr = dwarf.address(unit, addr)?;
+                            has_valid_base = Some(at.can_translate_address(addr));
+                        }
+                        read::RawRngListEntry::OffsetPair { .. } => (),
+                    }
+                }
+                return Ok(false);
+            } else if let Some(low_pc) = die.attr_value(constants::DW_AT_low_pc)? {
+                if let read::AttributeValue::Addr(a) = low_pc {
+                    return Ok(at.can_translate_address(a));
+                }
+            }
+        }
+        _ => (),
+    }
+    Ok(false)
+}
+
+fn build_die_dependencies<R: Reader<Offset = usize>>(
+    die: read::EntriesTreeNode<R>,
+    dwarf: &read::Dwarf<R>,
+    unit: &read::Unit<R>,
+    at: &AddressTransform,
+    deps: &mut Dependencies,
+) -> read::Result<()> {
+    let entry = die.entry();
+    let offset = entry.offset().to_unit_section_offset(unit);
+    let mut attrs = entry.attrs();
+    while let Some(attr) = attrs.next()? {
+        build_attr_dependencies(&attr, offset, dwarf, unit, at, deps)?;
+    }
+
+    let mut children = die.children();
+    while let Some(child) = children.next()? {
+        let child_entry = child.entry();
+        let child_offset = child_entry.offset().to_unit_section_offset(unit);
+        deps.add_edge(child_offset, offset);
+        if has_die_back_edge(child_entry) {
+            deps.add_edge(offset, child_offset);
+        }
+        if has_valid_code_range(child_entry, dwarf, unit, at)? {
+            deps.add_root(child_offset);
+        }
+        build_die_dependencies(child, dwarf, unit, at, deps)?;
+    }
+    Ok(())
+}
+
+fn build_attr_dependencies<R: Reader<Offset = usize>>(
+    attr: &read::Attribute<R>,
+    offset: UnitSectionOffset,
+    _dwarf: &read::Dwarf<R>,
+    unit: &read::Unit<R>,
+    _at: &AddressTransform,
+    deps: &mut Dependencies,
+) -> read::Result<()> {
+    match attr.value() {
+        read::AttributeValue::UnitRef(val) => {
+            let ref_offset = val.to_unit_section_offset(unit);
+            deps.add_edge(offset, ref_offset);
+        }
+        read::AttributeValue::DebugInfoRef(val) => {
+            let ref_offset = UnitSectionOffset::DebugInfoOffset(val);
+            deps.add_edge(offset, ref_offset);
+        }
+        _ => (),
+    }
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/lib.rs.html b/api/src/wasmtime_debug/lib.rs.html new file mode 100644 index 000000000000..5a0ea5c0c92f --- /dev/null +++ b/api/src/wasmtime_debug/lib.rs.html @@ -0,0 +1,371 @@ +lib.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+
+//! Debug utils for WebAssembly using Cranelift.
+
+#![allow(clippy::cast_ptr_alignment)]
+
+use anyhow::Error;
+use faerie::{Artifact, Decl};
+use more_asserts::assert_gt;
+use target_lexicon::{BinaryFormat, Triple};
+use wasmtime_environ::isa::TargetFrontendConfig;
+use wasmtime_environ::{ModuleAddressMap, ModuleVmctxInfo, ValueLabelsRanges};
+
+pub use crate::read_debuginfo::{read_debuginfo, DebugInfoData, WasmFileInfo};
+pub use crate::transform::transform_dwarf;
+pub use crate::write_debuginfo::{emit_dwarf, ResolvedSymbol, SymbolResolver};
+
+mod gc;
+mod read_debuginfo;
+mod transform;
+mod write_debuginfo;
+
+struct FunctionRelocResolver {}
+impl SymbolResolver for FunctionRelocResolver {
+    fn resolve_symbol(&self, symbol: usize, addend: i64) -> ResolvedSymbol {
+        let name = format!("_wasm_function_{}", symbol);
+        ResolvedSymbol::Reloc { name, addend }
+    }
+}
+
+pub fn emit_debugsections(
+    obj: &mut Artifact,
+    vmctx_info: &ModuleVmctxInfo,
+    target_config: TargetFrontendConfig,
+    debuginfo_data: &DebugInfoData,
+    at: &ModuleAddressMap,
+    ranges: &ValueLabelsRanges,
+) -> Result<(), Error> {
+    let resolver = FunctionRelocResolver {};
+    let dwarf = transform_dwarf(target_config, debuginfo_data, at, vmctx_info, ranges)?;
+    emit_dwarf(obj, dwarf, &resolver)?;
+    Ok(())
+}
+
+struct ImageRelocResolver<'a> {
+    func_offsets: &'a Vec<u64>,
+}
+
+impl<'a> SymbolResolver for ImageRelocResolver<'a> {
+    fn resolve_symbol(&self, symbol: usize, addend: i64) -> ResolvedSymbol {
+        let func_start = self.func_offsets[symbol];
+        ResolvedSymbol::PhysicalAddress(func_start + addend as u64)
+    }
+}
+
+pub fn emit_debugsections_image(
+    triple: Triple,
+    target_config: TargetFrontendConfig,
+    debuginfo_data: &DebugInfoData,
+    vmctx_info: &ModuleVmctxInfo,
+    at: &ModuleAddressMap,
+    ranges: &ValueLabelsRanges,
+    funcs: &[(*const u8, usize)],
+) -> Result<Vec<u8>, Error> {
+    let func_offsets = &funcs
+        .iter()
+        .map(|(ptr, _)| *ptr as u64)
+        .collect::<Vec<u64>>();
+    let mut obj = Artifact::new(triple, String::from("module"));
+    let resolver = ImageRelocResolver { func_offsets };
+    let dwarf = transform_dwarf(target_config, debuginfo_data, at, vmctx_info, ranges)?;
+
+    // Assuming all functions in the same code block, looking min/max of its range.
+    assert_gt!(funcs.len(), 0);
+    let mut segment_body: (usize, usize) = (!0, 0);
+    for (body_ptr, body_len) in funcs {
+        segment_body.0 = std::cmp::min(segment_body.0, *body_ptr as usize);
+        segment_body.1 = std::cmp::max(segment_body.1, *body_ptr as usize + body_len);
+    }
+    let segment_body = (segment_body.0 as *const u8, segment_body.1 - segment_body.0);
+
+    let body = unsafe { std::slice::from_raw_parts(segment_body.0, segment_body.1) };
+    obj.declare_with("all", Decl::function(), body.to_vec())?;
+
+    emit_dwarf(&mut obj, dwarf, &resolver)?;
+
+    // LLDB is too "magical" about mach-o, generating elf
+    let mut bytes = obj.emit_as(BinaryFormat::Elf)?;
+    // elf is still missing details...
+    convert_faerie_elf_to_loadable_file(&mut bytes, segment_body.0);
+
+    // let mut file = ::std::fs::File::create(::std::path::Path::new("test.o")).expect("file");
+    // ::std::io::Write::write(&mut file, &bytes).expect("write");
+
+    Ok(bytes)
+}
+
+fn convert_faerie_elf_to_loadable_file(bytes: &mut Vec<u8>, code_ptr: *const u8) {
+    use std::ffi::CStr;
+    use std::os::raw::c_char;
+
+    assert!(
+        bytes[0x4] == 2 && bytes[0x5] == 1,
+        "bits and endianess in .ELF"
+    );
+    let e_phoff = unsafe { *(bytes.as_ptr().offset(0x20) as *const u64) };
+    let e_phnum = unsafe { *(bytes.as_ptr().offset(0x38) as *const u16) };
+    assert!(
+        e_phoff == 0 && e_phnum == 0,
+        "program header table is empty"
+    );
+    let e_phentsize = unsafe { *(bytes.as_ptr().offset(0x36) as *const u16) };
+    assert_eq!(e_phentsize, 0x38, "size of ph");
+    let e_shentsize = unsafe { *(bytes.as_ptr().offset(0x3A) as *const u16) };
+    assert_eq!(e_shentsize, 0x40, "size of sh");
+
+    let e_shoff = unsafe { *(bytes.as_ptr().offset(0x28) as *const u64) };
+    let e_shnum = unsafe { *(bytes.as_ptr().offset(0x3C) as *const u16) };
+    let mut shstrtab_off = 0;
+    let mut segment = None;
+    for i in 0..e_shnum {
+        let off = e_shoff as isize + i as isize * e_shentsize as isize;
+        let sh_type = unsafe { *(bytes.as_ptr().offset(off + 0x4) as *const u32) };
+        if sh_type == /* SHT_SYMTAB */ 3 {
+            shstrtab_off = unsafe { *(bytes.as_ptr().offset(off + 0x18) as *const u64) };
+        }
+        if sh_type != /* SHT_PROGBITS */ 1 {
+            continue;
+        }
+        // It is a SHT_PROGBITS, but we need to check sh_name to ensure it is our function
+        let sh_name = unsafe {
+            let sh_name_off = *(bytes.as_ptr().offset(off) as *const u32);
+            CStr::from_ptr(
+                bytes
+                    .as_ptr()
+                    .offset((shstrtab_off + sh_name_off as u64) as isize)
+                    as *const c_char,
+            )
+            .to_str()
+            .expect("name")
+        };
+        if sh_name != ".text.all" {
+            continue;
+        }
+
+        assert!(segment.is_none());
+        // Functions was added at emit_debugsections_image as .text.all.
+        // Patch vaddr, and save file location and its size.
+        unsafe {
+            *(bytes.as_ptr().offset(off + 0x10) as *mut u64) = code_ptr as u64;
+        };
+        let sh_offset = unsafe { *(bytes.as_ptr().offset(off + 0x18) as *const u64) };
+        let sh_size = unsafe { *(bytes.as_ptr().offset(off + 0x20) as *const u64) };
+        segment = Some((sh_offset, code_ptr, sh_size));
+        // Fix name too: cut it to just ".text"
+        unsafe {
+            let sh_name_off = *(bytes.as_ptr().offset(off) as *const u32);
+            bytes[(shstrtab_off + sh_name_off as u64) as usize + ".text".len()] = 0;
+        }
+    }
+
+    // LLDB wants segment with virtual address set, placing them at the end of ELF.
+    let ph_off = bytes.len();
+    if let Some((sh_offset, v_offset, sh_size)) = segment {
+        let segment = vec![0; 0x38];
+        unsafe {
+            *(segment.as_ptr() as *mut u32) = /* PT_LOAD */ 0x1;
+            *(segment.as_ptr().offset(0x8) as *mut u64) = sh_offset;
+            *(segment.as_ptr().offset(0x10) as *mut u64) = v_offset as u64;
+            *(segment.as_ptr().offset(0x18) as *mut u64) = v_offset as u64;
+            *(segment.as_ptr().offset(0x20) as *mut u64) = sh_size;
+            *(segment.as_ptr().offset(0x28) as *mut u64) = sh_size;
+        }
+        bytes.extend_from_slice(&segment);
+    } else {
+        unreachable!();
+    }
+
+    // It is somewhat loadable ELF file at this moment.
+    // Update e_flags, e_phoff and e_phnum.
+    unsafe {
+        *(bytes.as_ptr().offset(0x10) as *mut u16) = /* ET_DYN */ 3;
+        *(bytes.as_ptr().offset(0x20) as *mut u64) = ph_off as u64;
+        *(bytes.as_ptr().offset(0x38) as *mut u16) = 1 as u16;
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/read_debuginfo.rs.html b/api/src/wasmtime_debug/read_debuginfo.rs.html new file mode 100644 index 000000000000..92235727e34e --- /dev/null +++ b/api/src/wasmtime_debug/read_debuginfo.rs.html @@ -0,0 +1,493 @@ +read_debuginfo.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+
+use gimli::{
+    DebugAbbrev, DebugAddr, DebugInfo, DebugLine, DebugLineStr, DebugLoc, DebugLocLists,
+    DebugRanges, DebugRngLists, DebugStr, DebugStrOffsets, DebugTypes, EndianSlice, LittleEndian,
+    LocationLists, RangeLists,
+};
+use std::collections::HashMap;
+use std::path::PathBuf;
+use wasmparser::{self, ModuleReader, SectionCode};
+
+trait Reader: gimli::Reader<Offset = usize, Endian = LittleEndian> {}
+
+impl<'input> Reader for gimli::EndianSlice<'input, LittleEndian> {}
+
+pub use wasmparser::Type as WasmType;
+
+pub type Dwarf<'input> = gimli::Dwarf<gimli::EndianSlice<'input, LittleEndian>>;
+
+#[derive(Debug)]
+pub struct FunctionMetadata {
+    pub params: Box<[WasmType]>,
+    pub locals: Box<[(u32, WasmType)]>,
+}
+
+#[derive(Debug)]
+pub struct WasmFileInfo {
+    pub path: Option<PathBuf>,
+    pub code_section_offset: u64,
+    pub funcs: Box<[FunctionMetadata]>,
+}
+
+#[derive(Debug)]
+pub struct NameSection {
+    pub module_name: Option<String>,
+    pub func_names: HashMap<u32, String>,
+    pub locals_names: HashMap<u32, HashMap<u32, String>>,
+}
+
+#[derive(Debug)]
+pub struct DebugInfoData<'a> {
+    pub dwarf: Dwarf<'a>,
+    pub name_section: Option<NameSection>,
+    pub wasm_file: WasmFileInfo,
+}
+
+fn convert_sections<'a>(sections: HashMap<&str, &'a [u8]>) -> Dwarf<'a> {
+    const EMPTY_SECTION: &[u8] = &[];
+
+    let endian = LittleEndian;
+    let debug_str = DebugStr::new(sections.get(".debug_str").unwrap_or(&EMPTY_SECTION), endian);
+    let debug_abbrev = DebugAbbrev::new(
+        sections.get(".debug_abbrev").unwrap_or(&EMPTY_SECTION),
+        endian,
+    );
+    let debug_info = DebugInfo::new(
+        sections.get(".debug_info").unwrap_or(&EMPTY_SECTION),
+        endian,
+    );
+    let debug_line = DebugLine::new(
+        sections.get(".debug_line").unwrap_or(&EMPTY_SECTION),
+        endian,
+    );
+
+    if sections.contains_key(".debug_addr") {
+        panic!("Unexpected .debug_addr");
+    }
+
+    let debug_addr = DebugAddr::from(EndianSlice::new(EMPTY_SECTION, endian));
+
+    if sections.contains_key(".debug_line_str") {
+        panic!("Unexpected .debug_line_str");
+    }
+
+    let debug_line_str = DebugLineStr::from(EndianSlice::new(EMPTY_SECTION, endian));
+    let debug_str_sup = DebugStr::from(EndianSlice::new(EMPTY_SECTION, endian));
+
+    if sections.contains_key(".debug_rnglists") {
+        panic!("Unexpected .debug_rnglists");
+    }
+
+    let debug_ranges = match sections.get(".debug_ranges") {
+        Some(section) => DebugRanges::new(section, endian),
+        None => DebugRanges::new(EMPTY_SECTION, endian),
+    };
+    let debug_rnglists = DebugRngLists::new(EMPTY_SECTION, endian);
+    let ranges = RangeLists::new(debug_ranges, debug_rnglists);
+
+    if sections.contains_key(".debug_loclists") {
+        panic!("Unexpected .debug_loclists");
+    }
+
+    let debug_loc = match sections.get(".debug_loc") {
+        Some(section) => DebugLoc::new(section, endian),
+        None => DebugLoc::new(EMPTY_SECTION, endian),
+    };
+    let debug_loclists = DebugLocLists::new(EMPTY_SECTION, endian);
+    let locations = LocationLists::new(debug_loc, debug_loclists);
+
+    if sections.contains_key(".debug_str_offsets") {
+        panic!("Unexpected .debug_str_offsets");
+    }
+
+    let debug_str_offsets = DebugStrOffsets::from(EndianSlice::new(EMPTY_SECTION, endian));
+
+    if sections.contains_key(".debug_types") {
+        panic!("Unexpected .debug_types");
+    }
+
+    let debug_types = DebugTypes::from(EndianSlice::new(EMPTY_SECTION, endian));
+
+    Dwarf {
+        debug_abbrev,
+        debug_addr,
+        debug_info,
+        debug_line,
+        debug_line_str,
+        debug_str,
+        debug_str_offsets,
+        debug_str_sup,
+        debug_types,
+        locations,
+        ranges,
+    }
+}
+
+fn read_name_section(reader: wasmparser::NameSectionReader) -> wasmparser::Result<NameSection> {
+    let mut module_name = None;
+    let mut func_names = HashMap::new();
+    let mut locals_names = HashMap::new();
+    for i in reader.into_iter() {
+        match i? {
+            wasmparser::Name::Module(m) => {
+                module_name = Some(String::from(m.get_name()?));
+            }
+            wasmparser::Name::Function(f) => {
+                let mut reader = f.get_map()?;
+                while let Ok(naming) = reader.read() {
+                    func_names.insert(naming.index, String::from(naming.name));
+                }
+            }
+            wasmparser::Name::Local(l) => {
+                let mut reader = l.get_function_local_reader()?;
+                while let Ok(f) = reader.read() {
+                    let mut names = HashMap::new();
+                    let mut reader = f.get_map()?;
+                    while let Ok(naming) = reader.read() {
+                        names.insert(naming.index, String::from(naming.name));
+                    }
+                    locals_names.insert(f.func_index, names);
+                }
+            }
+        }
+    }
+    let result = NameSection {
+        module_name,
+        func_names,
+        locals_names,
+    };
+    Ok(result)
+}
+
+pub fn read_debuginfo(data: &[u8]) -> DebugInfoData {
+    let mut reader = ModuleReader::new(data).expect("reader");
+    let mut sections = HashMap::new();
+    let mut name_section = None;
+    let mut code_section_offset = 0;
+
+    let mut signatures_params: Vec<Box<[WasmType]>> = Vec::new();
+    let mut func_params_refs: Vec<usize> = Vec::new();
+    let mut func_locals: Vec<Box<[(u32, WasmType)]>> = Vec::new();
+
+    while !reader.eof() {
+        let section = reader.read().expect("section");
+        match section.code {
+            SectionCode::Custom { name, .. } => {
+                if name.starts_with(".debug_") {
+                    let mut reader = section.get_binary_reader();
+                    let len = reader.bytes_remaining();
+                    sections.insert(name, reader.read_bytes(len).expect("bytes"));
+                }
+                if name == "name" {
+                    if let Ok(reader) = section.get_name_section_reader() {
+                        if let Ok(section) = read_name_section(reader) {
+                            name_section = Some(section);
+                        }
+                    }
+                }
+            }
+            SectionCode::Type => {
+                signatures_params = section
+                    .get_type_section_reader()
+                    .expect("type section")
+                    .into_iter()
+                    .map(|ft| ft.expect("type").params)
+                    .collect::<Vec<_>>();
+            }
+            SectionCode::Function => {
+                func_params_refs = section
+                    .get_function_section_reader()
+                    .expect("function section")
+                    .into_iter()
+                    .map(|index| index.expect("func index") as usize)
+                    .collect::<Vec<_>>();
+            }
+            SectionCode::Code => {
+                code_section_offset = section.range().start as u64;
+                func_locals = section
+                    .get_code_section_reader()
+                    .expect("code section")
+                    .into_iter()
+                    .map(|body| {
+                        let locals = body
+                            .expect("body")
+                            .get_locals_reader()
+                            .expect("locals reader");
+                        locals
+                            .into_iter()
+                            .collect::<Result<Vec<_>, _>>()
+                            .expect("locals data")
+                            .into_boxed_slice()
+                    })
+                    .collect::<Vec<_>>();
+            }
+            _ => (),
+        }
+    }
+
+    let func_meta = func_params_refs
+        .into_iter()
+        .zip(func_locals.into_iter())
+        .map(|(params_index, locals)| FunctionMetadata {
+            params: signatures_params[params_index].clone(),
+            locals,
+        })
+        .collect::<Vec<_>>();
+
+    DebugInfoData {
+        dwarf: convert_sections(sections),
+        name_section,
+        wasm_file: WasmFileInfo {
+            path: None,
+            code_section_offset,
+            funcs: func_meta.into_boxed_slice(),
+        },
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/transform/address_transform.rs.html b/api/src/wasmtime_debug/transform/address_transform.rs.html new file mode 100644 index 000000000000..aaed574fcb5b --- /dev/null +++ b/api/src/wasmtime_debug/transform/address_transform.rs.html @@ -0,0 +1,1313 @@ +address_transform.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+
+use crate::WasmFileInfo;
+use gimli::write;
+use more_asserts::assert_le;
+use std::collections::BTreeMap;
+use std::collections::HashMap;
+use std::iter::FromIterator;
+use wasmtime_environ::entity::{EntityRef, PrimaryMap};
+use wasmtime_environ::ir::SourceLoc;
+use wasmtime_environ::wasm::DefinedFuncIndex;
+use wasmtime_environ::{FunctionAddressMap, ModuleAddressMap};
+
+pub type GeneratedAddress = usize;
+pub type WasmAddress = u64;
+
+/// Contains mapping of the generated address to its original
+/// source location.
+#[derive(Debug)]
+pub struct AddressMap {
+    pub generated: GeneratedAddress,
+    pub wasm: WasmAddress,
+}
+
+/// Information about generated function code: its body start,
+/// length, and instructions addresses.
+#[derive(Debug)]
+pub struct FunctionMap {
+    pub offset: GeneratedAddress,
+    pub len: GeneratedAddress,
+    pub wasm_start: WasmAddress,
+    pub wasm_end: WasmAddress,
+    pub addresses: Box<[AddressMap]>,
+}
+
+/// Mapping of the source location to its generated code range.
+#[derive(Debug)]
+struct Position {
+    wasm_pos: WasmAddress,
+    gen_start: GeneratedAddress,
+    gen_end: GeneratedAddress,
+}
+
+/// Mapping of continuous range of source location to its generated
+/// code. The positions are always in accending order for search.
+#[derive(Debug)]
+struct Range {
+    wasm_start: WasmAddress,
+    wasm_end: WasmAddress,
+    gen_start: GeneratedAddress,
+    gen_end: GeneratedAddress,
+    positions: Box<[Position]>,
+}
+
+/// Helper function address lookup data. Contains ranges start positions
+/// index and ranges data. The multiple ranges can include the same
+/// original source position. The index (B-Tree) uses range start
+/// position as a key.
+#[derive(Debug)]
+struct FuncLookup {
+    index: Vec<(WasmAddress, Box<[usize]>)>,
+    ranges: Box<[Range]>,
+}
+
+/// Mapping of original functions to generated code locations/ranges.
+#[derive(Debug)]
+struct FuncTransform {
+    start: WasmAddress,
+    end: WasmAddress,
+    index: DefinedFuncIndex,
+    lookup: FuncLookup,
+}
+
+/// Module functions mapping to generated code.
+#[derive(Debug)]
+pub struct AddressTransform {
+    map: PrimaryMap<DefinedFuncIndex, FunctionMap>,
+    func: Vec<(WasmAddress, FuncTransform)>,
+}
+
+/// Returns a wasm bytecode offset in the code section from SourceLoc.
+pub fn get_wasm_code_offset(loc: SourceLoc, code_section_offset: u64) -> WasmAddress {
+    // Code section size <= 4GB, allow wrapped SourceLoc to recover the overflow.
+    loc.bits().wrapping_sub(code_section_offset as u32) as WasmAddress
+}
+
+fn build_function_lookup(
+    ft: &FunctionAddressMap,
+    code_section_offset: u64,
+) -> (WasmAddress, WasmAddress, FuncLookup) {
+    assert_le!(code_section_offset, ft.start_srcloc.bits() as u64);
+    let fn_start = get_wasm_code_offset(ft.start_srcloc, code_section_offset);
+    let fn_end = get_wasm_code_offset(ft.end_srcloc, code_section_offset);
+    assert_le!(fn_start, fn_end);
+
+    // Build ranges of continuous source locations. The new ranges starts when
+    // non-descending order is interrupted. Assuming the same origin location can
+    // be present in multiple ranges.
+    let mut range_wasm_start = fn_start;
+    let mut range_gen_start = ft.body_offset;
+    let mut last_wasm_pos = range_wasm_start;
+    let mut ranges = Vec::new();
+    let mut ranges_index = BTreeMap::new();
+    let mut current_range = Vec::new();
+    for t in &ft.instructions {
+        if t.srcloc.is_default() {
+            continue;
+        }
+
+        let offset = get_wasm_code_offset(t.srcloc, code_section_offset);
+        assert_le!(fn_start, offset);
+        assert_le!(offset, fn_end);
+
+        let inst_gen_start = t.code_offset;
+        let inst_gen_end = t.code_offset + t.code_len;
+
+        if last_wasm_pos > offset {
+            // Start new range.
+            ranges_index.insert(range_wasm_start, ranges.len());
+            ranges.push(Range {
+                wasm_start: range_wasm_start,
+                wasm_end: last_wasm_pos,
+                gen_start: range_gen_start,
+                gen_end: inst_gen_start,
+                positions: current_range.into_boxed_slice(),
+            });
+            range_wasm_start = offset;
+            range_gen_start = inst_gen_start;
+            current_range = Vec::new();
+        }
+        // Continue existing range: add new wasm->generated code position.
+        current_range.push(Position {
+            wasm_pos: offset,
+            gen_start: inst_gen_start,
+            gen_end: inst_gen_end,
+        });
+        last_wasm_pos = offset;
+    }
+    let last_gen_addr = ft.body_offset + ft.body_len;
+    ranges_index.insert(range_wasm_start, ranges.len());
+    ranges.push(Range {
+        wasm_start: range_wasm_start,
+        wasm_end: fn_end,
+        gen_start: range_gen_start,
+        gen_end: last_gen_addr,
+        positions: current_range.into_boxed_slice(),
+    });
+
+    // Making ranges lookup faster by building index: B-tree with every range
+    // start position that maps into list of active ranges at this position.
+    let ranges = ranges.into_boxed_slice();
+    let mut active_ranges = Vec::new();
+    let mut index = BTreeMap::new();
+    let mut last_wasm_pos = None;
+    for (wasm_start, range_index) in ranges_index {
+        if Some(wasm_start) == last_wasm_pos {
+            active_ranges.push(range_index);
+            continue;
+        }
+        if let Some(position) = last_wasm_pos {
+            index.insert(position, active_ranges.clone().into_boxed_slice());
+        }
+        active_ranges.retain(|r| ranges[*r].wasm_end.cmp(&wasm_start) != std::cmp::Ordering::Less);
+        active_ranges.push(range_index);
+        last_wasm_pos = Some(wasm_start);
+    }
+    index.insert(last_wasm_pos.unwrap(), active_ranges.into_boxed_slice());
+    let index = Vec::from_iter(index.into_iter());
+    (fn_start, fn_end, FuncLookup { index, ranges })
+}
+
+fn build_function_addr_map(
+    at: &ModuleAddressMap,
+    code_section_offset: u64,
+) -> PrimaryMap<DefinedFuncIndex, FunctionMap> {
+    let mut map = PrimaryMap::new();
+    for (_, ft) in at {
+        let mut fn_map = Vec::new();
+        for t in &ft.instructions {
+            if t.srcloc.is_default() {
+                continue;
+            }
+            let offset = get_wasm_code_offset(t.srcloc, code_section_offset);
+            fn_map.push(AddressMap {
+                generated: t.code_offset,
+                wasm: offset,
+            });
+        }
+
+        if cfg!(debug) {
+            // fn_map is sorted by the generated field -- see FunctionAddressMap::instructions.
+            for i in 1..fn_map.len() {
+                assert_le!(fn_map[i - 1].generated, fn_map[i].generated);
+            }
+        }
+
+        map.push(FunctionMap {
+            offset: ft.body_offset,
+            len: ft.body_len,
+            wasm_start: get_wasm_code_offset(ft.start_srcloc, code_section_offset),
+            wasm_end: get_wasm_code_offset(ft.end_srcloc, code_section_offset),
+            addresses: fn_map.into_boxed_slice(),
+        });
+    }
+    map
+}
+
+struct TransformRangeIter<'a> {
+    addr: u64,
+    indicies: &'a [usize],
+    ranges: &'a [Range],
+}
+
+impl<'a> TransformRangeIter<'a> {
+    fn new(func: &'a FuncTransform, addr: u64) -> Self {
+        let found = match func
+            .lookup
+            .index
+            .binary_search_by(|entry| entry.0.cmp(&addr))
+        {
+            Ok(i) => Some(&func.lookup.index[i].1),
+            Err(i) => {
+                if i > 0 {
+                    Some(&func.lookup.index[i - 1].1)
+                } else {
+                    None
+                }
+            }
+        };
+        if let Some(range_indices) = found {
+            TransformRangeIter {
+                addr,
+                indicies: range_indices,
+                ranges: &func.lookup.ranges,
+            }
+        } else {
+            unreachable!();
+        }
+    }
+}
+impl<'a> Iterator for TransformRangeIter<'a> {
+    type Item = (usize, usize);
+    fn next(&mut self) -> Option<Self::Item> {
+        if let Some((first, tail)) = self.indicies.split_first() {
+            let range_index = *first;
+            let range = &self.ranges[range_index];
+            self.indicies = tail;
+            let address = match range
+                .positions
+                .binary_search_by(|a| a.wasm_pos.cmp(&self.addr))
+            {
+                Ok(i) => range.positions[i].gen_start,
+                Err(i) => {
+                    if i == 0 {
+                        range.gen_start
+                    } else {
+                        range.positions[i - 1].gen_end
+                    }
+                }
+            };
+            Some((address, range_index))
+        } else {
+            None
+        }
+    }
+}
+
+struct TransformRangeEndIter<'a> {
+    addr: u64,
+    indicies: &'a [usize],
+    ranges: &'a [Range],
+}
+
+impl<'a> TransformRangeEndIter<'a> {
+    fn new(func: &'a FuncTransform, addr: u64) -> Self {
+        let found = match func
+            .lookup
+            .index
+            .binary_search_by(|entry| entry.0.cmp(&addr))
+        {
+            Ok(i) => Some(&func.lookup.index[i].1),
+            Err(i) => {
+                if i > 0 {
+                    Some(&func.lookup.index[i - 1].1)
+                } else {
+                    None
+                }
+            }
+        };
+        if let Some(range_indices) = found {
+            TransformRangeEndIter {
+                addr,
+                indicies: range_indices,
+                ranges: &func.lookup.ranges,
+            }
+        } else {
+            unreachable!();
+        }
+    }
+}
+
+impl<'a> Iterator for TransformRangeEndIter<'a> {
+    type Item = (usize, usize);
+    fn next(&mut self) -> Option<Self::Item> {
+        while let Some((first, tail)) = self.indicies.split_first() {
+            let range_index = *first;
+            let range = &self.ranges[range_index];
+            if range.wasm_start >= self.addr {
+                continue;
+            }
+            self.indicies = tail;
+            let address = match range
+                .positions
+                .binary_search_by(|a| a.wasm_pos.cmp(&self.addr))
+            {
+                Ok(i) => range.positions[i].gen_end,
+                Err(i) => {
+                    if i == range.positions.len() {
+                        range.gen_end
+                    } else {
+                        range.positions[i].gen_start
+                    }
+                }
+            };
+            return Some((address, range_index));
+        }
+        None
+    }
+}
+
+impl AddressTransform {
+    pub fn new(at: &ModuleAddressMap, wasm_file: &WasmFileInfo) -> Self {
+        let code_section_offset = wasm_file.code_section_offset;
+
+        let mut func = BTreeMap::new();
+        for (i, ft) in at {
+            let (fn_start, fn_end, lookup) = build_function_lookup(ft, code_section_offset);
+
+            func.insert(
+                fn_start,
+                FuncTransform {
+                    start: fn_start,
+                    end: fn_end,
+                    index: i,
+                    lookup,
+                },
+            );
+        }
+
+        let map = build_function_addr_map(at, code_section_offset);
+        let func = Vec::from_iter(func.into_iter());
+        AddressTransform { map, func }
+    }
+
+    fn find_func(&self, addr: u64) -> Option<&FuncTransform> {
+        // TODO check if we need to include end address
+        let func = match self.func.binary_search_by(|entry| entry.0.cmp(&addr)) {
+            Ok(i) => &self.func[i].1,
+            Err(i) => {
+                if i > 0 {
+                    &self.func[i - 1].1
+                } else {
+                    return None;
+                }
+            }
+        };
+        if addr >= func.start {
+            return Some(func);
+        }
+        None
+    }
+
+    pub fn find_func_index(&self, addr: u64) -> Option<DefinedFuncIndex> {
+        self.find_func(addr).map(|f| f.index)
+    }
+
+    pub fn translate_raw(&self, addr: u64) -> Option<(DefinedFuncIndex, GeneratedAddress)> {
+        if addr == 0 {
+            // It's normally 0 for debug info without the linked code.
+            return None;
+        }
+        if let Some(func) = self.find_func(addr) {
+            if addr == func.end {
+                // Clamp last address to the end to extend translation to the end
+                // of the function.
+                let map = &self.map[func.index];
+                return Some((func.index, map.len));
+            }
+            let first_result = TransformRangeIter::new(func, addr).next();
+            first_result.map(|(address, _)| (func.index, address))
+        } else {
+            // Address was not found: function was not compiled?
+            None
+        }
+    }
+
+    pub fn can_translate_address(&self, addr: u64) -> bool {
+        self.translate(addr).is_some()
+    }
+
+    pub fn translate(&self, addr: u64) -> Option<write::Address> {
+        self.translate_raw(addr)
+            .map(|(func_index, address)| write::Address::Symbol {
+                symbol: func_index.index(),
+                addend: address as i64,
+            })
+    }
+
+    pub fn translate_ranges_raw(
+        &self,
+        start: u64,
+        end: u64,
+    ) -> Option<(DefinedFuncIndex, Vec<(GeneratedAddress, GeneratedAddress)>)> {
+        if start == 0 {
+            // It's normally 0 for debug info without the linked code.
+            return None;
+        }
+        if let Some(func) = self.find_func(start) {
+            let mut starts: HashMap<usize, usize> =
+                HashMap::from_iter(TransformRangeIter::new(func, start).map(|(a, r)| (r, a)));
+            let mut result = Vec::new();
+            TransformRangeEndIter::new(func, end).for_each(|(a, r)| {
+                let range_start = if let Some(range_start) = starts.get(&r) {
+                    let range_start = *range_start;
+                    starts.remove(&r);
+                    range_start
+                } else {
+                    let range = &func.lookup.ranges[r];
+                    range.gen_start
+                };
+                result.push((range_start, a));
+            });
+            for (r, range_start) in starts {
+                let range = &func.lookup.ranges[r];
+                result.push((range_start, range.gen_end));
+            }
+            return Some((func.index, result));
+        }
+        // Address was not found: function was not compiled?
+        None
+    }
+
+    pub fn translate_ranges(&self, start: u64, end: u64) -> Vec<(write::Address, u64)> {
+        self.translate_ranges_raw(start, end)
+            .map_or(vec![], |(func_index, ranges)| {
+                ranges
+                    .iter()
+                    .map(|(start, end)| {
+                        (
+                            write::Address::Symbol {
+                                symbol: func_index.index(),
+                                addend: *start as i64,
+                            },
+                            (*end - *start) as u64,
+                        )
+                    })
+                    .collect::<Vec<_>>()
+            })
+    }
+
+    pub fn map(&self) -> &PrimaryMap<DefinedFuncIndex, FunctionMap> {
+        &self.map
+    }
+
+    pub fn func_range(&self, index: DefinedFuncIndex) -> (GeneratedAddress, GeneratedAddress) {
+        let map = &self.map[index];
+        (map.offset, map.offset + map.len)
+    }
+
+    pub fn func_source_range(&self, index: DefinedFuncIndex) -> (WasmAddress, WasmAddress) {
+        let map = &self.map[index];
+        (map.wasm_start, map.wasm_end)
+    }
+
+    pub fn convert_to_code_range(
+        &self,
+        addr: write::Address,
+        len: u64,
+    ) -> (GeneratedAddress, GeneratedAddress) {
+        let start = if let write::Address::Symbol { addend, .. } = addr {
+            // TODO subtract self.map[symbol].offset ?
+            addend as GeneratedAddress
+        } else {
+            unreachable!();
+        };
+        (start, start + len as GeneratedAddress)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::{build_function_lookup, get_wasm_code_offset, AddressTransform};
+    use crate::read_debuginfo::WasmFileInfo;
+    use gimli::write::Address;
+    use std::iter::FromIterator;
+    use wasmtime_environ::entity::PrimaryMap;
+    use wasmtime_environ::ir::SourceLoc;
+    use wasmtime_environ::{FunctionAddressMap, InstructionAddressMap, ModuleAddressMap};
+
+    #[test]
+    fn test_get_wasm_code_offset() {
+        let offset = get_wasm_code_offset(SourceLoc::new(3), 1);
+        assert_eq!(2, offset);
+        let offset = get_wasm_code_offset(SourceLoc::new(16), 0xF000_0000);
+        assert_eq!(0x1000_0010, offset);
+        let offset = get_wasm_code_offset(SourceLoc::new(1), 0x20_8000_0000);
+        assert_eq!(0x8000_0001, offset);
+    }
+
+    fn create_simple_func(wasm_offset: u32) -> FunctionAddressMap {
+        FunctionAddressMap {
+            instructions: vec![
+                InstructionAddressMap {
+                    srcloc: SourceLoc::new(wasm_offset + 2),
+                    code_offset: 5,
+                    code_len: 3,
+                },
+                InstructionAddressMap {
+                    srcloc: SourceLoc::new(wasm_offset + 7),
+                    code_offset: 15,
+                    code_len: 8,
+                },
+            ],
+            start_srcloc: SourceLoc::new(wasm_offset),
+            end_srcloc: SourceLoc::new(wasm_offset + 10),
+            body_offset: 0,
+            body_len: 30,
+        }
+    }
+
+    fn create_simple_module(func: FunctionAddressMap) -> ModuleAddressMap {
+        PrimaryMap::from_iter(vec![func])
+    }
+
+    #[test]
+    fn test_build_function_lookup_simple() {
+        let input = create_simple_func(11);
+        let (start, end, lookup) = build_function_lookup(&input, 1);
+        assert_eq!(10, start);
+        assert_eq!(20, end);
+
+        assert_eq!(1, lookup.index.len());
+        let index_entry = lookup.index.into_iter().next().unwrap();
+        assert_eq!((10u64, vec![0].into_boxed_slice()), index_entry);
+        assert_eq!(1, lookup.ranges.len());
+        let range = &lookup.ranges[0];
+        assert_eq!(10, range.wasm_start);
+        assert_eq!(20, range.wasm_end);
+        assert_eq!(0, range.gen_start);
+        assert_eq!(30, range.gen_end);
+        let positions = &range.positions;
+        assert_eq!(2, positions.len());
+        assert_eq!(12, positions[0].wasm_pos);
+        assert_eq!(5, positions[0].gen_start);
+        assert_eq!(8, positions[0].gen_end);
+        assert_eq!(17, positions[1].wasm_pos);
+        assert_eq!(15, positions[1].gen_start);
+        assert_eq!(23, positions[1].gen_end);
+    }
+
+    #[test]
+    fn test_build_function_lookup_two_ranges() {
+        let mut input = create_simple_func(11);
+        // append instruction with same srcloc as input.instructions[0]
+        input.instructions.push(InstructionAddressMap {
+            srcloc: SourceLoc::new(11 + 2),
+            code_offset: 23,
+            code_len: 3,
+        });
+        let (start, end, lookup) = build_function_lookup(&input, 1);
+        assert_eq!(10, start);
+        assert_eq!(20, end);
+
+        assert_eq!(2, lookup.index.len());
+        let index_entries = Vec::from_iter(lookup.index.into_iter());
+        assert_eq!((10u64, vec![0].into_boxed_slice()), index_entries[0]);
+        assert_eq!((12u64, vec![0, 1].into_boxed_slice()), index_entries[1]);
+        assert_eq!(2, lookup.ranges.len());
+
+        let range = &lookup.ranges[0];
+        assert_eq!(10, range.wasm_start);
+        assert_eq!(17, range.wasm_end);
+        assert_eq!(0, range.gen_start);
+        assert_eq!(23, range.gen_end);
+        let positions = &range.positions;
+        assert_eq!(2, positions.len());
+        assert_eq!(12, positions[0].wasm_pos);
+        assert_eq!(5, positions[0].gen_start);
+        assert_eq!(8, positions[0].gen_end);
+        assert_eq!(17, positions[1].wasm_pos);
+        assert_eq!(15, positions[1].gen_start);
+        assert_eq!(23, positions[1].gen_end);
+
+        let range = &lookup.ranges[1];
+        assert_eq!(12, range.wasm_start);
+        assert_eq!(20, range.wasm_end);
+        assert_eq!(23, range.gen_start);
+        assert_eq!(30, range.gen_end);
+        let positions = &range.positions;
+        assert_eq!(1, positions.len());
+        assert_eq!(12, positions[0].wasm_pos);
+        assert_eq!(23, positions[0].gen_start);
+        assert_eq!(26, positions[0].gen_end);
+    }
+
+    #[test]
+    fn test_addr_translate() {
+        let input = create_simple_module(create_simple_func(11));
+        let at = AddressTransform::new(
+            &input,
+            &WasmFileInfo {
+                path: None,
+                code_section_offset: 1,
+                funcs: Box::new([]),
+            },
+        );
+
+        let addr = at.translate(10);
+        assert_eq!(
+            Some(Address::Symbol {
+                symbol: 0,
+                addend: 0,
+            }),
+            addr
+        );
+
+        let addr = at.translate(20);
+        assert_eq!(
+            Some(Address::Symbol {
+                symbol: 0,
+                addend: 30,
+            }),
+            addr
+        );
+
+        let addr = at.translate(0);
+        assert_eq!(None, addr);
+
+        let addr = at.translate(12);
+        assert_eq!(
+            Some(Address::Symbol {
+                symbol: 0,
+                addend: 5,
+            }),
+            addr
+        );
+
+        let addr = at.translate(18);
+        assert_eq!(
+            Some(Address::Symbol {
+                symbol: 0,
+                addend: 23,
+            }),
+            addr
+        );
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/transform/attr.rs.html b/api/src/wasmtime_debug/transform/attr.rs.html new file mode 100644 index 000000000000..08370fda9421 --- /dev/null +++ b/api/src/wasmtime_debug/transform/attr.rs.html @@ -0,0 +1,569 @@ +attr.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+
+use super::address_transform::AddressTransform;
+use super::expression::{compile_expression, CompiledExpression, FunctionFrameInfo};
+use super::range_info_builder::RangeInfoBuilder;
+use super::refs::{PendingDebugInfoRefs, PendingUnitRefs};
+use super::{DebugInputContext, Reader, TransformError};
+use anyhow::Error;
+use gimli::{write, AttributeValue, DebugLineOffset, DebugStr, DebuggingInformationEntry};
+
+pub(crate) enum FileAttributeContext<'a> {
+    Root(Option<DebugLineOffset>),
+    Children(&'a Vec<write::FileId>, Option<&'a CompiledExpression>),
+}
+
+fn is_exprloc_to_loclist_allowed(attr_name: gimli::constants::DwAt) -> bool {
+    match attr_name {
+        gimli::DW_AT_location
+        | gimli::DW_AT_string_length
+        | gimli::DW_AT_return_addr
+        | gimli::DW_AT_data_member_location
+        | gimli::DW_AT_frame_base
+        | gimli::DW_AT_segment
+        | gimli::DW_AT_static_link
+        | gimli::DW_AT_use_location
+        | gimli::DW_AT_vtable_elem_location => true,
+        _ => false,
+    }
+}
+
+pub(crate) fn clone_die_attributes<'a, R>(
+    entry: &DebuggingInformationEntry<R>,
+    context: &DebugInputContext<R>,
+    addr_tr: &'a AddressTransform,
+    frame_info: Option<&FunctionFrameInfo>,
+    unit_encoding: gimli::Encoding,
+    out_unit: &mut write::Unit,
+    current_scope_id: write::UnitEntryId,
+    subprogram_range_builder: Option<RangeInfoBuilder>,
+    scope_ranges: Option<&Vec<(u64, u64)>>,
+    cu_low_pc: u64,
+    out_strings: &mut write::StringTable,
+    pending_die_refs: &mut PendingUnitRefs,
+    pending_di_refs: &mut PendingDebugInfoRefs,
+    file_context: FileAttributeContext<'a>,
+) -> Result<(), Error>
+where
+    R: Reader,
+{
+    let _tag = &entry.tag();
+    let endian = gimli::RunTimeEndian::Little;
+
+    let range_info = if let Some(subprogram_range_builder) = subprogram_range_builder {
+        subprogram_range_builder
+    } else if entry.tag() == gimli::DW_TAG_compile_unit {
+        // FIXME currently address_transform operate on a single func range,
+        // once it is fixed we can properly set DW_AT_ranges attribute.
+        // Using for now DW_AT_low_pc = 0.
+        RangeInfoBuilder::Position(0)
+    } else {
+        RangeInfoBuilder::from(entry, context, unit_encoding, cu_low_pc)?
+    };
+    range_info.build(addr_tr, out_unit, current_scope_id);
+
+    let mut attrs = entry.attrs();
+    while let Some(attr) = attrs.next()? {
+        let attr_value = match attr.value() {
+            AttributeValue::Addr(_) if attr.name() == gimli::DW_AT_low_pc => {
+                continue;
+            }
+            AttributeValue::Udata(_) if attr.name() == gimli::DW_AT_high_pc => {
+                continue;
+            }
+            AttributeValue::RangeListsRef(_) if attr.name() == gimli::DW_AT_ranges => {
+                continue;
+            }
+            AttributeValue::Exprloc(_) if attr.name() == gimli::DW_AT_frame_base => {
+                continue;
+            }
+
+            AttributeValue::Addr(u) => {
+                let addr = addr_tr.translate(u).unwrap_or(write::Address::Constant(0));
+                write::AttributeValue::Address(addr)
+            }
+            AttributeValue::Udata(u) => write::AttributeValue::Udata(u),
+            AttributeValue::Data1(d) => write::AttributeValue::Data1(d),
+            AttributeValue::Data2(d) => write::AttributeValue::Data2(d),
+            AttributeValue::Data4(d) => write::AttributeValue::Data4(d),
+            AttributeValue::Sdata(d) => write::AttributeValue::Sdata(d),
+            AttributeValue::Flag(f) => write::AttributeValue::Flag(f),
+            AttributeValue::DebugLineRef(line_program_offset) => {
+                if let FileAttributeContext::Root(o) = file_context {
+                    if o != Some(line_program_offset) {
+                        return Err(TransformError("invalid debug_line offset").into());
+                    }
+                    write::AttributeValue::LineProgramRef
+                } else {
+                    return Err(TransformError("unexpected debug_line index attribute").into());
+                }
+            }
+            AttributeValue::FileIndex(i) => {
+                if let FileAttributeContext::Children(file_map, _) = file_context {
+                    write::AttributeValue::FileIndex(Some(file_map[(i - 1) as usize]))
+                } else {
+                    return Err(TransformError("unexpected file index attribute").into());
+                }
+            }
+            AttributeValue::DebugStrRef(str_offset) => {
+                let s = context.debug_str.get_str(str_offset)?.to_slice()?.to_vec();
+                write::AttributeValue::StringRef(out_strings.add(s))
+            }
+            AttributeValue::RangeListsRef(r) => {
+                let range_info =
+                    RangeInfoBuilder::from_ranges_ref(r, context, unit_encoding, cu_low_pc)?;
+                let range_list_id = range_info.build_ranges(addr_tr, &mut out_unit.ranges);
+                write::AttributeValue::RangeListRef(range_list_id)
+            }
+            AttributeValue::LocationListsRef(r) => {
+                let low_pc = 0;
+                let mut locs = context.loclists.locations(
+                    r,
+                    unit_encoding,
+                    low_pc,
+                    &context.debug_addr,
+                    context.debug_addr_base,
+                )?;
+                let frame_base = if let FileAttributeContext::Children(_, frame_base) = file_context
+                {
+                    frame_base
+                } else {
+                    None
+                };
+                let mut result = None;
+                while let Some(loc) = locs.next()? {
+                    if let Some(expr) = compile_expression(&loc.data, unit_encoding, frame_base)? {
+                        if result.is_none() {
+                            result = Some(Vec::new());
+                        }
+                        for (start, len, expr) in expr.build_with_locals(
+                            &[(loc.range.begin, loc.range.end)],
+                            addr_tr,
+                            frame_info,
+                            endian,
+                        ) {
+                            if len == 0 {
+                                // Ignore empty range
+                                continue;
+                            }
+                            result.as_mut().unwrap().push(write::Location::StartLength {
+                                begin: start,
+                                length: len,
+                                data: expr,
+                            });
+                        }
+                    } else {
+                        // FIXME _expr contains invalid expression
+                        continue; // ignore entry
+                    }
+                }
+                if result.is_none() {
+                    continue; // no valid locations
+                }
+                let list_id = out_unit.locations.add(write::LocationList(result.unwrap()));
+                write::AttributeValue::LocationListRef(list_id)
+            }
+            AttributeValue::Exprloc(ref expr) => {
+                let frame_base = if let FileAttributeContext::Children(_, frame_base) = file_context
+                {
+                    frame_base
+                } else {
+                    None
+                };
+                if let Some(expr) = compile_expression(expr, unit_encoding, frame_base)? {
+                    if expr.is_simple() {
+                        if let Some(expr) = expr.build() {
+                            write::AttributeValue::Exprloc(expr)
+                        } else {
+                            continue;
+                        }
+                    } else {
+                        // Conversion to loclist is required.
+                        if let Some(scope_ranges) = scope_ranges {
+                            let exprs =
+                                expr.build_with_locals(scope_ranges, addr_tr, frame_info, endian);
+                            if exprs.is_empty() {
+                                continue;
+                            }
+                            let found_single_expr = {
+                                // Micro-optimization all expressions alike, use one exprloc.
+                                let mut found_expr: Option<write::Expression> = None;
+                                for (_, _, expr) in &exprs {
+                                    if let Some(ref prev_expr) = found_expr {
+                                        if expr.0.eq(&prev_expr.0) {
+                                            continue; // the same expression
+                                        }
+                                        found_expr = None;
+                                        break;
+                                    }
+                                    found_expr = Some(expr.clone())
+                                }
+                                found_expr
+                            };
+                            if let Some(expr) = found_single_expr {
+                                write::AttributeValue::Exprloc(expr)
+                            } else if is_exprloc_to_loclist_allowed(attr.name()) {
+                                // Converting exprloc to loclist.
+                                let mut locs = Vec::new();
+                                for (begin, length, data) in exprs {
+                                    if length == 0 {
+                                        // Ignore empty range
+                                        continue;
+                                    }
+                                    locs.push(write::Location::StartLength {
+                                        begin,
+                                        length,
+                                        data,
+                                    });
+                                }
+                                let list_id = out_unit.locations.add(write::LocationList(locs));
+                                write::AttributeValue::LocationListRef(list_id)
+                            } else {
+                                continue;
+                            }
+                        } else {
+                            continue;
+                        }
+                    }
+                } else {
+                    // FIXME _expr contains invalid expression
+                    continue; // ignore attribute
+                }
+            }
+            AttributeValue::Encoding(e) => write::AttributeValue::Encoding(e),
+            AttributeValue::DecimalSign(e) => write::AttributeValue::DecimalSign(e),
+            AttributeValue::Endianity(e) => write::AttributeValue::Endianity(e),
+            AttributeValue::Accessibility(e) => write::AttributeValue::Accessibility(e),
+            AttributeValue::Visibility(e) => write::AttributeValue::Visibility(e),
+            AttributeValue::Virtuality(e) => write::AttributeValue::Virtuality(e),
+            AttributeValue::Language(e) => write::AttributeValue::Language(e),
+            AttributeValue::AddressClass(e) => write::AttributeValue::AddressClass(e),
+            AttributeValue::IdentifierCase(e) => write::AttributeValue::IdentifierCase(e),
+            AttributeValue::CallingConvention(e) => write::AttributeValue::CallingConvention(e),
+            AttributeValue::Inline(e) => write::AttributeValue::Inline(e),
+            AttributeValue::Ordering(e) => write::AttributeValue::Ordering(e),
+            AttributeValue::UnitRef(offset) => {
+                pending_die_refs.insert(current_scope_id, attr.name(), offset);
+                continue;
+            }
+            AttributeValue::DebugInfoRef(offset) => {
+                pending_di_refs.insert(current_scope_id, attr.name(), offset);
+                continue;
+            }
+            _ => panic!(), //write::AttributeValue::StringRef(out_strings.add("_")),
+        };
+        let current_scope = out_unit.get_mut(current_scope_id);
+        current_scope.set(attr.name(), attr_value);
+    }
+    Ok(())
+}
+
+pub(crate) fn clone_attr_string<R>(
+    attr_value: &AttributeValue<R>,
+    form: gimli::DwForm,
+    debug_str: &DebugStr<R>,
+    out_strings: &mut write::StringTable,
+) -> Result<write::LineString, gimli::Error>
+where
+    R: Reader,
+{
+    let content = match attr_value {
+        AttributeValue::DebugStrRef(str_offset) => {
+            debug_str.get_str(*str_offset)?.to_slice()?.to_vec()
+        }
+        AttributeValue::String(b) => b.to_slice()?.to_vec(),
+        _ => panic!("Unexpected attribute value"),
+    };
+    Ok(match form {
+        gimli::DW_FORM_strp => {
+            let id = out_strings.add(content);
+            write::LineString::StringRef(id)
+        }
+        gimli::DW_FORM_string => write::LineString::String(content),
+        _ => panic!("DW_FORM_line_strp or other not supported"),
+    })
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/transform/expression.rs.html b/api/src/wasmtime_debug/transform/expression.rs.html new file mode 100644 index 000000000000..3c4274e90c7d --- /dev/null +++ b/api/src/wasmtime_debug/transform/expression.rs.html @@ -0,0 +1,1131 @@ +expression.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+
+use super::address_transform::AddressTransform;
+use anyhow::Error;
+use gimli::{self, write, Expression, Operation, Reader, ReaderOffset, Register, X86_64};
+use more_asserts::{assert_le, assert_lt};
+use std::collections::{HashMap, HashSet};
+use wasmtime_environ::entity::EntityRef;
+use wasmtime_environ::ir::{StackSlots, ValueLabel, ValueLabelsRanges, ValueLoc};
+use wasmtime_environ::isa::RegUnit;
+use wasmtime_environ::wasm::{get_vmctx_value_label, DefinedFuncIndex};
+use wasmtime_environ::ModuleMemoryOffset;
+
+#[derive(Debug)]
+pub struct FunctionFrameInfo<'a> {
+    pub value_ranges: &'a ValueLabelsRanges,
+    pub memory_offset: ModuleMemoryOffset,
+    pub stack_slots: &'a StackSlots,
+}
+
+impl<'a> FunctionFrameInfo<'a> {
+    fn vmctx_memory_offset(&self) -> Option<i64> {
+        match self.memory_offset {
+            ModuleMemoryOffset::Defined(x) => Some(x as i64),
+            ModuleMemoryOffset::Imported(_) => {
+                // TODO implement memory offset for imported memory
+                None
+            }
+            ModuleMemoryOffset::None => None,
+        }
+    }
+}
+
+#[derive(Debug)]
+enum CompiledExpressionPart {
+    Code(Vec<u8>),
+    Local(ValueLabel),
+    Deref,
+}
+
+#[derive(Debug)]
+pub struct CompiledExpression {
+    parts: Vec<CompiledExpressionPart>,
+    need_deref: bool,
+}
+
+impl Clone for CompiledExpressionPart {
+    fn clone(&self) -> Self {
+        match self {
+            CompiledExpressionPart::Code(c) => CompiledExpressionPart::Code(c.clone()),
+            CompiledExpressionPart::Local(i) => CompiledExpressionPart::Local(*i),
+            CompiledExpressionPart::Deref => CompiledExpressionPart::Deref,
+        }
+    }
+}
+
+impl CompiledExpression {
+    pub fn vmctx() -> CompiledExpression {
+        CompiledExpression::from_label(get_vmctx_value_label())
+    }
+
+    pub fn from_label(label: ValueLabel) -> CompiledExpression {
+        CompiledExpression {
+            parts: vec![
+                CompiledExpressionPart::Local(label),
+                CompiledExpressionPart::Code(vec![gimli::constants::DW_OP_stack_value.0 as u8]),
+            ],
+            need_deref: false,
+        }
+    }
+}
+
+fn map_reg(reg: RegUnit) -> Register {
+    static mut REG_X86_MAP: Option<HashMap<RegUnit, Register>> = None;
+    // FIXME lazy initialization?
+    unsafe {
+        if REG_X86_MAP.is_none() {
+            REG_X86_MAP = Some(HashMap::new());
+        }
+        if let Some(val) = REG_X86_MAP.as_mut().unwrap().get(&reg) {
+            return *val;
+        }
+        let result = match reg {
+            0 => X86_64::RAX,
+            1 => X86_64::RCX,
+            2 => X86_64::RDX,
+            3 => X86_64::RBX,
+            4 => X86_64::RSP,
+            5 => X86_64::RBP,
+            6 => X86_64::RSI,
+            7 => X86_64::RDI,
+            8 => X86_64::R8,
+            9 => X86_64::R9,
+            10 => X86_64::R10,
+            11 => X86_64::R11,
+            12 => X86_64::R12,
+            13 => X86_64::R13,
+            14 => X86_64::R14,
+            15 => X86_64::R15,
+            16 => X86_64::XMM0,
+            17 => X86_64::XMM1,
+            18 => X86_64::XMM2,
+            19 => X86_64::XMM3,
+            20 => X86_64::XMM4,
+            21 => X86_64::XMM5,
+            22 => X86_64::XMM6,
+            23 => X86_64::XMM7,
+            24 => X86_64::XMM8,
+            25 => X86_64::XMM9,
+            26 => X86_64::XMM10,
+            27 => X86_64::XMM11,
+            28 => X86_64::XMM12,
+            29 => X86_64::XMM13,
+            30 => X86_64::XMM14,
+            31 => X86_64::XMM15,
+            _ => panic!("unknown x86_64 register {}", reg),
+        };
+        REG_X86_MAP.as_mut().unwrap().insert(reg, result);
+        result
+    }
+}
+
+fn translate_loc(loc: ValueLoc, frame_info: Option<&FunctionFrameInfo>) -> Option<Vec<u8>> {
+    use gimli::write::Writer;
+    match loc {
+        ValueLoc::Reg(reg) => {
+            let machine_reg = map_reg(reg).0 as u8;
+            Some(if machine_reg < 32 {
+                vec![gimli::constants::DW_OP_reg0.0 + machine_reg]
+            } else {
+                let endian = gimli::RunTimeEndian::Little;
+                let mut writer = write::EndianVec::new(endian);
+                writer
+                    .write_u8(gimli::constants::DW_OP_regx.0 as u8)
+                    .expect("regx");
+                writer
+                    .write_uleb128(machine_reg.into())
+                    .expect("machine_reg");
+                writer.into_vec()
+            })
+        }
+        ValueLoc::Stack(ss) => {
+            if let Some(frame_info) = frame_info {
+                if let Some(ss_offset) = frame_info.stack_slots[ss].offset {
+                    let endian = gimli::RunTimeEndian::Little;
+                    let mut writer = write::EndianVec::new(endian);
+                    writer
+                        .write_u8(gimli::constants::DW_OP_breg0.0 + X86_64::RBP.0 as u8)
+                        .expect("bp wr");
+                    writer.write_sleb128(ss_offset as i64 + 16).expect("ss wr");
+                    writer
+                        .write_u8(gimli::constants::DW_OP_deref.0 as u8)
+                        .expect("bp wr");
+                    let buf = writer.into_vec();
+                    return Some(buf);
+                }
+            }
+            None
+        }
+        _ => None,
+    }
+}
+
+fn append_memory_deref(
+    buf: &mut Vec<u8>,
+    frame_info: &FunctionFrameInfo,
+    vmctx_loc: ValueLoc,
+    endian: gimli::RunTimeEndian,
+) -> write::Result<bool> {
+    use gimli::write::Writer;
+    let mut writer = write::EndianVec::new(endian);
+    // FIXME for imported memory
+    match vmctx_loc {
+        ValueLoc::Reg(vmctx_reg) => {
+            let reg = map_reg(vmctx_reg);
+            writer.write_u8(gimli::constants::DW_OP_breg0.0 + reg.0 as u8)?;
+            let memory_offset = match frame_info.vmctx_memory_offset() {
+                Some(offset) => offset,
+                None => {
+                    return Ok(false);
+                }
+            };
+            writer.write_sleb128(memory_offset)?;
+        }
+        ValueLoc::Stack(ss) => {
+            if let Some(ss_offset) = frame_info.stack_slots[ss].offset {
+                writer.write_u8(gimli::constants::DW_OP_breg0.0 + X86_64::RBP.0 as u8)?;
+                writer.write_sleb128(ss_offset as i64 + 16)?;
+                writer.write_u8(gimli::constants::DW_OP_deref.0 as u8)?;
+                writer.write_u8(gimli::constants::DW_OP_consts.0 as u8)?;
+                let memory_offset = match frame_info.vmctx_memory_offset() {
+                    Some(offset) => offset,
+                    None => {
+                        return Ok(false);
+                    }
+                };
+                writer.write_sleb128(memory_offset)?;
+                writer.write_u8(gimli::constants::DW_OP_plus.0 as u8)?;
+            } else {
+                return Ok(false);
+            }
+        }
+        _ => {
+            return Ok(false);
+        }
+    }
+    writer.write_u8(gimli::constants::DW_OP_deref.0 as u8)?;
+    writer.write_u8(gimli::constants::DW_OP_swap.0 as u8)?;
+    writer.write_u8(gimli::constants::DW_OP_stack_value.0 as u8)?;
+    writer.write_u8(gimli::constants::DW_OP_constu.0 as u8)?;
+    writer.write_uleb128(0xffff_ffff)?;
+    writer.write_u8(gimli::constants::DW_OP_and.0 as u8)?;
+    writer.write_u8(gimli::constants::DW_OP_plus.0 as u8)?;
+    buf.extend_from_slice(writer.slice());
+    Ok(true)
+}
+
+impl CompiledExpression {
+    pub fn is_simple(&self) -> bool {
+        if let [CompiledExpressionPart::Code(_)] = self.parts.as_slice() {
+            true
+        } else {
+            self.parts.is_empty()
+        }
+    }
+
+    pub fn build(&self) -> Option<write::Expression> {
+        if let [CompiledExpressionPart::Code(code)] = self.parts.as_slice() {
+            return Some(write::Expression(code.to_vec()));
+        }
+        // locals found, not supported
+        None
+    }
+
+    pub fn build_with_locals(
+        &self,
+        scope: &[(u64, u64)], // wasm ranges
+        addr_tr: &AddressTransform,
+        frame_info: Option<&FunctionFrameInfo>,
+        endian: gimli::RunTimeEndian,
+    ) -> Vec<(write::Address, u64, write::Expression)> {
+        if scope.is_empty() {
+            return vec![];
+        }
+
+        if let [CompiledExpressionPart::Code(code)] = self.parts.as_slice() {
+            let mut result_scope = Vec::new();
+            for s in scope {
+                for (addr, len) in addr_tr.translate_ranges(s.0, s.1) {
+                    result_scope.push((addr, len, write::Expression(code.to_vec())));
+                }
+            }
+            return result_scope;
+        }
+
+        let vmctx_label = get_vmctx_value_label();
+
+        // Some locals are present, preparing and divided ranges based on the scope
+        // and frame_info data.
+        let mut ranges_builder = ValueLabelRangesBuilder::new(scope, addr_tr, frame_info);
+        for p in &self.parts {
+            match p {
+                CompiledExpressionPart::Code(_) => (),
+                CompiledExpressionPart::Local(label) => ranges_builder.process_label(*label),
+                CompiledExpressionPart::Deref => ranges_builder.process_label(vmctx_label),
+            }
+        }
+        if self.need_deref {
+            ranges_builder.process_label(vmctx_label);
+        }
+        ranges_builder.remove_incomplete_ranges();
+        let ranges = ranges_builder.ranges;
+
+        let mut result = Vec::new();
+        'range: for CachedValueLabelRange {
+            func_index,
+            start,
+            end,
+            label_location,
+        } in ranges
+        {
+            // build expression
+            let mut code_buf = Vec::new();
+            for part in &self.parts {
+                match part {
+                    CompiledExpressionPart::Code(c) => code_buf.extend_from_slice(c.as_slice()),
+                    CompiledExpressionPart::Local(label) => {
+                        let loc = *label_location.get(&label).expect("loc");
+                        if let Some(expr) = translate_loc(loc, frame_info) {
+                            code_buf.extend_from_slice(&expr)
+                        } else {
+                            continue 'range;
+                        }
+                    }
+                    CompiledExpressionPart::Deref => {
+                        if let (Some(vmctx_loc), Some(frame_info)) =
+                            (label_location.get(&vmctx_label), frame_info)
+                        {
+                            if !append_memory_deref(&mut code_buf, frame_info, *vmctx_loc, endian)
+                                .expect("append_memory_deref")
+                            {
+                                continue 'range;
+                            }
+                        } else {
+                            continue 'range;
+                        };
+                    }
+                }
+            }
+            if self.need_deref {
+                if let (Some(vmctx_loc), Some(frame_info)) =
+                    (label_location.get(&vmctx_label), frame_info)
+                {
+                    if !append_memory_deref(&mut code_buf, frame_info, *vmctx_loc, endian)
+                        .expect("append_memory_deref")
+                    {
+                        continue 'range;
+                    }
+                } else {
+                    continue 'range;
+                };
+            }
+            result.push((
+                write::Address::Symbol {
+                    symbol: func_index.index(),
+                    addend: start as i64,
+                },
+                (end - start) as u64,
+                write::Expression(code_buf),
+            ));
+        }
+
+        result
+    }
+}
+
+fn is_old_expression_format(buf: &[u8]) -> bool {
+    // Heuristic to detect old variable expression format without DW_OP_fbreg:
+    // DW_OP_plus_uconst op must be present, but not DW_OP_fbreg.
+    if buf.contains(&(gimli::constants::DW_OP_fbreg.0 as u8)) {
+        // Stop check if DW_OP_fbreg exist.
+        return false;
+    }
+    buf.contains(&(gimli::constants::DW_OP_plus_uconst.0 as u8))
+}
+
+pub fn compile_expression<R>(
+    expr: &Expression<R>,
+    encoding: gimli::Encoding,
+    frame_base: Option<&CompiledExpression>,
+) -> Result<Option<CompiledExpression>, Error>
+where
+    R: Reader,
+{
+    let mut pc = expr.0.clone();
+    let buf = expr.0.to_slice()?;
+    let mut parts = Vec::new();
+    let mut need_deref = false;
+    if is_old_expression_format(&buf) && frame_base.is_some() {
+        // Still supporting old DWARF variable expressions without fbreg.
+        parts.extend_from_slice(&frame_base.unwrap().parts);
+        need_deref = frame_base.unwrap().need_deref;
+    }
+    let base_len = parts.len();
+    let mut code_chunk = Vec::new();
+    while !pc.is_empty() {
+        let next = buf[pc.offset_from(&expr.0).into_u64() as usize];
+        need_deref = true;
+        if next == 0xED {
+            // WebAssembly DWARF extension
+            pc.read_u8()?;
+            let ty = pc.read_uleb128()?;
+            assert_eq!(ty, 0);
+            let index = pc.read_sleb128()?;
+            pc.read_u8()?; // consume 159
+            if !code_chunk.is_empty() {
+                parts.push(CompiledExpressionPart::Code(code_chunk));
+                code_chunk = Vec::new();
+            }
+            let label = ValueLabel::from_u32(index as u32);
+            parts.push(CompiledExpressionPart::Local(label));
+        } else {
+            let pos = pc.offset_from(&expr.0).into_u64() as usize;
+            let op = Operation::parse(&mut pc, &expr.0, encoding)?;
+            match op {
+                Operation::FrameOffset { offset } => {
+                    // Expand DW_OP_fpreg into frame location and DW_OP_plus_uconst.
+                    use gimli::write::Writer;
+                    if frame_base.is_some() {
+                        // Add frame base expressions.
+                        if !code_chunk.is_empty() {
+                            parts.push(CompiledExpressionPart::Code(code_chunk));
+                            code_chunk = Vec::new();
+                        }
+                        parts.extend_from_slice(&frame_base.unwrap().parts);
+                        need_deref = frame_base.unwrap().need_deref;
+                    }
+                    // Append DW_OP_plus_uconst part.
+                    let endian = gimli::RunTimeEndian::Little;
+                    let mut writer = write::EndianVec::new(endian);
+                    writer.write_u8(gimli::constants::DW_OP_plus_uconst.0 as u8)?;
+                    writer.write_uleb128(offset as u64)?;
+                    code_chunk.extend(writer.into_vec());
+                    continue;
+                }
+                Operation::Literal { .. } | Operation::PlusConstant { .. } => (),
+                Operation::StackValue => {
+                    need_deref = false;
+                }
+                Operation::Deref { .. } => {
+                    if !code_chunk.is_empty() {
+                        parts.push(CompiledExpressionPart::Code(code_chunk));
+                        code_chunk = Vec::new();
+                    }
+                    parts.push(CompiledExpressionPart::Deref);
+                }
+                _ => {
+                    return Ok(None);
+                }
+            }
+            let chunk = &buf[pos..pc.offset_from(&expr.0).into_u64() as usize];
+            code_chunk.extend_from_slice(chunk);
+        }
+    }
+
+    if !code_chunk.is_empty() {
+        parts.push(CompiledExpressionPart::Code(code_chunk));
+    }
+
+    if base_len > 0 && base_len + 1 < parts.len() {
+        // see if we can glue two code chunks
+        if let [CompiledExpressionPart::Code(cc1), CompiledExpressionPart::Code(cc2)] =
+            &parts[base_len..=base_len]
+        {
+            let mut combined = cc1.clone();
+            combined.extend_from_slice(cc2);
+            parts[base_len] = CompiledExpressionPart::Code(combined);
+            parts.remove(base_len + 1);
+        }
+    }
+
+    Ok(Some(CompiledExpression { parts, need_deref }))
+}
+
+#[derive(Debug, Clone)]
+struct CachedValueLabelRange {
+    func_index: DefinedFuncIndex,
+    start: usize,
+    end: usize,
+    label_location: HashMap<ValueLabel, ValueLoc>,
+}
+
+struct ValueLabelRangesBuilder<'a, 'b> {
+    ranges: Vec<CachedValueLabelRange>,
+    addr_tr: &'a AddressTransform,
+    frame_info: Option<&'a FunctionFrameInfo<'b>>,
+    processed_labels: HashSet<ValueLabel>,
+}
+
+impl<'a, 'b> ValueLabelRangesBuilder<'a, 'b> {
+    fn new(
+        scope: &[(u64, u64)], // wasm ranges
+        addr_tr: &'a AddressTransform,
+        frame_info: Option<&'a FunctionFrameInfo<'b>>,
+    ) -> Self {
+        let mut ranges = Vec::new();
+        for s in scope {
+            if let Some((func_index, tr)) = addr_tr.translate_ranges_raw(s.0, s.1) {
+                for (start, end) in tr {
+                    ranges.push(CachedValueLabelRange {
+                        func_index,
+                        start,
+                        end,
+                        label_location: HashMap::new(),
+                    })
+                }
+            }
+        }
+        ranges.sort_unstable_by(|a, b| a.start.cmp(&b.start));
+        ValueLabelRangesBuilder {
+            ranges,
+            addr_tr,
+            frame_info,
+            processed_labels: HashSet::new(),
+        }
+    }
+
+    fn process_label(&mut self, label: ValueLabel) {
+        if self.processed_labels.contains(&label) {
+            return;
+        }
+        self.processed_labels.insert(label);
+
+        let value_ranges = if let Some(frame_info) = self.frame_info {
+            &frame_info.value_ranges
+        } else {
+            return;
+        };
+
+        let ranges = &mut self.ranges;
+        if let Some(local_ranges) = value_ranges.get(&label) {
+            for local_range in local_ranges {
+                let wasm_start = local_range.start;
+                let wasm_end = local_range.end;
+                let loc = local_range.loc;
+                // Find all native ranges for the value label ranges.
+                for (addr, len) in self
+                    .addr_tr
+                    .translate_ranges(wasm_start as u64, wasm_end as u64)
+                {
+                    let (range_start, range_end) = self.addr_tr.convert_to_code_range(addr, len);
+                    if range_start == range_end {
+                        continue;
+                    }
+                    assert_lt!(range_start, range_end);
+                    // Find acceptable scope of ranges to intersect with.
+                    let i = match ranges.binary_search_by(|s| s.start.cmp(&range_start)) {
+                        Ok(i) => i,
+                        Err(i) => {
+                            if i > 0 && range_start < ranges[i - 1].end {
+                                i - 1
+                            } else {
+                                i
+                            }
+                        }
+                    };
+                    let j = match ranges.binary_search_by(|s| s.start.cmp(&range_end)) {
+                        Ok(i) | Err(i) => i,
+                    };
+                    // Starting for the end, intersect (range_start..range_end) with
+                    // self.ranges array.
+                    for i in (i..j).rev() {
+                        if range_end <= ranges[i].start || ranges[i].end <= range_start {
+                            continue;
+                        }
+                        if range_end < ranges[i].end {
+                            // Cutting some of the range from the end.
+                            let mut tail = ranges[i].clone();
+                            ranges[i].end = range_end;
+                            tail.start = range_end;
+                            ranges.insert(i + 1, tail);
+                        }
+                        assert_le!(ranges[i].end, range_end);
+                        if range_start <= ranges[i].start {
+                            ranges[i].label_location.insert(label, loc);
+                            continue;
+                        }
+                        // Cutting some of the range from the start.
+                        let mut tail = ranges[i].clone();
+                        ranges[i].end = range_start;
+                        tail.start = range_start;
+                        tail.label_location.insert(label, loc);
+                        ranges.insert(i + 1, tail);
+                    }
+                }
+            }
+        }
+    }
+
+    fn remove_incomplete_ranges(&mut self) {
+        // Ranges with not-enough labels are discarded.
+        let processed_labels_len = self.processed_labels.len();
+        self.ranges
+            .retain(|r| r.label_location.len() == processed_labels_len);
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/transform/line_program.rs.html b/api/src/wasmtime_debug/transform/line_program.rs.html new file mode 100644 index 000000000000..309f6f4fdb1b --- /dev/null +++ b/api/src/wasmtime_debug/transform/line_program.rs.html @@ -0,0 +1,463 @@ +line_program.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+
+use super::address_transform::AddressTransform;
+use super::attr::clone_attr_string;
+use super::{Reader, TransformError};
+use anyhow::Error;
+use gimli::{
+    write, DebugLine, DebugLineOffset, DebugStr, DebuggingInformationEntry, LineEncoding, Unit,
+};
+use more_asserts::assert_le;
+use std::collections::BTreeMap;
+use std::iter::FromIterator;
+use wasmtime_environ::entity::EntityRef;
+
+#[derive(Debug)]
+enum SavedLineProgramRow {
+    Normal {
+        address: u64,
+        op_index: u64,
+        file_index: u64,
+        line: u64,
+        column: u64,
+        discriminator: u64,
+        is_stmt: bool,
+        basic_block: bool,
+        prologue_end: bool,
+        epilogue_begin: bool,
+        isa: u64,
+    },
+    EndOfSequence(u64),
+}
+
+#[derive(Debug, Eq, PartialEq)]
+enum ReadLineProgramState {
+    SequenceEnded,
+    ReadSequence,
+    IgnoreSequence,
+}
+
+pub(crate) fn clone_line_program<R>(
+    unit: &Unit<R, R::Offset>,
+    root: &DebuggingInformationEntry<R>,
+    addr_tr: &AddressTransform,
+    out_encoding: gimli::Encoding,
+    debug_str: &DebugStr<R>,
+    debug_line: &DebugLine<R>,
+    out_strings: &mut write::StringTable,
+) -> Result<(write::LineProgram, DebugLineOffset, Vec<write::FileId>), Error>
+where
+    R: Reader,
+{
+    let offset = match root.attr_value(gimli::DW_AT_stmt_list)? {
+        Some(gimli::AttributeValue::DebugLineRef(offset)) => offset,
+        _ => {
+            return Err(TransformError("Debug line offset is not found").into());
+        }
+    };
+    let comp_dir = root.attr_value(gimli::DW_AT_comp_dir)?;
+    let comp_name = root.attr_value(gimli::DW_AT_name)?;
+    let out_comp_dir = clone_attr_string(
+        comp_dir.as_ref().expect("comp_dir"),
+        gimli::DW_FORM_strp,
+        debug_str,
+        out_strings,
+    )?;
+    let out_comp_name = clone_attr_string(
+        comp_name.as_ref().expect("comp_name"),
+        gimli::DW_FORM_strp,
+        debug_str,
+        out_strings,
+    )?;
+
+    let program = debug_line.program(
+        offset,
+        unit.header.address_size(),
+        comp_dir.and_then(|val| val.string_value(&debug_str)),
+        comp_name.and_then(|val| val.string_value(&debug_str)),
+    );
+    if let Ok(program) = program {
+        let header = program.header();
+        assert_le!(header.version(), 4, "not supported 5");
+        let line_encoding = LineEncoding {
+            minimum_instruction_length: header.minimum_instruction_length(),
+            maximum_operations_per_instruction: header.maximum_operations_per_instruction(),
+            default_is_stmt: header.default_is_stmt(),
+            line_base: header.line_base(),
+            line_range: header.line_range(),
+        };
+        let mut out_program = write::LineProgram::new(
+            out_encoding,
+            line_encoding,
+            out_comp_dir,
+            out_comp_name,
+            None,
+        );
+        let mut dirs = Vec::new();
+        dirs.push(out_program.default_directory());
+        for dir_attr in header.include_directories() {
+            let dir_id = out_program.add_directory(clone_attr_string(
+                dir_attr,
+                gimli::DW_FORM_string,
+                debug_str,
+                out_strings,
+            )?);
+            dirs.push(dir_id);
+        }
+        let mut files = Vec::new();
+        for file_entry in header.file_names() {
+            let dir_id = dirs[file_entry.directory_index() as usize];
+            let file_id = out_program.add_file(
+                clone_attr_string(
+                    &file_entry.path_name(),
+                    gimli::DW_FORM_string,
+                    debug_str,
+                    out_strings,
+                )?,
+                dir_id,
+                None,
+            );
+            files.push(file_id);
+        }
+
+        let mut rows = program.rows();
+        let mut saved_rows = BTreeMap::new();
+        let mut state = ReadLineProgramState::SequenceEnded;
+        while let Some((_header, row)) = rows.next_row()? {
+            if state == ReadLineProgramState::IgnoreSequence {
+                if row.end_sequence() {
+                    state = ReadLineProgramState::SequenceEnded;
+                }
+                continue;
+            }
+            let saved_row = if row.end_sequence() {
+                state = ReadLineProgramState::SequenceEnded;
+                SavedLineProgramRow::EndOfSequence(row.address())
+            } else {
+                if state == ReadLineProgramState::SequenceEnded {
+                    // Discard sequences for non-existent code.
+                    if row.address() == 0 {
+                        state = ReadLineProgramState::IgnoreSequence;
+                        continue;
+                    }
+                    state = ReadLineProgramState::ReadSequence;
+                }
+                SavedLineProgramRow::Normal {
+                    address: row.address(),
+                    op_index: row.op_index(),
+                    file_index: row.file_index(),
+                    line: row.line().unwrap_or(0),
+                    column: match row.column() {
+                        gimli::ColumnType::LeftEdge => 0,
+                        gimli::ColumnType::Column(val) => val,
+                    },
+                    discriminator: row.discriminator(),
+                    is_stmt: row.is_stmt(),
+                    basic_block: row.basic_block(),
+                    prologue_end: row.prologue_end(),
+                    epilogue_begin: row.epilogue_begin(),
+                    isa: row.isa(),
+                }
+            };
+            saved_rows.insert(row.address(), saved_row);
+        }
+
+        let saved_rows = Vec::from_iter(saved_rows.into_iter());
+        for (i, map) in addr_tr.map() {
+            if map.len == 0 {
+                continue; // no code generated
+            }
+            let symbol = i.index();
+            let base_addr = map.offset;
+            out_program.begin_sequence(Some(write::Address::Symbol { symbol, addend: 0 }));
+            // TODO track and place function declaration line here
+            let mut last_address = None;
+            for addr_map in map.addresses.iter() {
+                let saved_row = match saved_rows.binary_search_by_key(&addr_map.wasm, |i| i.0) {
+                    Ok(i) => Some(&saved_rows[i].1),
+                    Err(i) => {
+                        if i > 0 {
+                            Some(&saved_rows[i - 1].1)
+                        } else {
+                            None
+                        }
+                    }
+                };
+                if let Some(SavedLineProgramRow::Normal {
+                    address,
+                    op_index,
+                    file_index,
+                    line,
+                    column,
+                    discriminator,
+                    is_stmt,
+                    basic_block,
+                    prologue_end,
+                    epilogue_begin,
+                    isa,
+                }) = saved_row
+                {
+                    // Ignore duplicates
+                    if Some(*address) != last_address {
+                        let address_offset = if last_address.is_none() {
+                            // Extend first entry to the function declaration
+                            // TODO use the function declaration line instead
+                            0
+                        } else {
+                            (addr_map.generated - base_addr) as u64
+                        };
+                        out_program.row().address_offset = address_offset;
+                        out_program.row().op_index = *op_index;
+                        out_program.row().file = files[(file_index - 1) as usize];
+                        out_program.row().line = *line;
+                        out_program.row().column = *column;
+                        out_program.row().discriminator = *discriminator;
+                        out_program.row().is_statement = *is_stmt;
+                        out_program.row().basic_block = *basic_block;
+                        out_program.row().prologue_end = *prologue_end;
+                        out_program.row().epilogue_begin = *epilogue_begin;
+                        out_program.row().isa = *isa;
+                        out_program.generate_row();
+                        last_address = Some(*address);
+                    }
+                }
+            }
+            let end_addr = (map.offset + map.len - 1) as u64;
+            out_program.end_sequence(end_addr);
+        }
+        Ok((out_program, offset, files))
+    } else {
+        Err(TransformError("Valid line program not found").into())
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/transform/mod.rs.html b/api/src/wasmtime_debug/transform/mod.rs.html new file mode 100644 index 000000000000..51e1f3bfbc45 --- /dev/null +++ b/api/src/wasmtime_debug/transform/mod.rs.html @@ -0,0 +1,247 @@ +mod.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+
+use self::refs::DebugInfoRefsMap;
+use self::simulate::generate_simulated_dwarf;
+use self::unit::clone_unit;
+use crate::gc::build_dependencies;
+use crate::DebugInfoData;
+use anyhow::Error;
+use gimli::{
+    write, DebugAddr, DebugAddrBase, DebugLine, DebugStr, LocationLists, RangeLists,
+    UnitSectionOffset,
+};
+use std::collections::HashSet;
+use thiserror::Error;
+use wasmtime_environ::isa::TargetFrontendConfig;
+use wasmtime_environ::{ModuleAddressMap, ModuleVmctxInfo, ValueLabelsRanges};
+
+pub use address_transform::AddressTransform;
+
+mod address_transform;
+mod attr;
+mod expression;
+mod line_program;
+mod range_info_builder;
+mod refs;
+mod simulate;
+mod unit;
+mod utils;
+
+pub(crate) trait Reader: gimli::Reader<Offset = usize> {}
+
+impl<'input, Endian> Reader for gimli::EndianSlice<'input, Endian> where Endian: gimli::Endianity {}
+
+#[derive(Error, Debug)]
+#[error("Debug info transform error: {0}")]
+pub struct TransformError(&'static str);
+
+pub(crate) struct DebugInputContext<'a, R>
+where
+    R: Reader,
+{
+    debug_str: &'a DebugStr<R>,
+    debug_line: &'a DebugLine<R>,
+    debug_addr: &'a DebugAddr<R>,
+    debug_addr_base: DebugAddrBase<R::Offset>,
+    rnglists: &'a RangeLists<R>,
+    loclists: &'a LocationLists<R>,
+    reachable: &'a HashSet<UnitSectionOffset>,
+}
+
+pub fn transform_dwarf(
+    target_config: TargetFrontendConfig,
+    di: &DebugInfoData,
+    at: &ModuleAddressMap,
+    vmctx_info: &ModuleVmctxInfo,
+    ranges: &ValueLabelsRanges,
+) -> Result<write::Dwarf, Error> {
+    let addr_tr = AddressTransform::new(at, &di.wasm_file);
+    let reachable = build_dependencies(&di.dwarf, &addr_tr)?.get_reachable();
+
+    let context = DebugInputContext {
+        debug_str: &di.dwarf.debug_str,
+        debug_line: &di.dwarf.debug_line,
+        debug_addr: &di.dwarf.debug_addr,
+        debug_addr_base: DebugAddrBase(0),
+        rnglists: &di.dwarf.ranges,
+        loclists: &di.dwarf.locations,
+        reachable: &reachable,
+    };
+
+    let out_encoding = gimli::Encoding {
+        format: gimli::Format::Dwarf32,
+        // TODO: this should be configurable
+        // macOS doesn't seem to support DWARF > 3
+        version: 3,
+        address_size: target_config.pointer_bytes(),
+    };
+
+    let mut out_strings = write::StringTable::default();
+    let mut out_units = write::UnitTable::default();
+
+    let out_line_strings = write::LineStringTable::default();
+    let mut pending_di_refs = Vec::new();
+    let mut di_ref_map = DebugInfoRefsMap::new();
+
+    let mut translated = HashSet::new();
+    let mut iter = di.dwarf.debug_info.units();
+    while let Some(header) = iter.next().unwrap_or(None) {
+        let unit = di.dwarf.unit(header)?;
+        if let Some((id, ref_map, pending_refs)) = clone_unit(
+            unit,
+            &context,
+            &addr_tr,
+            &ranges,
+            out_encoding,
+            &vmctx_info,
+            &mut out_units,
+            &mut out_strings,
+            &mut translated,
+        )? {
+            di_ref_map.insert(&header, id, ref_map);
+            pending_di_refs.push((id, pending_refs));
+        }
+    }
+    di_ref_map.patch(pending_di_refs.into_iter(), &mut out_units);
+
+    generate_simulated_dwarf(
+        &addr_tr,
+        di,
+        &vmctx_info,
+        &ranges,
+        &translated,
+        out_encoding,
+        &mut out_units,
+        &mut out_strings,
+    )?;
+
+    Ok(write::Dwarf {
+        units: out_units,
+        line_programs: vec![],
+        line_strings: out_line_strings,
+        strings: out_strings,
+    })
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/transform/range_info_builder.rs.html b/api/src/wasmtime_debug/transform/range_info_builder.rs.html new file mode 100644 index 000000000000..14371aeb9a1c --- /dev/null +++ b/api/src/wasmtime_debug/transform/range_info_builder.rs.html @@ -0,0 +1,441 @@ +range_info_builder.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+
+use super::address_transform::AddressTransform;
+use super::{DebugInputContext, Reader};
+use anyhow::Error;
+use gimli::{write, AttributeValue, DebuggingInformationEntry, RangeListsOffset};
+use more_asserts::assert_lt;
+use wasmtime_environ::entity::EntityRef;
+use wasmtime_environ::wasm::DefinedFuncIndex;
+
+pub(crate) enum RangeInfoBuilder {
+    Undefined,
+    Position(u64),
+    Ranges(Vec<(u64, u64)>),
+    Function(DefinedFuncIndex),
+}
+
+impl RangeInfoBuilder {
+    pub(crate) fn from<R>(
+        entry: &DebuggingInformationEntry<R>,
+        context: &DebugInputContext<R>,
+        unit_encoding: gimli::Encoding,
+        cu_low_pc: u64,
+    ) -> Result<Self, Error>
+    where
+        R: Reader,
+    {
+        if let Some(AttributeValue::RangeListsRef(r)) = entry.attr_value(gimli::DW_AT_ranges)? {
+            return RangeInfoBuilder::from_ranges_ref(r, context, unit_encoding, cu_low_pc);
+        };
+
+        let low_pc =
+            if let Some(AttributeValue::Addr(addr)) = entry.attr_value(gimli::DW_AT_low_pc)? {
+                addr
+            } else {
+                return Ok(RangeInfoBuilder::Undefined);
+            };
+
+        Ok(
+            if let Some(AttributeValue::Udata(u)) = entry.attr_value(gimli::DW_AT_high_pc)? {
+                RangeInfoBuilder::Ranges(vec![(low_pc, low_pc + u)])
+            } else {
+                RangeInfoBuilder::Position(low_pc)
+            },
+        )
+    }
+
+    pub(crate) fn from_ranges_ref<R>(
+        ranges: RangeListsOffset,
+        context: &DebugInputContext<R>,
+        unit_encoding: gimli::Encoding,
+        cu_low_pc: u64,
+    ) -> Result<Self, Error>
+    where
+        R: Reader,
+    {
+        let mut ranges = context.rnglists.ranges(
+            ranges,
+            unit_encoding,
+            cu_low_pc,
+            &context.debug_addr,
+            context.debug_addr_base,
+        )?;
+        let mut result = Vec::new();
+        while let Some(range) = ranges.next()? {
+            if range.begin >= range.end {
+                // ignore empty ranges
+            }
+            result.push((range.begin, range.end));
+        }
+
+        Ok(if result.is_empty() {
+            RangeInfoBuilder::Undefined
+        } else {
+            RangeInfoBuilder::Ranges(result)
+        })
+    }
+
+    pub(crate) fn from_subprogram_die<R>(
+        entry: &DebuggingInformationEntry<R>,
+        context: &DebugInputContext<R>,
+        unit_encoding: gimli::Encoding,
+        addr_tr: &AddressTransform,
+        cu_low_pc: u64,
+    ) -> Result<Self, Error>
+    where
+        R: Reader,
+    {
+        let addr =
+            if let Some(AttributeValue::Addr(addr)) = entry.attr_value(gimli::DW_AT_low_pc)? {
+                addr
+            } else if let Some(AttributeValue::RangeListsRef(r)) =
+                entry.attr_value(gimli::DW_AT_ranges)?
+            {
+                let mut ranges = context.rnglists.ranges(
+                    r,
+                    unit_encoding,
+                    cu_low_pc,
+                    &context.debug_addr,
+                    context.debug_addr_base,
+                )?;
+                if let Some(range) = ranges.next()? {
+                    range.begin
+                } else {
+                    return Ok(RangeInfoBuilder::Undefined);
+                }
+            } else {
+                return Ok(RangeInfoBuilder::Undefined);
+            };
+
+        let index = addr_tr.find_func_index(addr);
+        if index.is_none() {
+            return Ok(RangeInfoBuilder::Undefined);
+        }
+        Ok(RangeInfoBuilder::Function(index.unwrap()))
+    }
+
+    pub(crate) fn build(
+        &self,
+        addr_tr: &AddressTransform,
+        out_unit: &mut write::Unit,
+        current_scope_id: write::UnitEntryId,
+    ) {
+        match self {
+            RangeInfoBuilder::Undefined => (),
+            RangeInfoBuilder::Position(pc) => {
+                let addr = addr_tr
+                    .translate(*pc)
+                    .unwrap_or(write::Address::Constant(0));
+                let current_scope = out_unit.get_mut(current_scope_id);
+                current_scope.set(gimli::DW_AT_low_pc, write::AttributeValue::Address(addr));
+            }
+            RangeInfoBuilder::Ranges(ranges) => {
+                let mut result = Vec::new();
+                for (begin, end) in ranges {
+                    for tr in addr_tr.translate_ranges(*begin, *end) {
+                        if tr.1 == 0 {
+                            // Ignore empty range
+                            continue;
+                        }
+                        result.push(tr);
+                    }
+                }
+                if result.len() != 1 {
+                    let range_list = result
+                        .iter()
+                        .map(|tr| write::Range::StartLength {
+                            begin: tr.0,
+                            length: tr.1,
+                        })
+                        .collect::<Vec<_>>();
+                    let range_list_id = out_unit.ranges.add(write::RangeList(range_list));
+                    let current_scope = out_unit.get_mut(current_scope_id);
+                    current_scope.set(
+                        gimli::DW_AT_ranges,
+                        write::AttributeValue::RangeListRef(range_list_id),
+                    );
+                } else {
+                    let current_scope = out_unit.get_mut(current_scope_id);
+                    current_scope.set(
+                        gimli::DW_AT_low_pc,
+                        write::AttributeValue::Address(result[0].0),
+                    );
+                    current_scope.set(
+                        gimli::DW_AT_high_pc,
+                        write::AttributeValue::Udata(result[0].1),
+                    );
+                }
+            }
+            RangeInfoBuilder::Function(index) => {
+                let range = addr_tr.func_range(*index);
+                let symbol = index.index();
+                let addr = write::Address::Symbol {
+                    symbol,
+                    addend: range.0 as i64,
+                };
+                let len = (range.1 - range.0) as u64;
+                let current_scope = out_unit.get_mut(current_scope_id);
+                current_scope.set(gimli::DW_AT_low_pc, write::AttributeValue::Address(addr));
+                current_scope.set(gimli::DW_AT_high_pc, write::AttributeValue::Udata(len));
+            }
+        }
+    }
+
+    pub(crate) fn get_ranges(&self, addr_tr: &AddressTransform) -> Vec<(u64, u64)> {
+        match self {
+            RangeInfoBuilder::Undefined | RangeInfoBuilder::Position(_) => vec![],
+            RangeInfoBuilder::Ranges(ranges) => ranges.clone(),
+            RangeInfoBuilder::Function(index) => {
+                let range = addr_tr.func_source_range(*index);
+                vec![(range.0, range.1)]
+            }
+        }
+    }
+
+    pub(crate) fn build_ranges(
+        &self,
+        addr_tr: &AddressTransform,
+        out_range_lists: &mut write::RangeListTable,
+    ) -> write::RangeListId {
+        if let RangeInfoBuilder::Ranges(ranges) = self {
+            let mut range_list = Vec::new();
+            for (begin, end) in ranges {
+                assert_lt!(begin, end);
+                for tr in addr_tr.translate_ranges(*begin, *end) {
+                    if tr.1 == 0 {
+                        // Ignore empty range
+                        continue;
+                    }
+                    range_list.push(write::Range::StartLength {
+                        begin: tr.0,
+                        length: tr.1,
+                    });
+                }
+            }
+            out_range_lists.add(write::RangeList(range_list))
+        } else {
+            unreachable!();
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/transform/refs.rs.html b/api/src/wasmtime_debug/transform/refs.rs.html new file mode 100644 index 000000000000..3343b281f5bb --- /dev/null +++ b/api/src/wasmtime_debug/transform/refs.rs.html @@ -0,0 +1,225 @@ +refs.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+
+//! Helper utils for tracking and patching intra unit or section references.
+
+use gimli::write;
+use gimli::{CompilationUnitHeader, DebugInfoOffset, Reader, UnitOffset};
+use std::collections::HashMap;
+
+/// Stores compiled unit references: UnitEntryId+DwAt denotes a patch location
+/// and UnitOffset is a location in original DWARF.
+pub struct PendingUnitRefs {
+    refs: Vec<(write::UnitEntryId, gimli::DwAt, UnitOffset)>,
+}
+
+impl PendingUnitRefs {
+    pub fn new() -> Self {
+        Self { refs: Vec::new() }
+    }
+    pub fn insert(&mut self, entry_id: write::UnitEntryId, attr: gimli::DwAt, offset: UnitOffset) {
+        self.refs.push((entry_id, attr, offset));
+    }
+}
+
+/// Stores .debug_info references: UnitEntryId+DwAt denotes a patch location
+/// and DebugInfoOffset is a location in original DWARF.
+pub struct PendingDebugInfoRefs {
+    refs: Vec<(write::UnitEntryId, gimli::DwAt, DebugInfoOffset)>,
+}
+
+impl PendingDebugInfoRefs {
+    pub fn new() -> Self {
+        Self { refs: Vec::new() }
+    }
+    pub fn insert(
+        &mut self,
+        entry_id: write::UnitEntryId,
+        attr: gimli::DwAt,
+        offset: DebugInfoOffset,
+    ) {
+        self.refs.push((entry_id, attr, offset));
+    }
+}
+
+/// Stores map between read and written references of DWARF entries of
+/// a compiled unit.
+pub struct UnitRefsMap {
+    map: HashMap<UnitOffset, write::UnitEntryId>,
+}
+
+impl UnitRefsMap {
+    pub fn new() -> Self {
+        Self {
+            map: HashMap::new(),
+        }
+    }
+    pub fn insert(&mut self, offset: UnitOffset, entry_id: write::UnitEntryId) {
+        self.map.insert(offset, entry_id);
+    }
+    pub fn patch(&self, refs: PendingUnitRefs, comp_unit: &mut write::Unit) {
+        for (die_id, attr_name, offset) in refs.refs {
+            let die = comp_unit.get_mut(die_id);
+            if let Some(unit_id) = self.map.get(&offset) {
+                die.set(attr_name, write::AttributeValue::ThisUnitEntryRef(*unit_id));
+            }
+        }
+    }
+}
+
+/// Stores map between read and written references of DWARF entries of
+/// the entire .debug_info.
+pub struct DebugInfoRefsMap {
+    map: HashMap<DebugInfoOffset, (write::UnitId, write::UnitEntryId)>,
+}
+
+impl DebugInfoRefsMap {
+    pub fn new() -> Self {
+        Self {
+            map: HashMap::new(),
+        }
+    }
+    pub fn insert<R>(
+        &mut self,
+        unit: &CompilationUnitHeader<R>,
+        unit_id: write::UnitId,
+        unit_map: UnitRefsMap,
+    ) where
+        R: Reader<Offset = usize>,
+    {
+        self.map
+            .extend(unit_map.map.into_iter().map(|(off, entry_id)| {
+                let off = off.to_debug_info_offset(unit);
+                (off, (unit_id, entry_id))
+            }));
+    }
+    pub fn patch(
+        &self,
+        refs: impl Iterator<Item = (write::UnitId, PendingDebugInfoRefs)>,
+        units: &mut write::UnitTable,
+    ) {
+        for (id, refs) in refs {
+            let unit = units.get_mut(id);
+            for (die_id, attr_name, offset) in refs.refs {
+                let die = unit.get_mut(die_id);
+                if let Some((id, entry_id)) = self.map.get(&offset) {
+                    die.set(
+                        attr_name,
+                        write::AttributeValue::AnyUnitEntryRef((*id, *entry_id)),
+                    );
+                }
+            }
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/transform/simulate.rs.html b/api/src/wasmtime_debug/transform/simulate.rs.html new file mode 100644 index 000000000000..2edfc4d7346a --- /dev/null +++ b/api/src/wasmtime_debug/transform/simulate.rs.html @@ -0,0 +1,741 @@ +simulate.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+
+use super::expression::{CompiledExpression, FunctionFrameInfo};
+use super::utils::{add_internal_types, append_vmctx_info, get_function_frame_info};
+use super::AddressTransform;
+use crate::read_debuginfo::WasmFileInfo;
+use anyhow::Error;
+use gimli::write;
+use gimli::{self, LineEncoding};
+use std::collections::{HashMap, HashSet};
+use std::path::PathBuf;
+use wasmtime_environ::entity::EntityRef;
+use wasmtime_environ::wasm::get_vmctx_value_label;
+use wasmtime_environ::{ModuleVmctxInfo, ValueLabelsRanges};
+
+pub use crate::read_debuginfo::{DebugInfoData, FunctionMetadata, WasmType};
+
+const PRODUCER_NAME: &str = "wasmtime";
+
+fn generate_line_info(
+    addr_tr: &AddressTransform,
+    translated: &HashSet<u32>,
+    out_encoding: gimli::Encoding,
+    w: &WasmFileInfo,
+    comp_dir_id: write::StringId,
+    name_id: write::StringId,
+    name: &str,
+) -> Result<write::LineProgram, Error> {
+    let out_comp_dir = write::LineString::StringRef(comp_dir_id);
+    let out_comp_name = write::LineString::StringRef(name_id);
+
+    let line_encoding = LineEncoding::default();
+
+    let mut out_program = write::LineProgram::new(
+        out_encoding,
+        line_encoding,
+        out_comp_dir,
+        out_comp_name,
+        None,
+    );
+
+    let file_index = out_program.add_file(
+        write::LineString::String(name.as_bytes().to_vec()),
+        out_program.default_directory(),
+        None,
+    );
+
+    for (i, map) in addr_tr.map() {
+        let symbol = i.index();
+        if translated.contains(&(symbol as u32)) {
+            continue;
+        }
+
+        let base_addr = map.offset;
+        out_program.begin_sequence(Some(write::Address::Symbol { symbol, addend: 0 }));
+        for addr_map in map.addresses.iter() {
+            let address_offset = (addr_map.generated - base_addr) as u64;
+            out_program.row().address_offset = address_offset;
+            out_program.row().op_index = 0;
+            out_program.row().file = file_index;
+            let wasm_offset = w.code_section_offset + addr_map.wasm as u64;
+            out_program.row().line = wasm_offset;
+            out_program.row().column = 0;
+            out_program.row().discriminator = 1;
+            out_program.row().is_statement = true;
+            out_program.row().basic_block = false;
+            out_program.row().prologue_end = false;
+            out_program.row().epilogue_begin = false;
+            out_program.row().isa = 0;
+            out_program.generate_row();
+        }
+        let end_addr = (map.offset + map.len - 1) as u64;
+        out_program.end_sequence(end_addr);
+    }
+
+    Ok(out_program)
+}
+
+fn autogenerate_dwarf_wasm_path(di: &DebugInfoData) -> PathBuf {
+    let module_name = di
+        .name_section
+        .as_ref()
+        .and_then(|ns| ns.module_name.to_owned())
+        .unwrap_or_else(|| unsafe {
+            static mut GEN_ID: u32 = 0;
+            GEN_ID += 1;
+            format!("<gen-{}>", GEN_ID)
+        });
+    let path = format!("/<wasm-module>/{}.wasm", module_name);
+    PathBuf::from(path)
+}
+
+struct WasmTypesDieRefs {
+    vmctx: write::UnitEntryId,
+    i32: write::UnitEntryId,
+    i64: write::UnitEntryId,
+    f32: write::UnitEntryId,
+    f64: write::UnitEntryId,
+}
+
+fn add_wasm_types(
+    unit: &mut write::Unit,
+    root_id: write::UnitEntryId,
+    out_strings: &mut write::StringTable,
+    vmctx_info: &ModuleVmctxInfo,
+) -> WasmTypesDieRefs {
+    let (_wp_die_id, vmctx_die_id) = add_internal_types(unit, root_id, out_strings, vmctx_info);
+
+    macro_rules! def_type {
+        ($id:literal, $size:literal, $enc:path) => {{
+            let die_id = unit.add(root_id, gimli::DW_TAG_base_type);
+            let die = unit.get_mut(die_id);
+            die.set(
+                gimli::DW_AT_name,
+                write::AttributeValue::StringRef(out_strings.add($id)),
+            );
+            die.set(gimli::DW_AT_byte_size, write::AttributeValue::Data1($size));
+            die.set(gimli::DW_AT_encoding, write::AttributeValue::Encoding($enc));
+            die_id
+        }};
+    }
+
+    let i32_die_id = def_type!("i32", 4, gimli::DW_ATE_signed);
+    let i64_die_id = def_type!("i64", 8, gimli::DW_ATE_signed);
+    let f32_die_id = def_type!("f32", 4, gimli::DW_ATE_float);
+    let f64_die_id = def_type!("f64", 8, gimli::DW_ATE_float);
+
+    WasmTypesDieRefs {
+        vmctx: vmctx_die_id,
+        i32: i32_die_id,
+        i64: i64_die_id,
+        f32: f32_die_id,
+        f64: f64_die_id,
+    }
+}
+
+fn resolve_var_type(
+    index: usize,
+    wasm_types: &WasmTypesDieRefs,
+    func_meta: &FunctionMetadata,
+) -> Option<(write::UnitEntryId, bool)> {
+    let (ty, is_param) = if index < func_meta.params.len() {
+        (func_meta.params[index], true)
+    } else {
+        let mut i = (index - func_meta.params.len()) as u32;
+        let mut j = 0;
+        while j < func_meta.locals.len() && i >= func_meta.locals[j].0 {
+            i -= func_meta.locals[j].0;
+            j += 1;
+        }
+        if j >= func_meta.locals.len() {
+            // Ignore the var index out of bound.
+            return None;
+        }
+        (func_meta.locals[j].1, false)
+    };
+    let type_die_id = match ty {
+        WasmType::I32 => wasm_types.i32,
+        WasmType::I64 => wasm_types.i64,
+        WasmType::F32 => wasm_types.f32,
+        WasmType::F64 => wasm_types.f64,
+        _ => {
+            // Ignore unsupported types.
+            return None;
+        }
+    };
+    Some((type_die_id, is_param))
+}
+
+fn generate_vars(
+    unit: &mut write::Unit,
+    die_id: write::UnitEntryId,
+    addr_tr: &AddressTransform,
+    frame_info: &FunctionFrameInfo,
+    scope_ranges: &[(u64, u64)],
+    wasm_types: &WasmTypesDieRefs,
+    func_meta: &FunctionMetadata,
+    locals_names: Option<&HashMap<u32, String>>,
+    out_strings: &mut write::StringTable,
+) {
+    let vmctx_label = get_vmctx_value_label();
+
+    for label in frame_info.value_ranges.keys() {
+        if label.index() == vmctx_label.index() {
+            append_vmctx_info(
+                unit,
+                die_id,
+                wasm_types.vmctx,
+                addr_tr,
+                Some(frame_info),
+                scope_ranges,
+                out_strings,
+            )
+            .expect("append_vmctx_info success");
+        } else {
+            let var_index = label.index();
+            let (type_die_id, is_param) =
+                if let Some(result) = resolve_var_type(var_index, wasm_types, func_meta) {
+                    result
+                } else {
+                    // Skipping if type of local cannot be detected.
+                    continue;
+                };
+
+            let loc_list_id = {
+                let endian = gimli::RunTimeEndian::Little;
+
+                let expr = CompiledExpression::from_label(*label);
+                let mut locs = Vec::new();
+                for (begin, length, data) in
+                    expr.build_with_locals(scope_ranges, addr_tr, Some(frame_info), endian)
+                {
+                    locs.push(write::Location::StartLength {
+                        begin,
+                        length,
+                        data,
+                    });
+                }
+                unit.locations.add(write::LocationList(locs))
+            };
+
+            let var_id = unit.add(
+                die_id,
+                if is_param {
+                    gimli::DW_TAG_formal_parameter
+                } else {
+                    gimli::DW_TAG_variable
+                },
+            );
+            let var = unit.get_mut(var_id);
+
+            let name_id = match locals_names.and_then(|m| m.get(&(var_index as u32))) {
+                Some(n) => out_strings.add(n.to_owned()),
+                None => out_strings.add(format!("var{}", var_index)),
+            };
+
+            var.set(gimli::DW_AT_name, write::AttributeValue::StringRef(name_id));
+            var.set(
+                gimli::DW_AT_type,
+                write::AttributeValue::ThisUnitEntryRef(type_die_id),
+            );
+            var.set(
+                gimli::DW_AT_location,
+                write::AttributeValue::LocationListRef(loc_list_id),
+            );
+        }
+    }
+}
+
+pub fn generate_simulated_dwarf(
+    addr_tr: &AddressTransform,
+    di: &DebugInfoData,
+    vmctx_info: &ModuleVmctxInfo,
+    ranges: &ValueLabelsRanges,
+    translated: &HashSet<u32>,
+    out_encoding: gimli::Encoding,
+    out_units: &mut write::UnitTable,
+    out_strings: &mut write::StringTable,
+) -> Result<(), Error> {
+    let path = di
+        .wasm_file
+        .path
+        .to_owned()
+        .unwrap_or_else(|| autogenerate_dwarf_wasm_path(di));
+
+    let (func_names, locals_names) = if let Some(ref name_section) = di.name_section {
+        (
+            Some(&name_section.func_names),
+            Some(&name_section.locals_names),
+        )
+    } else {
+        (None, None)
+    };
+
+    let (unit, root_id, name_id) = {
+        let comp_dir_id = out_strings.add(path.parent().expect("path dir").to_str().unwrap());
+        let name = path.file_name().expect("path name").to_str().unwrap();
+        let name_id = out_strings.add(name);
+
+        let out_program = generate_line_info(
+            addr_tr,
+            translated,
+            out_encoding,
+            &di.wasm_file,
+            comp_dir_id,
+            name_id,
+            name,
+        )?;
+
+        let unit_id = out_units.add(write::Unit::new(out_encoding, out_program));
+        let unit = out_units.get_mut(unit_id);
+
+        let root_id = unit.root();
+        let root = unit.get_mut(root_id);
+
+        let id = out_strings.add(PRODUCER_NAME);
+        root.set(gimli::DW_AT_producer, write::AttributeValue::StringRef(id));
+        root.set(gimli::DW_AT_name, write::AttributeValue::StringRef(name_id));
+        root.set(
+            gimli::DW_AT_stmt_list,
+            write::AttributeValue::LineProgramRef,
+        );
+        root.set(
+            gimli::DW_AT_comp_dir,
+            write::AttributeValue::StringRef(comp_dir_id),
+        );
+        (unit, root_id, name_id)
+    };
+
+    let wasm_types = add_wasm_types(unit, root_id, out_strings, vmctx_info);
+
+    for (i, map) in addr_tr.map().iter() {
+        let index = i.index();
+        if translated.contains(&(index as u32)) {
+            continue;
+        }
+
+        let start = map.offset as u64;
+        let end = start + map.len as u64;
+        let die_id = unit.add(root_id, gimli::DW_TAG_subprogram);
+        let die = unit.get_mut(die_id);
+        die.set(
+            gimli::DW_AT_low_pc,
+            write::AttributeValue::Address(write::Address::Symbol {
+                symbol: index,
+                addend: start as i64,
+            }),
+        );
+        die.set(
+            gimli::DW_AT_high_pc,
+            write::AttributeValue::Udata((end - start) as u64),
+        );
+
+        let id = match func_names.and_then(|m| m.get(&(index as u32))) {
+            Some(n) => out_strings.add(n.to_owned()),
+            None => out_strings.add(format!("wasm-function[{}]", index)),
+        };
+
+        die.set(gimli::DW_AT_name, write::AttributeValue::StringRef(id));
+
+        die.set(
+            gimli::DW_AT_decl_file,
+            write::AttributeValue::StringRef(name_id),
+        );
+
+        let f = addr_tr.map().get(i).unwrap();
+        let f_start = f.addresses[0].wasm;
+        let wasm_offset = di.wasm_file.code_section_offset + f_start as u64;
+        die.set(
+            gimli::DW_AT_decl_file,
+            write::AttributeValue::Udata(wasm_offset),
+        );
+
+        if let Some(frame_info) = get_function_frame_info(vmctx_info, i, ranges) {
+            let source_range = addr_tr.func_source_range(i);
+            generate_vars(
+                unit,
+                die_id,
+                addr_tr,
+                &frame_info,
+                &[(source_range.0, source_range.1)],
+                &wasm_types,
+                &di.wasm_file.funcs[index],
+                locals_names.and_then(|m| m.get(&(index as u32))),
+                out_strings,
+            );
+        }
+    }
+
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/transform/unit.rs.html b/api/src/wasmtime_debug/transform/unit.rs.html new file mode 100644 index 000000000000..e3e8eaab69d1 --- /dev/null +++ b/api/src/wasmtime_debug/transform/unit.rs.html @@ -0,0 +1,727 @@ +unit.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+
+use super::address_transform::AddressTransform;
+use super::attr::{clone_die_attributes, FileAttributeContext};
+use super::expression::compile_expression;
+use super::line_program::clone_line_program;
+use super::range_info_builder::RangeInfoBuilder;
+use super::refs::{PendingDebugInfoRefs, PendingUnitRefs, UnitRefsMap};
+use super::utils::{add_internal_types, append_vmctx_info, get_function_frame_info};
+use super::{DebugInputContext, Reader, TransformError};
+use anyhow::Error;
+use gimli::write;
+use gimli::{AttributeValue, DebuggingInformationEntry, Unit};
+use std::collections::HashSet;
+use wasmtime_environ::entity::EntityRef;
+use wasmtime_environ::{ModuleVmctxInfo, ValueLabelsRanges};
+
+struct InheritedAttr<T> {
+    stack: Vec<(usize, T)>,
+}
+
+impl<T> InheritedAttr<T> {
+    fn new() -> Self {
+        InheritedAttr { stack: Vec::new() }
+    }
+
+    fn update(&mut self, depth: usize) {
+        while !self.stack.is_empty() && self.stack.last().unwrap().0 >= depth {
+            self.stack.pop();
+        }
+    }
+
+    fn push(&mut self, depth: usize, value: T) {
+        self.stack.push((depth, value));
+    }
+
+    fn top(&self) -> Option<&T> {
+        self.stack.last().map(|entry| &entry.1)
+    }
+
+    fn is_empty(&self) -> bool {
+        self.stack.is_empty()
+    }
+}
+
+fn get_base_type_name<R>(
+    type_entry: &DebuggingInformationEntry<R>,
+    unit: &Unit<R, R::Offset>,
+    context: &DebugInputContext<R>,
+) -> Result<String, Error>
+where
+    R: Reader,
+{
+    // FIXME remove recursion.
+    if let Some(AttributeValue::UnitRef(ref offset)) = type_entry.attr_value(gimli::DW_AT_type)? {
+        let mut entries = unit.entries_at_offset(*offset)?;
+        entries.next_entry()?;
+        if let Some(die) = entries.current() {
+            if let Some(AttributeValue::DebugStrRef(str_offset)) =
+                die.attr_value(gimli::DW_AT_name)?
+            {
+                return Ok(String::from(
+                    context.debug_str.get_str(str_offset)?.to_string()?,
+                ));
+            }
+            match die.tag() {
+                gimli::DW_TAG_const_type => {
+                    return Ok(format!("const {}", get_base_type_name(die, unit, context)?));
+                }
+                gimli::DW_TAG_pointer_type => {
+                    return Ok(format!("{}*", get_base_type_name(die, unit, context)?));
+                }
+                gimli::DW_TAG_reference_type => {
+                    return Ok(format!("{}&", get_base_type_name(die, unit, context)?));
+                }
+                gimli::DW_TAG_array_type => {
+                    return Ok(format!("{}[]", get_base_type_name(die, unit, context)?));
+                }
+                _ => (),
+            }
+        }
+    }
+    Ok(String::from("??"))
+}
+
+fn replace_pointer_type<R>(
+    parent_id: write::UnitEntryId,
+    comp_unit: &mut write::Unit,
+    wp_die_id: write::UnitEntryId,
+    entry: &DebuggingInformationEntry<R>,
+    unit: &Unit<R, R::Offset>,
+    context: &DebugInputContext<R>,
+    out_strings: &mut write::StringTable,
+    pending_die_refs: &mut PendingUnitRefs,
+) -> Result<write::UnitEntryId, Error>
+where
+    R: Reader,
+{
+    let die_id = comp_unit.add(parent_id, gimli::DW_TAG_structure_type);
+    let die = comp_unit.get_mut(die_id);
+
+    let name = format!(
+        "WebAssemblyPtrWrapper<{}>",
+        get_base_type_name(entry, unit, context)?
+    );
+    die.set(
+        gimli::DW_AT_name,
+        write::AttributeValue::StringRef(out_strings.add(name.as_str())),
+    );
+    die.set(gimli::DW_AT_byte_size, write::AttributeValue::Data1(4));
+
+    let p_die_id = comp_unit.add(die_id, gimli::DW_TAG_template_type_parameter);
+    let p_die = comp_unit.get_mut(p_die_id);
+    p_die.set(
+        gimli::DW_AT_name,
+        write::AttributeValue::StringRef(out_strings.add("T")),
+    );
+    p_die.set(
+        gimli::DW_AT_type,
+        write::AttributeValue::ThisUnitEntryRef(wp_die_id),
+    );
+    if let Some(AttributeValue::UnitRef(ref offset)) = entry.attr_value(gimli::DW_AT_type)? {
+        pending_die_refs.insert(p_die_id, gimli::DW_AT_type, *offset);
+    }
+
+    let m_die_id = comp_unit.add(die_id, gimli::DW_TAG_member);
+    let m_die = comp_unit.get_mut(m_die_id);
+    m_die.set(
+        gimli::DW_AT_name,
+        write::AttributeValue::StringRef(out_strings.add("__ptr")),
+    );
+    m_die.set(
+        gimli::DW_AT_type,
+        write::AttributeValue::ThisUnitEntryRef(wp_die_id),
+    );
+    m_die.set(
+        gimli::DW_AT_data_member_location,
+        write::AttributeValue::Data1(0),
+    );
+    Ok(die_id)
+}
+
+pub(crate) fn clone_unit<'a, R>(
+    unit: Unit<R, R::Offset>,
+    context: &DebugInputContext<R>,
+    addr_tr: &'a AddressTransform,
+    value_ranges: &'a ValueLabelsRanges,
+    out_encoding: gimli::Encoding,
+    module_info: &ModuleVmctxInfo,
+    out_units: &mut write::UnitTable,
+    out_strings: &mut write::StringTable,
+    translated: &mut HashSet<u32>,
+) -> Result<Option<(write::UnitId, UnitRefsMap, PendingDebugInfoRefs)>, Error>
+where
+    R: Reader,
+{
+    let mut die_ref_map = UnitRefsMap::new();
+    let mut pending_die_refs = PendingUnitRefs::new();
+    let mut pending_di_refs = PendingDebugInfoRefs::new();
+    let mut stack = Vec::new();
+
+    // Iterate over all of this compilation unit's entries.
+    let mut entries = unit.entries();
+    let (mut comp_unit, unit_id, file_map, cu_low_pc, wp_die_id, vmctx_die_id) =
+        if let Some((depth_delta, entry)) = entries.next_dfs()? {
+            assert_eq!(depth_delta, 0);
+            let (out_line_program, debug_line_offset, file_map) = clone_line_program(
+                &unit,
+                entry,
+                addr_tr,
+                out_encoding,
+                context.debug_str,
+                context.debug_line,
+                out_strings,
+            )?;
+
+            if entry.tag() == gimli::DW_TAG_compile_unit {
+                let unit_id = out_units.add(write::Unit::new(out_encoding, out_line_program));
+                let comp_unit = out_units.get_mut(unit_id);
+
+                let root_id = comp_unit.root();
+                die_ref_map.insert(entry.offset(), root_id);
+
+                let cu_low_pc = if let Some(AttributeValue::Addr(addr)) =
+                    entry.attr_value(gimli::DW_AT_low_pc)?
+                {
+                    addr
+                } else {
+                    // FIXME? return Err(TransformError("No low_pc for unit header").into());
+                    0
+                };
+
+                clone_die_attributes(
+                    entry,
+                    context,
+                    addr_tr,
+                    None,
+                    unit.encoding(),
+                    comp_unit,
+                    root_id,
+                    None,
+                    None,
+                    cu_low_pc,
+                    out_strings,
+                    &mut pending_die_refs,
+                    &mut pending_di_refs,
+                    FileAttributeContext::Root(Some(debug_line_offset)),
+                )?;
+
+                let (wp_die_id, vmctx_die_id) =
+                    add_internal_types(comp_unit, root_id, out_strings, module_info);
+
+                stack.push(root_id);
+                (
+                    comp_unit,
+                    unit_id,
+                    file_map,
+                    cu_low_pc,
+                    wp_die_id,
+                    vmctx_die_id,
+                )
+            } else {
+                return Err(TransformError("Unexpected unit header").into());
+            }
+        } else {
+            return Ok(None); // empty
+        };
+    let mut skip_at_depth = None;
+    let mut current_frame_base = InheritedAttr::new();
+    let mut current_value_range = InheritedAttr::new();
+    let mut current_scope_ranges = InheritedAttr::new();
+    while let Some((depth_delta, entry)) = entries.next_dfs()? {
+        let depth_delta = if let Some((depth, cached)) = skip_at_depth {
+            let new_depth = depth + depth_delta;
+            if new_depth > 0 {
+                skip_at_depth = Some((new_depth, cached));
+                continue;
+            }
+            skip_at_depth = None;
+            new_depth + cached
+        } else {
+            depth_delta
+        };
+
+        if !context
+            .reachable
+            .contains(&entry.offset().to_unit_section_offset(&unit))
+        {
+            // entry is not reachable: discarding all its info.
+            skip_at_depth = Some((0, depth_delta));
+            continue;
+        }
+
+        let new_stack_len = stack.len().wrapping_add(depth_delta as usize);
+        current_frame_base.update(new_stack_len);
+        current_scope_ranges.update(new_stack_len);
+        current_value_range.update(new_stack_len);
+        let range_builder = if entry.tag() == gimli::DW_TAG_subprogram {
+            let range_builder = RangeInfoBuilder::from_subprogram_die(
+                entry,
+                context,
+                unit.encoding(),
+                addr_tr,
+                cu_low_pc,
+            )?;
+            if let RangeInfoBuilder::Function(func_index) = range_builder {
+                if let Some(frame_info) =
+                    get_function_frame_info(module_info, func_index, value_ranges)
+                {
+                    current_value_range.push(new_stack_len, frame_info);
+                }
+                translated.insert(func_index.index() as u32);
+                current_scope_ranges.push(new_stack_len, range_builder.get_ranges(addr_tr));
+                Some(range_builder)
+            } else {
+                // FIXME current_scope_ranges.push()
+                None
+            }
+        } else {
+            let high_pc = entry.attr_value(gimli::DW_AT_high_pc)?;
+            let ranges = entry.attr_value(gimli::DW_AT_ranges)?;
+            if high_pc.is_some() || ranges.is_some() {
+                let range_builder =
+                    RangeInfoBuilder::from(entry, context, unit.encoding(), cu_low_pc)?;
+                current_scope_ranges.push(new_stack_len, range_builder.get_ranges(addr_tr));
+                Some(range_builder)
+            } else {
+                None
+            }
+        };
+
+        if depth_delta <= 0 {
+            for _ in depth_delta..1 {
+                stack.pop();
+            }
+        } else {
+            assert_eq!(depth_delta, 1);
+        }
+
+        if let Some(AttributeValue::Exprloc(expr)) = entry.attr_value(gimli::DW_AT_frame_base)? {
+            if let Some(expr) = compile_expression(&expr, unit.encoding(), None)? {
+                current_frame_base.push(new_stack_len, expr);
+            }
+        }
+
+        let parent = stack.last().unwrap();
+
+        if entry.tag() == gimli::DW_TAG_pointer_type {
+            // Wrap pointer types.
+            // TODO reference types?
+            let die_id = replace_pointer_type(
+                *parent,
+                comp_unit,
+                wp_die_id,
+                entry,
+                &unit,
+                context,
+                out_strings,
+                &mut pending_die_refs,
+            )?;
+            stack.push(die_id);
+            assert_eq!(stack.len(), new_stack_len);
+            die_ref_map.insert(entry.offset(), die_id);
+            continue;
+        }
+
+        let die_id = comp_unit.add(*parent, entry.tag());
+
+        stack.push(die_id);
+        assert_eq!(stack.len(), new_stack_len);
+        die_ref_map.insert(entry.offset(), die_id);
+
+        clone_die_attributes(
+            entry,
+            context,
+            addr_tr,
+            current_value_range.top(),
+            unit.encoding(),
+            &mut comp_unit,
+            die_id,
+            range_builder,
+            current_scope_ranges.top(),
+            cu_low_pc,
+            out_strings,
+            &mut pending_die_refs,
+            &mut pending_di_refs,
+            FileAttributeContext::Children(&file_map, current_frame_base.top()),
+        )?;
+
+        if entry.tag() == gimli::DW_TAG_subprogram && !current_scope_ranges.is_empty() {
+            append_vmctx_info(
+                comp_unit,
+                die_id,
+                vmctx_die_id,
+                addr_tr,
+                current_value_range.top(),
+                current_scope_ranges.top().expect("range"),
+                out_strings,
+            )?;
+        }
+    }
+    die_ref_map.patch(pending_die_refs, comp_unit);
+    Ok(Some((unit_id, die_ref_map, pending_di_refs)))
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/transform/utils.rs.html b/api/src/wasmtime_debug/transform/utils.rs.html new file mode 100644 index 000000000000..4b78bed49610 --- /dev/null +++ b/api/src/wasmtime_debug/transform/utils.rs.html @@ -0,0 +1,333 @@ +utils.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+
+use super::address_transform::AddressTransform;
+use super::expression::{CompiledExpression, FunctionFrameInfo};
+use anyhow::Error;
+use gimli::write;
+use wasmtime_environ::wasm::DefinedFuncIndex;
+use wasmtime_environ::{ModuleMemoryOffset, ModuleVmctxInfo, ValueLabelsRanges};
+
+pub(crate) fn add_internal_types(
+    comp_unit: &mut write::Unit,
+    root_id: write::UnitEntryId,
+    out_strings: &mut write::StringTable,
+    module_info: &ModuleVmctxInfo,
+) -> (write::UnitEntryId, write::UnitEntryId) {
+    let wp_die_id = comp_unit.add(root_id, gimli::DW_TAG_base_type);
+    let wp_die = comp_unit.get_mut(wp_die_id);
+    wp_die.set(
+        gimli::DW_AT_name,
+        write::AttributeValue::StringRef(out_strings.add("WebAssemblyPtr")),
+    );
+    wp_die.set(gimli::DW_AT_byte_size, write::AttributeValue::Data1(4));
+    wp_die.set(
+        gimli::DW_AT_encoding,
+        write::AttributeValue::Encoding(gimli::DW_ATE_unsigned),
+    );
+
+    let memory_byte_die_id = comp_unit.add(root_id, gimli::DW_TAG_base_type);
+    let memory_byte_die = comp_unit.get_mut(memory_byte_die_id);
+    memory_byte_die.set(
+        gimli::DW_AT_name,
+        write::AttributeValue::StringRef(out_strings.add("u8")),
+    );
+    memory_byte_die.set(
+        gimli::DW_AT_encoding,
+        write::AttributeValue::Encoding(gimli::DW_ATE_unsigned),
+    );
+    memory_byte_die.set(gimli::DW_AT_byte_size, write::AttributeValue::Data1(1));
+
+    let memory_bytes_die_id = comp_unit.add(root_id, gimli::DW_TAG_pointer_type);
+    let memory_bytes_die = comp_unit.get_mut(memory_bytes_die_id);
+    memory_bytes_die.set(
+        gimli::DW_AT_name,
+        write::AttributeValue::StringRef(out_strings.add("u8*")),
+    );
+    memory_bytes_die.set(
+        gimli::DW_AT_type,
+        write::AttributeValue::ThisUnitEntryRef(memory_byte_die_id),
+    );
+
+    // Create artificial VMContext type and its reference for convinience viewing
+    // its fields (such as memory ref) in a debugger.
+    let vmctx_die_id = comp_unit.add(root_id, gimli::DW_TAG_structure_type);
+    let vmctx_die = comp_unit.get_mut(vmctx_die_id);
+    vmctx_die.set(
+        gimli::DW_AT_name,
+        write::AttributeValue::StringRef(out_strings.add("WasmtimeVMContext")),
+    );
+
+    match module_info.memory_offset {
+        ModuleMemoryOffset::Defined(memory_offset) => {
+            // The context has defined memory: extend the WasmtimeVMContext size
+            // past the "memory" field.
+            const MEMORY_FIELD_SIZE_PLUS_PADDING: u32 = 8;
+            vmctx_die.set(
+                gimli::DW_AT_byte_size,
+                write::AttributeValue::Data4(memory_offset + MEMORY_FIELD_SIZE_PLUS_PADDING),
+            );
+
+            // Define the "memory" field which is a direct pointer to allocated Wasm memory.
+            let m_die_id = comp_unit.add(vmctx_die_id, gimli::DW_TAG_member);
+            let m_die = comp_unit.get_mut(m_die_id);
+            m_die.set(
+                gimli::DW_AT_name,
+                write::AttributeValue::StringRef(out_strings.add("memory")),
+            );
+            m_die.set(
+                gimli::DW_AT_type,
+                write::AttributeValue::ThisUnitEntryRef(memory_bytes_die_id),
+            );
+            m_die.set(
+                gimli::DW_AT_data_member_location,
+                write::AttributeValue::Udata(memory_offset as u64),
+            );
+        }
+        ModuleMemoryOffset::Imported(_) => {
+            // TODO implement convinience pointer to and additional types for VMMemoryImport.
+        }
+        ModuleMemoryOffset::None => (),
+    }
+
+    let vmctx_ptr_die_id = comp_unit.add(root_id, gimli::DW_TAG_pointer_type);
+    let vmctx_ptr_die = comp_unit.get_mut(vmctx_ptr_die_id);
+    vmctx_ptr_die.set(
+        gimli::DW_AT_name,
+        write::AttributeValue::StringRef(out_strings.add("WasmtimeVMContext*")),
+    );
+    vmctx_ptr_die.set(
+        gimli::DW_AT_type,
+        write::AttributeValue::ThisUnitEntryRef(vmctx_die_id),
+    );
+
+    (wp_die_id, vmctx_ptr_die_id)
+}
+
+pub(crate) fn append_vmctx_info(
+    comp_unit: &mut write::Unit,
+    parent_id: write::UnitEntryId,
+    vmctx_die_id: write::UnitEntryId,
+    addr_tr: &AddressTransform,
+    frame_info: Option<&FunctionFrameInfo>,
+    scope_ranges: &[(u64, u64)],
+    out_strings: &mut write::StringTable,
+) -> Result<(), Error> {
+    let loc = {
+        let endian = gimli::RunTimeEndian::Little;
+
+        let expr = CompiledExpression::vmctx();
+        let mut locs = Vec::new();
+        for (begin, length, data) in
+            expr.build_with_locals(scope_ranges, addr_tr, frame_info, endian)
+        {
+            locs.push(write::Location::StartLength {
+                begin,
+                length,
+                data,
+            });
+        }
+        let list_id = comp_unit.locations.add(write::LocationList(locs));
+        write::AttributeValue::LocationListRef(list_id)
+    };
+
+    let var_die_id = comp_unit.add(parent_id, gimli::DW_TAG_variable);
+    let var_die = comp_unit.get_mut(var_die_id);
+    var_die.set(
+        gimli::DW_AT_name,
+        write::AttributeValue::StringRef(out_strings.add("__vmctx")),
+    );
+    var_die.set(
+        gimli::DW_AT_type,
+        write::AttributeValue::ThisUnitEntryRef(vmctx_die_id),
+    );
+    var_die.set(gimli::DW_AT_location, loc);
+
+    Ok(())
+}
+
+pub(crate) fn get_function_frame_info<'a, 'b, 'c>(
+    module_info: &'b ModuleVmctxInfo,
+    func_index: DefinedFuncIndex,
+    value_ranges: &'c ValueLabelsRanges,
+) -> Option<FunctionFrameInfo<'a>>
+where
+    'b: 'a,
+    'c: 'a,
+{
+    if let Some(value_ranges) = value_ranges.get(func_index) {
+        let frame_info = FunctionFrameInfo {
+            value_ranges,
+            memory_offset: module_info.memory_offset.clone(),
+            stack_slots: &module_info.stack_slots[func_index],
+        };
+        Some(frame_info)
+    } else {
+        None
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_debug/write_debuginfo.rs.html b/api/src/wasmtime_debug/write_debuginfo.rs.html new file mode 100644 index 000000000000..391d6daf343b --- /dev/null +++ b/api/src/wasmtime_debug/write_debuginfo.rs.html @@ -0,0 +1,289 @@ +write_debuginfo.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+
+use faerie::artifact::{Decl, SectionKind};
+use faerie::*;
+use gimli::write::{Address, Dwarf, EndianVec, Result, Sections, Writer};
+use gimli::{RunTimeEndian, SectionId};
+
+#[derive(Clone)]
+struct DebugReloc {
+    offset: u32,
+    size: u8,
+    name: String,
+    addend: i64,
+}
+
+pub enum ResolvedSymbol {
+    PhysicalAddress(u64),
+    Reloc { name: String, addend: i64 },
+}
+
+pub trait SymbolResolver {
+    fn resolve_symbol(&self, symbol: usize, addend: i64) -> ResolvedSymbol;
+}
+
+pub fn emit_dwarf(
+    artifact: &mut Artifact,
+    mut dwarf: Dwarf,
+    symbol_resolver: &dyn SymbolResolver,
+) -> anyhow::Result<()> {
+    let endian = RunTimeEndian::Little;
+
+    let mut sections = Sections::new(WriterRelocate::new(endian, symbol_resolver));
+    dwarf.write(&mut sections)?;
+    sections.for_each_mut(|id, s| -> anyhow::Result<()> {
+        artifact.declare_with(
+            id.name(),
+            Decl::section(SectionKind::Debug),
+            s.writer.take(),
+        )
+    })?;
+    sections.for_each_mut(|id, s| -> anyhow::Result<()> {
+        for reloc in &s.relocs {
+            artifact.link_with(
+                faerie::Link {
+                    from: id.name(),
+                    to: &reloc.name,
+                    at: u64::from(reloc.offset),
+                },
+                faerie::Reloc::Debug {
+                    size: reloc.size,
+                    addend: reloc.addend as i32,
+                },
+            )?;
+        }
+        Ok(())
+    })?;
+    Ok(())
+}
+
+#[derive(Clone)]
+pub struct WriterRelocate<'a> {
+    relocs: Vec<DebugReloc>,
+    writer: EndianVec<RunTimeEndian>,
+    symbol_resolver: &'a dyn SymbolResolver,
+}
+
+impl<'a> WriterRelocate<'a> {
+    pub fn new(endian: RunTimeEndian, symbol_resolver: &'a dyn SymbolResolver) -> Self {
+        WriterRelocate {
+            relocs: Vec::new(),
+            writer: EndianVec::new(endian),
+            symbol_resolver,
+        }
+    }
+}
+
+impl<'a> Writer for WriterRelocate<'a> {
+    type Endian = RunTimeEndian;
+
+    fn endian(&self) -> Self::Endian {
+        self.writer.endian()
+    }
+
+    fn len(&self) -> usize {
+        self.writer.len()
+    }
+
+    fn write(&mut self, bytes: &[u8]) -> Result<()> {
+        self.writer.write(bytes)
+    }
+
+    fn write_at(&mut self, offset: usize, bytes: &[u8]) -> Result<()> {
+        self.writer.write_at(offset, bytes)
+    }
+
+    fn write_address(&mut self, address: Address, size: u8) -> Result<()> {
+        match address {
+            Address::Constant(val) => self.write_udata(val, size),
+            Address::Symbol { symbol, addend } => {
+                match self.symbol_resolver.resolve_symbol(symbol, addend as i64) {
+                    ResolvedSymbol::PhysicalAddress(addr) => self.write_udata(addr, size),
+                    ResolvedSymbol::Reloc { name, addend } => {
+                        let offset = self.len() as u64;
+                        self.relocs.push(DebugReloc {
+                            offset: offset as u32,
+                            size,
+                            name,
+                            addend,
+                        });
+                        self.write_udata(addend as u64, size)
+                    }
+                }
+            }
+        }
+    }
+
+    fn write_offset(&mut self, val: usize, section: SectionId, size: u8) -> Result<()> {
+        let offset = self.len() as u32;
+        let name = section.name().to_string();
+        self.relocs.push(DebugReloc {
+            offset,
+            size,
+            name,
+            addend: val as i64,
+        });
+        self.write_udata(val as u64, size)
+    }
+
+    fn write_offset_at(
+        &mut self,
+        offset: usize,
+        val: usize,
+        section: SectionId,
+        size: u8,
+    ) -> Result<()> {
+        let name = section.name().to_string();
+        self.relocs.push(DebugReloc {
+            offset: offset as u32,
+            size,
+            name,
+            addend: val as i64,
+        });
+        self.write_udata_at(offset, val as u64, size)
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/address_map.rs.html b/api/src/wasmtime_environ/address_map.rs.html new file mode 100644 index 000000000000..98bf819fd6a5 --- /dev/null +++ b/api/src/wasmtime_environ/address_map.rs.html @@ -0,0 +1,143 @@ +address_map.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+
+//! Data structures to provide transformation of the source
+// addresses of a WebAssembly module into the native code.
+
+use cranelift_codegen::ir;
+use cranelift_entity::PrimaryMap;
+use cranelift_wasm::DefinedFuncIndex;
+use serde::{Deserialize, Serialize};
+
+/// Single source location to generated address mapping.
+#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
+pub struct InstructionAddressMap {
+    /// Original source location.
+    pub srcloc: ir::SourceLoc,
+
+    /// Generated instructions offset.
+    pub code_offset: usize,
+
+    /// Generated instructions length.
+    pub code_len: usize,
+}
+
+/// Function and its instructions addresses mappings.
+#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
+pub struct FunctionAddressMap {
+    /// Instructions maps.
+    /// The array is sorted by the InstructionAddressMap::code_offset field.
+    pub instructions: Vec<InstructionAddressMap>,
+
+    /// Function start source location (normally declaration).
+    pub start_srcloc: ir::SourceLoc,
+
+    /// Function end source location.
+    pub end_srcloc: ir::SourceLoc,
+
+    /// Generated function body offset if applicable, otherwise 0.
+    pub body_offset: usize,
+
+    /// Generated function body length.
+    pub body_len: usize,
+}
+
+/// Module functions addresses mappings.
+pub type ModuleAddressMap = PrimaryMap<DefinedFuncIndex, FunctionAddressMap>;
+
+/// Value ranges for functions.
+pub type ValueLabelsRanges = PrimaryMap<DefinedFuncIndex, cranelift_codegen::ValueLabelsRanges>;
+
+/// Stack slots for functions.
+pub type StackSlots = PrimaryMap<DefinedFuncIndex, ir::StackSlots>;
+
+/// Memory definition offset in the VMContext structure.
+#[derive(Debug, Clone)]
+pub enum ModuleMemoryOffset {
+    /// Not available.
+    None,
+    /// Offset to the defined memory.
+    Defined(u32),
+    /// Offset to the imported memory.
+    Imported(u32),
+}
+
+/// Module `vmctx` related info.
+#[derive(Debug, Clone)]
+pub struct ModuleVmctxInfo {
+    /// The memory definition offset in the VMContext structure.
+    pub memory_offset: ModuleMemoryOffset,
+
+    /// The functions stack slots.
+    pub stack_slots: StackSlots,
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/cache.rs.html b/api/src/wasmtime_environ/cache.rs.html new file mode 100644 index 000000000000..a719d08919d5 --- /dev/null +++ b/api/src/wasmtime_environ/cache.rs.html @@ -0,0 +1,565 @@ +cache.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+
+use crate::address_map::{ModuleAddressMap, ValueLabelsRanges};
+use crate::compilation::{Compilation, Relocations, Traps};
+use crate::module::Module;
+use crate::module_environ::FunctionBodyData;
+use cranelift_codegen::{ir, isa};
+use cranelift_entity::PrimaryMap;
+use cranelift_wasm::DefinedFuncIndex;
+use log::{debug, trace, warn};
+use serde::{Deserialize, Serialize};
+use sha2::{Digest, Sha256};
+use std::fs;
+use std::hash::Hasher;
+use std::io::Write;
+use std::path::{Path, PathBuf};
+
+#[macro_use] // for tests
+mod config;
+mod worker;
+
+pub use config::{create_new_config, CacheConfig};
+use worker::Worker;
+
+pub struct ModuleCacheEntry<'config>(Option<ModuleCacheEntryInner<'config>>);
+
+struct ModuleCacheEntryInner<'config> {
+    mod_cache_path: PathBuf,
+    cache_config: &'config CacheConfig,
+}
+
+/// Cached compilation data of a Wasm module.
+#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)]
+pub struct ModuleCacheData {
+    compilation: Compilation,
+    relocations: Relocations,
+    address_transforms: ModuleAddressMap,
+    value_ranges: ValueLabelsRanges,
+    stack_slots: PrimaryMap<DefinedFuncIndex, ir::StackSlots>,
+    traps: Traps,
+}
+
+/// A type alias over the module cache data as a tuple.
+pub type ModuleCacheDataTupleType = (
+    Compilation,
+    Relocations,
+    ModuleAddressMap,
+    ValueLabelsRanges,
+    PrimaryMap<DefinedFuncIndex, ir::StackSlots>,
+    Traps,
+);
+
+struct Sha256Hasher(Sha256);
+
+impl<'config> ModuleCacheEntry<'config> {
+    pub fn new<'data>(
+        module: &Module,
+        function_body_inputs: &PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
+        isa: &dyn isa::TargetIsa,
+        compiler_name: &str,
+        generate_debug_info: bool,
+        cache_config: &'config CacheConfig,
+    ) -> Self {
+        if cache_config.enabled() {
+            Self(Some(ModuleCacheEntryInner::new(
+                module,
+                function_body_inputs,
+                isa,
+                compiler_name,
+                generate_debug_info,
+                cache_config,
+            )))
+        } else {
+            Self(None)
+        }
+    }
+
+    #[cfg(test)]
+    fn from_inner(inner: ModuleCacheEntryInner<'config>) -> Self {
+        Self(Some(inner))
+    }
+
+    pub fn get_data(&self) -> Option<ModuleCacheData> {
+        if let Some(inner) = &self.0 {
+            inner.get_data().map(|val| {
+                inner
+                    .cache_config
+                    .worker()
+                    .on_cache_get_async(&inner.mod_cache_path); // call on success
+                val
+            })
+        } else {
+            None
+        }
+    }
+
+    pub fn update_data(&self, data: &ModuleCacheData) {
+        if let Some(inner) = &self.0 {
+            if inner.update_data(data).is_some() {
+                inner
+                    .cache_config
+                    .worker()
+                    .on_cache_update_async(&inner.mod_cache_path); // call on success
+            }
+        }
+    }
+}
+
+impl<'config> ModuleCacheEntryInner<'config> {
+    fn new<'data>(
+        module: &Module,
+        function_body_inputs: &PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
+        isa: &dyn isa::TargetIsa,
+        compiler_name: &str,
+        generate_debug_info: bool,
+        cache_config: &'config CacheConfig,
+    ) -> Self {
+        let hash = Sha256Hasher::digest(module, function_body_inputs);
+        let compiler_dir = if cfg!(debug_assertions) {
+            fn self_mtime() -> Option<String> {
+                let path = std::env::current_exe().ok()?;
+                let metadata = path.metadata().ok()?;
+                let mtime = metadata.modified().ok()?;
+                Some(match mtime.duration_since(std::time::UNIX_EPOCH) {
+                    Ok(dur) => format!("{}", dur.as_millis()),
+                    Err(err) => format!("m{}", err.duration().as_millis()),
+                })
+            }
+            let self_mtime = self_mtime().unwrap_or("no-mtime".to_string());
+            format!(
+                "{comp_name}-{comp_ver}-{comp_mtime}",
+                comp_name = compiler_name,
+                comp_ver = env!("GIT_REV"),
+                comp_mtime = self_mtime,
+            )
+        } else {
+            format!(
+                "{comp_name}-{comp_ver}",
+                comp_name = compiler_name,
+                comp_ver = env!("GIT_REV"),
+            )
+        };
+        let mod_filename = format!(
+            "mod-{mod_hash}{mod_dbg}",
+            mod_hash = base64::encode_config(&hash, base64::URL_SAFE_NO_PAD), // standard encoding uses '/' which can't be used for filename
+            mod_dbg = if generate_debug_info { ".d" } else { "" },
+        );
+        let mod_cache_path = cache_config
+            .directory()
+            .join(isa.triple().to_string())
+            .join(compiler_dir)
+            .join(mod_filename);
+
+        Self {
+            mod_cache_path,
+            cache_config,
+        }
+    }
+
+    fn get_data(&self) -> Option<ModuleCacheData> {
+        trace!("get_data() for path: {}", self.mod_cache_path.display());
+        let compressed_cache_bytes = fs::read(&self.mod_cache_path).ok()?;
+        let cache_bytes = zstd::decode_all(&compressed_cache_bytes[..])
+            .map_err(|err| warn!("Failed to decompress cached code: {}", err))
+            .ok()?;
+        bincode::deserialize(&cache_bytes[..])
+            .map_err(|err| warn!("Failed to deserialize cached code: {}", err))
+            .ok()
+    }
+
+    fn update_data(&self, data: &ModuleCacheData) -> Option<()> {
+        trace!("update_data() for path: {}", self.mod_cache_path.display());
+        let serialized_data = bincode::serialize(&data)
+            .map_err(|err| warn!("Failed to serialize cached code: {}", err))
+            .ok()?;
+        let compressed_data = zstd::encode_all(
+            &serialized_data[..],
+            self.cache_config.baseline_compression_level(),
+        )
+        .map_err(|err| warn!("Failed to compress cached code: {}", err))
+        .ok()?;
+
+        // Optimize syscalls: first, try writing to disk. It should succeed in most cases.
+        // Otherwise, try creating the cache directory and retry writing to the file.
+        if fs_write_atomic(&self.mod_cache_path, "mod", &compressed_data) {
+            return Some(());
+        }
+
+        debug!(
+            "Attempting to create the cache directory, because \
+             failed to write cached code to disk, path: {}",
+            self.mod_cache_path.display(),
+        );
+
+        let cache_dir = self.mod_cache_path.parent().unwrap();
+        fs::create_dir_all(cache_dir)
+            .map_err(|err| {
+                warn!(
+                    "Failed to create cache directory, path: {}, message: {}",
+                    cache_dir.display(),
+                    err
+                )
+            })
+            .ok()?;
+
+        if fs_write_atomic(&self.mod_cache_path, "mod", &compressed_data) {
+            Some(())
+        } else {
+            None
+        }
+    }
+}
+
+impl ModuleCacheData {
+    pub fn from_tuple(data: ModuleCacheDataTupleType) -> Self {
+        Self {
+            compilation: data.0,
+            relocations: data.1,
+            address_transforms: data.2,
+            value_ranges: data.3,
+            stack_slots: data.4,
+            traps: data.5,
+        }
+    }
+
+    pub fn into_tuple(self) -> ModuleCacheDataTupleType {
+        (
+            self.compilation,
+            self.relocations,
+            self.address_transforms,
+            self.value_ranges,
+            self.stack_slots,
+            self.traps,
+        )
+    }
+}
+
+impl Sha256Hasher {
+    pub fn digest<'data>(
+        module: &Module,
+        function_body_inputs: &PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
+    ) -> [u8; 32] {
+        let mut hasher = Self(Sha256::new());
+        module.hash_for_cache(function_body_inputs, &mut hasher);
+        hasher.0.result().into()
+    }
+}
+
+impl Hasher for Sha256Hasher {
+    fn finish(&self) -> u64 {
+        panic!("Sha256Hasher doesn't support finish!");
+    }
+
+    fn write(&mut self, bytes: &[u8]) {
+        self.0.input(bytes);
+    }
+}
+
+// Assumption: path inside cache directory.
+// Then, we don't have to use sound OS-specific exclusive file access.
+// Note: there's no need to remove temporary file here - cleanup task will do it later.
+fn fs_write_atomic(path: &Path, reason: &str, contents: &[u8]) -> bool {
+    let lock_path = path.with_extension(format!("wip-atomic-write-{}", reason));
+    fs::OpenOptions::new()
+        .create_new(true) // atomic file creation (assumption: no one will open it without this flag)
+        .write(true)
+        .open(&lock_path)
+        .and_then(|mut file| file.write_all(contents))
+        // file should go out of scope and be closed at this point
+        .and_then(|()| fs::rename(&lock_path, &path)) // atomic file rename
+        .map_err(|err| {
+            warn!(
+                "Failed to write file with rename, lock path: {}, target path: {}, err: {}",
+                lock_path.display(),
+                path.display(),
+                err
+            )
+        })
+        .is_ok()
+}
+
+#[cfg(test)]
+mod tests;
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/cache/config.rs.html b/api/src/wasmtime_environ/cache/config.rs.html new file mode 100644 index 000000000000..dbf5327a21ee --- /dev/null +++ b/api/src/wasmtime_environ/cache/config.rs.html @@ -0,0 +1,1113 @@ +config.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+
+//! Module for configuring the cache system.
+
+use super::Worker;
+use anyhow::{anyhow, bail, Context, Result};
+use directories::ProjectDirs;
+use log::{trace, warn};
+use serde::{
+    de::{self, Deserializer},
+    Deserialize,
+};
+use std::fmt::Debug;
+use std::fs;
+use std::path::{Path, PathBuf};
+use std::time::Duration;
+
+// wrapped, so we have named section in config,
+// also, for possible future compatibility
+#[derive(Deserialize, Debug)]
+#[serde(deny_unknown_fields)]
+struct Config {
+    cache: CacheConfig,
+}
+
+/// Global configuration for how the cache is managed
+#[derive(Deserialize, Debug, Clone)]
+#[serde(deny_unknown_fields)]
+pub struct CacheConfig {
+    enabled: bool,
+    directory: Option<PathBuf>,
+    #[serde(
+        default,
+        rename = "worker-event-queue-size",
+        deserialize_with = "deserialize_si_prefix"
+    )]
+    worker_event_queue_size: Option<u64>,
+    #[serde(rename = "baseline-compression-level")]
+    baseline_compression_level: Option<i32>,
+    #[serde(rename = "optimized-compression-level")]
+    optimized_compression_level: Option<i32>,
+    #[serde(
+        default,
+        rename = "optimized-compression-usage-counter-threshold",
+        deserialize_with = "deserialize_si_prefix"
+    )]
+    optimized_compression_usage_counter_threshold: Option<u64>,
+    #[serde(
+        default,
+        rename = "cleanup-interval",
+        deserialize_with = "deserialize_duration"
+    )]
+    cleanup_interval: Option<Duration>,
+    #[serde(
+        default,
+        rename = "optimizing-compression-task-timeout",
+        deserialize_with = "deserialize_duration"
+    )]
+    optimizing_compression_task_timeout: Option<Duration>,
+    #[serde(
+        default,
+        rename = "allowed-clock-drift-for-files-from-future",
+        deserialize_with = "deserialize_duration"
+    )]
+    allowed_clock_drift_for_files_from_future: Option<Duration>,
+    #[serde(
+        default,
+        rename = "file-count-soft-limit",
+        deserialize_with = "deserialize_si_prefix"
+    )]
+    file_count_soft_limit: Option<u64>,
+    #[serde(
+        default,
+        rename = "files-total-size-soft-limit",
+        deserialize_with = "deserialize_disk_space"
+    )]
+    files_total_size_soft_limit: Option<u64>,
+    #[serde(
+        default,
+        rename = "file-count-limit-percent-if-deleting",
+        deserialize_with = "deserialize_percent"
+    )]
+    file_count_limit_percent_if_deleting: Option<u8>,
+    #[serde(
+        default,
+        rename = "files-total-size-limit-percent-if-deleting",
+        deserialize_with = "deserialize_percent"
+    )]
+    files_total_size_limit_percent_if_deleting: Option<u8>,
+
+    #[serde(skip)]
+    worker: Option<Worker>,
+}
+
+/// Creates a new configuration file at specified path, or default path if None is passed.
+/// Fails if file already exists.
+pub fn create_new_config<P: AsRef<Path> + Debug>(config_file: Option<P>) -> Result<PathBuf> {
+    trace!("Creating new config file, path: {:?}", config_file);
+
+    let config_file = match config_file {
+        Some(path) => path.as_ref().to_path_buf(),
+        None => default_config_path()?,
+    };
+
+    if config_file.exists() {
+        bail!(
+            "Configuration file '{}' already exists.",
+            config_file.display()
+        );
+    }
+
+    let parent_dir = config_file
+        .parent()
+        .ok_or_else(|| anyhow!("Invalid cache config path: {}", config_file.display()))?;
+
+    fs::create_dir_all(parent_dir).with_context(|| {
+        format!(
+            "Failed to create config directory, config path: {}",
+            config_file.display(),
+        )
+    })?;
+
+    let content = "\
+# Comment out certain settings to use default values.
+# For more settings, please refer to the documentation:
+# https://bytecodealliance.github.io/wasmtime/cli-cache.html
+
+[cache]
+enabled = true
+";
+
+    fs::write(&config_file, &content).with_context(|| {
+        format!(
+            "Failed to flush config to the disk, path: {}",
+            config_file.display(),
+        )
+    })?;
+
+    Ok(config_file.to_path_buf())
+}
+
+// permitted levels from: https://docs.rs/zstd/0.4.28+zstd.1.4.3/zstd/stream/write/struct.Encoder.html
+const ZSTD_COMPRESSION_LEVELS: std::ops::RangeInclusive<i32> = 0..=21;
+
+// Default settings, you're welcome to tune them!
+// TODO: what do we want to warn users about?
+
+// At the moment of writing, the modules couldn't depend on anothers,
+// so we have at most one module per wasmtime instance
+// if changed, update cli-cache.md
+const DEFAULT_WORKER_EVENT_QUEUE_SIZE: u64 = 0x10;
+const WORKER_EVENT_QUEUE_SIZE_WARNING_TRESHOLD: u64 = 3;
+// should be quick and provide good enough compression
+// if changed, update cli-cache.md
+const DEFAULT_BASELINE_COMPRESSION_LEVEL: i32 = zstd::DEFAULT_COMPRESSION_LEVEL;
+// should provide significantly better compression than baseline
+// if changed, update cli-cache.md
+const DEFAULT_OPTIMIZED_COMPRESSION_LEVEL: i32 = 20;
+// shouldn't be to low to avoid recompressing too many files
+// if changed, update cli-cache.md
+const DEFAULT_OPTIMIZED_COMPRESSION_USAGE_COUNTER_THRESHOLD: u64 = 0x100;
+// if changed, update cli-cache.md
+const DEFAULT_CLEANUP_INTERVAL: Duration = Duration::from_secs(60 * 60);
+// if changed, update cli-cache.md
+const DEFAULT_OPTIMIZING_COMPRESSION_TASK_TIMEOUT: Duration = Duration::from_secs(30 * 60);
+// the default assumes problems with timezone configuration on network share + some clock drift
+// please notice 24 timezones = max 23h difference between some of them
+// if changed, update cli-cache.md
+const DEFAULT_ALLOWED_CLOCK_DRIFT_FOR_FILES_FROM_FUTURE: Duration =
+    Duration::from_secs(60 * 60 * 24);
+// if changed, update cli-cache.md
+const DEFAULT_FILE_COUNT_SOFT_LIMIT: u64 = 0x10_000;
+// if changed, update cli-cache.md
+const DEFAULT_FILES_TOTAL_SIZE_SOFT_LIMIT: u64 = 1024 * 1024 * 512;
+// if changed, update cli-cache.md
+const DEFAULT_FILE_COUNT_LIMIT_PERCENT_IF_DELETING: u8 = 70;
+// if changed, update cli-cache.md
+const DEFAULT_FILES_TOTAL_SIZE_LIMIT_PERCENT_IF_DELETING: u8 = 70;
+
+fn project_dirs() -> Option<ProjectDirs> {
+    ProjectDirs::from("", "BytecodeAlliance", "wasmtime")
+}
+
+fn default_config_path() -> Result<PathBuf> {
+    match project_dirs() {
+        Some(dirs) => Ok(dirs.config_dir().join("config.toml")),
+        None => bail!("config file not specified and failed to get the default"),
+    }
+}
+
+// Deserializers of our custom formats
+// can be replaced with const generics later
+macro_rules! generate_deserializer {
+    ($name:ident($numname:ident: $numty:ty, $unitname:ident: &str) -> $retty:ty {$body:expr}) => {
+        fn $name<'de, D>(deserializer: D) -> Result<$retty, D::Error>
+        where
+            D: Deserializer<'de>,
+        {
+            let text = Option::<String>::deserialize(deserializer)?;
+            let text = match text {
+                None => return Ok(None),
+                Some(text) => text,
+            };
+            let text = text.trim();
+            let split_point = text.find(|c: char| !c.is_numeric());
+            let (num, unit) = split_point.map_or_else(|| (text, ""), |p| text.split_at(p));
+            let deserialized = (|| {
+                let $numname = num.parse::<$numty>().ok()?;
+                let $unitname = unit.trim();
+                $body
+            })();
+            if deserialized.is_some() {
+                Ok(deserialized)
+            } else {
+                Err(de::Error::custom(
+                    "Invalid value, please refer to the documentation",
+                ))
+            }
+        }
+    };
+}
+
+generate_deserializer!(deserialize_duration(num: u64, unit: &str) -> Option<Duration> {
+    match unit {
+        "s" => Some(Duration::from_secs(num)),
+        "m" => Some(Duration::from_secs(num * 60)),
+        "h" => Some(Duration::from_secs(num * 60 * 60)),
+        "d" => Some(Duration::from_secs(num * 60 * 60 * 24)),
+        _ => None,
+    }
+});
+
+generate_deserializer!(deserialize_si_prefix(num: u64, unit: &str) -> Option<u64> {
+    match unit {
+        "" => Some(num),
+        "K" => num.checked_mul(1_000),
+        "M" => num.checked_mul(1_000_000),
+        "G" => num.checked_mul(1_000_000_000),
+        "T" => num.checked_mul(1_000_000_000_000),
+        "P" => num.checked_mul(1_000_000_000_000_000),
+        _ => None,
+    }
+});
+
+generate_deserializer!(deserialize_disk_space(num: u64, unit: &str) -> Option<u64> {
+    match unit {
+        "" => Some(num),
+        "K" => num.checked_mul(1_000),
+        "Ki" => num.checked_mul(1u64 << 10),
+        "M" => num.checked_mul(1_000_000),
+        "Mi" => num.checked_mul(1u64 << 20),
+        "G" => num.checked_mul(1_000_000_000),
+        "Gi" => num.checked_mul(1u64 << 30),
+        "T" => num.checked_mul(1_000_000_000_000),
+        "Ti" => num.checked_mul(1u64 << 40),
+        "P" => num.checked_mul(1_000_000_000_000_000),
+        "Pi" => num.checked_mul(1u64 << 50),
+        _ => None,
+    }
+});
+
+generate_deserializer!(deserialize_percent(num: u8, unit: &str) -> Option<u8> {
+    match unit {
+        "%" => Some(num),
+        _ => None,
+    }
+});
+
+static CACHE_IMPROPER_CONFIG_ERROR_MSG: &str =
+    "Cache system should be enabled and all settings must be validated or defaulted";
+
+macro_rules! generate_setting_getter {
+    ($setting:ident: $setting_type:ty) => {
+        /// Returns `$setting`.
+        ///
+        /// Panics if the cache is disabled.
+        pub fn $setting(&self) -> $setting_type {
+            self
+                .$setting
+                .expect(CACHE_IMPROPER_CONFIG_ERROR_MSG)
+        }
+    };
+}
+
+impl CacheConfig {
+    generate_setting_getter!(worker_event_queue_size: u64);
+    generate_setting_getter!(baseline_compression_level: i32);
+    generate_setting_getter!(optimized_compression_level: i32);
+    generate_setting_getter!(optimized_compression_usage_counter_threshold: u64);
+    generate_setting_getter!(cleanup_interval: Duration);
+    generate_setting_getter!(optimizing_compression_task_timeout: Duration);
+    generate_setting_getter!(allowed_clock_drift_for_files_from_future: Duration);
+    generate_setting_getter!(file_count_soft_limit: u64);
+    generate_setting_getter!(files_total_size_soft_limit: u64);
+    generate_setting_getter!(file_count_limit_percent_if_deleting: u8);
+    generate_setting_getter!(files_total_size_limit_percent_if_deleting: u8);
+
+    /// Returns true if and only if the cache is enabled.
+    pub fn enabled(&self) -> bool {
+        self.enabled
+    }
+
+    /// Returns path to the cache directory.
+    ///
+    /// Panics if the cache is disabled.
+    pub fn directory(&self) -> &PathBuf {
+        self.directory
+            .as_ref()
+            .expect(CACHE_IMPROPER_CONFIG_ERROR_MSG)
+    }
+
+    /// Creates a new set of configuration which represents a disabled cache
+    pub fn new_cache_disabled() -> Self {
+        Self {
+            enabled: false,
+            directory: None,
+            worker_event_queue_size: None,
+            baseline_compression_level: None,
+            optimized_compression_level: None,
+            optimized_compression_usage_counter_threshold: None,
+            cleanup_interval: None,
+            optimizing_compression_task_timeout: None,
+            allowed_clock_drift_for_files_from_future: None,
+            file_count_soft_limit: None,
+            files_total_size_soft_limit: None,
+            file_count_limit_percent_if_deleting: None,
+            files_total_size_limit_percent_if_deleting: None,
+            worker: None,
+        }
+    }
+
+    fn new_cache_enabled_template() -> Self {
+        let mut conf = Self::new_cache_disabled();
+        conf.enabled = true;
+        conf
+    }
+
+    /// Parses cache configuration from the file specified
+    pub fn from_file(config_file: Option<&Path>) -> Result<Self> {
+        let mut config = Self::load_and_parse_file(config_file)?;
+
+        // validate values and fill in defaults
+        config.validate_directory_or_default()?;
+        config.validate_worker_event_queue_size_or_default();
+        config.validate_baseline_compression_level_or_default()?;
+        config.validate_optimized_compression_level_or_default()?;
+        config.validate_optimized_compression_usage_counter_threshold_or_default();
+        config.validate_cleanup_interval_or_default();
+        config.validate_optimizing_compression_task_timeout_or_default();
+        config.validate_allowed_clock_drift_for_files_from_future_or_default();
+        config.validate_file_count_soft_limit_or_default();
+        config.validate_files_total_size_soft_limit_or_default();
+        config.validate_file_count_limit_percent_if_deleting_or_default()?;
+        config.validate_files_total_size_limit_percent_if_deleting_or_default()?;
+        config.spawn_worker();
+
+        Ok(config)
+    }
+
+    fn spawn_worker(&mut self) {
+        if self.enabled {
+            self.worker = Some(Worker::start_new(self, None));
+        }
+    }
+
+    pub(super) fn worker(&self) -> &Worker {
+        assert!(self.enabled);
+        self.worker.as_ref().unwrap()
+    }
+
+    fn load_and_parse_file(config_file: Option<&Path>) -> Result<Self> {
+        // get config file path
+        let (config_file, user_custom_file) = match config_file {
+            Some(path) => (path.to_path_buf(), true),
+            None => (default_config_path()?, false),
+        };
+
+        // read config, or use default one
+        let entity_exists = config_file.exists();
+        match (entity_exists, user_custom_file) {
+            (false, false) => Ok(Self::new_cache_enabled_template()),
+            _ => {
+                let bytes = fs::read(&config_file).context(format!(
+                    "failed to read config file: {}",
+                    config_file.display()
+                ))?;
+                let config = toml::from_slice::<Config>(&bytes[..]).context(format!(
+                    "failed to parse config file: {}",
+                    config_file.display()
+                ))?;
+                Ok(config.cache)
+            }
+        }
+    }
+
+    fn validate_directory_or_default(&mut self) -> Result<()> {
+        if self.directory.is_none() {
+            match project_dirs() {
+                Some(proj_dirs) => self.directory = Some(proj_dirs.cache_dir().to_path_buf()),
+                None => {
+                    bail!("Cache directory not specified and failed to get the default");
+                }
+            }
+        }
+
+        // On Windows, if we want long paths, we need '\\?\' prefix, but it doesn't work
+        // with relative paths. One way to get absolute path (the only one?) is to use
+        // fs::canonicalize, but it requires that given path exists. The extra advantage
+        // of this method is fact that the method prepends '\\?\' on Windows.
+        let cache_dir = self.directory.as_ref().unwrap();
+
+        if !cache_dir.is_absolute() {
+            bail!(
+                "Cache directory path has to be absolute, path: {}",
+                cache_dir.display(),
+            );
+        }
+
+        fs::create_dir_all(cache_dir).context(format!(
+            "failed to create cache directory: {}",
+            cache_dir.display()
+        ))?;
+        let canonical = fs::canonicalize(cache_dir).context(format!(
+            "failed to canonicalize cache directory: {}",
+            cache_dir.display()
+        ))?;
+        self.directory = Some(canonical);
+        Ok(())
+    }
+
+    fn validate_worker_event_queue_size_or_default(&mut self) {
+        if self.worker_event_queue_size.is_none() {
+            self.worker_event_queue_size = Some(DEFAULT_WORKER_EVENT_QUEUE_SIZE);
+        }
+
+        if self.worker_event_queue_size.unwrap() < WORKER_EVENT_QUEUE_SIZE_WARNING_TRESHOLD {
+            warn!("Detected small worker event queue size. Some messages might be lost.");
+        }
+    }
+
+    fn validate_baseline_compression_level_or_default(&mut self) -> Result<()> {
+        if self.baseline_compression_level.is_none() {
+            self.baseline_compression_level = Some(DEFAULT_BASELINE_COMPRESSION_LEVEL);
+        }
+
+        if !ZSTD_COMPRESSION_LEVELS.contains(&self.baseline_compression_level.unwrap()) {
+            bail!(
+                "Invalid baseline compression level: {} not in {:#?}",
+                self.baseline_compression_level.unwrap(),
+                ZSTD_COMPRESSION_LEVELS
+            );
+        }
+        Ok(())
+    }
+
+    // assumption: baseline compression level has been verified
+    fn validate_optimized_compression_level_or_default(&mut self) -> Result<()> {
+        if self.optimized_compression_level.is_none() {
+            self.optimized_compression_level = Some(DEFAULT_OPTIMIZED_COMPRESSION_LEVEL);
+        }
+
+        let opt_lvl = self.optimized_compression_level.unwrap();
+        let base_lvl = self.baseline_compression_level.unwrap();
+
+        if !ZSTD_COMPRESSION_LEVELS.contains(&opt_lvl) {
+            bail!(
+                "Invalid optimized compression level: {} not in {:#?}",
+                opt_lvl,
+                ZSTD_COMPRESSION_LEVELS
+            );
+        }
+
+        if opt_lvl < base_lvl {
+            bail!(
+                "Invalid optimized compression level is lower than baseline: {} < {}",
+                opt_lvl,
+                base_lvl
+            );
+        }
+        Ok(())
+    }
+
+    fn validate_optimized_compression_usage_counter_threshold_or_default(&mut self) {
+        if self.optimized_compression_usage_counter_threshold.is_none() {
+            self.optimized_compression_usage_counter_threshold =
+                Some(DEFAULT_OPTIMIZED_COMPRESSION_USAGE_COUNTER_THRESHOLD);
+        }
+    }
+
+    fn validate_cleanup_interval_or_default(&mut self) {
+        if self.cleanup_interval.is_none() {
+            self.cleanup_interval = Some(DEFAULT_CLEANUP_INTERVAL);
+        }
+    }
+
+    fn validate_optimizing_compression_task_timeout_or_default(&mut self) {
+        if self.optimizing_compression_task_timeout.is_none() {
+            self.optimizing_compression_task_timeout =
+                Some(DEFAULT_OPTIMIZING_COMPRESSION_TASK_TIMEOUT);
+        }
+    }
+
+    fn validate_allowed_clock_drift_for_files_from_future_or_default(&mut self) {
+        if self.allowed_clock_drift_for_files_from_future.is_none() {
+            self.allowed_clock_drift_for_files_from_future =
+                Some(DEFAULT_ALLOWED_CLOCK_DRIFT_FOR_FILES_FROM_FUTURE);
+        }
+    }
+
+    fn validate_file_count_soft_limit_or_default(&mut self) {
+        if self.file_count_soft_limit.is_none() {
+            self.file_count_soft_limit = Some(DEFAULT_FILE_COUNT_SOFT_LIMIT);
+        }
+    }
+
+    fn validate_files_total_size_soft_limit_or_default(&mut self) {
+        if self.files_total_size_soft_limit.is_none() {
+            self.files_total_size_soft_limit = Some(DEFAULT_FILES_TOTAL_SIZE_SOFT_LIMIT);
+        }
+    }
+
+    fn validate_file_count_limit_percent_if_deleting_or_default(&mut self) -> Result<()> {
+        if self.file_count_limit_percent_if_deleting.is_none() {
+            self.file_count_limit_percent_if_deleting =
+                Some(DEFAULT_FILE_COUNT_LIMIT_PERCENT_IF_DELETING);
+        }
+
+        let percent = self.file_count_limit_percent_if_deleting.unwrap();
+        if percent > 100 {
+            bail!(
+                "Invalid files count limit percent if deleting: {} not in range 0-100%",
+                percent
+            );
+        }
+        Ok(())
+    }
+
+    fn validate_files_total_size_limit_percent_if_deleting_or_default(&mut self) -> Result<()> {
+        if self.files_total_size_limit_percent_if_deleting.is_none() {
+            self.files_total_size_limit_percent_if_deleting =
+                Some(DEFAULT_FILES_TOTAL_SIZE_LIMIT_PERCENT_IF_DELETING);
+        }
+
+        let percent = self.files_total_size_limit_percent_if_deleting.unwrap();
+        if percent > 100 {
+            bail!(
+                "Invalid files total size limit percent if deleting: {} not in range 0-100%",
+                percent
+            );
+        }
+        Ok(())
+    }
+}
+
+#[cfg(test)]
+#[macro_use]
+pub mod tests;
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/cache/worker.rs.html b/api/src/wasmtime_environ/cache/worker.rs.html new file mode 100644 index 000000000000..186cc5448bbb --- /dev/null +++ b/api/src/wasmtime_environ/cache/worker.rs.html @@ -0,0 +1,1803 @@ +worker.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+
+//! Background worker that watches over the cache.
+//!
+//! It cleans up old cache, updates statistics and optimizes the cache.
+//! We allow losing some messages (it doesn't hurt) and some races,
+//! but we guarantee eventual consistency and fault tolerancy.
+//! Background tasks can be CPU intensive, but the worker thread has low priority.
+
+use super::{fs_write_atomic, CacheConfig};
+use log::{debug, info, trace, warn};
+use serde::{Deserialize, Serialize};
+use std::cmp;
+use std::collections::HashMap;
+use std::ffi::OsStr;
+use std::fmt;
+use std::fs;
+use std::path::{Path, PathBuf};
+use std::sync::mpsc::{sync_channel, Receiver, SyncSender};
+#[cfg(test)]
+use std::sync::{Arc, Condvar, Mutex};
+use std::thread;
+use std::time::Duration;
+#[cfg(not(test))]
+use std::time::SystemTime;
+#[cfg(test)]
+use tests::system_time_stub::SystemTimeStub as SystemTime;
+
+#[derive(Clone)]
+pub(super) struct Worker {
+    sender: SyncSender<CacheEvent>,
+    #[cfg(test)]
+    stats: Arc<(Mutex<WorkerStats>, Condvar)>,
+}
+
+struct WorkerThread {
+    receiver: Receiver<CacheEvent>,
+    cache_config: CacheConfig,
+    #[cfg(test)]
+    stats: Arc<(Mutex<WorkerStats>, Condvar)>,
+}
+
+#[cfg(test)]
+#[derive(Default)]
+struct WorkerStats {
+    dropped: u32,
+    sent: u32,
+    handled: u32,
+}
+
+#[derive(Debug, Clone)]
+enum CacheEvent {
+    OnCacheGet(PathBuf),
+    OnCacheUpdate(PathBuf),
+}
+
+impl Worker {
+    pub(super) fn start_new(
+        cache_config: &CacheConfig,
+        init_file_per_thread_logger: Option<&'static str>,
+    ) -> Self {
+        let queue_size = match cache_config.worker_event_queue_size() {
+            num if num <= usize::max_value() as u64 => num as usize,
+            _ => usize::max_value(),
+        };
+        let (tx, rx) = sync_channel(queue_size);
+
+        #[cfg(test)]
+        let stats = Arc::new((Mutex::new(WorkerStats::default()), Condvar::new()));
+
+        let worker_thread = WorkerThread {
+            receiver: rx,
+            cache_config: cache_config.clone(),
+            #[cfg(test)]
+            stats: stats.clone(),
+        };
+
+        // when self is dropped, sender will be dropped, what will cause the channel
+        // to hang, and the worker thread to exit -- it happens in the tests
+        // non-tests binary has only a static worker, so Rust doesn't drop it
+        thread::spawn(move || worker_thread.run(init_file_per_thread_logger));
+
+        Self {
+            sender: tx,
+            #[cfg(test)]
+            stats,
+        }
+    }
+
+    pub(super) fn on_cache_get_async(&self, path: impl AsRef<Path>) {
+        let event = CacheEvent::OnCacheGet(path.as_ref().to_path_buf());
+        self.send_cache_event(event);
+    }
+
+    pub(super) fn on_cache_update_async(&self, path: impl AsRef<Path>) {
+        let event = CacheEvent::OnCacheUpdate(path.as_ref().to_path_buf());
+        self.send_cache_event(event);
+    }
+
+    #[inline]
+    fn send_cache_event(&self, event: CacheEvent) {
+        let sent_event = self.sender.try_send(event.clone());
+
+        if let Err(ref err) = sent_event {
+            info!(
+                "Failed to send asynchronously message to worker thread, \
+                 event: {:?}, error: {}",
+                event, err
+            );
+        }
+
+        #[cfg(test)]
+        {
+            let mut stats = self
+                .stats
+                .0
+                .lock()
+                .expect("Failed to acquire worker stats lock");
+
+            if sent_event.is_ok() {
+                stats.sent += 1;
+            } else {
+                stats.dropped += 1;
+            }
+        }
+    }
+
+    #[cfg(test)]
+    pub(super) fn events_dropped(&self) -> u32 {
+        let stats = self
+            .stats
+            .0
+            .lock()
+            .expect("Failed to acquire worker stats lock");
+        stats.dropped
+    }
+
+    #[cfg(test)]
+    pub(super) fn wait_for_all_events_handled(&self) {
+        let (stats, condvar) = &*self.stats;
+        let mut stats = stats.lock().expect("Failed to acquire worker stats lock");
+        while stats.handled != stats.sent {
+            stats = condvar
+                .wait(stats)
+                .expect("Failed to reacquire worker stats lock");
+        }
+    }
+}
+
+impl fmt::Debug for Worker {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        f.debug_struct("Worker").finish()
+    }
+}
+
+#[derive(Serialize, Deserialize)]
+struct ModuleCacheStatistics {
+    pub usages: u64,
+    #[serde(rename = "optimized-compression")]
+    pub compression_level: i32,
+}
+
+impl ModuleCacheStatistics {
+    fn default(cache_config: &CacheConfig) -> Self {
+        Self {
+            usages: 0,
+            compression_level: cache_config.baseline_compression_level(),
+        }
+    }
+}
+
+enum CacheEntry {
+    Recognized {
+        path: PathBuf,
+        mtime: SystemTime,
+        size: u64,
+    },
+    Unrecognized {
+        path: PathBuf,
+        is_dir: bool,
+    },
+}
+
+macro_rules! unwrap_or_warn {
+    ($result:expr, $cont:stmt, $err_msg:expr, $path:expr) => {
+        match $result {
+            Ok(val) => val,
+            Err(err) => {
+                warn!("{}, path: {}, msg: {}", $err_msg, $path.display(), err);
+                $cont
+            }
+        }
+    };
+}
+
+impl WorkerThread {
+    fn run(self, init_file_per_thread_logger: Option<&'static str>) {
+        if let Some(prefix) = init_file_per_thread_logger {
+            file_per_thread_logger::initialize(prefix);
+        }
+
+        debug!("Cache worker thread started.");
+
+        Self::lower_thread_priority();
+
+        #[cfg(test)]
+        let (stats, condvar) = &*self.stats;
+
+        for event in self.receiver.iter() {
+            match event {
+                CacheEvent::OnCacheGet(path) => self.handle_on_cache_get(path),
+                CacheEvent::OnCacheUpdate(path) => self.handle_on_cache_update(path),
+            }
+
+            #[cfg(test)]
+            {
+                let mut stats = stats.lock().expect("Failed to acquire worker stats lock");
+                stats.handled += 1;
+                condvar.notify_all();
+            }
+        }
+    }
+
+    #[cfg(target_os = "windows")]
+    fn lower_thread_priority() {
+        use std::convert::TryInto;
+        use winapi::um::processthreadsapi::{GetCurrentThread, SetThreadPriority};
+        use winapi::um::winbase::THREAD_MODE_BACKGROUND_BEGIN;
+
+        // https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-setthreadpriority
+        // https://docs.microsoft.com/en-us/windows/win32/procthread/scheduling-priorities
+
+        if unsafe {
+            SetThreadPriority(
+                GetCurrentThread(),
+                THREAD_MODE_BACKGROUND_BEGIN.try_into().unwrap(),
+            )
+        } == 0
+        {
+            warn!(
+                "Failed to lower worker thread priority. It might affect application performance."
+            );
+        }
+    }
+
+    #[cfg(not(target_os = "windows"))]
+    fn lower_thread_priority() {
+        // http://man7.org/linux/man-pages/man7/sched.7.html
+
+        const NICE_DELTA_FOR_BACKGROUND_TASKS: i32 = 3;
+
+        errno::set_errno(errno::Errno(0));
+        let current_nice = unsafe { libc::nice(NICE_DELTA_FOR_BACKGROUND_TASKS) };
+        let errno_val = errno::errno().0;
+
+        if errno_val != 0 {
+            warn!(
+                "Failed to lower worker thread priority. It might affect application performance. \
+                 errno: {}",
+                errno_val
+            );
+        } else {
+            debug!("New nice value of worker thread: {}", current_nice);
+        }
+    }
+
+    /// Increases the usage counter and recompresses the file
+    /// if the usage counter reached configurable treshold.
+    fn handle_on_cache_get(&self, path: PathBuf) {
+        trace!("handle_on_cache_get() for path: {}", path.display());
+
+        // construct .stats file path
+        let filename = path.file_name().unwrap().to_str().unwrap();
+        let stats_path = path.with_file_name(format!("{}.stats", filename));
+
+        // load .stats file (default if none or error)
+        let mut stats = read_stats_file(stats_path.as_ref())
+            .unwrap_or_else(|| ModuleCacheStatistics::default(&self.cache_config));
+
+        // step 1: update the usage counter & write to the disk
+        //         it's racy, but it's fine (the counter will be just smaller,
+        //         sometimes will retrigger recompression)
+        stats.usages += 1;
+        if !write_stats_file(stats_path.as_ref(), &stats) {
+            return;
+        }
+
+        // step 2: recompress if there's a need
+        let opt_compr_lvl = self.cache_config.optimized_compression_level();
+        if stats.compression_level >= opt_compr_lvl
+            || stats.usages
+                < self
+                    .cache_config
+                    .optimized_compression_usage_counter_threshold()
+        {
+            return;
+        }
+
+        let lock_path = if let Some(p) = acquire_task_fs_lock(
+            path.as_ref(),
+            self.cache_config.optimizing_compression_task_timeout(),
+            self.cache_config
+                .allowed_clock_drift_for_files_from_future(),
+        ) {
+            p
+        } else {
+            return;
+        };
+
+        trace!("Trying to recompress file: {}", path.display());
+
+        // recompress, write to other file, rename (it's atomic file content exchange)
+        // and update the stats file
+        let compressed_cache_bytes = unwrap_or_warn!(
+            fs::read(&path),
+            return,
+            "Failed to read old cache file",
+            path
+        );
+
+        let cache_bytes = unwrap_or_warn!(
+            zstd::decode_all(&compressed_cache_bytes[..]),
+            return,
+            "Failed to decompress cached code",
+            path
+        );
+
+        let recompressed_cache_bytes = unwrap_or_warn!(
+            zstd::encode_all(&cache_bytes[..], opt_compr_lvl),
+            return,
+            "Failed to compress cached code",
+            path
+        );
+
+        unwrap_or_warn!(
+            fs::write(&lock_path, &recompressed_cache_bytes),
+            return,
+            "Failed to write recompressed cache",
+            lock_path
+        );
+
+        unwrap_or_warn!(
+            fs::rename(&lock_path, &path),
+            {
+                if let Err(error) = fs::remove_file(&lock_path) {
+                    warn!(
+                        "Failed to clean up (remove) recompressed cache, path {}, err: {}",
+                        lock_path.display(),
+                        error
+                    );
+                }
+
+                return;
+            },
+            "Failed to rename recompressed cache",
+            lock_path
+        );
+
+        // update stats file (reload it! recompression can take some time)
+        if let Some(mut new_stats) = read_stats_file(stats_path.as_ref()) {
+            if new_stats.compression_level >= opt_compr_lvl {
+                // Rare race:
+                //    two instances with different opt_compr_lvl: we don't know in which order they updated
+                //    the cache file and the stats file (they are not updated together atomically)
+                // Possible solution is to use directories per cache entry, but it complicates the system
+                // and is not worth it.
+                debug!(
+                    "DETECTED task did more than once (or race with new file): \
+                     recompression of {}. Note: if optimized compression level setting \
+                     has changed in the meantine, the stats file might contain \
+                     inconsistent compression level due to race.",
+                    path.display()
+                );
+            } else {
+                new_stats.compression_level = opt_compr_lvl;
+                let _ = write_stats_file(stats_path.as_ref(), &new_stats);
+            }
+
+            if new_stats.usages < stats.usages {
+                debug!(
+                    "DETECTED lower usage count (new file or race with counter \
+                     increasing): file {}",
+                    path.display()
+                );
+            }
+        } else {
+            debug!(
+                "Can't read stats file again to update compression level (it might got \
+                 cleaned up): file {}",
+                stats_path.display()
+            );
+        }
+
+        trace!("Task finished: recompress file: {}", path.display());
+    }
+
+    fn handle_on_cache_update(&self, path: PathBuf) {
+        trace!("handle_on_cache_update() for path: {}", path.display());
+
+        // ---------------------- step 1: create .stats file
+
+        // construct .stats file path
+        let filename = path
+            .file_name()
+            .expect("Expected valid cache file name")
+            .to_str()
+            .expect("Expected valid cache file name");
+        let stats_path = path.with_file_name(format!("{}.stats", filename));
+
+        // create and write stats file
+        let mut stats = ModuleCacheStatistics::default(&self.cache_config);
+        stats.usages += 1;
+        write_stats_file(&stats_path, &stats);
+
+        // ---------------------- step 2: perform cleanup task if needed
+
+        // acquire lock for cleanup task
+        // Lock is a proof of recent cleanup task, so we don't want to delete them.
+        // Expired locks will be deleted by the cleanup task.
+        let cleanup_file = self.cache_config.directory().join(".cleanup"); // some non existing marker file
+        if acquire_task_fs_lock(
+            &cleanup_file,
+            self.cache_config.cleanup_interval(),
+            self.cache_config
+                .allowed_clock_drift_for_files_from_future(),
+        )
+        .is_none()
+        {
+            return;
+        }
+
+        trace!("Trying to clean up cache");
+
+        let mut cache_index = self.list_cache_contents();
+        let future_tolerance = SystemTime::now()
+            .checked_add(
+                self.cache_config
+                    .allowed_clock_drift_for_files_from_future(),
+            )
+            .expect("Brace your cache, the next Big Bang is coming (time overflow)");
+        cache_index.sort_unstable_by(|lhs, rhs| {
+            // sort by age
+            use CacheEntry::*;
+            match (lhs, rhs) {
+                (Recognized { mtime: lhs_mt, .. }, Recognized { mtime: rhs_mt, .. }) => {
+                    match (*lhs_mt > future_tolerance, *rhs_mt > future_tolerance) {
+                        // later == younger
+                        (false, false) => rhs_mt.cmp(lhs_mt),
+                        // files from far future are treated as oldest recognized files
+                        // we want to delete them, so the cache keeps track of recent files
+                        // however, we don't delete them uncodintionally,
+                        // because .stats file can be overwritten with a meaningful mtime
+                        (true, false) => cmp::Ordering::Greater,
+                        (false, true) => cmp::Ordering::Less,
+                        (true, true) => cmp::Ordering::Equal,
+                    }
+                }
+                // unrecognized is kind of infinity
+                (Recognized { .. }, Unrecognized { .. }) => cmp::Ordering::Less,
+                (Unrecognized { .. }, Recognized { .. }) => cmp::Ordering::Greater,
+                (Unrecognized { .. }, Unrecognized { .. }) => cmp::Ordering::Equal,
+            }
+        });
+
+        // find "cut" boundary:
+        // - remove unrecognized files anyway,
+        // - remove some cache files if some quota has been exceeded
+        let mut total_size = 0u64;
+        let mut start_delete_idx = None;
+        let mut start_delete_idx_if_deleting_recognized_items: Option<usize> = None;
+
+        let total_size_limit = self.cache_config.files_total_size_soft_limit();
+        let file_count_limit = self.cache_config.file_count_soft_limit();
+        let tsl_if_deleting = total_size_limit
+            .checked_mul(
+                self.cache_config
+                    .files_total_size_limit_percent_if_deleting() as u64,
+            )
+            .unwrap()
+            / 100;
+        let fcl_if_deleting = file_count_limit
+            .checked_mul(self.cache_config.file_count_limit_percent_if_deleting() as u64)
+            .unwrap()
+            / 100;
+
+        for (idx, item) in cache_index.iter().enumerate() {
+            let size = if let CacheEntry::Recognized { size, .. } = item {
+                size
+            } else {
+                start_delete_idx = Some(idx);
+                break;
+            };
+
+            total_size += size;
+            if start_delete_idx_if_deleting_recognized_items.is_none()
+                && (total_size > tsl_if_deleting || (idx + 1) as u64 > fcl_if_deleting)
+            {
+                start_delete_idx_if_deleting_recognized_items = Some(idx);
+            }
+
+            if total_size > total_size_limit || (idx + 1) as u64 > file_count_limit {
+                start_delete_idx = start_delete_idx_if_deleting_recognized_items;
+                break;
+            }
+        }
+
+        if let Some(idx) = start_delete_idx {
+            for item in &cache_index[idx..] {
+                let (result, path, entity) = match item {
+                    CacheEntry::Recognized { path, .. }
+                    | CacheEntry::Unrecognized {
+                        path,
+                        is_dir: false,
+                    } => (fs::remove_file(path), path, "file"),
+                    CacheEntry::Unrecognized { path, is_dir: true } => {
+                        (fs::remove_dir_all(path), path, "directory")
+                    }
+                };
+                if let Err(err) = result {
+                    warn!(
+                        "Failed to remove {} during cleanup, path: {}, err: {}",
+                        entity,
+                        path.display(),
+                        err
+                    );
+                }
+            }
+        }
+
+        trace!("Task finished: clean up cache");
+    }
+
+    // Be fault tolerant: list as much as you can, and ignore the rest
+    fn list_cache_contents(&self) -> Vec<CacheEntry> {
+        fn enter_dir(
+            vec: &mut Vec<CacheEntry>,
+            dir_path: &Path,
+            level: u8,
+            cache_config: &CacheConfig,
+        ) {
+            macro_rules! add_unrecognized {
+                (file: $path:expr) => {
+                    add_unrecognized!(false, $path)
+                };
+                (dir: $path:expr) => {
+                    add_unrecognized!(true, $path)
+                };
+                ($is_dir:expr, $path:expr) => {
+                    vec.push(CacheEntry::Unrecognized {
+                        path: $path.to_path_buf(),
+                        is_dir: $is_dir,
+                    });
+                };
+            }
+            macro_rules! add_unrecognized_and {
+                ([ $( $ty:ident: $path:expr ),* ], $cont:stmt) => {{
+                    $( add_unrecognized!($ty: $path); )*
+                        $cont
+                }};
+            }
+
+            macro_rules! unwrap_or {
+                ($result:expr, $cont:stmt, $err_msg:expr) => {
+                    unwrap_or!($result, $cont, $err_msg, dir_path)
+                };
+                ($result:expr, $cont:stmt, $err_msg:expr, $path:expr) => {
+                    unwrap_or_warn!(
+                        $result,
+                        $cont,
+                        format!("{}, level: {}", $err_msg, level),
+                        $path
+                    )
+                };
+            }
+
+            // If we fail to list a directory, something bad is happening anyway
+            // (something touches our cache or we have disk failure)
+            // Try to delete it, so we can stay within soft limits of the cache size.
+            // This comment applies later in this function, too.
+            let it = unwrap_or!(
+                fs::read_dir(dir_path),
+                add_unrecognized_and!([dir: dir_path], return),
+                "Failed to list cache directory, deleting it"
+            );
+
+            let mut cache_files = HashMap::new();
+            for entry in it {
+                // read_dir() returns an iterator over results - in case some of them are errors
+                // we don't know their names, so we can't delete them. We don't want to delete
+                // the whole directory with good entries too, so we just ignore the erroneous entries.
+                let entry = unwrap_or!(
+                    entry,
+                    continue,
+                    "Failed to read a cache dir entry (NOT deleting it, it still occupies space)"
+                );
+                let path = entry.path();
+                match (level, path.is_dir()) {
+                    (0..=1, true) => enter_dir(vec, &path, level + 1, cache_config),
+                    (0..=1, false) => {
+                        if level == 0
+                            && path.file_stem() == Some(OsStr::new(".cleanup"))
+                                && path.extension().is_some()
+                                // assume it's cleanup lock
+                                && !is_fs_lock_expired(
+                                    Some(&entry),
+                                    &path,
+                                    cache_config.cleanup_interval(),
+                                    cache_config.allowed_clock_drift_for_files_from_future(),
+                                )
+                        {
+                            continue; // skip active lock
+                        }
+                        add_unrecognized!(file: path);
+                    }
+                    (2, false) => {
+                        match path.extension().and_then(OsStr::to_str) {
+                            // mod or stats file
+                            None | Some("stats") => {
+                                cache_files.insert(path, entry);
+                            }
+
+                            Some(ext) => {
+                                // check if valid lock
+                                let recognized = ext.starts_with("wip-")
+                                    && !is_fs_lock_expired(
+                                        Some(&entry),
+                                        &path,
+                                        cache_config.optimizing_compression_task_timeout(),
+                                        cache_config.allowed_clock_drift_for_files_from_future(),
+                                    );
+
+                                if !recognized {
+                                    add_unrecognized!(file: path);
+                                }
+                            }
+                        }
+                    }
+                    (_, is_dir) => add_unrecognized!(is_dir, path),
+                }
+            }
+
+            // associate module with its stats & handle them
+            // assumption: just mods and stats
+            for (path, entry) in cache_files.iter() {
+                let path_buf: PathBuf;
+                let (mod_, stats_, is_mod) = match path.extension() {
+                    Some(_) => {
+                        path_buf = path.with_extension("");
+                        (
+                            cache_files.get(&path_buf).map(|v| (&path_buf, v)),
+                            Some((path, entry)),
+                            false,
+                        )
+                    }
+                    None => {
+                        path_buf = path.with_extension("stats");
+                        (
+                            Some((path, entry)),
+                            cache_files.get(&path_buf).map(|v| (&path_buf, v)),
+                            true,
+                        )
+                    }
+                };
+
+                // construct a cache entry
+                match (mod_, stats_, is_mod) {
+                    (Some((mod_path, mod_entry)), Some((stats_path, stats_entry)), true) => {
+                        let mod_metadata = unwrap_or!(
+                            mod_entry.metadata(),
+                            add_unrecognized_and!([file: stats_path, file: mod_path], continue),
+                            "Failed to get metadata, deleting BOTH module cache and stats files",
+                            mod_path
+                        );
+                        let stats_mtime = unwrap_or!(
+                            stats_entry.metadata().and_then(|m| m.modified()),
+                            add_unrecognized_and!(
+                                [file: stats_path],
+                                unwrap_or!(
+                                    mod_metadata.modified(),
+                                    add_unrecognized_and!(
+                                        [file: stats_path, file: mod_path],
+                                        continue
+                                    ),
+                                    "Failed to get mtime, deleting BOTH module cache and stats \
+                                     files",
+                                    mod_path
+                                )
+                            ),
+                            "Failed to get metadata/mtime, deleting the file",
+                            stats_path
+                        );
+                        // .into() called for the SystemTimeStub if cfg(test)
+                        #[allow(clippy::identity_conversion)]
+                        vec.push(CacheEntry::Recognized {
+                            path: mod_path.to_path_buf(),
+                            mtime: stats_mtime.into(),
+                            size: mod_metadata.len(),
+                        })
+                    }
+                    (Some(_), Some(_), false) => (), // was or will be handled by previous branch
+                    (Some((mod_path, mod_entry)), None, _) => {
+                        let (mod_metadata, mod_mtime) = unwrap_or!(
+                            mod_entry
+                                .metadata()
+                                .and_then(|md| md.modified().map(|mt| (md, mt))),
+                            add_unrecognized_and!([file: mod_path], continue),
+                            "Failed to get metadata/mtime, deleting the file",
+                            mod_path
+                        );
+                        // .into() called for the SystemTimeStub if cfg(test)
+                        #[allow(clippy::identity_conversion)]
+                        vec.push(CacheEntry::Recognized {
+                            path: mod_path.to_path_buf(),
+                            mtime: mod_mtime.into(),
+                            size: mod_metadata.len(),
+                        })
+                    }
+                    (None, Some((stats_path, _stats_entry)), _) => {
+                        debug!("Found orphaned stats file: {}", stats_path.display());
+                        add_unrecognized!(file: stats_path);
+                    }
+                    _ => unreachable!(),
+                }
+            }
+        }
+
+        let mut vec = Vec::new();
+        enter_dir(
+            &mut vec,
+            self.cache_config.directory(),
+            0,
+            &self.cache_config,
+        );
+        vec
+    }
+}
+
+fn read_stats_file(path: &Path) -> Option<ModuleCacheStatistics> {
+    fs::read(path)
+        .map_err(|err| {
+            trace!(
+                "Failed to read stats file, path: {}, err: {}",
+                path.display(),
+                err
+            )
+        })
+        .and_then(|bytes| {
+            toml::from_slice::<ModuleCacheStatistics>(&bytes[..]).map_err(|err| {
+                trace!(
+                    "Failed to parse stats file, path: {}, err: {}",
+                    path.display(),
+                    err,
+                )
+            })
+        })
+        .ok()
+}
+
+fn write_stats_file(path: &Path, stats: &ModuleCacheStatistics) -> bool {
+    toml::to_string_pretty(&stats)
+        .map_err(|err| {
+            warn!(
+                "Failed to serialize stats file, path: {}, err: {}",
+                path.display(),
+                err
+            )
+        })
+        .and_then(|serialized| {
+            if fs_write_atomic(path, "stats", serialized.as_bytes()) {
+                Ok(())
+            } else {
+                Err(())
+            }
+        })
+        .is_ok()
+}
+
+/// Tries to acquire a lock for specific task.
+///
+/// Returns Some(path) to the lock if succeeds. The task path must not
+/// contain any extension and have file stem.
+///
+/// To release a lock you need either manually rename or remove it,
+/// or wait until it expires and cleanup task removes it.
+///
+/// Note: this function is racy. Main idea is: be fault tolerant and
+///       never block some task. The price is that we rarely do some task
+///       more than once.
+fn acquire_task_fs_lock(
+    task_path: &Path,
+    timeout: Duration,
+    allowed_future_drift: Duration,
+) -> Option<PathBuf> {
+    assert!(task_path.extension().is_none());
+    assert!(task_path.file_stem().is_some());
+
+    // list directory
+    let dir_path = task_path.parent()?;
+    let it = fs::read_dir(dir_path)
+        .map_err(|err| {
+            warn!(
+                "Failed to list cache directory, path: {}, err: {}",
+                dir_path.display(),
+                err
+            )
+        })
+        .ok()?;
+
+    // look for existing locks
+    for entry in it {
+        let entry = entry
+            .map_err(|err| {
+                warn!(
+                    "Failed to list cache directory, path: {}, err: {}",
+                    dir_path.display(),
+                    err
+                )
+            })
+            .ok()?;
+
+        let path = entry.path();
+        if path.is_dir() || path.file_stem() != task_path.file_stem() {
+            continue;
+        }
+
+        // check extension and mtime
+        match path.extension() {
+            None => continue,
+            Some(ext) => {
+                if let Some(ext_str) = ext.to_str() {
+                    // if it's None, i.e. not valid UTF-8 string, then that's not our lock for sure
+                    if ext_str.starts_with("wip-")
+                        && !is_fs_lock_expired(Some(&entry), &path, timeout, allowed_future_drift)
+                    {
+                        return None;
+                    }
+                }
+            }
+        }
+    }
+
+    // create the lock
+    let lock_path = task_path.with_extension(format!("wip-{}", std::process::id()));
+    let _file = fs::OpenOptions::new()
+        .create_new(true)
+        .write(true)
+        .open(&lock_path)
+        .map_err(|err| {
+            warn!(
+                "Failed to create lock file (note: it shouldn't exists): path: {}, err: {}",
+                lock_path.display(),
+                err
+            )
+        })
+        .ok()?;
+
+    Some(lock_path)
+}
+
+// we have either both, or just path; dir entry is desirable since on some platforms we can get
+// metadata without extra syscalls
+// futhermore: it's better to get a path if we have it instead of allocating a new one from the dir entry
+fn is_fs_lock_expired(
+    entry: Option<&fs::DirEntry>,
+    path: &PathBuf,
+    threshold: Duration,
+    allowed_future_drift: Duration,
+) -> bool {
+    let mtime = match entry
+        .map_or_else(|| path.metadata(), |e| e.metadata())
+        .and_then(|metadata| metadata.modified())
+    {
+        Ok(mt) => mt,
+        Err(err) => {
+            warn!(
+                "Failed to get metadata/mtime, treating as an expired lock, path: {}, err: {}",
+                path.display(),
+                err
+            );
+            return true; // can't read mtime, treat as expired, so this task will not be starved
+        }
+    };
+
+    // DON'T use: mtime.elapsed() -- we must call SystemTime directly for the tests to be deterministic
+    match SystemTime::now().duration_since(mtime) {
+        Ok(elapsed) => elapsed >= threshold,
+        Err(err) => {
+            trace!(
+                "Found mtime in the future, treating as a not expired lock, path: {}, err: {}",
+                path.display(),
+                err
+            );
+            // the lock is expired if the time is too far in the future
+            // it is fine to have network share and not synchronized clocks,
+            // but it's not good when user changes time in their system clock
+            err.duration() > allowed_future_drift
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests;
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/compilation.rs.html b/api/src/wasmtime_environ/compilation.rs.html new file mode 100644 index 000000000000..5cda71c31ea2 --- /dev/null +++ b/api/src/wasmtime_environ/compilation.rs.html @@ -0,0 +1,599 @@ +compilation.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+
+//! A `Compilation` contains the compiled function bodies for a WebAssembly
+//! module.
+
+use crate::cache::ModuleCacheDataTupleType;
+use crate::module;
+use crate::module_environ::FunctionBodyData;
+use crate::CacheConfig;
+use cranelift_codegen::{binemit, ir, isa, Context};
+use cranelift_entity::PrimaryMap;
+use cranelift_wasm::{DefinedFuncIndex, FuncIndex, ModuleTranslationState, WasmError};
+use serde::{Deserialize, Serialize};
+use std::ops::Range;
+use thiserror::Error;
+
+#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
+pub struct FDERelocEntry(pub i64, pub usize, pub u8);
+
+/// Relocation entry for unwind info.
+#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
+pub struct CompiledFunctionUnwindInfoReloc {
+    /// Entry offest in the code block.
+    pub offset: u32,
+    /// Entry addend relative to the code block.
+    pub addend: u32,
+}
+
+/// Compiled function unwind information.
+#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
+pub enum CompiledFunctionUnwindInfo {
+    /// No info.
+    None,
+    /// Windows UNWIND_INFO.
+    Windows(Vec<u8>),
+    /// Frame layout info.
+    FrameLayout(Vec<u8>, usize, Vec<FDERelocEntry>),
+}
+
+impl CompiledFunctionUnwindInfo {
+    /// Constructs unwind info object.
+    pub fn new(isa: &dyn isa::TargetIsa, context: &Context) -> Self {
+        use cranelift_codegen::binemit::{
+            FrameUnwindKind, FrameUnwindOffset, FrameUnwindSink, Reloc,
+        };
+        use cranelift_codegen::isa::CallConv;
+
+        struct Sink(Vec<u8>, usize, Vec<FDERelocEntry>);
+        impl FrameUnwindSink for Sink {
+            fn len(&self) -> FrameUnwindOffset {
+                self.0.len()
+            }
+            fn bytes(&mut self, b: &[u8]) {
+                self.0.extend_from_slice(b);
+            }
+            fn reserve(&mut self, len: usize) {
+                self.0.reserve(len)
+            }
+            fn reloc(&mut self, r: Reloc, off: FrameUnwindOffset) {
+                self.2.push(FDERelocEntry(
+                    0,
+                    off,
+                    match r {
+                        Reloc::Abs4 => 4,
+                        Reloc::Abs8 => 8,
+                        _ => {
+                            panic!("unexpected reloc type");
+                        }
+                    },
+                ))
+            }
+            fn set_entry_offset(&mut self, off: FrameUnwindOffset) {
+                self.1 = off;
+            }
+        }
+
+        let kind = match context.func.signature.call_conv {
+            CallConv::SystemV | CallConv::Fast | CallConv::Cold => FrameUnwindKind::Libunwind,
+            CallConv::WindowsFastcall => FrameUnwindKind::Fastcall,
+            _ => {
+                return CompiledFunctionUnwindInfo::None;
+            }
+        };
+
+        let mut sink = Sink(Vec::new(), 0, Vec::new());
+        context.emit_unwind_info(isa, kind, &mut sink);
+
+        let Sink(data, offset, relocs) = sink;
+        if data.is_empty() {
+            return CompiledFunctionUnwindInfo::None;
+        }
+
+        match kind {
+            FrameUnwindKind::Fastcall => CompiledFunctionUnwindInfo::Windows(data),
+            FrameUnwindKind::Libunwind => {
+                CompiledFunctionUnwindInfo::FrameLayout(data, offset, relocs)
+            }
+        }
+    }
+
+    /// Retuns true is no unwind info data.
+    pub fn is_empty(&self) -> bool {
+        match self {
+            CompiledFunctionUnwindInfo::None => true,
+            CompiledFunctionUnwindInfo::Windows(d) => d.is_empty(),
+            CompiledFunctionUnwindInfo::FrameLayout(c, _, _) => c.is_empty(),
+        }
+    }
+
+    /// Returns size of serilized unwind info.
+    pub fn len(&self) -> usize {
+        match self {
+            CompiledFunctionUnwindInfo::None => 0,
+            CompiledFunctionUnwindInfo::Windows(d) => d.len(),
+            CompiledFunctionUnwindInfo::FrameLayout(c, _, _) => c.len(),
+        }
+    }
+
+    /// Serializes data into byte array.
+    pub fn serialize(&self, dest: &mut [u8], relocs: &mut Vec<CompiledFunctionUnwindInfoReloc>) {
+        match self {
+            CompiledFunctionUnwindInfo::None => (),
+            CompiledFunctionUnwindInfo::Windows(d) => {
+                dest.copy_from_slice(d);
+            }
+            CompiledFunctionUnwindInfo::FrameLayout(code, _fde_offset, r) => {
+                dest.copy_from_slice(code);
+                r.iter().for_each(move |r| {
+                    assert_eq!(r.2, 8);
+                    relocs.push(CompiledFunctionUnwindInfoReloc {
+                        offset: r.1 as u32,
+                        addend: r.0 as u32,
+                    })
+                });
+            }
+        }
+    }
+}
+
+/// Compiled function: machine code body, jump table offsets, and unwind information.
+#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
+pub struct CompiledFunction {
+    /// The function body.
+    pub body: Vec<u8>,
+
+    /// The jump tables offsets (in the body).
+    pub jt_offsets: ir::JumpTableOffsets,
+
+    /// The unwind information.
+    pub unwind_info: CompiledFunctionUnwindInfo,
+}
+
+type Functions = PrimaryMap<DefinedFuncIndex, CompiledFunction>;
+
+/// The result of compiling a WebAssembly module's functions.
+#[derive(Deserialize, Serialize, Debug, PartialEq, Eq)]
+pub struct Compilation {
+    /// Compiled machine code for the function bodies.
+    functions: Functions,
+}
+
+impl Compilation {
+    /// Creates a compilation artifact from a contiguous function buffer and a set of ranges
+    pub fn new(functions: Functions) -> Self {
+        Self { functions }
+    }
+
+    /// Allocates the compilation result with the given function bodies.
+    pub fn from_buffer(
+        buffer: Vec<u8>,
+        functions: impl IntoIterator<Item = (Range<usize>, ir::JumpTableOffsets, Range<usize>)>,
+    ) -> Self {
+        Self::new(
+            functions
+                .into_iter()
+                .map(|(body_range, jt_offsets, unwind_range)| CompiledFunction {
+                    body: buffer[body_range].to_vec(),
+                    jt_offsets,
+                    unwind_info: CompiledFunctionUnwindInfo::Windows(buffer[unwind_range].to_vec()),
+                })
+                .collect(),
+        )
+    }
+
+    /// Gets the bytes of a single function
+    pub fn get(&self, func: DefinedFuncIndex) -> &CompiledFunction {
+        &self.functions[func]
+    }
+
+    /// Gets the number of functions defined.
+    pub fn len(&self) -> usize {
+        self.functions.len()
+    }
+
+    /// Returns whether there are no functions defined.
+    pub fn is_empty(&self) -> bool {
+        self.functions.is_empty()
+    }
+
+    /// Gets functions jump table offsets.
+    pub fn get_jt_offsets(&self) -> PrimaryMap<DefinedFuncIndex, ir::JumpTableOffsets> {
+        self.functions
+            .iter()
+            .map(|(_, func)| func.jt_offsets.clone())
+            .collect::<PrimaryMap<DefinedFuncIndex, _>>()
+    }
+}
+
+impl<'a> IntoIterator for &'a Compilation {
+    type IntoIter = Iter<'a>;
+    type Item = <Self::IntoIter as Iterator>::Item;
+
+    fn into_iter(self) -> Self::IntoIter {
+        Iter {
+            iterator: self.functions.iter(),
+        }
+    }
+}
+
+pub struct Iter<'a> {
+    iterator: <&'a Functions as IntoIterator>::IntoIter,
+}
+
+impl<'a> Iterator for Iter<'a> {
+    type Item = &'a CompiledFunction;
+
+    fn next(&mut self) -> Option<Self::Item> {
+        self.iterator.next().map(|(_, b)| b)
+    }
+}
+
+/// A record of a relocation to perform.
+#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
+pub struct Relocation {
+    /// The relocation code.
+    pub reloc: binemit::Reloc,
+    /// Relocation target.
+    pub reloc_target: RelocationTarget,
+    /// The offset where to apply the relocation.
+    pub offset: binemit::CodeOffset,
+    /// The addend to add to the relocation value.
+    pub addend: binemit::Addend,
+}
+
+/// Destination function. Can be either user function or some special one, like `memory.grow`.
+#[derive(Serialize, Deserialize, Debug, Copy, Clone, PartialEq, Eq)]
+pub enum RelocationTarget {
+    /// The user function index.
+    UserFunc(FuncIndex),
+    /// A compiler-generated libcall.
+    LibCall(ir::LibCall),
+    /// Jump table index.
+    JumpTable(FuncIndex, ir::JumpTable),
+}
+
+/// Relocations to apply to function bodies.
+pub type Relocations = PrimaryMap<DefinedFuncIndex, Vec<Relocation>>;
+
+/// Information about trap.
+#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)]
+pub struct TrapInformation {
+    /// The offset of the trapping instruction in native code. It is relative to the beginning of the function.
+    pub code_offset: binemit::CodeOffset,
+    /// Location of trapping instruction in WebAssembly binary module.
+    pub source_loc: ir::SourceLoc,
+    /// Code of the trap.
+    pub trap_code: ir::TrapCode,
+}
+
+/// Information about traps associated with the functions where the traps are placed.
+pub type Traps = PrimaryMap<DefinedFuncIndex, Vec<TrapInformation>>;
+
+/// An error while compiling WebAssembly to machine code.
+#[derive(Error, Debug)]
+pub enum CompileError {
+    /// A wasm translation error occured.
+    #[error("WebAssembly translation error")]
+    Wasm(#[from] WasmError),
+
+    /// A compilation error occured.
+    #[error("Compilation error: {0}")]
+    Codegen(String),
+
+    /// A compilation error occured.
+    #[error("Debug info is not supported with this configuration")]
+    DebugInfoNotSupported,
+}
+
+/// An implementation of a compiler from parsed WebAssembly module to native code.
+pub trait Compiler {
+    /// Compile a parsed module with the given `TargetIsa`.
+    fn compile_module<'data, 'module>(
+        module: &'module module::Module,
+        module_translation: &ModuleTranslationState,
+        function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
+        isa: &dyn isa::TargetIsa,
+        generate_debug_info: bool,
+        cache_config: &CacheConfig,
+    ) -> Result<ModuleCacheDataTupleType, CompileError>;
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/cranelift.rs.html b/api/src/wasmtime_environ/cranelift.rs.html new file mode 100644 index 000000000000..5330d1829ff0 --- /dev/null +++ b/api/src/wasmtime_environ/cranelift.rs.html @@ -0,0 +1,619 @@ +cranelift.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+
+//! Support for compiling with Cranelift.
+
+use crate::address_map::{FunctionAddressMap, InstructionAddressMap};
+use crate::cache::{ModuleCacheData, ModuleCacheDataTupleType, ModuleCacheEntry};
+use crate::compilation::{
+    Compilation, CompileError, CompiledFunction, CompiledFunctionUnwindInfo, Relocation,
+    RelocationTarget, TrapInformation,
+};
+use crate::func_environ::{get_func_name, FuncEnvironment};
+use crate::module::Module;
+use crate::module_environ::FunctionBodyData;
+use crate::CacheConfig;
+use cranelift_codegen::ir::{self, ExternalName};
+use cranelift_codegen::print_errors::pretty_error;
+use cranelift_codegen::{binemit, isa, Context};
+use cranelift_entity::PrimaryMap;
+use cranelift_wasm::{DefinedFuncIndex, FuncIndex, FuncTranslator, ModuleTranslationState};
+use rayon::prelude::{IntoParallelRefIterator, ParallelIterator};
+
+/// Implementation of a relocation sink that just saves all the information for later
+pub struct RelocSink {
+    /// Current function index.
+    func_index: FuncIndex,
+
+    /// Relocations recorded for the function.
+    pub func_relocs: Vec<Relocation>,
+}
+
+impl binemit::RelocSink for RelocSink {
+    fn reloc_block(
+        &mut self,
+        _offset: binemit::CodeOffset,
+        _reloc: binemit::Reloc,
+        _block_offset: binemit::CodeOffset,
+    ) {
+        // This should use the `offsets` field of `ir::Function`.
+        panic!("block headers not yet implemented");
+    }
+    fn reloc_external(
+        &mut self,
+        offset: binemit::CodeOffset,
+        reloc: binemit::Reloc,
+        name: &ExternalName,
+        addend: binemit::Addend,
+    ) {
+        let reloc_target = if let ExternalName::User { namespace, index } = *name {
+            debug_assert_eq!(namespace, 0);
+            RelocationTarget::UserFunc(FuncIndex::from_u32(index))
+        } else if let ExternalName::LibCall(libcall) = *name {
+            RelocationTarget::LibCall(libcall)
+        } else {
+            panic!("unrecognized external name")
+        };
+        self.func_relocs.push(Relocation {
+            reloc,
+            reloc_target,
+            offset,
+            addend,
+        });
+    }
+
+    fn reloc_constant(
+        &mut self,
+        _code_offset: binemit::CodeOffset,
+        _reloc: binemit::Reloc,
+        _constant_offset: ir::ConstantOffset,
+    ) {
+        // Do nothing for now: cranelift emits constant data after the function code and also emits
+        // function code with correct relative offsets to the constant data.
+    }
+
+    fn reloc_jt(&mut self, offset: binemit::CodeOffset, reloc: binemit::Reloc, jt: ir::JumpTable) {
+        self.func_relocs.push(Relocation {
+            reloc,
+            reloc_target: RelocationTarget::JumpTable(self.func_index, jt),
+            offset,
+            addend: 0,
+        });
+    }
+}
+
+impl RelocSink {
+    /// Return a new `RelocSink` instance.
+    pub fn new(func_index: FuncIndex) -> Self {
+        Self {
+            func_index,
+            func_relocs: Vec::new(),
+        }
+    }
+}
+
+struct TrapSink {
+    pub traps: Vec<TrapInformation>,
+}
+
+impl TrapSink {
+    fn new() -> Self {
+        Self { traps: Vec::new() }
+    }
+}
+
+impl binemit::TrapSink for TrapSink {
+    fn trap(
+        &mut self,
+        code_offset: binemit::CodeOffset,
+        source_loc: ir::SourceLoc,
+        trap_code: ir::TrapCode,
+    ) {
+        self.traps.push(TrapInformation {
+            code_offset,
+            source_loc,
+            trap_code,
+        });
+    }
+}
+
+fn get_function_address_map<'data>(
+    context: &Context,
+    data: &FunctionBodyData<'data>,
+    body_len: usize,
+    isa: &dyn isa::TargetIsa,
+) -> FunctionAddressMap {
+    let mut instructions = Vec::new();
+
+    let func = &context.func;
+    let mut blocks = func.layout.blocks().collect::<Vec<_>>();
+    blocks.sort_by_key(|block| func.offsets[*block]); // Ensure inst offsets always increase
+
+    let encinfo = isa.encoding_info();
+    for block in blocks {
+        for (offset, inst, size) in func.inst_offsets(block, &encinfo) {
+            let srcloc = func.srclocs[inst];
+            instructions.push(InstructionAddressMap {
+                srcloc,
+                code_offset: offset as usize,
+                code_len: size as usize,
+            });
+        }
+    }
+
+    // Generate artificial srcloc for function start/end to identify boundary
+    // within module. Similar to FuncTranslator::cur_srcloc(): it will wrap around
+    // if byte code is larger than 4 GB.
+    let start_srcloc = ir::SourceLoc::new(data.module_offset as u32);
+    let end_srcloc = ir::SourceLoc::new((data.module_offset + data.data.len()) as u32);
+
+    FunctionAddressMap {
+        instructions,
+        start_srcloc,
+        end_srcloc,
+        body_offset: 0,
+        body_len,
+    }
+}
+
+/// A compiler that compiles a WebAssembly module with Cranelift, translating the Wasm to Cranelift IR,
+/// optimizing it and then translating to assembly.
+pub struct Cranelift;
+
+impl crate::compilation::Compiler for Cranelift {
+    /// Compile the module using Cranelift, producing a compilation result with
+    /// associated relocations.
+    fn compile_module<'data, 'module>(
+        module: &'module Module,
+        module_translation: &ModuleTranslationState,
+        function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
+        isa: &dyn isa::TargetIsa,
+        generate_debug_info: bool,
+        cache_config: &CacheConfig,
+    ) -> Result<ModuleCacheDataTupleType, CompileError> {
+        let cache_entry = ModuleCacheEntry::new(
+            module,
+            &function_body_inputs,
+            isa,
+            "cranelift",
+            generate_debug_info,
+            cache_config,
+        );
+
+        let data = match cache_entry.get_data() {
+            Some(data) => data,
+            None => {
+                let mut functions = PrimaryMap::with_capacity(function_body_inputs.len());
+                let mut relocations = PrimaryMap::with_capacity(function_body_inputs.len());
+                let mut address_transforms = PrimaryMap::with_capacity(function_body_inputs.len());
+                let mut value_ranges = PrimaryMap::with_capacity(function_body_inputs.len());
+                let mut stack_slots = PrimaryMap::with_capacity(function_body_inputs.len());
+                let mut traps = PrimaryMap::with_capacity(function_body_inputs.len());
+
+                function_body_inputs
+                    .into_iter()
+                    .collect::<Vec<(DefinedFuncIndex, &FunctionBodyData<'data>)>>()
+                    .par_iter()
+                    .map_init(FuncTranslator::new, |func_translator, (i, input)| {
+                        let func_index = module.func_index(*i);
+                        let mut context = Context::new();
+                        context.func.name = get_func_name(func_index);
+                        context.func.signature =
+                            module.signatures[module.functions[func_index]].clone();
+                        context.func.collect_frame_layout_info();
+                        if generate_debug_info {
+                            context.func.collect_debug_info();
+                        }
+
+                        func_translator.translate(
+                            module_translation,
+                            input.data,
+                            input.module_offset,
+                            &mut context.func,
+                            &mut FuncEnvironment::new(isa.frontend_config(), module),
+                        )?;
+
+                        let mut code_buf: Vec<u8> = Vec::new();
+                        let mut reloc_sink = RelocSink::new(func_index);
+                        let mut trap_sink = TrapSink::new();
+                        let mut stackmap_sink = binemit::NullStackmapSink {};
+                        context
+                            .compile_and_emit(
+                                isa,
+                                &mut code_buf,
+                                &mut reloc_sink,
+                                &mut trap_sink,
+                                &mut stackmap_sink,
+                            )
+                            .map_err(|error| {
+                                CompileError::Codegen(pretty_error(&context.func, Some(isa), error))
+                            })?;
+
+                        let unwind_info = CompiledFunctionUnwindInfo::new(isa, &context);
+
+                        let address_transform = if generate_debug_info {
+                            let body_len = code_buf.len();
+                            Some(get_function_address_map(&context, input, body_len, isa))
+                        } else {
+                            None
+                        };
+
+                        let ranges = if generate_debug_info {
+                            let ranges =
+                                context.build_value_labels_ranges(isa).map_err(|error| {
+                                    CompileError::Codegen(pretty_error(
+                                        &context.func,
+                                        Some(isa),
+                                        error,
+                                    ))
+                                })?;
+                            Some(ranges)
+                        } else {
+                            None
+                        };
+
+                        Ok((
+                            code_buf,
+                            context.func.jt_offsets,
+                            reloc_sink.func_relocs,
+                            address_transform,
+                            ranges,
+                            context.func.stack_slots,
+                            trap_sink.traps,
+                            unwind_info,
+                        ))
+                    })
+                    .collect::<Result<Vec<_>, CompileError>>()?
+                    .into_iter()
+                    .for_each(
+                        |(
+                            function,
+                            func_jt_offsets,
+                            relocs,
+                            address_transform,
+                            ranges,
+                            sss,
+                            function_traps,
+                            unwind_info,
+                        )| {
+                            functions.push(CompiledFunction {
+                                body: function,
+                                jt_offsets: func_jt_offsets,
+                                unwind_info,
+                            });
+                            relocations.push(relocs);
+                            if let Some(address_transform) = address_transform {
+                                address_transforms.push(address_transform);
+                            }
+                            value_ranges.push(ranges.unwrap_or_default());
+                            stack_slots.push(sss);
+                            traps.push(function_traps);
+                        },
+                    );
+
+                // TODO: Reorganize where we create the Vec for the resolved imports.
+
+                let data = ModuleCacheData::from_tuple((
+                    Compilation::new(functions),
+                    relocations,
+                    address_transforms,
+                    value_ranges,
+                    stack_slots,
+                    traps,
+                ));
+                cache_entry.update_data(&data);
+                data
+            }
+        };
+
+        Ok(data.into_tuple())
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/data_structures.rs.html b/api/src/wasmtime_environ/data_structures.rs.html new file mode 100644 index 000000000000..97a33e5cd9f2 --- /dev/null +++ b/api/src/wasmtime_environ/data_structures.rs.html @@ -0,0 +1,61 @@ +data_structures.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+
+#![doc(hidden)]
+
+pub mod ir {
+    pub use cranelift_codegen::ir::{
+        types, AbiParam, ArgumentPurpose, Signature, SourceLoc, StackSlots, TrapCode, Type,
+        ValueLabel, ValueLoc,
+    };
+    pub use cranelift_codegen::ValueLabelsRanges;
+}
+
+pub mod settings {
+    pub use cranelift_codegen::settings::{builder, Builder, Configurable, Flags};
+}
+
+pub mod isa {
+    pub use cranelift_codegen::isa::{CallConv, RegUnit, TargetFrontendConfig, TargetIsa};
+}
+
+pub mod entity {
+    pub use cranelift_entity::{BoxedSlice, EntityRef, PrimaryMap};
+}
+
+pub mod wasm {
+    pub use cranelift_wasm::{
+        get_vmctx_value_label, DefinedFuncIndex, DefinedGlobalIndex, DefinedMemoryIndex,
+        DefinedTableIndex, FuncIndex, Global, GlobalIndex, GlobalInit, Memory, MemoryIndex,
+        SignatureIndex, Table, TableElementType, TableIndex,
+    };
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/func_environ.rs.html b/api/src/wasmtime_environ/func_environ.rs.html new file mode 100644 index 000000000000..29985346d548 --- /dev/null +++ b/api/src/wasmtime_environ/func_environ.rs.html @@ -0,0 +1,1709 @@ +func_environ.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+
+use crate::module::{MemoryPlan, MemoryStyle, Module, TableStyle};
+use crate::vmoffsets::VMOffsets;
+use crate::WASM_PAGE_SIZE;
+use cranelift_codegen::cursor::FuncCursor;
+use cranelift_codegen::ir;
+use cranelift_codegen::ir::condcodes::*;
+use cranelift_codegen::ir::immediates::{Offset32, Uimm64};
+use cranelift_codegen::ir::types::*;
+use cranelift_codegen::ir::{AbiParam, ArgumentPurpose, Function, InstBuilder, Signature};
+use cranelift_codegen::isa::TargetFrontendConfig;
+use cranelift_entity::EntityRef;
+use cranelift_wasm::{
+    self, FuncIndex, GlobalIndex, GlobalVariable, MemoryIndex, SignatureIndex, TableIndex,
+    TargetEnvironment, WasmError, WasmResult,
+};
+#[cfg(feature = "lightbeam")]
+use cranelift_wasm::{DefinedFuncIndex, DefinedGlobalIndex, DefinedMemoryIndex, DefinedTableIndex};
+use std::convert::TryFrom;
+
+/// Compute an `ir::ExternalName` for a given wasm function index.
+pub fn get_func_name(func_index: FuncIndex) -> ir::ExternalName {
+    ir::ExternalName::user(0, func_index.as_u32())
+}
+
+/// An index type for builtin functions.
+pub struct BuiltinFunctionIndex(u32);
+
+impl BuiltinFunctionIndex {
+    /// Returns an index for wasm's `memory.grow` builtin function.
+    pub const fn get_memory32_grow_index() -> Self {
+        Self(0)
+    }
+    /// Returns an index for wasm's imported `memory.grow` builtin function.
+    pub const fn get_imported_memory32_grow_index() -> Self {
+        Self(1)
+    }
+    /// Returns an index for wasm's `memory.size` builtin function.
+    pub const fn get_memory32_size_index() -> Self {
+        Self(2)
+    }
+    /// Returns an index for wasm's imported `memory.size` builtin function.
+    pub const fn get_imported_memory32_size_index() -> Self {
+        Self(3)
+    }
+    /// Returns the total number of builtin functions.
+    pub const fn builtin_functions_total_number() -> u32 {
+        4
+    }
+
+    /// Return the index as an u32 number.
+    pub const fn index(&self) -> u32 {
+        self.0
+    }
+}
+
+/// The `FuncEnvironment` implementation for use by the `ModuleEnvironment`.
+pub struct FuncEnvironment<'module_environment> {
+    /// Target-specified configuration.
+    target_config: TargetFrontendConfig,
+
+    /// The module-level environment which this function-level environment belongs to.
+    module: &'module_environment Module,
+
+    /// The Cranelift global holding the vmctx address.
+    vmctx: Option<ir::GlobalValue>,
+
+    /// The external function signature for implementing wasm's `memory.size`
+    /// for locally-defined 32-bit memories.
+    memory32_size_sig: Option<ir::SigRef>,
+
+    /// The external function signature for implementing wasm's `memory.grow`
+    /// for locally-defined memories.
+    memory_grow_sig: Option<ir::SigRef>,
+
+    /// Offsets to struct fields accessed by JIT code.
+    offsets: VMOffsets,
+}
+
+impl<'module_environment> FuncEnvironment<'module_environment> {
+    pub fn new(target_config: TargetFrontendConfig, module: &'module_environment Module) -> Self {
+        Self {
+            target_config,
+            module,
+            vmctx: None,
+            memory32_size_sig: None,
+            memory_grow_sig: None,
+            offsets: VMOffsets::new(target_config.pointer_bytes(), module),
+        }
+    }
+
+    fn pointer_type(&self) -> ir::Type {
+        self.target_config.pointer_type()
+    }
+
+    fn vmctx(&mut self, func: &mut Function) -> ir::GlobalValue {
+        self.vmctx.unwrap_or_else(|| {
+            let vmctx = func.create_global_value(ir::GlobalValueData::VMContext);
+            self.vmctx = Some(vmctx);
+            vmctx
+        })
+    }
+
+    fn get_memory_grow_sig(&mut self, func: &mut Function) -> ir::SigRef {
+        let sig = self.memory_grow_sig.unwrap_or_else(|| {
+            func.import_signature(Signature {
+                params: vec![
+                    AbiParam::special(self.pointer_type(), ArgumentPurpose::VMContext),
+                    AbiParam::new(I32),
+                    AbiParam::new(I32),
+                ],
+                returns: vec![AbiParam::new(I32)],
+                call_conv: self.target_config.default_call_conv,
+            })
+        });
+        self.memory_grow_sig = Some(sig);
+        sig
+    }
+
+    /// Return the memory.grow function signature to call for the given index, along with the
+    /// translated index value to pass to it and its index in `VMBuiltinFunctionsArray`.
+    fn get_memory_grow_func(
+        &mut self,
+        func: &mut Function,
+        index: MemoryIndex,
+    ) -> (ir::SigRef, usize, BuiltinFunctionIndex) {
+        if self.module.is_imported_memory(index) {
+            (
+                self.get_memory_grow_sig(func),
+                index.index(),
+                BuiltinFunctionIndex::get_imported_memory32_grow_index(),
+            )
+        } else {
+            (
+                self.get_memory_grow_sig(func),
+                self.module.defined_memory_index(index).unwrap().index(),
+                BuiltinFunctionIndex::get_memory32_grow_index(),
+            )
+        }
+    }
+
+    fn get_memory32_size_sig(&mut self, func: &mut Function) -> ir::SigRef {
+        let sig = self.memory32_size_sig.unwrap_or_else(|| {
+            func.import_signature(Signature {
+                params: vec![
+                    AbiParam::special(self.pointer_type(), ArgumentPurpose::VMContext),
+                    AbiParam::new(I32),
+                ],
+                returns: vec![AbiParam::new(I32)],
+                call_conv: self.target_config.default_call_conv,
+            })
+        });
+        self.memory32_size_sig = Some(sig);
+        sig
+    }
+
+    /// Return the memory.size function signature to call for the given index, along with the
+    /// translated index value to pass to it and its index in `VMBuiltinFunctionsArray`.
+    fn get_memory_size_func(
+        &mut self,
+        func: &mut Function,
+        index: MemoryIndex,
+    ) -> (ir::SigRef, usize, BuiltinFunctionIndex) {
+        if self.module.is_imported_memory(index) {
+            (
+                self.get_memory32_size_sig(func),
+                index.index(),
+                BuiltinFunctionIndex::get_imported_memory32_size_index(),
+            )
+        } else {
+            (
+                self.get_memory32_size_sig(func),
+                self.module.defined_memory_index(index).unwrap().index(),
+                BuiltinFunctionIndex::get_memory32_size_index(),
+            )
+        }
+    }
+
+    /// Translates load of builtin function and returns a pair of values `vmctx`
+    /// and address of the loaded function.
+    fn translate_load_builtin_function_address(
+        &mut self,
+        pos: &mut FuncCursor<'_>,
+        callee_func_idx: BuiltinFunctionIndex,
+    ) -> (ir::Value, ir::Value) {
+        // We use an indirect call so that we don't have to patch the code at runtime.
+        let pointer_type = self.pointer_type();
+        let vmctx = self.vmctx(&mut pos.func);
+        let base = pos.ins().global_value(pointer_type, vmctx);
+
+        let mut mem_flags = ir::MemFlags::trusted();
+        mem_flags.set_readonly();
+
+        // Load the callee address.
+        let body_offset =
+            i32::try_from(self.offsets.vmctx_builtin_function(callee_func_idx)).unwrap();
+        let func_addr = pos.ins().load(pointer_type, mem_flags, base, body_offset);
+
+        (base, func_addr)
+    }
+}
+
+#[cfg(feature = "lightbeam")]
+impl lightbeam::ModuleContext for FuncEnvironment<'_> {
+    type Signature = ir::Signature;
+    type GlobalType = ir::Type;
+
+    fn func_index(&self, defined_func_index: u32) -> u32 {
+        self.module
+            .func_index(DefinedFuncIndex::from_u32(defined_func_index))
+            .as_u32()
+    }
+
+    fn defined_func_index(&self, func_index: u32) -> Option<u32> {
+        self.module
+            .defined_func_index(FuncIndex::from_u32(func_index))
+            .map(DefinedFuncIndex::as_u32)
+    }
+
+    fn defined_global_index(&self, global_index: u32) -> Option<u32> {
+        self.module
+            .defined_global_index(GlobalIndex::from_u32(global_index))
+            .map(DefinedGlobalIndex::as_u32)
+    }
+
+    fn global_type(&self, global_index: u32) -> &Self::GlobalType {
+        &self.module.globals[GlobalIndex::from_u32(global_index)].ty
+    }
+
+    fn func_type_index(&self, func_idx: u32) -> u32 {
+        self.module.functions[FuncIndex::from_u32(func_idx)].as_u32()
+    }
+
+    fn signature(&self, index: u32) -> &Self::Signature {
+        &self.module.signatures[SignatureIndex::from_u32(index)]
+    }
+
+    fn defined_table_index(&self, table_index: u32) -> Option<u32> {
+        self.module
+            .defined_table_index(TableIndex::from_u32(table_index))
+            .map(DefinedTableIndex::as_u32)
+    }
+
+    fn defined_memory_index(&self, memory_index: u32) -> Option<u32> {
+        self.module
+            .defined_memory_index(MemoryIndex::from_u32(memory_index))
+            .map(DefinedMemoryIndex::as_u32)
+    }
+
+    fn vmctx_vmfunction_import_body(&self, func_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmfunction_import_body(FuncIndex::from_u32(func_index))
+    }
+    fn vmctx_vmfunction_import_vmctx(&self, func_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmfunction_import_vmctx(FuncIndex::from_u32(func_index))
+    }
+
+    fn vmctx_vmglobal_import_from(&self, global_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmglobal_import_from(GlobalIndex::from_u32(global_index))
+    }
+    fn vmctx_vmglobal_definition(&self, defined_global_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmglobal_definition(DefinedGlobalIndex::from_u32(defined_global_index))
+    }
+    fn vmctx_vmmemory_import_from(&self, memory_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmmemory_import_from(MemoryIndex::from_u32(memory_index))
+    }
+    fn vmctx_vmmemory_definition(&self, defined_memory_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmmemory_definition(DefinedMemoryIndex::from_u32(defined_memory_index))
+    }
+    fn vmctx_vmmemory_definition_base(&self, defined_memory_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmmemory_definition_base(DefinedMemoryIndex::from_u32(defined_memory_index))
+    }
+    fn vmctx_vmmemory_definition_current_length(&self, defined_memory_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmmemory_definition_current_length(DefinedMemoryIndex::from_u32(
+                defined_memory_index,
+            ))
+    }
+    fn vmmemory_definition_base(&self) -> u8 {
+        self.offsets.vmmemory_definition_base()
+    }
+    fn vmmemory_definition_current_length(&self) -> u8 {
+        self.offsets.vmmemory_definition_current_length()
+    }
+    fn vmctx_vmtable_import_from(&self, table_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmtable_import_from(TableIndex::from_u32(table_index))
+    }
+    fn vmctx_vmtable_definition(&self, defined_table_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmtable_definition(DefinedTableIndex::from_u32(defined_table_index))
+    }
+    fn vmctx_vmtable_definition_base(&self, defined_table_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmtable_definition_base(DefinedTableIndex::from_u32(defined_table_index))
+    }
+    fn vmctx_vmtable_definition_current_elements(&self, defined_table_index: u32) -> u32 {
+        self.offsets
+            .vmctx_vmtable_definition_current_elements(DefinedTableIndex::from_u32(
+                defined_table_index,
+            ))
+    }
+    fn vmtable_definition_base(&self) -> u8 {
+        self.offsets.vmtable_definition_base()
+    }
+    fn vmtable_definition_current_elements(&self) -> u8 {
+        self.offsets.vmtable_definition_current_elements()
+    }
+    fn vmcaller_checked_anyfunc_type_index(&self) -> u8 {
+        self.offsets.vmcaller_checked_anyfunc_type_index()
+    }
+    fn vmcaller_checked_anyfunc_func_ptr(&self) -> u8 {
+        self.offsets.vmcaller_checked_anyfunc_func_ptr()
+    }
+    fn vmcaller_checked_anyfunc_vmctx(&self) -> u8 {
+        self.offsets.vmcaller_checked_anyfunc_vmctx()
+    }
+    fn size_of_vmcaller_checked_anyfunc(&self) -> u8 {
+        self.offsets.size_of_vmcaller_checked_anyfunc()
+    }
+    fn vmctx_vmshared_signature_id(&self, signature_idx: u32) -> u32 {
+        self.offsets
+            .vmctx_vmshared_signature_id(SignatureIndex::from_u32(signature_idx))
+    }
+
+    // TODO: type of a global
+}
+
+impl<'module_environment> TargetEnvironment for FuncEnvironment<'module_environment> {
+    fn target_config(&self) -> TargetFrontendConfig {
+        self.target_config
+    }
+}
+
+impl<'module_environment> cranelift_wasm::FuncEnvironment for FuncEnvironment<'module_environment> {
+    fn is_wasm_parameter(&self, _signature: &ir::Signature, index: usize) -> bool {
+        // The first two parameters are the vmctx and caller vmctx. The rest are
+        // the wasm parameters.
+        index >= 2
+    }
+
+    fn make_table(&mut self, func: &mut ir::Function, index: TableIndex) -> WasmResult<ir::Table> {
+        let pointer_type = self.pointer_type();
+
+        let (ptr, base_offset, current_elements_offset) = {
+            let vmctx = self.vmctx(func);
+            if let Some(def_index) = self.module.defined_table_index(index) {
+                let base_offset =
+                    i32::try_from(self.offsets.vmctx_vmtable_definition_base(def_index)).unwrap();
+                let current_elements_offset = i32::try_from(
+                    self.offsets
+                        .vmctx_vmtable_definition_current_elements(def_index),
+                )
+                .unwrap();
+                (vmctx, base_offset, current_elements_offset)
+            } else {
+                let from_offset = self.offsets.vmctx_vmtable_import_from(index);
+                let table = func.create_global_value(ir::GlobalValueData::Load {
+                    base: vmctx,
+                    offset: Offset32::new(i32::try_from(from_offset).unwrap()),
+                    global_type: pointer_type,
+                    readonly: true,
+                });
+                let base_offset = i32::from(self.offsets.vmtable_definition_base());
+                let current_elements_offset =
+                    i32::from(self.offsets.vmtable_definition_current_elements());
+                (table, base_offset, current_elements_offset)
+            }
+        };
+
+        let base_gv = func.create_global_value(ir::GlobalValueData::Load {
+            base: ptr,
+            offset: Offset32::new(base_offset),
+            global_type: pointer_type,
+            readonly: false,
+        });
+        let bound_gv = func.create_global_value(ir::GlobalValueData::Load {
+            base: ptr,
+            offset: Offset32::new(current_elements_offset),
+            global_type: self.offsets.type_of_vmtable_definition_current_elements(),
+            readonly: false,
+        });
+
+        let element_size = match self.module.table_plans[index].style {
+            TableStyle::CallerChecksSignature => {
+                u64::from(self.offsets.size_of_vmcaller_checked_anyfunc())
+            }
+        };
+
+        Ok(func.create_table(ir::TableData {
+            base_gv,
+            min_size: Uimm64::new(0),
+            bound_gv,
+            element_size: Uimm64::new(element_size),
+            index_type: I32,
+        }))
+    }
+
+    fn translate_table_grow(
+        &mut self,
+        _: cranelift_codegen::cursor::FuncCursor<'_>,
+        _: u32,
+        _: ir::Value,
+        _: ir::Value,
+    ) -> WasmResult<ir::Value> {
+        Err(WasmError::Unsupported(
+            "the `table.grow` instruction is not supported yet".into(),
+        ))
+    }
+
+    fn translate_table_get(
+        &mut self,
+        _: cranelift_codegen::cursor::FuncCursor<'_>,
+        _: u32,
+        _: ir::Value,
+    ) -> WasmResult<ir::Value> {
+        Err(WasmError::Unsupported(
+            "the `table.get` instruction is not supported yet".into(),
+        ))
+    }
+
+    fn translate_table_set(
+        &mut self,
+        _: cranelift_codegen::cursor::FuncCursor<'_>,
+        _: u32,
+        _: ir::Value,
+        _: ir::Value,
+    ) -> WasmResult<()> {
+        Err(WasmError::Unsupported(
+            "the `table.set` instruction is not supported yet".into(),
+        ))
+    }
+
+    fn translate_table_fill(
+        &mut self,
+        _: cranelift_codegen::cursor::FuncCursor<'_>,
+        _: u32,
+        _: ir::Value,
+        _: ir::Value,
+        _: ir::Value,
+    ) -> WasmResult<()> {
+        Err(WasmError::Unsupported(
+            "the `table.fill` instruction is not supported yet".into(),
+        ))
+    }
+
+    fn translate_ref_func(
+        &mut self,
+        _: cranelift_codegen::cursor::FuncCursor<'_>,
+        _: u32,
+    ) -> WasmResult<ir::Value> {
+        Err(WasmError::Unsupported(
+            "the `ref.func` instruction is not supported yet".into(),
+        ))
+    }
+
+    fn translate_custom_global_get(
+        &mut self,
+        _: cranelift_codegen::cursor::FuncCursor<'_>,
+        _: cranelift_wasm::GlobalIndex,
+    ) -> WasmResult<ir::Value> {
+        unreachable!("we don't make any custom globals")
+    }
+
+    fn translate_custom_global_set(
+        &mut self,
+        _: cranelift_codegen::cursor::FuncCursor<'_>,
+        _: cranelift_wasm::GlobalIndex,
+        _: ir::Value,
+    ) -> WasmResult<()> {
+        unreachable!("we don't make any custom globals")
+    }
+
+    fn make_heap(&mut self, func: &mut ir::Function, index: MemoryIndex) -> WasmResult<ir::Heap> {
+        let pointer_type = self.pointer_type();
+
+        let (ptr, base_offset, current_length_offset) = {
+            let vmctx = self.vmctx(func);
+            if let Some(def_index) = self.module.defined_memory_index(index) {
+                let base_offset =
+                    i32::try_from(self.offsets.vmctx_vmmemory_definition_base(def_index)).unwrap();
+                let current_length_offset = i32::try_from(
+                    self.offsets
+                        .vmctx_vmmemory_definition_current_length(def_index),
+                )
+                .unwrap();
+                (vmctx, base_offset, current_length_offset)
+            } else {
+                let from_offset = self.offsets.vmctx_vmmemory_import_from(index);
+                let memory = func.create_global_value(ir::GlobalValueData::Load {
+                    base: vmctx,
+                    offset: Offset32::new(i32::try_from(from_offset).unwrap()),
+                    global_type: pointer_type,
+                    readonly: true,
+                });
+                let base_offset = i32::from(self.offsets.vmmemory_definition_base());
+                let current_length_offset =
+                    i32::from(self.offsets.vmmemory_definition_current_length());
+                (memory, base_offset, current_length_offset)
+            }
+        };
+
+        // If we have a declared maximum, we can make this a "static" heap, which is
+        // allocated up front and never moved.
+        let (offset_guard_size, heap_style, readonly_base) = match self.module.memory_plans[index] {
+            MemoryPlan {
+                style: MemoryStyle::Dynamic,
+                offset_guard_size,
+                memory: _,
+            } => {
+                let heap_bound = func.create_global_value(ir::GlobalValueData::Load {
+                    base: ptr,
+                    offset: Offset32::new(current_length_offset),
+                    global_type: self.offsets.type_of_vmmemory_definition_current_length(),
+                    readonly: false,
+                });
+                (
+                    Uimm64::new(offset_guard_size),
+                    ir::HeapStyle::Dynamic {
+                        bound_gv: heap_bound,
+                    },
+                    false,
+                )
+            }
+            MemoryPlan {
+                style: MemoryStyle::Static { bound },
+                offset_guard_size,
+                memory: _,
+            } => (
+                Uimm64::new(offset_guard_size),
+                ir::HeapStyle::Static {
+                    bound: Uimm64::new(u64::from(bound) * u64::from(WASM_PAGE_SIZE)),
+                },
+                true,
+            ),
+        };
+
+        let heap_base = func.create_global_value(ir::GlobalValueData::Load {
+            base: ptr,
+            offset: Offset32::new(base_offset),
+            global_type: pointer_type,
+            readonly: readonly_base,
+        });
+        Ok(func.create_heap(ir::HeapData {
+            base: heap_base,
+            min_size: 0.into(),
+            offset_guard_size,
+            style: heap_style,
+            index_type: I32,
+        }))
+    }
+
+    fn make_global(
+        &mut self,
+        func: &mut ir::Function,
+        index: GlobalIndex,
+    ) -> WasmResult<GlobalVariable> {
+        let pointer_type = self.pointer_type();
+
+        let (ptr, offset) = {
+            let vmctx = self.vmctx(func);
+            if let Some(def_index) = self.module.defined_global_index(index) {
+                let offset =
+                    i32::try_from(self.offsets.vmctx_vmglobal_definition(def_index)).unwrap();
+                (vmctx, offset)
+            } else {
+                let from_offset = self.offsets.vmctx_vmglobal_import_from(index);
+                let global = func.create_global_value(ir::GlobalValueData::Load {
+                    base: vmctx,
+                    offset: Offset32::new(i32::try_from(from_offset).unwrap()),
+                    global_type: pointer_type,
+                    readonly: true,
+                });
+                (global, 0)
+            }
+        };
+
+        Ok(GlobalVariable::Memory {
+            gv: ptr,
+            offset: offset.into(),
+            ty: self.module.globals[index].ty,
+        })
+    }
+
+    fn make_indirect_sig(
+        &mut self,
+        func: &mut ir::Function,
+        index: SignatureIndex,
+    ) -> WasmResult<ir::SigRef> {
+        Ok(func.import_signature(self.module.signatures[index].clone()))
+    }
+
+    fn make_direct_func(
+        &mut self,
+        func: &mut ir::Function,
+        index: FuncIndex,
+    ) -> WasmResult<ir::FuncRef> {
+        let sigidx = self.module.functions[index];
+        let signature = func.import_signature(self.module.signatures[sigidx].clone());
+        let name = get_func_name(index);
+        Ok(func.import_function(ir::ExtFuncData {
+            name,
+            signature,
+            // We currently allocate all code segments independently, so nothing
+            // is colocated.
+            colocated: false,
+        }))
+    }
+
+    fn translate_call_indirect(
+        &mut self,
+        mut pos: FuncCursor<'_>,
+        table_index: TableIndex,
+        table: ir::Table,
+        sig_index: SignatureIndex,
+        sig_ref: ir::SigRef,
+        callee: ir::Value,
+        call_args: &[ir::Value],
+    ) -> WasmResult<ir::Inst> {
+        let pointer_type = self.pointer_type();
+
+        let table_entry_addr = pos.ins().table_addr(pointer_type, table, callee, 0);
+
+        // Dereference table_entry_addr to get the function address.
+        let mem_flags = ir::MemFlags::trusted();
+        let func_addr = pos.ins().load(
+            pointer_type,
+            mem_flags,
+            table_entry_addr,
+            i32::from(self.offsets.vmcaller_checked_anyfunc_func_ptr()),
+        );
+
+        // Check whether `func_addr` is null.
+        pos.ins().trapz(func_addr, ir::TrapCode::IndirectCallToNull);
+
+        // If necessary, check the signature.
+        match self.module.table_plans[table_index].style {
+            TableStyle::CallerChecksSignature => {
+                let sig_id_size = self.offsets.size_of_vmshared_signature_index();
+                let sig_id_type = Type::int(u16::from(sig_id_size) * 8).unwrap();
+                let vmctx = self.vmctx(pos.func);
+                let base = pos.ins().global_value(pointer_type, vmctx);
+                let offset =
+                    i32::try_from(self.offsets.vmctx_vmshared_signature_id(sig_index)).unwrap();
+
+                // Load the caller ID.
+                let mut mem_flags = ir::MemFlags::trusted();
+                mem_flags.set_readonly();
+                let caller_sig_id = pos.ins().load(sig_id_type, mem_flags, base, offset);
+
+                // Load the callee ID.
+                let mem_flags = ir::MemFlags::trusted();
+                let callee_sig_id = pos.ins().load(
+                    sig_id_type,
+                    mem_flags,
+                    table_entry_addr,
+                    i32::from(self.offsets.vmcaller_checked_anyfunc_type_index()),
+                );
+
+                // Check that they match.
+                let cmp = pos.ins().icmp(IntCC::Equal, callee_sig_id, caller_sig_id);
+                pos.ins().trapz(cmp, ir::TrapCode::BadSignature);
+            }
+        }
+
+        let mut real_call_args = Vec::with_capacity(call_args.len() + 2);
+        let caller_vmctx = pos.func.special_param(ArgumentPurpose::VMContext).unwrap();
+
+        // First append the callee vmctx address.
+        let vmctx = pos.ins().load(
+            pointer_type,
+            mem_flags,
+            table_entry_addr,
+            i32::from(self.offsets.vmcaller_checked_anyfunc_vmctx()),
+        );
+        real_call_args.push(vmctx);
+        real_call_args.push(caller_vmctx);
+
+        // Then append the regular call arguments.
+        real_call_args.extend_from_slice(call_args);
+
+        Ok(pos.ins().call_indirect(sig_ref, func_addr, &real_call_args))
+    }
+
+    fn translate_call(
+        &mut self,
+        mut pos: FuncCursor<'_>,
+        callee_index: FuncIndex,
+        callee: ir::FuncRef,
+        call_args: &[ir::Value],
+    ) -> WasmResult<ir::Inst> {
+        let mut real_call_args = Vec::with_capacity(call_args.len() + 2);
+        let caller_vmctx = pos.func.special_param(ArgumentPurpose::VMContext).unwrap();
+
+        // Handle direct calls to locally-defined functions.
+        if !self.module.is_imported_function(callee_index) {
+            // First append the callee vmctx address, which is the same as the caller vmctx in
+            // this case.
+            real_call_args.push(caller_vmctx);
+
+            // Then append the caller vmctx address.
+            real_call_args.push(caller_vmctx);
+
+            // Then append the regular call arguments.
+            real_call_args.extend_from_slice(call_args);
+
+            return Ok(pos.ins().call(callee, &real_call_args));
+        }
+
+        // Handle direct calls to imported functions. We use an indirect call
+        // so that we don't have to patch the code at runtime.
+        let pointer_type = self.pointer_type();
+        let sig_ref = pos.func.dfg.ext_funcs[callee].signature;
+        let vmctx = self.vmctx(&mut pos.func);
+        let base = pos.ins().global_value(pointer_type, vmctx);
+
+        let mem_flags = ir::MemFlags::trusted();
+
+        // Load the callee address.
+        let body_offset =
+            i32::try_from(self.offsets.vmctx_vmfunction_import_body(callee_index)).unwrap();
+        let func_addr = pos.ins().load(pointer_type, mem_flags, base, body_offset);
+
+        // First append the callee vmctx address.
+        let vmctx_offset =
+            i32::try_from(self.offsets.vmctx_vmfunction_import_vmctx(callee_index)).unwrap();
+        let vmctx = pos.ins().load(pointer_type, mem_flags, base, vmctx_offset);
+        real_call_args.push(vmctx);
+        real_call_args.push(caller_vmctx);
+
+        // Then append the regular call arguments.
+        real_call_args.extend_from_slice(call_args);
+
+        Ok(pos.ins().call_indirect(sig_ref, func_addr, &real_call_args))
+    }
+
+    fn translate_memory_grow(
+        &mut self,
+        mut pos: FuncCursor<'_>,
+        index: MemoryIndex,
+        _heap: ir::Heap,
+        val: ir::Value,
+    ) -> WasmResult<ir::Value> {
+        let (func_sig, index_arg, func_idx) = self.get_memory_grow_func(&mut pos.func, index);
+        let memory_index = pos.ins().iconst(I32, index_arg as i64);
+        let (vmctx, func_addr) = self.translate_load_builtin_function_address(&mut pos, func_idx);
+        let call_inst = pos
+            .ins()
+            .call_indirect(func_sig, func_addr, &[vmctx, val, memory_index]);
+        Ok(*pos.func.dfg.inst_results(call_inst).first().unwrap())
+    }
+
+    fn translate_memory_size(
+        &mut self,
+        mut pos: FuncCursor<'_>,
+        index: MemoryIndex,
+        _heap: ir::Heap,
+    ) -> WasmResult<ir::Value> {
+        let (func_sig, index_arg, func_idx) = self.get_memory_size_func(&mut pos.func, index);
+        let memory_index = pos.ins().iconst(I32, index_arg as i64);
+        let (vmctx, func_addr) = self.translate_load_builtin_function_address(&mut pos, func_idx);
+        let call_inst = pos
+            .ins()
+            .call_indirect(func_sig, func_addr, &[vmctx, memory_index]);
+        Ok(*pos.func.dfg.inst_results(call_inst).first().unwrap())
+    }
+
+    fn translate_memory_copy(
+        &mut self,
+        _pos: FuncCursor,
+        _index: MemoryIndex,
+        _heap: ir::Heap,
+        _dst: ir::Value,
+        _src: ir::Value,
+        _len: ir::Value,
+    ) -> WasmResult<()> {
+        Err(WasmError::Unsupported("bulk memory".to_string()))
+    }
+
+    fn translate_memory_fill(
+        &mut self,
+        _pos: FuncCursor,
+        _index: MemoryIndex,
+        _heap: ir::Heap,
+        _dst: ir::Value,
+        _val: ir::Value,
+        _len: ir::Value,
+    ) -> WasmResult<()> {
+        Err(WasmError::Unsupported("bulk memory".to_string()))
+    }
+
+    fn translate_memory_init(
+        &mut self,
+        _pos: FuncCursor,
+        _index: MemoryIndex,
+        _heap: ir::Heap,
+        _seg_index: u32,
+        _dst: ir::Value,
+        _src: ir::Value,
+        _len: ir::Value,
+    ) -> WasmResult<()> {
+        Err(WasmError::Unsupported("bulk memory".to_string()))
+    }
+
+    fn translate_data_drop(&mut self, _pos: FuncCursor, _seg_index: u32) -> WasmResult<()> {
+        Err(WasmError::Unsupported("bulk memory".to_string()))
+    }
+
+    fn translate_table_size(
+        &mut self,
+        _pos: FuncCursor,
+        _index: TableIndex,
+        _table: ir::Table,
+    ) -> WasmResult<ir::Value> {
+        Err(WasmError::Unsupported("bulk memory".to_string()))
+    }
+
+    fn translate_table_copy(
+        &mut self,
+        _pos: FuncCursor,
+        _dst_table_index: TableIndex,
+        _dst_table: ir::Table,
+        _src_table_index: TableIndex,
+        _src_table: ir::Table,
+        _dst: ir::Value,
+        _src: ir::Value,
+        _len: ir::Value,
+    ) -> WasmResult<()> {
+        Err(WasmError::Unsupported("bulk memory".to_string()))
+    }
+
+    fn translate_table_init(
+        &mut self,
+        _pos: FuncCursor,
+        _seg_index: u32,
+        _table_index: TableIndex,
+        _table: ir::Table,
+        _dst: ir::Value,
+        _src: ir::Value,
+        _len: ir::Value,
+    ) -> WasmResult<()> {
+        Err(WasmError::Unsupported("bulk memory".to_string()))
+    }
+
+    fn translate_elem_drop(&mut self, _pos: FuncCursor, _seg_index: u32) -> WasmResult<()> {
+        Err(WasmError::Unsupported("bulk memory".to_string()))
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/lib.rs.html b/api/src/wasmtime_environ/lib.rs.html new file mode 100644 index 000000000000..29ccb47b9028 --- /dev/null +++ b/api/src/wasmtime_environ/lib.rs.html @@ -0,0 +1,153 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+
+//! Standalone environment for WebAssembly using Cranelift. Provides functions to translate
+//! `get_global`, `set_global`, `memory.size`, `memory.grow`, `call_indirect` that hardcode in
+//! the translation the base addresses of regions of memory that will hold the globals, tables and
+//! linear memories.
+
+#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
+#![warn(unused_import_braces)]
+#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    allow(clippy::new_without_default, clippy::new_without_default)
+)]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    warn(
+        clippy::float_arithmetic,
+        clippy::mut_mut,
+        clippy::nonminimal_bool,
+        clippy::option_map_unwrap_or,
+        clippy::option_map_unwrap_or_else,
+        clippy::print_stdout,
+        clippy::unicode_not_nfc,
+        clippy::use_self
+    )
+)]
+
+mod address_map;
+mod compilation;
+mod data_structures;
+mod func_environ;
+mod module;
+mod module_environ;
+mod tunables;
+mod vmoffsets;
+
+mod cache;
+
+pub mod cranelift;
+#[cfg(feature = "lightbeam")]
+pub mod lightbeam;
+
+pub use crate::address_map::{
+    FunctionAddressMap, InstructionAddressMap, ModuleAddressMap, ModuleMemoryOffset,
+    ModuleVmctxInfo, ValueLabelsRanges,
+};
+pub use crate::cache::create_new_config as cache_create_new_config;
+pub use crate::cache::CacheConfig;
+pub use crate::compilation::{
+    Compilation, CompileError, CompiledFunction, CompiledFunctionUnwindInfo,
+    CompiledFunctionUnwindInfoReloc, Compiler, Relocation, RelocationTarget, Relocations,
+    TrapInformation, Traps,
+};
+pub use crate::cranelift::Cranelift;
+pub use crate::data_structures::*;
+pub use crate::func_environ::BuiltinFunctionIndex;
+#[cfg(feature = "lightbeam")]
+pub use crate::lightbeam::Lightbeam;
+pub use crate::module::{
+    Export, MemoryPlan, MemoryStyle, Module, TableElements, TablePlan, TableStyle,
+};
+pub use crate::module_environ::{
+    translate_signature, DataInitializer, DataInitializerLocation, FunctionBodyData,
+    ModuleEnvironment, ModuleTranslation,
+};
+pub use crate::tunables::Tunables;
+pub use crate::vmoffsets::{TargetSharedSignatureIndex, VMOffsets};
+
+/// WebAssembly page sizes are defined to be 64KiB.
+pub const WASM_PAGE_SIZE: u32 = 0x10000;
+
+/// The number of pages we can have before we run out of byte index space.
+pub const WASM_MAX_PAGES: u32 = 0x10000;
+
+/// Version number of this crate.
+pub const VERSION: &str = env!("CARGO_PKG_VERSION");
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/module.rs.html b/api/src/wasmtime_environ/module.rs.html new file mode 100644 index 000000000000..331af0ff49fb --- /dev/null +++ b/api/src/wasmtime_environ/module.rs.html @@ -0,0 +1,641 @@ +module.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+
+//! Data structures for representing decoded wasm modules.
+
+use crate::module_environ::FunctionBodyData;
+use crate::tunables::Tunables;
+use crate::WASM_MAX_PAGES;
+use cranelift_codegen::ir;
+use cranelift_entity::{EntityRef, PrimaryMap};
+use cranelift_wasm::{
+    DefinedFuncIndex, DefinedGlobalIndex, DefinedMemoryIndex, DefinedTableIndex, FuncIndex, Global,
+    GlobalIndex, Memory, MemoryIndex, SignatureIndex, Table, TableIndex,
+};
+use indexmap::IndexMap;
+use more_asserts::assert_ge;
+use std::collections::HashMap;
+use std::hash::{Hash, Hasher};
+use std::sync::atomic::{AtomicUsize, Ordering::SeqCst};
+
+/// A WebAssembly table initializer.
+#[derive(Clone, Debug, Hash)]
+pub struct TableElements {
+    /// The index of a table to initialize.
+    pub table_index: TableIndex,
+    /// Optionally, a global variable giving a base index.
+    pub base: Option<GlobalIndex>,
+    /// The offset to add to the base.
+    pub offset: usize,
+    /// The values to write into the table elements.
+    pub elements: Box<[FuncIndex]>,
+}
+
+/// An entity to export.
+#[derive(Clone, Debug, Hash, PartialEq, Eq, PartialOrd, Ord)]
+pub enum Export {
+    /// Function export.
+    Function(FuncIndex),
+    /// Table export.
+    Table(TableIndex),
+    /// Memory export.
+    Memory(MemoryIndex),
+    /// Global export.
+    Global(GlobalIndex),
+}
+
+/// Implemenation styles for WebAssembly linear memory.
+#[derive(Debug, Clone, Hash)]
+pub enum MemoryStyle {
+    /// The actual memory can be resized and moved.
+    Dynamic,
+    /// Addresss space is allocated up front.
+    Static {
+        /// The number of mapped and unmapped pages.
+        bound: u32,
+    },
+}
+
+impl MemoryStyle {
+    /// Decide on an implementation style for the given `Memory`.
+    pub fn for_memory(memory: Memory, tunables: &Tunables) -> (Self, u64) {
+        // A heap with a maximum that doesn't exceed the static memory bound specified by the
+        // tunables make it static.
+        //
+        // If the module doesn't declare an explicit maximum treat it as 4GiB.
+        let maximum = memory.maximum.unwrap_or(WASM_MAX_PAGES);
+        if maximum <= tunables.static_memory_bound {
+            assert_ge!(tunables.static_memory_bound, memory.minimum);
+            return (
+                Self::Static {
+                    bound: tunables.static_memory_bound,
+                },
+                tunables.static_memory_offset_guard_size,
+            );
+        }
+
+        // Otherwise, make it dynamic.
+        (Self::Dynamic, tunables.dynamic_memory_offset_guard_size)
+    }
+}
+
+/// A WebAssembly linear memory description along with our chosen style for
+/// implementing it.
+#[derive(Debug, Clone, Hash)]
+pub struct MemoryPlan {
+    /// The WebAssembly linear memory description.
+    pub memory: Memory,
+    /// Our chosen implementation style.
+    pub style: MemoryStyle,
+    /// Our chosen offset-guard size.
+    pub offset_guard_size: u64,
+}
+
+impl MemoryPlan {
+    /// Draw up a plan for implementing a `Memory`.
+    pub fn for_memory(memory: Memory, tunables: &Tunables) -> Self {
+        let (style, offset_guard_size) = MemoryStyle::for_memory(memory, tunables);
+        Self {
+            memory,
+            style,
+            offset_guard_size,
+        }
+    }
+}
+
+/// Implemenation styles for WebAssembly tables.
+#[derive(Debug, Clone, Hash)]
+pub enum TableStyle {
+    /// Signatures are stored in the table and checked in the caller.
+    CallerChecksSignature,
+}
+
+impl TableStyle {
+    /// Decide on an implementation style for the given `Table`.
+    pub fn for_table(_table: Table, _tunables: &Tunables) -> Self {
+        Self::CallerChecksSignature
+    }
+}
+
+/// A WebAssembly table description along with our chosen style for
+/// implementing it.
+#[derive(Debug, Clone, Hash)]
+pub struct TablePlan {
+    /// The WebAssembly table description.
+    pub table: cranelift_wasm::Table,
+    /// Our chosen implementation style.
+    pub style: TableStyle,
+}
+
+impl TablePlan {
+    /// Draw up a plan for implementing a `Table`.
+    pub fn for_table(table: Table, tunables: &Tunables) -> Self {
+        let style = TableStyle::for_table(table, tunables);
+        Self { table, style }
+    }
+}
+
+/// A translated WebAssembly module, excluding the function bodies and
+/// memory initializers.
+// WARNING: when modifying, make sure that `hash_for_cache` is still valid!
+#[derive(Debug)]
+pub struct Module {
+    /// A unique identifier (within this process) for this module.
+    pub id: usize,
+
+    /// Unprocessed signatures exactly as provided by `declare_signature()`.
+    pub signatures: PrimaryMap<SignatureIndex, ir::Signature>,
+
+    /// Names of imported functions, as well as the index of the import that
+    /// performed this import.
+    pub imported_funcs: PrimaryMap<FuncIndex, (String, String, u32)>,
+
+    /// Names of imported tables.
+    pub imported_tables: PrimaryMap<TableIndex, (String, String, u32)>,
+
+    /// Names of imported memories.
+    pub imported_memories: PrimaryMap<MemoryIndex, (String, String, u32)>,
+
+    /// Names of imported globals.
+    pub imported_globals: PrimaryMap<GlobalIndex, (String, String, u32)>,
+
+    /// Types of functions, imported and local.
+    pub functions: PrimaryMap<FuncIndex, SignatureIndex>,
+
+    /// WebAssembly tables.
+    pub table_plans: PrimaryMap<TableIndex, TablePlan>,
+
+    /// WebAssembly linear memory plans.
+    pub memory_plans: PrimaryMap<MemoryIndex, MemoryPlan>,
+
+    /// WebAssembly global variables.
+    pub globals: PrimaryMap<GlobalIndex, Global>,
+
+    /// Exported entities.
+    pub exports: IndexMap<String, Export>,
+
+    /// The module "start" function, if present.
+    pub start_func: Option<FuncIndex>,
+
+    /// WebAssembly table initializers.
+    pub table_elements: Vec<TableElements>,
+
+    /// WebAssembly table initializers.
+    pub func_names: HashMap<FuncIndex, String>,
+}
+
+impl Module {
+    /// Allocates the module data structures.
+    pub fn new() -> Self {
+        static NEXT_ID: AtomicUsize = AtomicUsize::new(0);
+
+        Self {
+            id: NEXT_ID.fetch_add(1, SeqCst),
+            signatures: PrimaryMap::new(),
+            imported_funcs: PrimaryMap::new(),
+            imported_tables: PrimaryMap::new(),
+            imported_memories: PrimaryMap::new(),
+            imported_globals: PrimaryMap::new(),
+            functions: PrimaryMap::new(),
+            table_plans: PrimaryMap::new(),
+            memory_plans: PrimaryMap::new(),
+            globals: PrimaryMap::new(),
+            exports: IndexMap::new(),
+            start_func: None,
+            table_elements: Vec::new(),
+            func_names: HashMap::new(),
+        }
+    }
+
+    /// Convert a `DefinedFuncIndex` into a `FuncIndex`.
+    pub fn func_index(&self, defined_func: DefinedFuncIndex) -> FuncIndex {
+        FuncIndex::new(self.imported_funcs.len() + defined_func.index())
+    }
+
+    /// Convert a `FuncIndex` into a `DefinedFuncIndex`. Returns None if the
+    /// index is an imported function.
+    pub fn defined_func_index(&self, func: FuncIndex) -> Option<DefinedFuncIndex> {
+        if func.index() < self.imported_funcs.len() {
+            None
+        } else {
+            Some(DefinedFuncIndex::new(
+                func.index() - self.imported_funcs.len(),
+            ))
+        }
+    }
+
+    /// Test whether the given function index is for an imported function.
+    pub fn is_imported_function(&self, index: FuncIndex) -> bool {
+        index.index() < self.imported_funcs.len()
+    }
+
+    /// Convert a `DefinedTableIndex` into a `TableIndex`.
+    pub fn table_index(&self, defined_table: DefinedTableIndex) -> TableIndex {
+        TableIndex::new(self.imported_tables.len() + defined_table.index())
+    }
+
+    /// Convert a `TableIndex` into a `DefinedTableIndex`. Returns None if the
+    /// index is an imported table.
+    pub fn defined_table_index(&self, table: TableIndex) -> Option<DefinedTableIndex> {
+        if table.index() < self.imported_tables.len() {
+            None
+        } else {
+            Some(DefinedTableIndex::new(
+                table.index() - self.imported_tables.len(),
+            ))
+        }
+    }
+
+    /// Test whether the given table index is for an imported table.
+    pub fn is_imported_table(&self, index: TableIndex) -> bool {
+        index.index() < self.imported_tables.len()
+    }
+
+    /// Convert a `DefinedMemoryIndex` into a `MemoryIndex`.
+    pub fn memory_index(&self, defined_memory: DefinedMemoryIndex) -> MemoryIndex {
+        MemoryIndex::new(self.imported_memories.len() + defined_memory.index())
+    }
+
+    /// Convert a `MemoryIndex` into a `DefinedMemoryIndex`. Returns None if the
+    /// index is an imported memory.
+    pub fn defined_memory_index(&self, memory: MemoryIndex) -> Option<DefinedMemoryIndex> {
+        if memory.index() < self.imported_memories.len() {
+            None
+        } else {
+            Some(DefinedMemoryIndex::new(
+                memory.index() - self.imported_memories.len(),
+            ))
+        }
+    }
+
+    /// Test whether the given memory index is for an imported memory.
+    pub fn is_imported_memory(&self, index: MemoryIndex) -> bool {
+        index.index() < self.imported_memories.len()
+    }
+
+    /// Convert a `DefinedGlobalIndex` into a `GlobalIndex`.
+    pub fn global_index(&self, defined_global: DefinedGlobalIndex) -> GlobalIndex {
+        GlobalIndex::new(self.imported_globals.len() + defined_global.index())
+    }
+
+    /// Convert a `GlobalIndex` into a `DefinedGlobalIndex`. Returns None if the
+    /// index is an imported global.
+    pub fn defined_global_index(&self, global: GlobalIndex) -> Option<DefinedGlobalIndex> {
+        if global.index() < self.imported_globals.len() {
+            None
+        } else {
+            Some(DefinedGlobalIndex::new(
+                global.index() - self.imported_globals.len(),
+            ))
+        }
+    }
+
+    /// Test whether the given global index is for an imported global.
+    pub fn is_imported_global(&self, index: GlobalIndex) -> bool {
+        index.index() < self.imported_globals.len()
+    }
+
+    /// Computes hash of the module for the purpose of caching.
+    pub fn hash_for_cache<'data, H>(
+        &self,
+        function_body_inputs: &PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
+        state: &mut H,
+    ) where
+        H: Hasher,
+    {
+        // There's no need to cache names (strings), start function
+        // and data initializers (for both memory and tables)
+        self.signatures.hash(state);
+        self.functions.hash(state);
+        self.table_plans.hash(state);
+        self.memory_plans.hash(state);
+        self.globals.hash(state);
+        // IndexMap (self.export) iterates over values in order of item inserts
+        // Let's actually sort the values.
+        let mut exports = self.exports.values().collect::<Vec<_>>();
+        exports.sort();
+        for val in exports {
+            val.hash(state);
+        }
+        function_body_inputs.hash(state);
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/module_environ.rs.html b/api/src/wasmtime_environ/module_environ.rs.html new file mode 100644 index 000000000000..0b7bd1b28e02 --- /dev/null +++ b/api/src/wasmtime_environ/module_environ.rs.html @@ -0,0 +1,817 @@ +module_environ.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+
+use crate::func_environ::FuncEnvironment;
+use crate::module::{Export, MemoryPlan, Module, TableElements, TablePlan};
+use crate::tunables::Tunables;
+use cranelift_codegen::ir;
+use cranelift_codegen::ir::{AbiParam, ArgumentPurpose};
+use cranelift_codegen::isa::TargetFrontendConfig;
+use cranelift_entity::PrimaryMap;
+use cranelift_wasm::{
+    self, translate_module, DefinedFuncIndex, FuncIndex, Global, GlobalIndex, Memory, MemoryIndex,
+    ModuleTranslationState, SignatureIndex, Table, TableIndex, TargetEnvironment, WasmResult,
+};
+use std::convert::TryFrom;
+
+/// Contains function data: byte code and its offset in the module.
+#[derive(Hash)]
+pub struct FunctionBodyData<'a> {
+    /// Body byte code.
+    pub data: &'a [u8],
+
+    /// Body offset in the module file.
+    pub module_offset: usize,
+}
+
+/// The result of translating via `ModuleEnvironment`. Function bodies are not
+/// yet translated, and data initializers have not yet been copied out of the
+/// original buffer.
+pub struct ModuleTranslation<'data> {
+    /// Compilation setting flags.
+    pub target_config: TargetFrontendConfig,
+
+    /// Module information.
+    pub module: Module,
+
+    /// References to the function bodies.
+    pub function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
+
+    /// References to the data initializers.
+    pub data_initializers: Vec<DataInitializer<'data>>,
+
+    /// Tunable parameters.
+    pub tunables: Tunables,
+
+    /// The decoded Wasm types for the module.
+    pub module_translation: Option<ModuleTranslationState>,
+}
+
+impl<'data> ModuleTranslation<'data> {
+    /// Return a new `FuncEnvironment` for translating a function.
+    pub fn func_env(&self) -> FuncEnvironment<'_> {
+        FuncEnvironment::new(self.target_config, &self.module)
+    }
+}
+
+/// Object containing the standalone environment information.
+pub struct ModuleEnvironment<'data> {
+    /// The result to be filled in.
+    result: ModuleTranslation<'data>,
+    imports: u32,
+}
+
+impl<'data> ModuleEnvironment<'data> {
+    /// Allocates the environment data structures.
+    pub fn new(target_config: TargetFrontendConfig, tunables: Tunables) -> Self {
+        Self {
+            result: ModuleTranslation {
+                target_config,
+                module: Module::new(),
+                function_body_inputs: PrimaryMap::new(),
+                data_initializers: Vec::new(),
+                tunables,
+                module_translation: None,
+            },
+            imports: 0,
+        }
+    }
+
+    fn pointer_type(&self) -> ir::Type {
+        self.result.target_config.pointer_type()
+    }
+
+    /// Translate a wasm module using this environment. This consumes the
+    /// `ModuleEnvironment` and produces a `ModuleTranslation`.
+    pub fn translate(mut self, data: &'data [u8]) -> WasmResult<ModuleTranslation<'data>> {
+        assert!(self.result.module_translation.is_none());
+        let module_translation = translate_module(data, &mut self)?;
+        self.result.module_translation = Some(module_translation);
+        Ok(self.result)
+    }
+
+    fn declare_export(&mut self, export: Export, name: &str) -> WasmResult<()> {
+        self.result
+            .module
+            .exports
+            .insert(String::from(name), export);
+        Ok(())
+    }
+}
+
+impl<'data> TargetEnvironment for ModuleEnvironment<'data> {
+    fn target_config(&self) -> TargetFrontendConfig {
+        self.result.target_config
+    }
+}
+
+/// This trait is useful for `translate_module` because it tells how to translate
+/// environment-dependent wasm instructions. These functions should not be called by the user.
+impl<'data> cranelift_wasm::ModuleEnvironment<'data> for ModuleEnvironment<'data> {
+    fn reserve_signatures(&mut self, num: u32) -> WasmResult<()> {
+        self.result
+            .module
+            .signatures
+            .reserve_exact(usize::try_from(num).unwrap());
+        Ok(())
+    }
+
+    fn declare_signature(&mut self, sig: ir::Signature) -> WasmResult<()> {
+        let sig = translate_signature(sig, self.pointer_type());
+        // TODO: Deduplicate signatures.
+        self.result.module.signatures.push(sig);
+        Ok(())
+    }
+
+    fn declare_func_import(
+        &mut self,
+        sig_index: SignatureIndex,
+        module: &str,
+        field: &str,
+    ) -> WasmResult<()> {
+        debug_assert_eq!(
+            self.result.module.functions.len(),
+            self.result.module.imported_funcs.len(),
+            "Imported functions must be declared first"
+        );
+        self.result.module.functions.push(sig_index);
+
+        self.result.module.imported_funcs.push((
+            String::from(module),
+            String::from(field),
+            self.imports,
+        ));
+        self.imports += 1;
+        Ok(())
+    }
+
+    fn declare_table_import(&mut self, table: Table, module: &str, field: &str) -> WasmResult<()> {
+        debug_assert_eq!(
+            self.result.module.table_plans.len(),
+            self.result.module.imported_tables.len(),
+            "Imported tables must be declared first"
+        );
+        let plan = TablePlan::for_table(table, &self.result.tunables);
+        self.result.module.table_plans.push(plan);
+
+        self.result.module.imported_tables.push((
+            String::from(module),
+            String::from(field),
+            self.imports,
+        ));
+        self.imports += 1;
+        Ok(())
+    }
+
+    fn declare_memory_import(
+        &mut self,
+        memory: Memory,
+        module: &str,
+        field: &str,
+    ) -> WasmResult<()> {
+        debug_assert_eq!(
+            self.result.module.memory_plans.len(),
+            self.result.module.imported_memories.len(),
+            "Imported memories must be declared first"
+        );
+        let plan = MemoryPlan::for_memory(memory, &self.result.tunables);
+        self.result.module.memory_plans.push(plan);
+
+        self.result.module.imported_memories.push((
+            String::from(module),
+            String::from(field),
+            self.imports,
+        ));
+        self.imports += 1;
+        Ok(())
+    }
+
+    fn declare_global_import(
+        &mut self,
+        global: Global,
+        module: &str,
+        field: &str,
+    ) -> WasmResult<()> {
+        debug_assert_eq!(
+            self.result.module.globals.len(),
+            self.result.module.imported_globals.len(),
+            "Imported globals must be declared first"
+        );
+        self.result.module.globals.push(global);
+
+        self.result.module.imported_globals.push((
+            String::from(module),
+            String::from(field),
+            self.imports,
+        ));
+        self.imports += 1;
+        Ok(())
+    }
+
+    fn finish_imports(&mut self) -> WasmResult<()> {
+        self.result.module.imported_funcs.shrink_to_fit();
+        self.result.module.imported_tables.shrink_to_fit();
+        self.result.module.imported_memories.shrink_to_fit();
+        self.result.module.imported_globals.shrink_to_fit();
+        Ok(())
+    }
+
+    fn reserve_func_types(&mut self, num: u32) -> WasmResult<()> {
+        self.result
+            .module
+            .functions
+            .reserve_exact(usize::try_from(num).unwrap());
+        self.result
+            .function_body_inputs
+            .reserve_exact(usize::try_from(num).unwrap());
+        Ok(())
+    }
+
+    fn declare_func_type(&mut self, sig_index: SignatureIndex) -> WasmResult<()> {
+        self.result.module.functions.push(sig_index);
+        Ok(())
+    }
+
+    fn reserve_tables(&mut self, num: u32) -> WasmResult<()> {
+        self.result
+            .module
+            .table_plans
+            .reserve_exact(usize::try_from(num).unwrap());
+        Ok(())
+    }
+
+    fn declare_table(&mut self, table: Table) -> WasmResult<()> {
+        let plan = TablePlan::for_table(table, &self.result.tunables);
+        self.result.module.table_plans.push(plan);
+        Ok(())
+    }
+
+    fn reserve_memories(&mut self, num: u32) -> WasmResult<()> {
+        self.result
+            .module
+            .memory_plans
+            .reserve_exact(usize::try_from(num).unwrap());
+        Ok(())
+    }
+
+    fn declare_memory(&mut self, memory: Memory) -> WasmResult<()> {
+        let plan = MemoryPlan::for_memory(memory, &self.result.tunables);
+        self.result.module.memory_plans.push(plan);
+        Ok(())
+    }
+
+    fn reserve_globals(&mut self, num: u32) -> WasmResult<()> {
+        self.result
+            .module
+            .globals
+            .reserve_exact(usize::try_from(num).unwrap());
+        Ok(())
+    }
+
+    fn declare_global(&mut self, global: Global) -> WasmResult<()> {
+        self.result.module.globals.push(global);
+        Ok(())
+    }
+
+    fn reserve_exports(&mut self, num: u32) -> WasmResult<()> {
+        self.result
+            .module
+            .exports
+            .reserve(usize::try_from(num).unwrap());
+        Ok(())
+    }
+
+    fn declare_func_export(&mut self, func_index: FuncIndex, name: &str) -> WasmResult<()> {
+        self.declare_export(Export::Function(func_index), name)
+    }
+
+    fn declare_table_export(&mut self, table_index: TableIndex, name: &str) -> WasmResult<()> {
+        self.declare_export(Export::Table(table_index), name)
+    }
+
+    fn declare_memory_export(&mut self, memory_index: MemoryIndex, name: &str) -> WasmResult<()> {
+        self.declare_export(Export::Memory(memory_index), name)
+    }
+
+    fn declare_global_export(&mut self, global_index: GlobalIndex, name: &str) -> WasmResult<()> {
+        self.declare_export(Export::Global(global_index), name)
+    }
+
+    fn declare_start_func(&mut self, func_index: FuncIndex) -> WasmResult<()> {
+        debug_assert!(self.result.module.start_func.is_none());
+        self.result.module.start_func = Some(func_index);
+        Ok(())
+    }
+
+    fn reserve_table_elements(&mut self, num: u32) -> WasmResult<()> {
+        self.result
+            .module
+            .table_elements
+            .reserve_exact(usize::try_from(num).unwrap());
+        Ok(())
+    }
+
+    fn declare_table_elements(
+        &mut self,
+        table_index: TableIndex,
+        base: Option<GlobalIndex>,
+        offset: usize,
+        elements: Box<[FuncIndex]>,
+    ) -> WasmResult<()> {
+        self.result.module.table_elements.push(TableElements {
+            table_index,
+            base,
+            offset,
+            elements,
+        });
+        Ok(())
+    }
+
+    fn define_function_body(
+        &mut self,
+        _module_translation: &ModuleTranslationState,
+        body_bytes: &'data [u8],
+        body_offset: usize,
+    ) -> WasmResult<()> {
+        self.result.function_body_inputs.push(FunctionBodyData {
+            data: body_bytes,
+            module_offset: body_offset,
+        });
+        Ok(())
+    }
+
+    fn reserve_data_initializers(&mut self, num: u32) -> WasmResult<()> {
+        self.result
+            .data_initializers
+            .reserve_exact(usize::try_from(num).unwrap());
+        Ok(())
+    }
+
+    fn declare_data_initialization(
+        &mut self,
+        memory_index: MemoryIndex,
+        base: Option<GlobalIndex>,
+        offset: usize,
+        data: &'data [u8],
+    ) -> WasmResult<()> {
+        self.result.data_initializers.push(DataInitializer {
+            location: DataInitializerLocation {
+                memory_index,
+                base,
+                offset,
+            },
+            data,
+        });
+        Ok(())
+    }
+
+    fn declare_func_name(&mut self, func_index: FuncIndex, name: &'data str) -> WasmResult<()> {
+        self.result
+            .module
+            .func_names
+            .insert(func_index, name.to_string());
+        Ok(())
+    }
+}
+
+/// Add environment-specific function parameters.
+pub fn translate_signature(mut sig: ir::Signature, pointer_type: ir::Type) -> ir::Signature {
+    // Prepend the vmctx argument.
+    sig.params.insert(
+        0,
+        AbiParam::special(pointer_type, ArgumentPurpose::VMContext),
+    );
+    // Prepend the caller vmctx argument.
+    sig.params.insert(1, AbiParam::new(pointer_type));
+    sig
+}
+
+/// A memory index and offset within that memory where a data initialization
+/// should is to be performed.
+#[derive(Clone)]
+pub struct DataInitializerLocation {
+    /// The index of the memory to initialize.
+    pub memory_index: MemoryIndex,
+
+    /// Optionally a globalvar base to initialize at.
+    pub base: Option<GlobalIndex>,
+
+    /// A constant offset to initialize at.
+    pub offset: usize,
+}
+
+/// A data initializer for linear memory.
+pub struct DataInitializer<'data> {
+    /// The location where the initialization is to be performed.
+    pub location: DataInitializerLocation,
+
+    /// The initialization data.
+    pub data: &'data [u8],
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/tunables.rs.html b/api/src/wasmtime_environ/tunables.rs.html new file mode 100644 index 000000000000..192bdc89cb02 --- /dev/null +++ b/api/src/wasmtime_environ/tunables.rs.html @@ -0,0 +1,91 @@ +tunables.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+
+/// Tunable parameters for WebAssembly compilation.
+#[derive(Clone)]
+pub struct Tunables {
+    /// For static heaps, the size in wasm pages of the heap protected by bounds checking.
+    pub static_memory_bound: u32,
+
+    /// The size in bytes of the offset guard for static heaps.
+    pub static_memory_offset_guard_size: u64,
+
+    /// The size in bytes of the offset guard for dynamic heaps.
+    pub dynamic_memory_offset_guard_size: u64,
+}
+
+impl Default for Tunables {
+    fn default() -> Self {
+        Self {
+            #[cfg(target_pointer_width = "32")]
+            /// Size in wasm pages of the bound for static memories.
+            static_memory_bound: 0x4000,
+            #[cfg(target_pointer_width = "64")]
+            /// Size in wasm pages of the bound for static memories.
+            ///
+            /// When we allocate 4 GiB of address space, we can avoid the
+            /// need for explicit bounds checks.
+            static_memory_bound: 0x1_0000,
+
+            #[cfg(target_pointer_width = "32")]
+            /// Size in bytes of the offset guard for static memories.
+            static_memory_offset_guard_size: 0x1_0000,
+            #[cfg(target_pointer_width = "64")]
+            /// Size in bytes of the offset guard for static memories.
+            ///
+            /// Allocating 2 GiB of address space lets us translate wasm
+            /// offsets into x86 offsets as aggressively as we can.
+            static_memory_offset_guard_size: 0x8000_0000,
+
+            /// Size in bytes of the offset guard for dynamic memories.
+            ///
+            /// Allocate a small guard to optimize common cases but without
+            /// wasting too much memor.
+            dynamic_memory_offset_guard_size: 0x1_0000,
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_environ/vmoffsets.rs.html b/api/src/wasmtime_environ/vmoffsets.rs.html new file mode 100644 index 000000000000..2e85788bb931 --- /dev/null +++ b/api/src/wasmtime_environ/vmoffsets.rs.html @@ -0,0 +1,1165 @@ +vmoffsets.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+
+//! Offsets and sizes of various structs in wasmtime-runtime's vmcontext
+//! module.
+
+use crate::module::Module;
+use crate::BuiltinFunctionIndex;
+use cranelift_codegen::ir;
+use cranelift_wasm::{
+    DefinedGlobalIndex, DefinedMemoryIndex, DefinedTableIndex, FuncIndex, GlobalIndex, MemoryIndex,
+    SignatureIndex, TableIndex,
+};
+use more_asserts::assert_lt;
+use std::convert::TryFrom;
+
+#[cfg(target_pointer_width = "32")]
+fn cast_to_u32(sz: usize) -> u32 {
+    u32::try_from(sz).unwrap()
+}
+#[cfg(target_pointer_width = "64")]
+fn cast_to_u32(sz: usize) -> u32 {
+    u32::try_from(sz).expect("overflow in cast from usize to u32")
+}
+
+/// Align an offset used in this module to a specific byte-width by rounding up
+fn align(offset: u32, width: u32) -> u32 {
+    (offset + (width - 1)) / width * width
+}
+
+/// This class computes offsets to fields within `VMContext` and other
+/// related structs that JIT code accesses directly.
+pub struct VMOffsets {
+    /// The size in bytes of a pointer on the target.
+    pub pointer_size: u8,
+    /// The number of signature declarations in the module.
+    pub num_signature_ids: u32,
+    /// The number of imported functions in the module.
+    pub num_imported_functions: u32,
+    /// The number of imported tables in the module.
+    pub num_imported_tables: u32,
+    /// The number of imported memories in the module.
+    pub num_imported_memories: u32,
+    /// The number of imported globals in the module.
+    pub num_imported_globals: u32,
+    /// The number of defined tables in the module.
+    pub num_defined_tables: u32,
+    /// The number of defined memories in the module.
+    pub num_defined_memories: u32,
+    /// The number of defined globals in the module.
+    pub num_defined_globals: u32,
+}
+
+impl VMOffsets {
+    /// Return a new `VMOffsets` instance, for a given pointer size.
+    pub fn new(pointer_size: u8, module: &Module) -> Self {
+        Self {
+            pointer_size,
+            num_signature_ids: cast_to_u32(module.signatures.len()),
+            num_imported_functions: cast_to_u32(module.imported_funcs.len()),
+            num_imported_tables: cast_to_u32(module.imported_tables.len()),
+            num_imported_memories: cast_to_u32(module.imported_memories.len()),
+            num_imported_globals: cast_to_u32(module.imported_globals.len()),
+            num_defined_tables: cast_to_u32(module.table_plans.len()),
+            num_defined_memories: cast_to_u32(module.memory_plans.len()),
+            num_defined_globals: cast_to_u32(module.globals.len()),
+        }
+    }
+}
+
+/// Offsets for `VMFunctionImport`.
+impl VMOffsets {
+    /// The offset of the `body` field.
+    #[allow(clippy::erasing_op)]
+    pub fn vmfunction_import_body(&self) -> u8 {
+        0 * self.pointer_size
+    }
+
+    /// The offset of the `vmctx` field.
+    #[allow(clippy::identity_op)]
+    pub fn vmfunction_import_vmctx(&self) -> u8 {
+        1 * self.pointer_size
+    }
+
+    /// Return the size of `VMFunctionImport`.
+    pub fn size_of_vmfunction_import(&self) -> u8 {
+        2 * self.pointer_size
+    }
+}
+
+/// Offsets for `*const VMFunctionBody`.
+impl VMOffsets {
+    /// The size of the `current_elements` field.
+    #[allow(clippy::identity_op)]
+    pub fn size_of_vmfunction_body_ptr(&self) -> u8 {
+        1 * self.pointer_size
+    }
+}
+
+/// Offsets for `VMTableImport`.
+impl VMOffsets {
+    /// The offset of the `from` field.
+    #[allow(clippy::erasing_op)]
+    pub fn vmtable_import_from(&self) -> u8 {
+        0 * self.pointer_size
+    }
+
+    /// The offset of the `vmctx` field.
+    #[allow(clippy::identity_op)]
+    pub fn vmtable_import_vmctx(&self) -> u8 {
+        1 * self.pointer_size
+    }
+
+    /// Return the size of `VMTableImport`.
+    pub fn size_of_vmtable_import(&self) -> u8 {
+        2 * self.pointer_size
+    }
+}
+
+/// Offsets for `VMTableDefinition`.
+impl VMOffsets {
+    /// The offset of the `base` field.
+    #[allow(clippy::erasing_op)]
+    pub fn vmtable_definition_base(&self) -> u8 {
+        0 * self.pointer_size
+    }
+
+    /// The offset of the `current_elements` field.
+    #[allow(clippy::identity_op)]
+    pub fn vmtable_definition_current_elements(&self) -> u8 {
+        1 * self.pointer_size
+    }
+
+    /// The size of the `current_elements` field.
+    pub fn size_of_vmtable_definition_current_elements(&self) -> u8 {
+        4
+    }
+
+    /// Return the size of `VMTableDefinition`.
+    pub fn size_of_vmtable_definition(&self) -> u8 {
+        2 * self.pointer_size
+    }
+
+    /// The type of the `current_elements` field.
+    pub fn type_of_vmtable_definition_current_elements(&self) -> ir::Type {
+        ir::Type::int(u16::from(self.size_of_vmtable_definition_current_elements()) * 8).unwrap()
+    }
+}
+
+/// Offsets for `VMMemoryImport`.
+impl VMOffsets {
+    /// The offset of the `from` field.
+    #[allow(clippy::erasing_op)]
+    pub fn vmmemory_import_from(&self) -> u8 {
+        0 * self.pointer_size
+    }
+
+    /// The offset of the `vmctx` field.
+    #[allow(clippy::identity_op)]
+    pub fn vmmemory_import_vmctx(&self) -> u8 {
+        1 * self.pointer_size
+    }
+
+    /// Return the size of `VMMemoryImport`.
+    pub fn size_of_vmmemory_import(&self) -> u8 {
+        2 * self.pointer_size
+    }
+}
+
+/// Offsets for `VMMemoryDefinition`.
+impl VMOffsets {
+    /// The offset of the `base` field.
+    #[allow(clippy::erasing_op)]
+    pub fn vmmemory_definition_base(&self) -> u8 {
+        0 * self.pointer_size
+    }
+
+    /// The offset of the `current_length` field.
+    #[allow(clippy::identity_op)]
+    pub fn vmmemory_definition_current_length(&self) -> u8 {
+        1 * self.pointer_size
+    }
+
+    /// The size of the `current_length` field.
+    pub fn size_of_vmmemory_definition_current_length(&self) -> u8 {
+        4
+    }
+
+    /// Return the size of `VMMemoryDefinition`.
+    pub fn size_of_vmmemory_definition(&self) -> u8 {
+        2 * self.pointer_size
+    }
+
+    /// The type of the `current_length` field.
+    pub fn type_of_vmmemory_definition_current_length(&self) -> ir::Type {
+        ir::Type::int(u16::from(self.size_of_vmmemory_definition_current_length()) * 8).unwrap()
+    }
+}
+
+/// Offsets for `VMGlobalImport`.
+impl VMOffsets {
+    /// The offset of the `from` field.
+    #[allow(clippy::erasing_op)]
+    pub fn vmglobal_import_from(&self) -> u8 {
+        0 * self.pointer_size
+    }
+
+    /// Return the size of `VMGlobalImport`.
+    #[allow(clippy::identity_op)]
+    pub fn size_of_vmglobal_import(&self) -> u8 {
+        1 * self.pointer_size
+    }
+}
+
+/// Offsets for `VMGlobalDefinition`.
+impl VMOffsets {
+    /// Return the size of `VMGlobalDefinition`; this is the size of the largest value type (i.e. a
+    /// V128).
+    pub fn size_of_vmglobal_definition(&self) -> u8 {
+        16
+    }
+}
+
+/// Offsets for `VMSharedSignatureIndex`.
+impl VMOffsets {
+    /// Return the size of `VMSharedSignatureIndex`.
+    pub fn size_of_vmshared_signature_index(&self) -> u8 {
+        4
+    }
+}
+
+/// Offsets for `VMCallerCheckedAnyfunc`.
+impl VMOffsets {
+    /// The offset of the `func_ptr` field.
+    #[allow(clippy::erasing_op)]
+    pub fn vmcaller_checked_anyfunc_func_ptr(&self) -> u8 {
+        0 * self.pointer_size
+    }
+
+    /// The offset of the `type_index` field.
+    #[allow(clippy::identity_op)]
+    pub fn vmcaller_checked_anyfunc_type_index(&self) -> u8 {
+        1 * self.pointer_size
+    }
+
+    /// The offset of the `vmctx` field.
+    pub fn vmcaller_checked_anyfunc_vmctx(&self) -> u8 {
+        2 * self.pointer_size
+    }
+
+    /// Return the size of `VMCallerCheckedAnyfunc`.
+    pub fn size_of_vmcaller_checked_anyfunc(&self) -> u8 {
+        3 * self.pointer_size
+    }
+}
+
+/// Offsets for `VMContext`.
+impl VMOffsets {
+    /// The offset of the `signature_ids` array.
+    pub fn vmctx_signature_ids_begin(&self) -> u32 {
+        0
+    }
+
+    /// The offset of the `tables` array.
+    #[allow(clippy::erasing_op)]
+    pub fn vmctx_imported_functions_begin(&self) -> u32 {
+        self.vmctx_signature_ids_begin()
+            .checked_add(
+                self.num_signature_ids
+                    .checked_mul(u32::from(self.size_of_vmshared_signature_index()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// The offset of the `tables` array.
+    #[allow(clippy::identity_op)]
+    pub fn vmctx_imported_tables_begin(&self) -> u32 {
+        self.vmctx_imported_functions_begin()
+            .checked_add(
+                self.num_imported_functions
+                    .checked_mul(u32::from(self.size_of_vmfunction_import()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// The offset of the `memories` array.
+    pub fn vmctx_imported_memories_begin(&self) -> u32 {
+        self.vmctx_imported_tables_begin()
+            .checked_add(
+                self.num_imported_tables
+                    .checked_mul(u32::from(self.size_of_vmtable_import()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// The offset of the `globals` array.
+    pub fn vmctx_imported_globals_begin(&self) -> u32 {
+        self.vmctx_imported_memories_begin()
+            .checked_add(
+                self.num_imported_memories
+                    .checked_mul(u32::from(self.size_of_vmmemory_import()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// The offset of the `tables` array.
+    pub fn vmctx_tables_begin(&self) -> u32 {
+        self.vmctx_imported_globals_begin()
+            .checked_add(
+                self.num_imported_globals
+                    .checked_mul(u32::from(self.size_of_vmglobal_import()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// The offset of the `memories` array.
+    pub fn vmctx_memories_begin(&self) -> u32 {
+        self.vmctx_tables_begin()
+            .checked_add(
+                self.num_defined_tables
+                    .checked_mul(u32::from(self.size_of_vmtable_definition()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// The offset of the `globals` array.
+    pub fn vmctx_globals_begin(&self) -> u32 {
+        let offset = self
+            .vmctx_memories_begin()
+            .checked_add(
+                self.num_defined_memories
+                    .checked_mul(u32::from(self.size_of_vmmemory_definition()))
+                    .unwrap(),
+            )
+            .unwrap();
+        align(offset, 16)
+    }
+
+    /// The offset of the builtin functions array.
+    pub fn vmctx_builtin_functions_begin(&self) -> u32 {
+        self.vmctx_globals_begin()
+            .checked_add(
+                self.num_defined_globals
+                    .checked_mul(u32::from(self.size_of_vmglobal_definition()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// Return the size of the `VMContext` allocation.
+    pub fn size_of_vmctx(&self) -> u32 {
+        self.vmctx_builtin_functions_begin()
+            .checked_add(
+                BuiltinFunctionIndex::builtin_functions_total_number()
+                    .checked_mul(u32::from(self.pointer_size))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// Return the offset to `VMSharedSignatureId` index `index`.
+    pub fn vmctx_vmshared_signature_id(&self, index: SignatureIndex) -> u32 {
+        assert_lt!(index.as_u32(), self.num_signature_ids);
+        self.vmctx_signature_ids_begin()
+            .checked_add(
+                index
+                    .as_u32()
+                    .checked_mul(u32::from(self.size_of_vmshared_signature_index()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// Return the offset to `VMFunctionImport` index `index`.
+    pub fn vmctx_vmfunction_import(&self, index: FuncIndex) -> u32 {
+        assert_lt!(index.as_u32(), self.num_imported_functions);
+        self.vmctx_imported_functions_begin()
+            .checked_add(
+                index
+                    .as_u32()
+                    .checked_mul(u32::from(self.size_of_vmfunction_import()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// Return the offset to `VMTableImport` index `index`.
+    pub fn vmctx_vmtable_import(&self, index: TableIndex) -> u32 {
+        assert_lt!(index.as_u32(), self.num_imported_tables);
+        self.vmctx_imported_tables_begin()
+            .checked_add(
+                index
+                    .as_u32()
+                    .checked_mul(u32::from(self.size_of_vmtable_import()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// Return the offset to `VMMemoryImport` index `index`.
+    pub fn vmctx_vmmemory_import(&self, index: MemoryIndex) -> u32 {
+        assert_lt!(index.as_u32(), self.num_imported_memories);
+        self.vmctx_imported_memories_begin()
+            .checked_add(
+                index
+                    .as_u32()
+                    .checked_mul(u32::from(self.size_of_vmmemory_import()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// Return the offset to `VMGlobalImport` index `index`.
+    pub fn vmctx_vmglobal_import(&self, index: GlobalIndex) -> u32 {
+        assert_lt!(index.as_u32(), self.num_imported_globals);
+        self.vmctx_imported_globals_begin()
+            .checked_add(
+                index
+                    .as_u32()
+                    .checked_mul(u32::from(self.size_of_vmglobal_import()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// Return the offset to `VMTableDefinition` index `index`.
+    pub fn vmctx_vmtable_definition(&self, index: DefinedTableIndex) -> u32 {
+        assert_lt!(index.as_u32(), self.num_defined_tables);
+        self.vmctx_tables_begin()
+            .checked_add(
+                index
+                    .as_u32()
+                    .checked_mul(u32::from(self.size_of_vmtable_definition()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// Return the offset to `VMMemoryDefinition` index `index`.
+    pub fn vmctx_vmmemory_definition(&self, index: DefinedMemoryIndex) -> u32 {
+        assert_lt!(index.as_u32(), self.num_defined_memories);
+        self.vmctx_memories_begin()
+            .checked_add(
+                index
+                    .as_u32()
+                    .checked_mul(u32::from(self.size_of_vmmemory_definition()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// Return the offset to the `VMGlobalDefinition` index `index`.
+    pub fn vmctx_vmglobal_definition(&self, index: DefinedGlobalIndex) -> u32 {
+        assert_lt!(index.as_u32(), self.num_defined_globals);
+        self.vmctx_globals_begin()
+            .checked_add(
+                index
+                    .as_u32()
+                    .checked_mul(u32::from(self.size_of_vmglobal_definition()))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+
+    /// Return the offset to the `body` field in `*const VMFunctionBody` index `index`.
+    pub fn vmctx_vmfunction_import_body(&self, index: FuncIndex) -> u32 {
+        self.vmctx_vmfunction_import(index)
+            .checked_add(u32::from(self.vmfunction_import_body()))
+            .unwrap()
+    }
+
+    /// Return the offset to the `vmctx` field in `*const VMFunctionBody` index `index`.
+    pub fn vmctx_vmfunction_import_vmctx(&self, index: FuncIndex) -> u32 {
+        self.vmctx_vmfunction_import(index)
+            .checked_add(u32::from(self.vmfunction_import_vmctx()))
+            .unwrap()
+    }
+
+    /// Return the offset to the `from` field in `VMTableImport` index `index`.
+    pub fn vmctx_vmtable_import_from(&self, index: TableIndex) -> u32 {
+        self.vmctx_vmtable_import(index)
+            .checked_add(u32::from(self.vmtable_import_from()))
+            .unwrap()
+    }
+
+    /// Return the offset to the `base` field in `VMTableDefinition` index `index`.
+    pub fn vmctx_vmtable_definition_base(&self, index: DefinedTableIndex) -> u32 {
+        self.vmctx_vmtable_definition(index)
+            .checked_add(u32::from(self.vmtable_definition_base()))
+            .unwrap()
+    }
+
+    /// Return the offset to the `current_elements` field in `VMTableDefinition` index `index`.
+    pub fn vmctx_vmtable_definition_current_elements(&self, index: DefinedTableIndex) -> u32 {
+        self.vmctx_vmtable_definition(index)
+            .checked_add(u32::from(self.vmtable_definition_current_elements()))
+            .unwrap()
+    }
+
+    /// Return the offset to the `from` field in `VMMemoryImport` index `index`.
+    pub fn vmctx_vmmemory_import_from(&self, index: MemoryIndex) -> u32 {
+        self.vmctx_vmmemory_import(index)
+            .checked_add(u32::from(self.vmmemory_import_from()))
+            .unwrap()
+    }
+
+    /// Return the offset to the `vmctx` field in `VMMemoryImport` index `index`.
+    pub fn vmctx_vmmemory_import_vmctx(&self, index: MemoryIndex) -> u32 {
+        self.vmctx_vmmemory_import(index)
+            .checked_add(u32::from(self.vmmemory_import_vmctx()))
+            .unwrap()
+    }
+
+    /// Return the offset to the `base` field in `VMMemoryDefinition` index `index`.
+    pub fn vmctx_vmmemory_definition_base(&self, index: DefinedMemoryIndex) -> u32 {
+        self.vmctx_vmmemory_definition(index)
+            .checked_add(u32::from(self.vmmemory_definition_base()))
+            .unwrap()
+    }
+
+    /// Return the offset to the `current_length` field in `VMMemoryDefinition` index `index`.
+    pub fn vmctx_vmmemory_definition_current_length(&self, index: DefinedMemoryIndex) -> u32 {
+        self.vmctx_vmmemory_definition(index)
+            .checked_add(u32::from(self.vmmemory_definition_current_length()))
+            .unwrap()
+    }
+
+    /// Return the offset to the `from` field in `VMGlobalImport` index `index`.
+    pub fn vmctx_vmglobal_import_from(&self, index: GlobalIndex) -> u32 {
+        self.vmctx_vmglobal_import(index)
+            .checked_add(u32::from(self.vmglobal_import_from()))
+            .unwrap()
+    }
+
+    /// Return the offset to builtin function in `VMBuiltinFunctionsArray` index `index`.
+    pub fn vmctx_builtin_function(&self, index: BuiltinFunctionIndex) -> u32 {
+        self.vmctx_builtin_functions_begin()
+            .checked_add(
+                index
+                    .index()
+                    .checked_mul(u32::from(self.pointer_size))
+                    .unwrap(),
+            )
+            .unwrap()
+    }
+}
+
+/// Target specific type for shared signature index.
+#[derive(Debug, Copy, Clone)]
+pub struct TargetSharedSignatureIndex(u32);
+
+impl TargetSharedSignatureIndex {
+    /// Constructs `TargetSharedSignatureIndex`.
+    pub fn new(value: u32) -> Self {
+        Self(value)
+    }
+
+    /// Returns index value.
+    pub fn index(self) -> u32 {
+        self.0
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use crate::vmoffsets::align;
+
+    #[test]
+    fn alignment() {
+        fn is_aligned(x: u32) -> bool {
+            x % 16 == 0
+        }
+        assert!(is_aligned(align(0, 16)));
+        assert!(is_aligned(align(32, 16)));
+        assert!(is_aligned(align(33, 16)));
+        assert!(is_aligned(align(31, 16)));
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_fuzzing/generators.rs.html b/api/src/wasmtime_fuzzing/generators.rs.html new file mode 100644 index 000000000000..1b14e83bdeb1 --- /dev/null +++ b/api/src/wasmtime_fuzzing/generators.rs.html @@ -0,0 +1,173 @@ +generators.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+
+//! Test case generators.
+//!
+//! Test case generators take raw, unstructured input from a fuzzer
+//! (e.g. libFuzzer) and translate that into a structured test case (e.g. a
+//! valid Wasm binary).
+//!
+//! These are generally implementations of the `Arbitrary` trait, or some
+//! wrapper over an external tool, such that the wrapper implements the
+//! `Arbitrary` trait for the wrapped external tool.
+
+pub mod api;
+
+use arbitrary::{Arbitrary, Unstructured};
+use std::fmt;
+
+/// A Wasm test case generator that is powered by Binaryen's `wasm-opt -ttf`.
+#[derive(Clone)]
+pub struct WasmOptTtf {
+    /// The raw, encoded Wasm bytes.
+    pub wasm: Vec<u8>,
+}
+
+impl fmt::Debug for WasmOptTtf {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        write!(
+            f,
+            "WasmOptTtf {{ wasm: wat::parse_str(r###\"\n{}\n\"###).unwrap() }}",
+            wasmprinter::print_bytes(&self.wasm).expect("valid wasm should always disassemble")
+        )
+    }
+}
+
+impl Arbitrary for WasmOptTtf {
+    fn arbitrary(input: &mut Unstructured) -> arbitrary::Result<Self> {
+        let seed: Vec<u8> = Arbitrary::arbitrary(input)?;
+        let module = binaryen::tools::translate_to_fuzz_mvp(&seed);
+        let wasm = module.write();
+        Ok(WasmOptTtf { wasm })
+    }
+
+    fn arbitrary_take_rest(input: Unstructured) -> arbitrary::Result<Self> {
+        let seed: Vec<u8> = Arbitrary::arbitrary_take_rest(input)?;
+        let module = binaryen::tools::translate_to_fuzz_mvp(&seed);
+        let wasm = module.write();
+        Ok(WasmOptTtf { wasm })
+    }
+}
+
+/// A description of configuration options that we should do differential
+/// testing between.
+#[derive(Arbitrary, Clone, Debug, PartialEq, Eq, Hash)]
+pub struct DifferentialConfig {
+    strategy: DifferentialStrategy,
+    opt_level: DifferentialOptLevel,
+}
+
+impl DifferentialConfig {
+    /// Convert this differential fuzzing config into a `wasmtime::Config`.
+    pub fn to_wasmtime_config(&self) -> anyhow::Result<wasmtime::Config> {
+        let mut config = wasmtime::Config::new();
+        config.strategy(match self.strategy {
+            DifferentialStrategy::Cranelift => wasmtime::Strategy::Cranelift,
+            DifferentialStrategy::Lightbeam => wasmtime::Strategy::Lightbeam,
+        })?;
+        config.cranelift_opt_level(match self.opt_level {
+            DifferentialOptLevel::None => wasmtime::OptLevel::None,
+            DifferentialOptLevel::Speed => wasmtime::OptLevel::Speed,
+            DifferentialOptLevel::SpeedAndSize => wasmtime::OptLevel::SpeedAndSize,
+        });
+        Ok(config)
+    }
+}
+
+#[derive(Arbitrary, Clone, Debug, PartialEq, Eq, Hash)]
+enum DifferentialStrategy {
+    Cranelift,
+    Lightbeam,
+}
+
+#[derive(Arbitrary, Clone, Debug, PartialEq, Eq, Hash)]
+enum DifferentialOptLevel {
+    None,
+    Speed,
+    SpeedAndSize,
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_fuzzing/generators/api.rs.html b/api/src/wasmtime_fuzzing/generators/api.rs.html new file mode 100644 index 000000000000..6a0748df5f3d --- /dev/null +++ b/api/src/wasmtime_fuzzing/generators/api.rs.html @@ -0,0 +1,301 @@ +api.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+
+//! Generating sequences of Wasmtime API calls.
+//!
+//! We only generate *valid* sequences of API calls. To do this, we keep track
+//! of what objects we've already created in earlier API calls via the `Scope`
+//! struct.
+//!
+//! To generate even-more-pathological sequences of API calls, we use [swarm
+//! testing]:
+//!
+//! > In swarm testing, the usual practice of potentially including all features
+//! > in every test case is abandoned. Rather, a large “swarm” of randomly
+//! > generated configurations, each of which omits some features, is used, with
+//! > configurations receiving equal resources.
+//!
+//! [swarm testing]: https://www.cs.utah.edu/~regehr/papers/swarm12.pdf
+
+use arbitrary::{Arbitrary, Unstructured};
+use std::collections::BTreeSet;
+
+#[derive(Arbitrary, Debug)]
+struct Swarm {
+    config_debug_info: bool,
+    module_new: bool,
+    module_drop: bool,
+    instance_new: bool,
+    instance_drop: bool,
+    call_exported_func: bool,
+}
+
+/// A call to one of Wasmtime's public APIs.
+#[derive(Arbitrary, Clone, Debug)]
+#[allow(missing_docs)]
+pub enum ApiCall {
+    ConfigNew,
+    ConfigDebugInfo(bool),
+    EngineNew,
+    StoreNew,
+    ModuleNew { id: usize, wasm: super::WasmOptTtf },
+    ModuleDrop { id: usize },
+    InstanceNew { id: usize, module: usize },
+    InstanceDrop { id: usize },
+    CallExportedFunc { instance: usize, nth: usize },
+}
+use ApiCall::*;
+
+#[derive(Default)]
+struct Scope {
+    id_counter: usize,
+    modules: BTreeSet<usize>,
+    instances: BTreeSet<usize>,
+}
+
+impl Scope {
+    fn next_id(&mut self) -> usize {
+        let id = self.id_counter;
+        self.id_counter = id + 1;
+        id
+    }
+}
+
+/// A sequence of API calls.
+#[derive(Debug)]
+pub struct ApiCalls {
+    /// The API calls.
+    pub calls: Vec<ApiCall>,
+}
+
+impl Arbitrary for ApiCalls {
+    fn arbitrary(input: &mut Unstructured) -> arbitrary::Result<Self> {
+        let swarm = Swarm::arbitrary(input)?;
+        let mut calls = vec![];
+
+        arbitrary_config(input, &swarm, &mut calls)?;
+        calls.push(EngineNew);
+        calls.push(StoreNew);
+
+        let mut scope = Scope::default();
+
+        for _ in 0..input.arbitrary_len::<ApiCall>()? {
+            let mut choices: Vec<fn(_, &mut Scope) -> arbitrary::Result<ApiCall>> = vec![];
+
+            if swarm.module_new {
+                choices.push(|input, scope| {
+                    let id = scope.next_id();
+                    scope.modules.insert(id);
+                    let wasm = super::WasmOptTtf::arbitrary(input)?;
+                    Ok(ModuleNew { id, wasm })
+                });
+            }
+            if swarm.module_drop && !scope.modules.is_empty() {
+                choices.push(|input, scope| {
+                    let modules: Vec<_> = scope.modules.iter().cloned().collect();
+                    let id = *input.choose(&modules)?;
+                    scope.modules.remove(&id);
+                    Ok(ModuleDrop { id })
+                });
+            }
+            if swarm.instance_new && !scope.modules.is_empty() {
+                choices.push(|input, scope| {
+                    let modules: Vec<_> = scope.modules.iter().cloned().collect();
+                    let module = *input.choose(&modules)?;
+                    let id = scope.next_id();
+                    scope.instances.insert(id);
+                    Ok(InstanceNew { id, module })
+                });
+            }
+            if swarm.instance_drop && !scope.instances.is_empty() {
+                choices.push(|input, scope| {
+                    let instances: Vec<_> = scope.instances.iter().cloned().collect();
+                    let id = *input.choose(&instances)?;
+                    scope.instances.remove(&id);
+                    Ok(InstanceDrop { id })
+                });
+            }
+            if swarm.call_exported_func && !scope.instances.is_empty() {
+                choices.push(|input, scope| {
+                    let instances: Vec<_> = scope.instances.iter().cloned().collect();
+                    let instance = *input.choose(&instances)?;
+                    let nth = usize::arbitrary(input)?;
+                    Ok(CallExportedFunc { instance, nth })
+                });
+            }
+
+            if choices.is_empty() {
+                break;
+            }
+            let c = input.choose(&choices)?;
+            calls.push(c(input, &mut scope)?);
+        }
+
+        Ok(ApiCalls { calls })
+    }
+}
+
+fn arbitrary_config(
+    input: &mut Unstructured,
+    swarm: &Swarm,
+    calls: &mut Vec<ApiCall>,
+) -> arbitrary::Result<()> {
+    calls.push(ConfigNew);
+
+    if swarm.config_debug_info && bool::arbitrary(input)? {
+        calls.push(ConfigDebugInfo(bool::arbitrary(input)?));
+    }
+
+    // TODO: flags, features, and compilation strategy.
+
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_fuzzing/lib.rs.html b/api/src/wasmtime_fuzzing/lib.rs.html new file mode 100644 index 000000000000..32879eea3b50 --- /dev/null +++ b/api/src/wasmtime_fuzzing/lib.rs.html @@ -0,0 +1,15 @@ +lib.rs.html -- source
1
+2
+3
+4
+5
+6
+
+//! Fuzzing infrastructure for Wasmtime.
+
+#![deny(missing_docs, missing_debug_implementations)]
+
+pub mod generators;
+pub mod oracles;
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_fuzzing/oracles.rs.html b/api/src/wasmtime_fuzzing/oracles.rs.html new file mode 100644 index 000000000000..ddd4394e90b1 --- /dev/null +++ b/api/src/wasmtime_fuzzing/oracles.rs.html @@ -0,0 +1,811 @@ +oracles.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+
+//! Oracles.
+//!
+//! Oracles take a test case and determine whether we have a bug. For example,
+//! one of the simplest oracles is to take a Wasm binary as our input test case,
+//! validate and instantiate it, and (implicitly) check that no assertions
+//! failed or segfaults happened. A more complicated oracle might compare the
+//! result of executing a Wasm file with and without optimizations enabled, and
+//! make sure that the two executions are observably identical.
+//!
+//! When an oracle finds a bug, it should report it to the fuzzing engine by
+//! panicking.
+
+pub mod dummy;
+
+use dummy::{dummy_imports, dummy_values};
+use std::collections::{HashMap, HashSet};
+use std::sync::atomic::{AtomicUsize, Ordering::SeqCst};
+use wasmtime::*;
+
+fn fuzz_default_config(strategy: Strategy) -> Config {
+    drop(env_logger::try_init());
+    let mut config = Config::new();
+    config
+        .cranelift_debug_verifier(true)
+        .wasm_multi_value(true)
+        .strategy(strategy)
+        .expect("failed to enable lightbeam");
+    return config;
+}
+
+fn log_wasm(wasm: &[u8]) {
+    static CNT: AtomicUsize = AtomicUsize::new(0);
+    if !log::log_enabled!(log::Level::Debug) {
+        return;
+    }
+
+    let i = CNT.fetch_add(1, SeqCst);
+    let name = format!("testcase{}.wasm", i);
+    std::fs::write(&name, wasm).expect("failed to write wasm file");
+    log::debug!("wrote wasm file to `{}`", name);
+    if let Ok(s) = wasmprinter::print_bytes(wasm) {
+        let name = format!("testcase{}.wat", i);
+        std::fs::write(&name, s).expect("failed to write wat file");
+    }
+}
+
+/// Instantiate the Wasm buffer, and implicitly fail if we have an unexpected
+/// panic or segfault or anything else that can be detected "passively".
+///
+/// Performs initial validation, and returns early if the Wasm is invalid.
+///
+/// You can control which compiler is used via passing a `Strategy`.
+pub fn instantiate(wasm: &[u8], strategy: Strategy) {
+    instantiate_with_config(wasm, fuzz_default_config(strategy));
+}
+
+/// Instantiate the Wasm buffer, and implicitly fail if we have an unexpected
+/// panic or segfault or anything else that can be detected "passively".
+///
+/// The engine will be configured using provided config.
+///
+/// See also `instantiate` functions.
+pub fn instantiate_with_config(wasm: &[u8], config: Config) {
+    let engine = Engine::new(&config);
+    let store = Store::new(&engine);
+
+    log_wasm(wasm);
+    let module = match Module::new(&store, wasm) {
+        Ok(module) => module,
+        Err(_) => return,
+    };
+
+    let imports = match dummy_imports(&store, module.imports()) {
+        Ok(imps) => imps,
+        Err(_) => {
+            // There are some value types that we can't synthesize a
+            // dummy value for (e.g. anyrefs) and for modules that
+            // import things of these types we skip instantiation.
+            return;
+        }
+    };
+
+    // Don't unwrap this: there can be instantiation-/link-time errors that
+    // aren't caught during validation or compilation. For example, an imported
+    // table might not have room for an element segment that we want to
+    // initialize into it.
+    let _result = Instance::new(&module, &imports);
+}
+
+/// Compile the Wasm buffer, and implicitly fail if we have an unexpected
+/// panic or segfault or anything else that can be detected "passively".
+///
+/// Performs initial validation, and returns early if the Wasm is invalid.
+///
+/// You can control which compiler is used via passing a `Strategy`.
+pub fn compile(wasm: &[u8], strategy: Strategy) {
+    let engine = Engine::new(&fuzz_default_config(strategy));
+    let store = Store::new(&engine);
+    log_wasm(wasm);
+    let _ = Module::new(&store, wasm);
+}
+
+/// Instantiate the given Wasm module with each `Config` and call all of its
+/// exports. Modulo OOM, non-canonical NaNs, and usage of Wasm features that are
+/// or aren't enabled for different configs, we should get the same results when
+/// we call the exported functions for all of our different configs.
+pub fn differential_execution(
+    ttf: &crate::generators::WasmOptTtf,
+    configs: &[crate::generators::DifferentialConfig],
+) {
+    drop(env_logger::try_init());
+    // We need at least two configs.
+    if configs.len() < 2
+        // And all the configs should be unique.
+        || configs.iter().collect::<HashSet<_>>().len() != configs.len()
+    {
+        return;
+    }
+
+    let configs: Vec<_> = match configs.iter().map(|c| c.to_wasmtime_config()).collect() {
+        Ok(cs) => cs,
+        // If the config is trying to use something that was turned off at
+        // compile time, eg lightbeam, just continue to the next fuzz input.
+        Err(_) => return,
+    };
+
+    let mut export_func_results: HashMap<String, Result<Box<[Val]>, Trap>> = Default::default();
+    log_wasm(&ttf.wasm);
+
+    for config in &configs {
+        let engine = Engine::new(config);
+        let store = Store::new(&engine);
+
+        let module = match Module::new(&store, &ttf.wasm) {
+            Ok(module) => module,
+            // The module might rely on some feature that our config didn't
+            // enable or something like that.
+            Err(e) => {
+                eprintln!("Warning: failed to compile `wasm-opt -ttf` module: {}", e);
+                continue;
+            }
+        };
+
+        // TODO: we should implement tracing versions of these dummy imports
+        // that record a trace of the order that imported functions were called
+        // in and with what values. Like the results of exported functions,
+        // calls to imports should also yield the same values for each
+        // configuration, and we should assert that.
+        let imports = match dummy_imports(&store, module.imports()) {
+            Ok(imps) => imps,
+            Err(e) => {
+                // There are some value types that we can't synthesize a
+                // dummy value for (e.g. anyrefs) and for modules that
+                // import things of these types we skip instantiation.
+                eprintln!("Warning: failed to synthesize dummy imports: {}", e);
+                continue;
+            }
+        };
+
+        // Don't unwrap this: there can be instantiation-/link-time errors that
+        // aren't caught during validation or compilation. For example, an imported
+        // table might not have room for an element segment that we want to
+        // initialize into it.
+        let instance = match Instance::new(&module, &imports) {
+            Ok(instance) => instance,
+            Err(e) => {
+                eprintln!(
+                    "Warning: failed to instantiate `wasm-opt -ttf` module: {}",
+                    e
+                );
+                continue;
+            }
+        };
+
+        let funcs = module
+            .exports()
+            .iter()
+            .filter_map(|e| {
+                if let ExternType::Func(_) = e.ty() {
+                    Some(e.name())
+                } else {
+                    None
+                }
+            })
+            .collect::<Vec<_>>();
+
+        for name in funcs {
+            // Always call the hang limit initializer first, so that we don't
+            // infinite loop when calling another export.
+            init_hang_limit(&instance);
+
+            let f = match instance
+                .get_export(&name)
+                .expect("instance should have export from module")
+            {
+                Extern::Func(f) => f.clone(),
+                _ => panic!("export should be a function"),
+            };
+
+            let ty = f.ty();
+            let params = match dummy_values(ty.params()) {
+                Ok(p) => p,
+                Err(_) => continue,
+            };
+            let this_result = f.call(&params);
+
+            let existing_result = export_func_results
+                .entry(name.to_string())
+                .or_insert_with(|| this_result.clone());
+            assert_same_export_func_result(&existing_result, &this_result, name);
+        }
+    }
+}
+
+fn init_hang_limit(instance: &Instance) {
+    match instance.get_export("hangLimitInitializer") {
+        None => return,
+        Some(Extern::Func(f)) => {
+            f.call(&[])
+                .expect("initializing the hang limit should not fail");
+        }
+        Some(_) => panic!("unexpected hangLimitInitializer export"),
+    }
+}
+
+fn assert_same_export_func_result(
+    lhs: &Result<Box<[Val]>, Trap>,
+    rhs: &Result<Box<[Val]>, Trap>,
+    func_name: &str,
+) {
+    let fail = || {
+        panic!(
+            "differential fuzzing failed: exported func {} returned two \
+             different results: {:?} != {:?}",
+            func_name, lhs, rhs
+        )
+    };
+
+    match (lhs, rhs) {
+        (Err(_), Err(_)) => {}
+        (Ok(lhs), Ok(rhs)) => {
+            if lhs.len() != rhs.len() {
+                fail();
+            }
+            for (lhs, rhs) in lhs.iter().zip(rhs.iter()) {
+                match (lhs, rhs) {
+                    (Val::I32(lhs), Val::I32(rhs)) if lhs == rhs => continue,
+                    (Val::I64(lhs), Val::I64(rhs)) if lhs == rhs => continue,
+                    (Val::V128(lhs), Val::V128(rhs)) if lhs == rhs => continue,
+                    (Val::F32(lhs), Val::F32(rhs)) => {
+                        let lhs = f32::from_bits(*lhs);
+                        let rhs = f32::from_bits(*rhs);
+                        if lhs == rhs || (lhs.is_nan() && rhs.is_nan()) {
+                            continue;
+                        } else {
+                            fail()
+                        }
+                    }
+                    (Val::F64(lhs), Val::F64(rhs)) => {
+                        let lhs = f64::from_bits(*lhs);
+                        let rhs = f64::from_bits(*rhs);
+                        if lhs == rhs || (lhs.is_nan() && rhs.is_nan()) {
+                            continue;
+                        } else {
+                            fail()
+                        }
+                    }
+                    (Val::AnyRef(_), Val::AnyRef(_)) | (Val::FuncRef(_), Val::FuncRef(_)) => {
+                        continue
+                    }
+                    _ => fail(),
+                }
+            }
+        }
+        _ => fail(),
+    }
+}
+
+/// Invoke the given API calls.
+pub fn make_api_calls(api: crate::generators::api::ApiCalls) {
+    use crate::generators::api::ApiCall;
+
+    drop(env_logger::try_init());
+
+    let mut config: Option<Config> = None;
+    let mut engine: Option<Engine> = None;
+    let mut store: Option<Store> = None;
+    let mut modules: HashMap<usize, Module> = Default::default();
+    let mut instances: HashMap<usize, Instance> = Default::default();
+
+    for call in api.calls {
+        match call {
+            ApiCall::ConfigNew => {
+                log::trace!("creating config");
+                assert!(config.is_none());
+                let mut cfg = Config::new();
+                cfg.cranelift_debug_verifier(true);
+                config = Some(cfg);
+            }
+
+            ApiCall::ConfigDebugInfo(b) => {
+                log::trace!("enabling debuginfo");
+                config.as_mut().unwrap().debug_info(b);
+            }
+
+            ApiCall::EngineNew => {
+                log::trace!("creating engine");
+                assert!(engine.is_none());
+                engine = Some(Engine::new(config.as_ref().unwrap()));
+            }
+
+            ApiCall::StoreNew => {
+                log::trace!("creating store");
+                assert!(store.is_none());
+                store = Some(Store::new(engine.as_ref().unwrap()));
+            }
+
+            ApiCall::ModuleNew { id, wasm } => {
+                log::debug!("creating module: {}", id);
+                log_wasm(&wasm.wasm);
+                let module = match Module::new(store.as_ref().unwrap(), &wasm.wasm) {
+                    Ok(m) => m,
+                    Err(_) => continue,
+                };
+                let old = modules.insert(id, module);
+                assert!(old.is_none());
+            }
+
+            ApiCall::ModuleDrop { id } => {
+                log::trace!("dropping module: {}", id);
+                drop(modules.remove(&id));
+            }
+
+            ApiCall::InstanceNew { id, module } => {
+                log::trace!("instantiating module {} as {}", module, id);
+                let module = match modules.get(&module) {
+                    Some(m) => m,
+                    None => continue,
+                };
+
+                let imports = match dummy_imports(store.as_ref().unwrap(), module.imports()) {
+                    Ok(imps) => imps,
+                    Err(_) => {
+                        // There are some value types that we can't synthesize a
+                        // dummy value for (e.g. anyrefs) and for modules that
+                        // import things of these types we skip instantiation.
+                        continue;
+                    }
+                };
+
+                // Don't unwrap this: there can be instantiation-/link-time errors that
+                // aren't caught during validation or compilation. For example, an imported
+                // table might not have room for an element segment that we want to
+                // initialize into it.
+                if let Ok(instance) = Instance::new(&module, &imports) {
+                    instances.insert(id, instance);
+                }
+            }
+
+            ApiCall::InstanceDrop { id } => {
+                log::trace!("dropping instance {}", id);
+                drop(instances.remove(&id));
+            }
+
+            ApiCall::CallExportedFunc { instance, nth } => {
+                log::trace!("calling instance export {} / {}", instance, nth);
+                let instance = match instances.get(&instance) {
+                    Some(i) => i,
+                    None => {
+                        // Note that we aren't guaranteed to instantiate valid
+                        // modules, see comments in `InstanceNew` for details on
+                        // that. But the API call generator can't know if
+                        // instantiation failed, so we might not actually have
+                        // this instance. When that's the case, just skip the
+                        // API call and keep going.
+                        continue;
+                    }
+                };
+
+                let funcs = instance
+                    .exports()
+                    .iter()
+                    .filter_map(|e| match e {
+                        Extern::Func(f) => Some(f.clone()),
+                        _ => None,
+                    })
+                    .collect::<Vec<_>>();
+
+                if funcs.is_empty() {
+                    continue;
+                }
+
+                let nth = nth % funcs.len();
+                let f = &funcs[nth];
+                let ty = f.ty();
+                let params = match dummy_values(ty.params()) {
+                    Ok(p) => p,
+                    Err(_) => continue,
+                };
+                let _ = f.call(&params);
+            }
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_fuzzing/oracles/dummy.rs.html b/api/src/wasmtime_fuzzing/oracles/dummy.rs.html new file mode 100644 index 000000000000..7b0ad931d2c3 --- /dev/null +++ b/api/src/wasmtime_fuzzing/oracles/dummy.rs.html @@ -0,0 +1,189 @@ +dummy.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+
+//! Dummy implementations of things that a Wasm module can import.
+
+use std::rc::Rc;
+use wasmtime::{
+    Callable, Extern, ExternType, Func, FuncType, Global, GlobalType, ImportType, Memory,
+    MemoryType, Store, Table, TableType, Trap, Val, ValType,
+};
+
+/// Create a set of dummy functions/globals/etc for the given imports.
+pub fn dummy_imports(store: &Store, import_tys: &[ImportType]) -> Result<Vec<Extern>, Trap> {
+    let mut imports = Vec::with_capacity(import_tys.len());
+    for imp in import_tys {
+        imports.push(match imp.ty() {
+            ExternType::Func(func_ty) => Extern::Func(DummyFunc::new(&store, func_ty.clone())),
+            ExternType::Global(global_ty) => {
+                Extern::Global(dummy_global(&store, global_ty.clone())?)
+            }
+            ExternType::Table(table_ty) => Extern::Table(dummy_table(&store, table_ty.clone())?),
+            ExternType::Memory(mem_ty) => Extern::Memory(dummy_memory(&store, mem_ty.clone())),
+        });
+    }
+    Ok(imports)
+}
+
+/// A function that doesn't do anything but return the default (zero) value for
+/// the function's type.
+#[derive(Debug)]
+pub struct DummyFunc(FuncType);
+
+impl DummyFunc {
+    /// Construct a new dummy `Func`.
+    pub fn new(store: &Store, ty: FuncType) -> Func {
+        let callable = DummyFunc(ty.clone());
+        Func::new(store, ty, Rc::new(callable) as _)
+    }
+}
+
+impl Callable for DummyFunc {
+    fn call(&self, _params: &[Val], results: &mut [Val]) -> Result<(), Trap> {
+        for (ret_ty, result) in self.0.results().iter().zip(results) {
+            *result = dummy_value(ret_ty)?;
+        }
+
+        Ok(())
+    }
+}
+
+/// Construct a dummy value for the given value type.
+pub fn dummy_value(val_ty: &ValType) -> Result<Val, Trap> {
+    Ok(match val_ty {
+        ValType::I32 => Val::I32(0),
+        ValType::I64 => Val::I64(0),
+        ValType::F32 => Val::F32(0),
+        ValType::F64 => Val::F64(0),
+        ValType::V128 => {
+            return Err(Trap::new(
+                "dummy_value: unsupported function return type: v128".to_string(),
+            ))
+        }
+        ValType::AnyRef => {
+            return Err(Trap::new(
+                "dummy_value: unsupported function return type: anyref".to_string(),
+            ))
+        }
+        ValType::FuncRef => {
+            return Err(Trap::new(
+                "dummy_value: unsupported function return type: funcref".to_string(),
+            ))
+        }
+    })
+}
+
+/// Construct a sequence of dummy values for the given types.
+pub fn dummy_values(val_tys: &[ValType]) -> Result<Vec<Val>, Trap> {
+    val_tys.iter().map(dummy_value).collect()
+}
+
+/// Construct a dummy global for the given global type.
+pub fn dummy_global(store: &Store, ty: GlobalType) -> Result<Global, Trap> {
+    let val = dummy_value(ty.content())?;
+    Ok(Global::new(store, ty, val).unwrap())
+}
+
+/// Construct a dummy table for the given table type.
+pub fn dummy_table(store: &Store, ty: TableType) -> Result<Table, Trap> {
+    let init_val = dummy_value(&ty.element())?;
+    Ok(Table::new(store, ty, init_val).unwrap())
+}
+
+/// Construct a dummy memory for the given memory type.
+pub fn dummy_memory(store: &Store, ty: MemoryType) -> Memory {
+    Memory::new(store, ty)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_interface_types/lib.rs.html b/api/src/wasmtime_interface_types/lib.rs.html new file mode 100644 index 000000000000..d70e8fbdd912 --- /dev/null +++ b/api/src/wasmtime_interface_types/lib.rs.html @@ -0,0 +1,983 @@ +lib.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+
+//! A small crate to handle WebAssembly interface types in wasmtime.
+//!
+//! Note that this is intended to follow the [official proposal][proposal] and
+//! is highly susceptible to change/breakage/etc.
+//!
+//! [proposal]: https://github.com/webassembly/webidl-bindings
+
+#![deny(missing_docs)]
+
+use anyhow::{bail, format_err, Result};
+use std::convert::TryFrom;
+use std::str;
+use wasm_webidl_bindings::ast;
+use wasmtime::Val;
+use wasmtime_environ::ir;
+use wasmtime_runtime::{Export, InstanceHandle};
+
+mod value;
+pub use value::Value;
+
+/// A data structure intended to hold a parsed representation of the wasm
+/// interface types of a module.
+///
+/// The expected usage pattern is to create this next to wasmtime data
+/// structures and then use this to process arguments into wasm arguments as
+/// appropriate for bound functions.
+pub struct ModuleData {
+    inner: Option<Inner>,
+    wasi_module_name: Option<String>,
+}
+
+struct Inner {
+    module: walrus::Module,
+}
+
+/// Representation of a binding of an exported function.
+///
+/// Can be used to learn about binding expressions and/or binding types.
+pub struct ExportBinding<'a> {
+    kind: ExportBindingKind<'a>,
+}
+
+enum ExportBindingKind<'a> {
+    Rich {
+        section: &'a ast::WebidlBindings,
+        binding: &'a ast::ExportBinding,
+    },
+    Raw(ir::Signature),
+}
+
+impl ModuleData {
+    /// Parses a raw binary wasm file, extracting information about wasm
+    /// interface types.
+    ///
+    /// Returns an error if the wasm file is malformed.
+    pub fn new(wasm: &[u8]) -> Result<ModuleData> {
+        // Perform a fast search through the module for the right custom
+        // section. Actually parsing out the interface types data is currently a
+        // pretty expensive operation so we want to only do that if we actually
+        // find the right section.
+        let mut reader = wasmparser::ModuleReader::new(wasm)?;
+        let mut found = false;
+        let mut wasi_module_name = None;
+        while !reader.eof() {
+            let section = reader.read()?;
+
+            match section.code {
+                wasmparser::SectionCode::Custom { name, .. } => {
+                    if name == "webidl-bindings" {
+                        found = true;
+                        break;
+                    }
+                }
+
+                // If we see the import section then see if we can find a wasi
+                // module import which we can later use to register the wasi
+                // implementation automatically.
+                wasmparser::SectionCode::Import => {
+                    let section = section.get_import_section_reader()?;
+                    for import in section {
+                        let import = import?;
+                        if wasmtime_wasi::is_wasi_module(import.module) {
+                            wasi_module_name = Some(import.module.to_string());
+                        }
+                    }
+                }
+                _ => {}
+            }
+        }
+        if !found {
+            return Ok(ModuleData {
+                inner: None,
+                wasi_module_name,
+            });
+        }
+
+        // Ok, perform the more expensive parsing. WebAssembly interface types
+        // are super experimental and under development. To get something
+        // quickly up and running we're using the same crate as `wasm-bindgen`,
+        // a producer of wasm interface types, the `wasm-webidl-bindings` crate.
+        // This crate relies on `walrus` which has its own IR for a wasm module.
+        // Ideally we'd do all this during cranelift's own parsing of the wasm
+        // module and we wouldn't have to reparse here purely for this one use
+        // case.
+        //
+        // For now though this is "fast enough" and good enough for some demos,
+        // but for full-on production quality engines we'll want to integrate
+        // this much more tightly with the rest of wasmtime.
+        let module = walrus::ModuleConfig::new()
+            .on_parse(wasm_webidl_bindings::binary::on_parse)
+            .parse(wasm)?;
+
+        Ok(ModuleData {
+            inner: Some(Inner { module }),
+            wasi_module_name,
+        })
+    }
+
+    /// Detects if WASI support is needed: returns module name that is requested.
+    pub fn find_wasi_module_name(&self) -> Option<String> {
+        self.wasi_module_name.clone()
+    }
+
+    /// Invokes wasmtime function with a `&[Value]` list. `Value` the set of
+    /// wasm interface types.
+    pub fn invoke_export(
+        &self,
+        instance: &wasmtime::Instance,
+        export: &str,
+        args: &[Value],
+    ) -> Result<Vec<Value>> {
+        let mut handle = instance.handle().clone();
+
+        let binding = self.binding_for_export(&mut handle, export)?;
+        let incoming = binding.param_bindings()?;
+        let outgoing = binding.result_bindings()?;
+
+        let f = instance
+            .get_export(export)
+            .ok_or_else(|| format_err!("failed to find export `{}`", export))?
+            .func()
+            .ok_or_else(|| format_err!("`{}` is not a function", export))?
+            .clone();
+
+        let mut cx = InstanceTranslateContext(instance.clone());
+        let wasm_args = translate_incoming(&mut cx, &incoming, args)?
+            .into_iter()
+            .map(|rv| rv.into())
+            .collect::<Vec<_>>();
+        let wasm_results = f.call(&wasm_args)?;
+        translate_outgoing(&mut cx, &outgoing, &wasm_results)
+    }
+
+    /// Returns an appropriate binding for the `name` export in this module
+    /// which has also been instantiated as `instance` provided here.
+    ///
+    /// Returns an error if `name` is not present in the module.
+    pub fn binding_for_export(
+        &self,
+        instance: &mut InstanceHandle,
+        name: &str,
+    ) -> Result<ExportBinding<'_>> {
+        if let Some(binding) = self.interface_binding_for_export(name) {
+            return Ok(binding);
+        }
+        let signature = match instance.lookup(name) {
+            Some(Export::Function { signature, .. }) => signature,
+            Some(_) => bail!("`{}` is not a function", name),
+            None => bail!("failed to find export `{}`", name),
+        };
+        Ok(ExportBinding {
+            kind: ExportBindingKind::Raw(signature),
+        })
+    }
+
+    fn interface_binding_for_export(&self, name: &str) -> Option<ExportBinding<'_>> {
+        let inner = self.inner.as_ref()?;
+        let bindings = inner.module.customs.get_typed::<ast::WebidlBindings>()?;
+        let export = inner.module.exports.iter().find(|e| e.name == name)?;
+        let id = match export.item {
+            walrus::ExportItem::Function(f) => f,
+            _ => panic!(),
+        };
+        let (_, bind) = bindings.binds.iter().find(|(_, b)| b.func == id)?;
+        let binding = bindings.bindings.get(bind.binding)?;
+        let binding = match binding {
+            ast::FunctionBinding::Export(export) => export,
+            ast::FunctionBinding::Import(_) => return None,
+        };
+        Some(ExportBinding {
+            kind: ExportBindingKind::Rich {
+                binding,
+                section: bindings,
+            },
+        })
+    }
+}
+
+impl ExportBinding<'_> {
+    /// Returns the list of binding expressions used to create the parameters
+    /// for this binding.
+    pub fn param_bindings(&self) -> Result<Vec<ast::IncomingBindingExpression>> {
+        match &self.kind {
+            ExportBindingKind::Rich { binding, .. } => Ok(binding.params.bindings.clone()),
+            ExportBindingKind::Raw(sig) => sig
+                .params
+                .iter()
+                .skip(2) // skip the VMContext arguments
+                .enumerate()
+                .map(|(i, param)| default_incoming(i, param))
+                .collect(),
+        }
+    }
+
+    /// Returns the list of scalar types used for this binding
+    pub fn param_types(&self) -> Result<Vec<ast::WebidlScalarType>> {
+        match &self.kind {
+            ExportBindingKind::Rich {
+                binding, section, ..
+            } => {
+                let id = match binding.webidl_ty {
+                    ast::WebidlTypeRef::Id(id) => id,
+                    ast::WebidlTypeRef::Scalar(_) => {
+                        bail!("webidl types for functions cannot be scalar")
+                    }
+                };
+                let ty = section
+                    .types
+                    .get::<ast::WebidlCompoundType>(id)
+                    .ok_or_else(|| format_err!("invalid webidl custom section"))?;
+                let func = match ty {
+                    ast::WebidlCompoundType::Function(f) => f,
+                    _ => bail!("webidl type for function must be of function type"),
+                };
+                func.params
+                    .iter()
+                    .map(|param| match param {
+                        ast::WebidlTypeRef::Id(_) => bail!("function arguments cannot be compound"),
+                        ast::WebidlTypeRef::Scalar(s) => Ok(*s),
+                    })
+                    .collect()
+            }
+            ExportBindingKind::Raw(sig) => sig.params.iter().skip(2).map(abi2ast).collect(),
+        }
+    }
+
+    /// Returns the list of binding expressions used to extract the return
+    /// values of this binding.
+    pub fn result_bindings(&self) -> Result<Vec<ast::OutgoingBindingExpression>> {
+        match &self.kind {
+            ExportBindingKind::Rich { binding, .. } => Ok(binding.result.bindings.clone()),
+            ExportBindingKind::Raw(sig) => sig
+                .returns
+                .iter()
+                .enumerate()
+                .map(|(i, param)| default_outgoing(i, param))
+                .collect(),
+        }
+    }
+}
+
+fn default_incoming(idx: usize, param: &ir::AbiParam) -> Result<ast::IncomingBindingExpression> {
+    let get = ast::IncomingBindingExpressionGet { idx: idx as u32 };
+    let ty = if param.value_type == ir::types::I32 {
+        walrus::ValType::I32
+    } else if param.value_type == ir::types::I64 {
+        walrus::ValType::I64
+    } else if param.value_type == ir::types::F32 {
+        walrus::ValType::F32
+    } else if param.value_type == ir::types::F64 {
+        walrus::ValType::F64
+    } else {
+        bail!("unsupported type {:?}", param.value_type)
+    };
+    Ok(ast::IncomingBindingExpressionAs {
+        ty,
+        expr: Box::new(get.into()),
+    }
+    .into())
+}
+
+fn default_outgoing(idx: usize, param: &ir::AbiParam) -> Result<ast::OutgoingBindingExpression> {
+    let ty = abi2ast(param)?;
+    Ok(ast::OutgoingBindingExpressionAs {
+        ty: ty.into(),
+        idx: idx as u32,
+    }
+    .into())
+}
+
+fn abi2ast(param: &ir::AbiParam) -> Result<ast::WebidlScalarType> {
+    Ok(if param.value_type == ir::types::I32 {
+        ast::WebidlScalarType::Long
+    } else if param.value_type == ir::types::I64 {
+        ast::WebidlScalarType::LongLong
+    } else if param.value_type == ir::types::F32 {
+        ast::WebidlScalarType::UnrestrictedFloat
+    } else if param.value_type == ir::types::F64 {
+        ast::WebidlScalarType::UnrestrictedDouble
+    } else {
+        bail!("unsupported type {:?}", param.value_type)
+    })
+}
+
+trait TranslateContext {
+    fn invoke_alloc(&mut self, alloc_func_name: &str, len: i32) -> Result<i32>;
+    unsafe fn get_memory(&mut self) -> Result<&mut [u8]>;
+}
+
+struct InstanceTranslateContext(pub wasmtime::Instance);
+
+impl TranslateContext for InstanceTranslateContext {
+    fn invoke_alloc(&mut self, alloc_func_name: &str, len: i32) -> Result<i32> {
+        let alloc = self
+            .0
+            .get_export(alloc_func_name)
+            .ok_or_else(|| format_err!("failed to find alloc function `{}`", alloc_func_name))?
+            .func()
+            .ok_or_else(|| format_err!("`{}` is not a (alloc) function", alloc_func_name))?
+            .clone();
+        let alloc_args = vec![wasmtime::Val::I32(len)];
+        let results = alloc.call(&alloc_args)?;
+        if results.len() != 1 {
+            bail!("allocator function wrong number of results");
+        }
+        Ok(match results[0] {
+            wasmtime::Val::I32(i) => i,
+            _ => bail!("allocator function bad return type"),
+        })
+    }
+    unsafe fn get_memory(&mut self) -> Result<&mut [u8]> {
+        let memory = self
+            .0
+            .get_export("memory")
+            .ok_or_else(|| format_err!("failed to find `memory` export"))?
+            .memory()
+            .ok_or_else(|| format_err!("`memory` is not a memory"))?
+            .clone();
+        let ptr = memory.data_ptr();
+        let len = memory.data_size();
+        Ok(std::slice::from_raw_parts_mut(ptr, len))
+    }
+}
+
+fn translate_incoming(
+    cx: &mut dyn TranslateContext,
+    bindings: &[ast::IncomingBindingExpression],
+    args: &[Value],
+) -> Result<Vec<Val>> {
+    let get = |expr: &ast::IncomingBindingExpression| match expr {
+        ast::IncomingBindingExpression::Get(g) => args
+            .get(g.idx as usize)
+            .ok_or_else(|| format_err!("argument index out of bounds: {}", g.idx)),
+        _ => bail!("unsupported incoming binding expr {:?}", expr),
+    };
+
+    let mut copy = |alloc_func_name: &str, bytes: &[u8]| -> Result<(i32, i32)> {
+        let len = i32::try_from(bytes.len()).map_err(|_| format_err!("length overflow"))?;
+        let ptr = cx.invoke_alloc(alloc_func_name, len)?;
+        unsafe {
+            let raw = cx.get_memory()?;
+            raw[ptr as usize..][..bytes.len()].copy_from_slice(bytes)
+        }
+
+        Ok((ptr, len))
+    };
+
+    let mut wasm = Vec::new();
+
+    for expr in bindings {
+        match expr {
+            ast::IncomingBindingExpression::AllocUtf8Str(g) => {
+                let val = match get(&g.expr)? {
+                    Value::String(s) => s,
+                    _ => bail!("expected a string"),
+                };
+                let (ptr, len) = copy(&g.alloc_func_name, val.as_bytes())?;
+                wasm.push(Val::I32(ptr));
+                wasm.push(Val::I32(len));
+            }
+            ast::IncomingBindingExpression::As(g) => {
+                let val = get(&g.expr)?;
+                match g.ty {
+                    walrus::ValType::I32 => match val {
+                        Value::I32(i) => wasm.push(Val::I32(*i)),
+                        Value::U32(i) => wasm.push(Val::I32(*i as i32)),
+                        _ => bail!("cannot convert {:?} to `i32`", val),
+                    },
+                    walrus::ValType::I64 => match val {
+                        Value::I32(i) => wasm.push(Val::I64((*i).into())),
+                        Value::U32(i) => wasm.push(Val::I64((*i).into())),
+                        Value::I64(i) => wasm.push(Val::I64(*i)),
+                        Value::U64(i) => wasm.push(Val::I64(*i as i64)),
+                        _ => bail!("cannot convert {:?} to `i64`", val),
+                    },
+                    walrus::ValType::F32 => match val {
+                        Value::F32(i) => wasm.push(Val::F32(i.to_bits())),
+                        _ => bail!("cannot convert {:?} to `f32`", val),
+                    },
+                    walrus::ValType::F64 => match val {
+                        Value::F32(i) => wasm.push(Val::F64((*i as f64).to_bits())),
+                        Value::F64(i) => wasm.push(Val::F64(i.to_bits())),
+                        _ => bail!("cannot convert {:?} to `f64`", val),
+                    },
+                    walrus::ValType::V128 | walrus::ValType::Anyref => {
+                        bail!("unsupported `as` type {:?}", g.ty);
+                    }
+                }
+            }
+            _ => bail!("unsupported incoming binding expr {:?}", expr),
+        }
+    }
+
+    Ok(wasm)
+}
+
+fn translate_outgoing(
+    cx: &mut dyn TranslateContext,
+    bindings: &[ast::OutgoingBindingExpression],
+    args: &[Val],
+) -> Result<Vec<Value>> {
+    let mut values = Vec::new();
+
+    let get = |idx: u32| {
+        args.get(idx as usize)
+            .cloned()
+            .ok_or_else(|| format_err!("argument index out of bounds: {}", idx))
+    };
+
+    for expr in bindings {
+        match expr {
+            ast::OutgoingBindingExpression::As(a) => {
+                let arg = get(a.idx)?;
+                match a.ty {
+                    ast::WebidlTypeRef::Scalar(ast::WebidlScalarType::UnsignedLong) => match arg {
+                        Val::I32(a) => values.push(Value::U32(a as u32)),
+                        _ => bail!("can't convert {:?} to unsigned long", arg),
+                    },
+                    ast::WebidlTypeRef::Scalar(ast::WebidlScalarType::Long) => match arg {
+                        Val::I32(a) => values.push(Value::I32(a)),
+                        _ => bail!("can't convert {:?} to long", arg),
+                    },
+                    ast::WebidlTypeRef::Scalar(ast::WebidlScalarType::LongLong) => match arg {
+                        Val::I32(a) => values.push(Value::I64(a as i64)),
+                        Val::I64(a) => values.push(Value::I64(a)),
+                        _ => bail!("can't convert {:?} to long long", arg),
+                    },
+                    ast::WebidlTypeRef::Scalar(ast::WebidlScalarType::UnsignedLongLong) => {
+                        match arg {
+                            Val::I32(a) => values.push(Value::U64(a as u64)),
+                            Val::I64(a) => values.push(Value::U64(a as u64)),
+                            _ => bail!("can't convert {:?} to unsigned long long", arg),
+                        }
+                    }
+                    ast::WebidlTypeRef::Scalar(ast::WebidlScalarType::Float) => match arg {
+                        Val::F32(a) => values.push(Value::F32(f32::from_bits(a))),
+                        _ => bail!("can't convert {:?} to float", arg),
+                    },
+                    ast::WebidlTypeRef::Scalar(ast::WebidlScalarType::Double) => match arg {
+                        Val::F32(a) => values.push(Value::F64(f32::from_bits(a) as f64)),
+                        Val::F64(a) => values.push(Value::F64(f64::from_bits(a))),
+                        _ => bail!("can't convert {:?} to double", arg),
+                    },
+                    _ => bail!("unsupported outgoing binding expr {:?}", expr),
+                }
+            }
+            ast::OutgoingBindingExpression::Utf8Str(e) => {
+                if e.ty != ast::WebidlScalarType::DomString.into() {
+                    bail!("utf-8 strings must go into dom-string")
+                }
+                let offset = match get(e.offset)? {
+                    Val::I32(a) => a,
+                    _ => bail!("offset must be an i32"),
+                };
+                let length = match get(e.length)? {
+                    Val::I32(a) => a,
+                    _ => bail!("length must be an i32"),
+                };
+                let bytes = unsafe { &cx.get_memory()?[offset as usize..][..length as usize] };
+                values.push(Value::String(str::from_utf8(bytes).unwrap().to_string()));
+            }
+            _ => {
+                drop(cx);
+                bail!("unsupported outgoing binding expr {:?}", expr);
+            }
+        }
+    }
+
+    Ok(values)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_interface_types/value.rs.html b/api/src/wasmtime_interface_types/value.rs.html new file mode 100644 index 000000000000..e55bdde43b63 --- /dev/null +++ b/api/src/wasmtime_interface_types/value.rs.html @@ -0,0 +1,135 @@ +value.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+
+use std::convert::TryFrom;
+use std::fmt;
+
+/// The set of all possible WebAssembly Interface Types
+#[derive(Debug, Clone)]
+#[allow(missing_docs)]
+pub enum Value {
+    String(String),
+    I32(i32),
+    U32(u32),
+    I64(i64),
+    U64(u64),
+    F32(f32),
+    F64(f64),
+}
+
+macro_rules! from {
+    ($($a:ident => $b:ident,)*) => ($(
+        impl From<$a> for Value {
+            fn from(val: $a) -> Value {
+                Value::$b(val)
+            }
+        }
+
+        impl TryFrom<Value> for $a {
+            type Error = anyhow::Error;
+
+            fn try_from(val: Value) -> Result<$a, Self::Error> {
+                match val {
+                    Value::$b(v) => Ok(v),
+                    v => anyhow::bail!("cannot convert {:?} to {}", v, stringify!($a)),
+                }
+            }
+        }
+    )*)
+}
+
+from! {
+    String => String,
+    i32 => I32,
+    u32 => U32,
+    i64 => I64,
+    u64 => U64,
+    f32 => F32,
+    f64 => F64,
+}
+
+impl<'a> From<&'a str> for Value {
+    fn from(x: &'a str) -> Value {
+        x.to_string().into()
+    }
+}
+
+impl fmt::Display for Value {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        match self {
+            Value::String(s) => s.fmt(f),
+            Value::I32(s) => s.fmt(f),
+            Value::U32(s) => s.fmt(f),
+            Value::I64(s) => s.fmt(f),
+            Value::U64(s) => s.fmt(f),
+            Value::F32(s) => s.fmt(f),
+            Value::F64(s) => s.fmt(f),
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_jit/code_memory.rs.html b/api/src/wasmtime_jit/code_memory.rs.html new file mode 100644 index 000000000000..cda995ef6e5a --- /dev/null +++ b/api/src/wasmtime_jit/code_memory.rs.html @@ -0,0 +1,469 @@ +code_memory.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+
+//! Memory management for executable code.
+
+use crate::function_table::FunctionTable;
+use region;
+use std::mem::ManuallyDrop;
+use std::{cmp, mem};
+use wasmtime_environ::{Compilation, CompiledFunction};
+use wasmtime_runtime::{Mmap, VMFunctionBody};
+
+struct CodeMemoryEntry {
+    mmap: ManuallyDrop<Mmap>,
+    table: ManuallyDrop<FunctionTable>,
+}
+
+impl CodeMemoryEntry {
+    fn new() -> Self {
+        Self {
+            mmap: ManuallyDrop::new(Mmap::new()),
+            table: ManuallyDrop::new(FunctionTable::new()),
+        }
+    }
+    fn with_capacity(cap: usize) -> Result<Self, String> {
+        Ok(Self {
+            mmap: ManuallyDrop::new(Mmap::with_at_least(cap)?),
+            table: ManuallyDrop::new(FunctionTable::new()),
+        })
+    }
+}
+
+impl Drop for CodeMemoryEntry {
+    fn drop(&mut self) {
+        unsafe {
+            // Table needs to be freed before mmap.
+            ManuallyDrop::drop(&mut self.table);
+            ManuallyDrop::drop(&mut self.mmap);
+        }
+    }
+}
+
+/// Memory manager for executable code.
+pub struct CodeMemory {
+    current: CodeMemoryEntry,
+    entries: Vec<CodeMemoryEntry>,
+    position: usize,
+    published: usize,
+}
+
+fn _assert() {
+    fn _assert_send_sync<T: Send + Sync>() {}
+    _assert_send_sync::<CodeMemory>();
+}
+
+impl CodeMemory {
+    /// Create a new `CodeMemory` instance.
+    pub fn new() -> Self {
+        Self {
+            current: CodeMemoryEntry::new(),
+            entries: Vec::new(),
+            position: 0,
+            published: 0,
+        }
+    }
+
+    /// Allocate a continuous memory block for a single compiled function.
+    /// TODO: Reorganize the code that calls this to emit code directly into the
+    /// mmap region rather than into a Vec that we need to copy in.
+    pub fn allocate_for_function(
+        &mut self,
+        func: &CompiledFunction,
+    ) -> Result<&mut [VMFunctionBody], String> {
+        let size = Self::function_allocation_size(func);
+
+        let start = self.position as u32;
+        let (buf, table) = self.allocate(size)?;
+
+        let (_, _, _, vmfunc) = Self::copy_function(func, start, buf, table);
+
+        Ok(vmfunc)
+    }
+
+    /// Allocate a continuous memory block for a compilation.
+    ///
+    /// Allocates memory for both the function bodies as well as function unwind data.
+    pub fn allocate_for_compilation(
+        &mut self,
+        compilation: &Compilation,
+    ) -> Result<Box<[&mut [VMFunctionBody]]>, String> {
+        let total_len = compilation
+            .into_iter()
+            .fold(0, |acc, func| acc + Self::function_allocation_size(func));
+
+        let mut start = self.position as u32;
+        let (mut buf, mut table) = self.allocate(total_len)?;
+        let mut result = Vec::with_capacity(compilation.len());
+
+        for func in compilation.into_iter() {
+            let (next_start, next_buf, next_table, vmfunc) =
+                Self::copy_function(func, start, buf, table);
+
+            result.push(vmfunc);
+
+            start = next_start;
+            buf = next_buf;
+            table = next_table;
+        }
+
+        Ok(result.into_boxed_slice())
+    }
+
+    /// Make all allocated memory executable.
+    pub fn publish(&mut self) {
+        self.push_current(0)
+            .expect("failed to push current memory map");
+
+        for CodeMemoryEntry { mmap: m, table: t } in &mut self.entries[self.published..] {
+            // Remove write access to the pages due to the relocation fixups.
+            t.publish(m.as_ptr() as u64)
+                .expect("failed to publish function table");
+
+            if !m.is_empty() {
+                unsafe {
+                    region::protect(m.as_mut_ptr(), m.len(), region::Protection::ReadExecute)
+                }
+                .expect("unable to make memory readonly and executable");
+            }
+        }
+
+        self.published = self.entries.len();
+    }
+
+    /// Allocate `size` bytes of memory which can be made executable later by
+    /// calling `publish()`. Note that we allocate the memory as writeable so
+    /// that it can be written to and patched, though we make it readonly before
+    /// actually executing from it.
+    ///
+    /// TODO: Add an alignment flag.
+    fn allocate(&mut self, size: usize) -> Result<(&mut [u8], &mut FunctionTable), String> {
+        if self.current.mmap.len() - self.position < size {
+            self.push_current(cmp::max(0x10000, size))?;
+        }
+
+        let old_position = self.position;
+        self.position += size;
+
+        Ok((
+            &mut self.current.mmap.as_mut_slice()[old_position..self.position],
+            &mut self.current.table,
+        ))
+    }
+
+    /// Calculates the allocation size of the given compiled function.
+    fn function_allocation_size(func: &CompiledFunction) -> usize {
+        if func.unwind_info.is_empty() {
+            func.body.len()
+        } else {
+            // Account for necessary unwind information alignment padding (32-bit)
+            ((func.body.len() + 3) & !3) + func.unwind_info.len()
+        }
+    }
+
+    /// Copies the data of the compiled function to the given buffer.
+    ///
+    /// This will also add the function to the current function table.
+    fn copy_function<'a>(
+        func: &CompiledFunction,
+        func_start: u32,
+        buf: &'a mut [u8],
+        table: &'a mut FunctionTable,
+    ) -> (
+        u32,
+        &'a mut [u8],
+        &'a mut FunctionTable,
+        &'a mut [VMFunctionBody],
+    ) {
+        let func_end = func_start + (func.body.len() as u32);
+
+        let (body, remainder) = buf.split_at_mut(func.body.len());
+        body.copy_from_slice(&func.body);
+        let vmfunc = Self::view_as_mut_vmfunc_slice(body);
+
+        if func.unwind_info.is_empty() {
+            return (func_end, remainder, table, vmfunc);
+        }
+
+        // Keep unwind information 32-bit aligned (round up to the nearest 4 byte boundary)
+        let padding = ((func.body.len() + 3) & !3) - func.body.len();
+        let (unwind, remainder) = remainder.split_at_mut(padding + func.unwind_info.len());
+        let mut relocs = Vec::new();
+        func.unwind_info
+            .serialize(&mut unwind[padding..], &mut relocs);
+
+        let unwind_start = func_end + (padding as u32);
+        let unwind_end = unwind_start + (func.unwind_info.len() as u32);
+
+        relocs.iter_mut().for_each(move |r| {
+            r.offset += unwind_start;
+            r.addend += func_start;
+        });
+
+        table.add_function(func_start, func_end, unwind_start, &relocs);
+
+        (unwind_end, remainder, table, vmfunc)
+    }
+
+    /// Convert mut a slice from u8 to VMFunctionBody.
+    fn view_as_mut_vmfunc_slice(slice: &mut [u8]) -> &mut [VMFunctionBody] {
+        let byte_ptr: *mut [u8] = slice;
+        let body_ptr = byte_ptr as *mut [VMFunctionBody];
+        unsafe { &mut *body_ptr }
+    }
+
+    /// Pushes the current Mmap (and function table) and allocates a new Mmap of the given size.
+    fn push_current(&mut self, new_size: usize) -> Result<(), String> {
+        let previous = mem::replace(
+            &mut self.current,
+            if new_size == 0 {
+                CodeMemoryEntry::new()
+            } else {
+                CodeMemoryEntry::with_capacity(cmp::max(0x10000, new_size))?
+            },
+        );
+
+        if !previous.mmap.is_empty() {
+            self.entries.push(previous);
+        } else {
+            assert_eq!(previous.table.len(), 0);
+        }
+
+        self.position = 0;
+
+        Ok(())
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_jit/compiler.rs.html b/api/src/wasmtime_jit/compiler.rs.html new file mode 100644 index 000000000000..3501e2f653b1 --- /dev/null +++ b/api/src/wasmtime_jit/compiler.rs.html @@ -0,0 +1,885 @@ +compiler.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+
+//! JIT compilation.
+
+use crate::code_memory::CodeMemory;
+use crate::instantiate::SetupError;
+use crate::target_tunables::target_tunables;
+use cranelift_codegen::ir::InstBuilder;
+use cranelift_codegen::print_errors::pretty_error;
+use cranelift_codegen::Context;
+use cranelift_codegen::{binemit, ir};
+use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
+use cranelift_wasm::ModuleTranslationState;
+use std::collections::HashMap;
+use std::convert::TryFrom;
+use wasmtime_debug::{emit_debugsections_image, DebugInfoData};
+use wasmtime_environ::entity::{EntityRef, PrimaryMap};
+use wasmtime_environ::isa::{TargetFrontendConfig, TargetIsa};
+use wasmtime_environ::wasm::{DefinedFuncIndex, DefinedMemoryIndex, MemoryIndex};
+use wasmtime_environ::{
+    CacheConfig, Compilation, CompileError, CompiledFunction, CompiledFunctionUnwindInfo,
+    Compiler as _C, FunctionBodyData, Module, ModuleMemoryOffset, ModuleVmctxInfo, Relocations,
+    Traps, Tunables, VMOffsets,
+};
+use wasmtime_runtime::{
+    InstantiationError, SignatureRegistry, TrapRegistration, TrapRegistry, VMFunctionBody,
+    VMSharedSignatureIndex,
+};
+
+/// Select which kind of compilation to use.
+#[derive(Copy, Clone, Debug)]
+pub enum CompilationStrategy {
+    /// Let Wasmtime pick the strategy.
+    Auto,
+
+    /// Compile all functions with Cranelift.
+    Cranelift,
+
+    /// Compile all functions with Lightbeam.
+    #[cfg(feature = "lightbeam")]
+    Lightbeam,
+}
+
+/// A WebAssembly code JIT compiler.
+///
+/// A `Compiler` instance owns the executable memory that it allocates.
+///
+/// TODO: Evolve this to support streaming rather than requiring a `&[u8]`
+/// containing a whole wasm module at once.
+///
+/// TODO: Consider using cranelift-module.
+pub struct Compiler {
+    isa: Box<dyn TargetIsa>,
+
+    code_memory: CodeMemory,
+    trap_registry: TrapRegistry,
+    trampoline_park: HashMap<VMSharedSignatureIndex, *const VMFunctionBody>,
+    signatures: SignatureRegistry,
+    strategy: CompilationStrategy,
+    cache_config: CacheConfig,
+
+    /// The `FunctionBuilderContext`, shared between trampline function compilations.
+    fn_builder_ctx: FunctionBuilderContext,
+}
+
+impl Compiler {
+    /// Construct a new `Compiler`.
+    pub fn new(
+        isa: Box<dyn TargetIsa>,
+        strategy: CompilationStrategy,
+        cache_config: CacheConfig,
+    ) -> Self {
+        Self {
+            isa,
+            code_memory: CodeMemory::new(),
+            trampoline_park: HashMap::new(),
+            signatures: SignatureRegistry::new(),
+            fn_builder_ctx: FunctionBuilderContext::new(),
+            strategy,
+            trap_registry: TrapRegistry::default(),
+            cache_config,
+        }
+    }
+}
+
+impl Compiler {
+    /// Return the target's frontend configuration settings.
+    pub fn frontend_config(&self) -> TargetFrontendConfig {
+        self.isa.frontend_config()
+    }
+
+    /// Return the tunables in use by this engine.
+    pub fn tunables(&self) -> Tunables {
+        target_tunables(self.isa.triple())
+    }
+
+    /// Compile the given function bodies.
+    pub(crate) fn compile<'data>(
+        &mut self,
+        module: &Module,
+        module_translation: &ModuleTranslationState,
+        function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
+        debug_data: Option<DebugInfoData>,
+    ) -> Result<
+        (
+            PrimaryMap<DefinedFuncIndex, *mut [VMFunctionBody]>,
+            PrimaryMap<DefinedFuncIndex, ir::JumpTableOffsets>,
+            Relocations,
+            Option<Vec<u8>>,
+            TrapRegistration,
+        ),
+        SetupError,
+    > {
+        let (compilation, relocations, address_transform, value_ranges, stack_slots, traps) =
+            match self.strategy {
+                // For now, interpret `Auto` as `Cranelift` since that's the most stable
+                // implementation.
+                CompilationStrategy::Auto | CompilationStrategy::Cranelift => {
+                    wasmtime_environ::cranelift::Cranelift::compile_module(
+                        module,
+                        module_translation,
+                        function_body_inputs,
+                        &*self.isa,
+                        debug_data.is_some(),
+                        &self.cache_config,
+                    )
+                }
+                #[cfg(feature = "lightbeam")]
+                CompilationStrategy::Lightbeam => {
+                    wasmtime_environ::lightbeam::Lightbeam::compile_module(
+                        module,
+                        module_translation,
+                        function_body_inputs,
+                        &*self.isa,
+                        debug_data.is_some(),
+                        &self.cache_config,
+                    )
+                }
+            }
+            .map_err(SetupError::Compile)?;
+
+        let allocated_functions =
+            allocate_functions(&mut self.code_memory, &compilation).map_err(|message| {
+                SetupError::Instantiate(InstantiationError::Resource(format!(
+                    "failed to allocate memory for functions: {}",
+                    message
+                )))
+            })?;
+
+        let trap_registration = register_traps(&allocated_functions, &traps, &self.trap_registry);
+
+        // Translate debug info (DWARF) only if at least one function is present.
+        let dbg = if debug_data.is_some() && !allocated_functions.is_empty() {
+            let target_config = self.isa.frontend_config();
+            let ofs = VMOffsets::new(target_config.pointer_bytes(), &module);
+
+            let mut funcs = Vec::new();
+            for (i, allocated) in allocated_functions.into_iter() {
+                let ptr = (*allocated) as *const u8;
+                let body_len = compilation.get(i).body.len();
+                funcs.push((ptr, body_len));
+            }
+            let module_vmctx_info = {
+                ModuleVmctxInfo {
+                    memory_offset: if ofs.num_imported_memories > 0 {
+                        ModuleMemoryOffset::Imported(ofs.vmctx_vmmemory_import(MemoryIndex::new(0)))
+                    } else if ofs.num_defined_memories > 0 {
+                        ModuleMemoryOffset::Defined(
+                            ofs.vmctx_vmmemory_definition_base(DefinedMemoryIndex::new(0)),
+                        )
+                    } else {
+                        ModuleMemoryOffset::None
+                    },
+                    stack_slots,
+                }
+            };
+            let bytes = emit_debugsections_image(
+                self.isa.triple().clone(),
+                target_config,
+                debug_data.as_ref().unwrap(),
+                &module_vmctx_info,
+                &address_transform,
+                &value_ranges,
+                &funcs,
+            )
+            .map_err(SetupError::DebugInfo)?;
+            Some(bytes)
+        } else {
+            None
+        };
+
+        let jt_offsets = compilation.get_jt_offsets();
+
+        Ok((
+            allocated_functions,
+            jt_offsets,
+            relocations,
+            dbg,
+            trap_registration,
+        ))
+    }
+
+    /// Create a trampoline for invoking a function.
+    pub(crate) fn get_trampoline(
+        &mut self,
+        signature: &ir::Signature,
+        value_size: usize,
+    ) -> Result<*const VMFunctionBody, SetupError> {
+        let index = self.signatures.register(signature);
+        if let Some(trampoline) = self.trampoline_park.get(&index) {
+            return Ok(*trampoline);
+        }
+        let body = make_trampoline(
+            &*self.isa,
+            &mut self.code_memory,
+            &mut self.fn_builder_ctx,
+            signature,
+            value_size,
+        )?;
+        self.trampoline_park.insert(index, body);
+        return Ok(body);
+    }
+
+    /// Create and publish a trampoline for invoking a function.
+    pub fn get_published_trampoline(
+        &mut self,
+        signature: &ir::Signature,
+        value_size: usize,
+    ) -> Result<*const VMFunctionBody, SetupError> {
+        let result = self.get_trampoline(signature, value_size)?;
+        self.publish_compiled_code();
+        Ok(result)
+    }
+
+    /// Make memory containing compiled code executable.
+    pub(crate) fn publish_compiled_code(&mut self) {
+        self.code_memory.publish();
+    }
+
+    /// Shared signature registry.
+    pub fn signatures(&self) -> &SignatureRegistry {
+        &self.signatures
+    }
+
+    /// Shared registration of trap information
+    pub fn trap_registry(&self) -> &TrapRegistry {
+        &self.trap_registry
+    }
+}
+
+/// Create a trampoline for invoking a function.
+fn make_trampoline(
+    isa: &dyn TargetIsa,
+    code_memory: &mut CodeMemory,
+    fn_builder_ctx: &mut FunctionBuilderContext,
+    signature: &ir::Signature,
+    value_size: usize,
+) -> Result<*const VMFunctionBody, SetupError> {
+    let pointer_type = isa.pointer_type();
+    let mut wrapper_sig = ir::Signature::new(isa.frontend_config().default_call_conv);
+
+    // Add the callee `vmctx` parameter.
+    wrapper_sig.params.push(ir::AbiParam::special(
+        pointer_type,
+        ir::ArgumentPurpose::VMContext,
+    ));
+
+    // Add the caller `vmctx` parameter.
+    wrapper_sig.params.push(ir::AbiParam::new(pointer_type));
+
+    // Add the `callee_address` parameter.
+    wrapper_sig.params.push(ir::AbiParam::new(pointer_type));
+
+    // Add the `values_vec` parameter.
+    wrapper_sig.params.push(ir::AbiParam::new(pointer_type));
+
+    let mut context = Context::new();
+    context.func = ir::Function::with_name_signature(ir::ExternalName::user(0, 0), wrapper_sig);
+    context.func.collect_frame_layout_info();
+
+    {
+        let mut builder = FunctionBuilder::new(&mut context.func, fn_builder_ctx);
+        let block0 = builder.create_block();
+
+        builder.append_block_params_for_function_params(block0);
+        builder.switch_to_block(block0);
+        builder.seal_block(block0);
+
+        let (vmctx_ptr_val, caller_vmctx_ptr_val, callee_value, values_vec_ptr_val) = {
+            let params = builder.func.dfg.block_params(block0);
+            (params[0], params[1], params[2], params[3])
+        };
+
+        // Load the argument values out of `values_vec`.
+        let mflags = ir::MemFlags::trusted();
+        let callee_args = signature
+            .params
+            .iter()
+            .enumerate()
+            .map(|(i, r)| {
+                match i {
+                    0 => vmctx_ptr_val,
+                    1 => caller_vmctx_ptr_val,
+                    _ =>
+                    // i - 2 because vmctx and caller vmctx aren't passed through `values_vec`.
+                    {
+                        builder.ins().load(
+                            r.value_type,
+                            mflags,
+                            values_vec_ptr_val,
+                            ((i - 2) * value_size) as i32,
+                        )
+                    }
+                }
+            })
+            .collect::<Vec<_>>();
+
+        let new_sig = builder.import_signature(signature.clone());
+
+        let call = builder
+            .ins()
+            .call_indirect(new_sig, callee_value, &callee_args);
+
+        let results = builder.func.dfg.inst_results(call).to_vec();
+
+        // Store the return values into `values_vec`.
+        let mflags = ir::MemFlags::trusted();
+        for (i, r) in results.iter().enumerate() {
+            builder
+                .ins()
+                .store(mflags, *r, values_vec_ptr_val, (i * value_size) as i32);
+        }
+
+        builder.ins().return_(&[]);
+        builder.finalize()
+    }
+
+    let mut code_buf = Vec::new();
+    let mut reloc_sink = RelocSink {};
+    let mut trap_sink = binemit::NullTrapSink {};
+    let mut stackmap_sink = binemit::NullStackmapSink {};
+    context
+        .compile_and_emit(
+            isa,
+            &mut code_buf,
+            &mut reloc_sink,
+            &mut trap_sink,
+            &mut stackmap_sink,
+        )
+        .map_err(|error| {
+            SetupError::Compile(CompileError::Codegen(pretty_error(
+                &context.func,
+                Some(isa),
+                error,
+            )))
+        })?;
+
+    let unwind_info = CompiledFunctionUnwindInfo::new(isa, &context);
+
+    Ok(code_memory
+        .allocate_for_function(&CompiledFunction {
+            body: code_buf,
+            jt_offsets: context.func.jt_offsets,
+            unwind_info,
+        })
+        .map_err(|message| SetupError::Instantiate(InstantiationError::Resource(message)))?
+        .as_ptr())
+}
+
+fn allocate_functions(
+    code_memory: &mut CodeMemory,
+    compilation: &Compilation,
+) -> Result<PrimaryMap<DefinedFuncIndex, *mut [VMFunctionBody]>, String> {
+    let fat_ptrs = code_memory.allocate_for_compilation(compilation)?;
+
+    // Second, create a PrimaryMap from result vector of pointers.
+    let mut result = PrimaryMap::with_capacity(compilation.len());
+    for i in 0..fat_ptrs.len() {
+        let fat_ptr: *mut [VMFunctionBody] = fat_ptrs[i];
+        result.push(fat_ptr);
+    }
+    Ok(result)
+}
+
+fn register_traps(
+    allocated_functions: &PrimaryMap<DefinedFuncIndex, *mut [VMFunctionBody]>,
+    traps: &Traps,
+    registry: &TrapRegistry,
+) -> TrapRegistration {
+    let traps =
+        allocated_functions
+            .values()
+            .zip(traps.values())
+            .flat_map(|(func_addr, func_traps)| {
+                func_traps.iter().map(move |trap_desc| {
+                    let func_addr = *func_addr as *const u8 as usize;
+                    let offset = usize::try_from(trap_desc.code_offset).unwrap();
+                    let trap_addr = func_addr + offset;
+                    (trap_addr, trap_desc.source_loc, trap_desc.trap_code)
+                })
+            });
+    registry.register_traps(traps)
+}
+
+/// We don't expect trampoline compilation to produce any relocations, so
+/// this `RelocSink` just asserts that it doesn't recieve any.
+struct RelocSink {}
+
+impl binemit::RelocSink for RelocSink {
+    fn reloc_block(
+        &mut self,
+        _offset: binemit::CodeOffset,
+        _reloc: binemit::Reloc,
+        _block_offset: binemit::CodeOffset,
+    ) {
+        panic!("trampoline compilation should not produce block relocs");
+    }
+    fn reloc_external(
+        &mut self,
+        _offset: binemit::CodeOffset,
+        _reloc: binemit::Reloc,
+        _name: &ir::ExternalName,
+        _addend: binemit::Addend,
+    ) {
+        panic!("trampoline compilation should not produce external symbol relocs");
+    }
+    fn reloc_constant(
+        &mut self,
+        _code_offset: binemit::CodeOffset,
+        _reloc: binemit::Reloc,
+        _constant_offset: ir::ConstantOffset,
+    ) {
+        panic!("trampoline compilation should not produce constant relocs");
+    }
+    fn reloc_jt(
+        &mut self,
+        _offset: binemit::CodeOffset,
+        _reloc: binemit::Reloc,
+        _jt: ir::JumpTable,
+    ) {
+        panic!("trampoline compilation should not produce jump table relocs");
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_jit/function_table.rs.html b/api/src/wasmtime_jit/function_table.rs.html new file mode 100644 index 000000000000..30e7e992ad05 --- /dev/null +++ b/api/src/wasmtime_jit/function_table.rs.html @@ -0,0 +1,451 @@ +function_table.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+
+//! Runtime function table.
+//!
+//! This module is primarily used to track JIT functions on Windows for stack walking and unwind.
+
+type FunctionTableReloc = wasmtime_environ::CompiledFunctionUnwindInfoReloc;
+
+/// Represents a runtime function table.
+///
+/// This is used to register JIT code with the operating system to enable stack walking and unwinding.
+#[cfg(all(target_os = "windows", target_arch = "x86_64"))]
+pub(crate) struct FunctionTable {
+    functions: Vec<winapi::um::winnt::RUNTIME_FUNCTION>,
+    published: bool,
+}
+
+#[cfg(all(target_os = "windows", target_arch = "x86_64"))]
+impl FunctionTable {
+    /// Creates a new function table.
+    pub fn new() -> Self {
+        Self {
+            functions: Vec::new(),
+            published: false,
+        }
+    }
+
+    /// Returns the number of functions in the table, also referred to as its 'length'.
+    pub fn len(&self) -> usize {
+        self.functions.len()
+    }
+
+    /// Adds a function to the table based off of the start offset, end offset, and unwind offset.
+    ///
+    /// The offsets are from the "module base", which is provided when the table is published.
+    pub fn add_function(
+        &mut self,
+        start: u32,
+        end: u32,
+        unwind: u32,
+        _relocs: &[FunctionTableReloc],
+    ) {
+        assert_eq!(_relocs.len(), 0);
+        use winapi::um::winnt;
+
+        assert!(!self.published, "table has already been published");
+
+        let mut entry = winnt::RUNTIME_FUNCTION::default();
+
+        entry.BeginAddress = start;
+        entry.EndAddress = end;
+
+        unsafe {
+            *entry.u.UnwindInfoAddress_mut() = unwind;
+        }
+
+        self.functions.push(entry);
+    }
+
+    /// Publishes the function table using the given base address.
+    ///
+    /// A published function table will automatically be deleted when it is dropped.
+    pub fn publish(&mut self, base_address: u64) -> Result<(), String> {
+        use winapi::um::winnt;
+
+        if self.published {
+            return Err("function table was already published".into());
+        }
+
+        self.published = true;
+
+        if self.functions.is_empty() {
+            return Ok(());
+        }
+
+        unsafe {
+            // Windows heap allocations are 32-bit aligned, but assert just in case
+            assert_eq!(
+                (self.functions.as_mut_ptr() as u64) % 4,
+                0,
+                "function table allocation was not aligned"
+            );
+
+            if winnt::RtlAddFunctionTable(
+                self.functions.as_mut_ptr(),
+                self.functions.len() as u32,
+                base_address,
+            ) == 0
+            {
+                return Err("failed to add function table".into());
+            }
+        }
+
+        Ok(())
+    }
+}
+
+#[cfg(target_os = "windows")]
+impl Drop for FunctionTable {
+    fn drop(&mut self) {
+        use winapi::um::winnt;
+
+        if self.published {
+            unsafe {
+                winnt::RtlDeleteFunctionTable(self.functions.as_mut_ptr());
+            }
+        }
+    }
+}
+
+/// Represents a runtime function table.
+///
+/// This is used to register JIT code with the operating system to enable stack walking and unwinding.
+#[cfg(unix)]
+pub(crate) struct FunctionTable {
+    functions: Vec<u32>,
+    relocs: Vec<FunctionTableReloc>,
+    published: Option<Vec<usize>>,
+}
+
+#[cfg(unix)]
+impl FunctionTable {
+    /// Creates a new function table.
+    pub fn new() -> Self {
+        Self {
+            functions: Vec::new(),
+            relocs: Vec::new(),
+            published: None,
+        }
+    }
+
+    /// Returns the number of functions in the table, also referred to as its 'length'.
+    pub fn len(&self) -> usize {
+        self.functions.len()
+    }
+
+    /// Adds a function to the table based off of the start offset, end offset, and unwind offset.
+    ///
+    /// The offsets are from the "module base", which is provided when the table is published.
+    pub fn add_function(
+        &mut self,
+        _start: u32,
+        _end: u32,
+        unwind: u32,
+        relocs: &[FunctionTableReloc],
+    ) {
+        assert!(self.published.is_none(), "table has already been published");
+        self.functions.push(unwind);
+        self.relocs.extend_from_slice(relocs);
+    }
+
+    /// Publishes the function table using the given base address.
+    ///
+    /// A published function table will automatically be deleted when it is dropped.
+    pub fn publish(&mut self, base_address: u64) -> Result<(), String> {
+        if self.published.is_some() {
+            return Err("function table was already published".into());
+        }
+
+        if self.functions.is_empty() {
+            assert_eq!(self.relocs.len(), 0);
+            self.published = Some(vec![]);
+            return Ok(());
+        }
+
+        extern "C" {
+            // libunwind import
+            fn __register_frame(fde: *const u8);
+        }
+
+        for reloc in self.relocs.iter() {
+            let addr = base_address + (reloc.offset as u64);
+            let target = base_address + (reloc.addend as u64);
+            unsafe {
+                std::ptr::write(addr as *mut u64, target);
+            }
+        }
+
+        let mut fdes = Vec::with_capacity(self.functions.len());
+        for unwind_offset in self.functions.iter() {
+            let addr = base_address + (*unwind_offset as u64);
+            let off = unsafe { std::ptr::read::<u32>(addr as *const u32) } as usize + 4;
+
+            let fde = (addr + off as u64) as usize;
+            unsafe {
+                __register_frame(fde as *const _);
+            }
+            fdes.push(fde);
+        }
+
+        self.published = Some(fdes);
+        Ok(())
+    }
+}
+
+#[cfg(unix)]
+impl Drop for FunctionTable {
+    fn drop(&mut self) {
+        extern "C" {
+            // libunwind import
+            fn __deregister_frame(fde: *const u8);
+        }
+
+        if let Some(published) = &self.published {
+            unsafe {
+                // I'm not really sure why, but it appears to be way faster to
+                // unregister frames in reverse order rather than in-order. This
+                // way we're deregistering in LIFO order, and maybe there's some
+                // vec shifting or something like that in libgcc?
+                //
+                // Locally on Ubuntu 18.04 a wasm module with 40k empty
+                // functions takes 0.1s to compile and drop with reverse
+                // iteration. With forward iteration it takes 3s to compile and
+                // drop!
+                //
+                // Poking around libgcc sources seems to indicate that some sort
+                // of linked list is being traversed... We may need to figure
+                // out something else for backtraces in the future since this
+                // API may not be long-lived to keep calling.
+                for fde in published.iter().rev() {
+                    __deregister_frame(*fde as *const _);
+                }
+            }
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_jit/imports.rs.html b/api/src/wasmtime_jit/imports.rs.html new file mode 100644 index 000000000000..ff2c9a9e98fd --- /dev/null +++ b/api/src/wasmtime_jit/imports.rs.html @@ -0,0 +1,581 @@ +imports.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+
+//! Module imports resolving logic.
+
+use crate::resolver::Resolver;
+use more_asserts::assert_ge;
+use std::collections::HashSet;
+use wasmtime_environ::entity::PrimaryMap;
+use wasmtime_environ::wasm::{Global, GlobalInit, Memory, Table, TableElementType};
+use wasmtime_environ::{MemoryPlan, MemoryStyle, Module, TablePlan};
+use wasmtime_runtime::{
+    Export, Imports, InstanceHandle, LinkError, VMFunctionImport, VMGlobalImport, VMMemoryImport,
+    VMTableImport,
+};
+
+/// This function allows to match all imports of a `Module` with concrete definitions provided by
+/// a `Resolver`.
+///
+/// If all imports are satisfied returns an `Imports` instance required for a module instantiation.
+pub fn resolve_imports(module: &Module, resolver: &mut dyn Resolver) -> Result<Imports, LinkError> {
+    let mut dependencies = HashSet::new();
+
+    let mut function_imports = PrimaryMap::with_capacity(module.imported_funcs.len());
+    for (index, (module_name, field, import_idx)) in module.imported_funcs.iter() {
+        match resolver.resolve(*import_idx, module_name, field) {
+            Some(export_value) => match export_value {
+                Export::Function {
+                    address,
+                    signature,
+                    vmctx,
+                } => {
+                    let import_signature = &module.signatures[module.functions[index]];
+                    if signature != *import_signature {
+                        // TODO: If the difference is in the calling convention,
+                        // we could emit a wrapper function to fix it up.
+                        return Err(LinkError(format!(
+                            "{}/{}: incompatible import type: exported function with signature {} \
+                             incompatible with function import with signature {}",
+                            module_name, field, signature, import_signature
+                        )));
+                    }
+                    dependencies.insert(unsafe { InstanceHandle::from_vmctx(vmctx) });
+                    function_imports.push(VMFunctionImport {
+                        body: address,
+                        vmctx,
+                    });
+                }
+                Export::Table { .. } | Export::Memory { .. } | Export::Global { .. } => {
+                    return Err(LinkError(format!(
+                        "{}/{}: incompatible import type: export incompatible with function import",
+                        module_name, field
+                    )));
+                }
+            },
+            None => {
+                return Err(LinkError(format!(
+                    "{}/{}: unknown import function: function not provided",
+                    module_name, field
+                )));
+            }
+        }
+    }
+
+    let mut table_imports = PrimaryMap::with_capacity(module.imported_tables.len());
+    for (index, (module_name, field, import_idx)) in module.imported_tables.iter() {
+        match resolver.resolve(*import_idx, module_name, field) {
+            Some(export_value) => match export_value {
+                Export::Table {
+                    definition,
+                    vmctx,
+                    table,
+                } => {
+                    let import_table = &module.table_plans[index];
+                    if !is_table_compatible(&table, import_table) {
+                        return Err(LinkError(format!(
+                            "{}/{}: incompatible import type: exported table incompatible with \
+                             table import",
+                            module_name, field,
+                        )));
+                    }
+                    dependencies.insert(unsafe { InstanceHandle::from_vmctx(vmctx) });
+                    table_imports.push(VMTableImport {
+                        from: definition,
+                        vmctx,
+                    });
+                }
+                Export::Global { .. } | Export::Memory { .. } | Export::Function { .. } => {
+                    return Err(LinkError(format!(
+                        "{}/{}: incompatible import type: export incompatible with table import",
+                        module_name, field
+                    )));
+                }
+            },
+            None => {
+                return Err(LinkError(format!(
+                    "unknown import: no provided import table for {}/{}",
+                    module_name, field
+                )));
+            }
+        }
+    }
+
+    let mut memory_imports = PrimaryMap::with_capacity(module.imported_memories.len());
+    for (index, (module_name, field, import_idx)) in module.imported_memories.iter() {
+        match resolver.resolve(*import_idx, module_name, field) {
+            Some(export_value) => match export_value {
+                Export::Memory {
+                    definition,
+                    vmctx,
+                    memory,
+                } => {
+                    let import_memory = &module.memory_plans[index];
+                    if !is_memory_compatible(&memory, import_memory) {
+                        return Err(LinkError(format!(
+                            "{}/{}: incompatible import type: exported memory incompatible with \
+                             memory import",
+                            module_name, field
+                        )));
+                    }
+
+                    // Sanity-check: Ensure that the imported memory has at least
+                    // guard-page protections the importing module expects it to have.
+                    if let (
+                        MemoryStyle::Static { bound },
+                        MemoryStyle::Static {
+                            bound: import_bound,
+                        },
+                    ) = (memory.style, &import_memory.style)
+                    {
+                        assert_ge!(bound, *import_bound);
+                    }
+                    assert_ge!(memory.offset_guard_size, import_memory.offset_guard_size);
+
+                    dependencies.insert(unsafe { InstanceHandle::from_vmctx(vmctx) });
+                    memory_imports.push(VMMemoryImport {
+                        from: definition,
+                        vmctx,
+                    });
+                }
+                Export::Table { .. } | Export::Global { .. } | Export::Function { .. } => {
+                    return Err(LinkError(format!(
+                        "{}/{}: incompatible import type: export incompatible with memory import",
+                        module_name, field
+                    )));
+                }
+            },
+            None => {
+                return Err(LinkError(format!(
+                    "unknown import: no provided import memory for {}/{}",
+                    module_name, field
+                )));
+            }
+        }
+    }
+
+    let mut global_imports = PrimaryMap::with_capacity(module.imported_globals.len());
+    for (index, (module_name, field, import_idx)) in module.imported_globals.iter() {
+        match resolver.resolve(*import_idx, module_name, field) {
+            Some(export_value) => match export_value {
+                Export::Table { .. } | Export::Memory { .. } | Export::Function { .. } => {
+                    return Err(LinkError(format!(
+                        "{}/{}: incompatible import type: exported global incompatible with \
+                         global import",
+                        module_name, field
+                    )));
+                }
+                Export::Global {
+                    definition,
+                    vmctx,
+                    global,
+                } => {
+                    let imported_global = module.globals[index];
+                    if !is_global_compatible(&global, &imported_global) {
+                        return Err(LinkError(format!(
+                            "{}/{}: incompatible import type: exported global incompatible with \
+                             global import",
+                            module_name, field
+                        )));
+                    }
+                    dependencies.insert(unsafe { InstanceHandle::from_vmctx(vmctx) });
+                    global_imports.push(VMGlobalImport { from: definition });
+                }
+            },
+            None => {
+                return Err(LinkError(format!(
+                    "unknown import: no provided import global for {}/{}",
+                    module_name, field
+                )));
+            }
+        }
+    }
+
+    Ok(Imports::new(
+        dependencies,
+        function_imports,
+        table_imports,
+        memory_imports,
+        global_imports,
+    ))
+}
+
+fn is_global_compatible(exported: &Global, imported: &Global) -> bool {
+    match imported.initializer {
+        GlobalInit::Import => (),
+        _ => panic!("imported Global should have an Imported initializer"),
+    }
+
+    let Global {
+        ty: exported_ty,
+        mutability: exported_mutability,
+        initializer: _exported_initializer,
+    } = exported;
+    let Global {
+        ty: imported_ty,
+        mutability: imported_mutability,
+        initializer: _imported_initializer,
+    } = imported;
+    exported_ty == imported_ty && imported_mutability == exported_mutability
+}
+
+fn is_table_element_type_compatible(
+    exported_type: TableElementType,
+    imported_type: TableElementType,
+) -> bool {
+    match exported_type {
+        TableElementType::Func => match imported_type {
+            TableElementType::Func => true,
+            _ => false,
+        },
+        TableElementType::Val(exported_val_ty) => match imported_type {
+            TableElementType::Val(imported_val_ty) => exported_val_ty == imported_val_ty,
+            _ => false,
+        },
+    }
+}
+
+fn is_table_compatible(exported: &TablePlan, imported: &TablePlan) -> bool {
+    let TablePlan {
+        table:
+            Table {
+                ty: exported_ty,
+                minimum: exported_minimum,
+                maximum: exported_maximum,
+            },
+        style: _exported_style,
+    } = exported;
+    let TablePlan {
+        table:
+            Table {
+                ty: imported_ty,
+                minimum: imported_minimum,
+                maximum: imported_maximum,
+            },
+        style: _imported_style,
+    } = imported;
+
+    is_table_element_type_compatible(*exported_ty, *imported_ty)
+        && imported_minimum <= exported_minimum
+        && (imported_maximum.is_none()
+            || (!exported_maximum.is_none()
+                && imported_maximum.unwrap() >= exported_maximum.unwrap()))
+}
+
+fn is_memory_compatible(exported: &MemoryPlan, imported: &MemoryPlan) -> bool {
+    let MemoryPlan {
+        memory:
+            Memory {
+                minimum: exported_minimum,
+                maximum: exported_maximum,
+                shared: exported_shared,
+            },
+        style: _exported_style,
+        offset_guard_size: _exported_offset_guard_size,
+    } = exported;
+    let MemoryPlan {
+        memory:
+            Memory {
+                minimum: imported_minimum,
+                maximum: imported_maximum,
+                shared: imported_shared,
+            },
+        style: _imported_style,
+        offset_guard_size: _imported_offset_guard_size,
+    } = imported;
+
+    imported_minimum <= exported_minimum
+        && (imported_maximum.is_none()
+            || (!exported_maximum.is_none()
+                && imported_maximum.unwrap() >= exported_maximum.unwrap()))
+        && exported_shared == imported_shared
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_jit/instantiate.rs.html b/api/src/wasmtime_jit/instantiate.rs.html new file mode 100644 index 000000000000..957cdaf8703e --- /dev/null +++ b/api/src/wasmtime_jit/instantiate.rs.html @@ -0,0 +1,531 @@ +instantiate.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+
+//! Define the `instantiate` function, which takes a byte array containing an
+//! encoded wasm module and returns a live wasm instance. Also, define
+//! `CompiledModule` to allow compiling and instantiating to be done as separate
+//! steps.
+
+use crate::compiler::Compiler;
+use crate::imports::resolve_imports;
+use crate::link::link_module;
+use crate::resolver::Resolver;
+use std::io::Write;
+use std::rc::Rc;
+use std::sync::Arc;
+use thiserror::Error;
+use wasmtime_debug::read_debuginfo;
+use wasmtime_environ::entity::{BoxedSlice, PrimaryMap};
+use wasmtime_environ::wasm::{DefinedFuncIndex, SignatureIndex};
+use wasmtime_environ::{
+    CompileError, DataInitializer, DataInitializerLocation, Module, ModuleEnvironment,
+};
+use wasmtime_runtime::{
+    GdbJitImageRegistration, InstanceHandle, InstantiationError, TrapRegistration, VMFunctionBody,
+    VMSharedSignatureIndex,
+};
+
+/// An error condition while setting up a wasm instance, be it validation,
+/// compilation, or instantiation.
+#[derive(Error, Debug)]
+pub enum SetupError {
+    /// The module did not pass validation.
+    #[error("Validation error: {0}")]
+    Validate(String),
+
+    /// A wasm translation error occured.
+    #[error("WebAssembly failed to compile")]
+    Compile(#[from] CompileError),
+
+    /// Some runtime resource was unavailable or insufficient, or the start function
+    /// trapped.
+    #[error("Instantiation failed during setup")]
+    Instantiate(#[from] InstantiationError),
+
+    /// Debug information generation error occured.
+    #[error("Debug information error")]
+    DebugInfo(#[from] anyhow::Error),
+}
+
+/// This is similar to `CompiledModule`, but references the data initializers
+/// from the wasm buffer rather than holding its own copy.
+struct RawCompiledModule<'data> {
+    module: Module,
+    finished_functions: BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]>,
+    data_initializers: Box<[DataInitializer<'data>]>,
+    signatures: BoxedSlice<SignatureIndex, VMSharedSignatureIndex>,
+    dbg_jit_registration: Option<GdbJitImageRegistration>,
+    trap_registration: TrapRegistration,
+}
+
+impl<'data> RawCompiledModule<'data> {
+    /// Create a new `RawCompiledModule` by compiling the wasm module in `data` and instatiating it.
+    fn new(
+        compiler: &mut Compiler,
+        data: &'data [u8],
+        debug_info: bool,
+    ) -> Result<Self, SetupError> {
+        let environ = ModuleEnvironment::new(compiler.frontend_config(), compiler.tunables());
+
+        let translation = environ
+            .translate(data)
+            .map_err(|error| SetupError::Compile(CompileError::Wasm(error)))?;
+
+        let debug_data = if debug_info {
+            Some(read_debuginfo(&data))
+        } else {
+            None
+        };
+
+        let (finished_functions, jt_offsets, relocations, dbg_image, trap_registration) = compiler
+            .compile(
+                &translation.module,
+                translation.module_translation.as_ref().unwrap(),
+                translation.function_body_inputs,
+                debug_data,
+            )?;
+
+        link_module(
+            &translation.module,
+            &finished_functions,
+            &jt_offsets,
+            relocations,
+        );
+
+        // Compute indices into the shared signature table.
+        let signatures = {
+            let signature_registry = compiler.signatures();
+            translation
+                .module
+                .signatures
+                .values()
+                .map(|sig| signature_registry.register(sig))
+                .collect::<PrimaryMap<_, _>>()
+        };
+
+        // Make all code compiled thus far executable.
+        compiler.publish_compiled_code();
+
+        let dbg_jit_registration = if let Some(img) = dbg_image {
+            let mut bytes = Vec::new();
+            bytes.write_all(&img).expect("all written");
+            let reg = GdbJitImageRegistration::register(bytes);
+            Some(reg)
+        } else {
+            None
+        };
+
+        Ok(Self {
+            module: translation.module,
+            finished_functions: finished_functions.into_boxed_slice(),
+            data_initializers: translation.data_initializers.into_boxed_slice(),
+            signatures: signatures.into_boxed_slice(),
+            dbg_jit_registration,
+            trap_registration,
+        })
+    }
+}
+
+/// A compiled wasm module, ready to be instantiated.
+pub struct CompiledModule {
+    module: Arc<Module>,
+    finished_functions: BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]>,
+    data_initializers: Box<[OwnedDataInitializer]>,
+    signatures: BoxedSlice<SignatureIndex, VMSharedSignatureIndex>,
+    dbg_jit_registration: Option<Rc<GdbJitImageRegistration>>,
+    trap_registration: TrapRegistration,
+}
+
+impl CompiledModule {
+    /// Compile a data buffer into a `CompiledModule`, which may then be instantiated.
+    pub fn new<'data>(
+        compiler: &mut Compiler,
+        data: &'data [u8],
+        debug_info: bool,
+    ) -> Result<Self, SetupError> {
+        let raw = RawCompiledModule::<'data>::new(compiler, data, debug_info)?;
+
+        Ok(Self::from_parts(
+            raw.module,
+            raw.finished_functions,
+            raw.data_initializers
+                .iter()
+                .map(OwnedDataInitializer::new)
+                .collect::<Vec<_>>()
+                .into_boxed_slice(),
+            raw.signatures.clone(),
+            raw.dbg_jit_registration,
+            raw.trap_registration,
+        ))
+    }
+
+    /// Construct a `CompiledModule` from component parts.
+    pub fn from_parts(
+        module: Module,
+        finished_functions: BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]>,
+        data_initializers: Box<[OwnedDataInitializer]>,
+        signatures: BoxedSlice<SignatureIndex, VMSharedSignatureIndex>,
+        dbg_jit_registration: Option<GdbJitImageRegistration>,
+        trap_registration: TrapRegistration,
+    ) -> Self {
+        Self {
+            module: Arc::new(module),
+            finished_functions,
+            data_initializers,
+            signatures,
+            dbg_jit_registration: dbg_jit_registration.map(Rc::new),
+            trap_registration,
+        }
+    }
+
+    /// Crate an `Instance` from this `CompiledModule`.
+    ///
+    /// Note that if only one instance of this module is needed, it may be more
+    /// efficient to call the top-level `instantiate`, since that avoids copying
+    /// the data initializers.
+    ///
+    /// # Unsafety
+    ///
+    /// See `InstanceHandle::new`
+    pub unsafe fn instantiate(
+        &self,
+        resolver: &mut dyn Resolver,
+    ) -> Result<InstanceHandle, InstantiationError> {
+        let data_initializers = self
+            .data_initializers
+            .iter()
+            .map(|init| DataInitializer {
+                location: init.location.clone(),
+                data: &*init.data,
+            })
+            .collect::<Vec<_>>();
+        let imports = resolve_imports(&self.module, resolver)?;
+        InstanceHandle::new(
+            Arc::clone(&self.module),
+            self.trap_registration.clone(),
+            self.finished_functions.clone(),
+            imports,
+            &data_initializers,
+            self.signatures.clone(),
+            self.dbg_jit_registration.as_ref().map(|r| Rc::clone(&r)),
+            Box::new(()),
+        )
+    }
+
+    /// Return a reference-counting pointer to a module.
+    pub fn module(&self) -> &Arc<Module> {
+        &self.module
+    }
+
+    /// Return a reference to a module.
+    pub fn module_ref(&self) -> &Module {
+        &self.module
+    }
+
+    /// Returns the map of all finished JIT functions compiled for this module
+    pub fn finished_functions(&self) -> &BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]> {
+        &self.finished_functions
+    }
+}
+
+/// Similar to `DataInitializer`, but owns its own copy of the data rather
+/// than holding a slice of the original module.
+pub struct OwnedDataInitializer {
+    /// The location where the initialization is to be performed.
+    location: DataInitializerLocation,
+
+    /// The initialization data.
+    data: Box<[u8]>,
+}
+
+impl OwnedDataInitializer {
+    fn new(borrowed: &DataInitializer<'_>) -> Self {
+        Self {
+            location: borrowed.location.clone(),
+            data: borrowed.data.to_vec().into_boxed_slice(),
+        }
+    }
+}
+
+/// Create a new wasm instance by compiling the wasm module in `data` and instatiating it.
+///
+/// This is equivalent to createing a `CompiledModule` and calling `instantiate()` on it,
+/// but avoids creating an intermediate copy of the data initializers.
+///
+/// # Unsafety
+///
+/// See `InstanceHandle::new`
+#[allow(clippy::implicit_hasher)]
+pub unsafe fn instantiate(
+    compiler: &mut Compiler,
+    data: &[u8],
+    resolver: &mut dyn Resolver,
+    debug_info: bool,
+) -> Result<InstanceHandle, SetupError> {
+    let instance = CompiledModule::new(compiler, data, debug_info)?.instantiate(resolver)?;
+    Ok(instance)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_jit/lib.rs.html b/api/src/wasmtime_jit/lib.rs.html new file mode 100644 index 000000000000..065428bb8b5b --- /dev/null +++ b/api/src/wasmtime_jit/lib.rs.html @@ -0,0 +1,99 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+
+//! JIT-style runtime for WebAssembly using Cranelift.
+
+#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
+#![warn(unused_import_braces)]
+#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    allow(clippy::new_without_default, clippy::new_without_default)
+)]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    warn(
+        clippy::float_arithmetic,
+        clippy::mut_mut,
+        clippy::nonminimal_bool,
+        clippy::option_map_unwrap_or,
+        clippy::option_map_unwrap_or_else,
+        clippy::print_stdout,
+        clippy::unicode_not_nfc,
+        clippy::use_self
+    )
+)]
+
+mod code_memory;
+mod compiler;
+mod function_table;
+mod imports;
+mod instantiate;
+mod link;
+mod resolver;
+mod target_tunables;
+
+pub mod native;
+pub mod trampoline;
+
+pub use crate::code_memory::CodeMemory;
+pub use crate::compiler::{CompilationStrategy, Compiler};
+pub use crate::instantiate::{instantiate, CompiledModule, SetupError};
+pub use crate::link::link_module;
+pub use crate::resolver::{NullResolver, Resolver};
+pub use crate::target_tunables::target_tunables;
+
+// Re-export `InstanceHandle` so that users won't need to separately depend on
+// wasmtime-runtime in common cases.
+pub use wasmtime_runtime::{InstanceHandle, InstantiationError};
+
+/// Version number of this crate.
+pub const VERSION: &str = env!("CARGO_PKG_VERSION");
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_jit/link.rs.html b/api/src/wasmtime_jit/link.rs.html new file mode 100644 index 000000000000..2d8fd712fc47 --- /dev/null +++ b/api/src/wasmtime_jit/link.rs.html @@ -0,0 +1,255 @@ +link.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+
+//! Linking for JIT-compiled code.
+
+use cranelift_codegen::binemit::Reloc;
+use cranelift_codegen::ir::JumpTableOffsets;
+use std::ptr::write_unaligned;
+use wasmtime_environ::entity::PrimaryMap;
+use wasmtime_environ::wasm::DefinedFuncIndex;
+use wasmtime_environ::{Module, RelocationTarget, Relocations};
+use wasmtime_runtime::libcalls;
+use wasmtime_runtime::VMFunctionBody;
+
+/// Links a module that has been compiled with `compiled_module` in `wasmtime-environ`.
+///
+/// Performs all required relocations inside the function code, provided the necessary metadata.
+pub fn link_module(
+    module: &Module,
+    allocated_functions: &PrimaryMap<DefinedFuncIndex, *mut [VMFunctionBody]>,
+    jt_offsets: &PrimaryMap<DefinedFuncIndex, JumpTableOffsets>,
+    relocations: Relocations,
+) {
+    for (i, function_relocs) in relocations.into_iter() {
+        for r in function_relocs {
+            use self::libcalls::*;
+            let target_func_address: usize = match r.reloc_target {
+                RelocationTarget::UserFunc(index) => match module.defined_func_index(index) {
+                    Some(f) => {
+                        let fatptr: *const [VMFunctionBody] = allocated_functions[f];
+                        fatptr as *const VMFunctionBody as usize
+                    }
+                    None => panic!("direct call to import"),
+                },
+                RelocationTarget::LibCall(libcall) => {
+                    use cranelift_codegen::ir::LibCall::*;
+                    match libcall {
+                        CeilF32 => wasmtime_f32_ceil as usize,
+                        FloorF32 => wasmtime_f32_floor as usize,
+                        TruncF32 => wasmtime_f32_trunc as usize,
+                        NearestF32 => wasmtime_f32_nearest as usize,
+                        CeilF64 => wasmtime_f64_ceil as usize,
+                        FloorF64 => wasmtime_f64_floor as usize,
+                        TruncF64 => wasmtime_f64_trunc as usize,
+                        NearestF64 => wasmtime_f64_nearest as usize,
+                        Probestack => PROBESTACK as usize,
+                        other => panic!("unexpected libcall: {}", other),
+                    }
+                }
+                RelocationTarget::JumpTable(func_index, jt) => {
+                    match module.defined_func_index(func_index) {
+                        Some(f) => {
+                            let offset = *jt_offsets
+                                .get(f)
+                                .and_then(|ofs| ofs.get(jt))
+                                .expect("func jump table");
+                            let fatptr: *const [VMFunctionBody] = allocated_functions[f];
+                            fatptr as *const VMFunctionBody as usize + offset as usize
+                        }
+                        None => panic!("func index of jump table"),
+                    }
+                }
+            };
+
+            let fatptr: *const [VMFunctionBody] = allocated_functions[i];
+            let body = fatptr as *const VMFunctionBody;
+            match r.reloc {
+                #[cfg(target_pointer_width = "64")]
+                Reloc::Abs8 => unsafe {
+                    let reloc_address = body.add(r.offset as usize) as usize;
+                    let reloc_addend = r.addend as isize;
+                    let reloc_abs = (target_func_address as u64)
+                        .checked_add(reloc_addend as u64)
+                        .unwrap();
+                    write_unaligned(reloc_address as *mut u64, reloc_abs);
+                },
+                #[cfg(target_pointer_width = "32")]
+                Reloc::X86PCRel4 => unsafe {
+                    let reloc_address = body.add(r.offset as usize) as usize;
+                    let reloc_addend = r.addend as isize;
+                    let reloc_delta_u32 = (target_func_address as u32)
+                        .wrapping_sub(reloc_address as u32)
+                        .checked_add(reloc_addend as u32)
+                        .unwrap();
+                    write_unaligned(reloc_address as *mut u32, reloc_delta_u32);
+                },
+                #[cfg(target_pointer_width = "32")]
+                Reloc::X86CallPCRel4 => {
+                    // ignore
+                }
+                Reloc::X86PCRelRodata4 => {
+                    // ignore
+                }
+                _ => panic!("unsupported reloc kind"),
+            }
+        }
+    }
+}
+
+// A declaration for the stack probe function in Rust's standard library, for
+// catching callstack overflow.
+cfg_if::cfg_if! {
+    if #[cfg(any(
+        target_arch="aarch64",
+        all(
+            target_os = "windows",
+            target_env = "msvc",
+            target_pointer_width = "64"
+        )
+    ))] {
+        extern "C" {
+            pub fn __chkstk();
+        }
+        const PROBESTACK: unsafe extern "C" fn() = __chkstk;
+    } else if #[cfg(all(target_os = "windows", target_env = "gnu"))] {
+        extern "C" {
+            // ___chkstk (note the triple underscore) is implemented in compiler-builtins/src/x86_64.rs
+            // by the Rust compiler for the MinGW target
+            #[cfg(all(target_os = "windows", target_env = "gnu"))]
+            pub fn ___chkstk();
+        }
+        const PROBESTACK: unsafe extern "C" fn() = ___chkstk;
+    } else {
+        extern "C" {
+            pub fn __rust_probestack();
+        }
+        static PROBESTACK: unsafe extern "C" fn() = __rust_probestack;
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_jit/native.rs.html b/api/src/wasmtime_jit/native.rs.html new file mode 100644 index 000000000000..45c93a99e783 --- /dev/null +++ b/api/src/wasmtime_jit/native.rs.html @@ -0,0 +1,31 @@ +native.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+
+#![allow(missing_docs)]
+
+use cranelift_codegen;
+
+pub fn builder() -> cranelift_codegen::isa::Builder {
+    cranelift_native::builder().expect("host machine is not a supported target")
+}
+
+pub fn call_conv() -> cranelift_codegen::isa::CallConv {
+    use target_lexicon::HOST;
+    cranelift_codegen::isa::CallConv::triple_default(&HOST)
+}
+
+pub use cranelift_codegen::isa::lookup;
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_jit/resolver.rs.html b/api/src/wasmtime_jit/resolver.rs.html new file mode 100644 index 000000000000..b8fdf2932511 --- /dev/null +++ b/api/src/wasmtime_jit/resolver.rs.html @@ -0,0 +1,55 @@ +resolver.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+
+//! Define the `Resolver` trait, allowing custom resolution for external
+//! references.
+
+use wasmtime_runtime::Export;
+
+/// Import resolver connects imports with available exported values.
+pub trait Resolver {
+    /// Resolves an import a WebAssembly module to an export it's hooked up to.
+    ///
+    /// The `index` provided is the index of the import in the wasm module
+    /// that's being resolved. For example 1 means that it's the second import
+    /// listed in the wasm module.
+    ///
+    /// The `module` and `field` arguments provided are the module/field names
+    /// listed on the import itself.
+    fn resolve(&mut self, index: u32, module: &str, field: &str) -> Option<Export>;
+}
+
+/// `Resolver` implementation that always resolves to `None`.
+pub struct NullResolver {}
+
+impl Resolver for NullResolver {
+    fn resolve(&mut self, _idx: u32, _module: &str, _field: &str) -> Option<Export> {
+        None
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_jit/target_tunables.rs.html b/api/src/wasmtime_jit/target_tunables.rs.html new file mode 100644 index 000000000000..25fed4d8890c --- /dev/null +++ b/api/src/wasmtime_jit/target_tunables.rs.html @@ -0,0 +1,47 @@ +target_tunables.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+
+use std::cmp::min;
+use target_lexicon::{OperatingSystem, Triple};
+use wasmtime_environ::Tunables;
+
+/// Return a `Tunables` instance tuned for the given target platform.
+pub fn target_tunables(triple: &Triple) -> Tunables {
+    let mut result = Tunables::default();
+
+    match triple.operating_system {
+        OperatingSystem::Windows => {
+            // For now, use a smaller footprint on Windows so that we don't
+            // don't outstrip the paging file.
+            // TODO: Make this configurable.
+            result.static_memory_bound = min(result.static_memory_bound, 0x100);
+            result.static_memory_offset_guard_size =
+                min(result.static_memory_offset_guard_size, 0x10000);
+        }
+        _ => {}
+    }
+
+    result
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_jit/trampoline.rs.html b/api/src/wasmtime_jit/trampoline.rs.html new file mode 100644 index 000000000000..521cc220f7a2 --- /dev/null +++ b/api/src/wasmtime_jit/trampoline.rs.html @@ -0,0 +1,117 @@ +trampoline.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+
+#![allow(missing_docs)]
+
+pub mod ir {
+    pub use cranelift_codegen::ir::{
+        ExternalName, Function, InstBuilder, MemFlags, StackSlotData, StackSlotKind,
+    };
+}
+pub use cranelift_codegen::print_errors::pretty_error;
+pub use cranelift_codegen::Context;
+pub use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext};
+
+pub mod binemit {
+    pub use cranelift_codegen::binemit::NullTrapSink;
+    pub use cranelift_codegen::binemit::{CodeOffset, NullStackmapSink, TrapSink};
+
+    use cranelift_codegen::{binemit, ir};
+
+    /// We don't expect trampoline compilation to produce any relocations, so
+    /// this `RelocSink` just asserts that it doesn't recieve any.
+    pub struct TrampolineRelocSink {}
+
+    impl binemit::RelocSink for TrampolineRelocSink {
+        fn reloc_block(
+            &mut self,
+            _offset: binemit::CodeOffset,
+            _reloc: binemit::Reloc,
+            _block_offset: binemit::CodeOffset,
+        ) {
+            panic!("trampoline compilation should not produce block relocs");
+        }
+        fn reloc_external(
+            &mut self,
+            _offset: binemit::CodeOffset,
+            _reloc: binemit::Reloc,
+            _name: &ir::ExternalName,
+            _addend: binemit::Addend,
+        ) {
+            panic!("trampoline compilation should not produce external symbol relocs");
+        }
+        fn reloc_constant(
+            &mut self,
+            _code_offset: binemit::CodeOffset,
+            _reloc: binemit::Reloc,
+            _constant_offset: ir::ConstantOffset,
+        ) {
+            panic!("trampoline compilation should not produce constant relocs");
+        }
+        fn reloc_jt(
+            &mut self,
+            _offset: binemit::CodeOffset,
+            _reloc: binemit::Reloc,
+            _jt: ir::JumpTable,
+        ) {
+            panic!("trampoline compilation should not produce jump table relocs");
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_obj/context.rs.html b/api/src/wasmtime_obj/context.rs.html new file mode 100644 index 000000000000..7dcac421aa23 --- /dev/null +++ b/api/src/wasmtime_obj/context.rs.html @@ -0,0 +1,187 @@ +context.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+
+#![allow(clippy::cast_ptr_alignment)]
+
+use more_asserts::assert_le;
+use std::collections::hash_map::Entry;
+use std::collections::HashMap;
+use std::ptr;
+use wasmtime_environ::entity::EntityRef;
+use wasmtime_environ::isa::TargetFrontendConfig;
+use wasmtime_environ::wasm::GlobalInit;
+use wasmtime_environ::{Module, TargetSharedSignatureIndex, VMOffsets};
+
+pub struct TableRelocation {
+    pub index: usize,
+    pub offset: usize,
+}
+
+pub fn layout_vmcontext(
+    module: &Module,
+    target_config: &TargetFrontendConfig,
+) -> (Box<[u8]>, Box<[TableRelocation]>) {
+    let ofs = VMOffsets::new(target_config.pointer_bytes(), &module);
+    let out_len = ofs.size_of_vmctx() as usize;
+    let mut out = vec![0; out_len];
+
+    // Assign unique indicies to unique signatures.
+    let mut signature_registry = HashMap::new();
+    let mut signature_registry_len = signature_registry.len();
+    for (index, sig) in module.signatures.iter() {
+        let offset = ofs.vmctx_vmshared_signature_id(index) as usize;
+        let target_index = match signature_registry.entry(sig) {
+            Entry::Occupied(o) => *o.get(),
+            Entry::Vacant(v) => {
+                assert_le!(signature_registry_len, std::u32::MAX as usize);
+                let id = TargetSharedSignatureIndex::new(signature_registry_len as u32);
+                signature_registry_len += 1;
+                *v.insert(id)
+            }
+        };
+        unsafe {
+            let to = out.as_mut_ptr().add(offset) as *mut TargetSharedSignatureIndex;
+            ptr::write(to, target_index);
+        }
+    }
+
+    let num_tables_imports = module.imported_tables.len();
+    let mut table_relocs = Vec::with_capacity(module.table_plans.len() - num_tables_imports);
+    for (index, table) in module.table_plans.iter().skip(num_tables_imports) {
+        let def_index = module.defined_table_index(index).unwrap();
+        let offset = ofs.vmctx_vmtable_definition(def_index) as usize;
+        let current_elements = table.table.minimum;
+        unsafe {
+            assert_eq!(
+                ::std::mem::size_of::<u32>() as u8,
+                ofs.size_of_vmtable_definition_current_elements(),
+                "vmtable_definition_current_elements expected to be u32"
+            );
+            let to = out
+                .as_mut_ptr()
+                .add(offset)
+                .add(ofs.vmtable_definition_current_elements() as usize);
+            ptr::write(to as *mut u32, current_elements);
+        }
+        table_relocs.push(TableRelocation {
+            index: def_index.index(),
+            offset,
+        });
+    }
+
+    let num_globals_imports = module.imported_globals.len();
+    for (index, global) in module.globals.iter().skip(num_globals_imports) {
+        let def_index = module.defined_global_index(index).unwrap();
+        let offset = ofs.vmctx_vmglobal_definition(def_index) as usize;
+        let to = unsafe { out.as_mut_ptr().add(offset) };
+        match global.initializer {
+            GlobalInit::I32Const(x) => unsafe {
+                ptr::write(to as *mut i32, x);
+            },
+            GlobalInit::I64Const(x) => unsafe {
+                ptr::write(to as *mut i64, x);
+            },
+            GlobalInit::F32Const(x) => unsafe {
+                ptr::write(to as *mut u32, x);
+            },
+            GlobalInit::F64Const(x) => unsafe {
+                ptr::write(to as *mut u64, x);
+            },
+            _ => panic!("unsupported global type"),
+        }
+    }
+
+    (out.into_boxed_slice(), table_relocs.into_boxed_slice())
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_obj/data_segment.rs.html b/api/src/wasmtime_obj/data_segment.rs.html new file mode 100644 index 000000000000..f20b2fb8ef57 --- /dev/null +++ b/api/src/wasmtime_obj/data_segment.rs.html @@ -0,0 +1,53 @@ +data_segment.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+
+use anyhow::Result;
+use faerie::{Artifact, Decl};
+use wasmtime_environ::DataInitializer;
+
+/// Declares data segment symbol
+pub fn declare_data_segment(
+    obj: &mut Artifact,
+    _data_initaliazer: &DataInitializer,
+    index: usize,
+) -> Result<()> {
+    let name = format!("_memory_{}", index);
+    obj.declare(name, Decl::data())?;
+    Ok(())
+}
+
+/// Emit segment data and initialization location
+pub fn emit_data_segment(
+    obj: &mut Artifact,
+    data_initaliazer: &DataInitializer,
+    index: usize,
+) -> Result<()> {
+    let name = format!("_memory_{}", index);
+    obj.define(name, Vec::from(data_initaliazer.data))?;
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_obj/function.rs.html b/api/src/wasmtime_obj/function.rs.html new file mode 100644 index 000000000000..08e8e58c75b0 --- /dev/null +++ b/api/src/wasmtime_obj/function.rs.html @@ -0,0 +1,153 @@ +function.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+
+use anyhow::Result;
+use faerie::{Artifact, Decl, Link};
+use wasmtime_environ::entity::EntityRef;
+use wasmtime_environ::settings;
+use wasmtime_environ::settings::Configurable;
+use wasmtime_environ::{Compilation, Module, RelocationTarget, Relocations};
+
+/// Defines module functions
+pub fn declare_functions(
+    obj: &mut Artifact,
+    module: &Module,
+    relocations: &Relocations,
+) -> Result<()> {
+    for i in 0..module.imported_funcs.len() {
+        let string_name = format!("_wasm_function_{}", i);
+        obj.declare(string_name, Decl::function_import())?;
+    }
+    for (i, _function_relocs) in relocations.iter().rev() {
+        let func_index = module.func_index(i);
+        let string_name = format!("_wasm_function_{}", func_index.index());
+        obj.declare(string_name, Decl::function().global())?;
+    }
+    Ok(())
+}
+
+/// Emits module functions
+pub fn emit_functions(
+    obj: &mut Artifact,
+    module: &Module,
+    compilation: &Compilation,
+    relocations: &Relocations,
+) -> Result<()> {
+    debug_assert!(
+        module.start_func.is_none()
+            || module.start_func.unwrap().index() >= module.imported_funcs.len(),
+        "imported start functions not supported yet"
+    );
+
+    let mut shared_builder = settings::builder();
+    shared_builder
+        .enable("enable_verifier")
+        .expect("Missing enable_verifier setting");
+
+    for (i, _function_relocs) in relocations.iter() {
+        let body = &compilation.get(i).body;
+        let func_index = module.func_index(i);
+        let string_name = format!("_wasm_function_{}", func_index.index());
+
+        obj.define(string_name, body.clone())?;
+    }
+
+    for (i, function_relocs) in relocations.iter() {
+        let func_index = module.func_index(i);
+        let string_name = format!("_wasm_function_{}", func_index.index());
+        for r in function_relocs {
+            debug_assert_eq!(r.addend, 0);
+            match r.reloc_target {
+                RelocationTarget::UserFunc(target_index) => {
+                    let target_name = format!("_wasm_function_{}", target_index.index());
+                    obj.link(Link {
+                        from: &string_name,
+                        to: &target_name,
+                        at: r.offset as u64,
+                    })?;
+                }
+                RelocationTarget::JumpTable(_, _) => {
+                    // ignore relocations for jump tables
+                }
+                _ => panic!("relocations target not supported yet: {:?}", r.reloc_target),
+            };
+        }
+    }
+
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_obj/lib.rs.html b/api/src/wasmtime_obj/lib.rs.html new file mode 100644 index 000000000000..e7e434a238b9 --- /dev/null +++ b/api/src/wasmtime_obj/lib.rs.html @@ -0,0 +1,73 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+
+//! Object-file writing library using the wasmtime environment.
+
+#![deny(
+    missing_docs,
+    trivial_numeric_casts,
+    unused_extern_crates,
+    unstable_features
+)]
+#![warn(unused_import_braces)]
+#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
+#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    warn(
+        clippy::float_arithmetic,
+        clippy::mut_mut,
+        clippy::nonminimal_bool,
+        clippy::option_map_unwrap_or,
+        clippy::option_map_unwrap_or_else,
+        clippy::print_stdout,
+        clippy::unicode_not_nfc,
+        clippy::use_self
+    )
+)]
+
+mod context;
+mod data_segment;
+mod function;
+mod module;
+mod table;
+
+pub use crate::module::emit_module;
+
+/// Version number of this crate.
+pub const VERSION: &str = env!("CARGO_PKG_VERSION");
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_obj/module.rs.html b/api/src/wasmtime_obj/module.rs.html new file mode 100644 index 000000000000..cb4769548572 --- /dev/null +++ b/api/src/wasmtime_obj/module.rs.html @@ -0,0 +1,125 @@ +module.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+
+use crate::context::layout_vmcontext;
+use crate::data_segment::{declare_data_segment, emit_data_segment};
+use crate::function::{declare_functions, emit_functions};
+use crate::table::{declare_table, emit_table};
+use anyhow::Result;
+use faerie::{Artifact, Decl, Link};
+use wasmtime_environ::isa::TargetFrontendConfig;
+use wasmtime_environ::{Compilation, DataInitializer, Module, Relocations};
+
+fn emit_vmcontext_init(
+    obj: &mut Artifact,
+    module: &Module,
+    target_config: &TargetFrontendConfig,
+) -> Result<()> {
+    let (data, table_relocs) = layout_vmcontext(module, target_config);
+    obj.declare_with("_vmcontext_init", Decl::data().global(), data.to_vec())?;
+    for reloc in table_relocs.iter() {
+        let target_name = format!("_table_{}", reloc.index);
+        obj.link(Link {
+            from: "_vmcontext_init",
+            to: &target_name,
+            at: reloc.offset as u64,
+        })?;
+    }
+    Ok(())
+}
+
+/// Emits a module that has been emitted with the `wasmtime-environ` environment
+/// implementation to a native object file.
+pub fn emit_module(
+    obj: &mut Artifact,
+    module: &Module,
+    compilation: &Compilation,
+    relocations: &Relocations,
+    data_initializers: &[DataInitializer],
+    target_config: &TargetFrontendConfig,
+) -> Result<()> {
+    declare_functions(obj, module, relocations)?;
+
+    for (i, initializer) in data_initializers.iter().enumerate() {
+        declare_data_segment(obj, initializer, i)?;
+    }
+
+    for i in 0..module.table_plans.len() {
+        declare_table(obj, i)?;
+    }
+
+    emit_functions(obj, module, compilation, relocations)?;
+
+    for (i, initializer) in data_initializers.iter().enumerate() {
+        emit_data_segment(obj, initializer, i)?;
+    }
+
+    for i in 0..module.table_plans.len() {
+        emit_table(obj, i)?;
+    }
+
+    emit_vmcontext_init(obj, module, target_config)?;
+
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_obj/table.rs.html b/api/src/wasmtime_obj/table.rs.html new file mode 100644 index 000000000000..020124077c6f --- /dev/null +++ b/api/src/wasmtime_obj/table.rs.html @@ -0,0 +1,37 @@ +table.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+
+use anyhow::Result;
+use faerie::{Artifact, Decl};
+
+/// Declares data segment symbol
+pub fn declare_table(obj: &mut Artifact, index: usize) -> Result<()> {
+    let name = format!("_table_{}", index);
+    obj.declare(name, Decl::data())?;
+    Ok(())
+}
+
+/// Emit segment data and initialization location
+pub fn emit_table(obj: &mut Artifact, index: usize) -> Result<()> {
+    let name = format!("_table_{}", index);
+    // FIXME: We need to initialize table using function symbols
+    obj.define(name, Vec::new())?;
+    Ok(())
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/export.rs.html b/api/src/wasmtime_runtime/export.rs.html new file mode 100644 index 000000000000..13ac83d3688d --- /dev/null +++ b/api/src/wasmtime_runtime/export.rs.html @@ -0,0 +1,211 @@ +export.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+
+use crate::vmcontext::{
+    VMContext, VMFunctionBody, VMGlobalDefinition, VMMemoryDefinition, VMTableDefinition,
+};
+use wasmtime_environ::ir;
+use wasmtime_environ::wasm::Global;
+use wasmtime_environ::{MemoryPlan, TablePlan};
+
+/// The value of an export passed from one instance to another.
+#[derive(Debug, Clone)]
+pub enum Export {
+    /// A function export value.
+    Function {
+        /// The address of the native-code function.
+        address: *const VMFunctionBody,
+        /// Pointer to the containing `VMContext`.
+        vmctx: *mut VMContext,
+        /// The function signature declaration, used for compatibilty checking.
+        signature: ir::Signature,
+    },
+
+    /// A table export value.
+    Table {
+        /// The address of the table descriptor.
+        definition: *mut VMTableDefinition,
+        /// Pointer to the containing `VMContext`.
+        vmctx: *mut VMContext,
+        /// The table declaration, used for compatibilty checking.
+        table: TablePlan,
+    },
+
+    /// A memory export value.
+    Memory {
+        /// The address of the memory descriptor.
+        definition: *mut VMMemoryDefinition,
+        /// Pointer to the containing `VMContext`.
+        vmctx: *mut VMContext,
+        /// The memory declaration, used for compatibilty checking.
+        memory: MemoryPlan,
+    },
+
+    /// A global export value.
+    Global {
+        /// The address of the global storage.
+        definition: *mut VMGlobalDefinition,
+        /// Pointer to the containing `VMContext`.
+        vmctx: *mut VMContext,
+        /// The global declaration, used for compatibilty checking.
+        global: Global,
+    },
+}
+
+impl Export {
+    /// Construct a function export value.
+    pub fn function(
+        address: *const VMFunctionBody,
+        vmctx: *mut VMContext,
+        signature: ir::Signature,
+    ) -> Self {
+        Self::Function {
+            address,
+            vmctx,
+            signature,
+        }
+    }
+
+    /// Construct a table export value.
+    pub fn table(
+        definition: *mut VMTableDefinition,
+        vmctx: *mut VMContext,
+        table: TablePlan,
+    ) -> Self {
+        Self::Table {
+            definition,
+            vmctx,
+            table,
+        }
+    }
+
+    /// Construct a memory export value.
+    pub fn memory(
+        definition: *mut VMMemoryDefinition,
+        vmctx: *mut VMContext,
+        memory: MemoryPlan,
+    ) -> Self {
+        Self::Memory {
+            definition,
+            vmctx,
+            memory,
+        }
+    }
+
+    /// Construct a global export value.
+    pub fn global(
+        definition: *mut VMGlobalDefinition,
+        vmctx: *mut VMContext,
+        global: Global,
+    ) -> Self {
+        Self::Global {
+            definition,
+            vmctx,
+            global,
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/imports.rs.html b/api/src/wasmtime_runtime/imports.rs.html new file mode 100644 index 000000000000..dfceb04a98b8 --- /dev/null +++ b/api/src/wasmtime_runtime/imports.rs.html @@ -0,0 +1,111 @@ +imports.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+
+use crate::instance::InstanceHandle;
+use crate::vmcontext::{VMFunctionImport, VMGlobalImport, VMMemoryImport, VMTableImport};
+use std::collections::HashSet;
+use wasmtime_environ::entity::{BoxedSlice, PrimaryMap};
+use wasmtime_environ::wasm::{FuncIndex, GlobalIndex, MemoryIndex, TableIndex};
+
+/// Resolved import pointers.
+#[derive(Clone)]
+pub struct Imports {
+    /// The set of instances that the imports depend on.
+    pub dependencies: HashSet<InstanceHandle>,
+
+    /// Resolved addresses for imported functions.
+    pub functions: BoxedSlice<FuncIndex, VMFunctionImport>,
+
+    /// Resolved addresses for imported tables.
+    pub tables: BoxedSlice<TableIndex, VMTableImport>,
+
+    /// Resolved addresses for imported memories.
+    pub memories: BoxedSlice<MemoryIndex, VMMemoryImport>,
+
+    /// Resolved addresses for imported globals.
+    pub globals: BoxedSlice<GlobalIndex, VMGlobalImport>,
+}
+
+impl Imports {
+    /// Construct a new `Imports` instance.
+    pub fn new(
+        dependencies: HashSet<InstanceHandle>,
+        function_imports: PrimaryMap<FuncIndex, VMFunctionImport>,
+        table_imports: PrimaryMap<TableIndex, VMTableImport>,
+        memory_imports: PrimaryMap<MemoryIndex, VMMemoryImport>,
+        global_imports: PrimaryMap<GlobalIndex, VMGlobalImport>,
+    ) -> Self {
+        Self {
+            dependencies,
+            functions: function_imports.into_boxed_slice(),
+            tables: table_imports.into_boxed_slice(),
+            memories: memory_imports.into_boxed_slice(),
+            globals: global_imports.into_boxed_slice(),
+        }
+    }
+
+    /// Construct a new `Imports` instance with no imports.
+    pub fn none() -> Self {
+        Self {
+            dependencies: HashSet::new(),
+            functions: PrimaryMap::new().into_boxed_slice(),
+            tables: PrimaryMap::new().into_boxed_slice(),
+            memories: PrimaryMap::new().into_boxed_slice(),
+            globals: PrimaryMap::new().into_boxed_slice(),
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/instance.rs.html b/api/src/wasmtime_runtime/instance.rs.html new file mode 100644 index 000000000000..5927ab9f6aca --- /dev/null +++ b/api/src/wasmtime_runtime/instance.rs.html @@ -0,0 +1,2101 @@ +instance.rs.html -- source
   1
+   2
+   3
+   4
+   5
+   6
+   7
+   8
+   9
+  10
+  11
+  12
+  13
+  14
+  15
+  16
+  17
+  18
+  19
+  20
+  21
+  22
+  23
+  24
+  25
+  26
+  27
+  28
+  29
+  30
+  31
+  32
+  33
+  34
+  35
+  36
+  37
+  38
+  39
+  40
+  41
+  42
+  43
+  44
+  45
+  46
+  47
+  48
+  49
+  50
+  51
+  52
+  53
+  54
+  55
+  56
+  57
+  58
+  59
+  60
+  61
+  62
+  63
+  64
+  65
+  66
+  67
+  68
+  69
+  70
+  71
+  72
+  73
+  74
+  75
+  76
+  77
+  78
+  79
+  80
+  81
+  82
+  83
+  84
+  85
+  86
+  87
+  88
+  89
+  90
+  91
+  92
+  93
+  94
+  95
+  96
+  97
+  98
+  99
+ 100
+ 101
+ 102
+ 103
+ 104
+ 105
+ 106
+ 107
+ 108
+ 109
+ 110
+ 111
+ 112
+ 113
+ 114
+ 115
+ 116
+ 117
+ 118
+ 119
+ 120
+ 121
+ 122
+ 123
+ 124
+ 125
+ 126
+ 127
+ 128
+ 129
+ 130
+ 131
+ 132
+ 133
+ 134
+ 135
+ 136
+ 137
+ 138
+ 139
+ 140
+ 141
+ 142
+ 143
+ 144
+ 145
+ 146
+ 147
+ 148
+ 149
+ 150
+ 151
+ 152
+ 153
+ 154
+ 155
+ 156
+ 157
+ 158
+ 159
+ 160
+ 161
+ 162
+ 163
+ 164
+ 165
+ 166
+ 167
+ 168
+ 169
+ 170
+ 171
+ 172
+ 173
+ 174
+ 175
+ 176
+ 177
+ 178
+ 179
+ 180
+ 181
+ 182
+ 183
+ 184
+ 185
+ 186
+ 187
+ 188
+ 189
+ 190
+ 191
+ 192
+ 193
+ 194
+ 195
+ 196
+ 197
+ 198
+ 199
+ 200
+ 201
+ 202
+ 203
+ 204
+ 205
+ 206
+ 207
+ 208
+ 209
+ 210
+ 211
+ 212
+ 213
+ 214
+ 215
+ 216
+ 217
+ 218
+ 219
+ 220
+ 221
+ 222
+ 223
+ 224
+ 225
+ 226
+ 227
+ 228
+ 229
+ 230
+ 231
+ 232
+ 233
+ 234
+ 235
+ 236
+ 237
+ 238
+ 239
+ 240
+ 241
+ 242
+ 243
+ 244
+ 245
+ 246
+ 247
+ 248
+ 249
+ 250
+ 251
+ 252
+ 253
+ 254
+ 255
+ 256
+ 257
+ 258
+ 259
+ 260
+ 261
+ 262
+ 263
+ 264
+ 265
+ 266
+ 267
+ 268
+ 269
+ 270
+ 271
+ 272
+ 273
+ 274
+ 275
+ 276
+ 277
+ 278
+ 279
+ 280
+ 281
+ 282
+ 283
+ 284
+ 285
+ 286
+ 287
+ 288
+ 289
+ 290
+ 291
+ 292
+ 293
+ 294
+ 295
+ 296
+ 297
+ 298
+ 299
+ 300
+ 301
+ 302
+ 303
+ 304
+ 305
+ 306
+ 307
+ 308
+ 309
+ 310
+ 311
+ 312
+ 313
+ 314
+ 315
+ 316
+ 317
+ 318
+ 319
+ 320
+ 321
+ 322
+ 323
+ 324
+ 325
+ 326
+ 327
+ 328
+ 329
+ 330
+ 331
+ 332
+ 333
+ 334
+ 335
+ 336
+ 337
+ 338
+ 339
+ 340
+ 341
+ 342
+ 343
+ 344
+ 345
+ 346
+ 347
+ 348
+ 349
+ 350
+ 351
+ 352
+ 353
+ 354
+ 355
+ 356
+ 357
+ 358
+ 359
+ 360
+ 361
+ 362
+ 363
+ 364
+ 365
+ 366
+ 367
+ 368
+ 369
+ 370
+ 371
+ 372
+ 373
+ 374
+ 375
+ 376
+ 377
+ 378
+ 379
+ 380
+ 381
+ 382
+ 383
+ 384
+ 385
+ 386
+ 387
+ 388
+ 389
+ 390
+ 391
+ 392
+ 393
+ 394
+ 395
+ 396
+ 397
+ 398
+ 399
+ 400
+ 401
+ 402
+ 403
+ 404
+ 405
+ 406
+ 407
+ 408
+ 409
+ 410
+ 411
+ 412
+ 413
+ 414
+ 415
+ 416
+ 417
+ 418
+ 419
+ 420
+ 421
+ 422
+ 423
+ 424
+ 425
+ 426
+ 427
+ 428
+ 429
+ 430
+ 431
+ 432
+ 433
+ 434
+ 435
+ 436
+ 437
+ 438
+ 439
+ 440
+ 441
+ 442
+ 443
+ 444
+ 445
+ 446
+ 447
+ 448
+ 449
+ 450
+ 451
+ 452
+ 453
+ 454
+ 455
+ 456
+ 457
+ 458
+ 459
+ 460
+ 461
+ 462
+ 463
+ 464
+ 465
+ 466
+ 467
+ 468
+ 469
+ 470
+ 471
+ 472
+ 473
+ 474
+ 475
+ 476
+ 477
+ 478
+ 479
+ 480
+ 481
+ 482
+ 483
+ 484
+ 485
+ 486
+ 487
+ 488
+ 489
+ 490
+ 491
+ 492
+ 493
+ 494
+ 495
+ 496
+ 497
+ 498
+ 499
+ 500
+ 501
+ 502
+ 503
+ 504
+ 505
+ 506
+ 507
+ 508
+ 509
+ 510
+ 511
+ 512
+ 513
+ 514
+ 515
+ 516
+ 517
+ 518
+ 519
+ 520
+ 521
+ 522
+ 523
+ 524
+ 525
+ 526
+ 527
+ 528
+ 529
+ 530
+ 531
+ 532
+ 533
+ 534
+ 535
+ 536
+ 537
+ 538
+ 539
+ 540
+ 541
+ 542
+ 543
+ 544
+ 545
+ 546
+ 547
+ 548
+ 549
+ 550
+ 551
+ 552
+ 553
+ 554
+ 555
+ 556
+ 557
+ 558
+ 559
+ 560
+ 561
+ 562
+ 563
+ 564
+ 565
+ 566
+ 567
+ 568
+ 569
+ 570
+ 571
+ 572
+ 573
+ 574
+ 575
+ 576
+ 577
+ 578
+ 579
+ 580
+ 581
+ 582
+ 583
+ 584
+ 585
+ 586
+ 587
+ 588
+ 589
+ 590
+ 591
+ 592
+ 593
+ 594
+ 595
+ 596
+ 597
+ 598
+ 599
+ 600
+ 601
+ 602
+ 603
+ 604
+ 605
+ 606
+ 607
+ 608
+ 609
+ 610
+ 611
+ 612
+ 613
+ 614
+ 615
+ 616
+ 617
+ 618
+ 619
+ 620
+ 621
+ 622
+ 623
+ 624
+ 625
+ 626
+ 627
+ 628
+ 629
+ 630
+ 631
+ 632
+ 633
+ 634
+ 635
+ 636
+ 637
+ 638
+ 639
+ 640
+ 641
+ 642
+ 643
+ 644
+ 645
+ 646
+ 647
+ 648
+ 649
+ 650
+ 651
+ 652
+ 653
+ 654
+ 655
+ 656
+ 657
+ 658
+ 659
+ 660
+ 661
+ 662
+ 663
+ 664
+ 665
+ 666
+ 667
+ 668
+ 669
+ 670
+ 671
+ 672
+ 673
+ 674
+ 675
+ 676
+ 677
+ 678
+ 679
+ 680
+ 681
+ 682
+ 683
+ 684
+ 685
+ 686
+ 687
+ 688
+ 689
+ 690
+ 691
+ 692
+ 693
+ 694
+ 695
+ 696
+ 697
+ 698
+ 699
+ 700
+ 701
+ 702
+ 703
+ 704
+ 705
+ 706
+ 707
+ 708
+ 709
+ 710
+ 711
+ 712
+ 713
+ 714
+ 715
+ 716
+ 717
+ 718
+ 719
+ 720
+ 721
+ 722
+ 723
+ 724
+ 725
+ 726
+ 727
+ 728
+ 729
+ 730
+ 731
+ 732
+ 733
+ 734
+ 735
+ 736
+ 737
+ 738
+ 739
+ 740
+ 741
+ 742
+ 743
+ 744
+ 745
+ 746
+ 747
+ 748
+ 749
+ 750
+ 751
+ 752
+ 753
+ 754
+ 755
+ 756
+ 757
+ 758
+ 759
+ 760
+ 761
+ 762
+ 763
+ 764
+ 765
+ 766
+ 767
+ 768
+ 769
+ 770
+ 771
+ 772
+ 773
+ 774
+ 775
+ 776
+ 777
+ 778
+ 779
+ 780
+ 781
+ 782
+ 783
+ 784
+ 785
+ 786
+ 787
+ 788
+ 789
+ 790
+ 791
+ 792
+ 793
+ 794
+ 795
+ 796
+ 797
+ 798
+ 799
+ 800
+ 801
+ 802
+ 803
+ 804
+ 805
+ 806
+ 807
+ 808
+ 809
+ 810
+ 811
+ 812
+ 813
+ 814
+ 815
+ 816
+ 817
+ 818
+ 819
+ 820
+ 821
+ 822
+ 823
+ 824
+ 825
+ 826
+ 827
+ 828
+ 829
+ 830
+ 831
+ 832
+ 833
+ 834
+ 835
+ 836
+ 837
+ 838
+ 839
+ 840
+ 841
+ 842
+ 843
+ 844
+ 845
+ 846
+ 847
+ 848
+ 849
+ 850
+ 851
+ 852
+ 853
+ 854
+ 855
+ 856
+ 857
+ 858
+ 859
+ 860
+ 861
+ 862
+ 863
+ 864
+ 865
+ 866
+ 867
+ 868
+ 869
+ 870
+ 871
+ 872
+ 873
+ 874
+ 875
+ 876
+ 877
+ 878
+ 879
+ 880
+ 881
+ 882
+ 883
+ 884
+ 885
+ 886
+ 887
+ 888
+ 889
+ 890
+ 891
+ 892
+ 893
+ 894
+ 895
+ 896
+ 897
+ 898
+ 899
+ 900
+ 901
+ 902
+ 903
+ 904
+ 905
+ 906
+ 907
+ 908
+ 909
+ 910
+ 911
+ 912
+ 913
+ 914
+ 915
+ 916
+ 917
+ 918
+ 919
+ 920
+ 921
+ 922
+ 923
+ 924
+ 925
+ 926
+ 927
+ 928
+ 929
+ 930
+ 931
+ 932
+ 933
+ 934
+ 935
+ 936
+ 937
+ 938
+ 939
+ 940
+ 941
+ 942
+ 943
+ 944
+ 945
+ 946
+ 947
+ 948
+ 949
+ 950
+ 951
+ 952
+ 953
+ 954
+ 955
+ 956
+ 957
+ 958
+ 959
+ 960
+ 961
+ 962
+ 963
+ 964
+ 965
+ 966
+ 967
+ 968
+ 969
+ 970
+ 971
+ 972
+ 973
+ 974
+ 975
+ 976
+ 977
+ 978
+ 979
+ 980
+ 981
+ 982
+ 983
+ 984
+ 985
+ 986
+ 987
+ 988
+ 989
+ 990
+ 991
+ 992
+ 993
+ 994
+ 995
+ 996
+ 997
+ 998
+ 999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+
+//! An `Instance` contains all the runtime state used by execution of a
+//! wasm module (except its callstack and register state). An
+//! `InstanceHandle` is a reference-counting handle for an `Instance`.
+
+use crate::export::Export;
+use crate::imports::Imports;
+use crate::jit_int::GdbJitImageRegistration;
+use crate::memory::LinearMemory;
+use crate::signalhandlers;
+use crate::table::Table;
+use crate::traphandlers::{catch_traps, Trap};
+use crate::vmcontext::{
+    VMBuiltinFunctionsArray, VMCallerCheckedAnyfunc, VMContext, VMFunctionBody, VMFunctionImport,
+    VMGlobalDefinition, VMGlobalImport, VMMemoryDefinition, VMMemoryImport, VMSharedSignatureIndex,
+    VMTableDefinition, VMTableImport,
+};
+use crate::TrapRegistration;
+use memoffset::offset_of;
+use more_asserts::assert_lt;
+use std::alloc::{self, Layout};
+use std::any::Any;
+use std::cell::Cell;
+use std::collections::HashSet;
+use std::convert::TryFrom;
+use std::rc::Rc;
+use std::sync::Arc;
+use std::{mem, ptr, slice};
+use thiserror::Error;
+use wasmtime_environ::entity::{BoxedSlice, EntityRef, PrimaryMap};
+use wasmtime_environ::wasm::{
+    DefinedFuncIndex, DefinedGlobalIndex, DefinedMemoryIndex, DefinedTableIndex, FuncIndex,
+    GlobalIndex, GlobalInit, MemoryIndex, SignatureIndex, TableIndex,
+};
+use wasmtime_environ::{DataInitializer, Module, TableElements, VMOffsets};
+
+cfg_if::cfg_if! {
+    if #[cfg(unix)] {
+        pub type SignalHandler = dyn Fn(libc::c_int, *const libc::siginfo_t, *const libc::c_void) -> bool;
+
+        impl InstanceHandle {
+            /// Set a custom signal handler
+            pub fn set_signal_handler<H>(&mut self, handler: H)
+            where
+                H: 'static + Fn(libc::c_int, *const libc::siginfo_t, *const libc::c_void) -> bool,
+            {
+                self.instance().signal_handler.set(Some(Box::new(handler)));
+            }
+        }
+    } else if #[cfg(target_os = "windows")] {
+        pub type SignalHandler = dyn Fn(winapi::um::winnt::PEXCEPTION_POINTERS) -> bool;
+
+        impl InstanceHandle {
+            /// Set a custom signal handler
+            pub fn set_signal_handler<H>(&mut self, handler: H)
+            where
+                H: 'static + Fn(winapi::um::winnt::PEXCEPTION_POINTERS) -> bool,
+            {
+                self.instance().signal_handler.set(Some(Box::new(handler)));
+            }
+        }
+    }
+}
+
+/// A WebAssembly instance.
+///
+/// This is repr(C) to ensure that the vmctx field is last.
+#[repr(C)]
+pub(crate) struct Instance {
+    /// The number of references to this `Instance`.
+    refcount: Cell<usize>,
+
+    /// `Instance`s from which this `Instance` imports. These won't
+    /// create reference cycles because wasm instances can't cyclically
+    /// import from each other.
+    dependencies: HashSet<InstanceHandle>,
+
+    /// The `Module` this `Instance` was instantiated from.
+    module: Arc<Module>,
+
+    /// Offsets in the `vmctx` region.
+    offsets: VMOffsets,
+
+    /// WebAssembly linear memory data.
+    memories: BoxedSlice<DefinedMemoryIndex, LinearMemory>,
+
+    /// WebAssembly table data.
+    tables: BoxedSlice<DefinedTableIndex, Table>,
+
+    /// Pointers to functions in executable memory.
+    finished_functions: BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]>,
+
+    /// Hosts can store arbitrary per-instance information here.
+    host_state: Box<dyn Any>,
+
+    /// Optional image of JIT'ed code for debugger registration.
+    dbg_jit_registration: Option<Rc<GdbJitImageRegistration>>,
+
+    /// Handler run when `SIGBUS`, `SIGFPE`, `SIGILL`, or `SIGSEGV` are caught by the instance thread.
+    pub(crate) signal_handler: Cell<Option<Box<SignalHandler>>>,
+
+    /// Handle to our registration of traps so signals know what trap to return
+    /// when a segfault/sigill happens.
+    pub(crate) trap_registration: TrapRegistration,
+
+    /// Additional context used by compiled wasm code. This field is last, and
+    /// represents a dynamically-sized array that extends beyond the nominal
+    /// end of the struct (similar to a flexible array member).
+    vmctx: VMContext,
+}
+
+#[allow(clippy::cast_ptr_alignment)]
+impl Instance {
+    /// Helper function to access various locations offset from our `*mut
+    /// VMContext` object.
+    unsafe fn vmctx_plus_offset<T>(&self, offset: u32) -> *mut T {
+        (self.vmctx_ptr() as *mut u8)
+            .add(usize::try_from(offset).unwrap())
+            .cast()
+    }
+
+    /// Return the indexed `VMSharedSignatureIndex`.
+    fn signature_id(&self, index: SignatureIndex) -> VMSharedSignatureIndex {
+        let index = usize::try_from(index.as_u32()).unwrap();
+        unsafe { *self.signature_ids_ptr().add(index) }
+    }
+
+    /// Return a pointer to the `VMSharedSignatureIndex`s.
+    fn signature_ids_ptr(&self) -> *mut VMSharedSignatureIndex {
+        unsafe { self.vmctx_plus_offset(self.offsets.vmctx_signature_ids_begin()) }
+    }
+
+    /// Return the indexed `VMFunctionImport`.
+    fn imported_function(&self, index: FuncIndex) -> &VMFunctionImport {
+        let index = usize::try_from(index.as_u32()).unwrap();
+        unsafe { &*self.imported_functions_ptr().add(index) }
+    }
+
+    /// Return a pointer to the `VMFunctionImport`s.
+    fn imported_functions_ptr(&self) -> *mut VMFunctionImport {
+        unsafe { self.vmctx_plus_offset(self.offsets.vmctx_imported_functions_begin()) }
+    }
+
+    /// Return the index `VMTableImport`.
+    fn imported_table(&self, index: TableIndex) -> &VMTableImport {
+        let index = usize::try_from(index.as_u32()).unwrap();
+        unsafe { &*self.imported_tables_ptr().add(index) }
+    }
+
+    /// Return a pointer to the `VMTableImports`s.
+    fn imported_tables_ptr(&self) -> *mut VMTableImport {
+        unsafe { self.vmctx_plus_offset(self.offsets.vmctx_imported_tables_begin()) }
+    }
+
+    /// Return the indexed `VMMemoryImport`.
+    fn imported_memory(&self, index: MemoryIndex) -> &VMMemoryImport {
+        let index = usize::try_from(index.as_u32()).unwrap();
+        unsafe { &*self.imported_memories_ptr().add(index) }
+    }
+
+    /// Return a pointer to the `VMMemoryImport`s.
+    fn imported_memories_ptr(&self) -> *mut VMMemoryImport {
+        unsafe { self.vmctx_plus_offset(self.offsets.vmctx_imported_memories_begin()) }
+    }
+
+    /// Return the indexed `VMGlobalImport`.
+    fn imported_global(&self, index: GlobalIndex) -> &VMGlobalImport {
+        let index = usize::try_from(index.as_u32()).unwrap();
+        unsafe { &*self.imported_globals_ptr().add(index) }
+    }
+
+    /// Return a pointer to the `VMGlobalImport`s.
+    fn imported_globals_ptr(&self) -> *mut VMGlobalImport {
+        unsafe { self.vmctx_plus_offset(self.offsets.vmctx_imported_globals_begin()) }
+    }
+
+    /// Return the indexed `VMTableDefinition`.
+    #[allow(dead_code)]
+    fn table(&self, index: DefinedTableIndex) -> VMTableDefinition {
+        unsafe { *self.table_ptr(index) }
+    }
+
+    /// Updates the value for a defined table to `VMTableDefinition`.
+    fn set_table(&self, index: DefinedTableIndex, table: VMTableDefinition) {
+        unsafe {
+            *self.table_ptr(index) = table;
+        }
+    }
+
+    /// Return the indexed `VMTableDefinition`.
+    fn table_ptr(&self, index: DefinedTableIndex) -> *mut VMTableDefinition {
+        let index = usize::try_from(index.as_u32()).unwrap();
+        unsafe { self.tables_ptr().add(index) }
+    }
+
+    /// Return a pointer to the `VMTableDefinition`s.
+    fn tables_ptr(&self) -> *mut VMTableDefinition {
+        unsafe { self.vmctx_plus_offset(self.offsets.vmctx_tables_begin()) }
+    }
+
+    /// Return the indexed `VMMemoryDefinition`.
+    fn memory(&self, index: DefinedMemoryIndex) -> VMMemoryDefinition {
+        unsafe { *self.memory_ptr(index) }
+    }
+
+    /// Set the indexed memory to `VMMemoryDefinition`.
+    fn set_memory(&self, index: DefinedMemoryIndex, mem: VMMemoryDefinition) {
+        unsafe {
+            *self.memory_ptr(index) = mem;
+        }
+    }
+
+    /// Return the indexed `VMMemoryDefinition`.
+    fn memory_ptr(&self, index: DefinedMemoryIndex) -> *mut VMMemoryDefinition {
+        let index = usize::try_from(index.as_u32()).unwrap();
+        unsafe { self.memories_ptr().add(index) }
+    }
+
+    /// Return a pointer to the `VMMemoryDefinition`s.
+    fn memories_ptr(&self) -> *mut VMMemoryDefinition {
+        unsafe { self.vmctx_plus_offset(self.offsets.vmctx_memories_begin()) }
+    }
+
+    /// Return the indexed `VMGlobalDefinition`.
+    fn global(&self, index: DefinedGlobalIndex) -> VMGlobalDefinition {
+        unsafe { *self.global_ptr(index) }
+    }
+
+    /// Set the indexed global to `VMGlobalDefinition`.
+    #[allow(dead_code)]
+    fn set_global(&self, index: DefinedGlobalIndex, global: VMGlobalDefinition) {
+        unsafe {
+            *self.global_ptr(index) = global;
+        }
+    }
+
+    /// Return the indexed `VMGlobalDefinition`.
+    fn global_ptr(&self, index: DefinedGlobalIndex) -> *mut VMGlobalDefinition {
+        let index = usize::try_from(index.as_u32()).unwrap();
+        unsafe { self.globals_ptr().add(index) }
+    }
+
+    /// Return a pointer to the `VMGlobalDefinition`s.
+    fn globals_ptr(&self) -> *mut VMGlobalDefinition {
+        unsafe { self.vmctx_plus_offset(self.offsets.vmctx_globals_begin()) }
+    }
+
+    /// Return a pointer to the `VMBuiltinFunctionsArray`.
+    fn builtin_functions_ptr(&self) -> *mut VMBuiltinFunctionsArray {
+        unsafe { self.vmctx_plus_offset(self.offsets.vmctx_builtin_functions_begin()) }
+    }
+
+    /// Return a reference to the vmctx used by compiled wasm code.
+    pub fn vmctx(&self) -> &VMContext {
+        &self.vmctx
+    }
+
+    /// Return a raw pointer to the vmctx used by compiled wasm code.
+    pub fn vmctx_ptr(&self) -> *mut VMContext {
+        self.vmctx() as *const VMContext as *mut VMContext
+    }
+
+    /// Lookup an export with the given name.
+    pub fn lookup(&self, field: &str) -> Option<Export> {
+        let export = if let Some(export) = self.module.exports.get(field) {
+            export.clone()
+        } else {
+            return None;
+        };
+        Some(self.lookup_by_declaration(&export))
+    }
+
+    /// Lookup an export with the given export declaration.
+    pub fn lookup_by_declaration(&self, export: &wasmtime_environ::Export) -> Export {
+        match export {
+            wasmtime_environ::Export::Function(index) => {
+                let signature = self.module.signatures[self.module.functions[*index]].clone();
+                let (address, vmctx) =
+                    if let Some(def_index) = self.module.defined_func_index(*index) {
+                        (
+                            self.finished_functions[def_index] as *const _,
+                            self.vmctx_ptr(),
+                        )
+                    } else {
+                        let import = self.imported_function(*index);
+                        (import.body, import.vmctx)
+                    };
+                Export::Function {
+                    address,
+                    signature,
+                    vmctx,
+                }
+            }
+            wasmtime_environ::Export::Table(index) => {
+                let (definition, vmctx) =
+                    if let Some(def_index) = self.module.defined_table_index(*index) {
+                        (self.table_ptr(def_index), self.vmctx_ptr())
+                    } else {
+                        let import = self.imported_table(*index);
+                        (import.from, import.vmctx)
+                    };
+                Export::Table {
+                    definition,
+                    vmctx,
+                    table: self.module.table_plans[*index].clone(),
+                }
+            }
+            wasmtime_environ::Export::Memory(index) => {
+                let (definition, vmctx) =
+                    if let Some(def_index) = self.module.defined_memory_index(*index) {
+                        (self.memory_ptr(def_index), self.vmctx_ptr())
+                    } else {
+                        let import = self.imported_memory(*index);
+                        (import.from, import.vmctx)
+                    };
+                Export::Memory {
+                    definition,
+                    vmctx,
+                    memory: self.module.memory_plans[*index].clone(),
+                }
+            }
+            wasmtime_environ::Export::Global(index) => Export::Global {
+                definition: if let Some(def_index) = self.module.defined_global_index(*index) {
+                    self.global_ptr(def_index)
+                } else {
+                    self.imported_global(*index).from
+                },
+                vmctx: self.vmctx_ptr(),
+                global: self.module.globals[*index],
+            },
+        }
+    }
+
+    /// Return an iterator over the exports of this instance.
+    ///
+    /// Specifically, it provides access to the key-value pairs, where they keys
+    /// are export names, and the values are export declarations which can be
+    /// resolved `lookup_by_declaration`.
+    pub fn exports(&self) -> indexmap::map::Iter<String, wasmtime_environ::Export> {
+        self.module.exports.iter()
+    }
+
+    /// Return a reference to the custom state attached to this instance.
+    pub fn host_state(&self) -> &dyn Any {
+        &*self.host_state
+    }
+
+    /// Invoke the WebAssembly start function of the instance, if one is present.
+    fn invoke_start_function(&self) -> Result<(), InstantiationError> {
+        let start_index = match self.module.start_func {
+            Some(idx) => idx,
+            None => return Ok(()),
+        };
+
+        let (callee_address, callee_vmctx) = match self.module.defined_func_index(start_index) {
+            Some(defined_index) => {
+                let body = *self
+                    .finished_functions
+                    .get(defined_index)
+                    .expect("function index is out of bounds");
+                (body as *const _, self.vmctx_ptr())
+            }
+            None => {
+                assert_lt!(start_index.index(), self.module.imported_funcs.len());
+                let import = self.imported_function(start_index);
+                (import.body, import.vmctx)
+            }
+        };
+
+        // Make the call.
+        unsafe {
+            catch_traps(callee_vmctx, || {
+                mem::transmute::<
+                    *const VMFunctionBody,
+                    unsafe extern "C" fn(*mut VMContext, *mut VMContext),
+                >(callee_address)(callee_vmctx, self.vmctx_ptr())
+            })
+            .map_err(InstantiationError::StartTrap)
+        }
+    }
+
+    /// Return the offset from the vmctx pointer to its containing Instance.
+    pub(crate) fn vmctx_offset() -> isize {
+        offset_of!(Self, vmctx) as isize
+    }
+
+    /// Return the table index for the given `VMTableDefinition`.
+    pub(crate) fn table_index(&self, table: &VMTableDefinition) -> DefinedTableIndex {
+        let offsets = &self.offsets;
+        let begin = unsafe {
+            (&self.vmctx as *const VMContext as *const u8)
+                .add(usize::try_from(offsets.vmctx_tables_begin()).unwrap())
+        } as *const VMTableDefinition;
+        let end: *const VMTableDefinition = table;
+        // TODO: Use `offset_from` once it stablizes.
+        let index = DefinedTableIndex::new(
+            (end as usize - begin as usize) / mem::size_of::<VMTableDefinition>(),
+        );
+        assert_lt!(index.index(), self.tables.len());
+        index
+    }
+
+    /// Return the memory index for the given `VMMemoryDefinition`.
+    pub(crate) fn memory_index(&self, memory: &VMMemoryDefinition) -> DefinedMemoryIndex {
+        let offsets = &self.offsets;
+        let begin = unsafe {
+            (&self.vmctx as *const VMContext as *const u8)
+                .add(usize::try_from(offsets.vmctx_memories_begin()).unwrap())
+        } as *const VMMemoryDefinition;
+        let end: *const VMMemoryDefinition = memory;
+        // TODO: Use `offset_from` once it stablizes.
+        let index = DefinedMemoryIndex::new(
+            (end as usize - begin as usize) / mem::size_of::<VMMemoryDefinition>(),
+        );
+        assert_lt!(index.index(), self.memories.len());
+        index
+    }
+
+    /// Grow memory by the specified amount of pages.
+    ///
+    /// Returns `None` if memory can't be grown by the specified amount
+    /// of pages.
+    pub(crate) fn memory_grow(&self, memory_index: DefinedMemoryIndex, delta: u32) -> Option<u32> {
+        let result = self
+            .memories
+            .get(memory_index)
+            .unwrap_or_else(|| panic!("no memory for index {}", memory_index.index()))
+            .grow(delta);
+
+        // Keep current the VMContext pointers used by compiled wasm code.
+        self.set_memory(memory_index, self.memories[memory_index].vmmemory());
+
+        result
+    }
+
+    /// Grow imported memory by the specified amount of pages.
+    ///
+    /// Returns `None` if memory can't be grown by the specified amount
+    /// of pages.
+    ///
+    /// # Safety
+    /// This and `imported_memory_size` are currently unsafe because they
+    /// dereference the memory import's pointers.
+    pub(crate) unsafe fn imported_memory_grow(
+        &self,
+        memory_index: MemoryIndex,
+        delta: u32,
+    ) -> Option<u32> {
+        let import = self.imported_memory(memory_index);
+        let foreign_instance = (&*import.vmctx).instance();
+        let foreign_memory = &*import.from;
+        let foreign_index = foreign_instance.memory_index(foreign_memory);
+
+        foreign_instance.memory_grow(foreign_index, delta)
+    }
+
+    /// Returns the number of allocated wasm pages.
+    pub(crate) fn memory_size(&self, memory_index: DefinedMemoryIndex) -> u32 {
+        self.memories
+            .get(memory_index)
+            .unwrap_or_else(|| panic!("no memory for index {}", memory_index.index()))
+            .size()
+    }
+
+    /// Returns the number of allocated wasm pages in an imported memory.
+    ///
+    /// # Safety
+    /// This and `imported_memory_grow` are currently unsafe because they
+    /// dereference the memory import's pointers.
+    pub(crate) unsafe fn imported_memory_size(&self, memory_index: MemoryIndex) -> u32 {
+        let import = self.imported_memory(memory_index);
+        let foreign_instance = (&mut *import.vmctx).instance();
+        let foreign_memory = &mut *import.from;
+        let foreign_index = foreign_instance.memory_index(foreign_memory);
+
+        foreign_instance.memory_size(foreign_index)
+    }
+
+    /// Grow table by the specified amount of elements.
+    ///
+    /// Returns `None` if table can't be grown by the specified amount
+    /// of elements.
+    pub(crate) fn table_grow(&self, table_index: DefinedTableIndex, delta: u32) -> Option<u32> {
+        let result = self
+            .tables
+            .get(table_index)
+            .unwrap_or_else(|| panic!("no table for index {}", table_index.index()))
+            .grow(delta);
+
+        // Keep current the VMContext pointers used by compiled wasm code.
+        self.set_table(table_index, self.tables[table_index].vmtable());
+
+        result
+    }
+
+    // Get table element by index.
+    fn table_get(
+        &self,
+        table_index: DefinedTableIndex,
+        index: u32,
+    ) -> Option<VMCallerCheckedAnyfunc> {
+        self.tables
+            .get(table_index)
+            .unwrap_or_else(|| panic!("no table for index {}", table_index.index()))
+            .get(index)
+    }
+
+    fn table_set(
+        &self,
+        table_index: DefinedTableIndex,
+        index: u32,
+        val: VMCallerCheckedAnyfunc,
+    ) -> Result<(), ()> {
+        self.tables
+            .get(table_index)
+            .unwrap_or_else(|| panic!("no table for index {}", table_index.index()))
+            .set(index, val)
+    }
+
+    fn alloc_layout(&self) -> Layout {
+        let size = mem::size_of_val(self)
+            .checked_add(usize::try_from(self.offsets.size_of_vmctx()).unwrap())
+            .unwrap();
+        let align = mem::align_of_val(self);
+        Layout::from_size_align(size, align).unwrap()
+    }
+}
+
+/// A handle holding an `Instance` of a WebAssembly module.
+#[derive(Hash, PartialEq, Eq)]
+pub struct InstanceHandle {
+    instance: *mut Instance,
+}
+
+impl InstanceHandle {
+    /// Create a new `InstanceHandle` pointing at a new `Instance`.
+    ///
+    /// # Unsafety
+    ///
+    /// This method is not necessarily inherently unsafe to call, but in general
+    /// the APIs of an `Instance` are quite unsafe and have not been really
+    /// audited for safety that much. As a result the unsafety here on this
+    /// method is a low-overhead way of saying "this is an extremely unsafe type
+    /// to work with".
+    ///
+    /// Extreme care must be taken when working with `InstanceHandle` and it's
+    /// recommended to have relatively intimate knowledge of how it works
+    /// internally if you'd like to do so. If possible it's recommended to use
+    /// the `wasmtime` crate API rather than this type since that is vetted for
+    /// safety.
+    pub unsafe fn new(
+        module: Arc<Module>,
+        trap_registration: TrapRegistration,
+        finished_functions: BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]>,
+        imports: Imports,
+        data_initializers: &[DataInitializer<'_>],
+        vmshared_signatures: BoxedSlice<SignatureIndex, VMSharedSignatureIndex>,
+        dbg_jit_registration: Option<Rc<GdbJitImageRegistration>>,
+        host_state: Box<dyn Any>,
+    ) -> Result<Self, InstantiationError> {
+        let tables = create_tables(&module);
+        let memories = create_memories(&module)?;
+
+        let vmctx_tables = tables
+            .values()
+            .map(Table::vmtable)
+            .collect::<PrimaryMap<DefinedTableIndex, _>>()
+            .into_boxed_slice();
+
+        let vmctx_memories = memories
+            .values()
+            .map(LinearMemory::vmmemory)
+            .collect::<PrimaryMap<DefinedMemoryIndex, _>>()
+            .into_boxed_slice();
+
+        let vmctx_globals = create_globals(&module);
+
+        let offsets = VMOffsets::new(mem::size_of::<*const u8>() as u8, &module);
+
+        let handle = {
+            let instance = Instance {
+                refcount: Cell::new(1),
+                dependencies: imports.dependencies,
+                module,
+                offsets,
+                memories,
+                tables,
+                finished_functions,
+                dbg_jit_registration,
+                host_state,
+                signal_handler: Cell::new(None),
+                trap_registration,
+                vmctx: VMContext {},
+            };
+            let layout = instance.alloc_layout();
+            let instance_ptr = alloc::alloc(layout) as *mut Instance;
+            if instance_ptr.is_null() {
+                alloc::handle_alloc_error(layout);
+            }
+            ptr::write(instance_ptr, instance);
+            InstanceHandle {
+                instance: instance_ptr,
+            }
+        };
+        let instance = handle.instance();
+
+        ptr::copy(
+            vmshared_signatures.values().as_slice().as_ptr(),
+            instance.signature_ids_ptr() as *mut VMSharedSignatureIndex,
+            vmshared_signatures.len(),
+        );
+        ptr::copy(
+            imports.functions.values().as_slice().as_ptr(),
+            instance.imported_functions_ptr() as *mut VMFunctionImport,
+            imports.functions.len(),
+        );
+        ptr::copy(
+            imports.tables.values().as_slice().as_ptr(),
+            instance.imported_tables_ptr() as *mut VMTableImport,
+            imports.tables.len(),
+        );
+        ptr::copy(
+            imports.memories.values().as_slice().as_ptr(),
+            instance.imported_memories_ptr() as *mut VMMemoryImport,
+            imports.memories.len(),
+        );
+        ptr::copy(
+            imports.globals.values().as_slice().as_ptr(),
+            instance.imported_globals_ptr() as *mut VMGlobalImport,
+            imports.globals.len(),
+        );
+        ptr::copy(
+            vmctx_tables.values().as_slice().as_ptr(),
+            instance.tables_ptr() as *mut VMTableDefinition,
+            vmctx_tables.len(),
+        );
+        ptr::copy(
+            vmctx_memories.values().as_slice().as_ptr(),
+            instance.memories_ptr() as *mut VMMemoryDefinition,
+            vmctx_memories.len(),
+        );
+        ptr::copy(
+            vmctx_globals.values().as_slice().as_ptr(),
+            instance.globals_ptr() as *mut VMGlobalDefinition,
+            vmctx_globals.len(),
+        );
+        ptr::write(
+            instance.builtin_functions_ptr() as *mut VMBuiltinFunctionsArray,
+            VMBuiltinFunctionsArray::initialized(),
+        );
+
+        // Check initializer bounds before initializing anything.
+        check_table_init_bounds(instance)?;
+        check_memory_init_bounds(instance, data_initializers)?;
+
+        // Apply the initializers.
+        initialize_tables(instance)?;
+        initialize_memories(instance, data_initializers)?;
+        initialize_globals(instance);
+
+        // Ensure that our signal handlers are ready for action.
+        // TODO: Move these calls out of `InstanceHandle`.
+        signalhandlers::init();
+
+        // The WebAssembly spec specifies that the start function is
+        // invoked automatically at instantiation time.
+        instance.invoke_start_function()?;
+
+        Ok(handle)
+    }
+
+    /// Create a new `InstanceHandle` pointing at the instance
+    /// pointed to by the given `VMContext` pointer.
+    ///
+    /// # Safety
+    /// This is unsafe because it doesn't work on just any `VMContext`, it must
+    /// be a `VMContext` allocated as part of an `Instance`.
+    pub unsafe fn from_vmctx(vmctx: *mut VMContext) -> Self {
+        let instance = (&mut *vmctx).instance();
+        instance.refcount.set(instance.refcount.get() + 1);
+        Self {
+            instance: instance as *const Instance as *mut Instance,
+        }
+    }
+
+    /// Return a reference to the vmctx used by compiled wasm code.
+    pub fn vmctx(&self) -> &VMContext {
+        self.instance().vmctx()
+    }
+
+    /// Return a raw pointer to the vmctx used by compiled wasm code.
+    pub fn vmctx_ptr(&self) -> *mut VMContext {
+        self.instance().vmctx_ptr()
+    }
+
+    /// Return a reference-counting pointer to a module.
+    pub fn module(&self) -> &Arc<Module> {
+        &self.instance().module
+    }
+
+    /// Return a reference to a module.
+    pub fn module_ref(&self) -> &Module {
+        &self.instance().module
+    }
+
+    /// Lookup an export with the given name.
+    pub fn lookup(&self, field: &str) -> Option<Export> {
+        self.instance().lookup(field)
+    }
+
+    /// Lookup an export with the given export declaration.
+    pub fn lookup_by_declaration(&self, export: &wasmtime_environ::Export) -> Export {
+        self.instance().lookup_by_declaration(export)
+    }
+
+    /// Return an iterator over the exports of this instance.
+    ///
+    /// Specifically, it provides access to the key-value pairs, where the keys
+    /// are export names, and the values are export declarations which can be
+    /// resolved `lookup_by_declaration`.
+    pub fn exports(&self) -> indexmap::map::Iter<String, wasmtime_environ::Export> {
+        self.instance().exports()
+    }
+
+    /// Return a reference to the custom state attached to this instance.
+    pub fn host_state(&self) -> &dyn Any {
+        self.instance().host_state()
+    }
+
+    /// Return the memory index for the given `VMMemoryDefinition` in this instance.
+    pub fn memory_index(&self, memory: &VMMemoryDefinition) -> DefinedMemoryIndex {
+        self.instance().memory_index(memory)
+    }
+
+    /// Grow memory in this instance by the specified amount of pages.
+    ///
+    /// Returns `None` if memory can't be grown by the specified amount
+    /// of pages.
+    pub fn memory_grow(&self, memory_index: DefinedMemoryIndex, delta: u32) -> Option<u32> {
+        self.instance().memory_grow(memory_index, delta)
+    }
+
+    /// Return the table index for the given `VMTableDefinition` in this instance.
+    pub fn table_index(&self, table: &VMTableDefinition) -> DefinedTableIndex {
+        self.instance().table_index(table)
+    }
+
+    /// Grow table in this instance by the specified amount of pages.
+    ///
+    /// Returns `None` if memory can't be grown by the specified amount
+    /// of pages.
+    pub fn table_grow(&self, table_index: DefinedTableIndex, delta: u32) -> Option<u32> {
+        self.instance().table_grow(table_index, delta)
+    }
+
+    /// Get table element reference.
+    ///
+    /// Returns `None` if index is out of bounds.
+    pub fn table_get(
+        &self,
+        table_index: DefinedTableIndex,
+        index: u32,
+    ) -> Option<VMCallerCheckedAnyfunc> {
+        self.instance().table_get(table_index, index)
+    }
+
+    /// Set table element reference.
+    ///
+    /// Returns an error if the index is out of bounds
+    pub fn table_set(
+        &self,
+        table_index: DefinedTableIndex,
+        index: u32,
+        val: VMCallerCheckedAnyfunc,
+    ) -> Result<(), ()> {
+        self.instance().table_set(table_index, index, val)
+    }
+
+    /// Return a reference to the contained `Instance`.
+    pub(crate) fn instance(&self) -> &Instance {
+        unsafe { &*(self.instance as *const Instance) }
+    }
+}
+
+impl Clone for InstanceHandle {
+    fn clone(&self) -> Self {
+        let instance = self.instance();
+        instance.refcount.set(instance.refcount.get() + 1);
+        Self {
+            instance: self.instance,
+        }
+    }
+}
+
+impl Drop for InstanceHandle {
+    fn drop(&mut self) {
+        let instance = self.instance();
+        let count = instance.refcount.get();
+        instance.refcount.set(count - 1);
+        if count == 1 {
+            let layout = instance.alloc_layout();
+            unsafe {
+                ptr::drop_in_place(self.instance);
+                alloc::dealloc(self.instance.cast(), layout);
+            }
+        }
+    }
+}
+
+fn check_table_init_bounds(instance: &Instance) -> Result<(), InstantiationError> {
+    let module = Arc::clone(&instance.module);
+    for init in &module.table_elements {
+        let start = get_table_init_start(init, instance);
+        let table = get_table(init, instance);
+
+        let size = usize::try_from(table.size()).unwrap();
+        if size < start + init.elements.len() {
+            return Err(InstantiationError::Link(LinkError(
+                "elements segment does not fit".to_owned(),
+            )));
+        }
+    }
+
+    Ok(())
+}
+
+/// Compute the offset for a memory data initializer.
+fn get_memory_init_start(init: &DataInitializer<'_>, instance: &Instance) -> usize {
+    let mut start = init.location.offset;
+
+    if let Some(base) = init.location.base {
+        let val = unsafe {
+            if let Some(def_index) = instance.module.defined_global_index(base) {
+                *instance.global(def_index).as_u32()
+            } else {
+                *(*instance.imported_global(base).from).as_u32()
+            }
+        };
+        start += usize::try_from(val).unwrap();
+    }
+
+    start
+}
+
+/// Return a byte-slice view of a memory's data.
+unsafe fn get_memory_slice<'instance>(
+    init: &DataInitializer<'_>,
+    instance: &'instance Instance,
+) -> &'instance mut [u8] {
+    let memory = if let Some(defined_memory_index) = instance
+        .module
+        .defined_memory_index(init.location.memory_index)
+    {
+        instance.memory(defined_memory_index)
+    } else {
+        let import = instance.imported_memory(init.location.memory_index);
+        let foreign_instance = (&mut *(import).vmctx).instance();
+        let foreign_memory = &mut *(import).from;
+        let foreign_index = foreign_instance.memory_index(foreign_memory);
+        foreign_instance.memory(foreign_index)
+    };
+    slice::from_raw_parts_mut(memory.base, memory.current_length)
+}
+
+fn check_memory_init_bounds(
+    instance: &Instance,
+    data_initializers: &[DataInitializer<'_>],
+) -> Result<(), InstantiationError> {
+    for init in data_initializers {
+        let start = get_memory_init_start(init, instance);
+        unsafe {
+            let mem_slice = get_memory_slice(init, instance);
+            if mem_slice.get_mut(start..start + init.data.len()).is_none() {
+                return Err(InstantiationError::Link(LinkError(
+                    "data segment does not fit".to_owned(),
+                )));
+            }
+        }
+    }
+
+    Ok(())
+}
+
+/// Allocate memory for just the tables of the current module.
+fn create_tables(module: &Module) -> BoxedSlice<DefinedTableIndex, Table> {
+    let num_imports = module.imported_tables.len();
+    let mut tables: PrimaryMap<DefinedTableIndex, _> =
+        PrimaryMap::with_capacity(module.table_plans.len() - num_imports);
+    for table in &module.table_plans.values().as_slice()[num_imports..] {
+        tables.push(Table::new(table));
+    }
+    tables.into_boxed_slice()
+}
+
+/// Compute the offset for a table element initializer.
+fn get_table_init_start(init: &TableElements, instance: &Instance) -> usize {
+    let mut start = init.offset;
+
+    if let Some(base) = init.base {
+        let val = unsafe {
+            if let Some(def_index) = instance.module.defined_global_index(base) {
+                *instance.global(def_index).as_u32()
+            } else {
+                *(*instance.imported_global(base).from).as_u32()
+            }
+        };
+        start += usize::try_from(val).unwrap();
+    }
+
+    start
+}
+
+/// Return a byte-slice view of a table's data.
+fn get_table<'instance>(init: &TableElements, instance: &'instance Instance) -> &'instance Table {
+    if let Some(defined_table_index) = instance.module.defined_table_index(init.table_index) {
+        &instance.tables[defined_table_index]
+    } else {
+        let import = instance.imported_table(init.table_index);
+        let foreign_instance = unsafe { (&mut *(import).vmctx).instance() };
+        let foreign_table = unsafe { &mut *(import).from };
+        let foreign_index = foreign_instance.table_index(foreign_table);
+        &foreign_instance.tables[foreign_index]
+    }
+}
+
+/// Initialize the table memory from the provided initializers.
+fn initialize_tables(instance: &Instance) -> Result<(), InstantiationError> {
+    let vmctx = instance.vmctx_ptr();
+    let module = Arc::clone(&instance.module);
+    for init in &module.table_elements {
+        let start = get_table_init_start(init, instance);
+        let table = get_table(init, instance);
+
+        for (i, func_idx) in init.elements.iter().enumerate() {
+            let callee_sig = instance.module.functions[*func_idx];
+            let (callee_ptr, callee_vmctx) =
+                if let Some(index) = instance.module.defined_func_index(*func_idx) {
+                    (instance.finished_functions[index] as *const _, vmctx)
+                } else {
+                    let imported_func = instance.imported_function(*func_idx);
+                    (imported_func.body, imported_func.vmctx)
+                };
+            let type_index = instance.signature_id(callee_sig);
+            table
+                .set(
+                    u32::try_from(start + i).unwrap(),
+                    VMCallerCheckedAnyfunc {
+                        func_ptr: callee_ptr,
+                        type_index,
+                        vmctx: callee_vmctx,
+                    },
+                )
+                .unwrap();
+        }
+    }
+
+    Ok(())
+}
+
+/// Allocate memory for just the memories of the current module.
+fn create_memories(
+    module: &Module,
+) -> Result<BoxedSlice<DefinedMemoryIndex, LinearMemory>, InstantiationError> {
+    let num_imports = module.imported_memories.len();
+    let mut memories: PrimaryMap<DefinedMemoryIndex, _> =
+        PrimaryMap::with_capacity(module.memory_plans.len() - num_imports);
+    for plan in &module.memory_plans.values().as_slice()[num_imports..] {
+        memories.push(LinearMemory::new(plan).map_err(InstantiationError::Resource)?);
+    }
+    Ok(memories.into_boxed_slice())
+}
+
+/// Initialize the table memory from the provided initializers.
+fn initialize_memories(
+    instance: &Instance,
+    data_initializers: &[DataInitializer<'_>],
+) -> Result<(), InstantiationError> {
+    for init in data_initializers {
+        let start = get_memory_init_start(init, instance);
+        unsafe {
+            let mem_slice = get_memory_slice(init, instance);
+            let to_init = &mut mem_slice[start..start + init.data.len()];
+            to_init.copy_from_slice(init.data);
+        }
+    }
+
+    Ok(())
+}
+
+/// Allocate memory for just the globals of the current module,
+/// with initializers applied.
+fn create_globals(module: &Module) -> BoxedSlice<DefinedGlobalIndex, VMGlobalDefinition> {
+    let num_imports = module.imported_globals.len();
+    let mut vmctx_globals = PrimaryMap::with_capacity(module.globals.len() - num_imports);
+
+    for _ in &module.globals.values().as_slice()[num_imports..] {
+        vmctx_globals.push(VMGlobalDefinition::new());
+    }
+
+    vmctx_globals.into_boxed_slice()
+}
+
+fn initialize_globals(instance: &Instance) {
+    let module = Arc::clone(&instance.module);
+    let num_imports = module.imported_globals.len();
+    for (index, global) in module.globals.iter().skip(num_imports) {
+        let def_index = module.defined_global_index(index).unwrap();
+        unsafe {
+            let to = instance.global_ptr(def_index);
+            match global.initializer {
+                GlobalInit::I32Const(x) => *(*to).as_i32_mut() = x,
+                GlobalInit::I64Const(x) => *(*to).as_i64_mut() = x,
+                GlobalInit::F32Const(x) => *(*to).as_f32_bits_mut() = x,
+                GlobalInit::F64Const(x) => *(*to).as_f64_bits_mut() = x,
+                GlobalInit::V128Const(x) => *(*to).as_u128_bits_mut() = x.0,
+                GlobalInit::GetGlobal(x) => {
+                    let from = if let Some(def_x) = module.defined_global_index(x) {
+                        instance.global(def_x)
+                    } else {
+                        *instance.imported_global(x).from
+                    };
+                    *to = from;
+                }
+                GlobalInit::Import => panic!("locally-defined global initialized as import"),
+                GlobalInit::RefNullConst | GlobalInit::RefFunc(_) => unimplemented!(),
+            }
+        }
+    }
+}
+
+/// An link error while instantiating a module.
+#[derive(Error, Debug)]
+#[error("Link error: {0}")]
+pub struct LinkError(pub String);
+
+/// An error while instantiating a module.
+#[derive(Error, Debug)]
+pub enum InstantiationError {
+    /// Insufficient resources available for execution.
+    #[error("Insufficient resources: {0}")]
+    Resource(String),
+
+    /// A wasm link error occured.
+    #[error("Failed to link module")]
+    Link(#[from] LinkError),
+
+    /// A compilation error occured.
+    #[error("Trap occurred while invoking start function")]
+    StartTrap(#[source] Trap),
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/jit_int.rs.html b/api/src/wasmtime_runtime/jit_int.rs.html new file mode 100644 index 000000000000..25e9b8c950d6 --- /dev/null +++ b/api/src/wasmtime_runtime/jit_int.rs.html @@ -0,0 +1,239 @@ +jit_int.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+
+//! The GDB's JIT compilation interface. The low level module that exposes
+//! the __jit_debug_register_code() and __jit_debug_descriptor to register
+//! or unregister generated object images with debuggers.
+
+use std::ptr;
+
+#[repr(C)]
+struct JITCodeEntry {
+    next_entry: *mut JITCodeEntry,
+    prev_entry: *mut JITCodeEntry,
+    symfile_addr: *const u8,
+    symfile_size: u64,
+}
+
+const JIT_NOACTION: u32 = 0;
+const JIT_REGISTER_FN: u32 = 1;
+const JIT_UNREGISTER_FN: u32 = 2;
+
+#[repr(C)]
+struct JITDescriptor {
+    version: u32,
+    action_flag: u32,
+    relevant_entry: *mut JITCodeEntry,
+    first_entry: *mut JITCodeEntry,
+}
+
+#[no_mangle]
+#[used]
+static mut __jit_debug_descriptor: JITDescriptor = JITDescriptor {
+    version: 1,
+    action_flag: JIT_NOACTION,
+    relevant_entry: ptr::null_mut(),
+    first_entry: ptr::null_mut(),
+};
+
+#[no_mangle]
+#[inline(never)]
+extern "C" fn __jit_debug_register_code() {
+    // Hack to not allow inlining even when Rust wants to do it in release mode.
+    let x = 3;
+    unsafe {
+        std::ptr::read_volatile(&x);
+    }
+}
+
+/// Registeration for JIT image
+pub struct GdbJitImageRegistration {
+    entry: *mut JITCodeEntry,
+    file: Vec<u8>,
+}
+
+impl GdbJitImageRegistration {
+    /// Registers JIT image using __jit_debug_register_code
+    pub fn register(file: Vec<u8>) -> Self {
+        Self {
+            entry: unsafe { register_gdb_jit_image(&file) },
+            file,
+        }
+    }
+
+    /// JIT image used in registration
+    pub fn file(&self) -> &[u8] {
+        &self.file
+    }
+}
+
+impl Drop for GdbJitImageRegistration {
+    fn drop(&mut self) {
+        unsafe {
+            unregister_gdb_jit_image(self.entry);
+        }
+    }
+}
+
+unsafe fn register_gdb_jit_image(file: &[u8]) -> *mut JITCodeEntry {
+    // Create a code entry for the file, which gives the start and size of the symbol file.
+    let entry = Box::into_raw(Box::new(JITCodeEntry {
+        next_entry: __jit_debug_descriptor.first_entry,
+        prev_entry: ptr::null_mut(),
+        symfile_addr: file.as_ptr(),
+        symfile_size: file.len() as u64,
+    }));
+    // Add it to the linked list in the JIT descriptor.
+    if !__jit_debug_descriptor.first_entry.is_null() {
+        (*__jit_debug_descriptor.first_entry).prev_entry = entry;
+    }
+    __jit_debug_descriptor.first_entry = entry;
+    // Point the relevant_entry field of the descriptor at the entry.
+    __jit_debug_descriptor.relevant_entry = entry;
+    // Set action_flag to JIT_REGISTER and call __jit_debug_register_code.
+    __jit_debug_descriptor.action_flag = JIT_REGISTER_FN;
+    __jit_debug_register_code();
+
+    __jit_debug_descriptor.action_flag = JIT_NOACTION;
+    __jit_debug_descriptor.relevant_entry = ptr::null_mut();
+    entry
+}
+
+unsafe fn unregister_gdb_jit_image(entry: *mut JITCodeEntry) {
+    // Remove the code entry corresponding to the code from the linked list.
+    if !(*entry).prev_entry.is_null() {
+        (*(*entry).prev_entry).next_entry = (*entry).next_entry;
+    } else {
+        __jit_debug_descriptor.first_entry = (*entry).next_entry;
+    }
+    if !(*entry).next_entry.is_null() {
+        (*(*entry).next_entry).prev_entry = (*entry).prev_entry;
+    }
+    // Point the relevant_entry field of the descriptor at the code entry.
+    __jit_debug_descriptor.relevant_entry = entry;
+    // Set action_flag to JIT_UNREGISTER and call __jit_debug_register_code.
+    __jit_debug_descriptor.action_flag = JIT_UNREGISTER_FN;
+    __jit_debug_register_code();
+
+    __jit_debug_descriptor.action_flag = JIT_NOACTION;
+    __jit_debug_descriptor.relevant_entry = ptr::null_mut();
+    let _box = Box::from_raw(entry);
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/lib.rs.html b/api/src/wasmtime_runtime/lib.rs.html new file mode 100644 index 000000000000..755a8b72bf01 --- /dev/null +++ b/api/src/wasmtime_runtime/lib.rs.html @@ -0,0 +1,113 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+
+//! Runtime library support for Wasmtime.
+
+#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
+#![warn(unused_import_braces)]
+#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    allow(clippy::new_without_default, clippy::new_without_default)
+)]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    warn(
+        clippy::float_arithmetic,
+        clippy::mut_mut,
+        clippy::nonminimal_bool,
+        clippy::option_map_unwrap_or,
+        clippy::option_map_unwrap_or_else,
+        clippy::print_stdout,
+        clippy::unicode_not_nfc,
+        clippy::use_self
+    )
+)]
+
+mod export;
+mod imports;
+mod instance;
+mod jit_int;
+mod memory;
+mod mmap;
+mod sig_registry;
+mod signalhandlers;
+mod table;
+mod trap_registry;
+mod traphandlers;
+mod vmcontext;
+
+pub mod libcalls;
+
+pub use crate::export::Export;
+pub use crate::imports::Imports;
+pub use crate::instance::{InstanceHandle, InstantiationError, LinkError};
+pub use crate::jit_int::GdbJitImageRegistration;
+pub use crate::mmap::Mmap;
+pub use crate::sig_registry::SignatureRegistry;
+pub use crate::trap_registry::{TrapDescription, TrapRegistration, TrapRegistry};
+pub use crate::traphandlers::resume_panic;
+pub use crate::traphandlers::{catch_traps, raise_user_trap, wasmtime_call_trampoline, Trap};
+pub use crate::vmcontext::{
+    VMCallerCheckedAnyfunc, VMContext, VMFunctionBody, VMFunctionImport, VMGlobalDefinition,
+    VMGlobalImport, VMInvokeArgument, VMMemoryDefinition, VMMemoryImport, VMSharedSignatureIndex,
+    VMTableDefinition, VMTableImport,
+};
+
+/// Version number of this crate.
+pub const VERSION: &str = env!("CARGO_PKG_VERSION");
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/libcalls.rs.html b/api/src/wasmtime_runtime/libcalls.rs.html new file mode 100644 index 000000000000..0fca8d9042ad --- /dev/null +++ b/api/src/wasmtime_runtime/libcalls.rs.html @@ -0,0 +1,281 @@ +libcalls.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+
+//! Runtime library calls. Note that wasm compilers may sometimes perform these
+//! inline rather than calling them, particularly when CPUs have special
+//! instructions which compute them directly.
+
+use crate::vmcontext::VMContext;
+use wasmtime_environ::wasm::{DefinedMemoryIndex, MemoryIndex};
+
+/// Implementation of f32.ceil
+pub extern "C" fn wasmtime_f32_ceil(x: f32) -> f32 {
+    x.ceil()
+}
+
+/// Implementation of f32.floor
+pub extern "C" fn wasmtime_f32_floor(x: f32) -> f32 {
+    x.floor()
+}
+
+/// Implementation of f32.trunc
+pub extern "C" fn wasmtime_f32_trunc(x: f32) -> f32 {
+    x.trunc()
+}
+
+/// Implementation of f32.nearest
+#[allow(clippy::float_arithmetic, clippy::float_cmp)]
+pub extern "C" fn wasmtime_f32_nearest(x: f32) -> f32 {
+    // Rust doesn't have a nearest function, so do it manually.
+    if x == 0.0 {
+        // Preserve the sign of zero.
+        x
+    } else {
+        // Nearest is either ceil or floor depending on which is nearest or even.
+        let u = x.ceil();
+        let d = x.floor();
+        let um = (x - u).abs();
+        let dm = (x - d).abs();
+        if um < dm
+            || (um == dm && {
+                let h = u / 2.;
+                h.floor() == h
+            })
+        {
+            u
+        } else {
+            d
+        }
+    }
+}
+
+/// Implementation of f64.ceil
+pub extern "C" fn wasmtime_f64_ceil(x: f64) -> f64 {
+    x.ceil()
+}
+
+/// Implementation of f64.floor
+pub extern "C" fn wasmtime_f64_floor(x: f64) -> f64 {
+    x.floor()
+}
+
+/// Implementation of f64.trunc
+pub extern "C" fn wasmtime_f64_trunc(x: f64) -> f64 {
+    x.trunc()
+}
+
+/// Implementation of f64.nearest
+#[allow(clippy::float_arithmetic, clippy::float_cmp)]
+pub extern "C" fn wasmtime_f64_nearest(x: f64) -> f64 {
+    // Rust doesn't have a nearest function, so do it manually.
+    if x == 0.0 {
+        // Preserve the sign of zero.
+        x
+    } else {
+        // Nearest is either ceil or floor depending on which is nearest or even.
+        let u = x.ceil();
+        let d = x.floor();
+        let um = (x - u).abs();
+        let dm = (x - d).abs();
+        if um < dm
+            || (um == dm && {
+                let h = u / 2.;
+                h.floor() == h
+            })
+        {
+            u
+        } else {
+            d
+        }
+    }
+}
+
+/// Implementation of memory.grow for locally-defined 32-bit memories.
+#[no_mangle]
+pub unsafe extern "C" fn wasmtime_memory32_grow(
+    vmctx: *mut VMContext,
+    delta: u32,
+    memory_index: u32,
+) -> u32 {
+    let instance = (&mut *vmctx).instance();
+    let memory_index = DefinedMemoryIndex::from_u32(memory_index);
+
+    instance
+        .memory_grow(memory_index, delta)
+        .unwrap_or(u32::max_value())
+}
+
+/// Implementation of memory.grow for imported 32-bit memories.
+#[no_mangle]
+pub unsafe extern "C" fn wasmtime_imported_memory32_grow(
+    vmctx: *mut VMContext,
+    delta: u32,
+    memory_index: u32,
+) -> u32 {
+    let instance = (&mut *vmctx).instance();
+    let memory_index = MemoryIndex::from_u32(memory_index);
+
+    instance
+        .imported_memory_grow(memory_index, delta)
+        .unwrap_or(u32::max_value())
+}
+
+/// Implementation of memory.size for locally-defined 32-bit memories.
+#[no_mangle]
+pub unsafe extern "C" fn wasmtime_memory32_size(vmctx: *mut VMContext, memory_index: u32) -> u32 {
+    let instance = (&mut *vmctx).instance();
+    let memory_index = DefinedMemoryIndex::from_u32(memory_index);
+
+    instance.memory_size(memory_index)
+}
+
+/// Implementation of memory.size for imported 32-bit memories.
+#[no_mangle]
+pub unsafe extern "C" fn wasmtime_imported_memory32_size(
+    vmctx: *mut VMContext,
+    memory_index: u32,
+) -> u32 {
+    let instance = (&mut *vmctx).instance();
+    let memory_index = MemoryIndex::from_u32(memory_index);
+
+    instance.imported_memory_size(memory_index)
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/memory.rs.html b/api/src/wasmtime_runtime/memory.rs.html new file mode 100644 index 000000000000..c0212de29c39 --- /dev/null +++ b/api/src/wasmtime_runtime/memory.rs.html @@ -0,0 +1,309 @@ +memory.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+
+//! Memory management for linear memories.
+//!
+//! `LinearMemory` is to WebAssembly linear memories what `Table` is to WebAssembly tables.
+
+use crate::mmap::Mmap;
+use crate::vmcontext::VMMemoryDefinition;
+use more_asserts::{assert_ge, assert_le};
+use std::cell::RefCell;
+use std::convert::TryFrom;
+use wasmtime_environ::{MemoryPlan, MemoryStyle, WASM_MAX_PAGES, WASM_PAGE_SIZE};
+
+/// A linear memory instance.
+#[derive(Debug)]
+pub struct LinearMemory {
+    // The underlying allocation.
+    mmap: RefCell<WasmMmap>,
+
+    // The optional maximum size in wasm pages of this linear memory.
+    maximum: Option<u32>,
+
+    // Size in bytes of extra guard pages after the end to optimize loads and stores with
+    // constant offsets.
+    offset_guard_size: usize,
+
+    // Records whether we're using a bounds-checking strategy which requires
+    // handlers to catch trapping accesses.
+    pub(crate) needs_signal_handlers: bool,
+}
+
+#[derive(Debug)]
+struct WasmMmap {
+    // Our OS allocation of mmap'd memory.
+    alloc: Mmap,
+    // The current logical size in wasm pages of this linear memory.
+    size: u32,
+}
+
+impl LinearMemory {
+    /// Create a new linear memory instance with specified minimum and maximum number of wasm pages.
+    pub fn new(plan: &MemoryPlan) -> Result<Self, String> {
+        // `maximum` cannot be set to more than `65536` pages.
+        assert_le!(plan.memory.minimum, WASM_MAX_PAGES);
+        assert!(plan.memory.maximum.is_none() || plan.memory.maximum.unwrap() <= WASM_MAX_PAGES);
+
+        let offset_guard_bytes = plan.offset_guard_size as usize;
+
+        // If we have an offset guard, or if we're doing the static memory
+        // allocation strategy, we need signal handlers to catch out of bounds
+        // acceses.
+        let needs_signal_handlers = offset_guard_bytes > 0
+            || match plan.style {
+                MemoryStyle::Dynamic => false,
+                MemoryStyle::Static { .. } => true,
+            };
+
+        let minimum_pages = match plan.style {
+            MemoryStyle::Dynamic => plan.memory.minimum,
+            MemoryStyle::Static { bound } => {
+                assert_ge!(bound, plan.memory.minimum);
+                bound
+            }
+        } as usize;
+        let minimum_bytes = minimum_pages.checked_mul(WASM_PAGE_SIZE as usize).unwrap();
+        let request_bytes = minimum_bytes.checked_add(offset_guard_bytes).unwrap();
+        let mapped_pages = plan.memory.minimum as usize;
+        let mapped_bytes = mapped_pages * WASM_PAGE_SIZE as usize;
+
+        let mmap = WasmMmap {
+            alloc: Mmap::accessible_reserved(mapped_bytes, request_bytes)?,
+            size: plan.memory.minimum,
+        };
+
+        Ok(Self {
+            mmap: mmap.into(),
+            maximum: plan.memory.maximum,
+            offset_guard_size: offset_guard_bytes,
+            needs_signal_handlers,
+        })
+    }
+
+    /// Returns the number of allocated wasm pages.
+    pub fn size(&self) -> u32 {
+        self.mmap.borrow().size
+    }
+
+    /// Grow memory by the specified amount of wasm pages.
+    ///
+    /// Returns `None` if memory can't be grown by the specified amount
+    /// of wasm pages.
+    pub fn grow(&self, delta: u32) -> Option<u32> {
+        // Optimization of memory.grow 0 calls.
+        let mut mmap = self.mmap.borrow_mut();
+        if delta == 0 {
+            return Some(mmap.size);
+        }
+
+        let new_pages = match mmap.size.checked_add(delta) {
+            Some(new_pages) => new_pages,
+            // Linear memory size overflow.
+            None => return None,
+        };
+        let prev_pages = mmap.size;
+
+        if let Some(maximum) = self.maximum {
+            if new_pages > maximum {
+                // Linear memory size would exceed the declared maximum.
+                return None;
+            }
+        }
+
+        // Wasm linear memories are never allowed to grow beyond what is
+        // indexable. If the memory has no maximum, enforce the greatest
+        // limit here.
+        if new_pages >= WASM_MAX_PAGES {
+            // Linear memory size would exceed the index range.
+            return None;
+        }
+
+        let delta_bytes = usize::try_from(delta).unwrap() * WASM_PAGE_SIZE as usize;
+        let prev_bytes = usize::try_from(prev_pages).unwrap() * WASM_PAGE_SIZE as usize;
+        let new_bytes = usize::try_from(new_pages).unwrap() * WASM_PAGE_SIZE as usize;
+
+        if new_bytes > mmap.alloc.len() - self.offset_guard_size {
+            // If the new size is within the declared maximum, but needs more memory than we
+            // have on hand, it's a dynamic heap and it can move.
+            let guard_bytes = self.offset_guard_size;
+            let request_bytes = new_bytes.checked_add(guard_bytes)?;
+
+            let mut new_mmap = Mmap::accessible_reserved(new_bytes, request_bytes).ok()?;
+
+            let copy_len = mmap.alloc.len() - self.offset_guard_size;
+            new_mmap.as_mut_slice()[..copy_len].copy_from_slice(&mmap.alloc.as_slice()[..copy_len]);
+
+            mmap.alloc = new_mmap;
+        } else if delta_bytes > 0 {
+            // Make the newly allocated pages accessible.
+            mmap.alloc.make_accessible(prev_bytes, delta_bytes).ok()?;
+        }
+
+        mmap.size = new_pages;
+
+        Some(prev_pages)
+    }
+
+    /// Return a `VMMemoryDefinition` for exposing the memory to compiled wasm code.
+    pub fn vmmemory(&self) -> VMMemoryDefinition {
+        let mut mmap = self.mmap.borrow_mut();
+        VMMemoryDefinition {
+            base: mmap.alloc.as_mut_ptr(),
+            current_length: mmap.size as usize * WASM_PAGE_SIZE as usize,
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/mmap.rs.html b/api/src/wasmtime_runtime/mmap.rs.html new file mode 100644 index 000000000000..115527f87014 --- /dev/null +++ b/api/src/wasmtime_runtime/mmap.rs.html @@ -0,0 +1,581 @@ +mmap.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+
+//! Low-level abstraction for allocating and managing zero-filled pages
+//! of memory.
+
+use more_asserts::assert_le;
+use more_asserts::assert_lt;
+use std::io;
+use std::ptr;
+use std::slice;
+
+/// Round `size` up to the nearest multiple of `page_size`.
+fn round_up_to_page_size(size: usize, page_size: usize) -> usize {
+    (size + (page_size - 1)) & !(page_size - 1)
+}
+
+/// A simple struct consisting of a page-aligned pointer to page-aligned
+/// and initially-zeroed memory and a length.
+#[derive(Debug)]
+pub struct Mmap {
+    // Note that this is stored as a `usize` instead of a `*const` or `*mut`
+    // pointer to allow this structure to be natively `Send` and `Sync` without
+    // `unsafe impl`. This type is sendable across threads and shareable since
+    // the coordination all happens at the OS layer.
+    ptr: usize,
+    len: usize,
+}
+
+impl Mmap {
+    /// Construct a new empty instance of `Mmap`.
+    pub fn new() -> Self {
+        // Rust's slices require non-null pointers, even when empty. `Vec`
+        // contains code to create a non-null dangling pointer value when
+        // constructed empty, so we reuse that here.
+        let empty = Vec::<u8>::new();
+        Self {
+            ptr: empty.as_ptr() as usize,
+            len: 0,
+        }
+    }
+
+    /// Create a new `Mmap` pointing to at least `size` bytes of page-aligned accessible memory.
+    pub fn with_at_least(size: usize) -> Result<Self, String> {
+        let page_size = region::page::size();
+        let rounded_size = round_up_to_page_size(size, page_size);
+        Self::accessible_reserved(rounded_size, rounded_size)
+    }
+
+    /// Create a new `Mmap` pointing to `accessible_size` bytes of page-aligned accessible memory,
+    /// within a reserved mapping of `mapping_size` bytes. `accessible_size` and `mapping_size`
+    /// must be native page-size multiples.
+    #[cfg(not(target_os = "windows"))]
+    pub fn accessible_reserved(
+        accessible_size: usize,
+        mapping_size: usize,
+    ) -> Result<Self, String> {
+        let page_size = region::page::size();
+        assert_le!(accessible_size, mapping_size);
+        assert_eq!(mapping_size & (page_size - 1), 0);
+        assert_eq!(accessible_size & (page_size - 1), 0);
+
+        // Mmap may return EINVAL if the size is zero, so just
+        // special-case that.
+        if mapping_size == 0 {
+            return Ok(Self::new());
+        }
+
+        Ok(if accessible_size == mapping_size {
+            // Allocate a single read-write region at once.
+            let ptr = unsafe {
+                libc::mmap(
+                    ptr::null_mut(),
+                    mapping_size,
+                    libc::PROT_READ | libc::PROT_WRITE,
+                    libc::MAP_PRIVATE | libc::MAP_ANON,
+                    -1,
+                    0,
+                )
+            };
+            if ptr as isize == -1_isize {
+                return Err(io::Error::last_os_error().to_string());
+            }
+
+            Self {
+                ptr: ptr as usize,
+                len: mapping_size,
+            }
+        } else {
+            // Reserve the mapping size.
+            let ptr = unsafe {
+                libc::mmap(
+                    ptr::null_mut(),
+                    mapping_size,
+                    libc::PROT_NONE,
+                    libc::MAP_PRIVATE | libc::MAP_ANON,
+                    -1,
+                    0,
+                )
+            };
+            if ptr as isize == -1_isize {
+                return Err(io::Error::last_os_error().to_string());
+            }
+
+            let mut result = Self {
+                ptr: ptr as usize,
+                len: mapping_size,
+            };
+
+            if accessible_size != 0 {
+                // Commit the accessible size.
+                result.make_accessible(0, accessible_size)?;
+            }
+
+            result
+        })
+    }
+
+    /// Create a new `Mmap` pointing to `accessible_size` bytes of page-aligned accessible memory,
+    /// within a reserved mapping of `mapping_size` bytes. `accessible_size` and `mapping_size`
+    /// must be native page-size multiples.
+    #[cfg(target_os = "windows")]
+    pub fn accessible_reserved(
+        accessible_size: usize,
+        mapping_size: usize,
+    ) -> Result<Self, String> {
+        use winapi::um::memoryapi::VirtualAlloc;
+        use winapi::um::winnt::{MEM_COMMIT, MEM_RESERVE, PAGE_NOACCESS, PAGE_READWRITE};
+
+        let page_size = region::page::size();
+        assert_le!(accessible_size, mapping_size);
+        assert_eq!(mapping_size & (page_size - 1), 0);
+        assert_eq!(accessible_size & (page_size - 1), 0);
+
+        Ok(if accessible_size == mapping_size {
+            // Allocate a single read-write region at once.
+            let ptr = unsafe {
+                VirtualAlloc(
+                    ptr::null_mut(),
+                    mapping_size,
+                    MEM_RESERVE | MEM_COMMIT,
+                    PAGE_READWRITE,
+                )
+            };
+            if ptr.is_null() {
+                return Err(io::Error::last_os_error().to_string());
+            }
+
+            Self {
+                ptr: ptr as usize,
+                len: mapping_size,
+            }
+        } else {
+            // Reserve the mapping size.
+            let ptr =
+                unsafe { VirtualAlloc(ptr::null_mut(), mapping_size, MEM_RESERVE, PAGE_NOACCESS) };
+            if ptr.is_null() {
+                return Err(io::Error::last_os_error().to_string());
+            }
+
+            let mut result = Self {
+                ptr: ptr as usize,
+                len: mapping_size,
+            };
+
+            if accessible_size != 0 {
+                // Commit the accessible size.
+                result.make_accessible(0, accessible_size)?;
+            }
+
+            result
+        })
+    }
+
+    /// Make the memory starting at `start` and extending for `len` bytes accessible.
+    /// `start` and `len` must be native page-size multiples and describe a range within
+    /// `self`'s reserved memory.
+    #[cfg(not(target_os = "windows"))]
+    pub fn make_accessible(&mut self, start: usize, len: usize) -> Result<(), String> {
+        let page_size = region::page::size();
+        assert_eq!(start & (page_size - 1), 0);
+        assert_eq!(len & (page_size - 1), 0);
+        assert_lt!(len, self.len);
+        assert_lt!(start, self.len - len);
+
+        // Commit the accessible size.
+        let ptr = self.ptr as *const u8;
+        unsafe { region::protect(ptr.add(start), len, region::Protection::ReadWrite) }
+            .map_err(|e| e.to_string())
+    }
+
+    /// Make the memory starting at `start` and extending for `len` bytes accessible.
+    /// `start` and `len` must be native page-size multiples and describe a range within
+    /// `self`'s reserved memory.
+    #[cfg(target_os = "windows")]
+    pub fn make_accessible(&mut self, start: usize, len: usize) -> Result<(), String> {
+        use winapi::ctypes::c_void;
+        use winapi::um::memoryapi::VirtualAlloc;
+        use winapi::um::winnt::{MEM_COMMIT, PAGE_READWRITE};
+        let page_size = region::page::size();
+        assert_eq!(start & (page_size - 1), 0);
+        assert_eq!(len & (page_size - 1), 0);
+        assert_lt!(len, self.len);
+        assert_lt!(start, self.len - len);
+
+        // Commit the accessible size.
+        let ptr = self.ptr as *const u8;
+        if unsafe {
+            VirtualAlloc(
+                ptr.add(start) as *mut c_void,
+                len,
+                MEM_COMMIT,
+                PAGE_READWRITE,
+            )
+        }
+        .is_null()
+        {
+            return Err(io::Error::last_os_error().to_string());
+        }
+
+        Ok(())
+    }
+
+    /// Return the allocated memory as a slice of u8.
+    pub fn as_slice(&self) -> &[u8] {
+        unsafe { slice::from_raw_parts(self.ptr as *const u8, self.len) }
+    }
+
+    /// Return the allocated memory as a mutable slice of u8.
+    pub fn as_mut_slice(&mut self) -> &mut [u8] {
+        unsafe { slice::from_raw_parts_mut(self.ptr as *mut u8, self.len) }
+    }
+
+    /// Return the allocated memory as a pointer to u8.
+    pub fn as_ptr(&self) -> *const u8 {
+        self.ptr as *const u8
+    }
+
+    /// Return the allocated memory as a mutable pointer to u8.
+    pub fn as_mut_ptr(&mut self) -> *mut u8 {
+        self.ptr as *mut u8
+    }
+
+    /// Return the length of the allocated memory.
+    pub fn len(&self) -> usize {
+        self.len
+    }
+
+    /// Return whether any memory has been allocated.
+    pub fn is_empty(&self) -> bool {
+        self.len() == 0
+    }
+}
+
+impl Drop for Mmap {
+    #[cfg(not(target_os = "windows"))]
+    fn drop(&mut self) {
+        if self.len != 0 {
+            let r = unsafe { libc::munmap(self.ptr as *mut libc::c_void, self.len) };
+            assert_eq!(r, 0, "munmap failed: {}", io::Error::last_os_error());
+        }
+    }
+
+    #[cfg(target_os = "windows")]
+    fn drop(&mut self) {
+        if self.len != 0 {
+            use winapi::ctypes::c_void;
+            use winapi::um::memoryapi::VirtualFree;
+            use winapi::um::winnt::MEM_RELEASE;
+            let r = unsafe { VirtualFree(self.ptr as *mut c_void, 0, MEM_RELEASE) };
+            assert_ne!(r, 0);
+        }
+    }
+}
+
+fn _assert() {
+    fn _assert_send_sync<T: Send + Sync>() {}
+    _assert_send_sync::<Mmap>();
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn test_round_up_to_page_size() {
+        assert_eq!(round_up_to_page_size(0, 4096), 0);
+        assert_eq!(round_up_to_page_size(1, 4096), 4096);
+        assert_eq!(round_up_to_page_size(4096, 4096), 4096);
+        assert_eq!(round_up_to_page_size(4097, 4096), 8192);
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/sig_registry.rs.html b/api/src/wasmtime_runtime/sig_registry.rs.html new file mode 100644 index 000000000000..6182ad8d503d --- /dev/null +++ b/api/src/wasmtime_runtime/sig_registry.rs.html @@ -0,0 +1,149 @@ +sig_registry.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+
+//! Implement a registry of function signatures, for fast indirect call
+//! signature checking.
+
+use crate::vmcontext::VMSharedSignatureIndex;
+use more_asserts::{assert_lt, debug_assert_lt};
+use std::collections::{hash_map, HashMap};
+use std::convert::TryFrom;
+use std::sync::RwLock;
+use wasmtime_environ::ir;
+
+/// WebAssembly requires that the caller and callee signatures in an indirect
+/// call must match. To implement this efficiently, keep a registry of all
+/// signatures, shared by all instances, so that call sites can just do an
+/// index comparison.
+#[derive(Debug)]
+pub struct SignatureRegistry {
+    // This structure is stored in a `Compiler` and is intended to be shared
+    // across many instances. Ideally instances can themselves be sent across
+    // threads, and ideally we can compile across many threads. As a result we
+    // use interior mutability here with a lock to avoid having callers to
+    // externally synchronize calls to compilation.
+    inner: RwLock<Inner>,
+}
+
+#[derive(Debug, Default)]
+struct Inner {
+    signature2index: HashMap<ir::Signature, VMSharedSignatureIndex>,
+    index2signature: HashMap<VMSharedSignatureIndex, ir::Signature>,
+}
+
+impl SignatureRegistry {
+    /// Create a new `SignatureRegistry`.
+    pub fn new() -> Self {
+        Self {
+            inner: Default::default(),
+        }
+    }
+
+    /// Register a signature and return its unique index.
+    pub fn register(&self, sig: &ir::Signature) -> VMSharedSignatureIndex {
+        let mut inner = self.inner.write().unwrap();
+        let len = inner.signature2index.len();
+        match inner.signature2index.entry(sig.clone()) {
+            hash_map::Entry::Occupied(entry) => *entry.get(),
+            hash_map::Entry::Vacant(entry) => {
+                // Keep `signature_hash` len under 2**32 -- VMSharedSignatureIndex::new(std::u32::MAX)
+                // is reserved for VMSharedSignatureIndex::default().
+                debug_assert_lt!(
+                    len,
+                    std::u32::MAX as usize,
+                    "Invariant check: signature_hash.len() < std::u32::MAX"
+                );
+                let sig_id = VMSharedSignatureIndex::new(u32::try_from(len).unwrap());
+                entry.insert(sig_id);
+                inner.index2signature.insert(sig_id, sig.clone());
+                sig_id
+            }
+        }
+    }
+
+    /// Looks up a shared signature index within this registry.
+    ///
+    /// Note that for this operation to be semantically correct the `idx` must
+    /// have previously come from a call to `register` of this same object.
+    pub fn lookup(&self, idx: VMSharedSignatureIndex) -> Option<ir::Signature> {
+        self.inner
+            .read()
+            .unwrap()
+            .index2signature
+            .get(&idx)
+            .cloned()
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/signalhandlers.rs.html b/api/src/wasmtime_runtime/signalhandlers.rs.html new file mode 100644 index 000000000000..16a1ad1e41d4 --- /dev/null +++ b/api/src/wasmtime_runtime/signalhandlers.rs.html @@ -0,0 +1,79 @@ +signalhandlers.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+
+//! Interface to low-level signal-handling mechanisms.
+
+use std::sync::Once;
+
+extern "C" {
+    fn EnsureEagerSignalHandlers() -> libc::c_int;
+}
+
+/// This function performs the low-overhead signal handler initialization that
+/// we want to do eagerly to ensure a more-deterministic global process state.
+///
+/// This is especially relevant for signal handlers since handler ordering
+/// depends on installation order: the wasm signal handler must run *before*
+/// the other crash handlers and since POSIX signal handlers work LIFO, this
+/// function needs to be called at the end of the startup process, after other
+/// handlers have been installed. This function can thus be called multiple
+/// times, having no effect after the first call.
+pub fn init() {
+    static INIT: Once = Once::new();
+    INIT.call_once(real_init);
+}
+
+fn real_init() {
+    // This is a really weird and unfortunate function call. For all the gory
+    // details see #829, but the tl;dr; is that in a trap handler we have 2
+    // pages of stack space on Linux, and calling into libunwind which triggers
+    // the dynamic loader blows the stack.
+    //
+    // This is a dumb hack to work around this system-specific issue by
+    // capturing a backtrace once in the lifetime of a process to ensure that
+    // when we capture a backtrace in the trap handler all caches are primed,
+    // aka the dynamic loader has resolved all the relevant symbols.
+    drop(backtrace::Backtrace::new_unresolved());
+
+    if unsafe { EnsureEagerSignalHandlers() == 0 } {
+        panic!("failed to install signal handlers");
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/table.rs.html b/api/src/wasmtime_runtime/table.rs.html new file mode 100644 index 000000000000..bf5e81f15e70 --- /dev/null +++ b/api/src/wasmtime_runtime/table.rs.html @@ -0,0 +1,199 @@ +table.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+
+//! Memory management for tables.
+//!
+//! `Table` is to WebAssembly tables what `LinearMemory` is to WebAssembly linear memories.
+
+use crate::vmcontext::{VMCallerCheckedAnyfunc, VMTableDefinition};
+use std::cell::RefCell;
+use std::convert::{TryFrom, TryInto};
+use wasmtime_environ::wasm::TableElementType;
+use wasmtime_environ::{TablePlan, TableStyle};
+
+/// A table instance.
+#[derive(Debug)]
+pub struct Table {
+    vec: RefCell<Vec<VMCallerCheckedAnyfunc>>,
+    maximum: Option<u32>,
+}
+
+impl Table {
+    /// Create a new table instance with specified minimum and maximum number of elements.
+    pub fn new(plan: &TablePlan) -> Self {
+        match plan.table.ty {
+            TableElementType::Func => (),
+            TableElementType::Val(ty) => {
+                unimplemented!("tables of types other than anyfunc ({})", ty)
+            }
+        };
+        match plan.style {
+            TableStyle::CallerChecksSignature => Self {
+                vec: RefCell::new(vec![
+                    VMCallerCheckedAnyfunc::default();
+                    usize::try_from(plan.table.minimum).unwrap()
+                ]),
+                maximum: plan.table.maximum,
+            },
+        }
+    }
+
+    /// Returns the number of allocated elements.
+    pub fn size(&self) -> u32 {
+        self.vec.borrow().len().try_into().unwrap()
+    }
+
+    /// Grow table by the specified amount of elements.
+    ///
+    /// Returns `None` if table can't be grown by the specified amount
+    /// of elements.
+    pub fn grow(&self, delta: u32) -> Option<u32> {
+        let new_len = match self.size().checked_add(delta) {
+            Some(len) => {
+                if let Some(max) = self.maximum {
+                    if len > max {
+                        return None;
+                    }
+                }
+                len
+            }
+            None => {
+                return None;
+            }
+        };
+        self.vec.borrow_mut().resize(
+            usize::try_from(new_len).unwrap(),
+            VMCallerCheckedAnyfunc::default(),
+        );
+        Some(new_len)
+    }
+
+    /// Get reference to the specified element.
+    ///
+    /// Returns `None` if the index is out of bounds.
+    pub fn get(&self, index: u32) -> Option<VMCallerCheckedAnyfunc> {
+        self.vec.borrow().get(index as usize).cloned()
+    }
+
+    /// Set reference to the specified element.
+    ///
+    /// # Panics
+    ///
+    /// Panics if `index` is out of bounds.
+    pub fn set(&self, index: u32, func: VMCallerCheckedAnyfunc) -> Result<(), ()> {
+        match self.vec.borrow_mut().get_mut(index as usize) {
+            Some(slot) => {
+                *slot = func;
+                Ok(())
+            }
+            None => Err(()),
+        }
+    }
+
+    /// Return a `VMTableDefinition` for exposing the table to compiled wasm code.
+    pub fn vmtable(&self) -> VMTableDefinition {
+        let mut vec = self.vec.borrow_mut();
+        VMTableDefinition {
+            base: vec.as_mut_ptr() as *mut u8,
+            current_elements: vec.len().try_into().unwrap(),
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/trap_registry.rs.html b/api/src/wasmtime_runtime/trap_registry.rs.html new file mode 100644 index 000000000000..ef502d894648 --- /dev/null +++ b/api/src/wasmtime_runtime/trap_registry.rs.html @@ -0,0 +1,349 @@ +trap_registry.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+
+use std::collections::{BTreeMap, HashMap};
+use std::fmt;
+use std::sync::{Arc, RwLock};
+use wasmtime_environ::ir;
+
+/// The registry maintains descriptions of traps in currently allocated functions.
+#[derive(Default)]
+pub struct TrapRegistry {
+    // This data structure is intended to be safe to use across many threads
+    // since this is stored inside of a `Compiler` which, eventually, will be
+    // used across many threads. To that end this is internally use an `Arc`
+    // plus an `RwLock`.
+    //
+    // The problem that this data structure is solving is that when a
+    // segfault/illegal instruction happens we need to answer "given this
+    // hardware program counter what is the wasm reason this trap is being
+    // raised"?
+    //
+    // The way this is answered here is done to minimize the amount of
+    // synchronization (in theory) and have something like so:
+    //
+    // * Each module bulk-registers a list of in-memory pc addresses that have
+    //   traps. We assume that the range of traps for each module are always
+    //   disjoint.
+    // * Each key in this `BTreeMap` is the highest trapping address and the
+    //   value contains the lowest address as well as all the individual
+    //   addresses in their own `HashMap`.
+    // * Registration then looks by calculating the start/end and inserting
+    //   into this map (with some assertions about disjointed-ness)
+    // * Lookup is done in two layers. First we find the corresponding entry
+    //   in the map and verify that a program counter falls in the start/end
+    //   range. Next we look up the address in the `traps` hash map below.
+    //
+    // The `register_traps` function works by returning an RAII guard that owns
+    // a handle to this `Arc` as well, and when that type is dropped it will
+    // automatically remove all trap information from this `ranges` list.
+    ranges: Arc<RwLock<BTreeMap<usize, TrapGroup>>>,
+}
+
+#[derive(Debug)]
+struct TrapGroup {
+    /// The lowest key in the `trap` field.
+    ///
+    /// This represents the start of the range of this group of traps, and the
+    /// end of the range for this group of traps is stored as the key in the
+    /// `ranges` struct above in `TrapRegistry`.
+    start: usize,
+
+    /// All known traps in this group, mapped from program counter to the
+    /// description of the trap itself.
+    traps: HashMap<usize, TrapDescription>,
+}
+
+/// RAII structure returned from `TrapRegistry::register_trap` to unregister
+/// trap information on drop.
+#[derive(Clone)]
+pub struct TrapRegistration {
+    ranges: Arc<RwLock<BTreeMap<usize, TrapGroup>>>,
+    end: Option<usize>,
+}
+
+/// Description of a trap.
+#[derive(Clone, Copy, PartialEq, Debug)]
+pub struct TrapDescription {
+    /// Location of the trap in source binary module.
+    pub source_loc: ir::SourceLoc,
+    /// Code of the trap.
+    pub trap_code: ir::TrapCode,
+}
+
+impl fmt::Display for TrapDescription {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(
+            f,
+            "wasm trap: {}, source location: {}",
+            trap_code_to_expected_string(self.trap_code),
+            self.source_loc
+        )
+    }
+}
+
+fn trap_code_to_expected_string(trap_code: ir::TrapCode) -> String {
+    use ir::TrapCode::*;
+    match trap_code {
+        StackOverflow => "call stack exhausted".to_string(),
+        HeapOutOfBounds => "out of bounds memory access".to_string(),
+        TableOutOfBounds => "undefined element".to_string(),
+        OutOfBounds => "out of bounds".to_string(), // Note: not covered by the test suite
+        IndirectCallToNull => "uninitialized element".to_string(),
+        BadSignature => "indirect call type mismatch".to_string(),
+        IntegerOverflow => "integer overflow".to_string(),
+        IntegerDivisionByZero => "integer divide by zero".to_string(),
+        BadConversionToInteger => "invalid conversion to integer".to_string(),
+        UnreachableCodeReached => "unreachable".to_string(),
+        Interrupt => "interrupt".to_string(), // Note: not covered by the test suite
+        User(x) => format!("user trap {}", x), // Note: not covered by the test suite
+    }
+}
+
+impl TrapRegistry {
+    /// Registers a list of traps.
+    ///
+    /// Returns a RAII guard that deregisters all traps when dropped.
+    pub fn register_traps(
+        &self,
+        list: impl IntoIterator<Item = (usize, ir::SourceLoc, ir::TrapCode)>,
+    ) -> TrapRegistration {
+        let mut start = usize::max_value();
+        let mut end = 0;
+        let mut traps = HashMap::new();
+        for (addr, source_loc, trap_code) in list.into_iter() {
+            traps.insert(
+                addr,
+                TrapDescription {
+                    source_loc,
+                    trap_code,
+                },
+            );
+            if addr < start {
+                start = addr;
+            }
+            if addr > end {
+                end = addr;
+            }
+        }
+        if traps.len() == 0 {
+            return TrapRegistration {
+                ranges: self.ranges.clone(),
+                end: None,
+            };
+        }
+        let mut ranges = self.ranges.write().unwrap();
+
+        // Sanity check that no other group of traps overlaps with our
+        // registration...
+        if let Some((_, prev)) = ranges.range(end..).next() {
+            assert!(prev.start > end);
+        }
+        if let Some((prev_end, _)) = ranges.range(..=start).next_back() {
+            assert!(*prev_end < start);
+        }
+
+        // ... and then register ourselves
+        assert!(ranges.insert(end, TrapGroup { start, traps }).is_none());
+        TrapRegistration {
+            ranges: self.ranges.clone(),
+            end: Some(end),
+        }
+    }
+}
+
+impl TrapRegistration {
+    /// Gets a trap description at given address.
+    pub fn get_trap(&self, address: usize) -> Option<TrapDescription> {
+        let ranges = self.ranges.read().ok()?;
+        let (end, group) = ranges.range(address..).next()?;
+        if group.start <= address && address <= *end {
+            group.traps.get(&address).copied()
+        } else {
+            None
+        }
+    }
+}
+
+impl Drop for TrapRegistration {
+    fn drop(&mut self) {
+        if let Some(end) = self.end {
+            if let Ok(mut ranges) = self.ranges.write() {
+                ranges.remove(&end);
+            }
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/traphandlers.rs.html b/api/src/wasmtime_runtime/traphandlers.rs.html new file mode 100644 index 000000000000..cfe65768b0f4 --- /dev/null +++ b/api/src/wasmtime_runtime/traphandlers.rs.html @@ -0,0 +1,741 @@ +traphandlers.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+
+//! WebAssembly trap handling, which is built on top of the lower-level
+//! signalhandling mechanisms.
+
+use crate::instance::{InstanceHandle, SignalHandler};
+use crate::trap_registry::TrapDescription;
+use crate::vmcontext::{VMContext, VMFunctionBody};
+use backtrace::Backtrace;
+use std::any::Any;
+use std::cell::Cell;
+use std::error::Error;
+use std::fmt;
+use std::mem;
+use std::ptr;
+use wasmtime_environ::ir;
+
+extern "C" {
+    fn RegisterSetjmp(
+        jmp_buf: *mut *const u8,
+        callback: extern "C" fn(*mut u8),
+        payload: *mut u8,
+    ) -> i32;
+    fn Unwind(jmp_buf: *const u8) -> !;
+}
+
+cfg_if::cfg_if! {
+    if #[cfg(unix)] {
+        #[no_mangle]
+        pub unsafe extern "C" fn HandleTrap(
+            pc: *mut u8,
+            signum: libc::c_int,
+            siginfo: *mut libc::siginfo_t,
+            context: *mut libc::c_void,
+        ) -> *const u8 {
+            tls::with(|info| {
+                match info {
+                    Some(info) => info.handle_trap(pc, false, |handler| handler(signum, siginfo, context)),
+                    None => ptr::null(),
+                }
+            })
+        }
+    } else if #[cfg(target_os = "windows")] {
+        use winapi::um::winnt::PEXCEPTION_POINTERS;
+        use winapi::um::minwinbase::EXCEPTION_STACK_OVERFLOW;
+
+        #[no_mangle]
+        pub unsafe extern "C" fn HandleTrap(
+            pc: *mut u8,
+            exception_info: PEXCEPTION_POINTERS
+        ) -> *const u8 {
+            tls::with(|info| {
+                let reset_guard_page = (*(*exception_info).ExceptionRecord).ExceptionCode == EXCEPTION_STACK_OVERFLOW;
+                match info {
+                    Some(info) => info.handle_trap(pc, reset_guard_page, |handler| handler(exception_info)),
+                    None => ptr::null(),
+                }
+            })
+        }
+    }
+}
+
+/// Raises a user-defined trap immediately.
+///
+/// This function performs as-if a wasm trap was just executed, only the trap
+/// has a dynamic payload associated with it which is user-provided. This trap
+/// payload is then returned from `wasmtime_call` an `wasmtime_call_trampoline`
+/// below.
+///
+/// # Safety
+///
+/// Only safe to call when wasm code is on the stack, aka `wasmtime_call` or
+/// `wasmtime_call_trampoline` must have been previously called.
+pub unsafe fn raise_user_trap(data: Box<dyn Error + Send + Sync>) -> ! {
+    tls::with(|info| info.unwrap().unwind_with(UnwindReason::UserTrap(data)))
+}
+
+/// Carries a Rust panic across wasm code and resumes the panic on the other
+/// side.
+///
+/// # Safety
+///
+/// Only safe to call when wasm code is on the stack, aka `wasmtime_call` or
+/// `wasmtime_call_trampoline` must have been previously called.
+pub unsafe fn resume_panic(payload: Box<dyn Any + Send>) -> ! {
+    tls::with(|info| info.unwrap().unwind_with(UnwindReason::Panic(payload)))
+}
+
+#[cfg(target_os = "windows")]
+fn reset_guard_page() {
+    extern "C" {
+        fn _resetstkoflw() -> winapi::ctypes::c_int;
+    }
+
+    // We need to restore guard page under stack to handle future stack overflows properly.
+    // https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/resetstkoflw?view=vs-2019
+    if unsafe { _resetstkoflw() } == 0 {
+        panic!("failed to restore stack guard page");
+    }
+}
+
+#[cfg(not(target_os = "windows"))]
+fn reset_guard_page() {}
+
+/// Stores trace message with backtrace.
+#[derive(Debug)]
+pub enum Trap {
+    /// A user-raised trap through `raise_user_trap`.
+    User(Box<dyn Error + Send + Sync>),
+    /// A wasm-originating trap from wasm code itself.
+    Wasm {
+        /// What sort of trap happened, as well as where in the original wasm module
+        /// it happened.
+        desc: TrapDescription,
+        /// Native stack backtrace at the time the trap occurred
+        backtrace: Backtrace,
+    },
+}
+
+impl fmt::Display for Trap {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match self {
+            Trap::User(user) => user.fmt(f),
+            Trap::Wasm { desc, .. } => desc.fmt(f),
+        }
+    }
+}
+
+impl std::error::Error for Trap {}
+
+/// Call the wasm function pointed to by `callee`.
+///
+/// * `vmctx` - the callee vmctx argument
+/// * `caller_vmctx` - the caller vmctx argument
+/// * `trampoline` - the jit-generated trampoline whose ABI takes 4 values, the
+///   callee vmctx, the caller vmctx, the `callee` argument below, and then the
+///   `values_vec` argument.
+/// * `callee` - the third argument to the `trampoline` function
+/// * `values_vec` - points to a buffer which holds the incoming arguments, and to
+///   which the outgoing return values will be written.
+///
+/// Wildly unsafe because it calls raw function pointers and reads/writes raw
+/// function pointers.
+pub unsafe fn wasmtime_call_trampoline(
+    vmctx: *mut VMContext,
+    caller_vmctx: *mut VMContext,
+    trampoline: *const VMFunctionBody,
+    callee: *const VMFunctionBody,
+    values_vec: *mut u8,
+) -> Result<(), Trap> {
+    catch_traps(vmctx, || {
+        mem::transmute::<
+            _,
+            extern "C" fn(*mut VMContext, *mut VMContext, *const VMFunctionBody, *mut u8),
+        >(trampoline)(vmctx, caller_vmctx, callee, values_vec)
+    })
+}
+
+/// Catches any wasm traps that happen within the execution of `closure`,
+/// returning them as a `Result`.
+///
+/// Highly unsafe since `closure` won't have any dtors run.
+pub unsafe fn catch_traps<F>(vmctx: *mut VMContext, mut closure: F) -> Result<(), Trap>
+where
+    F: FnMut(),
+{
+    return CallThreadState::new(vmctx).with(|cx| {
+        RegisterSetjmp(
+            cx.jmp_buf.as_ptr(),
+            call_closure::<F>,
+            &mut closure as *mut F as *mut u8,
+        )
+    });
+
+    extern "C" fn call_closure<F>(payload: *mut u8)
+    where
+        F: FnMut(),
+    {
+        unsafe { (*(payload as *mut F))() }
+    }
+}
+
+/// Temporary state stored on the stack which is registered in the `tls` module
+/// below for calls into wasm.
+pub struct CallThreadState {
+    unwind: Cell<UnwindReason>,
+    jmp_buf: Cell<*const u8>,
+    reset_guard_page: Cell<bool>,
+    prev: Option<*const CallThreadState>,
+    vmctx: *mut VMContext,
+}
+
+enum UnwindReason {
+    None,
+    Panic(Box<dyn Any + Send>),
+    UserTrap(Box<dyn Error + Send + Sync>),
+    Trap { backtrace: Backtrace, pc: usize },
+}
+
+impl CallThreadState {
+    fn new(vmctx: *mut VMContext) -> CallThreadState {
+        CallThreadState {
+            unwind: Cell::new(UnwindReason::None),
+            vmctx,
+            jmp_buf: Cell::new(ptr::null()),
+            reset_guard_page: Cell::new(false),
+            prev: None,
+        }
+    }
+
+    fn with(mut self, closure: impl FnOnce(&CallThreadState) -> i32) -> Result<(), Trap> {
+        tls::with(|prev| {
+            self.prev = prev.map(|p| p as *const _);
+            let ret = tls::set(&self, || closure(&self));
+            match self.unwind.replace(UnwindReason::None) {
+                UnwindReason::None => {
+                    debug_assert_eq!(ret, 1);
+                    Ok(())
+                }
+                UnwindReason::UserTrap(data) => {
+                    debug_assert_eq!(ret, 0);
+                    Err(Trap::User(data))
+                }
+                UnwindReason::Trap { backtrace, pc } => {
+                    debug_assert_eq!(ret, 0);
+                    let instance = unsafe { InstanceHandle::from_vmctx(self.vmctx) };
+
+                    Err(Trap::Wasm {
+                        desc: instance
+                            .instance()
+                            .trap_registration
+                            .get_trap(pc)
+                            .unwrap_or_else(|| TrapDescription {
+                                source_loc: ir::SourceLoc::default(),
+                                trap_code: ir::TrapCode::StackOverflow,
+                            }),
+                        backtrace,
+                    })
+                }
+                UnwindReason::Panic(panic) => {
+                    debug_assert_eq!(ret, 0);
+                    std::panic::resume_unwind(panic)
+                }
+            }
+        })
+    }
+
+    fn any_instance(&self, func: impl Fn(&InstanceHandle) -> bool) -> bool {
+        unsafe {
+            if func(&InstanceHandle::from_vmctx(self.vmctx)) {
+                return true;
+            }
+            match self.prev {
+                Some(prev) => (*prev).any_instance(func),
+                None => false,
+            }
+        }
+    }
+
+    fn unwind_with(&self, reason: UnwindReason) -> ! {
+        self.unwind.replace(reason);
+        unsafe {
+            Unwind(self.jmp_buf.get());
+        }
+    }
+
+    /// Trap handler using our thread-local state.
+    ///
+    /// * `pc` - the program counter the trap happened at
+    /// * `reset_guard_page` - whether or not to reset the guard page,
+    ///   currently Windows specific
+    /// * `call_handler` - a closure used to invoke the platform-specific
+    ///   signal handler for each instance, if available.
+    ///
+    /// Attempts to handle the trap if it's a wasm trap. Returns a few
+    /// different things:
+    ///
+    /// * null - the trap didn't look like a wasm trap and should continue as a
+    ///   trap
+    /// * 1 as a pointer - the trap was handled by a custom trap handler on an
+    ///   instance, and the trap handler should quickly return.
+    /// * a different pointer - a jmp_buf buffer to longjmp to, meaning that
+    ///   the wasm trap was succesfully handled.
+    fn handle_trap(
+        &self,
+        pc: *const u8,
+        reset_guard_page: bool,
+        call_handler: impl Fn(&SignalHandler) -> bool,
+    ) -> *const u8 {
+        // First up see if any instance registered has a custom trap handler,
+        // in which case run them all. If anything handles the trap then we
+        // return that the trap was handled.
+        if self.any_instance(|i| {
+            let handler = match i.instance().signal_handler.replace(None) {
+                Some(handler) => handler,
+                None => return false,
+            };
+            let result = call_handler(&handler);
+            i.instance().signal_handler.set(Some(handler));
+            return result;
+        }) {
+            return 1 as *const _;
+        }
+
+        // TODO: stack overflow can happen at any random time (i.e. in malloc()
+        // in memory.grow) and it's really hard to determine if the cause was
+        // stack overflow and if it happened in WebAssembly module.
+        //
+        // So, let's assume that any untrusted code called from WebAssembly
+        // doesn't trap. Then, if we have called some WebAssembly code, it
+        // means the trap is stack overflow.
+        if self.jmp_buf.get().is_null() {
+            return ptr::null();
+        }
+        let backtrace = Backtrace::new_unresolved();
+        self.reset_guard_page.set(reset_guard_page);
+        self.unwind.replace(UnwindReason::Trap {
+            backtrace,
+            pc: pc as usize,
+        });
+        self.jmp_buf.get()
+    }
+}
+
+impl Drop for CallThreadState {
+    fn drop(&mut self) {
+        if self.reset_guard_page.get() {
+            reset_guard_page();
+        }
+    }
+}
+
+// A private inner module for managing the TLS state that we require across
+// calls in wasm. The WebAssembly code is called from C++ and then a trap may
+// happen which requires us to read some contextual state to figure out what to
+// do with the trap. This `tls` module is used to persist that information from
+// the caller to the trap site.
+mod tls {
+    use super::CallThreadState;
+    use std::cell::Cell;
+    use std::ptr;
+
+    thread_local!(static PTR: Cell<*const CallThreadState> = Cell::new(ptr::null()));
+
+    /// Configures thread local state such that for the duration of the
+    /// execution of `closure` any call to `with` will yield `ptr`, unless this
+    /// is recursively called again.
+    pub fn set<R>(ptr: &CallThreadState, closure: impl FnOnce() -> R) -> R {
+        struct Reset<'a, T: Copy>(&'a Cell<T>, T);
+
+        impl<T: Copy> Drop for Reset<'_, T> {
+            fn drop(&mut self) {
+                self.0.set(self.1);
+            }
+        }
+
+        PTR.with(|p| {
+            let _r = Reset(p, p.replace(ptr));
+            closure()
+        })
+    }
+
+    /// Returns the last pointer configured with `set` above. Panics if `set`
+    /// has not been previously called.
+    pub fn with<R>(closure: impl FnOnce(Option<&CallThreadState>) -> R) -> R {
+        PTR.with(|ptr| {
+            let p = ptr.get();
+            unsafe { closure(if p.is_null() { None } else { Some(&*p) }) }
+        })
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_runtime/vmcontext.rs.html b/api/src/wasmtime_runtime/vmcontext.rs.html new file mode 100644 index 000000000000..fe685ae2c465 --- /dev/null +++ b/api/src/wasmtime_runtime/vmcontext.rs.html @@ -0,0 +1,1243 @@ +vmcontext.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+
+//! This file declares `VMContext` and several related structs which contain
+//! fields that compiled wasm code accesses directly.
+
+use crate::instance::Instance;
+use std::any::Any;
+use std::{ptr, u32};
+use wasmtime_environ::BuiltinFunctionIndex;
+
+/// An imported function.
+#[derive(Debug, Copy, Clone)]
+#[repr(C)]
+pub struct VMFunctionImport {
+    /// A pointer to the imported function body.
+    pub body: *const VMFunctionBody,
+
+    /// A pointer to the `VMContext` that owns the function.
+    pub vmctx: *mut VMContext,
+}
+
+#[cfg(test)]
+mod test_vmfunction_import {
+    use super::VMFunctionImport;
+    use memoffset::offset_of;
+    use std::mem::size_of;
+    use wasmtime_environ::{Module, VMOffsets};
+
+    #[test]
+    fn check_vmfunction_import_offsets() {
+        let module = Module::new();
+        let offsets = VMOffsets::new(size_of::<*mut u8>() as u8, &module);
+        assert_eq!(
+            size_of::<VMFunctionImport>(),
+            usize::from(offsets.size_of_vmfunction_import())
+        );
+        assert_eq!(
+            offset_of!(VMFunctionImport, body),
+            usize::from(offsets.vmfunction_import_body())
+        );
+        assert_eq!(
+            offset_of!(VMFunctionImport, vmctx),
+            usize::from(offsets.vmfunction_import_vmctx())
+        );
+    }
+}
+
+/// A placeholder byte-sized type which is just used to provide some amount of type
+/// safety when dealing with pointers to JIT-compiled function bodies. Note that it's
+/// deliberately not Copy, as we shouldn't be carelessly copying function body bytes
+/// around.
+#[repr(C)]
+pub struct VMFunctionBody(u8);
+
+#[cfg(test)]
+mod test_vmfunction_body {
+    use super::VMFunctionBody;
+    use std::mem::size_of;
+
+    #[test]
+    fn check_vmfunction_body_offsets() {
+        assert_eq!(size_of::<VMFunctionBody>(), 1);
+    }
+}
+
+/// The fields compiled code needs to access to utilize a WebAssembly table
+/// imported from another instance.
+#[derive(Debug, Copy, Clone)]
+#[repr(C)]
+pub struct VMTableImport {
+    /// A pointer to the imported table description.
+    pub from: *mut VMTableDefinition,
+
+    /// A pointer to the `VMContext` that owns the table description.
+    pub vmctx: *mut VMContext,
+}
+
+#[cfg(test)]
+mod test_vmtable_import {
+    use super::VMTableImport;
+    use memoffset::offset_of;
+    use std::mem::size_of;
+    use wasmtime_environ::{Module, VMOffsets};
+
+    #[test]
+    fn check_vmtable_import_offsets() {
+        let module = Module::new();
+        let offsets = VMOffsets::new(size_of::<*mut u8>() as u8, &module);
+        assert_eq!(
+            size_of::<VMTableImport>(),
+            usize::from(offsets.size_of_vmtable_import())
+        );
+        assert_eq!(
+            offset_of!(VMTableImport, from),
+            usize::from(offsets.vmtable_import_from())
+        );
+        assert_eq!(
+            offset_of!(VMTableImport, vmctx),
+            usize::from(offsets.vmtable_import_vmctx())
+        );
+    }
+}
+
+/// The fields compiled code needs to access to utilize a WebAssembly linear
+/// memory imported from another instance.
+#[derive(Debug, Copy, Clone)]
+#[repr(C)]
+pub struct VMMemoryImport {
+    /// A pointer to the imported memory description.
+    pub from: *mut VMMemoryDefinition,
+
+    /// A pointer to the `VMContext` that owns the memory description.
+    pub vmctx: *mut VMContext,
+}
+
+#[cfg(test)]
+mod test_vmmemory_import {
+    use super::VMMemoryImport;
+    use memoffset::offset_of;
+    use std::mem::size_of;
+    use wasmtime_environ::{Module, VMOffsets};
+
+    #[test]
+    fn check_vmmemory_import_offsets() {
+        let module = Module::new();
+        let offsets = VMOffsets::new(size_of::<*mut u8>() as u8, &module);
+        assert_eq!(
+            size_of::<VMMemoryImport>(),
+            usize::from(offsets.size_of_vmmemory_import())
+        );
+        assert_eq!(
+            offset_of!(VMMemoryImport, from),
+            usize::from(offsets.vmmemory_import_from())
+        );
+        assert_eq!(
+            offset_of!(VMMemoryImport, vmctx),
+            usize::from(offsets.vmmemory_import_vmctx())
+        );
+    }
+}
+
+/// The fields compiled code needs to access to utilize a WebAssembly global
+/// variable imported from another instance.
+#[derive(Debug, Copy, Clone)]
+#[repr(C)]
+pub struct VMGlobalImport {
+    /// A pointer to the imported global variable description.
+    pub from: *mut VMGlobalDefinition,
+}
+
+#[cfg(test)]
+mod test_vmglobal_import {
+    use super::VMGlobalImport;
+    use memoffset::offset_of;
+    use std::mem::size_of;
+    use wasmtime_environ::{Module, VMOffsets};
+
+    #[test]
+    fn check_vmglobal_import_offsets() {
+        let module = Module::new();
+        let offsets = VMOffsets::new(size_of::<*mut u8>() as u8, &module);
+        assert_eq!(
+            size_of::<VMGlobalImport>(),
+            usize::from(offsets.size_of_vmglobal_import())
+        );
+        assert_eq!(
+            offset_of!(VMGlobalImport, from),
+            usize::from(offsets.vmglobal_import_from())
+        );
+    }
+}
+
+/// The fields compiled code needs to access to utilize a WebAssembly linear
+/// memory defined within the instance, namely the start address and the
+/// size in bytes.
+#[derive(Debug, Copy, Clone)]
+#[repr(C)]
+pub struct VMMemoryDefinition {
+    /// The start address.
+    pub base: *mut u8,
+
+    /// The current logical size of this linear memory in bytes.
+    pub current_length: usize,
+}
+
+#[cfg(test)]
+mod test_vmmemory_definition {
+    use super::VMMemoryDefinition;
+    use memoffset::offset_of;
+    use std::mem::size_of;
+    use wasmtime_environ::{Module, VMOffsets};
+
+    #[test]
+    fn check_vmmemory_definition_offsets() {
+        let module = Module::new();
+        let offsets = VMOffsets::new(size_of::<*mut u8>() as u8, &module);
+        assert_eq!(
+            size_of::<VMMemoryDefinition>(),
+            usize::from(offsets.size_of_vmmemory_definition())
+        );
+        assert_eq!(
+            offset_of!(VMMemoryDefinition, base),
+            usize::from(offsets.vmmemory_definition_base())
+        );
+        assert_eq!(
+            offset_of!(VMMemoryDefinition, current_length),
+            usize::from(offsets.vmmemory_definition_current_length())
+        );
+        /* TODO: Assert that the size of `current_length` matches.
+        assert_eq!(
+            size_of::<VMMemoryDefinition::current_length>(),
+            usize::from(offsets.size_of_vmmemory_definition_current_length())
+        );
+        */
+    }
+}
+
+/// The fields compiled code needs to access to utilize a WebAssembly table
+/// defined within the instance.
+#[derive(Debug, Copy, Clone)]
+#[repr(C)]
+pub struct VMTableDefinition {
+    /// Pointer to the table data.
+    pub base: *mut u8,
+
+    /// The current number of elements in the table.
+    pub current_elements: u32,
+}
+
+#[cfg(test)]
+mod test_vmtable_definition {
+    use super::VMTableDefinition;
+    use memoffset::offset_of;
+    use std::mem::size_of;
+    use wasmtime_environ::{Module, VMOffsets};
+
+    #[test]
+    fn check_vmtable_definition_offsets() {
+        let module = Module::new();
+        let offsets = VMOffsets::new(size_of::<*mut u8>() as u8, &module);
+        assert_eq!(
+            size_of::<VMTableDefinition>(),
+            usize::from(offsets.size_of_vmtable_definition())
+        );
+        assert_eq!(
+            offset_of!(VMTableDefinition, base),
+            usize::from(offsets.vmtable_definition_base())
+        );
+        assert_eq!(
+            offset_of!(VMTableDefinition, current_elements),
+            usize::from(offsets.vmtable_definition_current_elements())
+        );
+    }
+}
+
+/// The storage for a WebAssembly global defined within the instance.
+///
+/// TODO: Pack the globals more densely, rather than using the same size
+/// for every type.
+#[derive(Debug, Copy, Clone)]
+#[repr(C, align(16))]
+pub struct VMGlobalDefinition {
+    storage: [u8; 16],
+    // If more elements are added here, remember to add offset_of tests below!
+}
+
+#[cfg(test)]
+mod test_vmglobal_definition {
+    use super::VMGlobalDefinition;
+    use more_asserts::assert_ge;
+    use std::mem::{align_of, size_of};
+    use wasmtime_environ::{Module, VMOffsets};
+
+    #[test]
+    fn check_vmglobal_definition_alignment() {
+        assert_ge!(align_of::<VMGlobalDefinition>(), align_of::<i32>());
+        assert_ge!(align_of::<VMGlobalDefinition>(), align_of::<i64>());
+        assert_ge!(align_of::<VMGlobalDefinition>(), align_of::<f32>());
+        assert_ge!(align_of::<VMGlobalDefinition>(), align_of::<f64>());
+        assert_ge!(align_of::<VMGlobalDefinition>(), align_of::<[u8; 16]>());
+    }
+
+    #[test]
+    fn check_vmglobal_definition_offsets() {
+        let module = Module::new();
+        let offsets = VMOffsets::new(size_of::<*mut u8>() as u8, &module);
+        assert_eq!(
+            size_of::<VMGlobalDefinition>(),
+            usize::from(offsets.size_of_vmglobal_definition())
+        );
+    }
+
+    #[test]
+    fn check_vmglobal_begins_aligned() {
+        let module = Module::new();
+        let offsets = VMOffsets::new(size_of::<*mut u8>() as u8, &module);
+        assert_eq!(offsets.vmctx_globals_begin() % 16, 0);
+    }
+}
+
+impl VMGlobalDefinition {
+    /// Construct a `VMGlobalDefinition`.
+    pub fn new() -> Self {
+        Self { storage: [0; 16] }
+    }
+
+    /// Return a reference to the value as an i32.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_i32(&self) -> &i32 {
+        &*(self.storage.as_ref().as_ptr() as *const i32)
+    }
+
+    /// Return a mutable reference to the value as an i32.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_i32_mut(&mut self) -> &mut i32 {
+        &mut *(self.storage.as_mut().as_mut_ptr() as *mut i32)
+    }
+
+    /// Return a reference to the value as a u32.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_u32(&self) -> &u32 {
+        &*(self.storage.as_ref().as_ptr() as *const u32)
+    }
+
+    /// Return a mutable reference to the value as an u32.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_u32_mut(&mut self) -> &mut u32 {
+        &mut *(self.storage.as_mut().as_mut_ptr() as *mut u32)
+    }
+
+    /// Return a reference to the value as an i64.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_i64(&self) -> &i64 {
+        &*(self.storage.as_ref().as_ptr() as *const i64)
+    }
+
+    /// Return a mutable reference to the value as an i64.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_i64_mut(&mut self) -> &mut i64 {
+        &mut *(self.storage.as_mut().as_mut_ptr() as *mut i64)
+    }
+
+    /// Return a reference to the value as an u64.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_u64(&self) -> &u64 {
+        &*(self.storage.as_ref().as_ptr() as *const u64)
+    }
+
+    /// Return a mutable reference to the value as an u64.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_u64_mut(&mut self) -> &mut u64 {
+        &mut *(self.storage.as_mut().as_mut_ptr() as *mut u64)
+    }
+
+    /// Return a reference to the value as an f32.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_f32(&self) -> &f32 {
+        &*(self.storage.as_ref().as_ptr() as *const f32)
+    }
+
+    /// Return a mutable reference to the value as an f32.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_f32_mut(&mut self) -> &mut f32 {
+        &mut *(self.storage.as_mut().as_mut_ptr() as *mut f32)
+    }
+
+    /// Return a reference to the value as f32 bits.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_f32_bits(&self) -> &u32 {
+        &*(self.storage.as_ref().as_ptr() as *const u32)
+    }
+
+    /// Return a mutable reference to the value as f32 bits.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_f32_bits_mut(&mut self) -> &mut u32 {
+        &mut *(self.storage.as_mut().as_mut_ptr() as *mut u32)
+    }
+
+    /// Return a reference to the value as an f64.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_f64(&self) -> &f64 {
+        &*(self.storage.as_ref().as_ptr() as *const f64)
+    }
+
+    /// Return a mutable reference to the value as an f64.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_f64_mut(&mut self) -> &mut f64 {
+        &mut *(self.storage.as_mut().as_mut_ptr() as *mut f64)
+    }
+
+    /// Return a reference to the value as f64 bits.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_f64_bits(&self) -> &u64 {
+        &*(self.storage.as_ref().as_ptr() as *const u64)
+    }
+
+    /// Return a mutable reference to the value as f64 bits.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_f64_bits_mut(&mut self) -> &mut u64 {
+        &mut *(self.storage.as_mut().as_mut_ptr() as *mut u64)
+    }
+
+    /// Return a reference to the value as an u128.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_u128(&self) -> &u128 {
+        &*(self.storage.as_ref().as_ptr() as *const u128)
+    }
+
+    /// Return a mutable reference to the value as an u128.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_u128_mut(&mut self) -> &mut u128 {
+        &mut *(self.storage.as_mut().as_mut_ptr() as *mut u128)
+    }
+
+    /// Return a reference to the value as u128 bits.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_u128_bits(&self) -> &[u8; 16] {
+        &*(self.storage.as_ref().as_ptr() as *const [u8; 16])
+    }
+
+    /// Return a mutable reference to the value as u128 bits.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub unsafe fn as_u128_bits_mut(&mut self) -> &mut [u8; 16] {
+        &mut *(self.storage.as_mut().as_mut_ptr() as *mut [u8; 16])
+    }
+}
+
+/// An index into the shared signature registry, usable for checking signatures
+/// at indirect calls.
+#[repr(C)]
+#[derive(Debug, Eq, PartialEq, Clone, Copy, Hash)]
+pub struct VMSharedSignatureIndex(u32);
+
+#[cfg(test)]
+mod test_vmshared_signature_index {
+    use super::VMSharedSignatureIndex;
+    use std::mem::size_of;
+    use wasmtime_environ::{Module, TargetSharedSignatureIndex, VMOffsets};
+
+    #[test]
+    fn check_vmshared_signature_index() {
+        let module = Module::new();
+        let offsets = VMOffsets::new(size_of::<*mut u8>() as u8, &module);
+        assert_eq!(
+            size_of::<VMSharedSignatureIndex>(),
+            usize::from(offsets.size_of_vmshared_signature_index())
+        );
+    }
+
+    #[test]
+    fn check_target_shared_signature_index() {
+        assert_eq!(
+            size_of::<VMSharedSignatureIndex>(),
+            size_of::<TargetSharedSignatureIndex>()
+        );
+    }
+}
+
+impl VMSharedSignatureIndex {
+    /// Create a new `VMSharedSignatureIndex`.
+    pub fn new(value: u32) -> Self {
+        Self(value)
+    }
+}
+
+impl Default for VMSharedSignatureIndex {
+    fn default() -> Self {
+        Self::new(u32::MAX)
+    }
+}
+
+/// The VM caller-checked "anyfunc" record, for caller-side signature checking.
+/// It consists of the actual function pointer and a signature id to be checked
+/// by the caller.
+#[derive(Debug, Clone)]
+#[repr(C)]
+pub struct VMCallerCheckedAnyfunc {
+    /// Function body.
+    pub func_ptr: *const VMFunctionBody,
+    /// Function signature id.
+    pub type_index: VMSharedSignatureIndex,
+    /// Function `VMContext`.
+    pub vmctx: *mut VMContext,
+    // If more elements are added here, remember to add offset_of tests below!
+}
+
+#[cfg(test)]
+mod test_vmcaller_checked_anyfunc {
+    use super::VMCallerCheckedAnyfunc;
+    use memoffset::offset_of;
+    use std::mem::size_of;
+    use wasmtime_environ::{Module, VMOffsets};
+
+    #[test]
+    fn check_vmcaller_checked_anyfunc_offsets() {
+        let module = Module::new();
+        let offsets = VMOffsets::new(size_of::<*mut u8>() as u8, &module);
+        assert_eq!(
+            size_of::<VMCallerCheckedAnyfunc>(),
+            usize::from(offsets.size_of_vmcaller_checked_anyfunc())
+        );
+        assert_eq!(
+            offset_of!(VMCallerCheckedAnyfunc, func_ptr),
+            usize::from(offsets.vmcaller_checked_anyfunc_func_ptr())
+        );
+        assert_eq!(
+            offset_of!(VMCallerCheckedAnyfunc, type_index),
+            usize::from(offsets.vmcaller_checked_anyfunc_type_index())
+        );
+        assert_eq!(
+            offset_of!(VMCallerCheckedAnyfunc, vmctx),
+            usize::from(offsets.vmcaller_checked_anyfunc_vmctx())
+        );
+    }
+}
+
+impl Default for VMCallerCheckedAnyfunc {
+    fn default() -> Self {
+        Self {
+            func_ptr: ptr::null_mut(),
+            type_index: Default::default(),
+            vmctx: ptr::null_mut(),
+        }
+    }
+}
+
+/// An array that stores addresses of builtin functions. We translate code
+/// to use indirect calls. This way, we don't have to patch the code.
+#[repr(C)]
+pub struct VMBuiltinFunctionsArray {
+    ptrs: [usize; Self::len()],
+}
+
+impl VMBuiltinFunctionsArray {
+    pub const fn len() -> usize {
+        BuiltinFunctionIndex::builtin_functions_total_number() as usize
+    }
+
+    pub fn initialized() -> Self {
+        use crate::libcalls::*;
+        let mut ptrs = [0; Self::len()];
+        ptrs[BuiltinFunctionIndex::get_memory32_grow_index().index() as usize] =
+            wasmtime_memory32_grow as usize;
+        ptrs[BuiltinFunctionIndex::get_imported_memory32_grow_index().index() as usize] =
+            wasmtime_imported_memory32_grow as usize;
+        ptrs[BuiltinFunctionIndex::get_memory32_size_index().index() as usize] =
+            wasmtime_memory32_size as usize;
+        ptrs[BuiltinFunctionIndex::get_imported_memory32_size_index().index() as usize] =
+            wasmtime_imported_memory32_size as usize;
+        Self { ptrs }
+    }
+}
+
+/// The storage for a WebAssembly invocation argument
+///
+/// TODO: These could be packed more densely, rather than using the same size for every type.
+#[derive(Debug, Copy, Clone)]
+#[repr(C, align(16))]
+pub struct VMInvokeArgument([u8; 16]);
+
+#[cfg(test)]
+mod test_vm_invoke_argument {
+    use super::VMInvokeArgument;
+    use std::mem::{align_of, size_of};
+    use wasmtime_environ::{Module, VMOffsets};
+
+    #[test]
+    fn check_vm_invoke_argument_alignment() {
+        assert_eq!(align_of::<VMInvokeArgument>(), 16);
+    }
+
+    #[test]
+    fn check_vmglobal_definition_offsets() {
+        let module = Module::new();
+        let offsets = VMOffsets::new(size_of::<*mut u8>() as u8, &module);
+        assert_eq!(
+            size_of::<VMInvokeArgument>(),
+            usize::from(offsets.size_of_vmglobal_definition())
+        );
+    }
+}
+
+impl VMInvokeArgument {
+    /// Create a new invocation argument filled with zeroes
+    pub fn new() -> Self {
+        Self([0; 16])
+    }
+}
+
+/// The VM "context", which is pointed to by the `vmctx` arg in Cranelift.
+/// This has information about globals, memories, tables, and other runtime
+/// state associated with the current instance.
+///
+/// The struct here is empty, as the sizes of these fields are dynamic, and
+/// we can't describe them in Rust's type system. Sufficient memory is
+/// allocated at runtime.
+///
+/// TODO: We could move the globals into the `vmctx` allocation too.
+#[derive(Debug)]
+#[repr(C, align(16))] // align 16 since globals are aligned to that and contained inside
+pub struct VMContext {}
+
+impl VMContext {
+    /// Return a mutable reference to the associated `Instance`.
+    ///
+    /// # Safety
+    /// This is unsafe because it doesn't work on just any `VMContext`, it must
+    /// be a `VMContext` allocated as part of an `Instance`.
+    #[allow(clippy::cast_ptr_alignment)]
+    pub(crate) unsafe fn instance(&self) -> &Instance {
+        &*((self as *const Self as *mut u8).offset(-Instance::vmctx_offset()) as *const Instance)
+    }
+
+    /// Return a reference to the host state associated with this `Instance`.
+    ///
+    /// # Safety
+    /// This is unsafe because it doesn't work on just any `VMContext`, it must
+    /// be a `VMContext` allocated as part of an `Instance`.
+    pub unsafe fn host_state(&self) -> &dyn Any {
+        self.instance().host_state()
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_rust/lib.rs.html b/api/src/wasmtime_rust/lib.rs.html new file mode 100644 index 000000000000..2efd6a2dd13a --- /dev/null +++ b/api/src/wasmtime_rust/lib.rs.html @@ -0,0 +1,95 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+
+pub use wasmtime_rust_macro::wasmtime;
+
+// modules used by the macro
+#[doc(hidden)]
+pub mod __rt {
+    pub use anyhow;
+    pub use wasmtime;
+    pub use wasmtime_interface_types;
+    pub use wasmtime_wasi;
+
+    use std::convert::{TryFrom, TryInto};
+    use wasmtime_interface_types::Value;
+
+    pub trait FromVecValue: Sized {
+        fn from(list: Vec<Value>) -> anyhow::Result<Self>;
+    }
+
+    macro_rules! tuple {
+        ($(($($a:ident),*),)*) => ($(
+            impl<$($a: TryFrom<Value>),*> FromVecValue for ($($a,)*)
+                where $(anyhow::Error: From<$a::Error>,)*
+            {
+                #[allow(non_snake_case)]
+                fn from(list: Vec<Value>) -> anyhow::Result<Self> {
+                    let mut iter = list.into_iter();
+                    $(
+                        let $a = iter.next()
+                            .ok_or_else(|| anyhow::format_err!("not enough values"))?
+                            .try_into()?;
+                    )*
+                    if iter.next().is_some() {
+                        anyhow::bail!("too many return values");
+                    }
+                    Ok(($($a,)*))
+                }
+            }
+        )*)
+    }
+
+    tuple! {
+        (),
+        (A),
+        (A, B),
+        (A, B, C),
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_rust_macro/lib.rs.html b/api/src/wasmtime_rust_macro/lib.rs.html new file mode 100644 index 000000000000..41983c78457c --- /dev/null +++ b/api/src/wasmtime_rust_macro/lib.rs.html @@ -0,0 +1,373 @@ +lib.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+
+extern crate proc_macro;
+
+use proc_macro2::TokenStream;
+use quote::quote;
+use syn::spanned::Spanned;
+
+#[proc_macro_attribute]
+pub fn wasmtime(
+    _attr: proc_macro::TokenStream,
+    item: proc_macro::TokenStream,
+) -> proc_macro::TokenStream {
+    let item = syn::parse_macro_input!(item as syn::ItemTrait);
+    expand(item).unwrap_or_else(|e| e.to_compile_error()).into()
+}
+
+fn expand(item: syn::ItemTrait) -> syn::Result<TokenStream> {
+    let definition = generate_struct(&item)?;
+    let load = generate_load(&item)?;
+    let methods = generate_methods(&item)?;
+    let name = &item.ident;
+
+    Ok(quote! {
+        #definition
+        impl #name {
+            #load
+            #methods
+        }
+    })
+}
+
+fn generate_struct(item: &syn::ItemTrait) -> syn::Result<TokenStream> {
+    let vis = &item.vis;
+    let name = &item.ident;
+    let root = root();
+    Ok(quote! {
+        #vis struct #name {
+            instance: #root::wasmtime::Instance,
+            data: #root::wasmtime_interface_types::ModuleData,
+        }
+    })
+}
+
+fn generate_load(item: &syn::ItemTrait) -> syn::Result<TokenStream> {
+    let vis = &item.vis;
+    let name = &item.ident;
+    let root = root();
+    Ok(quote! {
+        #vis fn load_file(path: impl AsRef<std::path::Path>) -> #root::anyhow::Result<#name> {
+            Self::load_bytes(std::fs::read(path)?)
+        }
+
+        #vis fn load_bytes(bytes: impl AsRef<[u8]>) -> #root::anyhow::Result<#name> {
+            use #root::wasmtime::{Config, Extern, Engine, Store, Instance, Module};
+            use #root::anyhow::{bail, format_err};
+
+            let engine = Engine::new(Config::new().wasm_multi_value(true));
+            let store = Store::new(&engine);
+
+            let data = #root::wasmtime_interface_types::ModuleData::new(bytes.as_ref())?;
+
+            let module = Module::new(&store, bytes.as_ref())?;
+
+            let mut imports: Vec<Extern> = Vec::new();
+            if let Some(module_name) = data.find_wasi_module_name() {
+                let wasi_cx = #root::wasmtime_wasi::WasiCtxBuilder::new().build()?;
+                let wasi = #root::wasmtime_wasi::Wasi::new(&store, wasi_cx);
+                for i in module.imports().iter() {
+                    if i.module() != module_name {
+                        bail!("unknown import module {}", i.module());
+                    }
+                    if let Some(export) = wasi.get_export(i.name()) {
+                        imports.push(export.clone().into());
+                    } else {
+                        bail!("unknown import {}:{}", i.module(), i.name())
+                    }
+                }
+            }
+            let instance =
+                Instance::new(&module, &imports).map_err(|t| format_err!("instantiation trap: {:?}", t))?;
+
+            Ok(#name { instance, data })
+        }
+    })
+}
+
+fn generate_methods(item: &syn::ItemTrait) -> syn::Result<TokenStream> {
+    macro_rules! bail {
+        ($e:expr, $($fmt:tt)*) => (
+            return Err(syn::Error::new($e.span(), format!($($fmt)*)));
+        )
+    }
+    let mut result = TokenStream::new();
+    let root = root();
+    let vis = &item.vis;
+
+    for item in item.items.iter() {
+        let method = match item {
+            syn::TraitItem::Method(f) => f,
+            other => bail!(other, "only methods are allowed"),
+        };
+        if let Some(e) = &method.default {
+            bail!(e, "cannot specify an implementation of methods");
+        }
+        if let Some(t) = &method.sig.constness {
+            bail!(t, "cannot be `const`");
+        }
+        if let Some(t) = &method.sig.asyncness {
+            bail!(t, "cannot be `async`");
+        }
+        match &method.sig.inputs.first() {
+            Some(syn::FnArg::Receiver(_)) => {}
+            Some(t) => bail!(t, "first arugment needs to be \"self\""),
+            None => bail!(
+                method.sig,
+                "trait method requires at least one argument which needs to be \"self\""
+            ),
+        }
+
+        let mut args = Vec::new();
+        for arg in method.sig.inputs.iter() {
+            let arg = match arg {
+                syn::FnArg::Receiver(_) => continue,
+                syn::FnArg::Typed(arg) => arg,
+            };
+            let ident = match &*arg.pat {
+                syn::Pat::Ident(i) => i,
+                other => bail!(other, "must use bare idents for arguments"),
+            };
+            if let Some(t) = &ident.by_ref {
+                bail!(t, "arguments cannot bind by reference");
+            }
+            if let Some(t) = &ident.mutability {
+                bail!(t, "arguments cannot be mutable");
+            }
+            if let Some((_, t)) = &ident.subpat {
+                bail!(t, "arguments cannot have sub-bindings");
+            }
+            let ident = &ident.ident;
+            args.push(quote! {
+                #root::wasmtime_interface_types::Value::from(#ident)
+            });
+        }
+
+        let convert_ret = match &method.sig.output {
+            syn::ReturnType::Default => {
+                quote! {
+                    <() as #root::FromVecValue>::from(results)
+                }
+            }
+            syn::ReturnType::Type(_, ty) => match &**ty {
+                syn::Type::Tuple(..) => {
+                    quote! { <#ty as #root::FromVecValue>::from(results) }
+                }
+                _ => {
+                    quote! { <(#ty,) as #root::FromVecValue>::from(results).map(|t| t.0) }
+                }
+            },
+        };
+
+        let sig = &method.sig;
+        let attrs = &method.attrs;
+        let name = &method.sig.ident;
+
+        result.extend(quote! {
+            #(#attrs)*
+            #vis #sig {
+                let args = [
+                    #(#args),*
+                ];
+                let results = self.data.invoke_export(
+                    &self.instance,
+                    stringify!(#name),
+                    &args,
+                ).expect("wasm execution failed");
+                #convert_ret.expect("failed to convert return type")
+            }
+        });
+    }
+
+    Ok(result)
+}
+
+fn root() -> TokenStream {
+    quote! { wasmtime_rust::__rt }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_wasi/lib.rs.html b/api/src/wasmtime_wasi/lib.rs.html new file mode 100644 index 000000000000..b0e3b11591f4 --- /dev/null +++ b/api/src/wasmtime_wasi/lib.rs.html @@ -0,0 +1,153 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+
+pub mod old;
+
+use wasi_common::hostcalls;
+
+pub use wasi_common::{WasiCtx, WasiCtxBuilder};
+
+// Defines a `struct Wasi` with member fields and appropriate APIs for dealing
+// with all the various WASI exports.
+wig::define_wasi_struct!(
+    "snapshot" "wasi_snapshot_preview1"
+);
+
+pub fn is_wasi_module(name: &str) -> bool {
+    // FIXME: this should be more conservative, but while WASI is in flux and
+    // we're figuring out how to support multiple revisions, this should do the
+    // trick.
+    name.starts_with("wasi")
+}
+
+/// This is an internal structure used to acquire a handle on the caller's
+/// wasm memory buffer.
+///
+/// This exploits how we can implement `WasmTy` for ourselves locally even
+/// though crates in general should not be doing that. This is a crate in
+/// the wasmtime project, however, so we should be able to keep up with our own
+/// changes.
+///
+/// In general this type is wildly unsafe. We need to update the wasi crates to
+/// probably work with more `wasmtime`-like APIs to grip with the unsafety
+/// around dealing with caller memory.
+struct WasiCallerMemory {
+    base: *mut u8,
+    len: usize,
+}
+
+impl wasmtime::WasmTy for WasiCallerMemory {
+    type Abi = ();
+
+    fn push(_dst: &mut Vec<wasmtime::ValType>) {}
+
+    fn matches(_tys: impl Iterator<Item = wasmtime::ValType>) -> bool {
+        true
+    }
+
+    fn from_abi(vmctx: *mut wasmtime_runtime::VMContext, _abi: ()) -> Self {
+        unsafe {
+            match wasmtime_runtime::InstanceHandle::from_vmctx(vmctx).lookup("memory") {
+                Some(wasmtime_runtime::Export::Memory {
+                    definition,
+                    vmctx: _,
+                    memory: _,
+                }) => WasiCallerMemory {
+                    base: (*definition).base,
+                    len: (*definition).current_length,
+                },
+                _ => WasiCallerMemory {
+                    base: std::ptr::null_mut(),
+                    len: 0,
+                },
+            }
+        }
+    }
+
+    fn into_abi(self) {}
+}
+
+impl WasiCallerMemory {
+    unsafe fn get(&self) -> Result<&mut [u8], wasi_common::wasi::__wasi_errno_t> {
+        if self.base.is_null() {
+            Err(wasi_common::wasi::__WASI_ERRNO_INVAL)
+        } else {
+            Ok(std::slice::from_raw_parts_mut(self.base, self.len))
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_wasi/old/mod.rs.html b/api/src/wasmtime_wasi/old/mod.rs.html new file mode 100644 index 000000000000..624ab688f084 --- /dev/null +++ b/api/src/wasmtime_wasi/old/mod.rs.html @@ -0,0 +1,5 @@ +mod.rs.html -- source
1
+
+pub mod snapshot_0;
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_wasi/old/snapshot_0.rs.html b/api/src/wasmtime_wasi/old/snapshot_0.rs.html new file mode 100644 index 000000000000..1d61f77b6561 --- /dev/null +++ b/api/src/wasmtime_wasi/old/snapshot_0.rs.html @@ -0,0 +1,33 @@ +snapshot_0.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+
+use wasi_common::old::snapshot_0::hostcalls;
+use wasi_common::old::snapshot_0::WasiCtx;
+
+// Defines a `struct Wasi` with member fields and appropriate APIs for dealing
+// with all the various WASI exports.
+wig::define_wasi_struct!(
+    "old/snapshot_0" "wasi_unstable"
+);
+
+pub fn is_wasi_module(name: &str) -> bool {
+    // FIXME: this should be more conservative, but while WASI is in flux and
+    // we're figuring out how to support multiple revisions, this should do the
+    // trick.
+    name.starts_with("wasi")
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_wast/lib.rs.html b/api/src/wasmtime_wast/lib.rs.html new file mode 100644 index 000000000000..364196b1ae89 --- /dev/null +++ b/api/src/wasmtime_wast/lib.rs.html @@ -0,0 +1,67 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+
+//! Implementation of the WAST text format for wasmtime.
+
+#![deny(missing_docs, trivial_numeric_casts, unused_extern_crates)]
+#![warn(unused_import_braces)]
+#![deny(unstable_features)]
+#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../../clippy.toml")))]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    allow(clippy::new_without_default, clippy::new_without_default_derive)
+)]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    warn(
+        clippy::float_arithmetic,
+        clippy::mut_mut,
+        clippy::nonminimal_bool,
+        clippy::option_map_unwrap_or,
+        clippy::option_map_unwrap_or_else,
+        clippy::print_stdout,
+        clippy::unicode_not_nfc,
+        clippy::use_self
+    )
+)]
+
+mod spectest;
+mod wast;
+
+pub use crate::spectest::instantiate_spectest;
+pub use crate::wast::WastContext;
+
+/// Version number of this crate.
+pub const VERSION: &str = env!("CARGO_PKG_VERSION");
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_wast/spectest.rs.html b/api/src/wasmtime_wast/spectest.rs.html new file mode 100644 index 000000000000..766e380f9793 --- /dev/null +++ b/api/src/wasmtime_wast/spectest.rs.html @@ -0,0 +1,125 @@ +spectest.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+
+use std::collections::HashMap;
+use wasmtime::*;
+
+/// Return an instance implementing the "spectest" interface used in the
+/// spec testsuite.
+pub fn instantiate_spectest(store: &Store) -> HashMap<&'static str, Extern> {
+    let mut ret = HashMap::new();
+
+    let func = Func::wrap0(store, || {});
+    ret.insert("print", Extern::Func(func));
+
+    let func = Func::wrap1(store, |val: i32| println!("{}: i32", val));
+    ret.insert("print_i32", Extern::Func(func));
+
+    let func = Func::wrap1(store, |val: i64| println!("{}: i64", val));
+    ret.insert("print_i64", Extern::Func(func));
+
+    let func = Func::wrap1(store, |val: f32| println!("{}: f32", val));
+    ret.insert("print_f32", Extern::Func(func));
+
+    let func = Func::wrap1(store, |val: f64| println!("{}: f64", val));
+    ret.insert("print_f64", Extern::Func(func));
+
+    let func = Func::wrap2(store, |i: i32, f: f32| {
+        println!("{}: i32", i);
+        println!("{}: f32", f);
+    });
+    ret.insert("print_i32_f32", Extern::Func(func));
+
+    let func = Func::wrap2(store, |f1: f64, f2: f64| {
+        println!("{}: f64", f1);
+        println!("{}: f64", f2);
+    });
+    ret.insert("print_f64_f64", Extern::Func(func));
+
+    let ty = GlobalType::new(ValType::I32, Mutability::Const);
+    let g = Global::new(store, ty, Val::I32(666)).unwrap();
+    ret.insert("global_i32", Extern::Global(g));
+
+    let ty = GlobalType::new(ValType::I64, Mutability::Const);
+    let g = Global::new(store, ty, Val::I64(666)).unwrap();
+    ret.insert("global_i64", Extern::Global(g));
+
+    let ty = GlobalType::new(ValType::F32, Mutability::Const);
+    let g = Global::new(store, ty, Val::F32(0x4426_8000)).unwrap();
+    ret.insert("global_f32", Extern::Global(g));
+
+    let ty = GlobalType::new(ValType::F64, Mutability::Const);
+    let g = Global::new(store, ty, Val::F64(0x4084_d000_0000_0000)).unwrap();
+    ret.insert("global_f64", Extern::Global(g));
+
+    let ty = TableType::new(ValType::FuncRef, Limits::new(10, Some(20)));
+    let table = Table::new(store, ty, Val::AnyRef(AnyRef::Null)).unwrap();
+    ret.insert("table", Extern::Table(table));
+
+    let ty = MemoryType::new(Limits::new(1, Some(2)));
+    let memory = Memory::new(store, ty);
+    ret.insert("memory", Extern::Memory(memory));
+
+    return ret;
+}
+
+
\ No newline at end of file diff --git a/api/src/wasmtime_wast/wast.rs.html b/api/src/wasmtime_wast/wast.rs.html new file mode 100644 index 000000000000..b17c9c3a3498 --- /dev/null +++ b/api/src/wasmtime_wast/wast.rs.html @@ -0,0 +1,883 @@ +wast.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+
+use crate::spectest::instantiate_spectest;
+use anyhow::{anyhow, bail, Context as _, Result};
+use std::collections::HashMap;
+use std::path::Path;
+use std::str;
+use wasmtime::*;
+
+/// Translate from a `script::Value` to a `RuntimeValue`.
+fn runtime_value(v: &wast::Expression<'_>) -> Result<Val> {
+    use wast::Instruction::*;
+
+    if v.instrs.len() != 1 {
+        bail!("too many instructions in {:?}", v);
+    }
+    Ok(match &v.instrs[0] {
+        I32Const(x) => Val::I32(*x),
+        I64Const(x) => Val::I64(*x),
+        F32Const(x) => Val::F32(x.bits),
+        F64Const(x) => Val::F64(x.bits),
+        V128Const(x) => Val::V128(u128::from_le_bytes(x.to_le_bytes())),
+        other => bail!("couldn't convert {:?} to a runtime value", other),
+    })
+}
+
+/// The wast test script language allows modules to be defined and actions
+/// to be performed on them.
+pub struct WastContext {
+    /// Wast files have a concept of a "current" module, which is the most
+    /// recently defined.
+    current: Option<Instance>,
+
+    instances: HashMap<String, Instance>,
+    store: Store,
+    spectest: Option<HashMap<&'static str, Extern>>,
+}
+
+enum Outcome<T = Vec<Val>> {
+    Ok(T),
+    Trap(Trap),
+}
+
+impl<T> Outcome<T> {
+    fn into_result(self) -> Result<T, Trap> {
+        match self {
+            Outcome::Ok(t) => Ok(t),
+            Outcome::Trap(t) => Err(t),
+        }
+    }
+}
+
+impl WastContext {
+    /// Construct a new instance of `WastContext`.
+    pub fn new(store: Store) -> Self {
+        Self {
+            current: None,
+            store,
+            spectest: None,
+            instances: HashMap::new(),
+        }
+    }
+
+    fn get_instance(&self, instance_name: Option<&str>) -> Result<Instance> {
+        match instance_name {
+            Some(name) => self
+                .instances
+                .get(name)
+                .cloned()
+                .ok_or_else(|| anyhow!("failed to find instance named `{}`", name)),
+            None => self
+                .current
+                .clone()
+                .ok_or_else(|| anyhow!("no previous instance found")),
+        }
+    }
+
+    fn instantiate(&self, module: &[u8]) -> Result<Outcome<Instance>> {
+        let module = Module::new(&self.store, module)?;
+        let mut imports = Vec::new();
+        for import in module.imports() {
+            if import.module() == "spectest" {
+                let spectest = self
+                    .spectest
+                    .as_ref()
+                    .ok_or_else(|| anyhow!("spectest module isn't instantiated"))?;
+                let export = spectest
+                    .get(import.name())
+                    .ok_or_else(|| anyhow!("unknown import `spectest::{}`", import.name()))?;
+                imports.push(export.clone());
+                continue;
+            }
+
+            let instance = self
+                .instances
+                .get(import.module())
+                .ok_or_else(|| anyhow!("no module named `{}`", import.module()))?;
+            let export = instance
+                .get_export(import.name())
+                .ok_or_else(|| anyhow!("unknown import `{}::{}`", import.name(), import.module()))?
+                .clone();
+            imports.push(export);
+        }
+        let instance = match Instance::new(&module, &imports) {
+            Ok(i) => i,
+            Err(e) => return e.downcast::<Trap>().map(Outcome::Trap),
+        };
+        Ok(Outcome::Ok(instance))
+    }
+
+    /// Register "spectest" which is used by the spec testsuite.
+    pub fn register_spectest(&mut self) -> Result<()> {
+        self.spectest = Some(instantiate_spectest(&self.store));
+        Ok(())
+    }
+
+    /// Perform the action portion of a command.
+    fn perform_execute(&mut self, exec: wast::WastExecute<'_>) -> Result<Outcome> {
+        match exec {
+            wast::WastExecute::Invoke(invoke) => self.perform_invoke(invoke),
+            wast::WastExecute::Module(mut module) => {
+                let binary = module.encode()?;
+                let result = self.instantiate(&binary)?;
+                Ok(match result {
+                    Outcome::Ok(_) => Outcome::Ok(Vec::new()),
+                    Outcome::Trap(e) => Outcome::Trap(e),
+                })
+            }
+            wast::WastExecute::Get { module, global } => self.get(module.map(|s| s.name()), global),
+        }
+    }
+
+    fn perform_invoke(&mut self, exec: wast::WastInvoke<'_>) -> Result<Outcome> {
+        let values = exec
+            .args
+            .iter()
+            .map(runtime_value)
+            .collect::<Result<Vec<_>>>()?;
+        self.invoke(exec.module.map(|i| i.name()), exec.name, &values)
+    }
+
+    /// Define a module and register it.
+    fn module(&mut self, instance_name: Option<&str>, module: &[u8]) -> Result<()> {
+        let instance = match self.instantiate(module)? {
+            Outcome::Ok(i) => i,
+            Outcome::Trap(e) => bail!("instantiation failed with: {}", e.message()),
+        };
+        if let Some(name) = instance_name {
+            self.instances.insert(name.to_string(), instance.clone());
+        }
+        self.current = Some(instance);
+        Ok(())
+    }
+
+    /// Register an instance to make it available for performing actions.
+    fn register(&mut self, name: Option<&str>, as_name: &str) -> Result<()> {
+        let instance = self.get_instance(name)?.clone();
+        self.instances.insert(as_name.to_string(), instance);
+        Ok(())
+    }
+
+    /// Invoke an exported function from an instance.
+    fn invoke(
+        &mut self,
+        instance_name: Option<&str>,
+        field: &str,
+        args: &[Val],
+    ) -> Result<Outcome> {
+        let instance = self.get_instance(instance_name.as_ref().map(|x| &**x))?;
+        let func = instance
+            .get_export(field)
+            .and_then(|e| e.func())
+            .ok_or_else(|| anyhow!("no function named `{}`", field))?;
+        Ok(match func.call(args) {
+            Ok(result) => Outcome::Ok(result.into()),
+            Err(e) => Outcome::Trap(e),
+        })
+    }
+
+    /// Get the value of an exported global from an instance.
+    fn get(&mut self, instance_name: Option<&str>, field: &str) -> Result<Outcome> {
+        let instance = self.get_instance(instance_name.as_ref().map(|x| &**x))?;
+        let global = instance
+            .get_export(field)
+            .and_then(|e| e.global())
+            .ok_or_else(|| anyhow!("no global named `{}`", field))?;
+        Ok(Outcome::Ok(vec![global.get()]))
+    }
+
+    fn assert_return(&self, result: Outcome, results: &[wast::AssertExpression]) -> Result<()> {
+        let values = result.into_result()?;
+        for (v, e) in values.iter().zip(results) {
+            if val_matches(v, e)? {
+                continue;
+            }
+            bail!("expected {:?}, got {:?}", e, v)
+        }
+        Ok(())
+    }
+
+    fn assert_trap(&self, result: Outcome, message: &str) -> Result<()> {
+        let trap = match result {
+            Outcome::Ok(values) => bail!("expected trap, got {:?}", values),
+            Outcome::Trap(t) => t,
+        };
+        if trap.message().contains(message) {
+            return Ok(());
+        }
+        if cfg!(feature = "lightbeam") {
+            println!("TODO: Check the assert_trap message: {}", message);
+            return Ok(());
+        }
+        bail!("expected {}, got {}", message, trap.message())
+    }
+
+    /// Run a wast script from a byte buffer.
+    pub fn run_buffer(&mut self, filename: &str, wast: &[u8]) -> Result<()> {
+        let wast = str::from_utf8(wast)?;
+
+        let adjust_wast = |mut err: wast::Error| {
+            err.set_path(filename.as_ref());
+            err.set_text(wast);
+            err
+        };
+
+        let buf = wast::parser::ParseBuffer::new(wast).map_err(adjust_wast)?;
+        let ast = wast::parser::parse::<wast::Wast>(&buf).map_err(adjust_wast)?;
+
+        for directive in ast.directives {
+            let sp = directive.span();
+            self.run_directive(directive).with_context(|| {
+                let (line, col) = sp.linecol_in(wast);
+                format!("failed directive on {}:{}:{}", filename, line + 1, col)
+            })?;
+        }
+        Ok(())
+    }
+
+    fn run_directive(&mut self, directive: wast::WastDirective) -> Result<()> {
+        use wast::WastDirective::*;
+
+        match directive {
+            Module(mut module) => {
+                let binary = module.encode()?;
+                self.module(module.name.map(|s| s.name()), &binary)?;
+            }
+            Register {
+                span: _,
+                name,
+                module,
+            } => {
+                self.register(module.map(|s| s.name()), name)?;
+            }
+            Invoke(i) => {
+                self.perform_invoke(i)?;
+            }
+            AssertReturn {
+                span: _,
+                exec,
+                results,
+            } => {
+                let result = self.perform_execute(exec)?;
+                self.assert_return(result, &results)?;
+            }
+            AssertTrap {
+                span: _,
+                exec,
+                message,
+            } => {
+                let result = self.perform_execute(exec)?;
+                self.assert_trap(result, message)?;
+            }
+            AssertExhaustion {
+                span: _,
+                call,
+                message,
+            } => {
+                let result = self.perform_invoke(call)?;
+                self.assert_trap(result, message)?;
+            }
+            AssertInvalid {
+                span: _,
+                mut module,
+                message,
+            } => {
+                let bytes = module.encode()?;
+                let err = match self.module(None, &bytes) {
+                    Ok(()) => bail!("expected module to fail to build"),
+                    Err(e) => e,
+                };
+                let error_message = format!("{:?}", err);
+                if !error_message.contains(&message) {
+                    bail!(
+                        "assert_invalid: expected \"{}\", got \"{}\"",
+                        message,
+                        error_message
+                    )
+                }
+            }
+            AssertMalformed {
+                module,
+                span: _,
+                message: _,
+            } => {
+                let mut module = match module {
+                    wast::QuoteModule::Module(m) => m,
+                    // This is a `*.wat` parser test which we're not
+                    // interested in.
+                    wast::QuoteModule::Quote(_) => return Ok(()),
+                };
+                let bytes = module.encode()?;
+                if let Ok(_) = self.module(None, &bytes) {
+                    bail!("expected malformed module to fail to instantiate");
+                }
+            }
+            AssertUnlinkable {
+                span: _,
+                mut module,
+                message,
+            } => {
+                let bytes = module.encode()?;
+                let err = match self.module(None, &bytes) {
+                    Ok(()) => bail!("expected module to fail to link"),
+                    Err(e) => e,
+                };
+                let error_message = format!("{:?}", err);
+                if !error_message.contains(&message) {
+                    bail!(
+                        "assert_unlinkable: expected {}, got {}",
+                        message,
+                        error_message
+                    )
+                }
+            }
+        }
+
+        Ok(())
+    }
+
+    /// Run a wast script from a file.
+    pub fn run_file(&mut self, path: &Path) -> Result<()> {
+        let bytes =
+            std::fs::read(path).with_context(|| format!("failed to read `{}`", path.display()))?;
+        self.run_buffer(path.to_str().unwrap(), &bytes)
+    }
+}
+
+fn extract_lane_as_i8(bytes: u128, lane: usize) -> i8 {
+    (bytes >> (lane * 8)) as i8
+}
+
+fn extract_lane_as_i16(bytes: u128, lane: usize) -> i16 {
+    (bytes >> (lane * 16)) as i16
+}
+
+fn extract_lane_as_i32(bytes: u128, lane: usize) -> i32 {
+    (bytes >> (lane * 32)) as i32
+}
+
+fn extract_lane_as_i64(bytes: u128, lane: usize) -> i64 {
+    (bytes >> (lane * 64)) as i64
+}
+
+fn is_canonical_f32_nan(bits: u32) -> bool {
+    (bits & 0x7fff_ffff) == 0x7fc0_0000
+}
+
+fn is_canonical_f64_nan(bits: u64) -> bool {
+    (bits & 0x7fff_ffff_ffff_ffff) == 0x7ff8_0000_0000_0000
+}
+
+fn is_arithmetic_f32_nan(bits: u32) -> bool {
+    const AF32_NAN: u32 = 0x0040_0000;
+    (bits & AF32_NAN) == AF32_NAN
+}
+
+fn is_arithmetic_f64_nan(bits: u64) -> bool {
+    const AF64_NAN: u64 = 0x0008_0000_0000_0000;
+    (bits & AF64_NAN) == AF64_NAN
+}
+
+fn val_matches(actual: &Val, expected: &wast::AssertExpression) -> Result<bool> {
+    Ok(match (actual, expected) {
+        (Val::I32(a), wast::AssertExpression::I32(b)) => a == b,
+        (Val::I64(a), wast::AssertExpression::I64(b)) => a == b,
+        // Note that these float comparisons are comparing bits, not float
+        // values, so we're testing for bit-for-bit equivalence
+        (Val::F32(a), wast::AssertExpression::F32(b)) => f32_matches(*a, b),
+        (Val::F64(a), wast::AssertExpression::F64(b)) => f64_matches(*a, b),
+        (Val::V128(a), wast::AssertExpression::V128(b)) => v128_matches(*a, b),
+        _ => bail!(
+            "don't know how to compare {:?} and {:?} yet",
+            actual,
+            expected
+        ),
+    })
+}
+
+fn f32_matches(actual: u32, expected: &wast::NanPattern<wast::Float32>) -> bool {
+    match expected {
+        wast::NanPattern::CanonicalNan => is_canonical_f32_nan(actual),
+        wast::NanPattern::ArithmeticNan => is_arithmetic_f32_nan(actual),
+        wast::NanPattern::Value(expected_value) => actual == expected_value.bits,
+    }
+}
+
+fn f64_matches(actual: u64, expected: &wast::NanPattern<wast::Float64>) -> bool {
+    match expected {
+        wast::NanPattern::CanonicalNan => is_canonical_f64_nan(actual),
+        wast::NanPattern::ArithmeticNan => is_arithmetic_f64_nan(actual),
+        wast::NanPattern::Value(expected_value) => actual == expected_value.bits,
+    }
+}
+
+fn v128_matches(actual: u128, expected: &wast::V128Pattern) -> bool {
+    match expected {
+        wast::V128Pattern::I8x16(b) => b
+            .iter()
+            .enumerate()
+            .all(|(i, b)| *b == extract_lane_as_i8(actual, i)),
+        wast::V128Pattern::I16x8(b) => b
+            .iter()
+            .enumerate()
+            .all(|(i, b)| *b == extract_lane_as_i16(actual, i)),
+        wast::V128Pattern::I32x4(b) => b
+            .iter()
+            .enumerate()
+            .all(|(i, b)| *b == extract_lane_as_i32(actual, i)),
+        wast::V128Pattern::I64x2(b) => b
+            .iter()
+            .enumerate()
+            .all(|(i, b)| *b == extract_lane_as_i64(actual, i)),
+        wast::V128Pattern::F32x4(b) => b.iter().enumerate().all(|(i, b)| {
+            let a = extract_lane_as_i32(actual, i) as u32;
+            f32_matches(a, b)
+        }),
+        wast::V128Pattern::F64x2(b) => b.iter().enumerate().all(|(i, b)| {
+            let a = extract_lane_as_i64(actual, i) as u64;
+            f64_matches(a, b)
+        }),
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wig/hostcalls.rs.html b/api/src/wig/hostcalls.rs.html new file mode 100644 index 000000000000..0f2384b57665 --- /dev/null +++ b/api/src/wig/hostcalls.rs.html @@ -0,0 +1,265 @@ +hostcalls.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+
+use crate::utils;
+use proc_macro2::TokenStream;
+use quote::{format_ident, quote};
+
+pub fn define(args: TokenStream) -> TokenStream {
+    let (path, phase) = utils::witx_path_from_args(args);
+    let doc = match witx::load(&[&path]) {
+        Ok(doc) => doc,
+        Err(e) => {
+            panic!("error opening file {}: {}", path, e);
+        }
+    };
+
+    let mut ret = TokenStream::new();
+
+    let old = match phase.as_str() {
+        "snapshot" => false,
+        "old/snapshot_0" => true,
+        s => panic!("unsupported phase: {}", s),
+    };
+
+    for module in doc.modules() {
+        for func in module.funcs() {
+            ret.extend(generate_wrappers(&func, old));
+        }
+    }
+
+    return ret;
+}
+
+fn generate_wrappers(func: &witx::InterfaceFunc, old: bool) -> TokenStream {
+    let name = format_ident!("{}", func.name.as_str());
+    let mut arg_declarations = Vec::new();
+    let mut arg_names = Vec::new();
+
+    for param in func.params.iter() {
+        let name = utils::param_name(param);
+
+        if let witx::TypePassedBy::PointerLengthPair = param.tref.type_().passed_by() {
+            let ptr = format_ident!("{}_ptr", name);
+            let len = format_ident!("{}_len", name);
+            arg_declarations.push(quote! { #ptr: super::wasi32::uintptr_t });
+            arg_declarations.push(quote! { #len: super::wasi32::size_t });
+            arg_names.push(ptr);
+            arg_names.push(len);
+            continue;
+        }
+
+        match &param.tref {
+            witx::TypeRef::Name(n) => {
+                if n.name.as_str() == "size" {
+                    arg_declarations.push(quote! { #name: super::wasi32::size_t });
+                } else {
+                    let ty_name = format_ident!("__wasi_{}_t", n.name.as_str());
+                    arg_declarations.push(quote! { #name: super::wasi::#ty_name });
+                }
+            }
+            witx::TypeRef::Value(v) => match &**v {
+                witx::Type::ConstPointer(_) | witx::Type::Pointer(_) => {
+                    arg_declarations.push(quote! { #name: super::wasi32::uintptr_t });
+                }
+                _ => panic!("unexpected value type"),
+            },
+        }
+        arg_names.push(name);
+    }
+
+    let mut ret = quote!(());
+
+    for (i, result) in func.results.iter().enumerate() {
+        if i == 0 {
+            match &result.tref {
+                witx::TypeRef::Name(n) => {
+                    let ty_name = format_ident!("__wasi_{}_t", n.name.as_str());
+                    ret = quote! { super::wasi::#ty_name };
+                }
+                witx::TypeRef::Value(_) => panic!("unexpected value type"),
+            }
+            continue;
+        }
+        let name = utils::param_name(result);
+        arg_declarations.push(quote! { #name: super::wasi32::uintptr_t });
+        arg_names.push(name);
+    }
+
+    let call = quote! {
+        super::hostcalls_impl::#name(wasi_ctx, memory, #(#arg_names,)*)
+    };
+    let body = if func.results.len() == 0 {
+        call
+    } else {
+        quote! {
+            let ret = #call
+                .err()
+                .unwrap_or(super::Error::ESUCCESS)
+                .as_wasi_error();
+            log::trace!("     | errno={}", ret);
+            ret.as_raw_errno()
+        }
+    };
+
+    let c_abi_name = if old {
+        format_ident!("old_wasi_common_{}", name)
+    } else {
+        format_ident!("wasi_common_{}", name)
+    };
+
+    quote! {
+        pub unsafe fn #name(
+            wasi_ctx: &mut super::WasiCtx,
+            memory: &mut [u8],
+            #(#arg_declarations,)*
+        ) -> #ret {
+            #body
+        }
+
+        #[no_mangle]
+        pub unsafe fn #c_abi_name(
+            wasi_ctx: *mut super::WasiCtx,
+            memory: *mut u8,
+            memory_len: usize,
+            #(#arg_declarations,)*
+        ) -> #ret {
+            #name(
+                &mut *wasi_ctx,
+                std::slice::from_raw_parts_mut(memory, memory_len),
+                #(#arg_names,)*
+            )
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wig/lib.rs.html b/api/src/wig/lib.rs.html new file mode 100644 index 000000000000..fa28790a97e9 --- /dev/null +++ b/api/src/wig/lib.rs.html @@ -0,0 +1,91 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+
+extern crate proc_macro;
+
+mod hostcalls;
+mod raw_types;
+mod utils;
+mod wasi;
+
+use proc_macro::TokenStream;
+use proc_macro2::TokenStream as TokenStream2;
+
+#[proc_macro]
+pub fn witx_host_types(args: TokenStream) -> TokenStream {
+    TokenStream::from(raw_types::gen(
+        TokenStream2::from(args),
+        raw_types::Mode::Host,
+    ))
+}
+
+#[proc_macro]
+pub fn witx_wasi_types(args: TokenStream) -> TokenStream {
+    TokenStream::from(raw_types::gen(
+        TokenStream2::from(args),
+        raw_types::Mode::Wasi,
+    ))
+}
+
+#[proc_macro]
+pub fn witx_wasi32_types(args: TokenStream) -> TokenStream {
+    TokenStream::from(raw_types::gen(
+        TokenStream2::from(args),
+        raw_types::Mode::Wasi32,
+    ))
+}
+
+/// A single-use macro in the `wasmtime-wasi` crate.
+#[proc_macro]
+pub fn define_wasi_struct(args: TokenStream) -> TokenStream {
+    wasi::define_struct(args.into()).into()
+}
+
+#[proc_macro]
+pub fn define_hostcalls(args: TokenStream) -> TokenStream {
+    hostcalls::define(args.into()).into()
+}
+
+
\ No newline at end of file diff --git a/api/src/wig/raw_types.rs.html b/api/src/wig/raw_types.rs.html new file mode 100644 index 000000000000..ffec9d1cc482 --- /dev/null +++ b/api/src/wig/raw_types.rs.html @@ -0,0 +1,591 @@ +raw_types.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+
+//! Translate witx types to Rust.
+
+use crate::utils;
+use heck::ShoutySnakeCase;
+use proc_macro2::{Delimiter, Group, Literal, TokenStream, TokenTree};
+use quote::{format_ident, quote};
+use std::convert::TryFrom;
+
+#[derive(Copy, Clone, Debug, Eq, PartialEq)]
+pub enum Mode {
+    Host,
+    Wasi32,
+    Wasi,
+}
+
+impl Mode {
+    pub fn include_target_types(&self) -> bool {
+        match self {
+            Mode::Host | Mode::Wasi32 => true,
+            Mode::Wasi => false,
+        }
+    }
+}
+
+pub fn gen(args: TokenStream, mode: Mode) -> TokenStream {
+    let mut output = TokenStream::new();
+
+    let (path, _phase) = utils::witx_path_from_args(args);
+    let doc = match witx::load(&[&path]) {
+        Ok(doc) => doc,
+        Err(e) => {
+            panic!("error opening file {}: {}", path, e);
+        }
+    };
+
+    gen_datatypes(&mut output, &doc, mode);
+
+    output
+}
+
+fn gen_datatypes(output: &mut TokenStream, doc: &witx::Document, mode: Mode) {
+    for namedtype in doc.typenames() {
+        if mode.include_target_types() != namedtype_has_target_size(&namedtype) {
+            continue;
+        }
+
+        gen_datatype(output, mode, &namedtype);
+    }
+}
+
+fn gen_datatype(output: &mut TokenStream, mode: Mode, namedtype: &witx::NamedType) {
+    let wasi_name = format_ident!("__wasi_{}_t", namedtype.name.as_str());
+    match &namedtype.tref {
+        witx::TypeRef::Name(alias_to) => {
+            let to = tref_tokens(mode, &alias_to.tref);
+            output.extend(quote!(pub type #wasi_name = #to;));
+        }
+        witx::TypeRef::Value(v) => match &**v {
+            witx::Type::Int(_) => panic!("unsupported int datatype"),
+            witx::Type::Enum(e) => {
+                let repr = int_repr_tokens(e.repr);
+                output.extend(quote!(pub type #wasi_name = #repr;));
+                for (index, variant) in e.variants.iter().enumerate() {
+                    let value_name = format_ident!(
+                        "__WASI_{}_{}",
+                        namedtype.name.as_str().to_shouty_snake_case(),
+                        variant.name.as_str().to_shouty_snake_case()
+                    );
+                    let index_name = Literal::usize_unsuffixed(index);
+                    output.extend(quote!(pub const #value_name: #wasi_name = #index_name;));
+                }
+            }
+            witx::Type::Flags(f) => {
+                let repr = int_repr_tokens(f.repr);
+                output.extend(quote!(pub type #wasi_name = #repr;));
+                for (index, flag) in f.flags.iter().enumerate() {
+                    let value_name = format_ident!(
+                        "__WASI_{}_{}",
+                        namedtype.name.as_str().to_shouty_snake_case(),
+                        flag.name.as_str().to_shouty_snake_case()
+                    );
+                    let flag_value = Literal::u128_unsuffixed(
+                        1u128
+                            .checked_shl(u32::try_from(index).expect("flag value overflow"))
+                            .expect("flag value overflow"),
+                    );
+                    output.extend(quote!(pub const #value_name: #wasi_name = #flag_value;));
+                }
+            }
+            witx::Type::Struct(s) => {
+                output.extend(quote!(#[repr(C)]));
+                // Types which contain unions can't trivially implement Debug,
+                // Hash, or Eq, because the type itself doesn't record which
+                // union member is active.
+                if struct_has_union(&s) {
+                    output.extend(quote!(#[derive(Copy, Clone)]));
+                    output.extend(quote!(#[allow(missing_debug_implementations)]));
+                } else {
+                    output.extend(quote!(#[derive(Copy, Clone, Debug, Hash, Eq, PartialEq)]));
+                }
+
+                output.extend(quote!(pub struct #wasi_name));
+
+                let mut inner = TokenStream::new();
+                for member in &s.members {
+                    let member_name = format_ident!("r#{}", member.name.as_str());
+                    let member_type = tref_tokens(mode, &member.tref);
+                    inner.extend(quote!(pub #member_name: #member_type,));
+                }
+                let braced = Group::new(Delimiter::Brace, inner);
+                output.extend(TokenStream::from(TokenTree::Group(braced)));
+            }
+            witx::Type::Union(u) => {
+                output.extend(quote!(#[repr(C)]));
+                output.extend(quote!(#[derive(Copy, Clone)]));
+                output.extend(quote!(#[allow(missing_debug_implementations)]));
+
+                output.extend(quote!(pub union #wasi_name));
+
+                let mut inner = TokenStream::new();
+                for variant in &u.variants {
+                    let variant_name = format_ident!("r#{}", variant.name.as_str());
+                    let variant_type = tref_tokens(mode, &variant.tref);
+                    inner.extend(quote!(pub #variant_name: #variant_type,));
+                }
+                let braced = Group::new(Delimiter::Brace, inner);
+                output.extend(TokenStream::from(TokenTree::Group(braced)));
+            }
+            witx::Type::Handle(_h) => {
+                output.extend(quote!(pub type #wasi_name = u32;));
+            }
+            witx::Type::Builtin(b) => {
+                if namedtype.name.as_str() == "size" {
+                    match mode {
+                        Mode::Host => output.extend(quote!(pub type #wasi_name = usize;)),
+                        Mode::Wasi => panic!("size has target-specific size"),
+                        Mode::Wasi32 => output.extend(quote!(pub type #wasi_name = u32;)),
+                    }
+                } else {
+                    let b_type = builtin_tokens(mode, *b);
+                    output.extend(quote!(pub type #wasi_name = #b_type;));
+                }
+            }
+            witx::Type::Pointer { .. }
+            | witx::Type::ConstPointer { .. }
+            | witx::Type::Array { .. } => {
+                let tref_tokens = tref_tokens(mode, &namedtype.tref);
+                output.extend(quote!(pub type #wasi_name = #tref_tokens;));
+            }
+        },
+    }
+
+    if namedtype.name.as_str() == "errno" {
+        // Generate strerror for errno type
+        gen_errno_strerror(output, namedtype);
+    }
+}
+
+fn gen_errno_strerror(output: &mut TokenStream, namedtype: &witx::NamedType) {
+    let inner = match &namedtype.tref {
+        witx::TypeRef::Value(v) => match &**v {
+            witx::Type::Enum(e) => e,
+            x => panic!("expected Enum('errno'), instead received {:?}", x),
+        },
+        x => panic!("expected Enum('errno'), instead received {:?}", x),
+    };
+    let mut inner_group = TokenStream::new();
+    for variant in &inner.variants {
+        let value_name = format_ident!(
+            "__WASI_ERRNO_{}",
+            variant.name.as_str().to_shouty_snake_case()
+        );
+        let docs = variant.docs.trim();
+        inner_group.extend(quote!(#value_name => #docs,));
+    }
+    output.extend(
+        quote!(pub fn strerror(errno: __wasi_errno_t) -> &'static str {
+            match errno {
+                #inner_group
+                other => panic!("Undefined errno value {:?}", other),
+            }
+        }),
+    );
+}
+
+fn int_repr_tokens(int_repr: witx::IntRepr) -> TokenStream {
+    match int_repr {
+        witx::IntRepr::U8 => quote!(u8),
+        witx::IntRepr::U16 => quote!(u16),
+        witx::IntRepr::U32 => quote!(u32),
+        witx::IntRepr::U64 => quote!(u64),
+    }
+}
+
+fn builtin_tokens(mode: Mode, builtin: witx::BuiltinType) -> TokenStream {
+    match builtin {
+        witx::BuiltinType::String => match mode {
+            Mode::Host => quote!((*const u8, usize)),
+            Mode::Wasi => panic!("strings have target-specific size"),
+            Mode::Wasi32 => quote!((u32, u32)),
+        },
+        witx::BuiltinType::Char8 => quote!(i8),
+        witx::BuiltinType::U8 => quote!(u8),
+        witx::BuiltinType::U16 => quote!(u16),
+        witx::BuiltinType::U32 => quote!(u32),
+        witx::BuiltinType::U64 => quote!(u64),
+        witx::BuiltinType::S8 => quote!(i8),
+        witx::BuiltinType::S16 => quote!(i16),
+        witx::BuiltinType::S32 => quote!(i32),
+        witx::BuiltinType::S64 => quote!(i64),
+        witx::BuiltinType::F32 => quote!(f32),
+        witx::BuiltinType::F64 => quote!(f64),
+        witx::BuiltinType::USize => match mode {
+            Mode::Host => quote!(usize),
+            Mode::Wasi => panic!("usize has target-specific size"),
+            Mode::Wasi32 => quote!(u32),
+        },
+    }
+}
+
+fn tref_tokens(mode: Mode, tref: &witx::TypeRef) -> TokenStream {
+    match tref {
+        witx::TypeRef::Name(n) => TokenStream::from(TokenTree::Ident(format_ident!(
+            "__wasi_{}_t",
+            n.name.as_str()
+        ))),
+        witx::TypeRef::Value(v) => match &**v {
+            witx::Type::Builtin(b) => builtin_tokens(mode, *b),
+            witx::Type::Pointer(pointee) => {
+                let pointee = tref_tokens(mode, pointee);
+                match mode {
+                    Mode::Host => quote!(*mut #pointee),
+                    Mode::Wasi => panic!("pointers have target-specific size"),
+                    Mode::Wasi32 => quote!(u32),
+                }
+            }
+            witx::Type::ConstPointer(pointee) => {
+                let pointee = tref_tokens(mode, pointee);
+                match mode {
+                    Mode::Host => quote!(*const #pointee),
+                    Mode::Wasi => panic!("pointers have target-specific size"),
+                    Mode::Wasi32 => quote!(u32),
+                }
+            }
+            witx::Type::Array(element) => {
+                let element_name = tref_tokens(mode, element);
+                match mode {
+                    Mode::Host => quote!((*const #element_name, usize)),
+                    Mode::Wasi => panic!("arrays have target-specific size"),
+                    Mode::Wasi32 => quote!((u32, u32)),
+                }
+            }
+            t => panic!("cannot give name to anonymous type {:?}", t),
+        },
+    }
+}
+
+/// Test whether the given struct contains any union members.
+fn struct_has_union(s: &witx::StructDatatype) -> bool {
+    s.members.iter().any(|member| match &*member.tref.type_() {
+        witx::Type::Union { .. } => true,
+        witx::Type::Struct(s) => struct_has_union(&s),
+        _ => false,
+    })
+}
+
+/// Test whether the type referred to has a target-specific size.
+fn tref_has_target_size(tref: &witx::TypeRef) -> bool {
+    match tref {
+        witx::TypeRef::Name(nt) => namedtype_has_target_size(&nt),
+        witx::TypeRef::Value(t) => type_has_target_size(&t),
+    }
+}
+
+/// Test whether the given named type has a target-specific size.
+fn namedtype_has_target_size(nt: &witx::NamedType) -> bool {
+    if nt.name.as_str() == "size" {
+        true
+    } else {
+        tref_has_target_size(&nt.tref)
+    }
+}
+
+/// Test whether the given type has a target-specific size.
+fn type_has_target_size(ty: &witx::Type) -> bool {
+    match ty {
+        witx::Type::Builtin(witx::BuiltinType::String) => true,
+        witx::Type::Pointer { .. } | witx::Type::ConstPointer { .. } => true,
+        witx::Type::Array(elem) => tref_has_target_size(elem),
+        witx::Type::Struct(s) => s.members.iter().any(|m| tref_has_target_size(&m.tref)),
+        witx::Type::Union(u) => u.variants.iter().any(|v| tref_has_target_size(&v.tref)),
+        _ => false,
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/wig/utils.rs.html b/api/src/wig/utils.rs.html new file mode 100644 index 000000000000..844959ecb333 --- /dev/null +++ b/api/src/wig/utils.rs.html @@ -0,0 +1,133 @@ +utils.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+
+use proc_macro2::{Ident, Literal, TokenStream, TokenTree};
+
+/// Given the input tokens to a macro invocation, return the path to the
+/// witx file to process.
+pub(crate) fn witx_path_from_args(args: TokenStream) -> (String, String) {
+    let mut strings = Vec::new();
+
+    for arg in args {
+        if let TokenTree::Literal(literal) = arg {
+            let parsed = parse_string_literal(literal);
+
+            strings.push(parsed);
+        } else {
+            panic!("arguments must be string literals");
+        }
+    }
+
+    if strings.len() != 2 {
+        panic!("expected two string literals");
+    }
+
+    let phase = &strings[0];
+    let id = &strings[1];
+    let path = witx_path(phase, id);
+
+    (path, phase.clone())
+}
+
+fn witx_path(phase: &str, id: &str) -> String {
+    let root = env!("CARGO_MANIFEST_DIR");
+    format!("{}/WASI/phases/{}/witx/{}.witx", root, phase, id)
+}
+
+// Convert a `Literal` holding a string literal into the `String`.
+//
+// FIXME: It feels like there should be an easier way to do this.
+fn parse_string_literal(literal: Literal) -> String {
+    let s = literal.to_string();
+    assert!(
+        s.starts_with('"') && s.ends_with('"'),
+        "string literal must be enclosed in double-quotes"
+    );
+
+    let trimmed = s[1..s.len() - 1].to_owned();
+    assert!(
+        !trimmed.contains('"'),
+        "string literal must not contain embedded quotes for now"
+    );
+    assert!(
+        !trimmed.contains('\\'),
+        "string literal must not contain embedded backslashes for now"
+    );
+
+    trimmed
+}
+
+pub fn param_name(param: &witx::InterfaceFuncParam) -> Ident {
+    quote::format_ident!(
+        "{}",
+        match param.name.as_str() {
+            "in" | "type" => format!("r#{}", param.name.as_str()),
+            s => s.to_string(),
+        }
+    )
+}
+
+
\ No newline at end of file diff --git a/api/src/wig/wasi.rs.html b/api/src/wig/wasi.rs.html new file mode 100644 index 000000000000..06c98a3061cd --- /dev/null +++ b/api/src/wig/wasi.rs.html @@ -0,0 +1,507 @@ +wasi.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+
+use crate::utils;
+use proc_macro2::{Ident, Span, TokenStream};
+use quote::{format_ident, quote};
+
+enum Abi {
+    I32,
+    I64,
+    F32,
+    F64,
+}
+
+/// This is a single-use macro intended to be used in the `wasmtime-wasi` crate.
+///
+/// This macro will generate a structure, `Wasi`, which will create all the
+/// functions necessary to bind wasi and hook everything up via the `wasmtime`
+/// crate.
+///
+/// The generated shim functions here will also `trace!` their arguments for
+/// logging purposes. Otherwise this is hopefully somewhat straightforward!
+///
+/// I'd recommend using `cargo +nightly expand` to explore the output of this
+/// macro some more.
+pub fn define_struct(args: TokenStream) -> TokenStream {
+    let (path, _phase) = utils::witx_path_from_args(args);
+    let doc = match witx::load(&[&path]) {
+        Ok(doc) => doc,
+        Err(e) => {
+            panic!("error opening file {}: {}", path, e);
+        }
+    };
+
+    let mut fields = Vec::new();
+    let mut get_exports = Vec::new();
+    let mut ctor_externs = Vec::new();
+    let mut ctor_fields = Vec::new();
+
+    for module in doc.modules() {
+        for func in module.funcs() {
+            let name = func.name.as_str();
+            let name_ident = Ident::new(func.name.as_str(), Span::call_site());
+            fields.push(quote! { pub #name_ident: wasmtime::Func });
+            get_exports.push(quote! { #name => Some(&self.#name_ident) });
+            ctor_fields.push(name_ident.clone());
+
+            let mut shim_arg_decls = Vec::new();
+            let mut params = Vec::new();
+            let mut formats = Vec::new();
+            let mut format_args = Vec::new();
+            let mut hostcall_args = Vec::new();
+
+            for param in func.params.iter() {
+                let name = utils::param_name(param);
+
+                // Registers a new parameter to the shim we're making with the
+                // given `name`, the `abi_ty` wasm type and `hex` defines
+                // whether it's debug-printed in a hex format or not.
+                //
+                // This will register a whole bunch of things:
+                //
+                // * The cranelift type for the parameter
+                // * Syntax to specify the actual function parameter
+                // * How to log the parameter value in a call to `trace!`
+                // * How to actually pass this argument to the host
+                //   implementation, converting as necessary.
+                let mut add_param = |name: &Ident, abi_ty: Abi, hex: bool| {
+                    match abi_ty {
+                        Abi::I32 => {
+                            params.push(quote! { types::I32 });
+                            shim_arg_decls.push(quote! { #name: i32 });
+                        }
+                        Abi::I64 => {
+                            params.push(quote! { types::I64 });
+                            shim_arg_decls.push(quote! { #name: i64 });
+                        }
+                        Abi::F32 => {
+                            params.push(quote! { types::F32 });
+                            shim_arg_decls.push(quote! { #name: f32 });
+                        }
+                        Abi::F64 => {
+                            params.push(quote! { types::F64 });
+                            shim_arg_decls.push(quote! { #name: f64 });
+                        }
+                    }
+                    formats.push(format!("{}={}", name, if hex { "{:#x}" } else { "{}" },));
+                    format_args.push(name.clone());
+                    hostcall_args.push(quote! { #name as _ });
+                };
+
+                match &*param.tref.type_() {
+                    witx::Type::Int(e) => match e.repr {
+                        witx::IntRepr::U64 => add_param(&name, Abi::I64, false),
+                        _ => add_param(&name, Abi::I32, false),
+                    },
+
+                    witx::Type::Enum(e) => match e.repr {
+                        witx::IntRepr::U64 => add_param(&name, Abi::I64, false),
+                        _ => add_param(&name, Abi::I32, false),
+                    },
+
+                    witx::Type::Flags(f) => match f.repr {
+                        witx::IntRepr::U64 => add_param(&name, Abi::I64, true),
+                        _ => add_param(&name, Abi::I32, true),
+                    },
+
+                    witx::Type::Builtin(witx::BuiltinType::Char8)
+                    | witx::Type::Builtin(witx::BuiltinType::S8)
+                    | witx::Type::Builtin(witx::BuiltinType::U8)
+                    | witx::Type::Builtin(witx::BuiltinType::S16)
+                    | witx::Type::Builtin(witx::BuiltinType::U16)
+                    | witx::Type::Builtin(witx::BuiltinType::S32)
+                    | witx::Type::Builtin(witx::BuiltinType::U32)
+                    | witx::Type::Builtin(witx::BuiltinType::USize) => {
+                        add_param(&name, Abi::I32, false);
+                    }
+
+                    witx::Type::Builtin(witx::BuiltinType::S64)
+                    | witx::Type::Builtin(witx::BuiltinType::U64) => {
+                        add_param(&name, Abi::I64, false);
+                    }
+
+                    witx::Type::Builtin(witx::BuiltinType::F32) => {
+                        add_param(&name, Abi::F32, false);
+                    }
+
+                    witx::Type::Builtin(witx::BuiltinType::F64) => {
+                        add_param(&name, Abi::F64, false);
+                    }
+
+                    // strings/arrays have an extra ABI parameter for the length
+                    // of the array passed.
+                    witx::Type::Builtin(witx::BuiltinType::String) | witx::Type::Array(_) => {
+                        add_param(&name, Abi::I32, true);
+                        let len = format_ident!("{}_len", name);
+                        add_param(&len, Abi::I32, false);
+                    }
+
+                    witx::Type::ConstPointer(_)
+                    | witx::Type::Handle(_)
+                    | witx::Type::Pointer(_) => {
+                        add_param(&name, Abi::I32, true);
+                    }
+
+                    witx::Type::Struct(_) | witx::Type::Union(_) => {
+                        panic!("unsupported argument type")
+                    }
+                }
+            }
+
+            let mut results = func.results.iter();
+            let mut ret_ty = quote! { () };
+            let mut cvt_ret = quote! {};
+            let mut returns = Vec::new();
+            let mut handle_early_error = quote! { panic!("error: {:?}", e) };
+
+            // The first result is returned bare right now...
+            if let Some(ret) = results.next() {
+                handle_early_error = quote! { return e.into() };
+                match &*ret.tref.type_() {
+                    // Eventually we'll want to add support for more returned
+                    // types, but for now let's just conform to what `*.witx`
+                    // definitions currently use.
+                    witx::Type::Enum(e) => match e.repr {
+                        witx::IntRepr::U16 => {
+                            returns.push(quote! { types::I32 });
+                            ret_ty = quote! { i32 };
+                            cvt_ret = quote! { .into() }
+                        }
+                        other => panic!("unsupported ret enum repr {:?}", other),
+                    },
+                    other => panic!("unsupported first return {:?}", other),
+                }
+            }
+
+            // ... and all remaining results are returned via out-poiners
+            for result in results {
+                let name = format_ident!("{}", result.name.as_str());
+                params.push(quote! { types::I32 });
+                shim_arg_decls.push(quote! { #name: i32 });
+                formats.push(format!("{}={{:#x}}", name));
+                format_args.push(name.clone());
+                hostcall_args.push(quote! { #name as u32 });
+            }
+
+            let format_str = format!("{}({})", name, formats.join(", "));
+            let wrap = format_ident!("wrap{}", shim_arg_decls.len() + 1);
+            ctor_externs.push(quote! {
+                let my_cx = cx.clone();
+                let #name_ident = wasmtime::Func::#wrap(
+                    store,
+                    move |mem: crate::WasiCallerMemory #(,#shim_arg_decls)*| -> #ret_ty {
+                        log::trace!(
+                            #format_str,
+                            #(#format_args),*
+                        );
+                        unsafe {
+                            let memory = match mem.get() {
+                                Ok(e) => e,
+                                Err(e) => #handle_early_error,
+                            };
+                            hostcalls::#name_ident(
+                                &mut my_cx.borrow_mut(),
+                                memory,
+                                #(#hostcall_args),*
+                            ) #cvt_ret
+                        }
+                    }
+                );
+            });
+        }
+    }
+
+    quote! {
+        /// An instantiated instance of the wasi exports.
+        ///
+        /// This represents a wasi module which can be used to instantiate other
+        /// wasm modules. This structure exports all that various fields of the
+        /// wasi instance as fields which can be used to implement your own
+        /// instantiation logic, if necessary. Additionally [`Wasi::get_export`]
+        /// can be used to do name-based resolution.
+        pub struct Wasi {
+            #(#fields,)*
+        }
+
+        impl Wasi {
+            /// Creates a new [`Wasi`] instance.
+            ///
+            /// External values are allocated into the `store` provided and
+            /// configuration of the wasi instance itself should be all
+            /// contained in the `cx` parameter.
+            pub fn new(store: &wasmtime::Store, cx: WasiCtx) -> Wasi {
+                let cx = std::rc::Rc::new(std::cell::RefCell::new(cx));
+                #(#ctor_externs)*
+
+                Wasi {
+                    #(#ctor_fields,)*
+                }
+            }
+
+            /// Looks up a field called `name` in this structure, returning it
+            /// if found.
+            ///
+            /// This is often useful when instantiating a `wasmtime` instance
+            /// where name resolution often happens with strings.
+            pub fn get_export(&self, name: &str) -> Option<&wasmtime::Func> {
+                match name {
+                    #(#get_exports,)*
+                    _ => None,
+                }
+            }
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/winx/lib.rs.html b/api/src/winx/lib.rs.html new file mode 100644 index 000000000000..1a06713d76ce --- /dev/null +++ b/api/src/winx/lib.rs.html @@ -0,0 +1,65 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
+#![deny(
+    // missing_docs,
+    trivial_numeric_casts,
+    unused_extern_crates,
+    unstable_features
+)]
+#![warn(unused_import_braces)]
+#![cfg_attr(feature = "clippy", plugin(clippy(conf_file = "../clippy.toml")))]
+#![cfg_attr(feature = "cargo-clippy", allow(clippy::new_without_default))]
+#![cfg_attr(
+    feature = "cargo-clippy",
+    warn(
+        clippy::float_arithmetic,
+        clippy::mut_mut,
+        clippy::nonminimal_bool,
+        clippy::option_map_unwrap_or,
+        clippy::option_map_unwrap_or_else,
+        clippy::unicode_not_nfc,
+        clippy::use_self
+    )
+)]
+#![cfg(windows)]
+
+pub mod file;
+mod ntdll;
+pub mod time;
+pub mod winerror;
+
+use winerror::WinError;
+
+pub type Result<T> = std::result::Result<T, WinError>;
+
+
\ No newline at end of file diff --git a/api/src/yanix/clock.rs.html b/api/src/yanix/clock.rs.html new file mode 100644 index 000000000000..b6febb42caff --- /dev/null +++ b/api/src/yanix/clock.rs.html @@ -0,0 +1,77 @@ +clock.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+
+use crate::{Errno, Result};
+use std::mem::MaybeUninit;
+
+#[derive(Debug, Copy, Clone)]
+pub enum ClockId {
+    Realtime,
+    Monotonic,
+    ProcessCPUTime,
+    ThreadCPUTime,
+}
+
+impl ClockId {
+    pub fn as_raw(&self) -> libc::clockid_t {
+        match self {
+            Self::Realtime => libc::CLOCK_REALTIME,
+            Self::Monotonic => libc::CLOCK_MONOTONIC,
+            Self::ProcessCPUTime => libc::CLOCK_PROCESS_CPUTIME_ID,
+            Self::ThreadCPUTime => libc::CLOCK_THREAD_CPUTIME_ID,
+        }
+    }
+}
+
+pub fn clock_getres(clock_id: ClockId) -> Result<libc::timespec> {
+    let mut timespec = MaybeUninit::<libc::timespec>::uninit();
+    Errno::from_success_code(unsafe {
+        libc::clock_getres(clock_id.as_raw(), timespec.as_mut_ptr())
+    })?;
+    Ok(unsafe { timespec.assume_init() })
+}
+
+pub fn clock_gettime(clock_id: ClockId) -> Result<libc::timespec> {
+    let mut timespec = MaybeUninit::<libc::timespec>::uninit();
+    Errno::from_success_code(unsafe {
+        libc::clock_gettime(clock_id.as_raw(), timespec.as_mut_ptr())
+    })?;
+    Ok(unsafe { timespec.assume_init() })
+}
+
+
\ No newline at end of file diff --git a/api/src/yanix/dir.rs.html b/api/src/yanix/dir.rs.html new file mode 100644 index 000000000000..559fa749640b --- /dev/null +++ b/api/src/yanix/dir.rs.html @@ -0,0 +1,331 @@ +dir.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+
+use crate::{
+    sys::dir::{iter_impl, EntryImpl},
+    Errno, Result,
+};
+use std::os::unix::io::{AsRawFd, IntoRawFd, RawFd};
+use std::{ffi::CStr, ops::Deref, ptr};
+
+pub use crate::sys::EntryExt;
+
+#[derive(Clone, Debug, Eq, Hash, PartialEq)]
+pub struct Dir(ptr::NonNull<libc::DIR>);
+
+impl Dir {
+    /// Takes the ownership of the passed-in descriptor-based object,
+    /// and creates a new instance of `Dir`.
+    #[inline]
+    pub fn from<F: IntoRawFd>(fd: F) -> Result<Self> {
+        let fd = fd.into_raw_fd();
+        unsafe { Self::from_fd(fd) }
+    }
+
+    unsafe fn from_fd(fd: RawFd) -> Result<Self> {
+        let d = libc::fdopendir(fd);
+        if let Some(d) = ptr::NonNull::new(d) {
+            Ok(Self(d))
+        } else {
+            let e = Errno::last();
+            libc::close(fd);
+            Err(e.into())
+        }
+    }
+
+    /// Set the position of the directory stream, see `seekdir(3)`.
+    #[cfg(not(target_os = "android"))]
+    pub fn seek(&mut self, loc: SeekLoc) {
+        unsafe { libc::seekdir(self.0.as_ptr(), loc.0) }
+    }
+
+    /// Reset directory stream, see `rewinddir(3)`.
+    pub fn rewind(&mut self) {
+        unsafe { libc::rewinddir(self.0.as_ptr()) }
+    }
+
+    /// Get the current position in the directory stream.
+    ///
+    /// If this location is given to `Dir::seek`, the entries up to the previously returned
+    /// will be omitted and the iteration will start from the currently pending directory entry.
+    #[cfg(not(target_os = "android"))]
+    #[allow(dead_code)]
+    pub fn tell(&self) -> SeekLoc {
+        let loc = unsafe { libc::telldir(self.0.as_ptr()) };
+        SeekLoc(loc)
+    }
+
+    /// For use by platform-specific implementation code. Returns the raw
+    /// underlying state.
+    pub(crate) fn as_raw(&self) -> ptr::NonNull<libc::DIR> {
+        self.0
+    }
+}
+
+unsafe impl Send for Dir {}
+
+impl AsRawFd for Dir {
+    fn as_raw_fd(&self) -> RawFd {
+        unsafe { libc::dirfd(self.0.as_ptr()) }
+    }
+}
+
+impl Drop for Dir {
+    fn drop(&mut self) {
+        unsafe { libc::closedir(self.0.as_ptr()) };
+    }
+}
+
+#[derive(Debug, Copy, Clone)]
+pub struct Entry(pub(crate) EntryImpl);
+
+impl Entry {
+    /// Returns the file name of this directory entry.
+    pub fn file_name(&self) -> &CStr {
+        unsafe { CStr::from_ptr(self.0.d_name.as_ptr()) }
+    }
+
+    /// Returns the type of this directory entry.
+    pub fn file_type(&self) -> FileType {
+        FileType::from_raw(self.0.d_type)
+    }
+}
+
+#[cfg(not(target_os = "android"))]
+#[derive(Clone, Copy, Debug)]
+pub struct SeekLoc(pub(crate) libc::c_long);
+
+#[cfg(not(target_os = "android"))]
+impl SeekLoc {
+    pub fn to_raw(&self) -> i64 {
+        self.0.into()
+    }
+}
+
+#[derive(Clone, Copy, Debug)]
+#[repr(u8)]
+pub enum FileType {
+    CharacterDevice = libc::DT_CHR,
+    Directory = libc::DT_DIR,
+    BlockDevice = libc::DT_BLK,
+    RegularFile = libc::DT_REG,
+    Symlink = libc::DT_LNK,
+    Fifo = libc::DT_FIFO,
+    Socket = libc::DT_SOCK,
+    Unknown = libc::DT_UNKNOWN,
+}
+
+impl FileType {
+    pub fn from_raw(file_type: u8) -> Self {
+        match file_type {
+            libc::DT_CHR => Self::CharacterDevice,
+            libc::DT_DIR => Self::Directory,
+            libc::DT_BLK => Self::BlockDevice,
+            libc::DT_REG => Self::RegularFile,
+            libc::DT_LNK => Self::Symlink,
+            libc::DT_SOCK => Self::Socket,
+            libc::DT_FIFO => Self::Fifo,
+            /* libc::DT_UNKNOWN */ _ => Self::Unknown,
+        }
+    }
+
+    pub fn to_raw(&self) -> u8 {
+        match self {
+            Self::CharacterDevice => libc::DT_CHR,
+            Self::Directory => libc::DT_DIR,
+            Self::BlockDevice => libc::DT_BLK,
+            Self::RegularFile => libc::DT_REG,
+            Self::Symlink => libc::DT_LNK,
+            Self::Socket => libc::DT_SOCK,
+            Self::Fifo => libc::DT_FIFO,
+            Self::Unknown => libc::DT_UNKNOWN,
+        }
+    }
+}
+
+#[derive(Debug)]
+pub struct DirIter<T: Deref<Target = Dir>>(T);
+
+impl<T> DirIter<T>
+where
+    T: Deref<Target = Dir>,
+{
+    pub fn new(dir: T) -> Self {
+        Self(dir)
+    }
+}
+
+impl<T> Iterator for DirIter<T>
+where
+    T: Deref<Target = Dir>,
+{
+    type Item = Result<Entry>;
+
+    fn next(&mut self) -> Option<Self::Item> {
+        iter_impl(&self.0).map(|x| x.map(Entry))
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/yanix/errno.rs.html b/api/src/yanix/errno.rs.html new file mode 100644 index 000000000000..73834567edb2 --- /dev/null +++ b/api/src/yanix/errno.rs.html @@ -0,0 +1,457 @@ +errno.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+
+//! Errno-specific for different Unix platforms
+use crate::Result;
+use std::{fmt, io};
+use thiserror::Error;
+
+#[derive(Debug, Copy, Clone, Error, PartialEq, Eq, Hash)]
+#[repr(i32)]
+pub enum Errno {
+    EPERM = libc::EPERM,
+    ENOENT = libc::ENOENT,
+    ESRCH = libc::ESRCH,
+    EINTR = libc::EINTR,
+    EIO = libc::EIO,
+    ENXIO = libc::ENXIO,
+    E2BIG = libc::E2BIG,
+    ENOEXEC = libc::ENOEXEC,
+    EBADF = libc::EBADF,
+    ECHILD = libc::ECHILD,
+    EAGAIN = libc::EAGAIN,
+    ENOMEM = libc::ENOMEM,
+    EACCES = libc::EACCES,
+    EFAULT = libc::EFAULT,
+    EBUSY = libc::EBUSY,
+    EEXIST = libc::EEXIST,
+    EXDEV = libc::EXDEV,
+    ENODEV = libc::ENODEV,
+    ENOTDIR = libc::ENOTDIR,
+    EISDIR = libc::EISDIR,
+    EINVAL = libc::EINVAL,
+    ENFILE = libc::ENFILE,
+    EMFILE = libc::EMFILE,
+    ENOTTY = libc::ENOTTY,
+    ETXTBSY = libc::ETXTBSY,
+    EFBIG = libc::EFBIG,
+    ENOSPC = libc::ENOSPC,
+    ESPIPE = libc::ESPIPE,
+    EROFS = libc::EROFS,
+    EMLINK = libc::EMLINK,
+    EPIPE = libc::EPIPE,
+    EDOM = libc::EDOM,
+    ERANGE = libc::ERANGE,
+    EDEADLK = libc::EDEADLK,
+    ENAMETOOLONG = libc::ENAMETOOLONG,
+    ENOLCK = libc::ENOLCK,
+    ENOSYS = libc::ENOSYS,
+    ENOTEMPTY = libc::ENOTEMPTY,
+    ELOOP = libc::ELOOP,
+    ENOMSG = libc::ENOMSG,
+    EIDRM = libc::EIDRM,
+    ENOLINK = libc::ENOLINK,
+    EPROTO = libc::EPROTO,
+    EMULTIHOP = libc::EMULTIHOP,
+    EBADMSG = libc::EBADMSG,
+    EOVERFLOW = libc::EOVERFLOW,
+    EILSEQ = libc::EILSEQ,
+    ENOTSOCK = libc::ENOTSOCK,
+    EDESTADDRREQ = libc::EDESTADDRREQ,
+    EMSGSIZE = libc::EMSGSIZE,
+    EPROTOTYPE = libc::EPROTOTYPE,
+    ENOPROTOOPT = libc::ENOPROTOOPT,
+    EPROTONOSUPPORT = libc::EPROTONOSUPPORT,
+    EAFNOSUPPORT = libc::EAFNOSUPPORT,
+    EADDRINUSE = libc::EADDRINUSE,
+    EADDRNOTAVAIL = libc::EADDRNOTAVAIL,
+    ENETDOWN = libc::ENETDOWN,
+    ENETUNREACH = libc::ENETUNREACH,
+    ENETRESET = libc::ENETRESET,
+    ECONNABORTED = libc::ECONNABORTED,
+    ECONNRESET = libc::ECONNRESET,
+    ENOBUFS = libc::ENOBUFS,
+    EISCONN = libc::EISCONN,
+    ENOTCONN = libc::ENOTCONN,
+    ETIMEDOUT = libc::ETIMEDOUT,
+    ECONNREFUSED = libc::ECONNREFUSED,
+    EHOSTUNREACH = libc::EHOSTUNREACH,
+    EALREADY = libc::EALREADY,
+    EINPROGRESS = libc::EINPROGRESS,
+    ESTALE = libc::ESTALE,
+    EDQUOT = libc::EDQUOT,
+    ECANCELED = libc::ECANCELED,
+    EOWNERDEAD = libc::EOWNERDEAD,
+    ENOTRECOVERABLE = libc::ENOTRECOVERABLE,
+}
+
+impl Errno {
+    pub fn from_i32(err: i32) -> Self {
+        match err {
+            libc::EPERM => Self::EPERM,
+            libc::ENOENT => Self::ENOENT,
+            libc::ESRCH => Self::ESRCH,
+            libc::EINTR => Self::EINTR,
+            libc::EIO => Self::EIO,
+            libc::ENXIO => Self::ENXIO,
+            libc::E2BIG => Self::E2BIG,
+            libc::ENOEXEC => Self::ENOEXEC,
+            libc::EBADF => Self::EBADF,
+            libc::ECHILD => Self::ECHILD,
+            libc::EAGAIN => Self::EAGAIN,
+            libc::ENOMEM => Self::ENOMEM,
+            libc::EACCES => Self::EACCES,
+            libc::EFAULT => Self::EFAULT,
+            libc::EBUSY => Self::EBUSY,
+            libc::EEXIST => Self::EEXIST,
+            libc::EXDEV => Self::EXDEV,
+            libc::ENODEV => Self::ENODEV,
+            libc::ENOTDIR => Self::ENOTDIR,
+            libc::EISDIR => Self::EISDIR,
+            libc::EINVAL => Self::EINVAL,
+            libc::ENFILE => Self::ENFILE,
+            libc::EMFILE => Self::EMFILE,
+            libc::ENOTTY => Self::ENOTTY,
+            libc::ETXTBSY => Self::ETXTBSY,
+            libc::EFBIG => Self::EFBIG,
+            libc::ENOSPC => Self::ENOSPC,
+            libc::ESPIPE => Self::ESPIPE,
+            libc::EROFS => Self::EROFS,
+            libc::EMLINK => Self::EMLINK,
+            libc::EPIPE => Self::EPIPE,
+            libc::EDOM => Self::EDOM,
+            libc::ERANGE => Self::ERANGE,
+            libc::EDEADLK => Self::EDEADLK,
+            libc::ENAMETOOLONG => Self::ENAMETOOLONG,
+            libc::ENOLCK => Self::ENOLCK,
+            libc::ENOSYS => Self::ENOSYS,
+            libc::ENOTEMPTY => Self::ENOTEMPTY,
+            libc::ELOOP => Self::ELOOP,
+            libc::ENOMSG => Self::ENOMSG,
+            libc::EIDRM => Self::EIDRM,
+            libc::ENOLINK => Self::ENOLINK,
+            libc::EPROTO => Self::EPROTO,
+            libc::EMULTIHOP => Self::EMULTIHOP,
+            libc::EBADMSG => Self::EBADMSG,
+            libc::EOVERFLOW => Self::EOVERFLOW,
+            libc::EILSEQ => Self::EILSEQ,
+            libc::ENOTSOCK => Self::ENOTSOCK,
+            libc::EDESTADDRREQ => Self::EDESTADDRREQ,
+            libc::EMSGSIZE => Self::EMSGSIZE,
+            libc::EPROTOTYPE => Self::EPROTOTYPE,
+            libc::ENOPROTOOPT => Self::ENOPROTOOPT,
+            libc::EPROTONOSUPPORT => Self::EPROTONOSUPPORT,
+            libc::EAFNOSUPPORT => Self::EAFNOSUPPORT,
+            libc::EADDRINUSE => Self::EADDRINUSE,
+            libc::EADDRNOTAVAIL => Self::EADDRNOTAVAIL,
+            libc::ENETDOWN => Self::ENETDOWN,
+            libc::ENETUNREACH => Self::ENETUNREACH,
+            libc::ENETRESET => Self::ENETRESET,
+            libc::ECONNABORTED => Self::ECONNABORTED,
+            libc::ECONNRESET => Self::ECONNRESET,
+            libc::ENOBUFS => Self::ENOBUFS,
+            libc::EISCONN => Self::EISCONN,
+            libc::ENOTCONN => Self::ENOTCONN,
+            libc::ETIMEDOUT => Self::ETIMEDOUT,
+            libc::ECONNREFUSED => Self::ECONNREFUSED,
+            libc::EHOSTUNREACH => Self::EHOSTUNREACH,
+            libc::EALREADY => Self::EALREADY,
+            libc::EINPROGRESS => Self::EINPROGRESS,
+            libc::ESTALE => Self::ESTALE,
+            libc::EDQUOT => Self::EDQUOT,
+            libc::ECANCELED => Self::ECANCELED,
+            libc::EOWNERDEAD => Self::EOWNERDEAD,
+            libc::ENOTRECOVERABLE => Self::ENOTRECOVERABLE,
+            other => {
+                log::warn!("Unknown errno: {}", other);
+                Self::ENOSYS
+            }
+        }
+    }
+
+    pub fn last() -> Self {
+        let errno = io::Error::last_os_error()
+            .raw_os_error()
+            .unwrap_or(libc::ENOSYS);
+        Self::from_i32(errno)
+    }
+
+    pub fn from_success_code<T: IsZero>(t: T) -> Result<()> {
+        if t.is_zero() {
+            Ok(())
+        } else {
+            Err(Self::last().into())
+        }
+    }
+
+    pub fn from_result<T: IsMinusOne>(t: T) -> Result<T> {
+        if t.is_minus_one() {
+            Err(Self::last().into())
+        } else {
+            Ok(t)
+        }
+    }
+}
+
+impl fmt::Display for Errno {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        write!(f, "Errno code: {}", self)
+    }
+}
+
+#[doc(hidden)]
+pub trait IsZero {
+    fn is_zero(&self) -> bool;
+}
+
+macro_rules! impl_is_zero {
+    ($($t:ident)*) => ($(impl IsZero for $t {
+        fn is_zero(&self) -> bool {
+            *self == 0
+        }
+    })*)
+}
+
+impl_is_zero! { i32 i64 isize }
+
+#[doc(hidden)]
+pub trait IsMinusOne {
+    fn is_minus_one(&self) -> bool;
+}
+
+macro_rules! impl_is_minus_one {
+    ($($t:ident)*) => ($(impl IsMinusOne for $t {
+        fn is_minus_one(&self) -> bool {
+            *self == -1
+        }
+    })*)
+}
+
+impl_is_minus_one! { i32 i64 isize }
+
+
\ No newline at end of file diff --git a/api/src/yanix/fcntl.rs.html b/api/src/yanix/fcntl.rs.html new file mode 100644 index 000000000000..7641bd994398 --- /dev/null +++ b/api/src/yanix/fcntl.rs.html @@ -0,0 +1,69 @@ +fcntl.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+
+use crate::{
+    file::{FdFlag, OFlag},
+    Errno, Result,
+};
+use std::os::unix::prelude::*;
+
+pub unsafe fn dup_fd(fd: RawFd, close_on_exec: bool) -> Result<RawFd> {
+    // Both fcntl commands expect a RawFd arg which will specify
+    // the minimum duplicated RawFd number. In our case, I don't
+    // think we have to worry about this that much, so passing in
+    // the RawFd descriptor we want duplicated
+    Errno::from_result(if close_on_exec {
+        libc::fcntl(fd, libc::F_DUPFD_CLOEXEC, fd)
+    } else {
+        libc::fcntl(fd, libc::F_DUPFD, fd)
+    })
+}
+
+pub unsafe fn get_fd_flags(fd: RawFd) -> Result<FdFlag> {
+    Errno::from_result(libc::fcntl(fd, libc::F_GETFD)).map(FdFlag::from_bits_truncate)
+}
+
+pub unsafe fn set_fd_flags(fd: RawFd, flags: FdFlag) -> Result<()> {
+    Errno::from_success_code(libc::fcntl(fd, libc::F_SETFD, flags.bits()))
+}
+
+pub unsafe fn get_status_flags(fd: RawFd) -> Result<OFlag> {
+    Errno::from_result(libc::fcntl(fd, libc::F_GETFL)).map(OFlag::from_bits_truncate)
+}
+
+pub unsafe fn set_status_flags(fd: RawFd, flags: OFlag) -> Result<()> {
+    Errno::from_success_code(libc::fcntl(fd, libc::F_SETFL, flags.bits()))
+}
+
+
\ No newline at end of file diff --git a/api/src/yanix/file.rs.html b/api/src/yanix/file.rs.html new file mode 100644 index 000000000000..4089cb5790b0 --- /dev/null +++ b/api/src/yanix/file.rs.html @@ -0,0 +1,433 @@ +file.rs.html -- source
  1
+  2
+  3
+  4
+  5
+  6
+  7
+  8
+  9
+ 10
+ 11
+ 12
+ 13
+ 14
+ 15
+ 16
+ 17
+ 18
+ 19
+ 20
+ 21
+ 22
+ 23
+ 24
+ 25
+ 26
+ 27
+ 28
+ 29
+ 30
+ 31
+ 32
+ 33
+ 34
+ 35
+ 36
+ 37
+ 38
+ 39
+ 40
+ 41
+ 42
+ 43
+ 44
+ 45
+ 46
+ 47
+ 48
+ 49
+ 50
+ 51
+ 52
+ 53
+ 54
+ 55
+ 56
+ 57
+ 58
+ 59
+ 60
+ 61
+ 62
+ 63
+ 64
+ 65
+ 66
+ 67
+ 68
+ 69
+ 70
+ 71
+ 72
+ 73
+ 74
+ 75
+ 76
+ 77
+ 78
+ 79
+ 80
+ 81
+ 82
+ 83
+ 84
+ 85
+ 86
+ 87
+ 88
+ 89
+ 90
+ 91
+ 92
+ 93
+ 94
+ 95
+ 96
+ 97
+ 98
+ 99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+
+use crate::{Errno, Result};
+use bitflags::bitflags;
+use cfg_if::cfg_if;
+use std::{
+    convert::TryInto,
+    ffi::{CString, OsStr, OsString},
+    os::unix::prelude::*,
+};
+
+pub use crate::sys::file::*;
+
+bitflags! {
+    pub struct FdFlag: libc::c_int {
+        const CLOEXEC = libc::FD_CLOEXEC;
+    }
+}
+
+bitflags! {
+    pub struct AtFlag: libc::c_int {
+        const REMOVEDIR = libc::AT_REMOVEDIR;
+        const SYMLINK_FOLLOW = libc::AT_SYMLINK_FOLLOW;
+        const SYMLINK_NOFOLLOW = libc::AT_SYMLINK_NOFOLLOW;
+    }
+}
+
+bitflags! {
+    pub struct Mode: libc::mode_t {
+        const IRWXU = libc::S_IRWXU;
+        const IRUSR = libc::S_IRUSR;
+        const IWUSR = libc::S_IWUSR;
+        const IXUSR = libc::S_IXUSR;
+        const IRWXG = libc::S_IRWXG;
+        const IRGRP = libc::S_IRGRP;
+        const IWGRP = libc::S_IWGRP;
+        const IXGRP = libc::S_IXGRP;
+        const IRWXO = libc::S_IRWXO;
+        const IROTH = libc::S_IROTH;
+        const IWOTH = libc::S_IWOTH;
+        const IXOTH = libc::S_IXOTH;
+        const ISUID = libc::S_ISUID as libc::mode_t;
+        const ISGID = libc::S_ISGID as libc::mode_t;
+        const ISVTX = libc::S_ISVTX as libc::mode_t;
+    }
+}
+
+bitflags! {
+    pub struct OFlag: libc::c_int {
+        const ACCMODE = libc::O_ACCMODE;
+        const APPEND = libc::O_APPEND;
+        const CREAT = libc::O_CREAT;
+        const DIRECTORY = libc::O_DIRECTORY;
+        const DSYNC = {
+            // Have to use cfg_if: https://github.com/bitflags/bitflags/issues/137
+            cfg_if! {
+                if #[cfg(any(target_os = "android",
+                             target_os = "ios",
+                             target_os = "linux",
+                             target_os = "macos",
+                             target_os = "netbsd",
+                             target_os = "openbsd",
+                             target_os = "emscripten"))] {
+                    libc::O_DSYNC
+                } else if #[cfg(target_os = "freebsd")] {
+                    // https://github.com/bytecodealliance/wasmtime/pull/756
+                    libc::O_SYNC
+                }
+            }
+        };
+        const EXCL = libc::O_EXCL;
+        #[cfg(any(target_os = "dragonfly",
+                  target_os = "freebsd",
+                  target_os = "ios",
+                  all(target_os = "linux", not(target_env = "musl")),
+                  target_os = "macos",
+                  target_os = "netbsd",
+                  target_os = "openbsd"))]
+        const FSYNC = libc::O_FSYNC;
+        const NOFOLLOW = libc::O_NOFOLLOW;
+        const NONBLOCK = libc::O_NONBLOCK;
+        const RDONLY = libc::O_RDONLY;
+        const WRONLY = libc::O_WRONLY;
+        const RDWR = libc::O_RDWR;
+        #[cfg(any(target_os = "linux",
+                  target_os = "netbsd",
+                  target_os = "openbsd",
+                  target_os = "emscripten"))]
+        const RSYNC = libc::O_RSYNC;
+        const SYNC = libc::O_SYNC;
+        const TRUNC = libc::O_TRUNC;
+    }
+}
+
+bitflags! {
+    pub struct SFlag: libc::mode_t {
+        const IFIFO = libc::S_IFIFO;
+        const IFCHR = libc::S_IFCHR;
+        const IFDIR = libc::S_IFDIR;
+        const IFBLK = libc::S_IFBLK;
+        const IFREG = libc::S_IFREG;
+        const IFLNK = libc::S_IFLNK;
+        const IFSOCK = libc::S_IFSOCK;
+        const IFMT = libc::S_IFMT;
+    }
+}
+
+pub unsafe fn openat<P: AsRef<OsStr>>(
+    dirfd: RawFd,
+    path: P,
+    oflag: OFlag,
+    mode: Mode,
+) -> Result<RawFd> {
+    let path = CString::new(path.as_ref().as_bytes())?;
+    Errno::from_result(libc::openat(
+        dirfd,
+        path.as_ptr(),
+        oflag.bits(),
+        libc::c_uint::from(mode.bits()),
+    ))
+}
+
+pub unsafe fn readlinkat<P: AsRef<OsStr>>(dirfd: RawFd, path: P) -> Result<OsString> {
+    let path = CString::new(path.as_ref().as_bytes())?;
+    let buffer = &mut [0u8; libc::PATH_MAX as usize + 1];
+    Errno::from_result(libc::readlinkat(
+        dirfd,
+        path.as_ptr(),
+        buffer.as_mut_ptr() as *mut _,
+        buffer.len(),
+    ))
+    .and_then(|nread| {
+        let link = OsStr::from_bytes(&buffer[0..nread.try_into()?]);
+        Ok(link.into())
+    })
+}
+
+pub unsafe fn mkdirat<P: AsRef<OsStr>>(dirfd: RawFd, path: P, mode: Mode) -> Result<()> {
+    let path = CString::new(path.as_ref().as_bytes())?;
+    Errno::from_success_code(libc::mkdirat(dirfd, path.as_ptr(), mode.bits()))
+}
+
+pub unsafe fn linkat<P: AsRef<OsStr>>(
+    old_dirfd: RawFd,
+    old_path: P,
+    new_dirfd: RawFd,
+    new_path: P,
+    flags: AtFlag,
+) -> Result<()> {
+    let old_path = CString::new(old_path.as_ref().as_bytes())?;
+    let new_path = CString::new(new_path.as_ref().as_bytes())?;
+    Errno::from_success_code(libc::linkat(
+        old_dirfd,
+        old_path.as_ptr(),
+        new_dirfd,
+        new_path.as_ptr(),
+        flags.bits(),
+    ))
+}
+
+pub unsafe fn unlinkat<P: AsRef<OsStr>>(dirfd: RawFd, path: P, flags: AtFlag) -> Result<()> {
+    let path = CString::new(path.as_ref().as_bytes())?;
+    Errno::from_success_code(libc::unlinkat(dirfd, path.as_ptr(), flags.bits()))
+}
+
+pub unsafe fn renameat<P: AsRef<OsStr>>(
+    old_dirfd: RawFd,
+    old_path: P,
+    new_dirfd: RawFd,
+    new_path: P,
+) -> Result<()> {
+    let old_path = CString::new(old_path.as_ref().as_bytes())?;
+    let new_path = CString::new(new_path.as_ref().as_bytes())?;
+    Errno::from_success_code(libc::renameat(
+        old_dirfd,
+        old_path.as_ptr(),
+        new_dirfd,
+        new_path.as_ptr(),
+    ))
+}
+
+pub unsafe fn symlinkat<P: AsRef<OsStr>>(old_path: P, new_dirfd: RawFd, new_path: P) -> Result<()> {
+    let old_path = CString::new(old_path.as_ref().as_bytes())?;
+    let new_path = CString::new(new_path.as_ref().as_bytes())?;
+    Errno::from_success_code(libc::symlinkat(
+        old_path.as_ptr(),
+        new_dirfd,
+        new_path.as_ptr(),
+    ))
+}
+
+pub unsafe fn fstatat<P: AsRef<OsStr>>(dirfd: RawFd, path: P, flags: AtFlag) -> Result<libc::stat> {
+    use std::mem::MaybeUninit;
+    let path = CString::new(path.as_ref().as_bytes())?;
+    let mut filestat = MaybeUninit::<libc::stat>::uninit();
+    Errno::from_result(libc::fstatat(
+        dirfd,
+        path.as_ptr(),
+        filestat.as_mut_ptr(),
+        flags.bits(),
+    ))?;
+    Ok(filestat.assume_init())
+}
+
+pub unsafe fn fstat(fd: RawFd) -> Result<libc::stat> {
+    use std::mem::MaybeUninit;
+    let mut filestat = MaybeUninit::<libc::stat>::uninit();
+    Errno::from_result(libc::fstat(fd, filestat.as_mut_ptr()))?;
+    Ok(filestat.assume_init())
+}
+
+/// `fionread()` function, equivalent to `ioctl(fd, FIONREAD, *bytes)`.
+pub unsafe fn fionread(fd: RawFd) -> Result<usize> {
+    let mut nread: libc::c_int = 0;
+    Errno::from_result(libc::ioctl(fd, libc::FIONREAD, &mut nread as *mut _))?;
+    Ok(nread.try_into()?)
+}
+
+
\ No newline at end of file diff --git a/api/src/yanix/lib.rs.html b/api/src/yanix/lib.rs.html new file mode 100644 index 000000000000..c10e72879d7e --- /dev/null +++ b/api/src/yanix/lib.rs.html @@ -0,0 +1,83 @@ +lib.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+
+//! `yanix` stands for Yet Another Nix crate, and, well, it is simply
+//! a yet another crate in the spirit of the [nix] crate. As such,
+//! this crate is inspired by the original `nix` crate, however,
+//! it takes a different approach, using lower-level interfaces with
+//! less abstraction, so that it fits better with its main use case
+//! which is our WASI implementation, [wasi-common].
+//!
+//! [nix]: https://github.com/nix-rust/nix
+//! [wasi-common]: https://github.com/bytecodealliance/wasmtime/tree/master/crates/wasi-common
+#![cfg(unix)]
+
+pub mod clock;
+pub mod dir;
+pub mod fcntl;
+pub mod file;
+pub mod poll;
+pub mod socket;
+
+mod errno;
+mod sys;
+
+pub mod fadvise {
+    pub use super::sys::fadvise::*;
+}
+
+pub use errno::Errno;
+use std::{ffi, num};
+use thiserror::Error;
+
+pub type Result<T> = std::result::Result<T, YanixError>;
+
+#[derive(Debug, Error)]
+pub enum YanixError {
+    #[error("raw os error {0}")]
+    Errno(#[from] Errno),
+    #[error("a nul byte was not found in the expected position")]
+    NulError(#[from] ffi::NulError),
+    #[error("integral type conversion failed")]
+    TryFromIntError(#[from] num::TryFromIntError),
+}
+
+
\ No newline at end of file diff --git a/api/src/yanix/poll.rs.html b/api/src/yanix/poll.rs.html new file mode 100644 index 000000000000..51fb9df11d28 --- /dev/null +++ b/api/src/yanix/poll.rs.html @@ -0,0 +1,97 @@ +poll.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+
+use crate::{Errno, Result};
+use bitflags::bitflags;
+use std::{convert::TryInto, os::unix::prelude::*};
+
+bitflags! {
+    pub struct PollFlags: libc::c_short {
+        const POLLIN = libc::POLLIN;
+        const POLLPRI = libc::POLLPRI;
+        const POLLOUT = libc::POLLOUT;
+        const POLLRDNORM = libc::POLLRDNORM;
+        const POLLWRNORM = libc::POLLWRNORM;
+        const POLLRDBAND = libc::POLLRDBAND;
+        const POLLWRBAND = libc::POLLWRBAND;
+        const POLLERR = libc::POLLERR;
+        const POLLHUP = libc::POLLHUP;
+        const POLLNVAL = libc::POLLNVAL;
+    }
+}
+
+#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
+#[repr(C)]
+pub struct PollFd(libc::pollfd);
+
+impl PollFd {
+    pub unsafe fn new(fd: RawFd, events: PollFlags) -> Self {
+        Self(libc::pollfd {
+            fd,
+            events: events.bits(),
+            revents: PollFlags::empty().bits(),
+        })
+    }
+
+    pub fn revents(self) -> Option<PollFlags> {
+        PollFlags::from_bits(self.0.revents)
+    }
+}
+
+pub fn poll(fds: &mut [PollFd], timeout: libc::c_int) -> Result<usize> {
+    Errno::from_result(unsafe {
+        libc::poll(
+            fds.as_mut_ptr() as *mut libc::pollfd,
+            fds.len() as libc::nfds_t,
+            timeout,
+        )
+    })
+    .and_then(|nready| nready.try_into().map_err(Into::into))
+}
+
+
\ No newline at end of file diff --git a/api/src/yanix/socket.rs.html b/api/src/yanix/socket.rs.html new file mode 100644 index 000000000000..61aeaa40db40 --- /dev/null +++ b/api/src/yanix/socket.rs.html @@ -0,0 +1,65 @@ +socket.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+
+use crate::{Errno, Result};
+use std::os::unix::prelude::*;
+
+#[derive(Debug, Clone, Copy)]
+#[repr(i32)]
+pub enum SockType {
+    Stream = libc::SOCK_STREAM,
+    Datagram = libc::SOCK_DGRAM,
+    SeqPacket = libc::SOCK_SEQPACKET,
+    Raw = libc::SOCK_RAW,
+    Rdm = libc::SOCK_RDM,
+}
+
+pub unsafe fn get_socket_type(fd: RawFd) -> Result<SockType> {
+    use std::mem::{self, MaybeUninit};
+    let mut buffer = MaybeUninit::<SockType>::zeroed().assume_init();
+    let mut out_len = mem::size_of::<SockType>() as libc::socklen_t;
+    Errno::from_success_code(libc::getsockopt(
+        fd,
+        libc::SOL_SOCKET,
+        libc::SO_TYPE,
+        &mut buffer as *mut SockType as *mut _,
+        &mut out_len,
+    ))?;
+    assert_eq!(
+        out_len as usize,
+        mem::size_of::<SockType>(),
+        "invalid SockType value"
+    );
+    Ok(buffer)
+}
+
+
\ No newline at end of file diff --git a/api/src/yanix/sys/linux/dir.rs.html b/api/src/yanix/sys/linux/dir.rs.html new file mode 100644 index 000000000000..d17a68729872 --- /dev/null +++ b/api/src/yanix/sys/linux/dir.rs.html @@ -0,0 +1,95 @@ +dir.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+
+use crate::{
+    dir::{Dir, Entry, EntryExt, SeekLoc},
+    Errno, Result,
+};
+use std::ops::Deref;
+
+#[derive(Copy, Clone, Debug)]
+pub(crate) struct EntryImpl(libc::dirent64);
+
+impl Deref for EntryImpl {
+    type Target = libc::dirent64;
+
+    fn deref(&self) -> &Self::Target {
+        &self.0
+    }
+}
+
+impl EntryExt for Entry {
+    fn ino(&self) -> u64 {
+        self.0.d_ino.into()
+    }
+
+    fn seek_loc(&self) -> Result<SeekLoc> {
+        unsafe { SeekLoc::from_raw(self.0.d_off) }
+    }
+}
+
+pub(crate) fn iter_impl(dir: &Dir) -> Option<Result<EntryImpl>> {
+    let errno = Errno::last();
+    let dirent = unsafe { libc::readdir64(dir.as_raw().as_ptr()) };
+    if dirent.is_null() {
+        if errno != Errno::last() {
+            // TODO This should be verified on different BSD-flavours.
+            //
+            // According to 4.3BSD/POSIX.1-2001 man pages, there was an error
+            // if the errno value has changed at some point during the sequence
+            // of readdir calls.
+            Some(Err(Errno::last().into()))
+        } else {
+            // Not an error. We've simply reached the end of the stream.
+            None
+        }
+    } else {
+        Some(Ok(EntryImpl(unsafe { *dirent })))
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/yanix/sys/linux/fadvise.rs.html b/api/src/yanix/sys/linux/fadvise.rs.html new file mode 100644 index 000000000000..1155a559f1b5 --- /dev/null +++ b/api/src/yanix/sys/linux/fadvise.rs.html @@ -0,0 +1,47 @@ +fadvise.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+
+use crate::{Errno, Result};
+use std::os::unix::prelude::*;
+
+#[derive(Debug, Copy, Clone)]
+#[repr(i32)]
+pub enum PosixFadviseAdvice {
+    Normal = libc::POSIX_FADV_NORMAL,
+    Sequential = libc::POSIX_FADV_SEQUENTIAL,
+    Random = libc::POSIX_FADV_RANDOM,
+    NoReuse = libc::POSIX_FADV_NOREUSE,
+    WillNeed = libc::POSIX_FADV_WILLNEED,
+    DontNeed = libc::POSIX_FADV_DONTNEED,
+}
+
+pub unsafe fn posix_fadvise(
+    fd: RawFd,
+    offset: libc::off_t,
+    len: libc::off_t,
+    advice: PosixFadviseAdvice,
+) -> Result<()> {
+    Errno::from_success_code(libc::posix_fadvise(fd, offset, len, advice as libc::c_int))
+}
+
+
\ No newline at end of file diff --git a/api/src/yanix/sys/linux/file.rs.html b/api/src/yanix/sys/linux/file.rs.html new file mode 100644 index 000000000000..c19169e03dcb --- /dev/null +++ b/api/src/yanix/sys/linux/file.rs.html @@ -0,0 +1,49 @@ +file.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+
+use crate::{Errno, Result};
+use std::os::unix::prelude::*;
+
+pub unsafe fn isatty(fd: RawFd) -> Result<bool> {
+    let res = libc::isatty(fd);
+    if res == 1 {
+        // isatty() returns 1 if fd is an open file descriptor referring to a terminal...
+        Ok(true)
+    } else {
+        // ... otherwise 0 is returned, and errno is set to indicate the error.
+        let errno = Errno::last();
+        // While POSIX specifies ENOTTY if the passed
+        // fd is *not* a tty, on Linux, some implementations
+        // may return EINVAL instead.
+        //
+        // https://linux.die.net/man/3/isatty
+        if errno == Errno::ENOTTY || errno == Errno::EINVAL {
+            Ok(false)
+        } else {
+            Err(errno.into())
+        }
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/yanix/sys/linux/mod.rs.html b/api/src/yanix/sys/linux/mod.rs.html new file mode 100644 index 000000000000..faf3f1a61c9f --- /dev/null +++ b/api/src/yanix/sys/linux/mod.rs.html @@ -0,0 +1,27 @@ +mod.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+
+pub(crate) mod dir;
+pub(crate) mod fadvise;
+pub(crate) mod file;
+
+use crate::{dir::SeekLoc, Result};
+
+impl SeekLoc {
+    pub unsafe fn from_raw(loc: i64) -> Result<Self> {
+        let loc = loc.into();
+        Ok(Self(loc))
+    }
+}
+
+
\ No newline at end of file diff --git a/api/src/yanix/sys/mod.rs.html b/api/src/yanix/sys/mod.rs.html new file mode 100644 index 000000000000..20349a99305b --- /dev/null +++ b/api/src/yanix/sys/mod.rs.html @@ -0,0 +1,59 @@ +mod.rs.html -- source
 1
+ 2
+ 3
+ 4
+ 5
+ 6
+ 7
+ 8
+ 9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+
+use crate::{dir::SeekLoc, Result};
+use cfg_if::cfg_if;
+
+cfg_if! {
+    if #[cfg(any(target_os = "linux",
+                 target_os = "android"))] {
+        mod linux;
+        pub(crate) use linux::*;
+    } else if #[cfg(target_os = "emscripten")] {
+        mod emscripten;
+        pub(crate) use emscripten::*;
+    } else if #[cfg(any(target_os = "macos",
+                        target_os = "ios",
+                        target_os = "freebsd",
+                        target_os = "netbsd",
+                        target_os = "openbsd",
+                        target_os = "dragonfly"))] {
+        mod bsd;
+        pub(crate) use bsd::*;
+    } else {
+        compile_error!("yanix doesn't compile for this platform yet");
+    }
+}
+
+pub trait EntryExt {
+    fn ino(&self) -> u64;
+    fn seek_loc(&self) -> Result<SeekLoc>;
+}
+
+
\ No newline at end of file diff --git a/api/storage.js b/api/storage.js new file mode 100644 index 000000000000..fdc5f96aead8 --- /dev/null +++ b/api/storage.js @@ -0,0 +1 @@ +var resourcesSuffix="";var currentTheme=document.getElementById("themeStyle");var mainTheme=document.getElementById("mainThemeStyle");var savedHref=[];function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(!elem||!elem.classList){return}elem.classList.add(className)}function removeClass(elem,className){if(!elem||!elem.classList){return}elem.classList.remove(className)}function onEach(arr,func,reversed){if(arr&&arr.length>0&&func){var length=arr.length;if(reversed!==true){for(var i=0;i=0;--i){if(func(arr[i])===true){return true}}}}return false}function onEachLazy(lazyArray,func,reversed){return onEach(Array.prototype.slice.call(lazyArray),func,reversed)}function usableLocalStorage(){if(typeof Storage==="undefined"){return false}try{return window.localStorage!==null&&window.localStorage!==undefined}catch(err){return false}}function updateLocalStorage(name,value){if(usableLocalStorage()){localStorage[name]=value}else{}}function getCurrentValue(name){if(usableLocalStorage()&&localStorage[name]!==undefined){return localStorage[name]}return null}function switchTheme(styleElem,mainStyleElem,newTheme,saveTheme){var fullBasicCss="rustdoc"+resourcesSuffix+".css";var fullNewTheme=newTheme+resourcesSuffix+".css";var newHref=mainStyleElem.href.replace(fullBasicCss,fullNewTheme);if(styleElem.href===newHref){return}var found=false;if(savedHref.length===0){onEachLazy(document.getElementsByTagName("link"),function(el){savedHref.push(el.href)})}onEach(savedHref,function(el){if(el===newHref){found=true;return true}});if(found===true){styleElem.href=newHref;if(saveTheme===true){updateLocalStorage("rustdoc-theme",newTheme)}}}function getSystemValue(){var property=getComputedStyle(document.documentElement).getPropertyValue('content');return property.replace(/[\"\']/g,"")}switchTheme(currentTheme,mainTheme,getCurrentValue("rustdoc-theme")||getSystemValue()||"light",false) \ No newline at end of file diff --git a/api/theme.js b/api/theme.js new file mode 100644 index 000000000000..ebd1a87271bf --- /dev/null +++ b/api/theme.js @@ -0,0 +1 @@ +var themes=document.getElementById("theme-choices");var themePicker=document.getElementById("theme-picker");function showThemeButtonState(){themes.style.display="block";themePicker.style.borderBottomRightRadius="0";themePicker.style.borderBottomLeftRadius="0"}function hideThemeButtonState(){themes.style.display="none";themePicker.style.borderBottomRightRadius="3px";themePicker.style.borderBottomLeftRadius="3px"}function switchThemeButtonState(){if(themes.style.display==="block"){hideThemeButtonState()}else{showThemeButtonState()}};function handleThemeButtonsBlur(e){var active=document.activeElement;var related=e.relatedTarget;if(active.id!=="themePicker"&&(!active.parentNode||active.parentNode.id!=="theme-choices")&&(!related||(related.id!=="themePicker"&&(!related.parentNode||related.parentNode.id!=="theme-choices")))){hideThemeButtonState()}}themePicker.onclick=switchThemeButtonState;themePicker.onblur=handleThemeButtonsBlur;["dark","light"].forEach(function(item){var but=document.createElement('button');but.textContent=item;but.onclick=function(el){switchTheme(currentTheme,mainTheme,item,true)};but.onblur=handleThemeButtonsBlur;themes.appendChild(but)}) \ No newline at end of file diff --git a/api/wasi_common/all.html b/api/wasi_common/all.html new file mode 100644 index 000000000000..8c8b82d2efaf --- /dev/null +++ b/api/wasi_common/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Enums

Unions

Functions

Typedefs

Constants

\ No newline at end of file diff --git a/api/wasi_common/ctx/struct.WasiCtx.html b/api/wasi_common/ctx/struct.WasiCtx.html new file mode 100644 index 000000000000..5f771f33ec72 --- /dev/null +++ b/api/wasi_common/ctx/struct.WasiCtx.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasi_common/struct.WasiCtx.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/ctx/struct.WasiCtxBuilder.html b/api/wasi_common/ctx/struct.WasiCtxBuilder.html new file mode 100644 index 000000000000..4bf0b1ed2a0f --- /dev/null +++ b/api/wasi_common/ctx/struct.WasiCtxBuilder.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasi_common/struct.WasiCtxBuilder.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/enum.Error.html b/api/wasi_common/enum.Error.html new file mode 100644 index 000000000000..142cad60a4ac --- /dev/null +++ b/api/wasi_common/enum.Error.html @@ -0,0 +1,32 @@ +wasi_common::Error - Rust

[][src]Enum wasi_common::Error

pub enum Error {
+    Wasi(WasiError),
+    Io(Error),
+    Yanix(YanixError),
+}

+ Variants

+
Wasi(WasiError)
Io(Error)
Yanix(YanixError)

Methods

impl Error[src]

pub const ESUCCESS: Self[src]

pub const E2BIG: Self[src]

pub const EACCES: Self[src]

pub const EADDRINUSE: Self[src]

pub const EADDRNOTAVAIL: Self[src]

pub const EAFNOSUPPORT: Self[src]

pub const EAGAIN: Self[src]

pub const EALREADY: Self[src]

pub const EBADF: Self[src]

pub const EBADMSG: Self[src]

pub const EBUSY: Self[src]

pub const ECANCELED: Self[src]

pub const ECHILD: Self[src]

pub const ECONNABORTED: Self[src]

pub const ECONNREFUSED: Self[src]

pub const ECONNRESET: Self[src]

pub const EDEADLK: Self[src]

pub const EDESTADDRREQ: Self[src]

pub const EDOM: Self[src]

pub const EDQUOT: Self[src]

pub const EEXIST: Self[src]

pub const EFAULT: Self[src]

pub const EFBIG: Self[src]

pub const EHOSTUNREACH: Self[src]

pub const EIDRM: Self[src]

pub const EILSEQ: Self[src]

pub const EINPROGRESS: Self[src]

pub const EINTR: Self[src]

pub const EINVAL: Self[src]

pub const EIO: Self[src]

pub const EISCONN: Self[src]

pub const EISDIR: Self[src]

pub const ELOOP: Self[src]

pub const EMFILE: Self[src]

pub const EMSGSIZE: Self[src]

pub const EMULTIHOP: Self[src]

pub const ENAMETOOLONG: Self[src]

pub const ENETDOWN: Self[src]

pub const ENETRESET: Self[src]

pub const ENETUNREACH: Self[src]

pub const ENFILE: Self[src]

pub const ENOBUFS: Self[src]

pub const ENODEV: Self[src]

pub const ENOENT: Self[src]

pub const ENOEXEC: Self[src]

pub const ENOLCK: Self[src]

pub const ENOMEM: Self[src]

pub const ENOMSG: Self[src]

pub const ENOPROTOOPT: Self[src]

pub const ENOSPC: Self[src]

pub const ENOSYS: Self[src]

pub const ENOTCONN: Self[src]

pub const ENOTDIR: Self[src]

pub const ENOTEMPTY: Self[src]

pub const ENOTRECOVERABLE: Self[src]

pub const ENOTSOCK: Self[src]

pub const ENOTSUP: Self[src]

pub const ENOTTY: Self[src]

pub const ENXIO: Self[src]

pub const EOVERFLOW: Self[src]

pub const EOWNERDEAD: Self[src]

pub const EPERM: Self[src]

pub const EPIPE: Self[src]

pub const EPROTO: Self[src]

pub const EPROTONOSUPPORT: Self[src]

pub const EPROTOTYPE: Self[src]

pub const ERANGE: Self[src]

pub const EROFS: Self[src]

pub const ESPIPE: Self[src]

pub const ESRCH: Self[src]

pub const ESTALE: Self[src]

pub const ETIMEDOUT: Self[src]

pub const ETXTBSY: Self[src]

pub const EXDEV: Self[src]

pub const ENOTCAPABLE: Self[src]

Trait Implementations

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

impl<'_> From<&'_ NulError> for Error[src]

impl From<Errno> for Error[src]

impl From<Error> for Error[src]

impl From<Infallible> for Error[src]

impl From<NulError> for Error[src]

impl From<TryFromIntError> for Error[src]

impl From<Utf8Error> for Error[src]

impl From<YanixError> for Error[src]

Auto Trait Implementations

impl !RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl !UnwindSafe for Error

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/error/enum.Error.html b/api/wasi_common/error/enum.Error.html new file mode 100644 index 000000000000..ead37d96ed4d --- /dev/null +++ b/api/wasi_common/error/enum.Error.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasi_common/enum.Error.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/fn.preopen_dir.html b/api/wasi_common/fn.preopen_dir.html new file mode 100644 index 000000000000..1c1d40c02df1 --- /dev/null +++ b/api/wasi_common/fn.preopen_dir.html @@ -0,0 +1 @@ +wasi_common::preopen_dir - Rust

[][src]Function wasi_common::preopen_dir

pub fn preopen_dir<P: AsRef<Path>>(path: P) -> Result<File, Error>
\ No newline at end of file diff --git a/api/wasi_common/fs/dir/struct.Dir.html b/api/wasi_common/fs/dir/struct.Dir.html new file mode 100644 index 000000000000..2b0b165dab60 --- /dev/null +++ b/api/wasi_common/fs/dir/struct.Dir.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasi_common/fs/struct.Dir.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/fs/dir_builder/struct.DirBuilder.html b/api/wasi_common/fs/dir_builder/struct.DirBuilder.html new file mode 100644 index 000000000000..99ebd46612fc --- /dev/null +++ b/api/wasi_common/fs/dir_builder/struct.DirBuilder.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasi_common/fs/struct.DirBuilder.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/fs/dir_entry/struct.DirEntry.html b/api/wasi_common/fs/dir_entry/struct.DirEntry.html new file mode 100644 index 000000000000..87926e5bd7a4 --- /dev/null +++ b/api/wasi_common/fs/dir_entry/struct.DirEntry.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasi_common/fs/struct.DirEntry.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/fs/file/struct.File.html b/api/wasi_common/fs/file/struct.File.html new file mode 100644 index 000000000000..7091c768fbf9 --- /dev/null +++ b/api/wasi_common/fs/file/struct.File.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasi_common/fs/struct.File.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/fs/file_type/struct.FileType.html b/api/wasi_common/fs/file_type/struct.FileType.html new file mode 100644 index 000000000000..79c29b3fb10c --- /dev/null +++ b/api/wasi_common/fs/file_type/struct.FileType.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasi_common/fs/struct.FileType.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/fs/index.html b/api/wasi_common/fs/index.html new file mode 100644 index 000000000000..cd3250deaa31 --- /dev/null +++ b/api/wasi_common/fs/index.html @@ -0,0 +1,24 @@ +wasi_common::fs - Rust

[][src]Module wasi_common::fs

A very experimental module modeled providing a high-level and safe +filesystem interface, modeled after std::fs, implemented on top of +WASI functions.

+

Most functions in this API are not yet implemented!

+

This corresponds to std::fs.

+

Instead of std::fs's free functions which operate on paths, this +crate has methods on Dir which operate on paths which must be +relative to and within the directory.

+

Since all functions which expose raw file descriptors are unsafe, +I/O handles in this API are unforgeable (unsafe code notwithstanding). +This combined with WASI's lack of absolute paths provides a natural +capability-oriented interface.

+

Structs

+
Dir

A reference to an open directory on the filesystem.

+
DirBuilder

A builder used to create directories in various manners.

+
DirEntry

Entries returned by the ReadDir iterator.

+
File

A reference to an open file on the filesystem.

+
FileType

A structure representing a type of file with accessors for each file type. +It is returned by Metadata::file_type method.

+
Metadata

Metadata information about a file.

+
OpenOptions

Options and flags which can be used to configure how a file is opened.

+
Permissions

Representation of the various permissions on a file.

+
ReadDir

Iterator over the entries in a directory.

+
\ No newline at end of file diff --git a/api/wasi_common/fs/metadata/struct.Metadata.html b/api/wasi_common/fs/metadata/struct.Metadata.html new file mode 100644 index 000000000000..de47a0f8414e --- /dev/null +++ b/api/wasi_common/fs/metadata/struct.Metadata.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasi_common/fs/struct.Metadata.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/fs/open_options/struct.OpenOptions.html b/api/wasi_common/fs/open_options/struct.OpenOptions.html new file mode 100644 index 000000000000..a1da1bb12123 --- /dev/null +++ b/api/wasi_common/fs/open_options/struct.OpenOptions.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasi_common/fs/struct.OpenOptions.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/fs/permissions/struct.Permissions.html b/api/wasi_common/fs/permissions/struct.Permissions.html new file mode 100644 index 000000000000..8a694ab4367e --- /dev/null +++ b/api/wasi_common/fs/permissions/struct.Permissions.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasi_common/fs/struct.Permissions.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/fs/readdir/struct.ReadDir.html b/api/wasi_common/fs/readdir/struct.ReadDir.html new file mode 100644 index 000000000000..8571a1a2f995 --- /dev/null +++ b/api/wasi_common/fs/readdir/struct.ReadDir.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasi_common/fs/struct.ReadDir.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/fs/sidebar-items.js b/api/wasi_common/fs/sidebar-items.js new file mode 100644 index 000000000000..f699547cc2b6 --- /dev/null +++ b/api/wasi_common/fs/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Dir","A reference to an open directory on the filesystem."],["DirBuilder","A builder used to create directories in various manners."],["DirEntry","Entries returned by the ReadDir iterator."],["File","A reference to an open file on the filesystem."],["FileType","A structure representing a type of file with accessors for each file type. It is returned by `Metadata::file_type` method."],["Metadata","Metadata information about a file."],["OpenOptions","Options and flags which can be used to configure how a file is opened."],["Permissions","Representation of the various permissions on a file."],["ReadDir","Iterator over the entries in a directory."]]}); \ No newline at end of file diff --git a/api/wasi_common/fs/struct.Dir.html b/api/wasi_common/fs/struct.Dir.html new file mode 100644 index 000000000000..aac0f02b15da --- /dev/null +++ b/api/wasi_common/fs/struct.Dir.html @@ -0,0 +1,51 @@ +wasi_common::fs::Dir - Rust

[][src]Struct wasi_common::fs::Dir

pub struct Dir<'ctx> { /* fields omitted */ }

A reference to an open directory on the filesystem.

+

TODO: Implement Dir-using versions of std::fs's free functions: +copy, create_dir, create_dir_all, hard_link, metadata, +read_link, read_to_string, remove_dir, remove_dir_all, +remove_file, rename, set_permissions, symlink_metadata, and +write.

+

Unlike std::fs, this API has no canonicalize, because absolute paths +don't interoperate well with the capability-oriented security model.

+

Methods

impl<'ctx> Dir<'ctx>[src]

pub unsafe fn from_raw_wasi_fd(ctx: &'ctx mut WasiCtx, fd: __wasi_fd_t) -> Self[src]

Constructs a new instance of Self from the given raw WASI file descriptor.

+

pub fn open_file<P: AsRef<Path>>(&mut self, path: P) -> Result<File>[src]

Attempts to open a file in read-only mode.

+

This corresponds to std::fs::File::open, but only accesses paths +relative to and within self.

+

TODO: Not yet implemented. Refactor the hostcalls functions to split out the +encoding/decoding parts from the underlying functionality, so that we can call +into the underlying functionality directly.

+

pub fn open_file_with<P: AsRef<Path>>(
    &mut self,
    path: P,
    options: &OpenOptions
) -> Result<File>
[src]

Opens a file at path with the options specified by self.

+

This corresponds to std::fs::OpenOptions::open.

+

Instead of being a method on OpenOptions, this is a method on Dir, +and it only accesses functions relative to and within self.

+

TODO: Not yet implemented.

+

pub fn open_dir<P: AsRef<Path>>(&mut self, path: P) -> Result<Self>[src]

Attempts to open a directory.

+

TODO: Not yet implemented. See the comment in open_file.

+

pub fn create_file<P: AsRef<Path>>(&mut self, path: P) -> Result<File>[src]

Opens a file in write-only mode.

+

This corresponds to std::fs::File::create, but only accesses paths +relative to and within self.

+

TODO: Not yet implemented. See the comment in open_file.

+

pub fn read(&mut self) -> Result<ReadDir>[src]

Returns an iterator over the entries within a directory.

+

This corresponds to std::fs::read_dir, but reads the directory +represented by self.

+

TODO: Not yet implemented. We may need to wait until we have the ability +to duplicate file descriptors before we can implement read safely. For +now, use into_read instead.

+

Important traits for ReadDir
pub fn into_read(self) -> ReadDir[src]

Consumes self and returns an iterator over the entries within a directory +in the manner of read.

+

pub fn read_file<P: AsRef<Path>>(&mut self, path: P) -> Result<Vec<u8>>[src]

Read the entire contents of a file into a bytes vector.

+

This corresponds to std::fs::read, but only accesses paths +relative to and within self.

+

pub fn read_dir<P: AsRef<Path>>(&mut self, path: P) -> Result<ReadDir>[src]

Returns an iterator over the entries within a directory.

+

This corresponds to std::fs::read_dir, but only accesses paths +relative to and within self.

+

Trait Implementations

impl<'ctx> Drop for Dir<'ctx>[src]

Auto Trait Implementations

impl<'ctx> RefUnwindSafe for Dir<'ctx>

impl<'ctx> Send for Dir<'ctx>

impl<'ctx> Sync for Dir<'ctx>

impl<'ctx> Unpin for Dir<'ctx>

impl<'ctx> !UnwindSafe for Dir<'ctx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/fs/struct.DirBuilder.html b/api/wasi_common/fs/struct.DirBuilder.html new file mode 100644 index 000000000000..73edb41e4001 --- /dev/null +++ b/api/wasi_common/fs/struct.DirBuilder.html @@ -0,0 +1,22 @@ +wasi_common::fs::DirBuilder - Rust

[][src]Struct wasi_common::fs::DirBuilder

pub struct DirBuilder {}

A builder used to create directories in various manners.

+

This corresponds to std::fs::DirBuilder.

+

TODO: Not yet implemented.

+

Methods

impl DirBuilder[src]

pub fn new() -> Self[src]

Creates a new set of options with default mode/security settings for all platforms and also non-recursive.

+

This corresponds to std::fs::DirBuilder::new.

+

TODO: Not yet implemented.

+

pub fn recursive(&mut self, recursive: bool) -> &mut Self[src]

Indicates that directories should be created recursively, creating all parent directories.

+

This corresponds to std::fs::DirBuilder::recursive.

+

TODO: Not yet implemented.

+

pub fn create<P: AsRef<Path>>(&self, path: P) -> Result<()>[src]

Creates the specified directory with the options configured in this builder.

+

This corresponds to std::fs::DirBuilder::create.

+

TODO: Not yet implemented.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/fs/struct.DirEntry.html b/api/wasi_common/fs/struct.DirEntry.html new file mode 100644 index 000000000000..ca3ff6372132 --- /dev/null +++ b/api/wasi_common/fs/struct.DirEntry.html @@ -0,0 +1,26 @@ +wasi_common::fs::DirEntry - Rust

[][src]Struct wasi_common::fs::DirEntry

pub struct DirEntry {}

Entries returned by the ReadDir iterator.

+

This corresponds to std::fs::DirEntry.

+

Unlike std::fs::DirEntry, this API has no DirEntry::path, because +absolute paths don't interoperate well with the capability-oriented +security model.

+

TODO: Not yet implemented.

+

Methods

impl DirEntry[src]

pub fn metadata(&self) -> Result<Metadata>[src]

Returns the metadata for the file that this entry points at.

+

This corresponds to std::fs::DirEntry::metadata.

+

TODO: Not yet implemented.

+

pub fn file_type(&self) -> Result<FileType>[src]

Returns the file type for the file that this entry points at.

+

This to std::fs::DirEntry::file_type.

+

TODO: Not yet implemented.

+

pub fn file_name(&self) -> String[src]

Returns the bare file name of this directory entry without any other leading path component.

+

This corresponds to std::fs::DirEntry::file_name, though it returns +String rather than OsString.

+

TODO: Not yet implemented.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/fs/struct.File.html b/api/wasi_common/fs/struct.File.html new file mode 100644 index 000000000000..7926b8a2dd07 --- /dev/null +++ b/api/wasi_common/fs/struct.File.html @@ -0,0 +1,38 @@ +wasi_common::fs::File - Rust

[][src]Struct wasi_common::fs::File

pub struct File<'ctx> { /* fields omitted */ }

A reference to an open file on the filesystem.

+

This corresponds to std::fs::File.

+

Note that this File has no open or create methods. To open or create +a file, you must first obtain a Dir containing the file, and then call +Dir::open_file or Dir::create_file.

+

Methods

impl<'ctx> File<'ctx>[src]

pub unsafe fn from_raw_wasi_fd(ctx: &'ctx mut WasiCtx, fd: __wasi_fd_t) -> Self[src]

Constructs a new instance of Self from the given raw WASI file descriptor.

+

This corresponds to std::fs::File::from_raw_fd.

+

pub fn sync_all(&self) -> Result<(), Error>[src]

Attempts to sync all OS-internal metadata to disk.

+

This corresponds to std::fs::File::sync_all.

+

pub fn sync_data(&self) -> Result<(), Error>[src]

This function is similar to sync_all, except that it may not synchronize +file metadata to the filesystem.

+

This corresponds to std::fs::File::sync_data.

+

pub fn set_len(&self, size: u64) -> Result<(), Error>[src]

Truncates or extends the underlying file, updating the size of this file +to become size.

+

This corresponds to std::fs::File::set_len.

+

pub fn metadata(&self) -> Result<Metadata, Error>[src]

Queries metadata about the underlying file.

+

This corresponds to std::fs::File::metadata.

+

Trait Implementations

impl<'ctx> Drop for File<'ctx>[src]

impl<'ctx> Read for File<'ctx>[src]

fn read(&mut self, buf: &mut [u8]) -> Result<usize>[src]

TODO: Not yet implemented. See the comment in Dir::open_file.

+

Auto Trait Implementations

impl<'ctx> RefUnwindSafe for File<'ctx>

impl<'ctx> Send for File<'ctx>

impl<'ctx> Sync for File<'ctx>

impl<'ctx> Unpin for File<'ctx>

impl<'ctx> !UnwindSafe for File<'ctx>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/fs/struct.FileType.html b/api/wasi_common/fs/struct.FileType.html new file mode 100644 index 000000000000..39456d2be6b1 --- /dev/null +++ b/api/wasi_common/fs/struct.FileType.html @@ -0,0 +1,34 @@ +wasi_common::fs::FileType - Rust

[][src]Struct wasi_common::fs::FileType

pub struct FileType {}

A structure representing a type of file with accessors for each file type. +It is returned by Metadata::file_type method.

+

This corresponds to std::fs::FileType.

+

TODO: Not yet implemented.

+

Methods

impl FileType[src]

pub fn is_dir(&self) -> bool[src]

Tests whether this file type represents a directory.

+

This corresponds to std::fs::FileType::is_dir.

+

TODO: Not yet implemented.

+

pub fn is_file(&self) -> bool[src]

Tests whether this file type represents a regular file.

+

This corresponds to std::fs::FileType::is_file.

+

TODO: Not yet implemented.

+

Tests whether this file type represents a symbolic link.

+

This corresponds to std::fs::FileType::is_symlink.

+

TODO: Not yet implemented.

+

Trait Implementations

impl Clone for FileType[src]

impl Copy for FileType[src]

impl Eq for FileType[src]

impl Hash for FileType[src]

impl PartialEq<FileType> for FileType[src]

impl StructuralEq for FileType[src]

impl StructuralPartialEq for FileType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/fs/struct.Metadata.html b/api/wasi_common/fs/struct.Metadata.html new file mode 100644 index 000000000000..3cb2b8b18058 --- /dev/null +++ b/api/wasi_common/fs/struct.Metadata.html @@ -0,0 +1,43 @@ +wasi_common::fs::Metadata - Rust

[][src]Struct wasi_common::fs::Metadata

pub struct Metadata {}

Metadata information about a file.

+

This corresponds to std::fs::Metadata.

+

TODO: Not yet implemented.

+

Methods

impl Metadata[src]

pub fn file_type(&self) -> FileType[src]

Returns the file type for this metadata.

+

This corresponds to std::fs::Metadata::file_type.

+

TODO: Not yet implemented.

+

pub fn is_dir(&self) -> bool[src]

Returns true if this metadata is for a directory.

+

This corresponds to std::fs::Metadata::is_dir.

+

TODO: Not yet implemented.

+

pub fn is_file(&self) -> bool[src]

Returns true if this metadata is for a regular file.

+

This corresponds to std::fs::Metadata::is_file.

+

TODO: Not yet implemented.

+

pub fn len(&self) -> u64[src]

Returns the size of the file, in bytes, this metadata is for.

+

This corresponds to std::fs::Metadata::len.

+

TODO: Not yet implemented.

+

pub fn permissions(&self) -> Permissions[src]

Returns the permissions of the file this metadata is for.

+

This corresponds to std::fs::Metadata::permissions.

+

TODO: Not yet implemented.

+

pub fn modified(&self) -> Result<SystemTime>[src]

Returns the last modification time listed in this metadata.

+

This corresponds to std::fs::Metadata::modified.

+

TODO: Not yet implemented.

+

pub fn accessed(&self) -> Result<SystemTime>[src]

Returns the last access time of this metadata.

+

This corresponds to std::fs::Metadata::accessed.

+

TODO: Not yet implemented.

+

pub fn created(&self) -> Result<SystemTime>[src]

Returns the creation time listed in this metadata.

+

This corresponds to std::fs::Metadata::created.

+

TODO: Not yet implemented.

+

Trait Implementations

impl Clone for Metadata[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/fs/struct.OpenOptions.html b/api/wasi_common/fs/struct.OpenOptions.html new file mode 100644 index 000000000000..9e514896fff0 --- /dev/null +++ b/api/wasi_common/fs/struct.OpenOptions.html @@ -0,0 +1,29 @@ +wasi_common::fs::OpenOptions - Rust

[][src]Struct wasi_common::fs::OpenOptions

pub struct OpenOptions { /* fields omitted */ }

Options and flags which can be used to configure how a file is opened.

+

This corresponds to std::fs::OpenOptions.

+

Note that this OpenOptions has no open method. To open a file with +an OptionOptions, you must first obtain a Dir containing the file, and +then call Dir::open_file_with.

+

Methods

impl OpenOptions[src]

pub fn new() -> Self[src]

Creates a blank new set of options ready for configuration.

+

This corresponds to std::fs::OpenOptions::new.

+

pub fn read(&mut self, read: bool) -> &mut Self[src]

Sets the option for read access.

+

This corresponds to std::fs::OpenOptions::read.

+

pub fn write(&mut self, write: bool) -> &mut Self[src]

Sets the option for write access.

+

This corresponds to std::fs::OpenOptions::write.

+

pub fn append(&mut self, append: bool) -> &mut Self[src]

Sets the option for the append mode.

+

This corresponds to std::fs::OpenOptions::append.

+

pub fn truncate(&mut self, truncate: bool) -> &mut Self[src]

Sets the option for truncating a previous file.

+

This corresponds to std::fs::OpenOptions::truncate.

+

pub fn create(&mut self, create: bool) -> &mut Self[src]

Sets the option to create a new file.

+

This corresponds to std::fs::OpenOptions::create.

+

pub fn create_new(&mut self, create_new: bool) -> &mut Self[src]

Sets the option to always create a new file.

+

This corresponds to std::fs::OpenOptions::create_new.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/fs/struct.Permissions.html b/api/wasi_common/fs/struct.Permissions.html new file mode 100644 index 000000000000..9849e466a17d --- /dev/null +++ b/api/wasi_common/fs/struct.Permissions.html @@ -0,0 +1,28 @@ +wasi_common::fs::Permissions - Rust

[][src]Struct wasi_common::fs::Permissions

pub struct Permissions {}

Representation of the various permissions on a file.

+

This corresponds to std::fs::Permissions.

+

TODO: Not yet implemented.

+

Methods

impl Permissions[src]

pub fn readonly(&self) -> bool[src]

Returns true if these permissions describe a readonly (unwritable) file.

+

This corresponds to std::fs::Permissions::readonly.

+

TODO: Not yet implemented.

+

pub fn set_readonly(&mut self, readonly: bool)[src]

Modifies the readonly flag for this set of permissions.

+

This corresponds to std::fs::Permissions::set_readonly.

+

TODO: Not yet implemented.

+

Trait Implementations

impl Clone for Permissions[src]

impl Eq for Permissions[src]

impl PartialEq<Permissions> for Permissions[src]

impl StructuralEq for Permissions[src]

impl StructuralPartialEq for Permissions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/fs/struct.ReadDir.html b/api/wasi_common/fs/struct.ReadDir.html new file mode 100644 index 000000000000..86e85c5ee64e --- /dev/null +++ b/api/wasi_common/fs/struct.ReadDir.html @@ -0,0 +1,93 @@ +wasi_common::fs::ReadDir - Rust

[][src]Struct wasi_common::fs::ReadDir

pub struct ReadDir { /* fields omitted */ }

Iterator over the entries in a directory.

+

This corresponds to std::fs::ReadDir.

+

TODO: Not yet implemented.

+

Methods

impl ReadDir[src]

pub unsafe fn from_raw_wasi_fd(fd: __wasi_fd_t) -> Self[src]

Constructs a new instance of Self from the given raw WASI file descriptor.

+

Trait Implementations

impl Iterator for ReadDir[src]

TODO: Not yet implemented.

+

type Item = DirEntry

The type of the elements being iterated over.

+

fn next(&mut self) -> Option<Self::Item>[src]

TODO: Not yet implemented.

+

Auto Trait Implementations

impl RefUnwindSafe for ReadDir

impl Send for ReadDir

impl Sync for ReadDir

impl Unpin for ReadDir

impl UnwindSafe for ReadDir

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

+

type IntoIter = I

Which kind of iterator are we turning this into?

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.args_get.html b/api/wasi_common/hostcalls/fn.args_get.html new file mode 100644 index 000000000000..0a0c300f3ab8 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.args_get.html @@ -0,0 +1 @@ +wasi_common::hostcalls::args_get - Rust

[][src]Function wasi_common::hostcalls::args_get

pub unsafe fn args_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    argv: uintptr_t,
    argv_buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.args_sizes_get.html b/api/wasi_common/hostcalls/fn.args_sizes_get.html new file mode 100644 index 000000000000..dedecd14a870 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.args_sizes_get.html @@ -0,0 +1 @@ +wasi_common::hostcalls::args_sizes_get - Rust

[][src]Function wasi_common::hostcalls::args_sizes_get

pub unsafe fn args_sizes_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    argc: uintptr_t,
    argv_buf_size: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.clock_res_get.html b/api/wasi_common/hostcalls/fn.clock_res_get.html new file mode 100644 index 000000000000..35f94aff09be --- /dev/null +++ b/api/wasi_common/hostcalls/fn.clock_res_get.html @@ -0,0 +1 @@ +wasi_common::hostcalls::clock_res_get - Rust

[][src]Function wasi_common::hostcalls::clock_res_get

pub unsafe fn clock_res_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    id: __wasi_clockid_t,
    resolution: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.clock_time_get.html b/api/wasi_common/hostcalls/fn.clock_time_get.html new file mode 100644 index 000000000000..cdf9b3a0ff79 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.clock_time_get.html @@ -0,0 +1 @@ +wasi_common::hostcalls::clock_time_get - Rust

[][src]Function wasi_common::hostcalls::clock_time_get

pub unsafe fn clock_time_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    id: __wasi_clockid_t,
    precision: __wasi_timestamp_t,
    time: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.environ_get.html b/api/wasi_common/hostcalls/fn.environ_get.html new file mode 100644 index 000000000000..4a699c113781 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.environ_get.html @@ -0,0 +1 @@ +wasi_common::hostcalls::environ_get - Rust

[][src]Function wasi_common::hostcalls::environ_get

pub unsafe fn environ_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    environ: uintptr_t,
    environ_buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.environ_sizes_get.html b/api/wasi_common/hostcalls/fn.environ_sizes_get.html new file mode 100644 index 000000000000..e7cd29d64b03 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.environ_sizes_get.html @@ -0,0 +1 @@ +wasi_common::hostcalls::environ_sizes_get - Rust

[][src]Function wasi_common::hostcalls::environ_sizes_get

pub unsafe fn environ_sizes_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    argc: uintptr_t,
    argv_buf_size: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_advise.html b/api/wasi_common/hostcalls/fn.fd_advise.html new file mode 100644 index 000000000000..0b03937f9690 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_advise.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_advise - Rust

[][src]Function wasi_common::hostcalls::fd_advise

pub unsafe fn fd_advise(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    offset: __wasi_filesize_t,
    len: __wasi_filesize_t,
    advice: __wasi_advice_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_allocate.html b/api/wasi_common/hostcalls/fn.fd_allocate.html new file mode 100644 index 000000000000..ebbd4bab6148 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_allocate.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_allocate - Rust

[][src]Function wasi_common::hostcalls::fd_allocate

pub unsafe fn fd_allocate(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    offset: __wasi_filesize_t,
    len: __wasi_filesize_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_close.html b/api/wasi_common/hostcalls/fn.fd_close.html new file mode 100644 index 000000000000..36e61815c2ce --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_close.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_close - Rust

[][src]Function wasi_common::hostcalls::fd_close

pub unsafe fn fd_close(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_datasync.html b/api/wasi_common/hostcalls/fn.fd_datasync.html new file mode 100644 index 000000000000..7e186f4198a7 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_datasync.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_datasync - Rust

[][src]Function wasi_common::hostcalls::fd_datasync

pub unsafe fn fd_datasync(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_fdstat_get.html b/api/wasi_common/hostcalls/fn.fd_fdstat_get.html new file mode 100644 index 000000000000..2a10150e8441 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_fdstat_get.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_fdstat_get - Rust

[][src]Function wasi_common::hostcalls::fd_fdstat_get

pub unsafe fn fd_fdstat_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    stat: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_fdstat_set_flags.html b/api/wasi_common/hostcalls/fn.fd_fdstat_set_flags.html new file mode 100644 index 000000000000..826c846e5213 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_fdstat_set_flags.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_fdstat_set_flags - Rust

[][src]Function wasi_common::hostcalls::fd_fdstat_set_flags

pub unsafe fn fd_fdstat_set_flags(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    flags: __wasi_fdflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_fdstat_set_rights.html b/api/wasi_common/hostcalls/fn.fd_fdstat_set_rights.html new file mode 100644 index 000000000000..7f0eda489fe0 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_fdstat_set_rights.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_fdstat_set_rights - Rust

[][src]Function wasi_common::hostcalls::fd_fdstat_set_rights

pub unsafe fn fd_fdstat_set_rights(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    fs_rights_base: __wasi_rights_t,
    fs_rights_inheriting: __wasi_rights_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_filestat_get.html b/api/wasi_common/hostcalls/fn.fd_filestat_get.html new file mode 100644 index 000000000000..e9700bb9ec86 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_filestat_get.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_filestat_get - Rust

[][src]Function wasi_common::hostcalls::fd_filestat_get

pub unsafe fn fd_filestat_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_filestat_set_size.html b/api/wasi_common/hostcalls/fn.fd_filestat_set_size.html new file mode 100644 index 000000000000..00314c2f53ac --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_filestat_set_size.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_filestat_set_size - Rust

[][src]Function wasi_common::hostcalls::fd_filestat_set_size

pub unsafe fn fd_filestat_set_size(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    size: __wasi_filesize_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_filestat_set_times.html b/api/wasi_common/hostcalls/fn.fd_filestat_set_times.html new file mode 100644 index 000000000000..457d77aca51b --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_filestat_set_times.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_filestat_set_times - Rust

[][src]Function wasi_common::hostcalls::fd_filestat_set_times

pub unsafe fn fd_filestat_set_times(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    atim: __wasi_timestamp_t,
    mtim: __wasi_timestamp_t,
    fst_flags: __wasi_fstflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_pread.html b/api/wasi_common/hostcalls/fn.fd_pread.html new file mode 100644 index 000000000000..c1d0ba9752fc --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_pread.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_pread - Rust

[][src]Function wasi_common::hostcalls::fd_pread

pub unsafe fn fd_pread(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    offset: __wasi_filesize_t,
    nread: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_prestat_dir_name.html b/api/wasi_common/hostcalls/fn.fd_prestat_dir_name.html new file mode 100644 index 000000000000..7f2d76df8b81 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_prestat_dir_name.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_prestat_dir_name - Rust

[][src]Function wasi_common::hostcalls::fd_prestat_dir_name

pub unsafe fn fd_prestat_dir_name(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    path: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_prestat_get.html b/api/wasi_common/hostcalls/fn.fd_prestat_get.html new file mode 100644 index 000000000000..a8afaf6e811d --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_prestat_get.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_prestat_get - Rust

[][src]Function wasi_common::hostcalls::fd_prestat_get

pub unsafe fn fd_prestat_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_pwrite.html b/api/wasi_common/hostcalls/fn.fd_pwrite.html new file mode 100644 index 000000000000..4c8f6e3bc783 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_pwrite.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_pwrite - Rust

[][src]Function wasi_common::hostcalls::fd_pwrite

pub unsafe fn fd_pwrite(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    offset: __wasi_filesize_t,
    nwritten: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_read.html b/api/wasi_common/hostcalls/fn.fd_read.html new file mode 100644 index 000000000000..4eda45c4c6c6 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_read.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_read - Rust

[][src]Function wasi_common::hostcalls::fd_read

pub unsafe fn fd_read(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    nread: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_readdir.html b/api/wasi_common/hostcalls/fn.fd_readdir.html new file mode 100644 index 000000000000..29ba14337c54 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_readdir.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_readdir - Rust

[][src]Function wasi_common::hostcalls::fd_readdir

pub unsafe fn fd_readdir(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    buf: uintptr_t,
    buf_len: size_t,
    cookie: __wasi_dircookie_t,
    bufused: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_renumber.html b/api/wasi_common/hostcalls/fn.fd_renumber.html new file mode 100644 index 000000000000..c77065e7d190 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_renumber.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_renumber - Rust

[][src]Function wasi_common::hostcalls::fd_renumber

pub unsafe fn fd_renumber(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    to: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_seek.html b/api/wasi_common/hostcalls/fn.fd_seek.html new file mode 100644 index 000000000000..57ebfdcdd6d7 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_seek.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_seek - Rust

[][src]Function wasi_common::hostcalls::fd_seek

pub unsafe fn fd_seek(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    offset: __wasi_filedelta_t,
    whence: __wasi_whence_t,
    newoffset: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_sync.html b/api/wasi_common/hostcalls/fn.fd_sync.html new file mode 100644 index 000000000000..755f1eda0b6a --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_sync.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_sync - Rust

[][src]Function wasi_common::hostcalls::fd_sync

pub unsafe fn fd_sync(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_tell.html b/api/wasi_common/hostcalls/fn.fd_tell.html new file mode 100644 index 000000000000..d4246a2e52d5 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_tell.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_tell - Rust

[][src]Function wasi_common::hostcalls::fd_tell

pub unsafe fn fd_tell(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    offset: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.fd_write.html b/api/wasi_common/hostcalls/fn.fd_write.html new file mode 100644 index 000000000000..063aa2446b46 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.fd_write.html @@ -0,0 +1 @@ +wasi_common::hostcalls::fd_write - Rust

[][src]Function wasi_common::hostcalls::fd_write

pub unsafe fn fd_write(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    nwritten: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.path_create_directory.html b/api/wasi_common/hostcalls/fn.path_create_directory.html new file mode 100644 index 000000000000..0594969c1e2a --- /dev/null +++ b/api/wasi_common/hostcalls/fn.path_create_directory.html @@ -0,0 +1 @@ +wasi_common::hostcalls::path_create_directory - Rust

[][src]Function wasi_common::hostcalls::path_create_directory

pub unsafe fn path_create_directory(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.path_filestat_get.html b/api/wasi_common/hostcalls/fn.path_filestat_get.html new file mode 100644 index 000000000000..9c8f1d04626c --- /dev/null +++ b/api/wasi_common/hostcalls/fn.path_filestat_get.html @@ -0,0 +1 @@ +wasi_common::hostcalls::path_filestat_get - Rust

[][src]Function wasi_common::hostcalls::path_filestat_get

pub unsafe fn path_filestat_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    flags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.path_filestat_set_times.html b/api/wasi_common/hostcalls/fn.path_filestat_set_times.html new file mode 100644 index 000000000000..7a3490abd37f --- /dev/null +++ b/api/wasi_common/hostcalls/fn.path_filestat_set_times.html @@ -0,0 +1 @@ +wasi_common::hostcalls::path_filestat_set_times - Rust

[][src]Function wasi_common::hostcalls::path_filestat_set_times

pub unsafe fn path_filestat_set_times(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    flags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    atim: __wasi_timestamp_t,
    mtim: __wasi_timestamp_t,
    fst_flags: __wasi_fstflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.path_link.html b/api/wasi_common/hostcalls/fn.path_link.html new file mode 100644 index 000000000000..bbb67d454871 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.path_link.html @@ -0,0 +1 @@ +wasi_common::hostcalls::path_link - Rust

[][src]Function wasi_common::hostcalls::path_link

pub unsafe fn path_link(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    old_fd: __wasi_fd_t,
    old_flags: __wasi_lookupflags_t,
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    new_fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.path_open.html b/api/wasi_common/hostcalls/fn.path_open.html new file mode 100644 index 000000000000..178452bf4ea8 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.path_open.html @@ -0,0 +1 @@ +wasi_common::hostcalls::path_open - Rust

[][src]Function wasi_common::hostcalls::path_open

pub unsafe fn path_open(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    dirflags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    oflags: __wasi_oflags_t,
    fs_rights_base: __wasi_rights_t,
    fs_rights_inherting: __wasi_rights_t,
    fdflags: __wasi_fdflags_t,
    opened_fd: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.path_readlink.html b/api/wasi_common/hostcalls/fn.path_readlink.html new file mode 100644 index 000000000000..769f8c69a043 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.path_readlink.html @@ -0,0 +1 @@ +wasi_common::hostcalls::path_readlink - Rust

[][src]Function wasi_common::hostcalls::path_readlink

pub unsafe fn path_readlink(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    buf: uintptr_t,
    buf_len: size_t,
    bufused: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.path_remove_directory.html b/api/wasi_common/hostcalls/fn.path_remove_directory.html new file mode 100644 index 000000000000..8ba611516655 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.path_remove_directory.html @@ -0,0 +1 @@ +wasi_common::hostcalls::path_remove_directory - Rust

[][src]Function wasi_common::hostcalls::path_remove_directory

pub unsafe fn path_remove_directory(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.path_rename.html b/api/wasi_common/hostcalls/fn.path_rename.html new file mode 100644 index 000000000000..88c7ce94b21c --- /dev/null +++ b/api/wasi_common/hostcalls/fn.path_rename.html @@ -0,0 +1 @@ +wasi_common::hostcalls::path_rename - Rust

[][src]Function wasi_common::hostcalls::path_rename

pub unsafe fn path_rename(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    new_fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.path_symlink.html b/api/wasi_common/hostcalls/fn.path_symlink.html new file mode 100644 index 000000000000..787333003598 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.path_symlink.html @@ -0,0 +1 @@ +wasi_common::hostcalls::path_symlink - Rust

[][src]Function wasi_common::hostcalls::path_symlink

pub unsafe fn path_symlink(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.path_unlink_file.html b/api/wasi_common/hostcalls/fn.path_unlink_file.html new file mode 100644 index 000000000000..f0f2d961dfe0 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.path_unlink_file.html @@ -0,0 +1 @@ +wasi_common::hostcalls::path_unlink_file - Rust

[][src]Function wasi_common::hostcalls::path_unlink_file

pub unsafe fn path_unlink_file(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.poll_oneoff.html b/api/wasi_common/hostcalls/fn.poll_oneoff.html new file mode 100644 index 000000000000..e2d3a8e0b4cd --- /dev/null +++ b/api/wasi_common/hostcalls/fn.poll_oneoff.html @@ -0,0 +1 @@ +wasi_common::hostcalls::poll_oneoff - Rust

[][src]Function wasi_common::hostcalls::poll_oneoff

pub unsafe fn poll_oneoff(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    r#in: uintptr_t,
    out: uintptr_t,
    nsubscriptions: size_t,
    nevents: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.proc_exit.html b/api/wasi_common/hostcalls/fn.proc_exit.html new file mode 100644 index 000000000000..1d4b92306086 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.proc_exit.html @@ -0,0 +1 @@ +wasi_common::hostcalls::proc_exit - Rust

[][src]Function wasi_common::hostcalls::proc_exit

pub unsafe fn proc_exit(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    rval: __wasi_exitcode_t
)
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.proc_raise.html b/api/wasi_common/hostcalls/fn.proc_raise.html new file mode 100644 index 000000000000..e26a311243c6 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.proc_raise.html @@ -0,0 +1 @@ +wasi_common::hostcalls::proc_raise - Rust

[][src]Function wasi_common::hostcalls::proc_raise

pub unsafe fn proc_raise(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    sig: __wasi_signal_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.random_get.html b/api/wasi_common/hostcalls/fn.random_get.html new file mode 100644 index 000000000000..a02cadfb4d84 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.random_get.html @@ -0,0 +1 @@ +wasi_common::hostcalls::random_get - Rust

[][src]Function wasi_common::hostcalls::random_get

pub unsafe fn random_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    buf: uintptr_t,
    buf_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.sched_yield.html b/api/wasi_common/hostcalls/fn.sched_yield.html new file mode 100644 index 000000000000..1c5044c858ef --- /dev/null +++ b/api/wasi_common/hostcalls/fn.sched_yield.html @@ -0,0 +1 @@ +wasi_common::hostcalls::sched_yield - Rust

[][src]Function wasi_common::hostcalls::sched_yield

pub unsafe fn sched_yield(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8]
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.sock_recv.html b/api/wasi_common/hostcalls/fn.sock_recv.html new file mode 100644 index 000000000000..542b641dac90 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.sock_recv.html @@ -0,0 +1 @@ +wasi_common::hostcalls::sock_recv - Rust

[][src]Function wasi_common::hostcalls::sock_recv

pub unsafe fn sock_recv(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    ri_data_ptr: uintptr_t,
    ri_data_len: size_t,
    ri_flags: __wasi_riflags_t,
    ro_datalen: uintptr_t,
    ro_flags: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.sock_send.html b/api/wasi_common/hostcalls/fn.sock_send.html new file mode 100644 index 000000000000..98feb8e4446b --- /dev/null +++ b/api/wasi_common/hostcalls/fn.sock_send.html @@ -0,0 +1 @@ +wasi_common::hostcalls::sock_send - Rust

[][src]Function wasi_common::hostcalls::sock_send

pub unsafe fn sock_send(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    si_data_ptr: uintptr_t,
    si_data_len: size_t,
    si_flags: __wasi_siflags_t,
    so_datalen: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.sock_shutdown.html b/api/wasi_common/hostcalls/fn.sock_shutdown.html new file mode 100644 index 000000000000..92b99ef145a9 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.sock_shutdown.html @@ -0,0 +1 @@ +wasi_common::hostcalls::sock_shutdown - Rust

[][src]Function wasi_common::hostcalls::sock_shutdown

pub unsafe fn sock_shutdown(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    how: __wasi_sdflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_args_get.html b/api/wasi_common/hostcalls/fn.wasi_common_args_get.html new file mode 100644 index 000000000000..23caf2ec13af --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_args_get.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_args_get - Rust

[][src]Function wasi_common::hostcalls::wasi_common_args_get

#[no_mangle]
+pub unsafe fn wasi_common_args_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    argv: uintptr_t,
    argv_buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_args_sizes_get.html b/api/wasi_common/hostcalls/fn.wasi_common_args_sizes_get.html new file mode 100644 index 000000000000..87fb0c1939d2 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_args_sizes_get.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_args_sizes_get - Rust

[][src]Function wasi_common::hostcalls::wasi_common_args_sizes_get

#[no_mangle]
+pub unsafe fn wasi_common_args_sizes_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    argc: uintptr_t,
    argv_buf_size: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_clock_res_get.html b/api/wasi_common/hostcalls/fn.wasi_common_clock_res_get.html new file mode 100644 index 000000000000..260bfdf13191 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_clock_res_get.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_clock_res_get - Rust

[][src]Function wasi_common::hostcalls::wasi_common_clock_res_get

#[no_mangle]
+pub unsafe fn wasi_common_clock_res_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    id: __wasi_clockid_t,
    resolution: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_clock_time_get.html b/api/wasi_common/hostcalls/fn.wasi_common_clock_time_get.html new file mode 100644 index 000000000000..cef0693cc701 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_clock_time_get.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_clock_time_get - Rust

[][src]Function wasi_common::hostcalls::wasi_common_clock_time_get

#[no_mangle]
+pub unsafe fn wasi_common_clock_time_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    id: __wasi_clockid_t,
    precision: __wasi_timestamp_t,
    time: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_environ_get.html b/api/wasi_common/hostcalls/fn.wasi_common_environ_get.html new file mode 100644 index 000000000000..e77cfa71f9fc --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_environ_get.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_environ_get - Rust

[][src]Function wasi_common::hostcalls::wasi_common_environ_get

#[no_mangle]
+pub unsafe fn wasi_common_environ_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    environ: uintptr_t,
    environ_buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_environ_sizes_get.html b/api/wasi_common/hostcalls/fn.wasi_common_environ_sizes_get.html new file mode 100644 index 000000000000..1f04eea1a4d4 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_environ_sizes_get.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_environ_sizes_get - Rust

[][src]Function wasi_common::hostcalls::wasi_common_environ_sizes_get

#[no_mangle]
+pub unsafe fn wasi_common_environ_sizes_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    argc: uintptr_t,
    argv_buf_size: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_advise.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_advise.html new file mode 100644 index 000000000000..52f1d4a1a091 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_advise.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_advise - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_advise

#[no_mangle]
+pub unsafe fn wasi_common_fd_advise(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    offset: __wasi_filesize_t,
    len: __wasi_filesize_t,
    advice: __wasi_advice_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_allocate.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_allocate.html new file mode 100644 index 000000000000..56bd23be8a3f --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_allocate.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_allocate - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_allocate

#[no_mangle]
+pub unsafe fn wasi_common_fd_allocate(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    offset: __wasi_filesize_t,
    len: __wasi_filesize_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_close.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_close.html new file mode 100644 index 000000000000..64f3818c1212 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_close.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_close - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_close

#[no_mangle]
+pub unsafe fn wasi_common_fd_close(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_datasync.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_datasync.html new file mode 100644 index 000000000000..95680423ef1b --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_datasync.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_datasync - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_datasync

#[no_mangle]
+pub unsafe fn wasi_common_fd_datasync(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_fdstat_get.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_fdstat_get.html new file mode 100644 index 000000000000..00dea0e247a6 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_fdstat_get.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_fdstat_get - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_fdstat_get

#[no_mangle]
+pub unsafe fn wasi_common_fd_fdstat_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    stat: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_fdstat_set_flags.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_fdstat_set_flags.html new file mode 100644 index 000000000000..383bd745c773 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_fdstat_set_flags.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_fdstat_set_flags - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_fdstat_set_flags

#[no_mangle]
+pub unsafe fn wasi_common_fd_fdstat_set_flags(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    flags: __wasi_fdflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_fdstat_set_rights.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_fdstat_set_rights.html new file mode 100644 index 000000000000..1420d81be91d --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_fdstat_set_rights.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_fdstat_set_rights - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_fdstat_set_rights

#[no_mangle]
+pub unsafe fn wasi_common_fd_fdstat_set_rights(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    fs_rights_base: __wasi_rights_t,
    fs_rights_inheriting: __wasi_rights_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_filestat_get.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_filestat_get.html new file mode 100644 index 000000000000..3f3976d6e548 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_filestat_get.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_filestat_get - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_filestat_get

#[no_mangle]
+pub unsafe fn wasi_common_fd_filestat_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_filestat_set_size.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_filestat_set_size.html new file mode 100644 index 000000000000..3ce41e1fb208 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_filestat_set_size.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_filestat_set_size - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_filestat_set_size

#[no_mangle]
+pub unsafe fn wasi_common_fd_filestat_set_size(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    size: __wasi_filesize_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_filestat_set_times.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_filestat_set_times.html new file mode 100644 index 000000000000..b528bd58c884 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_filestat_set_times.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_filestat_set_times - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_filestat_set_times

#[no_mangle]
+pub unsafe fn wasi_common_fd_filestat_set_times(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    atim: __wasi_timestamp_t,
    mtim: __wasi_timestamp_t,
    fst_flags: __wasi_fstflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_pread.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_pread.html new file mode 100644 index 000000000000..c620c75eeb48 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_pread.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_pread - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_pread

#[no_mangle]
+pub unsafe fn wasi_common_fd_pread(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    offset: __wasi_filesize_t,
    nread: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_prestat_dir_name.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_prestat_dir_name.html new file mode 100644 index 000000000000..f85965e4ffa4 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_prestat_dir_name.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_prestat_dir_name - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_prestat_dir_name

#[no_mangle]
+pub unsafe fn wasi_common_fd_prestat_dir_name(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    path: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_prestat_get.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_prestat_get.html new file mode 100644 index 000000000000..7e17320bce01 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_prestat_get.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_prestat_get - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_prestat_get

#[no_mangle]
+pub unsafe fn wasi_common_fd_prestat_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_pwrite.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_pwrite.html new file mode 100644 index 000000000000..0946dd3278e8 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_pwrite.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_pwrite - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_pwrite

#[no_mangle]
+pub unsafe fn wasi_common_fd_pwrite(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    offset: __wasi_filesize_t,
    nwritten: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_read.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_read.html new file mode 100644 index 000000000000..adf1d7ae5038 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_read.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_read - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_read

#[no_mangle]
+pub unsafe fn wasi_common_fd_read(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    nread: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_readdir.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_readdir.html new file mode 100644 index 000000000000..5b921a7cfe5b --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_readdir.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_readdir - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_readdir

#[no_mangle]
+pub unsafe fn wasi_common_fd_readdir(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    buf: uintptr_t,
    buf_len: size_t,
    cookie: __wasi_dircookie_t,
    bufused: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_renumber.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_renumber.html new file mode 100644 index 000000000000..cc2db12976f2 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_renumber.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_renumber - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_renumber

#[no_mangle]
+pub unsafe fn wasi_common_fd_renumber(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    to: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_seek.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_seek.html new file mode 100644 index 000000000000..1995164c8082 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_seek.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_seek - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_seek

#[no_mangle]
+pub unsafe fn wasi_common_fd_seek(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    offset: __wasi_filedelta_t,
    whence: __wasi_whence_t,
    newoffset: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_sync.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_sync.html new file mode 100644 index 000000000000..d12af7877e3b --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_sync.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_sync - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_sync

#[no_mangle]
+pub unsafe fn wasi_common_fd_sync(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_tell.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_tell.html new file mode 100644 index 000000000000..46333240a4ca --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_tell.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_tell - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_tell

#[no_mangle]
+pub unsafe fn wasi_common_fd_tell(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    offset: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_fd_write.html b/api/wasi_common/hostcalls/fn.wasi_common_fd_write.html new file mode 100644 index 000000000000..4985eb1462d7 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_fd_write.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_fd_write - Rust

[][src]Function wasi_common::hostcalls::wasi_common_fd_write

#[no_mangle]
+pub unsafe fn wasi_common_fd_write(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    nwritten: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_path_create_directory.html b/api/wasi_common/hostcalls/fn.wasi_common_path_create_directory.html new file mode 100644 index 000000000000..078a2d1ee1f6 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_path_create_directory.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_path_create_directory - Rust

[][src]Function wasi_common::hostcalls::wasi_common_path_create_directory

#[no_mangle]
+pub unsafe fn wasi_common_path_create_directory(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_path_filestat_get.html b/api/wasi_common/hostcalls/fn.wasi_common_path_filestat_get.html new file mode 100644 index 000000000000..9656d20c21ec --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_path_filestat_get.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_path_filestat_get - Rust

[][src]Function wasi_common::hostcalls::wasi_common_path_filestat_get

#[no_mangle]
+pub unsafe fn wasi_common_path_filestat_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    flags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_path_filestat_set_times.html b/api/wasi_common/hostcalls/fn.wasi_common_path_filestat_set_times.html new file mode 100644 index 000000000000..c64695014ef7 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_path_filestat_set_times.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_path_filestat_set_times - Rust

[][src]Function wasi_common::hostcalls::wasi_common_path_filestat_set_times

#[no_mangle]
+pub unsafe fn wasi_common_path_filestat_set_times(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    flags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    atim: __wasi_timestamp_t,
    mtim: __wasi_timestamp_t,
    fst_flags: __wasi_fstflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_path_link.html b/api/wasi_common/hostcalls/fn.wasi_common_path_link.html new file mode 100644 index 000000000000..01c7f2fcf8c4 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_path_link.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_path_link - Rust

[][src]Function wasi_common::hostcalls::wasi_common_path_link

#[no_mangle]
+pub unsafe fn wasi_common_path_link(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    old_fd: __wasi_fd_t,
    old_flags: __wasi_lookupflags_t,
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    new_fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_path_open.html b/api/wasi_common/hostcalls/fn.wasi_common_path_open.html new file mode 100644 index 000000000000..b35765221c51 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_path_open.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_path_open - Rust

[][src]Function wasi_common::hostcalls::wasi_common_path_open

#[no_mangle]
+pub unsafe fn wasi_common_path_open(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    dirflags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    oflags: __wasi_oflags_t,
    fs_rights_base: __wasi_rights_t,
    fs_rights_inherting: __wasi_rights_t,
    fdflags: __wasi_fdflags_t,
    opened_fd: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_path_readlink.html b/api/wasi_common/hostcalls/fn.wasi_common_path_readlink.html new file mode 100644 index 000000000000..779cea67033d --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_path_readlink.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_path_readlink - Rust

[][src]Function wasi_common::hostcalls::wasi_common_path_readlink

#[no_mangle]
+pub unsafe fn wasi_common_path_readlink(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    buf: uintptr_t,
    buf_len: size_t,
    bufused: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_path_remove_directory.html b/api/wasi_common/hostcalls/fn.wasi_common_path_remove_directory.html new file mode 100644 index 000000000000..d4055051f8f7 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_path_remove_directory.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_path_remove_directory - Rust

[][src]Function wasi_common::hostcalls::wasi_common_path_remove_directory

#[no_mangle]
+pub unsafe fn wasi_common_path_remove_directory(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_path_rename.html b/api/wasi_common/hostcalls/fn.wasi_common_path_rename.html new file mode 100644 index 000000000000..52709f8afe92 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_path_rename.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_path_rename - Rust

[][src]Function wasi_common::hostcalls::wasi_common_path_rename

#[no_mangle]
+pub unsafe fn wasi_common_path_rename(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    new_fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_path_symlink.html b/api/wasi_common/hostcalls/fn.wasi_common_path_symlink.html new file mode 100644 index 000000000000..8ea6d7431b47 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_path_symlink.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_path_symlink - Rust

[][src]Function wasi_common::hostcalls::wasi_common_path_symlink

#[no_mangle]
+pub unsafe fn wasi_common_path_symlink(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_path_unlink_file.html b/api/wasi_common/hostcalls/fn.wasi_common_path_unlink_file.html new file mode 100644 index 000000000000..2e4333839a5b --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_path_unlink_file.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_path_unlink_file - Rust

[][src]Function wasi_common::hostcalls::wasi_common_path_unlink_file

#[no_mangle]
+pub unsafe fn wasi_common_path_unlink_file(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_poll_oneoff.html b/api/wasi_common/hostcalls/fn.wasi_common_poll_oneoff.html new file mode 100644 index 000000000000..0f3807d258a2 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_poll_oneoff.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_poll_oneoff - Rust

[][src]Function wasi_common::hostcalls::wasi_common_poll_oneoff

#[no_mangle]
+pub unsafe fn wasi_common_poll_oneoff(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    r#in: uintptr_t,
    out: uintptr_t,
    nsubscriptions: size_t,
    nevents: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_proc_exit.html b/api/wasi_common/hostcalls/fn.wasi_common_proc_exit.html new file mode 100644 index 000000000000..16f212f9622d --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_proc_exit.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_proc_exit - Rust

[][src]Function wasi_common::hostcalls::wasi_common_proc_exit

#[no_mangle]
+pub unsafe fn wasi_common_proc_exit(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    rval: __wasi_exitcode_t
)
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_proc_raise.html b/api/wasi_common/hostcalls/fn.wasi_common_proc_raise.html new file mode 100644 index 000000000000..b014a994927f --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_proc_raise.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_proc_raise - Rust

[][src]Function wasi_common::hostcalls::wasi_common_proc_raise

#[no_mangle]
+pub unsafe fn wasi_common_proc_raise(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    sig: __wasi_signal_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_random_get.html b/api/wasi_common/hostcalls/fn.wasi_common_random_get.html new file mode 100644 index 000000000000..72efbb5eba85 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_random_get.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_random_get - Rust

[][src]Function wasi_common::hostcalls::wasi_common_random_get

#[no_mangle]
+pub unsafe fn wasi_common_random_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    buf: uintptr_t,
    buf_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_sched_yield.html b/api/wasi_common/hostcalls/fn.wasi_common_sched_yield.html new file mode 100644 index 000000000000..436fab8b10f6 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_sched_yield.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_sched_yield - Rust

[][src]Function wasi_common::hostcalls::wasi_common_sched_yield

#[no_mangle]
+pub unsafe fn wasi_common_sched_yield(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_sock_recv.html b/api/wasi_common/hostcalls/fn.wasi_common_sock_recv.html new file mode 100644 index 000000000000..82d95bfadf3a --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_sock_recv.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_sock_recv - Rust

[][src]Function wasi_common::hostcalls::wasi_common_sock_recv

#[no_mangle]
+pub unsafe fn wasi_common_sock_recv(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    ri_data_ptr: uintptr_t,
    ri_data_len: size_t,
    ri_flags: __wasi_riflags_t,
    ro_datalen: uintptr_t,
    ro_flags: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_sock_send.html b/api/wasi_common/hostcalls/fn.wasi_common_sock_send.html new file mode 100644 index 000000000000..1d53723ae5a4 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_sock_send.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_sock_send - Rust

[][src]Function wasi_common::hostcalls::wasi_common_sock_send

#[no_mangle]
+pub unsafe fn wasi_common_sock_send(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    si_data_ptr: uintptr_t,
    si_data_len: size_t,
    si_flags: __wasi_siflags_t,
    so_datalen: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/fn.wasi_common_sock_shutdown.html b/api/wasi_common/hostcalls/fn.wasi_common_sock_shutdown.html new file mode 100644 index 000000000000..b90233d9c748 --- /dev/null +++ b/api/wasi_common/hostcalls/fn.wasi_common_sock_shutdown.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls::wasi_common_sock_shutdown - Rust

[][src]Function wasi_common::hostcalls::wasi_common_sock_shutdown

#[no_mangle]
+pub unsafe fn wasi_common_sock_shutdown(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    how: __wasi_sdflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/index.html b/api/wasi_common/hostcalls/index.html new file mode 100644 index 000000000000..bf26eb1192f1 --- /dev/null +++ b/api/wasi_common/hostcalls/index.html @@ -0,0 +1,2 @@ +wasi_common::hostcalls - Rust

[][src]Module wasi_common::hostcalls

Functions

+
args_get
args_sizes_get
clock_res_get
clock_time_get
environ_get
environ_sizes_get
fd_advise
fd_allocate
fd_close
fd_datasync
fd_fdstat_get
fd_fdstat_set_flags
fd_fdstat_set_rights
fd_filestat_get
fd_filestat_set_size
fd_filestat_set_times
fd_pread
fd_prestat_dir_name
fd_prestat_get
fd_pwrite
fd_read
fd_readdir
fd_renumber
fd_seek
fd_sync
fd_tell
fd_write
path_create_directory
path_filestat_get
path_filestat_set_times
path_link
path_open
path_readlink
path_remove_directory
path_rename
path_symlink
path_unlink_file
poll_oneoff
proc_exit
proc_raise
random_get
sched_yield
sock_recv
sock_send
sock_shutdown
wasi_common_args_get
wasi_common_args_sizes_get
wasi_common_clock_res_get
wasi_common_clock_time_get
wasi_common_environ_get
wasi_common_environ_sizes_get
wasi_common_fd_advise
wasi_common_fd_allocate
wasi_common_fd_close
wasi_common_fd_datasync
wasi_common_fd_fdstat_get
wasi_common_fd_fdstat_set_flags
wasi_common_fd_fdstat_set_rights
wasi_common_fd_filestat_get
wasi_common_fd_filestat_set_size
wasi_common_fd_filestat_set_times
wasi_common_fd_pread
wasi_common_fd_prestat_dir_name
wasi_common_fd_prestat_get
wasi_common_fd_pwrite
wasi_common_fd_read
wasi_common_fd_readdir
wasi_common_fd_renumber
wasi_common_fd_seek
wasi_common_fd_sync
wasi_common_fd_tell
wasi_common_fd_write
wasi_common_path_create_directory
wasi_common_path_filestat_get
wasi_common_path_filestat_set_times
wasi_common_path_link
wasi_common_path_open
wasi_common_path_readlink
wasi_common_path_remove_directory
wasi_common_path_rename
wasi_common_path_symlink
wasi_common_path_unlink_file
wasi_common_poll_oneoff
wasi_common_proc_exit
wasi_common_proc_raise
wasi_common_random_get
wasi_common_sched_yield
wasi_common_sock_recv
wasi_common_sock_send
wasi_common_sock_shutdown
\ No newline at end of file diff --git a/api/wasi_common/hostcalls/sidebar-items.js b/api/wasi_common/hostcalls/sidebar-items.js new file mode 100644 index 000000000000..621ae86f1e02 --- /dev/null +++ b/api/wasi_common/hostcalls/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["args_get",""],["args_sizes_get",""],["clock_res_get",""],["clock_time_get",""],["environ_get",""],["environ_sizes_get",""],["fd_advise",""],["fd_allocate",""],["fd_close",""],["fd_datasync",""],["fd_fdstat_get",""],["fd_fdstat_set_flags",""],["fd_fdstat_set_rights",""],["fd_filestat_get",""],["fd_filestat_set_size",""],["fd_filestat_set_times",""],["fd_pread",""],["fd_prestat_dir_name",""],["fd_prestat_get",""],["fd_pwrite",""],["fd_read",""],["fd_readdir",""],["fd_renumber",""],["fd_seek",""],["fd_sync",""],["fd_tell",""],["fd_write",""],["path_create_directory",""],["path_filestat_get",""],["path_filestat_set_times",""],["path_link",""],["path_open",""],["path_readlink",""],["path_remove_directory",""],["path_rename",""],["path_symlink",""],["path_unlink_file",""],["poll_oneoff",""],["proc_exit",""],["proc_raise",""],["random_get",""],["sched_yield",""],["sock_recv",""],["sock_send",""],["sock_shutdown",""],["wasi_common_args_get",""],["wasi_common_args_sizes_get",""],["wasi_common_clock_res_get",""],["wasi_common_clock_time_get",""],["wasi_common_environ_get",""],["wasi_common_environ_sizes_get",""],["wasi_common_fd_advise",""],["wasi_common_fd_allocate",""],["wasi_common_fd_close",""],["wasi_common_fd_datasync",""],["wasi_common_fd_fdstat_get",""],["wasi_common_fd_fdstat_set_flags",""],["wasi_common_fd_fdstat_set_rights",""],["wasi_common_fd_filestat_get",""],["wasi_common_fd_filestat_set_size",""],["wasi_common_fd_filestat_set_times",""],["wasi_common_fd_pread",""],["wasi_common_fd_prestat_dir_name",""],["wasi_common_fd_prestat_get",""],["wasi_common_fd_pwrite",""],["wasi_common_fd_read",""],["wasi_common_fd_readdir",""],["wasi_common_fd_renumber",""],["wasi_common_fd_seek",""],["wasi_common_fd_sync",""],["wasi_common_fd_tell",""],["wasi_common_fd_write",""],["wasi_common_path_create_directory",""],["wasi_common_path_filestat_get",""],["wasi_common_path_filestat_set_times",""],["wasi_common_path_link",""],["wasi_common_path_open",""],["wasi_common_path_readlink",""],["wasi_common_path_remove_directory",""],["wasi_common_path_rename",""],["wasi_common_path_symlink",""],["wasi_common_path_unlink_file",""],["wasi_common_poll_oneoff",""],["wasi_common_proc_exit",""],["wasi_common_proc_raise",""],["wasi_common_random_get",""],["wasi_common_sched_yield",""],["wasi_common_sock_recv",""],["wasi_common_sock_send",""],["wasi_common_sock_shutdown",""]]}); \ No newline at end of file diff --git a/api/wasi_common/index.html b/api/wasi_common/index.html new file mode 100644 index 000000000000..c3b50f85cfb2 --- /dev/null +++ b/api/wasi_common/index.html @@ -0,0 +1,15 @@ +wasi_common - Rust

[][src]Crate wasi_common

Modules

+
fs

A very experimental module modeled providing a high-level and safe +filesystem interface, modeled after std::fs, implemented on top of +WASI functions.

+
hostcalls
old
wasi

Types and constants shared between 32-bit and 64-bit wasi. Types involving +pointer or usize-sized data are excluded here, so this file only contains +fixed-size types, so it's host/target independent.

+
wasi32

Types and constants specific to 32-bit wasi. These are similar to the types +in the host module, but pointers and usize values are replaced with +u32-sized types.

+

Structs

+
WasiCtx
WasiCtxBuilder

A builder allowing customizable construction of WasiCtx instances.

+

Enums

+
Error

Functions

+
preopen_dir
\ No newline at end of file diff --git a/api/wasi_common/old/index.html b/api/wasi_common/old/index.html new file mode 100644 index 000000000000..cb4b1c9f3aa2 --- /dev/null +++ b/api/wasi_common/old/index.html @@ -0,0 +1,2 @@ +wasi_common::old - Rust

[][src]Module wasi_common::old

Modules

+
snapshot_0
\ No newline at end of file diff --git a/api/wasi_common/old/sidebar-items.js b/api/wasi_common/old/sidebar-items.js new file mode 100644 index 000000000000..02e15d991f23 --- /dev/null +++ b/api/wasi_common/old/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["snapshot_0",""]]}); \ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/ctx/struct.WasiCtx.html b/api/wasi_common/old/snapshot_0/ctx/struct.WasiCtx.html new file mode 100644 index 000000000000..4db89e063e38 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/ctx/struct.WasiCtx.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasi_common/old/snapshot_0/struct.WasiCtx.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/ctx/struct.WasiCtxBuilder.html b/api/wasi_common/old/snapshot_0/ctx/struct.WasiCtxBuilder.html new file mode 100644 index 000000000000..eb5e49b88af2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/ctx/struct.WasiCtxBuilder.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasi_common/old/snapshot_0/struct.WasiCtxBuilder.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.args_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.args_get.html new file mode 100644 index 000000000000..7bd7b0a3736b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.args_get.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::args_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::args_get

pub unsafe fn args_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    argv: uintptr_t,
    argv_buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.args_sizes_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.args_sizes_get.html new file mode 100644 index 000000000000..7d97d256bc3b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.args_sizes_get.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::args_sizes_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::args_sizes_get

pub unsafe fn args_sizes_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    argc: uintptr_t,
    argv_buf_size: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.clock_res_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.clock_res_get.html new file mode 100644 index 000000000000..bbff0a6b5498 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.clock_res_get.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::clock_res_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::clock_res_get

pub unsafe fn clock_res_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    id: __wasi_clockid_t,
    resolution: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.clock_time_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.clock_time_get.html new file mode 100644 index 000000000000..598ed25ad22e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.clock_time_get.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::clock_time_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::clock_time_get

pub unsafe fn clock_time_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    id: __wasi_clockid_t,
    precision: __wasi_timestamp_t,
    time: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.environ_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.environ_get.html new file mode 100644 index 000000000000..f25eec09a8aa --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.environ_get.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::environ_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::environ_get

pub unsafe fn environ_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    environ: uintptr_t,
    environ_buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.environ_sizes_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.environ_sizes_get.html new file mode 100644 index 000000000000..1bcecb5eb49b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.environ_sizes_get.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::environ_sizes_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::environ_sizes_get

pub unsafe fn environ_sizes_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    argc: uintptr_t,
    argv_buf_size: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_advise.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_advise.html new file mode 100644 index 000000000000..0e8e13ef33fb --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_advise.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_advise - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_advise

pub unsafe fn fd_advise(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    offset: __wasi_filesize_t,
    len: __wasi_filesize_t,
    advice: __wasi_advice_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_allocate.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_allocate.html new file mode 100644 index 000000000000..da00d803b5fd --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_allocate.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_allocate - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_allocate

pub unsafe fn fd_allocate(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    offset: __wasi_filesize_t,
    len: __wasi_filesize_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_close.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_close.html new file mode 100644 index 000000000000..96bac9b7d3f5 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_close.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_close - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_close

pub unsafe fn fd_close(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_datasync.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_datasync.html new file mode 100644 index 000000000000..94390ef5d923 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_datasync.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_datasync - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_datasync

pub unsafe fn fd_datasync(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_fdstat_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_fdstat_get.html new file mode 100644 index 000000000000..b167ff9d17b1 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_fdstat_get.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_fdstat_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_fdstat_get

pub unsafe fn fd_fdstat_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    stat: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_fdstat_set_flags.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_fdstat_set_flags.html new file mode 100644 index 000000000000..132ffcb36eb5 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_fdstat_set_flags.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_fdstat_set_flags - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_fdstat_set_flags

pub unsafe fn fd_fdstat_set_flags(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    flags: __wasi_fdflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_fdstat_set_rights.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_fdstat_set_rights.html new file mode 100644 index 000000000000..a5fe8d7a67eb --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_fdstat_set_rights.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_fdstat_set_rights - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_fdstat_set_rights

pub unsafe fn fd_fdstat_set_rights(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    fs_rights_base: __wasi_rights_t,
    fs_rights_inheriting: __wasi_rights_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_filestat_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_filestat_get.html new file mode 100644 index 000000000000..25de126f1087 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_filestat_get.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_filestat_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_filestat_get

pub unsafe fn fd_filestat_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_filestat_set_size.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_filestat_set_size.html new file mode 100644 index 000000000000..0d378657e00e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_filestat_set_size.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_filestat_set_size - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_filestat_set_size

pub unsafe fn fd_filestat_set_size(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    size: __wasi_filesize_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_filestat_set_times.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_filestat_set_times.html new file mode 100644 index 000000000000..d05bc23c6668 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_filestat_set_times.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_filestat_set_times - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_filestat_set_times

pub unsafe fn fd_filestat_set_times(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    atim: __wasi_timestamp_t,
    mtim: __wasi_timestamp_t,
    fst_flags: __wasi_fstflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_pread.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_pread.html new file mode 100644 index 000000000000..9ab06ec336f0 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_pread.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_pread - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_pread

pub unsafe fn fd_pread(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    offset: __wasi_filesize_t,
    nread: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_prestat_dir_name.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_prestat_dir_name.html new file mode 100644 index 000000000000..deaf6f7b06ac --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_prestat_dir_name.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_prestat_dir_name - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_prestat_dir_name

pub unsafe fn fd_prestat_dir_name(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    path: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_prestat_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_prestat_get.html new file mode 100644 index 000000000000..2ad2b5a85816 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_prestat_get.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_prestat_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_prestat_get

pub unsafe fn fd_prestat_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_pwrite.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_pwrite.html new file mode 100644 index 000000000000..e4a24f736848 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_pwrite.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_pwrite - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_pwrite

pub unsafe fn fd_pwrite(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    offset: __wasi_filesize_t,
    nwritten: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_read.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_read.html new file mode 100644 index 000000000000..4cf86fd3a6a8 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_read.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_read - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_read

pub unsafe fn fd_read(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    nread: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_readdir.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_readdir.html new file mode 100644 index 000000000000..545cdd88e5ad --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_readdir.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_readdir - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_readdir

pub unsafe fn fd_readdir(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    buf: uintptr_t,
    buf_len: size_t,
    cookie: __wasi_dircookie_t,
    bufused: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_renumber.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_renumber.html new file mode 100644 index 000000000000..df29956e71c8 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_renumber.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_renumber - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_renumber

pub unsafe fn fd_renumber(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    to: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_seek.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_seek.html new file mode 100644 index 000000000000..6e0f377c10ee --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_seek.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_seek - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_seek

pub unsafe fn fd_seek(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    offset: __wasi_filedelta_t,
    whence: __wasi_whence_t,
    newoffset: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_sync.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_sync.html new file mode 100644 index 000000000000..9a4ed8e7e145 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_sync.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_sync - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_sync

pub unsafe fn fd_sync(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_tell.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_tell.html new file mode 100644 index 000000000000..d048a9aa42be --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_tell.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_tell - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_tell

pub unsafe fn fd_tell(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    offset: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_write.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_write.html new file mode 100644 index 000000000000..1eb69580ea33 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.fd_write.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::fd_write - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::fd_write

pub unsafe fn fd_write(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    nwritten: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_args_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_args_get.html new file mode 100644 index 000000000000..4ff8ba574ea8 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_args_get.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_args_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_args_get

#[no_mangle]
+pub unsafe fn old_wasi_common_args_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    argv: uintptr_t,
    argv_buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_args_sizes_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_args_sizes_get.html new file mode 100644 index 000000000000..09a7f6a692f1 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_args_sizes_get.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_args_sizes_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_args_sizes_get

#[no_mangle]
+pub unsafe fn old_wasi_common_args_sizes_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    argc: uintptr_t,
    argv_buf_size: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_clock_res_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_clock_res_get.html new file mode 100644 index 000000000000..4ffe1dc20727 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_clock_res_get.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_clock_res_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_clock_res_get

#[no_mangle]
+pub unsafe fn old_wasi_common_clock_res_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    id: __wasi_clockid_t,
    resolution: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_clock_time_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_clock_time_get.html new file mode 100644 index 000000000000..1bafcbfb9551 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_clock_time_get.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_clock_time_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_clock_time_get

#[no_mangle]
+pub unsafe fn old_wasi_common_clock_time_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    id: __wasi_clockid_t,
    precision: __wasi_timestamp_t,
    time: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_environ_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_environ_get.html new file mode 100644 index 000000000000..43a784410a9a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_environ_get.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_environ_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_environ_get

#[no_mangle]
+pub unsafe fn old_wasi_common_environ_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    environ: uintptr_t,
    environ_buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_environ_sizes_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_environ_sizes_get.html new file mode 100644 index 000000000000..eb50fcf72d4c --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_environ_sizes_get.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_environ_sizes_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_environ_sizes_get

#[no_mangle]
+pub unsafe fn old_wasi_common_environ_sizes_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    argc: uintptr_t,
    argv_buf_size: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_advise.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_advise.html new file mode 100644 index 000000000000..10fef534a3f7 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_advise.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_advise - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_advise

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_advise(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    offset: __wasi_filesize_t,
    len: __wasi_filesize_t,
    advice: __wasi_advice_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_allocate.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_allocate.html new file mode 100644 index 000000000000..7a867539fb11 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_allocate.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_allocate - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_allocate

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_allocate(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    offset: __wasi_filesize_t,
    len: __wasi_filesize_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_close.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_close.html new file mode 100644 index 000000000000..64af4f337300 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_close.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_close - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_close

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_close(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_datasync.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_datasync.html new file mode 100644 index 000000000000..990f8fe55c3e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_datasync.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_datasync - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_datasync

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_datasync(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_fdstat_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_fdstat_get.html new file mode 100644 index 000000000000..7fc1380cfd47 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_fdstat_get.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_fdstat_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_fdstat_get

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_fdstat_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    stat: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_fdstat_set_flags.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_fdstat_set_flags.html new file mode 100644 index 000000000000..bbf0b06861a0 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_fdstat_set_flags.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_fdstat_set_flags - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_fdstat_set_flags

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_fdstat_set_flags(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    flags: __wasi_fdflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_fdstat_set_rights.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_fdstat_set_rights.html new file mode 100644 index 000000000000..e07562b3c718 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_fdstat_set_rights.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_fdstat_set_rights - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_fdstat_set_rights

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_fdstat_set_rights(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    fs_rights_base: __wasi_rights_t,
    fs_rights_inheriting: __wasi_rights_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_filestat_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_filestat_get.html new file mode 100644 index 000000000000..56e9f564091e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_filestat_get.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_filestat_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_filestat_get

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_filestat_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_filestat_set_size.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_filestat_set_size.html new file mode 100644 index 000000000000..008342e13a1c --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_filestat_set_size.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_filestat_set_size - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_filestat_set_size

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_filestat_set_size(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    size: __wasi_filesize_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_filestat_set_times.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_filestat_set_times.html new file mode 100644 index 000000000000..835344a62459 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_filestat_set_times.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_filestat_set_times - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_filestat_set_times

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_filestat_set_times(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    atim: __wasi_timestamp_t,
    mtim: __wasi_timestamp_t,
    fst_flags: __wasi_fstflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_pread.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_pread.html new file mode 100644 index 000000000000..9a5ad744b0c4 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_pread.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_pread - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_pread

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_pread(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    offset: __wasi_filesize_t,
    nread: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_prestat_dir_name.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_prestat_dir_name.html new file mode 100644 index 000000000000..fd3d61940e56 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_prestat_dir_name.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_prestat_dir_name - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_prestat_dir_name

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_prestat_dir_name(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    path: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_prestat_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_prestat_get.html new file mode 100644 index 000000000000..d36d9f65d962 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_prestat_get.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_prestat_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_prestat_get

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_prestat_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_pwrite.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_pwrite.html new file mode 100644 index 000000000000..d9a991e68909 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_pwrite.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_pwrite - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_pwrite

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_pwrite(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    offset: __wasi_filesize_t,
    nwritten: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_read.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_read.html new file mode 100644 index 000000000000..3c30a81f3025 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_read.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_read - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_read

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_read(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    nread: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_readdir.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_readdir.html new file mode 100644 index 000000000000..a996697a0550 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_readdir.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_readdir - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_readdir

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_readdir(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    buf: uintptr_t,
    buf_len: size_t,
    cookie: __wasi_dircookie_t,
    bufused: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_renumber.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_renumber.html new file mode 100644 index 000000000000..93bacd23a3d7 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_renumber.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_renumber - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_renumber

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_renumber(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    to: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_seek.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_seek.html new file mode 100644 index 000000000000..aadd5a0bc1b4 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_seek.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_seek - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_seek

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_seek(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    offset: __wasi_filedelta_t,
    whence: __wasi_whence_t,
    newoffset: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_sync.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_sync.html new file mode 100644 index 000000000000..ec208092a8ab --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_sync.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_sync - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_sync

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_sync(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_tell.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_tell.html new file mode 100644 index 000000000000..51894268d924 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_tell.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_tell - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_tell

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_tell(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    offset: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_write.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_write.html new file mode 100644 index 000000000000..94f51dc95b2b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_fd_write.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_write - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_fd_write

#[no_mangle]
+pub unsafe fn old_wasi_common_fd_write(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    iovs_ptr: uintptr_t,
    iovs_len: size_t,
    nwritten: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_create_directory.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_create_directory.html new file mode 100644 index 000000000000..fbc53784f0b2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_create_directory.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_create_directory - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_create_directory

#[no_mangle]
+pub unsafe fn old_wasi_common_path_create_directory(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_filestat_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_filestat_get.html new file mode 100644 index 000000000000..443570d0adb0 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_filestat_get.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_filestat_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_filestat_get

#[no_mangle]
+pub unsafe fn old_wasi_common_path_filestat_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    flags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_filestat_set_times.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_filestat_set_times.html new file mode 100644 index 000000000000..e4c65b99473e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_filestat_set_times.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_filestat_set_times - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_filestat_set_times

#[no_mangle]
+pub unsafe fn old_wasi_common_path_filestat_set_times(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    flags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    atim: __wasi_timestamp_t,
    mtim: __wasi_timestamp_t,
    fst_flags: __wasi_fstflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_link.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_link.html new file mode 100644 index 000000000000..143882c3ecfa --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_link.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_link - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_link

#[no_mangle]
+pub unsafe fn old_wasi_common_path_link(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    old_fd: __wasi_fd_t,
    old_flags: __wasi_lookupflags_t,
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    new_fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_open.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_open.html new file mode 100644 index 000000000000..9d32e15bb0c4 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_open.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_open - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_open

#[no_mangle]
+pub unsafe fn old_wasi_common_path_open(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    dirflags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    oflags: __wasi_oflags_t,
    fs_rights_base: __wasi_rights_t,
    fs_rights_inherting: __wasi_rights_t,
    fdflags: __wasi_fdflags_t,
    opened_fd: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_readlink.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_readlink.html new file mode 100644 index 000000000000..1fafd933456e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_readlink.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_readlink - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_readlink

#[no_mangle]
+pub unsafe fn old_wasi_common_path_readlink(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    buf: uintptr_t,
    buf_len: size_t,
    bufused: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_remove_directory.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_remove_directory.html new file mode 100644 index 000000000000..aa008c677437 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_remove_directory.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_remove_directory - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_remove_directory

#[no_mangle]
+pub unsafe fn old_wasi_common_path_remove_directory(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_rename.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_rename.html new file mode 100644 index 000000000000..e205b087dce2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_rename.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_rename - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_rename

#[no_mangle]
+pub unsafe fn old_wasi_common_path_rename(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    new_fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_symlink.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_symlink.html new file mode 100644 index 000000000000..a4b7536e9a45 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_symlink.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_symlink - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_symlink

#[no_mangle]
+pub unsafe fn old_wasi_common_path_symlink(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_unlink_file.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_unlink_file.html new file mode 100644 index 000000000000..109657f8c51f --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_path_unlink_file.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_unlink_file - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_path_unlink_file

#[no_mangle]
+pub unsafe fn old_wasi_common_path_unlink_file(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_poll_oneoff.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_poll_oneoff.html new file mode 100644 index 000000000000..f483ca12795a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_poll_oneoff.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_poll_oneoff - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_poll_oneoff

#[no_mangle]
+pub unsafe fn old_wasi_common_poll_oneoff(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    r#in: uintptr_t,
    out: uintptr_t,
    nsubscriptions: size_t,
    nevents: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_proc_exit.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_proc_exit.html new file mode 100644 index 000000000000..0f5db91dec83 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_proc_exit.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_proc_exit - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_proc_exit

#[no_mangle]
+pub unsafe fn old_wasi_common_proc_exit(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    rval: __wasi_exitcode_t
)
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_proc_raise.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_proc_raise.html new file mode 100644 index 000000000000..b12a5d7b89e2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_proc_raise.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_proc_raise - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_proc_raise

#[no_mangle]
+pub unsafe fn old_wasi_common_proc_raise(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    sig: __wasi_signal_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_random_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_random_get.html new file mode 100644 index 000000000000..c04398c1cf53 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_random_get.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_random_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_random_get

#[no_mangle]
+pub unsafe fn old_wasi_common_random_get(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    buf: uintptr_t,
    buf_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sched_yield.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sched_yield.html new file mode 100644 index 000000000000..dbdd4565135b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sched_yield.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_sched_yield - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_sched_yield

#[no_mangle]
+pub unsafe fn old_wasi_common_sched_yield(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sock_recv.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sock_recv.html new file mode 100644 index 000000000000..158adb8a86ec --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sock_recv.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_sock_recv - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_sock_recv

#[no_mangle]
+pub unsafe fn old_wasi_common_sock_recv(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    ri_data_ptr: uintptr_t,
    ri_data_len: size_t,
    ri_flags: __wasi_riflags_t,
    ro_datalen: uintptr_t,
    ro_flags: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sock_send.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sock_send.html new file mode 100644 index 000000000000..aff57980f8f2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sock_send.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_sock_send - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_sock_send

#[no_mangle]
+pub unsafe fn old_wasi_common_sock_send(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    si_data_ptr: uintptr_t,
    si_data_len: size_t,
    si_flags: __wasi_siflags_t,
    so_datalen: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sock_shutdown.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sock_shutdown.html new file mode 100644 index 000000000000..6b25de34b12e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.old_wasi_common_sock_shutdown.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls::old_wasi_common_sock_shutdown - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::old_wasi_common_sock_shutdown

#[no_mangle]
+pub unsafe fn old_wasi_common_sock_shutdown(
    wasi_ctx: *mut WasiCtx,
    memory: *mut u8,
    memory_len: usize,
    fd: __wasi_fd_t,
    how: __wasi_sdflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.path_create_directory.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_create_directory.html new file mode 100644 index 000000000000..b7b1388d5b72 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_create_directory.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::path_create_directory - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::path_create_directory

pub unsafe fn path_create_directory(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.path_filestat_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_filestat_get.html new file mode 100644 index 000000000000..a428df479e55 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_filestat_get.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::path_filestat_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::path_filestat_get

pub unsafe fn path_filestat_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    flags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    buf: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.path_filestat_set_times.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_filestat_set_times.html new file mode 100644 index 000000000000..f227dd7c548c --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_filestat_set_times.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::path_filestat_set_times - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::path_filestat_set_times

pub unsafe fn path_filestat_set_times(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    flags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    atim: __wasi_timestamp_t,
    mtim: __wasi_timestamp_t,
    fst_flags: __wasi_fstflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.path_link.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_link.html new file mode 100644 index 000000000000..89f51ec4745b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_link.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::path_link - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::path_link

pub unsafe fn path_link(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    old_fd: __wasi_fd_t,
    old_flags: __wasi_lookupflags_t,
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    new_fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.path_open.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_open.html new file mode 100644 index 000000000000..31f89d9d3335 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_open.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::path_open - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::path_open

pub unsafe fn path_open(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    dirflags: __wasi_lookupflags_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    oflags: __wasi_oflags_t,
    fs_rights_base: __wasi_rights_t,
    fs_rights_inherting: __wasi_rights_t,
    fdflags: __wasi_fdflags_t,
    opened_fd: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.path_readlink.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_readlink.html new file mode 100644 index 000000000000..50a1629fd63e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_readlink.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::path_readlink - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::path_readlink

pub unsafe fn path_readlink(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t,
    buf: uintptr_t,
    buf_len: size_t,
    bufused: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.path_remove_directory.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_remove_directory.html new file mode 100644 index 000000000000..8d680da4e975 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_remove_directory.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::path_remove_directory - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::path_remove_directory

pub unsafe fn path_remove_directory(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.path_rename.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_rename.html new file mode 100644 index 000000000000..45d0c76fee23 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_rename.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::path_rename - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::path_rename

pub unsafe fn path_rename(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    new_fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.path_symlink.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_symlink.html new file mode 100644 index 000000000000..69eb9b7c7776 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_symlink.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::path_symlink - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::path_symlink

pub unsafe fn path_symlink(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    old_path_ptr: uintptr_t,
    old_path_len: size_t,
    fd: __wasi_fd_t,
    new_path_ptr: uintptr_t,
    new_path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.path_unlink_file.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_unlink_file.html new file mode 100644 index 000000000000..9d317d73c060 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.path_unlink_file.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::path_unlink_file - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::path_unlink_file

pub unsafe fn path_unlink_file(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    path_ptr: uintptr_t,
    path_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.poll_oneoff.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.poll_oneoff.html new file mode 100644 index 000000000000..7dd2ac855ac8 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.poll_oneoff.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::poll_oneoff - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::poll_oneoff

pub unsafe fn poll_oneoff(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    r#in: uintptr_t,
    out: uintptr_t,
    nsubscriptions: size_t,
    nevents: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.proc_exit.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.proc_exit.html new file mode 100644 index 000000000000..34a8d500fd47 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.proc_exit.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::proc_exit - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::proc_exit

pub unsafe fn proc_exit(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    rval: __wasi_exitcode_t
)
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.proc_raise.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.proc_raise.html new file mode 100644 index 000000000000..5e0c3e276cef --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.proc_raise.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::proc_raise - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::proc_raise

pub unsafe fn proc_raise(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    sig: __wasi_signal_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.random_get.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.random_get.html new file mode 100644 index 000000000000..7871e923a6ba --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.random_get.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::random_get - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::random_get

pub unsafe fn random_get(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    buf: uintptr_t,
    buf_len: size_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.sched_yield.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.sched_yield.html new file mode 100644 index 000000000000..94a9b3665718 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.sched_yield.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::sched_yield - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::sched_yield

pub unsafe fn sched_yield(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8]
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.sock_recv.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.sock_recv.html new file mode 100644 index 000000000000..8c866dc79d66 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.sock_recv.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::sock_recv - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::sock_recv

pub unsafe fn sock_recv(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    ri_data_ptr: uintptr_t,
    ri_data_len: size_t,
    ri_flags: __wasi_riflags_t,
    ro_datalen: uintptr_t,
    ro_flags: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.sock_send.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.sock_send.html new file mode 100644 index 000000000000..eb6be1cb709c --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.sock_send.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::sock_send - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::sock_send

pub unsafe fn sock_send(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    si_data_ptr: uintptr_t,
    si_data_len: size_t,
    si_flags: __wasi_siflags_t,
    so_datalen: uintptr_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/fn.sock_shutdown.html b/api/wasi_common/old/snapshot_0/hostcalls/fn.sock_shutdown.html new file mode 100644 index 000000000000..9e4bf7499367 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/fn.sock_shutdown.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::hostcalls::sock_shutdown - Rust

[][src]Function wasi_common::old::snapshot_0::hostcalls::sock_shutdown

pub unsafe fn sock_shutdown(
    wasi_ctx: &mut WasiCtx,
    memory: &mut [u8],
    fd: __wasi_fd_t,
    how: __wasi_sdflags_t
) -> __wasi_errno_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/index.html b/api/wasi_common/old/snapshot_0/hostcalls/index.html new file mode 100644 index 000000000000..01032cfab2ed --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/index.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::hostcalls - Rust

[][src]Module wasi_common::old::snapshot_0::hostcalls

Functions

+
args_get
args_sizes_get
clock_res_get
clock_time_get
environ_get
environ_sizes_get
fd_advise
fd_allocate
fd_close
fd_datasync
fd_fdstat_get
fd_fdstat_set_flags
fd_fdstat_set_rights
fd_filestat_get
fd_filestat_set_size
fd_filestat_set_times
fd_pread
fd_prestat_dir_name
fd_prestat_get
fd_pwrite
fd_read
fd_readdir
fd_renumber
fd_seek
fd_sync
fd_tell
fd_write
old_wasi_common_args_get
old_wasi_common_args_sizes_get
old_wasi_common_clock_res_get
old_wasi_common_clock_time_get
old_wasi_common_environ_get
old_wasi_common_environ_sizes_get
old_wasi_common_fd_advise
old_wasi_common_fd_allocate
old_wasi_common_fd_close
old_wasi_common_fd_datasync
old_wasi_common_fd_fdstat_get
old_wasi_common_fd_fdstat_set_flags
old_wasi_common_fd_fdstat_set_rights
old_wasi_common_fd_filestat_get
old_wasi_common_fd_filestat_set_size
old_wasi_common_fd_filestat_set_times
old_wasi_common_fd_pread
old_wasi_common_fd_prestat_dir_name
old_wasi_common_fd_prestat_get
old_wasi_common_fd_pwrite
old_wasi_common_fd_read
old_wasi_common_fd_readdir
old_wasi_common_fd_renumber
old_wasi_common_fd_seek
old_wasi_common_fd_sync
old_wasi_common_fd_tell
old_wasi_common_fd_write
old_wasi_common_path_create_directory
old_wasi_common_path_filestat_get
old_wasi_common_path_filestat_set_times
old_wasi_common_path_link
old_wasi_common_path_open
old_wasi_common_path_readlink
old_wasi_common_path_remove_directory
old_wasi_common_path_rename
old_wasi_common_path_symlink
old_wasi_common_path_unlink_file
old_wasi_common_poll_oneoff
old_wasi_common_proc_exit
old_wasi_common_proc_raise
old_wasi_common_random_get
old_wasi_common_sched_yield
old_wasi_common_sock_recv
old_wasi_common_sock_send
old_wasi_common_sock_shutdown
path_create_directory
path_filestat_get
path_filestat_set_times
path_link
path_open
path_readlink
path_remove_directory
path_rename
path_symlink
path_unlink_file
poll_oneoff
proc_exit
proc_raise
random_get
sched_yield
sock_recv
sock_send
sock_shutdown
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/hostcalls/sidebar-items.js b/api/wasi_common/old/snapshot_0/hostcalls/sidebar-items.js new file mode 100644 index 000000000000..d462501bced2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/hostcalls/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["args_get",""],["args_sizes_get",""],["clock_res_get",""],["clock_time_get",""],["environ_get",""],["environ_sizes_get",""],["fd_advise",""],["fd_allocate",""],["fd_close",""],["fd_datasync",""],["fd_fdstat_get",""],["fd_fdstat_set_flags",""],["fd_fdstat_set_rights",""],["fd_filestat_get",""],["fd_filestat_set_size",""],["fd_filestat_set_times",""],["fd_pread",""],["fd_prestat_dir_name",""],["fd_prestat_get",""],["fd_pwrite",""],["fd_read",""],["fd_readdir",""],["fd_renumber",""],["fd_seek",""],["fd_sync",""],["fd_tell",""],["fd_write",""],["old_wasi_common_args_get",""],["old_wasi_common_args_sizes_get",""],["old_wasi_common_clock_res_get",""],["old_wasi_common_clock_time_get",""],["old_wasi_common_environ_get",""],["old_wasi_common_environ_sizes_get",""],["old_wasi_common_fd_advise",""],["old_wasi_common_fd_allocate",""],["old_wasi_common_fd_close",""],["old_wasi_common_fd_datasync",""],["old_wasi_common_fd_fdstat_get",""],["old_wasi_common_fd_fdstat_set_flags",""],["old_wasi_common_fd_fdstat_set_rights",""],["old_wasi_common_fd_filestat_get",""],["old_wasi_common_fd_filestat_set_size",""],["old_wasi_common_fd_filestat_set_times",""],["old_wasi_common_fd_pread",""],["old_wasi_common_fd_prestat_dir_name",""],["old_wasi_common_fd_prestat_get",""],["old_wasi_common_fd_pwrite",""],["old_wasi_common_fd_read",""],["old_wasi_common_fd_readdir",""],["old_wasi_common_fd_renumber",""],["old_wasi_common_fd_seek",""],["old_wasi_common_fd_sync",""],["old_wasi_common_fd_tell",""],["old_wasi_common_fd_write",""],["old_wasi_common_path_create_directory",""],["old_wasi_common_path_filestat_get",""],["old_wasi_common_path_filestat_set_times",""],["old_wasi_common_path_link",""],["old_wasi_common_path_open",""],["old_wasi_common_path_readlink",""],["old_wasi_common_path_remove_directory",""],["old_wasi_common_path_rename",""],["old_wasi_common_path_symlink",""],["old_wasi_common_path_unlink_file",""],["old_wasi_common_poll_oneoff",""],["old_wasi_common_proc_exit",""],["old_wasi_common_proc_raise",""],["old_wasi_common_random_get",""],["old_wasi_common_sched_yield",""],["old_wasi_common_sock_recv",""],["old_wasi_common_sock_send",""],["old_wasi_common_sock_shutdown",""],["path_create_directory",""],["path_filestat_get",""],["path_filestat_set_times",""],["path_link",""],["path_open",""],["path_readlink",""],["path_remove_directory",""],["path_rename",""],["path_symlink",""],["path_unlink_file",""],["poll_oneoff",""],["proc_exit",""],["proc_raise",""],["random_get",""],["sched_yield",""],["sock_recv",""],["sock_send",""],["sock_shutdown",""]]}); \ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/index.html b/api/wasi_common/old/snapshot_0/index.html new file mode 100644 index 000000000000..c7b8f1a454d0 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/index.html @@ -0,0 +1,11 @@ +wasi_common::old::snapshot_0 - Rust

[][src]Module wasi_common::old::snapshot_0

Modules

+
hostcalls
wasi

Types and constants shared between 32-bit and 64-bit wasi. Types involving +pointer or usize-sized data are excluded here, so this file only contains +fixed-size types, so it's host/target independent.

+
wasi32

Types and constants specific to 32-bit wasi. These are similar to the types +in the host module, but pointers and usize values are replaced with +u32-sized types.

+

Structs

+
WasiCtx
WasiCtxBuilder

A builder allowing customizable construction of WasiCtx instances.

+

Type Definitions

+
Error
Result
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/sidebar-items.js b/api/wasi_common/old/snapshot_0/sidebar-items.js new file mode 100644 index 000000000000..0e15f78a32b0 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["hostcalls",""],["wasi","Types and constants shared between 32-bit and 64-bit wasi. Types involving pointer or `usize`-sized data are excluded here, so this file only contains fixed-size types, so it's host/target independent."],["wasi32","Types and constants specific to 32-bit wasi. These are similar to the types in the `host` module, but pointers and `usize` values are replaced with `u32`-sized types."]],"struct":[["WasiCtx",""],["WasiCtxBuilder","A builder allowing customizable construction of `WasiCtx` instances."]],"type":[["Error",""],["Result",""]]}); \ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/struct.WasiCtx.html b/api/wasi_common/old/snapshot_0/struct.WasiCtx.html new file mode 100644 index 000000000000..0fd0de27e1c3 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/struct.WasiCtx.html @@ -0,0 +1,21 @@ +wasi_common::old::snapshot_0::WasiCtx - Rust

[][src]Struct wasi_common::old::snapshot_0::WasiCtx

pub struct WasiCtx { /* fields omitted */ }

Methods

impl WasiCtx[src]

pub fn new<S: AsRef<[u8]>>(args: impl IntoIterator<Item = S>) -> Result<Self>[src]

Make a new WasiCtx with some default settings.

+
    +
  • +

    File descriptors 0, 1, and 2 inherit stdin, stdout, and stderr from the host process.

    +
  • +
  • +

    Environment variables are inherited from the host process.

    +
  • +
+

To override these behaviors, use WasiCtxBuilder.

+

Trait Implementations

impl Debug for WasiCtx[src]

Auto Trait Implementations

impl RefUnwindSafe for WasiCtx

impl Send for WasiCtx

impl Sync for WasiCtx

impl Unpin for WasiCtx

impl UnwindSafe for WasiCtx

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/struct.WasiCtxBuilder.html b/api/wasi_common/old/snapshot_0/struct.WasiCtxBuilder.html new file mode 100644 index 000000000000..9c2e80af14c8 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/struct.WasiCtxBuilder.html @@ -0,0 +1,39 @@ +wasi_common::old::snapshot_0::WasiCtxBuilder - Rust

[][src]Struct wasi_common::old::snapshot_0::WasiCtxBuilder

pub struct WasiCtxBuilder { /* fields omitted */ }

A builder allowing customizable construction of WasiCtx instances.

+

Methods

impl WasiCtxBuilder[src]

pub fn new() -> Self[src]

Builder for a new WasiCtx.

+

pub fn args<S: AsRef<[u8]>>(self, args: impl IntoIterator<Item = S>) -> Self[src]

Add arguments to the command-line arguments list.

+

Arguments must be valid UTF-8 with no NUL bytes, or else WasiCtxBuilder::build() will fail +with Error::EILSEQ.

+

pub fn arg<S: AsRef<[u8]>>(self, arg: S) -> Self[src]

Add an argument to the command-line arguments list.

+

Arguments must be valid UTF-8 with no NUL bytes, or else WasiCtxBuilder::build() will fail +with Error::EILSEQ.

+

pub fn inherit_args(self) -> Self[src]

Inherit the command-line arguments from the host process.

+

If any arguments from the host process contain invalid UTF-8, WasiCtxBuilder::build() will +fail with Error::EILSEQ.

+

pub fn inherit_stdio(self) -> Self[src]

Inherit the stdin, stdout, and stderr streams from the host process.

+

pub fn inherit_env(self) -> Self[src]

Inherit the environment variables from the host process.

+

If any environment variables from the host process contain invalid Unicode (UTF-16 for +Windows, UTF-8 for other platforms), WasiCtxBuilder::build() will fail with +Error::EILSEQ.

+

pub fn env<S: AsRef<[u8]>>(self, k: S, v: S) -> Self[src]

Add an entry to the environment.

+

Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else +WasiCtxBuilder::build() will fail with Error::EILSEQ.

+

pub fn envs<S: AsRef<[u8]>, T: Borrow<(S, S)>>(
    self,
    envs: impl IntoIterator<Item = T>
) -> Self
[src]

Add entries to the environment.

+

Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else +WasiCtxBuilder::build() will fail with Error::EILSEQ.

+

pub fn stdin(self, file: File) -> Self[src]

Provide a File to use as stdin

+

pub fn stdout(self, file: File) -> Self[src]

Provide a File to use as stdout

+

pub fn stderr(self, file: File) -> Self[src]

Provide a File to use as stderr

+

pub fn preopened_dir<P: AsRef<Path>>(self, dir: File, guest_path: P) -> Self[src]

Add a preopened directory.

+

pub fn build(self) -> Result<WasiCtx>[src]

Build a WasiCtx, consuming this WasiCtxBuilder.

+

If any of the arguments or environment variables in this builder cannot be converted into +CStrings, either due to NUL bytes or Unicode conversions, this returns Error::EILSEQ.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/type.Error.html b/api/wasi_common/old/snapshot_0/type.Error.html new file mode 100644 index 000000000000..d9984469f52a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/type.Error.html @@ -0,0 +1,2 @@ +wasi_common::old::snapshot_0::Error - Rust

[][src]Type Definition wasi_common::old::snapshot_0::Error

type Error = Error;

Trait Implementations

impl From<Errno> for Error[src]

\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/type.Result.html b/api/wasi_common/old/snapshot_0/type.Result.html new file mode 100644 index 000000000000..f3d91a344fe2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/type.Result.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::Result - Rust

[][src]Type Definition wasi_common::old::snapshot_0::Result

type Result<T> = Result<T, Error>;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_DONTNEED.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_DONTNEED.html new file mode 100644 index 000000000000..140c37c1f623 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_DONTNEED.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_DONTNEED - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_DONTNEED

pub const __WASI_ADVICE_DONTNEED: __wasi_advice_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_NOREUSE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_NOREUSE.html new file mode 100644 index 000000000000..81d3713fb3e3 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_NOREUSE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_NOREUSE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_NOREUSE

pub const __WASI_ADVICE_NOREUSE: __wasi_advice_t = 5;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_NORMAL.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_NORMAL.html new file mode 100644 index 000000000000..c944049ba675 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_NORMAL.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_NORMAL - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_NORMAL

pub const __WASI_ADVICE_NORMAL: __wasi_advice_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_RANDOM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_RANDOM.html new file mode 100644 index 000000000000..fb17fff9fba1 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_RANDOM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_RANDOM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_RANDOM

pub const __WASI_ADVICE_RANDOM: __wasi_advice_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_SEQUENTIAL.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_SEQUENTIAL.html new file mode 100644 index 000000000000..e7450f10b1ad --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_SEQUENTIAL.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_SEQUENTIAL - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_SEQUENTIAL

pub const __WASI_ADVICE_SEQUENTIAL: __wasi_advice_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_WILLNEED.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_WILLNEED.html new file mode 100644 index 000000000000..6e79e470817f --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ADVICE_WILLNEED.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_WILLNEED - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ADVICE_WILLNEED

pub const __WASI_ADVICE_WILLNEED: __wasi_advice_t = 3;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_MONOTONIC.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_MONOTONIC.html new file mode 100644 index 000000000000..76bb4f002f7d --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_MONOTONIC.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_CLOCKID_MONOTONIC - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_CLOCKID_MONOTONIC

pub const __WASI_CLOCKID_MONOTONIC: __wasi_clockid_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_PROCESS_CPUTIME_ID.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_PROCESS_CPUTIME_ID.html new file mode 100644 index 000000000000..7cf013f2244c --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_PROCESS_CPUTIME_ID.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_CLOCKID_PROCESS_CPUTIME_ID - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_CLOCKID_PROCESS_CPUTIME_ID

pub const __WASI_CLOCKID_PROCESS_CPUTIME_ID: __wasi_clockid_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_REALTIME.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_REALTIME.html new file mode 100644 index 000000000000..7e4af3a8af14 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_REALTIME.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_CLOCKID_REALTIME - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_CLOCKID_REALTIME

pub const __WASI_CLOCKID_REALTIME: __wasi_clockid_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_THREAD_CPUTIME_ID.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_THREAD_CPUTIME_ID.html new file mode 100644 index 000000000000..1bb8fb3954fa --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_CLOCKID_THREAD_CPUTIME_ID.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_CLOCKID_THREAD_CPUTIME_ID - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_CLOCKID_THREAD_CPUTIME_ID

pub const __WASI_CLOCKID_THREAD_CPUTIME_ID: __wasi_clockid_t = 3;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_DIRCOOKIE_START.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_DIRCOOKIE_START.html new file mode 100644 index 000000000000..037ab0fecb80 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_DIRCOOKIE_START.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_DIRCOOKIE_START - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_DIRCOOKIE_START

pub const __WASI_DIRCOOKIE_START: __wasi_dircookie_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_2BIG.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_2BIG.html new file mode 100644 index 000000000000..ada0ca429796 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_2BIG.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_2BIG - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_2BIG

pub const __WASI_ERRNO_2BIG: __wasi_errno_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ACCES.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ACCES.html new file mode 100644 index 000000000000..b097ade99768 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ACCES.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ACCES - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ACCES

pub const __WASI_ERRNO_ACCES: __wasi_errno_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ADDRINUSE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ADDRINUSE.html new file mode 100644 index 000000000000..cb74d7c063e9 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ADDRINUSE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ADDRINUSE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ADDRINUSE

pub const __WASI_ERRNO_ADDRINUSE: __wasi_errno_t = 3;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ADDRNOTAVAIL.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ADDRNOTAVAIL.html new file mode 100644 index 000000000000..e9baecd70e95 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ADDRNOTAVAIL.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ADDRNOTAVAIL - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ADDRNOTAVAIL

pub const __WASI_ERRNO_ADDRNOTAVAIL: __wasi_errno_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_AFNOSUPPORT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_AFNOSUPPORT.html new file mode 100644 index 000000000000..ba0ebb527c1b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_AFNOSUPPORT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_AFNOSUPPORT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_AFNOSUPPORT

pub const __WASI_ERRNO_AFNOSUPPORT: __wasi_errno_t = 5;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_AGAIN.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_AGAIN.html new file mode 100644 index 000000000000..a4b436e9d6fd --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_AGAIN.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_AGAIN - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_AGAIN

pub const __WASI_ERRNO_AGAIN: __wasi_errno_t = 6;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ALREADY.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ALREADY.html new file mode 100644 index 000000000000..8efe97649b86 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ALREADY.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ALREADY - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ALREADY

pub const __WASI_ERRNO_ALREADY: __wasi_errno_t = 7;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_BADF.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_BADF.html new file mode 100644 index 000000000000..6b95e4684c3f --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_BADF.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_BADF - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_BADF

pub const __WASI_ERRNO_BADF: __wasi_errno_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_BADMSG.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_BADMSG.html new file mode 100644 index 000000000000..1af8603d75a5 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_BADMSG.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_BADMSG - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_BADMSG

pub const __WASI_ERRNO_BADMSG: __wasi_errno_t = 9;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_BUSY.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_BUSY.html new file mode 100644 index 000000000000..6db9c7af5a98 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_BUSY.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_BUSY - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_BUSY

pub const __WASI_ERRNO_BUSY: __wasi_errno_t = 10;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CANCELED.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CANCELED.html new file mode 100644 index 000000000000..3b1b1a566253 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CANCELED.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_CANCELED - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_CANCELED

pub const __WASI_ERRNO_CANCELED: __wasi_errno_t = 11;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CHILD.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CHILD.html new file mode 100644 index 000000000000..2d7b83434f05 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CHILD.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_CHILD - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_CHILD

pub const __WASI_ERRNO_CHILD: __wasi_errno_t = 12;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CONNABORTED.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CONNABORTED.html new file mode 100644 index 000000000000..27f470d4e325 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CONNABORTED.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_CONNABORTED - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_CONNABORTED

pub const __WASI_ERRNO_CONNABORTED: __wasi_errno_t = 13;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CONNREFUSED.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CONNREFUSED.html new file mode 100644 index 000000000000..77f8694219ce --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CONNREFUSED.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_CONNREFUSED - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_CONNREFUSED

pub const __WASI_ERRNO_CONNREFUSED: __wasi_errno_t = 14;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CONNRESET.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CONNRESET.html new file mode 100644 index 000000000000..e0c3909d9e7a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_CONNRESET.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_CONNRESET - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_CONNRESET

pub const __WASI_ERRNO_CONNRESET: __wasi_errno_t = 15;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DEADLK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DEADLK.html new file mode 100644 index 000000000000..d27b3091ec29 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DEADLK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_DEADLK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_DEADLK

pub const __WASI_ERRNO_DEADLK: __wasi_errno_t = 16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DESTADDRREQ.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DESTADDRREQ.html new file mode 100644 index 000000000000..d43eef24784a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DESTADDRREQ.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_DESTADDRREQ - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_DESTADDRREQ

pub const __WASI_ERRNO_DESTADDRREQ: __wasi_errno_t = 17;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DOM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DOM.html new file mode 100644 index 000000000000..3bd69488be45 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DOM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_DOM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_DOM

pub const __WASI_ERRNO_DOM: __wasi_errno_t = 18;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DQUOT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DQUOT.html new file mode 100644 index 000000000000..f7621ffa16b5 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_DQUOT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_DQUOT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_DQUOT

pub const __WASI_ERRNO_DQUOT: __wasi_errno_t = 19;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_EXIST.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_EXIST.html new file mode 100644 index 000000000000..e0a1c7f6be66 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_EXIST.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_EXIST - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_EXIST

pub const __WASI_ERRNO_EXIST: __wasi_errno_t = 20;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_FAULT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_FAULT.html new file mode 100644 index 000000000000..d62360136979 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_FAULT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_FAULT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_FAULT

pub const __WASI_ERRNO_FAULT: __wasi_errno_t = 21;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_FBIG.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_FBIG.html new file mode 100644 index 000000000000..4026de9f7765 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_FBIG.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_FBIG - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_FBIG

pub const __WASI_ERRNO_FBIG: __wasi_errno_t = 22;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_HOSTUNREACH.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_HOSTUNREACH.html new file mode 100644 index 000000000000..36f33cf1ebc0 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_HOSTUNREACH.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_HOSTUNREACH - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_HOSTUNREACH

pub const __WASI_ERRNO_HOSTUNREACH: __wasi_errno_t = 23;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_IDRM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_IDRM.html new file mode 100644 index 000000000000..6b81f7bada96 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_IDRM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_IDRM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_IDRM

pub const __WASI_ERRNO_IDRM: __wasi_errno_t = 24;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ILSEQ.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ILSEQ.html new file mode 100644 index 000000000000..1444ca47f435 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ILSEQ.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ILSEQ - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ILSEQ

pub const __WASI_ERRNO_ILSEQ: __wasi_errno_t = 25;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_INPROGRESS.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_INPROGRESS.html new file mode 100644 index 000000000000..87990eb41f8d --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_INPROGRESS.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_INPROGRESS - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_INPROGRESS

pub const __WASI_ERRNO_INPROGRESS: __wasi_errno_t = 26;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_INTR.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_INTR.html new file mode 100644 index 000000000000..081afdacbe73 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_INTR.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_INTR - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_INTR

pub const __WASI_ERRNO_INTR: __wasi_errno_t = 27;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_INVAL.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_INVAL.html new file mode 100644 index 000000000000..1436591665b2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_INVAL.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_INVAL - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_INVAL

pub const __WASI_ERRNO_INVAL: __wasi_errno_t = 28;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_IO.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_IO.html new file mode 100644 index 000000000000..4b640ac8089f --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_IO.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_IO - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_IO

pub const __WASI_ERRNO_IO: __wasi_errno_t = 29;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ISCONN.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ISCONN.html new file mode 100644 index 000000000000..6e14d50e3e57 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ISCONN.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ISCONN - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ISCONN

pub const __WASI_ERRNO_ISCONN: __wasi_errno_t = 30;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ISDIR.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ISDIR.html new file mode 100644 index 000000000000..67f8959e8cae --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ISDIR.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ISDIR - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ISDIR

pub const __WASI_ERRNO_ISDIR: __wasi_errno_t = 31;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_LOOP.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_LOOP.html new file mode 100644 index 000000000000..92a0500f7af2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_LOOP.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_LOOP - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_LOOP

pub const __WASI_ERRNO_LOOP: __wasi_errno_t = 32;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MFILE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MFILE.html new file mode 100644 index 000000000000..02e3556054f1 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MFILE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_MFILE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_MFILE

pub const __WASI_ERRNO_MFILE: __wasi_errno_t = 33;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MLINK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MLINK.html new file mode 100644 index 000000000000..016335811938 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MLINK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_MLINK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_MLINK

pub const __WASI_ERRNO_MLINK: __wasi_errno_t = 34;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MSGSIZE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MSGSIZE.html new file mode 100644 index 000000000000..7a279f13e095 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MSGSIZE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_MSGSIZE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_MSGSIZE

pub const __WASI_ERRNO_MSGSIZE: __wasi_errno_t = 35;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MULTIHOP.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MULTIHOP.html new file mode 100644 index 000000000000..5232c6eeb530 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_MULTIHOP.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_MULTIHOP - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_MULTIHOP

pub const __WASI_ERRNO_MULTIHOP: __wasi_errno_t = 36;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NAMETOOLONG.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NAMETOOLONG.html new file mode 100644 index 000000000000..bf89e5348ebf --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NAMETOOLONG.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NAMETOOLONG - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NAMETOOLONG

pub const __WASI_ERRNO_NAMETOOLONG: __wasi_errno_t = 37;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NETDOWN.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NETDOWN.html new file mode 100644 index 000000000000..78c908aafd05 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NETDOWN.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NETDOWN - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NETDOWN

pub const __WASI_ERRNO_NETDOWN: __wasi_errno_t = 38;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NETRESET.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NETRESET.html new file mode 100644 index 000000000000..311dfffed84e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NETRESET.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NETRESET - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NETRESET

pub const __WASI_ERRNO_NETRESET: __wasi_errno_t = 39;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NETUNREACH.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NETUNREACH.html new file mode 100644 index 000000000000..086da3990bb3 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NETUNREACH.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NETUNREACH - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NETUNREACH

pub const __WASI_ERRNO_NETUNREACH: __wasi_errno_t = 40;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NFILE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NFILE.html new file mode 100644 index 000000000000..5261c91b84c5 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NFILE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NFILE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NFILE

pub const __WASI_ERRNO_NFILE: __wasi_errno_t = 41;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOBUFS.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOBUFS.html new file mode 100644 index 000000000000..0bbdcb0f0082 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOBUFS.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOBUFS - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOBUFS

pub const __WASI_ERRNO_NOBUFS: __wasi_errno_t = 42;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NODEV.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NODEV.html new file mode 100644 index 000000000000..1da88b171a7d --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NODEV.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NODEV - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NODEV

pub const __WASI_ERRNO_NODEV: __wasi_errno_t = 43;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOENT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOENT.html new file mode 100644 index 000000000000..ee35c8d72063 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOENT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOENT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOENT

pub const __WASI_ERRNO_NOENT: __wasi_errno_t = 44;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOEXEC.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOEXEC.html new file mode 100644 index 000000000000..9499a33c4124 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOEXEC.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOEXEC - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOEXEC

pub const __WASI_ERRNO_NOEXEC: __wasi_errno_t = 45;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOLCK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOLCK.html new file mode 100644 index 000000000000..bb93d1c1ea55 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOLCK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOLCK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOLCK

pub const __WASI_ERRNO_NOLCK: __wasi_errno_t = 46;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOLINK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOLINK.html new file mode 100644 index 000000000000..c3aa4369b0c7 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOLINK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOLINK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOLINK

pub const __WASI_ERRNO_NOLINK: __wasi_errno_t = 47;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOMEM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOMEM.html new file mode 100644 index 000000000000..6f8c4bcd86c3 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOMEM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOMEM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOMEM

pub const __WASI_ERRNO_NOMEM: __wasi_errno_t = 48;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOMSG.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOMSG.html new file mode 100644 index 000000000000..e4b7f063e1df --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOMSG.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOMSG - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOMSG

pub const __WASI_ERRNO_NOMSG: __wasi_errno_t = 49;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOPROTOOPT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOPROTOOPT.html new file mode 100644 index 000000000000..d528cc4d6eac --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOPROTOOPT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOPROTOOPT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOPROTOOPT

pub const __WASI_ERRNO_NOPROTOOPT: __wasi_errno_t = 50;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOSPC.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOSPC.html new file mode 100644 index 000000000000..f129dfb8c094 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOSPC.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOSPC - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOSPC

pub const __WASI_ERRNO_NOSPC: __wasi_errno_t = 51;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOSYS.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOSYS.html new file mode 100644 index 000000000000..246b8fa4666c --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOSYS.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOSYS - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOSYS

pub const __WASI_ERRNO_NOSYS: __wasi_errno_t = 52;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTCAPABLE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTCAPABLE.html new file mode 100644 index 000000000000..33264ee8ea7a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTCAPABLE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTCAPABLE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTCAPABLE

pub const __WASI_ERRNO_NOTCAPABLE: __wasi_errno_t = 76;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTCONN.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTCONN.html new file mode 100644 index 000000000000..f8f456ab5915 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTCONN.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTCONN - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTCONN

pub const __WASI_ERRNO_NOTCONN: __wasi_errno_t = 53;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTDIR.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTDIR.html new file mode 100644 index 000000000000..dfbb11fa1b1e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTDIR.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTDIR - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTDIR

pub const __WASI_ERRNO_NOTDIR: __wasi_errno_t = 54;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTEMPTY.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTEMPTY.html new file mode 100644 index 000000000000..83db63cd7e2a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTEMPTY.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTEMPTY - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTEMPTY

pub const __WASI_ERRNO_NOTEMPTY: __wasi_errno_t = 55;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTRECOVERABLE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTRECOVERABLE.html new file mode 100644 index 000000000000..cfbf0046246d --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTRECOVERABLE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTRECOVERABLE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTRECOVERABLE

pub const __WASI_ERRNO_NOTRECOVERABLE: __wasi_errno_t = 56;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTSOCK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTSOCK.html new file mode 100644 index 000000000000..8205c43b186e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTSOCK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTSOCK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTSOCK

pub const __WASI_ERRNO_NOTSOCK: __wasi_errno_t = 57;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTSUP.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTSUP.html new file mode 100644 index 000000000000..a293e33886dc --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTSUP.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTSUP - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTSUP

pub const __WASI_ERRNO_NOTSUP: __wasi_errno_t = 58;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTTY.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTTY.html new file mode 100644 index 000000000000..61a03445c7a3 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NOTTY.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTTY - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NOTTY

pub const __WASI_ERRNO_NOTTY: __wasi_errno_t = 59;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NXIO.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NXIO.html new file mode 100644 index 000000000000..c4fb0e4060be --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_NXIO.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NXIO - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_NXIO

pub const __WASI_ERRNO_NXIO: __wasi_errno_t = 60;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_OVERFLOW.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_OVERFLOW.html new file mode 100644 index 000000000000..0077d99f86ff --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_OVERFLOW.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_OVERFLOW - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_OVERFLOW

pub const __WASI_ERRNO_OVERFLOW: __wasi_errno_t = 61;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_OWNERDEAD.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_OWNERDEAD.html new file mode 100644 index 000000000000..69880e6986cc --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_OWNERDEAD.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_OWNERDEAD - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_OWNERDEAD

pub const __WASI_ERRNO_OWNERDEAD: __wasi_errno_t = 62;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PERM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PERM.html new file mode 100644 index 000000000000..1dc635992740 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PERM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_PERM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_PERM

pub const __WASI_ERRNO_PERM: __wasi_errno_t = 63;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PIPE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PIPE.html new file mode 100644 index 000000000000..d261a1ab1294 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PIPE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_PIPE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_PIPE

pub const __WASI_ERRNO_PIPE: __wasi_errno_t = 64;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PROTO.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PROTO.html new file mode 100644 index 000000000000..53cfd8d108e2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PROTO.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_PROTO - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_PROTO

pub const __WASI_ERRNO_PROTO: __wasi_errno_t = 65;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PROTONOSUPPORT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PROTONOSUPPORT.html new file mode 100644 index 000000000000..8a7f4d45654e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PROTONOSUPPORT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_PROTONOSUPPORT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_PROTONOSUPPORT

pub const __WASI_ERRNO_PROTONOSUPPORT: __wasi_errno_t = 66;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PROTOTYPE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PROTOTYPE.html new file mode 100644 index 000000000000..bc56b026b10e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_PROTOTYPE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_PROTOTYPE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_PROTOTYPE

pub const __WASI_ERRNO_PROTOTYPE: __wasi_errno_t = 67;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_RANGE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_RANGE.html new file mode 100644 index 000000000000..fa3820209a11 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_RANGE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_RANGE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_RANGE

pub const __WASI_ERRNO_RANGE: __wasi_errno_t = 68;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ROFS.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ROFS.html new file mode 100644 index 000000000000..6a1b04164054 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_ROFS.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ROFS - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_ROFS

pub const __WASI_ERRNO_ROFS: __wasi_errno_t = 69;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_SPIPE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_SPIPE.html new file mode 100644 index 000000000000..dcd29157c53a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_SPIPE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_SPIPE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_SPIPE

pub const __WASI_ERRNO_SPIPE: __wasi_errno_t = 70;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_SRCH.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_SRCH.html new file mode 100644 index 000000000000..e35beeec4913 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_SRCH.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_SRCH - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_SRCH

pub const __WASI_ERRNO_SRCH: __wasi_errno_t = 71;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_STALE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_STALE.html new file mode 100644 index 000000000000..c47890b04a7b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_STALE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_STALE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_STALE

pub const __WASI_ERRNO_STALE: __wasi_errno_t = 72;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_SUCCESS.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_SUCCESS.html new file mode 100644 index 000000000000..418089106ed4 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_SUCCESS.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_SUCCESS - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_SUCCESS

pub const __WASI_ERRNO_SUCCESS: __wasi_errno_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_TIMEDOUT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_TIMEDOUT.html new file mode 100644 index 000000000000..dce0611e1e5c --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_TIMEDOUT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_TIMEDOUT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_TIMEDOUT

pub const __WASI_ERRNO_TIMEDOUT: __wasi_errno_t = 73;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_TXTBSY.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_TXTBSY.html new file mode 100644 index 000000000000..a5a1e89e62ec --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_TXTBSY.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_TXTBSY - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_TXTBSY

pub const __WASI_ERRNO_TXTBSY: __wasi_errno_t = 74;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_XDEV.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_XDEV.html new file mode 100644 index 000000000000..40ab5dca0f5b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ERRNO_XDEV.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_XDEV - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ERRNO_XDEV

pub const __WASI_ERRNO_XDEV: __wasi_errno_t = 75;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP.html new file mode 100644 index 000000000000..eda8f4efb1bc --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP

pub const __WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP: __wasi_eventrwflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTTYPE_CLOCK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTTYPE_CLOCK.html new file mode 100644 index 000000000000..6c5f2896ed8f --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTTYPE_CLOCK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_EVENTTYPE_CLOCK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_EVENTTYPE_CLOCK

pub const __WASI_EVENTTYPE_CLOCK: __wasi_eventtype_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTTYPE_FD_READ.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTTYPE_FD_READ.html new file mode 100644 index 000000000000..499f7a27a2e6 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTTYPE_FD_READ.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_EVENTTYPE_FD_READ - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_EVENTTYPE_FD_READ

pub const __WASI_EVENTTYPE_FD_READ: __wasi_eventtype_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTTYPE_FD_WRITE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTTYPE_FD_WRITE.html new file mode 100644 index 000000000000..8cbe1332da87 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_EVENTTYPE_FD_WRITE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_EVENTTYPE_FD_WRITE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_EVENTTYPE_FD_WRITE

pub const __WASI_EVENTTYPE_FD_WRITE: __wasi_eventtype_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_APPEND.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_APPEND.html new file mode 100644 index 000000000000..22734aaca218 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_APPEND.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FDFLAGS_APPEND - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FDFLAGS_APPEND

pub const __WASI_FDFLAGS_APPEND: __wasi_fdflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_DSYNC.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_DSYNC.html new file mode 100644 index 000000000000..1eeccc83855b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_DSYNC.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FDFLAGS_DSYNC - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FDFLAGS_DSYNC

pub const __WASI_FDFLAGS_DSYNC: __wasi_fdflags_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_NONBLOCK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_NONBLOCK.html new file mode 100644 index 000000000000..bf653a498063 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_NONBLOCK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FDFLAGS_NONBLOCK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FDFLAGS_NONBLOCK

pub const __WASI_FDFLAGS_NONBLOCK: __wasi_fdflags_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_RSYNC.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_RSYNC.html new file mode 100644 index 000000000000..3052ea59afad --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_RSYNC.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FDFLAGS_RSYNC - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FDFLAGS_RSYNC

pub const __WASI_FDFLAGS_RSYNC: __wasi_fdflags_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_SYNC.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_SYNC.html new file mode 100644 index 000000000000..8a7b95007c61 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FDFLAGS_SYNC.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FDFLAGS_SYNC - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FDFLAGS_SYNC

pub const __WASI_FDFLAGS_SYNC: __wasi_fdflags_t = 16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_BLOCK_DEVICE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_BLOCK_DEVICE.html new file mode 100644 index 000000000000..8e993b847526 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_BLOCK_DEVICE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_BLOCK_DEVICE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_BLOCK_DEVICE

pub const __WASI_FILETYPE_BLOCK_DEVICE: __wasi_filetype_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_CHARACTER_DEVICE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_CHARACTER_DEVICE.html new file mode 100644 index 000000000000..f0cdef63d648 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_CHARACTER_DEVICE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_CHARACTER_DEVICE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_CHARACTER_DEVICE

pub const __WASI_FILETYPE_CHARACTER_DEVICE: __wasi_filetype_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_DIRECTORY.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_DIRECTORY.html new file mode 100644 index 000000000000..27be2e72a433 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_DIRECTORY.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_DIRECTORY - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_DIRECTORY

pub const __WASI_FILETYPE_DIRECTORY: __wasi_filetype_t = 3;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_REGULAR_FILE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_REGULAR_FILE.html new file mode 100644 index 000000000000..82da3f2ef54b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_REGULAR_FILE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_REGULAR_FILE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_REGULAR_FILE

pub const __WASI_FILETYPE_REGULAR_FILE: __wasi_filetype_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_SOCKET_DGRAM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_SOCKET_DGRAM.html new file mode 100644 index 000000000000..dd77824c6d72 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_SOCKET_DGRAM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_SOCKET_DGRAM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_SOCKET_DGRAM

pub const __WASI_FILETYPE_SOCKET_DGRAM: __wasi_filetype_t = 5;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_SOCKET_STREAM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_SOCKET_STREAM.html new file mode 100644 index 000000000000..6bc7ac56c73b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_SOCKET_STREAM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_SOCKET_STREAM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_SOCKET_STREAM

pub const __WASI_FILETYPE_SOCKET_STREAM: __wasi_filetype_t = 6;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_SYMBOLIC_LINK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_SYMBOLIC_LINK.html new file mode 100644 index 000000000000..dcbeb5093c51 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_SYMBOLIC_LINK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_SYMBOLIC_LINK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_SYMBOLIC_LINK

pub const __WASI_FILETYPE_SYMBOLIC_LINK: __wasi_filetype_t = 7;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_UNKNOWN.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_UNKNOWN.html new file mode 100644 index 000000000000..fd30f89ffe6b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FILETYPE_UNKNOWN.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_UNKNOWN - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FILETYPE_UNKNOWN

pub const __WASI_FILETYPE_UNKNOWN: __wasi_filetype_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_ATIM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_ATIM.html new file mode 100644 index 000000000000..6a29641d3020 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_ATIM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FSTFLAGS_ATIM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FSTFLAGS_ATIM

pub const __WASI_FSTFLAGS_ATIM: __wasi_fstflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_ATIM_NOW.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_ATIM_NOW.html new file mode 100644 index 000000000000..8dd5109b79f7 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_ATIM_NOW.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FSTFLAGS_ATIM_NOW - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FSTFLAGS_ATIM_NOW

pub const __WASI_FSTFLAGS_ATIM_NOW: __wasi_fstflags_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_MTIM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_MTIM.html new file mode 100644 index 000000000000..a3b96c20f03a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_MTIM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FSTFLAGS_MTIM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FSTFLAGS_MTIM

pub const __WASI_FSTFLAGS_MTIM: __wasi_fstflags_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_MTIM_NOW.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_MTIM_NOW.html new file mode 100644 index 000000000000..4a8008cab18f --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_FSTFLAGS_MTIM_NOW.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_FSTFLAGS_MTIM_NOW - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_FSTFLAGS_MTIM_NOW

pub const __WASI_FSTFLAGS_MTIM_NOW: __wasi_fstflags_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW.html new file mode 100644 index 000000000000..740792c48f29 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW

pub const __WASI_LOOKUPFLAGS_SYMLINK_FOLLOW: __wasi_lookupflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_CREAT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_CREAT.html new file mode 100644 index 000000000000..1822980ee76c --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_CREAT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_OFLAGS_CREAT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_OFLAGS_CREAT

pub const __WASI_OFLAGS_CREAT: __wasi_oflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_DIRECTORY.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_DIRECTORY.html new file mode 100644 index 000000000000..55247e12ea37 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_DIRECTORY.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_OFLAGS_DIRECTORY - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_OFLAGS_DIRECTORY

pub const __WASI_OFLAGS_DIRECTORY: __wasi_oflags_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_EXCL.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_EXCL.html new file mode 100644 index 000000000000..3758c0949e71 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_EXCL.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_OFLAGS_EXCL - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_OFLAGS_EXCL

pub const __WASI_OFLAGS_EXCL: __wasi_oflags_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_TRUNC.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_TRUNC.html new file mode 100644 index 000000000000..75a0cc30d052 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_OFLAGS_TRUNC.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_OFLAGS_TRUNC - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_OFLAGS_TRUNC

pub const __WASI_OFLAGS_TRUNC: __wasi_oflags_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_PREOPENTYPE_DIR.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_PREOPENTYPE_DIR.html new file mode 100644 index 000000000000..c68627357e92 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_PREOPENTYPE_DIR.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_PREOPENTYPE_DIR - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_PREOPENTYPE_DIR

pub const __WASI_PREOPENTYPE_DIR: __wasi_preopentype_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIFLAGS_RECV_PEEK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIFLAGS_RECV_PEEK.html new file mode 100644 index 000000000000..9bd7d07a9620 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIFLAGS_RECV_PEEK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIFLAGS_RECV_PEEK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIFLAGS_RECV_PEEK

pub const __WASI_RIFLAGS_RECV_PEEK: __wasi_riflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIFLAGS_RECV_WAITALL.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIFLAGS_RECV_WAITALL.html new file mode 100644 index 000000000000..1f13a2aec4fb --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIFLAGS_RECV_WAITALL.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIFLAGS_RECV_WAITALL - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIFLAGS_RECV_WAITALL

pub const __WASI_RIFLAGS_RECV_WAITALL: __wasi_riflags_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_ADVISE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_ADVISE.html new file mode 100644 index 000000000000..6136ea62128f --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_ADVISE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_ADVISE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_ADVISE

pub const __WASI_RIGHTS_FD_ADVISE: __wasi_rights_t = 128;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_ALLOCATE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_ALLOCATE.html new file mode 100644 index 000000000000..ce3b8f4de908 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_ALLOCATE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_ALLOCATE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_ALLOCATE

pub const __WASI_RIGHTS_FD_ALLOCATE: __wasi_rights_t = 256;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_DATASYNC.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_DATASYNC.html new file mode 100644 index 000000000000..6b221b42a46a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_DATASYNC.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_DATASYNC - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_DATASYNC

pub const __WASI_RIGHTS_FD_DATASYNC: __wasi_rights_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS.html new file mode 100644 index 000000000000..2798454d4c93 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS

pub const __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS: __wasi_rights_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_GET.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_GET.html new file mode 100644 index 000000000000..01724c6c3a25 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_GET.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_FILESTAT_GET - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_FILESTAT_GET

pub const __WASI_RIGHTS_FD_FILESTAT_GET: __wasi_rights_t = 2097152;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_SIZE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_SIZE.html new file mode 100644 index 000000000000..9ff16f06b803 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_SIZE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_FILESTAT_SET_SIZE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_FILESTAT_SET_SIZE

pub const __WASI_RIGHTS_FD_FILESTAT_SET_SIZE: __wasi_rights_t = 4194304;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_TIMES.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_TIMES.html new file mode 100644 index 000000000000..29c24012cce5 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_TIMES.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_FILESTAT_SET_TIMES - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_FILESTAT_SET_TIMES

pub const __WASI_RIGHTS_FD_FILESTAT_SET_TIMES: __wasi_rights_t = 8388608;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_READ.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_READ.html new file mode 100644 index 000000000000..7044d5e2c71c --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_READ.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_READ - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_READ

pub const __WASI_RIGHTS_FD_READ: __wasi_rights_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_READDIR.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_READDIR.html new file mode 100644 index 000000000000..3fdb10f62d13 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_READDIR.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_READDIR - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_READDIR

pub const __WASI_RIGHTS_FD_READDIR: __wasi_rights_t = 16384;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_SEEK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_SEEK.html new file mode 100644 index 000000000000..1abc32086b06 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_SEEK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_SEEK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_SEEK

pub const __WASI_RIGHTS_FD_SEEK: __wasi_rights_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_SYNC.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_SYNC.html new file mode 100644 index 000000000000..58a38d322174 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_SYNC.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_SYNC - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_SYNC

pub const __WASI_RIGHTS_FD_SYNC: __wasi_rights_t = 16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_TELL.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_TELL.html new file mode 100644 index 000000000000..2a125ca3f8c7 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_TELL.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_TELL - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_TELL

pub const __WASI_RIGHTS_FD_TELL: __wasi_rights_t = 32;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_WRITE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_WRITE.html new file mode 100644 index 000000000000..56ee6af6d9cf --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_FD_WRITE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_WRITE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_FD_WRITE

pub const __WASI_RIGHTS_FD_WRITE: __wasi_rights_t = 64;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_CREATE_DIRECTORY.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_CREATE_DIRECTORY.html new file mode 100644 index 000000000000..a8515aee3162 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_CREATE_DIRECTORY.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_CREATE_DIRECTORY - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_CREATE_DIRECTORY

pub const __WASI_RIGHTS_PATH_CREATE_DIRECTORY: __wasi_rights_t = 512;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_CREATE_FILE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_CREATE_FILE.html new file mode 100644 index 000000000000..bbcb2368e7f2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_CREATE_FILE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_CREATE_FILE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_CREATE_FILE

pub const __WASI_RIGHTS_PATH_CREATE_FILE: __wasi_rights_t = 1024;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_GET.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_GET.html new file mode 100644 index 000000000000..023923664fdd --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_GET.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_FILESTAT_GET - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_FILESTAT_GET

pub const __WASI_RIGHTS_PATH_FILESTAT_GET: __wasi_rights_t = 262144;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE.html new file mode 100644 index 000000000000..d1359ae63f86 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE

pub const __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE: __wasi_rights_t = 524288;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES.html new file mode 100644 index 000000000000..a4f26560444e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES

pub const __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES: __wasi_rights_t = 1048576;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_LINK_SOURCE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_LINK_SOURCE.html new file mode 100644 index 000000000000..58b4c46f9fbf --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_LINK_SOURCE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_LINK_SOURCE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_LINK_SOURCE

pub const __WASI_RIGHTS_PATH_LINK_SOURCE: __wasi_rights_t = 2048;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_LINK_TARGET.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_LINK_TARGET.html new file mode 100644 index 000000000000..719b37d33f98 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_LINK_TARGET.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_LINK_TARGET - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_LINK_TARGET

pub const __WASI_RIGHTS_PATH_LINK_TARGET: __wasi_rights_t = 4096;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_OPEN.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_OPEN.html new file mode 100644 index 000000000000..c59cf302aea5 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_OPEN.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_OPEN - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_OPEN

pub const __WASI_RIGHTS_PATH_OPEN: __wasi_rights_t = 8192;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_READLINK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_READLINK.html new file mode 100644 index 000000000000..c146bf4ec5fb --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_READLINK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_READLINK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_READLINK

pub const __WASI_RIGHTS_PATH_READLINK: __wasi_rights_t = 32768;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_REMOVE_DIRECTORY.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_REMOVE_DIRECTORY.html new file mode 100644 index 000000000000..986b8076e5c2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_REMOVE_DIRECTORY.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_REMOVE_DIRECTORY - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_REMOVE_DIRECTORY

pub const __WASI_RIGHTS_PATH_REMOVE_DIRECTORY: __wasi_rights_t = 33554432;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_RENAME_SOURCE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_RENAME_SOURCE.html new file mode 100644 index 000000000000..234dfbcafbc0 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_RENAME_SOURCE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_RENAME_SOURCE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_RENAME_SOURCE

pub const __WASI_RIGHTS_PATH_RENAME_SOURCE: __wasi_rights_t = 65536;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_RENAME_TARGET.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_RENAME_TARGET.html new file mode 100644 index 000000000000..804bd33ea026 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_RENAME_TARGET.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_RENAME_TARGET - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_RENAME_TARGET

pub const __WASI_RIGHTS_PATH_RENAME_TARGET: __wasi_rights_t = 131072;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_SYMLINK.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_SYMLINK.html new file mode 100644 index 000000000000..0332efed4338 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_SYMLINK.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_SYMLINK - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_SYMLINK

pub const __WASI_RIGHTS_PATH_SYMLINK: __wasi_rights_t = 16777216;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_UNLINK_FILE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_UNLINK_FILE.html new file mode 100644 index 000000000000..fca6abdd4f79 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_PATH_UNLINK_FILE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_UNLINK_FILE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_PATH_UNLINK_FILE

pub const __WASI_RIGHTS_PATH_UNLINK_FILE: __wasi_rights_t = 67108864;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_POLL_FD_READWRITE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_POLL_FD_READWRITE.html new file mode 100644 index 000000000000..dcd71096d52d --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_POLL_FD_READWRITE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_POLL_FD_READWRITE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_POLL_FD_READWRITE

pub const __WASI_RIGHTS_POLL_FD_READWRITE: __wasi_rights_t = 134217728;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_SOCK_SHUTDOWN.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_SOCK_SHUTDOWN.html new file mode 100644 index 000000000000..5ba5924443bb --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_RIGHTS_SOCK_SHUTDOWN.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_SOCK_SHUTDOWN - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_RIGHTS_SOCK_SHUTDOWN

pub const __WASI_RIGHTS_SOCK_SHUTDOWN: __wasi_rights_t = 268435456;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ROFLAGS_RECV_DATA_TRUNCATED.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ROFLAGS_RECV_DATA_TRUNCATED.html new file mode 100644 index 000000000000..1bf74deced6e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_ROFLAGS_RECV_DATA_TRUNCATED.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_ROFLAGS_RECV_DATA_TRUNCATED - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_ROFLAGS_RECV_DATA_TRUNCATED

pub const __WASI_ROFLAGS_RECV_DATA_TRUNCATED: __wasi_roflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SDFLAGS_RD.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SDFLAGS_RD.html new file mode 100644 index 000000000000..9aba9620c8bf --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SDFLAGS_RD.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SDFLAGS_RD - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SDFLAGS_RD

pub const __WASI_SDFLAGS_RD: __wasi_sdflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SDFLAGS_WR.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SDFLAGS_WR.html new file mode 100644 index 000000000000..ba201d0ca624 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SDFLAGS_WR.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SDFLAGS_WR - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SDFLAGS_WR

pub const __WASI_SDFLAGS_WR: __wasi_sdflags_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_ABRT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_ABRT.html new file mode 100644 index 000000000000..53463e5969ba --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_ABRT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_ABRT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_ABRT

pub const __WASI_SIGNAL_ABRT: __wasi_signal_t = 6;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_ALRM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_ALRM.html new file mode 100644 index 000000000000..e2712cbed6c0 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_ALRM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_ALRM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_ALRM

pub const __WASI_SIGNAL_ALRM: __wasi_signal_t = 14;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_BUS.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_BUS.html new file mode 100644 index 000000000000..f9f9f3d00a16 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_BUS.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_BUS - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_BUS

pub const __WASI_SIGNAL_BUS: __wasi_signal_t = 7;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_CHLD.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_CHLD.html new file mode 100644 index 000000000000..13529e648e1d --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_CHLD.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_CHLD - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_CHLD

pub const __WASI_SIGNAL_CHLD: __wasi_signal_t = 16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_CONT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_CONT.html new file mode 100644 index 000000000000..90e66b7dbcd1 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_CONT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_CONT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_CONT

pub const __WASI_SIGNAL_CONT: __wasi_signal_t = 17;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_FPE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_FPE.html new file mode 100644 index 000000000000..1e9ce3524e77 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_FPE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_FPE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_FPE

pub const __WASI_SIGNAL_FPE: __wasi_signal_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_HUP.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_HUP.html new file mode 100644 index 000000000000..4b9de0d46bed --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_HUP.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_HUP - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_HUP

pub const __WASI_SIGNAL_HUP: __wasi_signal_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_ILL.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_ILL.html new file mode 100644 index 000000000000..cca143cdb562 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_ILL.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_ILL - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_ILL

pub const __WASI_SIGNAL_ILL: __wasi_signal_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_INT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_INT.html new file mode 100644 index 000000000000..8939470ee05e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_INT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_INT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_INT

pub const __WASI_SIGNAL_INT: __wasi_signal_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_KILL.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_KILL.html new file mode 100644 index 000000000000..46f73ff4bf8a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_KILL.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_KILL - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_KILL

pub const __WASI_SIGNAL_KILL: __wasi_signal_t = 9;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_NONE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_NONE.html new file mode 100644 index 000000000000..3c7d7bc9aa5a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_NONE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_NONE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_NONE

pub const __WASI_SIGNAL_NONE: __wasi_signal_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_PIPE.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_PIPE.html new file mode 100644 index 000000000000..a7a4992d400a --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_PIPE.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_PIPE - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_PIPE

pub const __WASI_SIGNAL_PIPE: __wasi_signal_t = 13;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_POLL.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_POLL.html new file mode 100644 index 000000000000..2ea152bdfd14 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_POLL.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_POLL - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_POLL

pub const __WASI_SIGNAL_POLL: __wasi_signal_t = 28;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_PROF.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_PROF.html new file mode 100644 index 000000000000..4969e5776ec2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_PROF.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_PROF - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_PROF

pub const __WASI_SIGNAL_PROF: __wasi_signal_t = 26;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_PWR.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_PWR.html new file mode 100644 index 000000000000..393b686ef535 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_PWR.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_PWR - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_PWR

pub const __WASI_SIGNAL_PWR: __wasi_signal_t = 29;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_QUIT.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_QUIT.html new file mode 100644 index 000000000000..2ad7c5c37cf1 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_QUIT.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_QUIT - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_QUIT

pub const __WASI_SIGNAL_QUIT: __wasi_signal_t = 3;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_SEGV.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_SEGV.html new file mode 100644 index 000000000000..830a5a9fa433 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_SEGV.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_SEGV - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_SEGV

pub const __WASI_SIGNAL_SEGV: __wasi_signal_t = 11;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_STOP.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_STOP.html new file mode 100644 index 000000000000..bf9e089fed13 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_STOP.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_STOP - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_STOP

pub const __WASI_SIGNAL_STOP: __wasi_signal_t = 18;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_SYS.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_SYS.html new file mode 100644 index 000000000000..23dc63b64673 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_SYS.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_SYS - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_SYS

pub const __WASI_SIGNAL_SYS: __wasi_signal_t = 30;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TERM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TERM.html new file mode 100644 index 000000000000..7ab2490ee851 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TERM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_TERM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_TERM

pub const __WASI_SIGNAL_TERM: __wasi_signal_t = 15;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TRAP.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TRAP.html new file mode 100644 index 000000000000..38d9d75ee469 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TRAP.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_TRAP - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_TRAP

pub const __WASI_SIGNAL_TRAP: __wasi_signal_t = 5;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TSTP.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TSTP.html new file mode 100644 index 000000000000..b6c43607fbae --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TSTP.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_TSTP - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_TSTP

pub const __WASI_SIGNAL_TSTP: __wasi_signal_t = 19;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TTIN.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TTIN.html new file mode 100644 index 000000000000..86d22d0a544b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TTIN.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_TTIN - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_TTIN

pub const __WASI_SIGNAL_TTIN: __wasi_signal_t = 20;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TTOU.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TTOU.html new file mode 100644 index 000000000000..8caa73d61925 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_TTOU.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_TTOU - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_TTOU

pub const __WASI_SIGNAL_TTOU: __wasi_signal_t = 21;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_URG.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_URG.html new file mode 100644 index 000000000000..917b0234f313 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_URG.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_URG - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_URG

pub const __WASI_SIGNAL_URG: __wasi_signal_t = 22;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_USR1.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_USR1.html new file mode 100644 index 000000000000..2730145ee3ad --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_USR1.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_USR1 - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_USR1

pub const __WASI_SIGNAL_USR1: __wasi_signal_t = 10;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_USR2.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_USR2.html new file mode 100644 index 000000000000..35e97b546193 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_USR2.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_USR2 - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_USR2

pub const __WASI_SIGNAL_USR2: __wasi_signal_t = 12;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_VTALRM.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_VTALRM.html new file mode 100644 index 000000000000..02614032c414 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_VTALRM.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_VTALRM - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_VTALRM

pub const __WASI_SIGNAL_VTALRM: __wasi_signal_t = 25;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_WINCH.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_WINCH.html new file mode 100644 index 000000000000..3e4037fa7267 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_WINCH.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_WINCH - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_WINCH

pub const __WASI_SIGNAL_WINCH: __wasi_signal_t = 27;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_XCPU.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_XCPU.html new file mode 100644 index 000000000000..ca80c92cebdd --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_XCPU.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_XCPU - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_XCPU

pub const __WASI_SIGNAL_XCPU: __wasi_signal_t = 23;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_XFSZ.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_XFSZ.html new file mode 100644 index 000000000000..ceab1ba7bf34 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SIGNAL_XFSZ.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_XFSZ - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SIGNAL_XFSZ

pub const __WASI_SIGNAL_XFSZ: __wasi_signal_t = 24;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME.html new file mode 100644 index 000000000000..72dcfb7fa2d9 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME

pub const __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME: __wasi_subclockflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_WHENCE_CUR.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_WHENCE_CUR.html new file mode 100644 index 000000000000..cf2f1532789f --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_WHENCE_CUR.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_WHENCE_CUR - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_WHENCE_CUR

pub const __WASI_WHENCE_CUR: __wasi_whence_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_WHENCE_END.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_WHENCE_END.html new file mode 100644 index 000000000000..cc2c972d3d62 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_WHENCE_END.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_WHENCE_END - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_WHENCE_END

pub const __WASI_WHENCE_END: __wasi_whence_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_WHENCE_SET.html b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_WHENCE_SET.html new file mode 100644 index 000000000000..3ffeb730a7c9 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/constant.__WASI_WHENCE_SET.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__WASI_WHENCE_SET - Rust

[][src]Constant wasi_common::old::snapshot_0::wasi::__WASI_WHENCE_SET

pub const __WASI_WHENCE_SET: __wasi_whence_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/fn.strerror.html b/api/wasi_common/old/snapshot_0/wasi/fn.strerror.html new file mode 100644 index 000000000000..7a60d6053f26 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/fn.strerror.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::strerror - Rust

[][src]Function wasi_common::old::snapshot_0::wasi::strerror

pub fn strerror(errno: __wasi_errno_t) -> &'static str
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/fn.whence_to_str.html b/api/wasi_common/old/snapshot_0/wasi/fn.whence_to_str.html new file mode 100644 index 000000000000..5800ad9fb9bf --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/fn.whence_to_str.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::whence_to_str - Rust

[][src]Function wasi_common::old::snapshot_0::wasi::whence_to_str

pub fn whence_to_str(whence: __wasi_whence_t) -> &'static str
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/index.html b/api/wasi_common/old/snapshot_0/wasi/index.html new file mode 100644 index 000000000000..6ce91b3ede05 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/index.html @@ -0,0 +1,9 @@ +wasi_common::old::snapshot_0::wasi - Rust

[][src]Module wasi_common::old::snapshot_0::wasi

Types and constants shared between 32-bit and 64-bit wasi. Types involving +pointer or usize-sized data are excluded here, so this file only contains +fixed-size types, so it's host/target independent.

+

Structs

+
__wasi_dirent_t
__wasi_event_fd_readwrite_t
__wasi_event_t
__wasi_fdstat_t
__wasi_filestat_t
__wasi_subscription_clock_t
__wasi_subscription_fd_readwrite_t
__wasi_subscription_t

Constants

+
__WASI_ADVICE_DONTNEED
__WASI_ADVICE_NOREUSE
__WASI_ADVICE_NORMAL
__WASI_ADVICE_RANDOM
__WASI_ADVICE_SEQUENTIAL
__WASI_ADVICE_WILLNEED
__WASI_CLOCKID_MONOTONIC
__WASI_CLOCKID_PROCESS_CPUTIME_ID
__WASI_CLOCKID_REALTIME
__WASI_CLOCKID_THREAD_CPUTIME_ID
__WASI_DIRCOOKIE_START
__WASI_ERRNO_2BIG
__WASI_ERRNO_ACCES
__WASI_ERRNO_ADDRINUSE
__WASI_ERRNO_ADDRNOTAVAIL
__WASI_ERRNO_AFNOSUPPORT
__WASI_ERRNO_AGAIN
__WASI_ERRNO_ALREADY
__WASI_ERRNO_BADF
__WASI_ERRNO_BADMSG
__WASI_ERRNO_BUSY
__WASI_ERRNO_CANCELED
__WASI_ERRNO_CHILD
__WASI_ERRNO_CONNABORTED
__WASI_ERRNO_CONNREFUSED
__WASI_ERRNO_CONNRESET
__WASI_ERRNO_DEADLK
__WASI_ERRNO_DESTADDRREQ
__WASI_ERRNO_DOM
__WASI_ERRNO_DQUOT
__WASI_ERRNO_EXIST
__WASI_ERRNO_FAULT
__WASI_ERRNO_FBIG
__WASI_ERRNO_HOSTUNREACH
__WASI_ERRNO_IDRM
__WASI_ERRNO_ILSEQ
__WASI_ERRNO_INPROGRESS
__WASI_ERRNO_INTR
__WASI_ERRNO_INVAL
__WASI_ERRNO_IO
__WASI_ERRNO_ISCONN
__WASI_ERRNO_ISDIR
__WASI_ERRNO_LOOP
__WASI_ERRNO_MFILE
__WASI_ERRNO_MLINK
__WASI_ERRNO_MSGSIZE
__WASI_ERRNO_MULTIHOP
__WASI_ERRNO_NAMETOOLONG
__WASI_ERRNO_NETDOWN
__WASI_ERRNO_NETRESET
__WASI_ERRNO_NETUNREACH
__WASI_ERRNO_NFILE
__WASI_ERRNO_NOBUFS
__WASI_ERRNO_NODEV
__WASI_ERRNO_NOENT
__WASI_ERRNO_NOEXEC
__WASI_ERRNO_NOLCK
__WASI_ERRNO_NOLINK
__WASI_ERRNO_NOMEM
__WASI_ERRNO_NOMSG
__WASI_ERRNO_NOPROTOOPT
__WASI_ERRNO_NOSPC
__WASI_ERRNO_NOSYS
__WASI_ERRNO_NOTCAPABLE
__WASI_ERRNO_NOTCONN
__WASI_ERRNO_NOTDIR
__WASI_ERRNO_NOTEMPTY
__WASI_ERRNO_NOTRECOVERABLE
__WASI_ERRNO_NOTSOCK
__WASI_ERRNO_NOTSUP
__WASI_ERRNO_NOTTY
__WASI_ERRNO_NXIO
__WASI_ERRNO_OVERFLOW
__WASI_ERRNO_OWNERDEAD
__WASI_ERRNO_PERM
__WASI_ERRNO_PIPE
__WASI_ERRNO_PROTO
__WASI_ERRNO_PROTONOSUPPORT
__WASI_ERRNO_PROTOTYPE
__WASI_ERRNO_RANGE
__WASI_ERRNO_ROFS
__WASI_ERRNO_SPIPE
__WASI_ERRNO_SRCH
__WASI_ERRNO_STALE
__WASI_ERRNO_SUCCESS
__WASI_ERRNO_TIMEDOUT
__WASI_ERRNO_TXTBSY
__WASI_ERRNO_XDEV
__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP
__WASI_EVENTTYPE_CLOCK
__WASI_EVENTTYPE_FD_READ
__WASI_EVENTTYPE_FD_WRITE
__WASI_FDFLAGS_APPEND
__WASI_FDFLAGS_DSYNC
__WASI_FDFLAGS_NONBLOCK
__WASI_FDFLAGS_RSYNC
__WASI_FDFLAGS_SYNC
__WASI_FILETYPE_BLOCK_DEVICE
__WASI_FILETYPE_CHARACTER_DEVICE
__WASI_FILETYPE_DIRECTORY
__WASI_FILETYPE_REGULAR_FILE
__WASI_FILETYPE_SOCKET_DGRAM
__WASI_FILETYPE_SOCKET_STREAM
__WASI_FILETYPE_SYMBOLIC_LINK
__WASI_FILETYPE_UNKNOWN
__WASI_FSTFLAGS_ATIM
__WASI_FSTFLAGS_ATIM_NOW
__WASI_FSTFLAGS_MTIM
__WASI_FSTFLAGS_MTIM_NOW
__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW
__WASI_OFLAGS_CREAT
__WASI_OFLAGS_DIRECTORY
__WASI_OFLAGS_EXCL
__WASI_OFLAGS_TRUNC
__WASI_PREOPENTYPE_DIR
__WASI_RIFLAGS_RECV_PEEK
__WASI_RIFLAGS_RECV_WAITALL
__WASI_RIGHTS_FD_ADVISE
__WASI_RIGHTS_FD_ALLOCATE
__WASI_RIGHTS_FD_DATASYNC
__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
__WASI_RIGHTS_FD_FILESTAT_GET
__WASI_RIGHTS_FD_FILESTAT_SET_SIZE
__WASI_RIGHTS_FD_FILESTAT_SET_TIMES
__WASI_RIGHTS_FD_READ
__WASI_RIGHTS_FD_READDIR
__WASI_RIGHTS_FD_SEEK
__WASI_RIGHTS_FD_SYNC
__WASI_RIGHTS_FD_TELL
__WASI_RIGHTS_FD_WRITE
__WASI_RIGHTS_PATH_CREATE_DIRECTORY
__WASI_RIGHTS_PATH_CREATE_FILE
__WASI_RIGHTS_PATH_FILESTAT_GET
__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE
__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES
__WASI_RIGHTS_PATH_LINK_SOURCE
__WASI_RIGHTS_PATH_LINK_TARGET
__WASI_RIGHTS_PATH_OPEN
__WASI_RIGHTS_PATH_READLINK
__WASI_RIGHTS_PATH_REMOVE_DIRECTORY
__WASI_RIGHTS_PATH_RENAME_SOURCE
__WASI_RIGHTS_PATH_RENAME_TARGET
__WASI_RIGHTS_PATH_SYMLINK
__WASI_RIGHTS_PATH_UNLINK_FILE
__WASI_RIGHTS_POLL_FD_READWRITE
__WASI_RIGHTS_SOCK_SHUTDOWN
__WASI_ROFLAGS_RECV_DATA_TRUNCATED
__WASI_SDFLAGS_RD
__WASI_SDFLAGS_WR
__WASI_SIGNAL_ABRT
__WASI_SIGNAL_ALRM
__WASI_SIGNAL_BUS
__WASI_SIGNAL_CHLD
__WASI_SIGNAL_CONT
__WASI_SIGNAL_FPE
__WASI_SIGNAL_HUP
__WASI_SIGNAL_ILL
__WASI_SIGNAL_INT
__WASI_SIGNAL_KILL
__WASI_SIGNAL_NONE
__WASI_SIGNAL_PIPE
__WASI_SIGNAL_POLL
__WASI_SIGNAL_PROF
__WASI_SIGNAL_PWR
__WASI_SIGNAL_QUIT
__WASI_SIGNAL_SEGV
__WASI_SIGNAL_STOP
__WASI_SIGNAL_SYS
__WASI_SIGNAL_TERM
__WASI_SIGNAL_TRAP
__WASI_SIGNAL_TSTP
__WASI_SIGNAL_TTIN
__WASI_SIGNAL_TTOU
__WASI_SIGNAL_URG
__WASI_SIGNAL_USR1
__WASI_SIGNAL_USR2
__WASI_SIGNAL_VTALRM
__WASI_SIGNAL_WINCH
__WASI_SIGNAL_XCPU
__WASI_SIGNAL_XFSZ
__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME
__WASI_WHENCE_CUR
__WASI_WHENCE_END
__WASI_WHENCE_SET

Functions

+
strerror
whence_to_str

Type Definitions

+
__wasi_advice_t
__wasi_clockid_t
__wasi_device_t
__wasi_dircookie_t
__wasi_dirnamlen_t
__wasi_errno_t
__wasi_eventrwflags_t
__wasi_eventtype_t
__wasi_exitcode_t
__wasi_fd_t
__wasi_fdflags_t
__wasi_filedelta_t
__wasi_filesize_t
__wasi_filetype_t
__wasi_fstflags_t
__wasi_inode_t
__wasi_linkcount_t
__wasi_lookupflags_t
__wasi_oflags_t
__wasi_preopentype_t
__wasi_riflags_t
__wasi_rights_t
__wasi_roflags_t
__wasi_sdflags_t
__wasi_siflags_t
__wasi_signal_t
__wasi_subclockflags_t
__wasi_timestamp_t
__wasi_userdata_t
__wasi_whence_t

Unions

+
__wasi_event_u_t
__wasi_subscription_u_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/sidebar-items.js b/api/wasi_common/old/snapshot_0/wasi/sidebar-items.js new file mode 100644 index 000000000000..f7cfeaeae683 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["__WASI_ADVICE_DONTNEED",""],["__WASI_ADVICE_NOREUSE",""],["__WASI_ADVICE_NORMAL",""],["__WASI_ADVICE_RANDOM",""],["__WASI_ADVICE_SEQUENTIAL",""],["__WASI_ADVICE_WILLNEED",""],["__WASI_CLOCKID_MONOTONIC",""],["__WASI_CLOCKID_PROCESS_CPUTIME_ID",""],["__WASI_CLOCKID_REALTIME",""],["__WASI_CLOCKID_THREAD_CPUTIME_ID",""],["__WASI_DIRCOOKIE_START",""],["__WASI_ERRNO_2BIG",""],["__WASI_ERRNO_ACCES",""],["__WASI_ERRNO_ADDRINUSE",""],["__WASI_ERRNO_ADDRNOTAVAIL",""],["__WASI_ERRNO_AFNOSUPPORT",""],["__WASI_ERRNO_AGAIN",""],["__WASI_ERRNO_ALREADY",""],["__WASI_ERRNO_BADF",""],["__WASI_ERRNO_BADMSG",""],["__WASI_ERRNO_BUSY",""],["__WASI_ERRNO_CANCELED",""],["__WASI_ERRNO_CHILD",""],["__WASI_ERRNO_CONNABORTED",""],["__WASI_ERRNO_CONNREFUSED",""],["__WASI_ERRNO_CONNRESET",""],["__WASI_ERRNO_DEADLK",""],["__WASI_ERRNO_DESTADDRREQ",""],["__WASI_ERRNO_DOM",""],["__WASI_ERRNO_DQUOT",""],["__WASI_ERRNO_EXIST",""],["__WASI_ERRNO_FAULT",""],["__WASI_ERRNO_FBIG",""],["__WASI_ERRNO_HOSTUNREACH",""],["__WASI_ERRNO_IDRM",""],["__WASI_ERRNO_ILSEQ",""],["__WASI_ERRNO_INPROGRESS",""],["__WASI_ERRNO_INTR",""],["__WASI_ERRNO_INVAL",""],["__WASI_ERRNO_IO",""],["__WASI_ERRNO_ISCONN",""],["__WASI_ERRNO_ISDIR",""],["__WASI_ERRNO_LOOP",""],["__WASI_ERRNO_MFILE",""],["__WASI_ERRNO_MLINK",""],["__WASI_ERRNO_MSGSIZE",""],["__WASI_ERRNO_MULTIHOP",""],["__WASI_ERRNO_NAMETOOLONG",""],["__WASI_ERRNO_NETDOWN",""],["__WASI_ERRNO_NETRESET",""],["__WASI_ERRNO_NETUNREACH",""],["__WASI_ERRNO_NFILE",""],["__WASI_ERRNO_NOBUFS",""],["__WASI_ERRNO_NODEV",""],["__WASI_ERRNO_NOENT",""],["__WASI_ERRNO_NOEXEC",""],["__WASI_ERRNO_NOLCK",""],["__WASI_ERRNO_NOLINK",""],["__WASI_ERRNO_NOMEM",""],["__WASI_ERRNO_NOMSG",""],["__WASI_ERRNO_NOPROTOOPT",""],["__WASI_ERRNO_NOSPC",""],["__WASI_ERRNO_NOSYS",""],["__WASI_ERRNO_NOTCAPABLE",""],["__WASI_ERRNO_NOTCONN",""],["__WASI_ERRNO_NOTDIR",""],["__WASI_ERRNO_NOTEMPTY",""],["__WASI_ERRNO_NOTRECOVERABLE",""],["__WASI_ERRNO_NOTSOCK",""],["__WASI_ERRNO_NOTSUP",""],["__WASI_ERRNO_NOTTY",""],["__WASI_ERRNO_NXIO",""],["__WASI_ERRNO_OVERFLOW",""],["__WASI_ERRNO_OWNERDEAD",""],["__WASI_ERRNO_PERM",""],["__WASI_ERRNO_PIPE",""],["__WASI_ERRNO_PROTO",""],["__WASI_ERRNO_PROTONOSUPPORT",""],["__WASI_ERRNO_PROTOTYPE",""],["__WASI_ERRNO_RANGE",""],["__WASI_ERRNO_ROFS",""],["__WASI_ERRNO_SPIPE",""],["__WASI_ERRNO_SRCH",""],["__WASI_ERRNO_STALE",""],["__WASI_ERRNO_SUCCESS",""],["__WASI_ERRNO_TIMEDOUT",""],["__WASI_ERRNO_TXTBSY",""],["__WASI_ERRNO_XDEV",""],["__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP",""],["__WASI_EVENTTYPE_CLOCK",""],["__WASI_EVENTTYPE_FD_READ",""],["__WASI_EVENTTYPE_FD_WRITE",""],["__WASI_FDFLAGS_APPEND",""],["__WASI_FDFLAGS_DSYNC",""],["__WASI_FDFLAGS_NONBLOCK",""],["__WASI_FDFLAGS_RSYNC",""],["__WASI_FDFLAGS_SYNC",""],["__WASI_FILETYPE_BLOCK_DEVICE",""],["__WASI_FILETYPE_CHARACTER_DEVICE",""],["__WASI_FILETYPE_DIRECTORY",""],["__WASI_FILETYPE_REGULAR_FILE",""],["__WASI_FILETYPE_SOCKET_DGRAM",""],["__WASI_FILETYPE_SOCKET_STREAM",""],["__WASI_FILETYPE_SYMBOLIC_LINK",""],["__WASI_FILETYPE_UNKNOWN",""],["__WASI_FSTFLAGS_ATIM",""],["__WASI_FSTFLAGS_ATIM_NOW",""],["__WASI_FSTFLAGS_MTIM",""],["__WASI_FSTFLAGS_MTIM_NOW",""],["__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW",""],["__WASI_OFLAGS_CREAT",""],["__WASI_OFLAGS_DIRECTORY",""],["__WASI_OFLAGS_EXCL",""],["__WASI_OFLAGS_TRUNC",""],["__WASI_PREOPENTYPE_DIR",""],["__WASI_RIFLAGS_RECV_PEEK",""],["__WASI_RIFLAGS_RECV_WAITALL",""],["__WASI_RIGHTS_FD_ADVISE",""],["__WASI_RIGHTS_FD_ALLOCATE",""],["__WASI_RIGHTS_FD_DATASYNC",""],["__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS",""],["__WASI_RIGHTS_FD_FILESTAT_GET",""],["__WASI_RIGHTS_FD_FILESTAT_SET_SIZE",""],["__WASI_RIGHTS_FD_FILESTAT_SET_TIMES",""],["__WASI_RIGHTS_FD_READ",""],["__WASI_RIGHTS_FD_READDIR",""],["__WASI_RIGHTS_FD_SEEK",""],["__WASI_RIGHTS_FD_SYNC",""],["__WASI_RIGHTS_FD_TELL",""],["__WASI_RIGHTS_FD_WRITE",""],["__WASI_RIGHTS_PATH_CREATE_DIRECTORY",""],["__WASI_RIGHTS_PATH_CREATE_FILE",""],["__WASI_RIGHTS_PATH_FILESTAT_GET",""],["__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE",""],["__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES",""],["__WASI_RIGHTS_PATH_LINK_SOURCE",""],["__WASI_RIGHTS_PATH_LINK_TARGET",""],["__WASI_RIGHTS_PATH_OPEN",""],["__WASI_RIGHTS_PATH_READLINK",""],["__WASI_RIGHTS_PATH_REMOVE_DIRECTORY",""],["__WASI_RIGHTS_PATH_RENAME_SOURCE",""],["__WASI_RIGHTS_PATH_RENAME_TARGET",""],["__WASI_RIGHTS_PATH_SYMLINK",""],["__WASI_RIGHTS_PATH_UNLINK_FILE",""],["__WASI_RIGHTS_POLL_FD_READWRITE",""],["__WASI_RIGHTS_SOCK_SHUTDOWN",""],["__WASI_ROFLAGS_RECV_DATA_TRUNCATED",""],["__WASI_SDFLAGS_RD",""],["__WASI_SDFLAGS_WR",""],["__WASI_SIGNAL_ABRT",""],["__WASI_SIGNAL_ALRM",""],["__WASI_SIGNAL_BUS",""],["__WASI_SIGNAL_CHLD",""],["__WASI_SIGNAL_CONT",""],["__WASI_SIGNAL_FPE",""],["__WASI_SIGNAL_HUP",""],["__WASI_SIGNAL_ILL",""],["__WASI_SIGNAL_INT",""],["__WASI_SIGNAL_KILL",""],["__WASI_SIGNAL_NONE",""],["__WASI_SIGNAL_PIPE",""],["__WASI_SIGNAL_POLL",""],["__WASI_SIGNAL_PROF",""],["__WASI_SIGNAL_PWR",""],["__WASI_SIGNAL_QUIT",""],["__WASI_SIGNAL_SEGV",""],["__WASI_SIGNAL_STOP",""],["__WASI_SIGNAL_SYS",""],["__WASI_SIGNAL_TERM",""],["__WASI_SIGNAL_TRAP",""],["__WASI_SIGNAL_TSTP",""],["__WASI_SIGNAL_TTIN",""],["__WASI_SIGNAL_TTOU",""],["__WASI_SIGNAL_URG",""],["__WASI_SIGNAL_USR1",""],["__WASI_SIGNAL_USR2",""],["__WASI_SIGNAL_VTALRM",""],["__WASI_SIGNAL_WINCH",""],["__WASI_SIGNAL_XCPU",""],["__WASI_SIGNAL_XFSZ",""],["__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME",""],["__WASI_WHENCE_CUR",""],["__WASI_WHENCE_END",""],["__WASI_WHENCE_SET",""]],"fn":[["strerror",""],["whence_to_str",""]],"struct":[["__wasi_dirent_t",""],["__wasi_event_fd_readwrite_t",""],["__wasi_event_t",""],["__wasi_fdstat_t",""],["__wasi_filestat_t",""],["__wasi_subscription_clock_t",""],["__wasi_subscription_fd_readwrite_t",""],["__wasi_subscription_t",""]],"type":[["__wasi_advice_t",""],["__wasi_clockid_t",""],["__wasi_device_t",""],["__wasi_dircookie_t",""],["__wasi_dirnamlen_t",""],["__wasi_errno_t",""],["__wasi_eventrwflags_t",""],["__wasi_eventtype_t",""],["__wasi_exitcode_t",""],["__wasi_fd_t",""],["__wasi_fdflags_t",""],["__wasi_filedelta_t",""],["__wasi_filesize_t",""],["__wasi_filetype_t",""],["__wasi_fstflags_t",""],["__wasi_inode_t",""],["__wasi_linkcount_t",""],["__wasi_lookupflags_t",""],["__wasi_oflags_t",""],["__wasi_preopentype_t",""],["__wasi_riflags_t",""],["__wasi_rights_t",""],["__wasi_roflags_t",""],["__wasi_sdflags_t",""],["__wasi_siflags_t",""],["__wasi_signal_t",""],["__wasi_subclockflags_t",""],["__wasi_timestamp_t",""],["__wasi_userdata_t",""],["__wasi_whence_t",""]],"union":[["__wasi_event_u_t",""],["__wasi_subscription_u_t",""]]}); \ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_dirent_t.html b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_dirent_t.html new file mode 100644 index 000000000000..ba98c0ddd379 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_dirent_t.html @@ -0,0 +1,28 @@ +wasi_common::old::snapshot_0::wasi::__wasi_dirent_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi::__wasi_dirent_t

#[repr(C)]
+pub struct __wasi_dirent_t {
+    pub d_next: __wasi_dircookie_t,
+    pub d_ino: __wasi_inode_t,
+    pub d_namlen: __wasi_dirnamlen_t,
+    pub d_type: __wasi_filetype_t,
+}

+ Fields

d_next: __wasi_dircookie_td_ino: __wasi_inode_td_namlen: __wasi_dirnamlen_td_type: __wasi_filetype_t

Trait Implementations

impl Clone for __wasi_dirent_t[src]

impl Copy for __wasi_dirent_t[src]

impl Debug for __wasi_dirent_t[src]

impl Eq for __wasi_dirent_t[src]

impl Hash for __wasi_dirent_t[src]

impl PartialEq<__wasi_dirent_t> for __wasi_dirent_t[src]

impl StructuralEq for __wasi_dirent_t[src]

impl StructuralPartialEq for __wasi_dirent_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_event_fd_readwrite_t.html b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_event_fd_readwrite_t.html new file mode 100644 index 000000000000..36fc64afb0ee --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_event_fd_readwrite_t.html @@ -0,0 +1,26 @@ +wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi::__wasi_event_fd_readwrite_t

#[repr(C)]
+pub struct __wasi_event_fd_readwrite_t {
+    pub nbytes: __wasi_filesize_t,
+    pub flags: __wasi_eventrwflags_t,
+}

+ Fields

nbytes: __wasi_filesize_tflags: __wasi_eventrwflags_t

Trait Implementations

impl Clone for __wasi_event_fd_readwrite_t[src]

impl Copy for __wasi_event_fd_readwrite_t[src]

impl Debug for __wasi_event_fd_readwrite_t[src]

impl Eq for __wasi_event_fd_readwrite_t[src]

impl Hash for __wasi_event_fd_readwrite_t[src]

impl PartialEq<__wasi_event_fd_readwrite_t> for __wasi_event_fd_readwrite_t[src]

impl StructuralEq for __wasi_event_fd_readwrite_t[src]

impl StructuralPartialEq for __wasi_event_fd_readwrite_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_event_t.html b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_event_t.html new file mode 100644 index 000000000000..fcc9b1522cec --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_event_t.html @@ -0,0 +1,23 @@ +wasi_common::old::snapshot_0::wasi::__wasi_event_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi::__wasi_event_t

#[repr(C)]
+pub struct __wasi_event_t {
+    pub userdata: __wasi_userdata_t,
+    pub error: __wasi_errno_t,
+    pub type: __wasi_eventtype_t,
+    pub u: __wasi_event_u_t,
+}

+ Fields

userdata: __wasi_userdata_terror: __wasi_errno_ttype: __wasi_eventtype_tu: __wasi_event_u_t

Trait Implementations

impl Clone for __wasi_event_t[src]

impl Copy for __wasi_event_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_fdstat_t.html b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_fdstat_t.html new file mode 100644 index 000000000000..9fb207d93eca --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_fdstat_t.html @@ -0,0 +1,28 @@ +wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi::__wasi_fdstat_t

#[repr(C)]
+pub struct __wasi_fdstat_t {
+    pub fs_filetype: __wasi_filetype_t,
+    pub fs_flags: __wasi_fdflags_t,
+    pub fs_rights_base: __wasi_rights_t,
+    pub fs_rights_inheriting: __wasi_rights_t,
+}

+ Fields

fs_filetype: __wasi_filetype_tfs_flags: __wasi_fdflags_tfs_rights_base: __wasi_rights_tfs_rights_inheriting: __wasi_rights_t

Trait Implementations

impl Clone for __wasi_fdstat_t[src]

impl Copy for __wasi_fdstat_t[src]

impl Debug for __wasi_fdstat_t[src]

impl Eq for __wasi_fdstat_t[src]

impl Hash for __wasi_fdstat_t[src]

impl PartialEq<__wasi_fdstat_t> for __wasi_fdstat_t[src]

impl StructuralEq for __wasi_fdstat_t[src]

impl StructuralPartialEq for __wasi_fdstat_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_filestat_t.html b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_filestat_t.html new file mode 100644 index 000000000000..be563d66d2fa --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_filestat_t.html @@ -0,0 +1,32 @@ +wasi_common::old::snapshot_0::wasi::__wasi_filestat_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi::__wasi_filestat_t

#[repr(C)]
+pub struct __wasi_filestat_t {
+    pub dev: __wasi_device_t,
+    pub ino: __wasi_inode_t,
+    pub filetype: __wasi_filetype_t,
+    pub nlink: __wasi_linkcount_t,
+    pub size: __wasi_filesize_t,
+    pub atim: __wasi_timestamp_t,
+    pub mtim: __wasi_timestamp_t,
+    pub ctim: __wasi_timestamp_t,
+}

+ Fields

dev: __wasi_device_tino: __wasi_inode_tfiletype: __wasi_filetype_tnlink: __wasi_linkcount_tsize: __wasi_filesize_tatim: __wasi_timestamp_tmtim: __wasi_timestamp_tctim: __wasi_timestamp_t

Trait Implementations

impl Clone for __wasi_filestat_t[src]

impl Copy for __wasi_filestat_t[src]

impl Debug for __wasi_filestat_t[src]

impl Eq for __wasi_filestat_t[src]

impl Hash for __wasi_filestat_t[src]

impl PartialEq<__wasi_filestat_t> for __wasi_filestat_t[src]

impl StructuralEq for __wasi_filestat_t[src]

impl StructuralPartialEq for __wasi_filestat_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_subscription_clock_t.html b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_subscription_clock_t.html new file mode 100644 index 000000000000..97b6c423d8d3 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_subscription_clock_t.html @@ -0,0 +1,29 @@ +wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi::__wasi_subscription_clock_t

#[repr(C)]
+pub struct __wasi_subscription_clock_t {
+    pub identifier: __wasi_userdata_t,
+    pub id: __wasi_clockid_t,
+    pub timeout: __wasi_timestamp_t,
+    pub precision: __wasi_timestamp_t,
+    pub flags: __wasi_subclockflags_t,
+}

+ Fields

identifier: __wasi_userdata_tid: __wasi_clockid_ttimeout: __wasi_timestamp_tprecision: __wasi_timestamp_tflags: __wasi_subclockflags_t

Trait Implementations

impl Clone for __wasi_subscription_clock_t[src]

impl Copy for __wasi_subscription_clock_t[src]

impl Debug for __wasi_subscription_clock_t[src]

impl Eq for __wasi_subscription_clock_t[src]

impl Hash for __wasi_subscription_clock_t[src]

impl PartialEq<__wasi_subscription_clock_t> for __wasi_subscription_clock_t[src]

impl StructuralEq for __wasi_subscription_clock_t[src]

impl StructuralPartialEq for __wasi_subscription_clock_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_subscription_fd_readwrite_t.html b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_subscription_fd_readwrite_t.html new file mode 100644 index 000000000000..f8a613780733 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_subscription_fd_readwrite_t.html @@ -0,0 +1,25 @@ +wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi::__wasi_subscription_fd_readwrite_t

#[repr(C)]
+pub struct __wasi_subscription_fd_readwrite_t {
+    pub file_descriptor: __wasi_fd_t,
+}

+ Fields

file_descriptor: __wasi_fd_t

Trait Implementations

impl Clone for __wasi_subscription_fd_readwrite_t[src]

impl Copy for __wasi_subscription_fd_readwrite_t[src]

impl Debug for __wasi_subscription_fd_readwrite_t[src]

impl Eq for __wasi_subscription_fd_readwrite_t[src]

impl Hash for __wasi_subscription_fd_readwrite_t[src]

impl PartialEq<__wasi_subscription_fd_readwrite_t> for __wasi_subscription_fd_readwrite_t[src]

impl StructuralEq for __wasi_subscription_fd_readwrite_t[src]

impl StructuralPartialEq for __wasi_subscription_fd_readwrite_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_subscription_t.html b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_subscription_t.html new file mode 100644 index 000000000000..33d6f4aee83f --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/struct.__wasi_subscription_t.html @@ -0,0 +1,22 @@ +wasi_common::old::snapshot_0::wasi::__wasi_subscription_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi::__wasi_subscription_t

#[repr(C)]
+pub struct __wasi_subscription_t {
+    pub userdata: __wasi_userdata_t,
+    pub type: __wasi_eventtype_t,
+    pub u: __wasi_subscription_u_t,
+}

+ Fields

userdata: __wasi_userdata_ttype: __wasi_eventtype_tu: __wasi_subscription_u_t

Trait Implementations

impl Clone for __wasi_subscription_t[src]

impl Copy for __wasi_subscription_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_advice_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_advice_t.html new file mode 100644 index 000000000000..2312961b6d87 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_advice_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_advice_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_advice_t

type __wasi_advice_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_clockid_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_clockid_t.html new file mode 100644 index 000000000000..a915880de706 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_clockid_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_clockid_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_clockid_t

type __wasi_clockid_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_device_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_device_t.html new file mode 100644 index 000000000000..a2743bb6601e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_device_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_device_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_device_t

type __wasi_device_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_dircookie_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_dircookie_t.html new file mode 100644 index 000000000000..57b7b1a1b700 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_dircookie_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_dircookie_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_dircookie_t

type __wasi_dircookie_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_dirnamlen_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_dirnamlen_t.html new file mode 100644 index 000000000000..ea6fff664a09 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_dirnamlen_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_dirnamlen_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_dirnamlen_t

type __wasi_dirnamlen_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_errno_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_errno_t.html new file mode 100644 index 000000000000..1d08979d23ce --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_errno_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_errno_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_errno_t

type __wasi_errno_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_eventrwflags_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_eventrwflags_t.html new file mode 100644 index 000000000000..5fb7fdcc76d8 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_eventrwflags_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_eventrwflags_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_eventrwflags_t

type __wasi_eventrwflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_eventtype_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_eventtype_t.html new file mode 100644 index 000000000000..68084a01da16 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_eventtype_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_eventtype_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_eventtype_t

type __wasi_eventtype_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_exitcode_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_exitcode_t.html new file mode 100644 index 000000000000..0291ecd58087 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_exitcode_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_exitcode_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_exitcode_t

type __wasi_exitcode_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_fd_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_fd_t.html new file mode 100644 index 000000000000..a6178d2e49ce --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_fd_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_fd_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_fd_t

type __wasi_fd_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_fdflags_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_fdflags_t.html new file mode 100644 index 000000000000..1239f92ca8ef --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_fdflags_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_fdflags_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_fdflags_t

type __wasi_fdflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_filedelta_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_filedelta_t.html new file mode 100644 index 000000000000..f1a00eb51599 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_filedelta_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_filedelta_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_filedelta_t

type __wasi_filedelta_t = i64;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_filesize_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_filesize_t.html new file mode 100644 index 000000000000..f4e9cd4e3f87 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_filesize_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_filesize_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_filesize_t

type __wasi_filesize_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_filetype_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_filetype_t.html new file mode 100644 index 000000000000..ff1304454cad --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_filetype_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_filetype_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_filetype_t

type __wasi_filetype_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_fstflags_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_fstflags_t.html new file mode 100644 index 000000000000..57be4d36bbc8 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_fstflags_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_fstflags_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_fstflags_t

type __wasi_fstflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_inode_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_inode_t.html new file mode 100644 index 000000000000..05724b913031 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_inode_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_inode_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_inode_t

type __wasi_inode_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_linkcount_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_linkcount_t.html new file mode 100644 index 000000000000..4848efaac8bb --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_linkcount_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_linkcount_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_linkcount_t

type __wasi_linkcount_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_lookupflags_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_lookupflags_t.html new file mode 100644 index 000000000000..d4701150831c --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_lookupflags_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_lookupflags_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_lookupflags_t

type __wasi_lookupflags_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_oflags_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_oflags_t.html new file mode 100644 index 000000000000..d8b3522f2ed5 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_oflags_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_oflags_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_oflags_t

type __wasi_oflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_preopentype_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_preopentype_t.html new file mode 100644 index 000000000000..5de89dc4315f --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_preopentype_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_preopentype_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_preopentype_t

type __wasi_preopentype_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_riflags_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_riflags_t.html new file mode 100644 index 000000000000..1f5cd0c96209 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_riflags_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_riflags_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_riflags_t

type __wasi_riflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_rights_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_rights_t.html new file mode 100644 index 000000000000..bf4cdba70113 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_rights_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_rights_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_rights_t

type __wasi_rights_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_roflags_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_roflags_t.html new file mode 100644 index 000000000000..c6783b6e9ce6 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_roflags_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_roflags_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_roflags_t

type __wasi_roflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_sdflags_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_sdflags_t.html new file mode 100644 index 000000000000..599e5fe7ce83 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_sdflags_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_sdflags_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_sdflags_t

type __wasi_sdflags_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_siflags_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_siflags_t.html new file mode 100644 index 000000000000..ced131d95e8e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_siflags_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_siflags_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_siflags_t

type __wasi_siflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_signal_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_signal_t.html new file mode 100644 index 000000000000..242e2ebc643b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_signal_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_signal_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_signal_t

type __wasi_signal_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_subclockflags_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_subclockflags_t.html new file mode 100644 index 000000000000..6c58ea2fb7ae --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_subclockflags_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_subclockflags_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_subclockflags_t

type __wasi_subclockflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_timestamp_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_timestamp_t.html new file mode 100644 index 000000000000..436c450a7cc2 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_timestamp_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_timestamp_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_timestamp_t

type __wasi_timestamp_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_userdata_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_userdata_t.html new file mode 100644 index 000000000000..b6ce0f7ba083 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_userdata_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_userdata_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_userdata_t

type __wasi_userdata_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/type.__wasi_whence_t.html b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_whence_t.html new file mode 100644 index 000000000000..040dfaf70a44 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/type.__wasi_whence_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi::__wasi_whence_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi::__wasi_whence_t

type __wasi_whence_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/union.__wasi_event_u_t.html b/api/wasi_common/old/snapshot_0/wasi/union.__wasi_event_u_t.html new file mode 100644 index 000000000000..527f4fb9ac25 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/union.__wasi_event_u_t.html @@ -0,0 +1,20 @@ +wasi_common::old::snapshot_0::wasi::__wasi_event_u_t - Rust

[][src]Union wasi_common::old::snapshot_0::wasi::__wasi_event_u_t

#[repr(C)]
+pub union __wasi_event_u_t {
+    pub fd_readwrite: __wasi_event_fd_readwrite_t,
+}

+ Fields

fd_readwrite: __wasi_event_fd_readwrite_t

Trait Implementations

impl Clone for __wasi_event_u_t[src]

impl Copy for __wasi_event_u_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi/union.__wasi_subscription_u_t.html b/api/wasi_common/old/snapshot_0/wasi/union.__wasi_subscription_u_t.html new file mode 100644 index 000000000000..9709a1782b73 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi/union.__wasi_subscription_u_t.html @@ -0,0 +1,21 @@ +wasi_common::old::snapshot_0::wasi::__wasi_subscription_u_t - Rust

[][src]Union wasi_common::old::snapshot_0::wasi::__wasi_subscription_u_t

#[repr(C)]
+pub union __wasi_subscription_u_t {
+    pub clock: __wasi_subscription_clock_t,
+    pub fd_readwrite: __wasi_subscription_fd_readwrite_t,
+}

+ Fields

clock: __wasi_subscription_clock_tfd_readwrite: __wasi_subscription_fd_readwrite_t

Trait Implementations

impl Clone for __wasi_subscription_u_t[src]

impl Copy for __wasi_subscription_u_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/index.html b/api/wasi_common/old/snapshot_0/wasi32/index.html new file mode 100644 index 000000000000..58b3674a68a3 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/index.html @@ -0,0 +1,7 @@ +wasi_common::old::snapshot_0::wasi32 - Rust

[][src]Module wasi_common::old::snapshot_0::wasi32

Types and constants specific to 32-bit wasi. These are similar to the types +in the host module, but pointers and usize values are replaced with +u32-sized types.

+

Structs

+
__wasi_ciovec_t
__wasi_iovec_t
__wasi_prestat_dir_t
__wasi_prestat_t

Type Definitions

+
__wasi_ciovec_array_t
__wasi_iovec_array_t
__wasi_size_t
size_t
uintptr_t

Unions

+
__wasi_prestat_u_t
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/sidebar-items.js b/api/wasi_common/old/snapshot_0/wasi32/sidebar-items.js new file mode 100644 index 000000000000..aa1bb14afae0 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["__wasi_ciovec_t",""],["__wasi_iovec_t",""],["__wasi_prestat_dir_t",""],["__wasi_prestat_t",""]],"type":[["__wasi_ciovec_array_t",""],["__wasi_iovec_array_t",""],["__wasi_size_t",""],["size_t",""],["uintptr_t",""]],"union":[["__wasi_prestat_u_t",""]]}); \ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_ciovec_t.html b/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_ciovec_t.html new file mode 100644 index 000000000000..cc1eeb9a3ab5 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_ciovec_t.html @@ -0,0 +1,26 @@ +wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_t

#[repr(C)]
+pub struct __wasi_ciovec_t {
+    pub buf: u32,
+    pub buf_len: __wasi_size_t,
+}

+ Fields

buf: u32buf_len: __wasi_size_t

Trait Implementations

impl Clone for __wasi_ciovec_t[src]

impl Copy for __wasi_ciovec_t[src]

impl Debug for __wasi_ciovec_t[src]

impl Eq for __wasi_ciovec_t[src]

impl Hash for __wasi_ciovec_t[src]

impl PartialEq<__wasi_ciovec_t> for __wasi_ciovec_t[src]

impl StructuralEq for __wasi_ciovec_t[src]

impl StructuralPartialEq for __wasi_ciovec_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_iovec_t.html b/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_iovec_t.html new file mode 100644 index 000000000000..fb70151bf36b --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_iovec_t.html @@ -0,0 +1,26 @@ +wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi32::__wasi_iovec_t

#[repr(C)]
+pub struct __wasi_iovec_t {
+    pub buf: u32,
+    pub buf_len: __wasi_size_t,
+}

+ Fields

buf: u32buf_len: __wasi_size_t

Trait Implementations

impl Clone for __wasi_iovec_t[src]

impl Copy for __wasi_iovec_t[src]

impl Debug for __wasi_iovec_t[src]

impl Eq for __wasi_iovec_t[src]

impl Hash for __wasi_iovec_t[src]

impl PartialEq<__wasi_iovec_t> for __wasi_iovec_t[src]

impl StructuralEq for __wasi_iovec_t[src]

impl StructuralPartialEq for __wasi_iovec_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_prestat_dir_t.html b/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_prestat_dir_t.html new file mode 100644 index 000000000000..0acd533305dd --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_prestat_dir_t.html @@ -0,0 +1,25 @@ +wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi32::__wasi_prestat_dir_t

#[repr(C)]
+pub struct __wasi_prestat_dir_t {
+    pub pr_name_len: __wasi_size_t,
+}

+ Fields

pr_name_len: __wasi_size_t

Trait Implementations

impl Clone for __wasi_prestat_dir_t[src]

impl Copy for __wasi_prestat_dir_t[src]

impl Debug for __wasi_prestat_dir_t[src]

impl Eq for __wasi_prestat_dir_t[src]

impl Hash for __wasi_prestat_dir_t[src]

impl PartialEq<__wasi_prestat_dir_t> for __wasi_prestat_dir_t[src]

impl StructuralEq for __wasi_prestat_dir_t[src]

impl StructuralPartialEq for __wasi_prestat_dir_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_prestat_t.html b/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_prestat_t.html new file mode 100644 index 000000000000..ed427748f7bb --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/struct.__wasi_prestat_t.html @@ -0,0 +1,21 @@ +wasi_common::old::snapshot_0::wasi32::__wasi_prestat_t - Rust

[][src]Struct wasi_common::old::snapshot_0::wasi32::__wasi_prestat_t

#[repr(C)]
+pub struct __wasi_prestat_t {
+    pub pr_type: __wasi_preopentype_t,
+    pub u: __wasi_prestat_u_t,
+}

+ Fields

pr_type: __wasi_preopentype_tu: __wasi_prestat_u_t

Trait Implementations

impl Clone for __wasi_prestat_t[src]

impl Copy for __wasi_prestat_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/type.__wasi_ciovec_array_t.html b/api/wasi_common/old/snapshot_0/wasi32/type.__wasi_ciovec_array_t.html new file mode 100644 index 000000000000..cefc9f9072c5 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/type.__wasi_ciovec_array_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_array_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi32::__wasi_ciovec_array_t

type __wasi_ciovec_array_t = (u32, u32);
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/type.__wasi_iovec_array_t.html b/api/wasi_common/old/snapshot_0/wasi32/type.__wasi_iovec_array_t.html new file mode 100644 index 000000000000..649e0ecf25b6 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/type.__wasi_iovec_array_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi32::__wasi_iovec_array_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi32::__wasi_iovec_array_t

type __wasi_iovec_array_t = (u32, u32);
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/type.__wasi_size_t.html b/api/wasi_common/old/snapshot_0/wasi32/type.__wasi_size_t.html new file mode 100644 index 000000000000..cd4f866948a0 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/type.__wasi_size_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi32::__wasi_size_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi32::__wasi_size_t

type __wasi_size_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/type.size_t.html b/api/wasi_common/old/snapshot_0/wasi32/type.size_t.html new file mode 100644 index 000000000000..03b605ea82a9 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/type.size_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi32::size_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi32::size_t

type size_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/type.uintptr_t.html b/api/wasi_common/old/snapshot_0/wasi32/type.uintptr_t.html new file mode 100644 index 000000000000..6ed1f7b4353e --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/type.uintptr_t.html @@ -0,0 +1 @@ +wasi_common::old::snapshot_0::wasi32::uintptr_t - Rust

[][src]Type Definition wasi_common::old::snapshot_0::wasi32::uintptr_t

type uintptr_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/old/snapshot_0/wasi32/union.__wasi_prestat_u_t.html b/api/wasi_common/old/snapshot_0/wasi32/union.__wasi_prestat_u_t.html new file mode 100644 index 000000000000..b0bbf96a4470 --- /dev/null +++ b/api/wasi_common/old/snapshot_0/wasi32/union.__wasi_prestat_u_t.html @@ -0,0 +1,20 @@ +wasi_common::old::snapshot_0::wasi32::__wasi_prestat_u_t - Rust

[][src]Union wasi_common::old::snapshot_0::wasi32::__wasi_prestat_u_t

#[repr(C)]
+pub union __wasi_prestat_u_t {
+    pub dir: __wasi_prestat_dir_t,
+}

+ Fields

dir: __wasi_prestat_dir_t

Trait Implementations

impl Clone for __wasi_prestat_u_t[src]

impl Copy for __wasi_prestat_u_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/sidebar-items.js b/api/wasi_common/sidebar-items.js new file mode 100644 index 000000000000..4e753bb53db8 --- /dev/null +++ b/api/wasi_common/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["Error",""]],"fn":[["preopen_dir",""]],"mod":[["fs","A very experimental module modeled providing a high-level and safe filesystem interface, modeled after `std::fs`, implemented on top of WASI functions."],["hostcalls",""],["old",""],["wasi","Types and constants shared between 32-bit and 64-bit wasi. Types involving pointer or `usize`-sized data are excluded here, so this file only contains fixed-size types, so it's host/target independent."],["wasi32","Types and constants specific to 32-bit wasi. These are similar to the types in the `host` module, but pointers and `usize` values are replaced with `u32`-sized types."]],"struct":[["WasiCtx",""],["WasiCtxBuilder","A builder allowing customizable construction of `WasiCtx` instances."]]}); \ No newline at end of file diff --git a/api/wasi_common/struct.WasiCtx.html b/api/wasi_common/struct.WasiCtx.html new file mode 100644 index 000000000000..990721e66391 --- /dev/null +++ b/api/wasi_common/struct.WasiCtx.html @@ -0,0 +1,21 @@ +wasi_common::WasiCtx - Rust

[][src]Struct wasi_common::WasiCtx

pub struct WasiCtx { /* fields omitted */ }

Methods

impl WasiCtx[src]

pub fn new<S: AsRef<[u8]>>(
    args: impl IntoIterator<Item = S>
) -> Result<Self, Error>
[src]

Make a new WasiCtx with some default settings.

+
    +
  • +

    File descriptors 0, 1, and 2 inherit stdin, stdout, and stderr from the host process.

    +
  • +
  • +

    Environment variables are inherited from the host process.

    +
  • +
+

To override these behaviors, use WasiCtxBuilder.

+

Trait Implementations

impl Debug for WasiCtx[src]

Auto Trait Implementations

impl RefUnwindSafe for WasiCtx

impl Send for WasiCtx

impl Sync for WasiCtx

impl Unpin for WasiCtx

impl UnwindSafe for WasiCtx

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/struct.WasiCtxBuilder.html b/api/wasi_common/struct.WasiCtxBuilder.html new file mode 100644 index 000000000000..420c2b82160c --- /dev/null +++ b/api/wasi_common/struct.WasiCtxBuilder.html @@ -0,0 +1,39 @@ +wasi_common::WasiCtxBuilder - Rust

[][src]Struct wasi_common::WasiCtxBuilder

pub struct WasiCtxBuilder { /* fields omitted */ }

A builder allowing customizable construction of WasiCtx instances.

+

Methods

impl WasiCtxBuilder[src]

pub fn new() -> Self[src]

Builder for a new WasiCtx.

+

pub fn args<S: AsRef<[u8]>>(self, args: impl IntoIterator<Item = S>) -> Self[src]

Add arguments to the command-line arguments list.

+

Arguments must be valid UTF-8 with no NUL bytes, or else WasiCtxBuilder::build() will fail +with Error::EILSEQ.

+

pub fn arg<S: AsRef<[u8]>>(self, arg: S) -> Self[src]

Add an argument to the command-line arguments list.

+

Arguments must be valid UTF-8 with no NUL bytes, or else WasiCtxBuilder::build() will fail +with Error::EILSEQ.

+

pub fn inherit_args(self) -> Self[src]

Inherit the command-line arguments from the host process.

+

If any arguments from the host process contain invalid UTF-8, WasiCtxBuilder::build() will +fail with Error::EILSEQ.

+

pub fn inherit_stdio(self) -> Self[src]

Inherit the stdin, stdout, and stderr streams from the host process.

+

pub fn inherit_env(self) -> Self[src]

Inherit the environment variables from the host process.

+

If any environment variables from the host process contain invalid Unicode (UTF-16 for +Windows, UTF-8 for other platforms), WasiCtxBuilder::build() will fail with +Error::EILSEQ.

+

pub fn env<S: AsRef<[u8]>>(self, k: S, v: S) -> Self[src]

Add an entry to the environment.

+

Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else +WasiCtxBuilder::build() will fail with Error::EILSEQ.

+

pub fn envs<S: AsRef<[u8]>, T: Borrow<(S, S)>>(
    self,
    envs: impl IntoIterator<Item = T>
) -> Self
[src]

Add entries to the environment.

+

Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else +WasiCtxBuilder::build() will fail with Error::EILSEQ.

+

pub fn stdin(self, file: File) -> Self[src]

Provide a File to use as stdin

+

pub fn stdout(self, file: File) -> Self[src]

Provide a File to use as stdout

+

pub fn stderr(self, file: File) -> Self[src]

Provide a File to use as stderr

+

pub fn preopened_dir<P: AsRef<Path>>(self, dir: File, guest_path: P) -> Self[src]

Add a preopened directory.

+

pub fn build(self) -> Result<WasiCtx, Error>[src]

Build a WasiCtx, consuming this WasiCtxBuilder.

+

If any of the arguments or environment variables in this builder cannot be converted into +CStrings, either due to NUL bytes or Unicode conversions, this returns Error::EILSEQ.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/sys/unix/fn.preopen_dir.html b/api/wasi_common/sys/unix/fn.preopen_dir.html new file mode 100644 index 000000000000..2fa1df848efe --- /dev/null +++ b/api/wasi_common/sys/unix/fn.preopen_dir.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasi_common/fn.preopen_dir.html...

+ + + \ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ADVICE_DONTNEED.html b/api/wasi_common/wasi/constant.__WASI_ADVICE_DONTNEED.html new file mode 100644 index 000000000000..659b6e7d6da1 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ADVICE_DONTNEED.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ADVICE_DONTNEED - Rust

[][src]Constant wasi_common::wasi::__WASI_ADVICE_DONTNEED

pub const __WASI_ADVICE_DONTNEED: __wasi_advice_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ADVICE_NOREUSE.html b/api/wasi_common/wasi/constant.__WASI_ADVICE_NOREUSE.html new file mode 100644 index 000000000000..d6d8a8f49581 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ADVICE_NOREUSE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ADVICE_NOREUSE - Rust

[][src]Constant wasi_common::wasi::__WASI_ADVICE_NOREUSE

pub const __WASI_ADVICE_NOREUSE: __wasi_advice_t = 5;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ADVICE_NORMAL.html b/api/wasi_common/wasi/constant.__WASI_ADVICE_NORMAL.html new file mode 100644 index 000000000000..7f353202e1e1 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ADVICE_NORMAL.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ADVICE_NORMAL - Rust

[][src]Constant wasi_common::wasi::__WASI_ADVICE_NORMAL

pub const __WASI_ADVICE_NORMAL: __wasi_advice_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ADVICE_RANDOM.html b/api/wasi_common/wasi/constant.__WASI_ADVICE_RANDOM.html new file mode 100644 index 000000000000..09292643905f --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ADVICE_RANDOM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ADVICE_RANDOM - Rust

[][src]Constant wasi_common::wasi::__WASI_ADVICE_RANDOM

pub const __WASI_ADVICE_RANDOM: __wasi_advice_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ADVICE_SEQUENTIAL.html b/api/wasi_common/wasi/constant.__WASI_ADVICE_SEQUENTIAL.html new file mode 100644 index 000000000000..fdce95c39a8d --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ADVICE_SEQUENTIAL.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ADVICE_SEQUENTIAL - Rust

[][src]Constant wasi_common::wasi::__WASI_ADVICE_SEQUENTIAL

pub const __WASI_ADVICE_SEQUENTIAL: __wasi_advice_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ADVICE_WILLNEED.html b/api/wasi_common/wasi/constant.__WASI_ADVICE_WILLNEED.html new file mode 100644 index 000000000000..30a91f8d85e8 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ADVICE_WILLNEED.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ADVICE_WILLNEED - Rust

[][src]Constant wasi_common::wasi::__WASI_ADVICE_WILLNEED

pub const __WASI_ADVICE_WILLNEED: __wasi_advice_t = 3;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_CLOCKID_MONOTONIC.html b/api/wasi_common/wasi/constant.__WASI_CLOCKID_MONOTONIC.html new file mode 100644 index 000000000000..672bcbbf9325 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_CLOCKID_MONOTONIC.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_CLOCKID_MONOTONIC - Rust

[][src]Constant wasi_common::wasi::__WASI_CLOCKID_MONOTONIC

pub const __WASI_CLOCKID_MONOTONIC: __wasi_clockid_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_CLOCKID_PROCESS_CPUTIME_ID.html b/api/wasi_common/wasi/constant.__WASI_CLOCKID_PROCESS_CPUTIME_ID.html new file mode 100644 index 000000000000..78cc53d64c57 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_CLOCKID_PROCESS_CPUTIME_ID.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_CLOCKID_PROCESS_CPUTIME_ID - Rust

[][src]Constant wasi_common::wasi::__WASI_CLOCKID_PROCESS_CPUTIME_ID

pub const __WASI_CLOCKID_PROCESS_CPUTIME_ID: __wasi_clockid_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_CLOCKID_REALTIME.html b/api/wasi_common/wasi/constant.__WASI_CLOCKID_REALTIME.html new file mode 100644 index 000000000000..a84e052eb5da --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_CLOCKID_REALTIME.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_CLOCKID_REALTIME - Rust

[][src]Constant wasi_common::wasi::__WASI_CLOCKID_REALTIME

pub const __WASI_CLOCKID_REALTIME: __wasi_clockid_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_CLOCKID_THREAD_CPUTIME_ID.html b/api/wasi_common/wasi/constant.__WASI_CLOCKID_THREAD_CPUTIME_ID.html new file mode 100644 index 000000000000..78c8904ffadc --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_CLOCKID_THREAD_CPUTIME_ID.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_CLOCKID_THREAD_CPUTIME_ID - Rust

[][src]Constant wasi_common::wasi::__WASI_CLOCKID_THREAD_CPUTIME_ID

pub const __WASI_CLOCKID_THREAD_CPUTIME_ID: __wasi_clockid_t = 3;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_DIRCOOKIE_START.html b/api/wasi_common/wasi/constant.__WASI_DIRCOOKIE_START.html new file mode 100644 index 000000000000..fc8c4aa15be9 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_DIRCOOKIE_START.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_DIRCOOKIE_START - Rust

[][src]Constant wasi_common::wasi::__WASI_DIRCOOKIE_START

pub const __WASI_DIRCOOKIE_START: __wasi_dircookie_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_2BIG.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_2BIG.html new file mode 100644 index 000000000000..4901d5748d61 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_2BIG.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_2BIG - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_2BIG

pub const __WASI_ERRNO_2BIG: __wasi_errno_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_ACCES.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_ACCES.html new file mode 100644 index 000000000000..262612e87973 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_ACCES.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_ACCES - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_ACCES

pub const __WASI_ERRNO_ACCES: __wasi_errno_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_ADDRINUSE.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_ADDRINUSE.html new file mode 100644 index 000000000000..e60d767e7107 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_ADDRINUSE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_ADDRINUSE - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_ADDRINUSE

pub const __WASI_ERRNO_ADDRINUSE: __wasi_errno_t = 3;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_ADDRNOTAVAIL.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_ADDRNOTAVAIL.html new file mode 100644 index 000000000000..402753984fd0 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_ADDRNOTAVAIL.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_ADDRNOTAVAIL - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_ADDRNOTAVAIL

pub const __WASI_ERRNO_ADDRNOTAVAIL: __wasi_errno_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_AFNOSUPPORT.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_AFNOSUPPORT.html new file mode 100644 index 000000000000..aa50db3e80dc --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_AFNOSUPPORT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_AFNOSUPPORT - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_AFNOSUPPORT

pub const __WASI_ERRNO_AFNOSUPPORT: __wasi_errno_t = 5;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_AGAIN.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_AGAIN.html new file mode 100644 index 000000000000..518d7abb804d --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_AGAIN.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_AGAIN - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_AGAIN

pub const __WASI_ERRNO_AGAIN: __wasi_errno_t = 6;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_ALREADY.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_ALREADY.html new file mode 100644 index 000000000000..c1e8189cb6b0 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_ALREADY.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_ALREADY - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_ALREADY

pub const __WASI_ERRNO_ALREADY: __wasi_errno_t = 7;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_BADF.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_BADF.html new file mode 100644 index 000000000000..2f3135394daf --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_BADF.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_BADF - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_BADF

pub const __WASI_ERRNO_BADF: __wasi_errno_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_BADMSG.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_BADMSG.html new file mode 100644 index 000000000000..9469aff3326a --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_BADMSG.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_BADMSG - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_BADMSG

pub const __WASI_ERRNO_BADMSG: __wasi_errno_t = 9;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_BUSY.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_BUSY.html new file mode 100644 index 000000000000..0babae8837c3 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_BUSY.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_BUSY - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_BUSY

pub const __WASI_ERRNO_BUSY: __wasi_errno_t = 10;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_CANCELED.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_CANCELED.html new file mode 100644 index 000000000000..0e7b5db399f6 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_CANCELED.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_CANCELED - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_CANCELED

pub const __WASI_ERRNO_CANCELED: __wasi_errno_t = 11;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_CHILD.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_CHILD.html new file mode 100644 index 000000000000..fda1003e6f11 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_CHILD.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_CHILD - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_CHILD

pub const __WASI_ERRNO_CHILD: __wasi_errno_t = 12;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_CONNABORTED.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_CONNABORTED.html new file mode 100644 index 000000000000..57d014c470aa --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_CONNABORTED.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_CONNABORTED - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_CONNABORTED

pub const __WASI_ERRNO_CONNABORTED: __wasi_errno_t = 13;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_CONNREFUSED.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_CONNREFUSED.html new file mode 100644 index 000000000000..a468062f6330 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_CONNREFUSED.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_CONNREFUSED - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_CONNREFUSED

pub const __WASI_ERRNO_CONNREFUSED: __wasi_errno_t = 14;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_CONNRESET.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_CONNRESET.html new file mode 100644 index 000000000000..0c49f95f49fb --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_CONNRESET.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_CONNRESET - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_CONNRESET

pub const __WASI_ERRNO_CONNRESET: __wasi_errno_t = 15;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_DEADLK.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_DEADLK.html new file mode 100644 index 000000000000..258079a70915 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_DEADLK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_DEADLK - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_DEADLK

pub const __WASI_ERRNO_DEADLK: __wasi_errno_t = 16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_DESTADDRREQ.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_DESTADDRREQ.html new file mode 100644 index 000000000000..dbea70074092 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_DESTADDRREQ.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_DESTADDRREQ - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_DESTADDRREQ

pub const __WASI_ERRNO_DESTADDRREQ: __wasi_errno_t = 17;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_DOM.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_DOM.html new file mode 100644 index 000000000000..e1a80ccba3b9 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_DOM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_DOM - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_DOM

pub const __WASI_ERRNO_DOM: __wasi_errno_t = 18;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_DQUOT.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_DQUOT.html new file mode 100644 index 000000000000..709ac84b1317 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_DQUOT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_DQUOT - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_DQUOT

pub const __WASI_ERRNO_DQUOT: __wasi_errno_t = 19;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_EXIST.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_EXIST.html new file mode 100644 index 000000000000..2c391287133f --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_EXIST.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_EXIST - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_EXIST

pub const __WASI_ERRNO_EXIST: __wasi_errno_t = 20;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_FAULT.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_FAULT.html new file mode 100644 index 000000000000..fe89b5a00c31 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_FAULT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_FAULT - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_FAULT

pub const __WASI_ERRNO_FAULT: __wasi_errno_t = 21;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_FBIG.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_FBIG.html new file mode 100644 index 000000000000..8111f3dba578 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_FBIG.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_FBIG - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_FBIG

pub const __WASI_ERRNO_FBIG: __wasi_errno_t = 22;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_HOSTUNREACH.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_HOSTUNREACH.html new file mode 100644 index 000000000000..f8cb667c5c45 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_HOSTUNREACH.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_HOSTUNREACH - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_HOSTUNREACH

pub const __WASI_ERRNO_HOSTUNREACH: __wasi_errno_t = 23;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_IDRM.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_IDRM.html new file mode 100644 index 000000000000..2b436d19cd3a --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_IDRM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_IDRM - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_IDRM

pub const __WASI_ERRNO_IDRM: __wasi_errno_t = 24;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_ILSEQ.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_ILSEQ.html new file mode 100644 index 000000000000..d5d60c084cb3 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_ILSEQ.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_ILSEQ - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_ILSEQ

pub const __WASI_ERRNO_ILSEQ: __wasi_errno_t = 25;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_INPROGRESS.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_INPROGRESS.html new file mode 100644 index 000000000000..99fb43c36f50 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_INPROGRESS.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_INPROGRESS - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_INPROGRESS

pub const __WASI_ERRNO_INPROGRESS: __wasi_errno_t = 26;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_INTR.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_INTR.html new file mode 100644 index 000000000000..d993c2fa0e9e --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_INTR.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_INTR - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_INTR

pub const __WASI_ERRNO_INTR: __wasi_errno_t = 27;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_INVAL.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_INVAL.html new file mode 100644 index 000000000000..0bc4fc92029f --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_INVAL.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_INVAL - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_INVAL

pub const __WASI_ERRNO_INVAL: __wasi_errno_t = 28;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_IO.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_IO.html new file mode 100644 index 000000000000..a8e0a303052d --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_IO.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_IO - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_IO

pub const __WASI_ERRNO_IO: __wasi_errno_t = 29;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_ISCONN.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_ISCONN.html new file mode 100644 index 000000000000..4157812cdcbb --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_ISCONN.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_ISCONN - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_ISCONN

pub const __WASI_ERRNO_ISCONN: __wasi_errno_t = 30;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_ISDIR.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_ISDIR.html new file mode 100644 index 000000000000..3c5d011bbfdf --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_ISDIR.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_ISDIR - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_ISDIR

pub const __WASI_ERRNO_ISDIR: __wasi_errno_t = 31;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_LOOP.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_LOOP.html new file mode 100644 index 000000000000..63e364f3b191 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_LOOP.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_LOOP - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_LOOP

pub const __WASI_ERRNO_LOOP: __wasi_errno_t = 32;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_MFILE.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_MFILE.html new file mode 100644 index 000000000000..aab01ade8221 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_MFILE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_MFILE - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_MFILE

pub const __WASI_ERRNO_MFILE: __wasi_errno_t = 33;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_MLINK.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_MLINK.html new file mode 100644 index 000000000000..8bd26a746f59 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_MLINK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_MLINK - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_MLINK

pub const __WASI_ERRNO_MLINK: __wasi_errno_t = 34;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_MSGSIZE.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_MSGSIZE.html new file mode 100644 index 000000000000..907a7b642218 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_MSGSIZE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_MSGSIZE - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_MSGSIZE

pub const __WASI_ERRNO_MSGSIZE: __wasi_errno_t = 35;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_MULTIHOP.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_MULTIHOP.html new file mode 100644 index 000000000000..44c134248306 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_MULTIHOP.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_MULTIHOP - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_MULTIHOP

pub const __WASI_ERRNO_MULTIHOP: __wasi_errno_t = 36;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NAMETOOLONG.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NAMETOOLONG.html new file mode 100644 index 000000000000..f3a78d93c5d0 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NAMETOOLONG.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NAMETOOLONG - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NAMETOOLONG

pub const __WASI_ERRNO_NAMETOOLONG: __wasi_errno_t = 37;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NETDOWN.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NETDOWN.html new file mode 100644 index 000000000000..90b067612144 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NETDOWN.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NETDOWN - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NETDOWN

pub const __WASI_ERRNO_NETDOWN: __wasi_errno_t = 38;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NETRESET.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NETRESET.html new file mode 100644 index 000000000000..004d6be93f74 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NETRESET.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NETRESET - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NETRESET

pub const __WASI_ERRNO_NETRESET: __wasi_errno_t = 39;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NETUNREACH.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NETUNREACH.html new file mode 100644 index 000000000000..c9ad8523488d --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NETUNREACH.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NETUNREACH - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NETUNREACH

pub const __WASI_ERRNO_NETUNREACH: __wasi_errno_t = 40;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NFILE.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NFILE.html new file mode 100644 index 000000000000..9b6ae7aae4ce --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NFILE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NFILE - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NFILE

pub const __WASI_ERRNO_NFILE: __wasi_errno_t = 41;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOBUFS.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOBUFS.html new file mode 100644 index 000000000000..e4493108c558 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOBUFS.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOBUFS - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOBUFS

pub const __WASI_ERRNO_NOBUFS: __wasi_errno_t = 42;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NODEV.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NODEV.html new file mode 100644 index 000000000000..4106854453c0 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NODEV.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NODEV - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NODEV

pub const __WASI_ERRNO_NODEV: __wasi_errno_t = 43;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOENT.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOENT.html new file mode 100644 index 000000000000..d3fdbe2febac --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOENT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOENT - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOENT

pub const __WASI_ERRNO_NOENT: __wasi_errno_t = 44;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOEXEC.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOEXEC.html new file mode 100644 index 000000000000..dfc6dc6f8050 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOEXEC.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOEXEC - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOEXEC

pub const __WASI_ERRNO_NOEXEC: __wasi_errno_t = 45;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOLCK.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOLCK.html new file mode 100644 index 000000000000..b0205006201c --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOLCK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOLCK - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOLCK

pub const __WASI_ERRNO_NOLCK: __wasi_errno_t = 46;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOLINK.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOLINK.html new file mode 100644 index 000000000000..f73d2f42cb7e --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOLINK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOLINK - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOLINK

pub const __WASI_ERRNO_NOLINK: __wasi_errno_t = 47;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOMEM.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOMEM.html new file mode 100644 index 000000000000..0469ec298407 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOMEM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOMEM - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOMEM

pub const __WASI_ERRNO_NOMEM: __wasi_errno_t = 48;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOMSG.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOMSG.html new file mode 100644 index 000000000000..d145afeb106e --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOMSG.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOMSG - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOMSG

pub const __WASI_ERRNO_NOMSG: __wasi_errno_t = 49;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOPROTOOPT.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOPROTOOPT.html new file mode 100644 index 000000000000..438d1d091cde --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOPROTOOPT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOPROTOOPT - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOPROTOOPT

pub const __WASI_ERRNO_NOPROTOOPT: __wasi_errno_t = 50;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOSPC.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOSPC.html new file mode 100644 index 000000000000..67cffae4e2d0 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOSPC.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOSPC - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOSPC

pub const __WASI_ERRNO_NOSPC: __wasi_errno_t = 51;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOSYS.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOSYS.html new file mode 100644 index 000000000000..d79a1e57311c --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOSYS.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOSYS - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOSYS

pub const __WASI_ERRNO_NOSYS: __wasi_errno_t = 52;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTCAPABLE.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTCAPABLE.html new file mode 100644 index 000000000000..10dc5c36b5eb --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTCAPABLE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOTCAPABLE - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOTCAPABLE

pub const __WASI_ERRNO_NOTCAPABLE: __wasi_errno_t = 76;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTCONN.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTCONN.html new file mode 100644 index 000000000000..0fceee266b85 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTCONN.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOTCONN - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOTCONN

pub const __WASI_ERRNO_NOTCONN: __wasi_errno_t = 53;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTDIR.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTDIR.html new file mode 100644 index 000000000000..dfaccc102017 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTDIR.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOTDIR - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOTDIR

pub const __WASI_ERRNO_NOTDIR: __wasi_errno_t = 54;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTEMPTY.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTEMPTY.html new file mode 100644 index 000000000000..cff41c7e3249 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTEMPTY.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOTEMPTY - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOTEMPTY

pub const __WASI_ERRNO_NOTEMPTY: __wasi_errno_t = 55;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTRECOVERABLE.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTRECOVERABLE.html new file mode 100644 index 000000000000..04f380241da7 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTRECOVERABLE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOTRECOVERABLE - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOTRECOVERABLE

pub const __WASI_ERRNO_NOTRECOVERABLE: __wasi_errno_t = 56;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTSOCK.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTSOCK.html new file mode 100644 index 000000000000..eb3ca7d546f6 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTSOCK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOTSOCK - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOTSOCK

pub const __WASI_ERRNO_NOTSOCK: __wasi_errno_t = 57;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTSUP.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTSUP.html new file mode 100644 index 000000000000..153ed60a3001 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTSUP.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOTSUP - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOTSUP

pub const __WASI_ERRNO_NOTSUP: __wasi_errno_t = 58;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTTY.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTTY.html new file mode 100644 index 000000000000..f0a1f853b6d7 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NOTTY.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NOTTY - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NOTTY

pub const __WASI_ERRNO_NOTTY: __wasi_errno_t = 59;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_NXIO.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_NXIO.html new file mode 100644 index 000000000000..e6178953ce93 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_NXIO.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_NXIO - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_NXIO

pub const __WASI_ERRNO_NXIO: __wasi_errno_t = 60;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_OVERFLOW.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_OVERFLOW.html new file mode 100644 index 000000000000..122b8f71e453 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_OVERFLOW.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_OVERFLOW - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_OVERFLOW

pub const __WASI_ERRNO_OVERFLOW: __wasi_errno_t = 61;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_OWNERDEAD.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_OWNERDEAD.html new file mode 100644 index 000000000000..ae8dda35b3fd --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_OWNERDEAD.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_OWNERDEAD - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_OWNERDEAD

pub const __WASI_ERRNO_OWNERDEAD: __wasi_errno_t = 62;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_PERM.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_PERM.html new file mode 100644 index 000000000000..1016daacc85f --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_PERM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_PERM - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_PERM

pub const __WASI_ERRNO_PERM: __wasi_errno_t = 63;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_PIPE.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_PIPE.html new file mode 100644 index 000000000000..fd68077e24ba --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_PIPE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_PIPE - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_PIPE

pub const __WASI_ERRNO_PIPE: __wasi_errno_t = 64;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_PROTO.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_PROTO.html new file mode 100644 index 000000000000..1565e687d88e --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_PROTO.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_PROTO - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_PROTO

pub const __WASI_ERRNO_PROTO: __wasi_errno_t = 65;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_PROTONOSUPPORT.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_PROTONOSUPPORT.html new file mode 100644 index 000000000000..fe867c6cce46 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_PROTONOSUPPORT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_PROTONOSUPPORT - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_PROTONOSUPPORT

pub const __WASI_ERRNO_PROTONOSUPPORT: __wasi_errno_t = 66;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_PROTOTYPE.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_PROTOTYPE.html new file mode 100644 index 000000000000..8865e60a8d59 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_PROTOTYPE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_PROTOTYPE - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_PROTOTYPE

pub const __WASI_ERRNO_PROTOTYPE: __wasi_errno_t = 67;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_RANGE.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_RANGE.html new file mode 100644 index 000000000000..f6baa346fdeb --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_RANGE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_RANGE - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_RANGE

pub const __WASI_ERRNO_RANGE: __wasi_errno_t = 68;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_ROFS.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_ROFS.html new file mode 100644 index 000000000000..bd1b29051c1d --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_ROFS.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_ROFS - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_ROFS

pub const __WASI_ERRNO_ROFS: __wasi_errno_t = 69;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_SPIPE.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_SPIPE.html new file mode 100644 index 000000000000..a810820306b3 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_SPIPE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_SPIPE - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_SPIPE

pub const __WASI_ERRNO_SPIPE: __wasi_errno_t = 70;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_SRCH.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_SRCH.html new file mode 100644 index 000000000000..875417d7f901 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_SRCH.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_SRCH - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_SRCH

pub const __WASI_ERRNO_SRCH: __wasi_errno_t = 71;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_STALE.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_STALE.html new file mode 100644 index 000000000000..59a1764dd9c8 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_STALE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_STALE - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_STALE

pub const __WASI_ERRNO_STALE: __wasi_errno_t = 72;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_SUCCESS.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_SUCCESS.html new file mode 100644 index 000000000000..ffd9d869eccf --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_SUCCESS.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_SUCCESS - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_SUCCESS

pub const __WASI_ERRNO_SUCCESS: __wasi_errno_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_TIMEDOUT.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_TIMEDOUT.html new file mode 100644 index 000000000000..33d846696912 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_TIMEDOUT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_TIMEDOUT - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_TIMEDOUT

pub const __WASI_ERRNO_TIMEDOUT: __wasi_errno_t = 73;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_TXTBSY.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_TXTBSY.html new file mode 100644 index 000000000000..1f915565b48e --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_TXTBSY.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_TXTBSY - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_TXTBSY

pub const __WASI_ERRNO_TXTBSY: __wasi_errno_t = 74;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ERRNO_XDEV.html b/api/wasi_common/wasi/constant.__WASI_ERRNO_XDEV.html new file mode 100644 index 000000000000..47cf5e37e4ea --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ERRNO_XDEV.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ERRNO_XDEV - Rust

[][src]Constant wasi_common::wasi::__WASI_ERRNO_XDEV

pub const __WASI_ERRNO_XDEV: __wasi_errno_t = 75;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP.html b/api/wasi_common/wasi/constant.__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP.html new file mode 100644 index 000000000000..03b4609b6682 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP - Rust

[][src]Constant wasi_common::wasi::__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP

pub const __WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP: __wasi_eventrwflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_EVENTTYPE_CLOCK.html b/api/wasi_common/wasi/constant.__WASI_EVENTTYPE_CLOCK.html new file mode 100644 index 000000000000..28f172441c51 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_EVENTTYPE_CLOCK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_EVENTTYPE_CLOCK - Rust

[][src]Constant wasi_common::wasi::__WASI_EVENTTYPE_CLOCK

pub const __WASI_EVENTTYPE_CLOCK: __wasi_eventtype_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_EVENTTYPE_FD_READ.html b/api/wasi_common/wasi/constant.__WASI_EVENTTYPE_FD_READ.html new file mode 100644 index 000000000000..909e3f770d7f --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_EVENTTYPE_FD_READ.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_EVENTTYPE_FD_READ - Rust

[][src]Constant wasi_common::wasi::__WASI_EVENTTYPE_FD_READ

pub const __WASI_EVENTTYPE_FD_READ: __wasi_eventtype_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_EVENTTYPE_FD_WRITE.html b/api/wasi_common/wasi/constant.__WASI_EVENTTYPE_FD_WRITE.html new file mode 100644 index 000000000000..0e0953a518e1 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_EVENTTYPE_FD_WRITE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_EVENTTYPE_FD_WRITE - Rust

[][src]Constant wasi_common::wasi::__WASI_EVENTTYPE_FD_WRITE

pub const __WASI_EVENTTYPE_FD_WRITE: __wasi_eventtype_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FDFLAGS_APPEND.html b/api/wasi_common/wasi/constant.__WASI_FDFLAGS_APPEND.html new file mode 100644 index 000000000000..77a171c4aa81 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FDFLAGS_APPEND.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FDFLAGS_APPEND - Rust

[][src]Constant wasi_common::wasi::__WASI_FDFLAGS_APPEND

pub const __WASI_FDFLAGS_APPEND: __wasi_fdflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FDFLAGS_DSYNC.html b/api/wasi_common/wasi/constant.__WASI_FDFLAGS_DSYNC.html new file mode 100644 index 000000000000..02551637d91c --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FDFLAGS_DSYNC.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FDFLAGS_DSYNC - Rust

[][src]Constant wasi_common::wasi::__WASI_FDFLAGS_DSYNC

pub const __WASI_FDFLAGS_DSYNC: __wasi_fdflags_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FDFLAGS_NONBLOCK.html b/api/wasi_common/wasi/constant.__WASI_FDFLAGS_NONBLOCK.html new file mode 100644 index 000000000000..2d3b873c6cbb --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FDFLAGS_NONBLOCK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FDFLAGS_NONBLOCK - Rust

[][src]Constant wasi_common::wasi::__WASI_FDFLAGS_NONBLOCK

pub const __WASI_FDFLAGS_NONBLOCK: __wasi_fdflags_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FDFLAGS_RSYNC.html b/api/wasi_common/wasi/constant.__WASI_FDFLAGS_RSYNC.html new file mode 100644 index 000000000000..5b897cb554c1 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FDFLAGS_RSYNC.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FDFLAGS_RSYNC - Rust

[][src]Constant wasi_common::wasi::__WASI_FDFLAGS_RSYNC

pub const __WASI_FDFLAGS_RSYNC: __wasi_fdflags_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FDFLAGS_SYNC.html b/api/wasi_common/wasi/constant.__WASI_FDFLAGS_SYNC.html new file mode 100644 index 000000000000..3fb1f5518da8 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FDFLAGS_SYNC.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FDFLAGS_SYNC - Rust

[][src]Constant wasi_common::wasi::__WASI_FDFLAGS_SYNC

pub const __WASI_FDFLAGS_SYNC: __wasi_fdflags_t = 16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FILETYPE_BLOCK_DEVICE.html b/api/wasi_common/wasi/constant.__WASI_FILETYPE_BLOCK_DEVICE.html new file mode 100644 index 000000000000..965f68c379f9 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FILETYPE_BLOCK_DEVICE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FILETYPE_BLOCK_DEVICE - Rust

[][src]Constant wasi_common::wasi::__WASI_FILETYPE_BLOCK_DEVICE

pub const __WASI_FILETYPE_BLOCK_DEVICE: __wasi_filetype_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FILETYPE_CHARACTER_DEVICE.html b/api/wasi_common/wasi/constant.__WASI_FILETYPE_CHARACTER_DEVICE.html new file mode 100644 index 000000000000..39ba2cf0bbe1 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FILETYPE_CHARACTER_DEVICE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FILETYPE_CHARACTER_DEVICE - Rust

[][src]Constant wasi_common::wasi::__WASI_FILETYPE_CHARACTER_DEVICE

pub const __WASI_FILETYPE_CHARACTER_DEVICE: __wasi_filetype_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FILETYPE_DIRECTORY.html b/api/wasi_common/wasi/constant.__WASI_FILETYPE_DIRECTORY.html new file mode 100644 index 000000000000..a685c4f3d142 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FILETYPE_DIRECTORY.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FILETYPE_DIRECTORY - Rust

[][src]Constant wasi_common::wasi::__WASI_FILETYPE_DIRECTORY

pub const __WASI_FILETYPE_DIRECTORY: __wasi_filetype_t = 3;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FILETYPE_REGULAR_FILE.html b/api/wasi_common/wasi/constant.__WASI_FILETYPE_REGULAR_FILE.html new file mode 100644 index 000000000000..8c71b786a085 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FILETYPE_REGULAR_FILE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FILETYPE_REGULAR_FILE - Rust

[][src]Constant wasi_common::wasi::__WASI_FILETYPE_REGULAR_FILE

pub const __WASI_FILETYPE_REGULAR_FILE: __wasi_filetype_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FILETYPE_SOCKET_DGRAM.html b/api/wasi_common/wasi/constant.__WASI_FILETYPE_SOCKET_DGRAM.html new file mode 100644 index 000000000000..13481353a64a --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FILETYPE_SOCKET_DGRAM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FILETYPE_SOCKET_DGRAM - Rust

[][src]Constant wasi_common::wasi::__WASI_FILETYPE_SOCKET_DGRAM

pub const __WASI_FILETYPE_SOCKET_DGRAM: __wasi_filetype_t = 5;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FILETYPE_SOCKET_STREAM.html b/api/wasi_common/wasi/constant.__WASI_FILETYPE_SOCKET_STREAM.html new file mode 100644 index 000000000000..469f7dd093c2 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FILETYPE_SOCKET_STREAM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FILETYPE_SOCKET_STREAM - Rust

[][src]Constant wasi_common::wasi::__WASI_FILETYPE_SOCKET_STREAM

pub const __WASI_FILETYPE_SOCKET_STREAM: __wasi_filetype_t = 6;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FILETYPE_SYMBOLIC_LINK.html b/api/wasi_common/wasi/constant.__WASI_FILETYPE_SYMBOLIC_LINK.html new file mode 100644 index 000000000000..460e4e869e3a --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FILETYPE_SYMBOLIC_LINK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FILETYPE_SYMBOLIC_LINK - Rust

[][src]Constant wasi_common::wasi::__WASI_FILETYPE_SYMBOLIC_LINK

pub const __WASI_FILETYPE_SYMBOLIC_LINK: __wasi_filetype_t = 7;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FILETYPE_UNKNOWN.html b/api/wasi_common/wasi/constant.__WASI_FILETYPE_UNKNOWN.html new file mode 100644 index 000000000000..26e9772e3f49 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FILETYPE_UNKNOWN.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FILETYPE_UNKNOWN - Rust

[][src]Constant wasi_common::wasi::__WASI_FILETYPE_UNKNOWN

pub const __WASI_FILETYPE_UNKNOWN: __wasi_filetype_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_ATIM.html b/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_ATIM.html new file mode 100644 index 000000000000..c817d299e1b6 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_ATIM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FSTFLAGS_ATIM - Rust

[][src]Constant wasi_common::wasi::__WASI_FSTFLAGS_ATIM

pub const __WASI_FSTFLAGS_ATIM: __wasi_fstflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_ATIM_NOW.html b/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_ATIM_NOW.html new file mode 100644 index 000000000000..dc98ff7b35c9 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_ATIM_NOW.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FSTFLAGS_ATIM_NOW - Rust

[][src]Constant wasi_common::wasi::__WASI_FSTFLAGS_ATIM_NOW

pub const __WASI_FSTFLAGS_ATIM_NOW: __wasi_fstflags_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_MTIM.html b/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_MTIM.html new file mode 100644 index 000000000000..0cc5049be32c --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_MTIM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FSTFLAGS_MTIM - Rust

[][src]Constant wasi_common::wasi::__WASI_FSTFLAGS_MTIM

pub const __WASI_FSTFLAGS_MTIM: __wasi_fstflags_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_MTIM_NOW.html b/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_MTIM_NOW.html new file mode 100644 index 000000000000..5dc3d8b48ff3 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_FSTFLAGS_MTIM_NOW.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_FSTFLAGS_MTIM_NOW - Rust

[][src]Constant wasi_common::wasi::__WASI_FSTFLAGS_MTIM_NOW

pub const __WASI_FSTFLAGS_MTIM_NOW: __wasi_fstflags_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW.html b/api/wasi_common/wasi/constant.__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW.html new file mode 100644 index 000000000000..e4a5e5e5defb --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW - Rust

[][src]Constant wasi_common::wasi::__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW

pub const __WASI_LOOKUPFLAGS_SYMLINK_FOLLOW: __wasi_lookupflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_OFLAGS_CREAT.html b/api/wasi_common/wasi/constant.__WASI_OFLAGS_CREAT.html new file mode 100644 index 000000000000..80080d83270b --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_OFLAGS_CREAT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_OFLAGS_CREAT - Rust

[][src]Constant wasi_common::wasi::__WASI_OFLAGS_CREAT

pub const __WASI_OFLAGS_CREAT: __wasi_oflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_OFLAGS_DIRECTORY.html b/api/wasi_common/wasi/constant.__WASI_OFLAGS_DIRECTORY.html new file mode 100644 index 000000000000..261aa2750c29 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_OFLAGS_DIRECTORY.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_OFLAGS_DIRECTORY - Rust

[][src]Constant wasi_common::wasi::__WASI_OFLAGS_DIRECTORY

pub const __WASI_OFLAGS_DIRECTORY: __wasi_oflags_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_OFLAGS_EXCL.html b/api/wasi_common/wasi/constant.__WASI_OFLAGS_EXCL.html new file mode 100644 index 000000000000..6817b7641a0a --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_OFLAGS_EXCL.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_OFLAGS_EXCL - Rust

[][src]Constant wasi_common::wasi::__WASI_OFLAGS_EXCL

pub const __WASI_OFLAGS_EXCL: __wasi_oflags_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_OFLAGS_TRUNC.html b/api/wasi_common/wasi/constant.__WASI_OFLAGS_TRUNC.html new file mode 100644 index 000000000000..7963fc75bb81 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_OFLAGS_TRUNC.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_OFLAGS_TRUNC - Rust

[][src]Constant wasi_common::wasi::__WASI_OFLAGS_TRUNC

pub const __WASI_OFLAGS_TRUNC: __wasi_oflags_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_PREOPENTYPE_DIR.html b/api/wasi_common/wasi/constant.__WASI_PREOPENTYPE_DIR.html new file mode 100644 index 000000000000..76aa118a7280 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_PREOPENTYPE_DIR.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_PREOPENTYPE_DIR - Rust

[][src]Constant wasi_common::wasi::__WASI_PREOPENTYPE_DIR

pub const __WASI_PREOPENTYPE_DIR: __wasi_preopentype_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIFLAGS_RECV_PEEK.html b/api/wasi_common/wasi/constant.__WASI_RIFLAGS_RECV_PEEK.html new file mode 100644 index 000000000000..4fa015dd573e --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIFLAGS_RECV_PEEK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIFLAGS_RECV_PEEK - Rust

[][src]Constant wasi_common::wasi::__WASI_RIFLAGS_RECV_PEEK

pub const __WASI_RIFLAGS_RECV_PEEK: __wasi_riflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIFLAGS_RECV_WAITALL.html b/api/wasi_common/wasi/constant.__WASI_RIFLAGS_RECV_WAITALL.html new file mode 100644 index 000000000000..2c51251b52a9 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIFLAGS_RECV_WAITALL.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIFLAGS_RECV_WAITALL - Rust

[][src]Constant wasi_common::wasi::__WASI_RIFLAGS_RECV_WAITALL

pub const __WASI_RIFLAGS_RECV_WAITALL: __wasi_riflags_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_ADVISE.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_ADVISE.html new file mode 100644 index 000000000000..5eb53b4c0d58 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_ADVISE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_ADVISE - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_ADVISE

pub const __WASI_RIGHTS_FD_ADVISE: __wasi_rights_t = 128;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_ALLOCATE.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_ALLOCATE.html new file mode 100644 index 000000000000..37d82e8b6114 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_ALLOCATE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_ALLOCATE - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_ALLOCATE

pub const __WASI_RIGHTS_FD_ALLOCATE: __wasi_rights_t = 256;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_DATASYNC.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_DATASYNC.html new file mode 100644 index 000000000000..bf3eea963046 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_DATASYNC.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_DATASYNC - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_DATASYNC

pub const __WASI_RIGHTS_FD_DATASYNC: __wasi_rights_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS.html new file mode 100644 index 000000000000..f04ea36b24d4 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS

pub const __WASI_RIGHTS_FD_FDSTAT_SET_FLAGS: __wasi_rights_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_GET.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_GET.html new file mode 100644 index 000000000000..9903259ea6b6 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_GET.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_FILESTAT_GET - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_FILESTAT_GET

pub const __WASI_RIGHTS_FD_FILESTAT_GET: __wasi_rights_t = 2097152;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_SIZE.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_SIZE.html new file mode 100644 index 000000000000..52d3a4718fab --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_SIZE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_FILESTAT_SET_SIZE - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_FILESTAT_SET_SIZE

pub const __WASI_RIGHTS_FD_FILESTAT_SET_SIZE: __wasi_rights_t = 4194304;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_TIMES.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_TIMES.html new file mode 100644 index 000000000000..eb152e569b4a --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_FILESTAT_SET_TIMES.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_FILESTAT_SET_TIMES - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_FILESTAT_SET_TIMES

pub const __WASI_RIGHTS_FD_FILESTAT_SET_TIMES: __wasi_rights_t = 8388608;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_READ.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_READ.html new file mode 100644 index 000000000000..2720f19ea92f --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_READ.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_READ - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_READ

pub const __WASI_RIGHTS_FD_READ: __wasi_rights_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_READDIR.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_READDIR.html new file mode 100644 index 000000000000..406bceae59d9 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_READDIR.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_READDIR - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_READDIR

pub const __WASI_RIGHTS_FD_READDIR: __wasi_rights_t = 16384;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_SEEK.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_SEEK.html new file mode 100644 index 000000000000..c2aa73495af2 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_SEEK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_SEEK - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_SEEK

pub const __WASI_RIGHTS_FD_SEEK: __wasi_rights_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_SYNC.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_SYNC.html new file mode 100644 index 000000000000..8f6dd2af34d1 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_SYNC.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_SYNC - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_SYNC

pub const __WASI_RIGHTS_FD_SYNC: __wasi_rights_t = 16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_TELL.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_TELL.html new file mode 100644 index 000000000000..2398c9679ccf --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_TELL.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_TELL - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_TELL

pub const __WASI_RIGHTS_FD_TELL: __wasi_rights_t = 32;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_WRITE.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_WRITE.html new file mode 100644 index 000000000000..63260ddd1349 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_FD_WRITE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_FD_WRITE - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_FD_WRITE

pub const __WASI_RIGHTS_FD_WRITE: __wasi_rights_t = 64;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_CREATE_DIRECTORY.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_CREATE_DIRECTORY.html new file mode 100644 index 000000000000..c61fcbe03859 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_CREATE_DIRECTORY.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_CREATE_DIRECTORY - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_CREATE_DIRECTORY

pub const __WASI_RIGHTS_PATH_CREATE_DIRECTORY: __wasi_rights_t = 512;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_CREATE_FILE.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_CREATE_FILE.html new file mode 100644 index 000000000000..63ec333b1269 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_CREATE_FILE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_CREATE_FILE - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_CREATE_FILE

pub const __WASI_RIGHTS_PATH_CREATE_FILE: __wasi_rights_t = 1024;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_GET.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_GET.html new file mode 100644 index 000000000000..e5abc024d217 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_GET.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_FILESTAT_GET - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_FILESTAT_GET

pub const __WASI_RIGHTS_PATH_FILESTAT_GET: __wasi_rights_t = 262144;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE.html new file mode 100644 index 000000000000..3a3b159fad5e --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE

pub const __WASI_RIGHTS_PATH_FILESTAT_SET_SIZE: __wasi_rights_t = 524288;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES.html new file mode 100644 index 000000000000..2d1c78180ec3 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES

pub const __WASI_RIGHTS_PATH_FILESTAT_SET_TIMES: __wasi_rights_t = 1048576;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_LINK_SOURCE.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_LINK_SOURCE.html new file mode 100644 index 000000000000..c733afa87693 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_LINK_SOURCE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_LINK_SOURCE - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_LINK_SOURCE

pub const __WASI_RIGHTS_PATH_LINK_SOURCE: __wasi_rights_t = 2048;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_LINK_TARGET.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_LINK_TARGET.html new file mode 100644 index 000000000000..93cfa6bda56e --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_LINK_TARGET.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_LINK_TARGET - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_LINK_TARGET

pub const __WASI_RIGHTS_PATH_LINK_TARGET: __wasi_rights_t = 4096;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_OPEN.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_OPEN.html new file mode 100644 index 000000000000..458fc816f0ac --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_OPEN.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_OPEN - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_OPEN

pub const __WASI_RIGHTS_PATH_OPEN: __wasi_rights_t = 8192;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_READLINK.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_READLINK.html new file mode 100644 index 000000000000..eaf252e0ab18 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_READLINK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_READLINK - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_READLINK

pub const __WASI_RIGHTS_PATH_READLINK: __wasi_rights_t = 32768;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_REMOVE_DIRECTORY.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_REMOVE_DIRECTORY.html new file mode 100644 index 000000000000..c2cd177e52bb --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_REMOVE_DIRECTORY.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_REMOVE_DIRECTORY - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_REMOVE_DIRECTORY

pub const __WASI_RIGHTS_PATH_REMOVE_DIRECTORY: __wasi_rights_t = 33554432;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_RENAME_SOURCE.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_RENAME_SOURCE.html new file mode 100644 index 000000000000..04565d0f5789 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_RENAME_SOURCE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_RENAME_SOURCE - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_RENAME_SOURCE

pub const __WASI_RIGHTS_PATH_RENAME_SOURCE: __wasi_rights_t = 65536;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_RENAME_TARGET.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_RENAME_TARGET.html new file mode 100644 index 000000000000..60f63f3eb53c --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_RENAME_TARGET.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_RENAME_TARGET - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_RENAME_TARGET

pub const __WASI_RIGHTS_PATH_RENAME_TARGET: __wasi_rights_t = 131072;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_SYMLINK.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_SYMLINK.html new file mode 100644 index 000000000000..13148dff8d04 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_SYMLINK.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_SYMLINK - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_SYMLINK

pub const __WASI_RIGHTS_PATH_SYMLINK: __wasi_rights_t = 16777216;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_UNLINK_FILE.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_UNLINK_FILE.html new file mode 100644 index 000000000000..47b31311bc98 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_PATH_UNLINK_FILE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_PATH_UNLINK_FILE - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_PATH_UNLINK_FILE

pub const __WASI_RIGHTS_PATH_UNLINK_FILE: __wasi_rights_t = 67108864;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_POLL_FD_READWRITE.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_POLL_FD_READWRITE.html new file mode 100644 index 000000000000..c59f900b9d1a --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_POLL_FD_READWRITE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_POLL_FD_READWRITE - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_POLL_FD_READWRITE

pub const __WASI_RIGHTS_POLL_FD_READWRITE: __wasi_rights_t = 134217728;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_RIGHTS_SOCK_SHUTDOWN.html b/api/wasi_common/wasi/constant.__WASI_RIGHTS_SOCK_SHUTDOWN.html new file mode 100644 index 000000000000..66689595d58d --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_RIGHTS_SOCK_SHUTDOWN.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_RIGHTS_SOCK_SHUTDOWN - Rust

[][src]Constant wasi_common::wasi::__WASI_RIGHTS_SOCK_SHUTDOWN

pub const __WASI_RIGHTS_SOCK_SHUTDOWN: __wasi_rights_t = 268435456;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_ROFLAGS_RECV_DATA_TRUNCATED.html b/api/wasi_common/wasi/constant.__WASI_ROFLAGS_RECV_DATA_TRUNCATED.html new file mode 100644 index 000000000000..c51fb874d4ad --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_ROFLAGS_RECV_DATA_TRUNCATED.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_ROFLAGS_RECV_DATA_TRUNCATED - Rust

[][src]Constant wasi_common::wasi::__WASI_ROFLAGS_RECV_DATA_TRUNCATED

pub const __WASI_ROFLAGS_RECV_DATA_TRUNCATED: __wasi_roflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SDFLAGS_RD.html b/api/wasi_common/wasi/constant.__WASI_SDFLAGS_RD.html new file mode 100644 index 000000000000..caea711e582c --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SDFLAGS_RD.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SDFLAGS_RD - Rust

[][src]Constant wasi_common::wasi::__WASI_SDFLAGS_RD

pub const __WASI_SDFLAGS_RD: __wasi_sdflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SDFLAGS_WR.html b/api/wasi_common/wasi/constant.__WASI_SDFLAGS_WR.html new file mode 100644 index 000000000000..126dc2267cdd --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SDFLAGS_WR.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SDFLAGS_WR - Rust

[][src]Constant wasi_common::wasi::__WASI_SDFLAGS_WR

pub const __WASI_SDFLAGS_WR: __wasi_sdflags_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_ABRT.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_ABRT.html new file mode 100644 index 000000000000..7151e3d43912 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_ABRT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_ABRT - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_ABRT

pub const __WASI_SIGNAL_ABRT: __wasi_signal_t = 6;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_ALRM.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_ALRM.html new file mode 100644 index 000000000000..b05bf41da894 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_ALRM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_ALRM - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_ALRM

pub const __WASI_SIGNAL_ALRM: __wasi_signal_t = 14;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_BUS.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_BUS.html new file mode 100644 index 000000000000..f58698067ff1 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_BUS.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_BUS - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_BUS

pub const __WASI_SIGNAL_BUS: __wasi_signal_t = 7;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_CHLD.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_CHLD.html new file mode 100644 index 000000000000..38d81a8671d2 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_CHLD.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_CHLD - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_CHLD

pub const __WASI_SIGNAL_CHLD: __wasi_signal_t = 16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_CONT.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_CONT.html new file mode 100644 index 000000000000..18f7c8ef6099 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_CONT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_CONT - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_CONT

pub const __WASI_SIGNAL_CONT: __wasi_signal_t = 17;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_FPE.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_FPE.html new file mode 100644 index 000000000000..ac4b2540acc8 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_FPE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_FPE - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_FPE

pub const __WASI_SIGNAL_FPE: __wasi_signal_t = 8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_HUP.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_HUP.html new file mode 100644 index 000000000000..ef8b8534a52b --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_HUP.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_HUP - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_HUP

pub const __WASI_SIGNAL_HUP: __wasi_signal_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_ILL.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_ILL.html new file mode 100644 index 000000000000..097667cb23ec --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_ILL.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_ILL - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_ILL

pub const __WASI_SIGNAL_ILL: __wasi_signal_t = 4;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_INT.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_INT.html new file mode 100644 index 000000000000..4cc9df443fb3 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_INT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_INT - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_INT

pub const __WASI_SIGNAL_INT: __wasi_signal_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_KILL.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_KILL.html new file mode 100644 index 000000000000..5d14a066401d --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_KILL.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_KILL - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_KILL

pub const __WASI_SIGNAL_KILL: __wasi_signal_t = 9;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_NONE.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_NONE.html new file mode 100644 index 000000000000..a646c71638f9 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_NONE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_NONE - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_NONE

pub const __WASI_SIGNAL_NONE: __wasi_signal_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_PIPE.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_PIPE.html new file mode 100644 index 000000000000..21eba80b93a7 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_PIPE.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_PIPE - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_PIPE

pub const __WASI_SIGNAL_PIPE: __wasi_signal_t = 13;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_POLL.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_POLL.html new file mode 100644 index 000000000000..206241168aef --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_POLL.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_POLL - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_POLL

pub const __WASI_SIGNAL_POLL: __wasi_signal_t = 28;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_PROF.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_PROF.html new file mode 100644 index 000000000000..a5d34586fe6a --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_PROF.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_PROF - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_PROF

pub const __WASI_SIGNAL_PROF: __wasi_signal_t = 26;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_PWR.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_PWR.html new file mode 100644 index 000000000000..357b4198a6e7 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_PWR.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_PWR - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_PWR

pub const __WASI_SIGNAL_PWR: __wasi_signal_t = 29;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_QUIT.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_QUIT.html new file mode 100644 index 000000000000..3bf61989780c --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_QUIT.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_QUIT - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_QUIT

pub const __WASI_SIGNAL_QUIT: __wasi_signal_t = 3;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_SEGV.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_SEGV.html new file mode 100644 index 000000000000..2f1ea1c04b60 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_SEGV.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_SEGV - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_SEGV

pub const __WASI_SIGNAL_SEGV: __wasi_signal_t = 11;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_STOP.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_STOP.html new file mode 100644 index 000000000000..5107b3e14396 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_STOP.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_STOP - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_STOP

pub const __WASI_SIGNAL_STOP: __wasi_signal_t = 18;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_SYS.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_SYS.html new file mode 100644 index 000000000000..91a3bb862c94 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_SYS.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_SYS - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_SYS

pub const __WASI_SIGNAL_SYS: __wasi_signal_t = 30;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_TERM.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_TERM.html new file mode 100644 index 000000000000..b20ae380abcb --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_TERM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_TERM - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_TERM

pub const __WASI_SIGNAL_TERM: __wasi_signal_t = 15;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_TRAP.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_TRAP.html new file mode 100644 index 000000000000..016c9aa8af8a --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_TRAP.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_TRAP - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_TRAP

pub const __WASI_SIGNAL_TRAP: __wasi_signal_t = 5;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_TSTP.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_TSTP.html new file mode 100644 index 000000000000..3128c4bdaed8 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_TSTP.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_TSTP - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_TSTP

pub const __WASI_SIGNAL_TSTP: __wasi_signal_t = 19;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_TTIN.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_TTIN.html new file mode 100644 index 000000000000..531ca2e377c1 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_TTIN.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_TTIN - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_TTIN

pub const __WASI_SIGNAL_TTIN: __wasi_signal_t = 20;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_TTOU.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_TTOU.html new file mode 100644 index 000000000000..d8ac08740cb3 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_TTOU.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_TTOU - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_TTOU

pub const __WASI_SIGNAL_TTOU: __wasi_signal_t = 21;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_URG.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_URG.html new file mode 100644 index 000000000000..a0ba7e7cab1f --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_URG.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_URG - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_URG

pub const __WASI_SIGNAL_URG: __wasi_signal_t = 22;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_USR1.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_USR1.html new file mode 100644 index 000000000000..c9662d0c7acb --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_USR1.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_USR1 - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_USR1

pub const __WASI_SIGNAL_USR1: __wasi_signal_t = 10;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_USR2.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_USR2.html new file mode 100644 index 000000000000..faf538b5a502 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_USR2.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_USR2 - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_USR2

pub const __WASI_SIGNAL_USR2: __wasi_signal_t = 12;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_VTALRM.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_VTALRM.html new file mode 100644 index 000000000000..eccb0489636c --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_VTALRM.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_VTALRM - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_VTALRM

pub const __WASI_SIGNAL_VTALRM: __wasi_signal_t = 25;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_WINCH.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_WINCH.html new file mode 100644 index 000000000000..653959f48b67 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_WINCH.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_WINCH - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_WINCH

pub const __WASI_SIGNAL_WINCH: __wasi_signal_t = 27;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_XCPU.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_XCPU.html new file mode 100644 index 000000000000..05d324c0ef30 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_XCPU.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_XCPU - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_XCPU

pub const __WASI_SIGNAL_XCPU: __wasi_signal_t = 23;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SIGNAL_XFSZ.html b/api/wasi_common/wasi/constant.__WASI_SIGNAL_XFSZ.html new file mode 100644 index 000000000000..b6428fa7c12f --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SIGNAL_XFSZ.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SIGNAL_XFSZ - Rust

[][src]Constant wasi_common::wasi::__WASI_SIGNAL_XFSZ

pub const __WASI_SIGNAL_XFSZ: __wasi_signal_t = 24;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME.html b/api/wasi_common/wasi/constant.__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME.html new file mode 100644 index 000000000000..9ba8db3e13aa --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME - Rust

[][src]Constant wasi_common::wasi::__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME

pub const __WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME: __wasi_subclockflags_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_WHENCE_CUR.html b/api/wasi_common/wasi/constant.__WASI_WHENCE_CUR.html new file mode 100644 index 000000000000..0951e27f057f --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_WHENCE_CUR.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_WHENCE_CUR - Rust

[][src]Constant wasi_common::wasi::__WASI_WHENCE_CUR

pub const __WASI_WHENCE_CUR: __wasi_whence_t = 1;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_WHENCE_END.html b/api/wasi_common/wasi/constant.__WASI_WHENCE_END.html new file mode 100644 index 000000000000..5bb19741affb --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_WHENCE_END.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_WHENCE_END - Rust

[][src]Constant wasi_common::wasi::__WASI_WHENCE_END

pub const __WASI_WHENCE_END: __wasi_whence_t = 2;
\ No newline at end of file diff --git a/api/wasi_common/wasi/constant.__WASI_WHENCE_SET.html b/api/wasi_common/wasi/constant.__WASI_WHENCE_SET.html new file mode 100644 index 000000000000..c7a6bc5e20d1 --- /dev/null +++ b/api/wasi_common/wasi/constant.__WASI_WHENCE_SET.html @@ -0,0 +1 @@ +wasi_common::wasi::__WASI_WHENCE_SET - Rust

[][src]Constant wasi_common::wasi::__WASI_WHENCE_SET

pub const __WASI_WHENCE_SET: __wasi_whence_t = 0;
\ No newline at end of file diff --git a/api/wasi_common/wasi/fn.strerror.html b/api/wasi_common/wasi/fn.strerror.html new file mode 100644 index 000000000000..13354a9f0656 --- /dev/null +++ b/api/wasi_common/wasi/fn.strerror.html @@ -0,0 +1 @@ +wasi_common::wasi::strerror - Rust

[][src]Function wasi_common::wasi::strerror

pub fn strerror(errno: __wasi_errno_t) -> &'static str
\ No newline at end of file diff --git a/api/wasi_common/wasi/fn.whence_to_str.html b/api/wasi_common/wasi/fn.whence_to_str.html new file mode 100644 index 000000000000..1dd332472e9c --- /dev/null +++ b/api/wasi_common/wasi/fn.whence_to_str.html @@ -0,0 +1 @@ +wasi_common::wasi::whence_to_str - Rust

[][src]Function wasi_common::wasi::whence_to_str

pub fn whence_to_str(whence: __wasi_whence_t) -> &'static str
\ No newline at end of file diff --git a/api/wasi_common/wasi/index.html b/api/wasi_common/wasi/index.html new file mode 100644 index 000000000000..be80cbb08121 --- /dev/null +++ b/api/wasi_common/wasi/index.html @@ -0,0 +1,9 @@ +wasi_common::wasi - Rust

[][src]Module wasi_common::wasi

Types and constants shared between 32-bit and 64-bit wasi. Types involving +pointer or usize-sized data are excluded here, so this file only contains +fixed-size types, so it's host/target independent.

+

Structs

+
__wasi_dirent_t
__wasi_event_fd_readwrite_t
__wasi_event_t
__wasi_fdstat_t
__wasi_filestat_t
__wasi_subscription_clock_t
__wasi_subscription_fd_readwrite_t
__wasi_subscription_t

Constants

+
__WASI_ADVICE_DONTNEED
__WASI_ADVICE_NOREUSE
__WASI_ADVICE_NORMAL
__WASI_ADVICE_RANDOM
__WASI_ADVICE_SEQUENTIAL
__WASI_ADVICE_WILLNEED
__WASI_CLOCKID_MONOTONIC
__WASI_CLOCKID_PROCESS_CPUTIME_ID
__WASI_CLOCKID_REALTIME
__WASI_CLOCKID_THREAD_CPUTIME_ID
__WASI_DIRCOOKIE_START
__WASI_ERRNO_2BIG
__WASI_ERRNO_ACCES
__WASI_ERRNO_ADDRINUSE
__WASI_ERRNO_ADDRNOTAVAIL
__WASI_ERRNO_AFNOSUPPORT
__WASI_ERRNO_AGAIN
__WASI_ERRNO_ALREADY
__WASI_ERRNO_BADF
__WASI_ERRNO_BADMSG
__WASI_ERRNO_BUSY
__WASI_ERRNO_CANCELED
__WASI_ERRNO_CHILD
__WASI_ERRNO_CONNABORTED
__WASI_ERRNO_CONNREFUSED
__WASI_ERRNO_CONNRESET
__WASI_ERRNO_DEADLK
__WASI_ERRNO_DESTADDRREQ
__WASI_ERRNO_DOM
__WASI_ERRNO_DQUOT
__WASI_ERRNO_EXIST
__WASI_ERRNO_FAULT
__WASI_ERRNO_FBIG
__WASI_ERRNO_HOSTUNREACH
__WASI_ERRNO_IDRM
__WASI_ERRNO_ILSEQ
__WASI_ERRNO_INPROGRESS
__WASI_ERRNO_INTR
__WASI_ERRNO_INVAL
__WASI_ERRNO_IO
__WASI_ERRNO_ISCONN
__WASI_ERRNO_ISDIR
__WASI_ERRNO_LOOP
__WASI_ERRNO_MFILE
__WASI_ERRNO_MLINK
__WASI_ERRNO_MSGSIZE
__WASI_ERRNO_MULTIHOP
__WASI_ERRNO_NAMETOOLONG
__WASI_ERRNO_NETDOWN
__WASI_ERRNO_NETRESET
__WASI_ERRNO_NETUNREACH
__WASI_ERRNO_NFILE
__WASI_ERRNO_NOBUFS
__WASI_ERRNO_NODEV
__WASI_ERRNO_NOENT
__WASI_ERRNO_NOEXEC
__WASI_ERRNO_NOLCK
__WASI_ERRNO_NOLINK
__WASI_ERRNO_NOMEM
__WASI_ERRNO_NOMSG
__WASI_ERRNO_NOPROTOOPT
__WASI_ERRNO_NOSPC
__WASI_ERRNO_NOSYS
__WASI_ERRNO_NOTCAPABLE
__WASI_ERRNO_NOTCONN
__WASI_ERRNO_NOTDIR
__WASI_ERRNO_NOTEMPTY
__WASI_ERRNO_NOTRECOVERABLE
__WASI_ERRNO_NOTSOCK
__WASI_ERRNO_NOTSUP
__WASI_ERRNO_NOTTY
__WASI_ERRNO_NXIO
__WASI_ERRNO_OVERFLOW
__WASI_ERRNO_OWNERDEAD
__WASI_ERRNO_PERM
__WASI_ERRNO_PIPE
__WASI_ERRNO_PROTO
__WASI_ERRNO_PROTONOSUPPORT
__WASI_ERRNO_PROTOTYPE
__WASI_ERRNO_RANGE
__WASI_ERRNO_ROFS
__WASI_ERRNO_SPIPE
__WASI_ERRNO_SRCH
__WASI_ERRNO_STALE
__WASI_ERRNO_SUCCESS
__WASI_ERRNO_TIMEDOUT
__WASI_ERRNO_TXTBSY
__WASI_ERRNO_XDEV
__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP
__WASI_EVENTTYPE_CLOCK
__WASI_EVENTTYPE_FD_READ
__WASI_EVENTTYPE_FD_WRITE
__WASI_FDFLAGS_APPEND
__WASI_FDFLAGS_DSYNC
__WASI_FDFLAGS_NONBLOCK
__WASI_FDFLAGS_RSYNC
__WASI_FDFLAGS_SYNC
__WASI_FILETYPE_BLOCK_DEVICE
__WASI_FILETYPE_CHARACTER_DEVICE
__WASI_FILETYPE_DIRECTORY
__WASI_FILETYPE_REGULAR_FILE
__WASI_FILETYPE_SOCKET_DGRAM
__WASI_FILETYPE_SOCKET_STREAM
__WASI_FILETYPE_SYMBOLIC_LINK
__WASI_FILETYPE_UNKNOWN
__WASI_FSTFLAGS_ATIM
__WASI_FSTFLAGS_ATIM_NOW
__WASI_FSTFLAGS_MTIM
__WASI_FSTFLAGS_MTIM_NOW
__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW
__WASI_OFLAGS_CREAT
__WASI_OFLAGS_DIRECTORY
__WASI_OFLAGS_EXCL
__WASI_OFLAGS_TRUNC
__WASI_PREOPENTYPE_DIR
__WASI_RIFLAGS_RECV_PEEK
__WASI_RIFLAGS_RECV_WAITALL
__WASI_RIGHTS_FD_ADVISE
__WASI_RIGHTS_FD_ALLOCATE
__WASI_RIGHTS_FD_DATASYNC
__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS
__WASI_RIGHTS_FD_FILESTAT_GET
__WASI_RIGHTS_FD_FILESTAT_SET_SIZE
__WASI_RIGHTS_FD_FILESTAT_SET_TIMES
__WASI_RIGHTS_FD_READ
__WASI_RIGHTS_FD_READDIR
__WASI_RIGHTS_FD_SEEK
__WASI_RIGHTS_FD_SYNC
__WASI_RIGHTS_FD_TELL
__WASI_RIGHTS_FD_WRITE
__WASI_RIGHTS_PATH_CREATE_DIRECTORY
__WASI_RIGHTS_PATH_CREATE_FILE
__WASI_RIGHTS_PATH_FILESTAT_GET
__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE
__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES
__WASI_RIGHTS_PATH_LINK_SOURCE
__WASI_RIGHTS_PATH_LINK_TARGET
__WASI_RIGHTS_PATH_OPEN
__WASI_RIGHTS_PATH_READLINK
__WASI_RIGHTS_PATH_REMOVE_DIRECTORY
__WASI_RIGHTS_PATH_RENAME_SOURCE
__WASI_RIGHTS_PATH_RENAME_TARGET
__WASI_RIGHTS_PATH_SYMLINK
__WASI_RIGHTS_PATH_UNLINK_FILE
__WASI_RIGHTS_POLL_FD_READWRITE
__WASI_RIGHTS_SOCK_SHUTDOWN
__WASI_ROFLAGS_RECV_DATA_TRUNCATED
__WASI_SDFLAGS_RD
__WASI_SDFLAGS_WR
__WASI_SIGNAL_ABRT
__WASI_SIGNAL_ALRM
__WASI_SIGNAL_BUS
__WASI_SIGNAL_CHLD
__WASI_SIGNAL_CONT
__WASI_SIGNAL_FPE
__WASI_SIGNAL_HUP
__WASI_SIGNAL_ILL
__WASI_SIGNAL_INT
__WASI_SIGNAL_KILL
__WASI_SIGNAL_NONE
__WASI_SIGNAL_PIPE
__WASI_SIGNAL_POLL
__WASI_SIGNAL_PROF
__WASI_SIGNAL_PWR
__WASI_SIGNAL_QUIT
__WASI_SIGNAL_SEGV
__WASI_SIGNAL_STOP
__WASI_SIGNAL_SYS
__WASI_SIGNAL_TERM
__WASI_SIGNAL_TRAP
__WASI_SIGNAL_TSTP
__WASI_SIGNAL_TTIN
__WASI_SIGNAL_TTOU
__WASI_SIGNAL_URG
__WASI_SIGNAL_USR1
__WASI_SIGNAL_USR2
__WASI_SIGNAL_VTALRM
__WASI_SIGNAL_WINCH
__WASI_SIGNAL_XCPU
__WASI_SIGNAL_XFSZ
__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME
__WASI_WHENCE_CUR
__WASI_WHENCE_END
__WASI_WHENCE_SET

Functions

+
strerror
whence_to_str

Type Definitions

+
__wasi_advice_t
__wasi_clockid_t
__wasi_device_t
__wasi_dircookie_t
__wasi_dirnamlen_t
__wasi_errno_t
__wasi_eventrwflags_t
__wasi_eventtype_t
__wasi_exitcode_t
__wasi_fd_t
__wasi_fdflags_t
__wasi_filedelta_t
__wasi_filesize_t
__wasi_filetype_t
__wasi_fstflags_t
__wasi_inode_t
__wasi_linkcount_t
__wasi_lookupflags_t
__wasi_oflags_t
__wasi_preopentype_t
__wasi_riflags_t
__wasi_rights_t
__wasi_roflags_t
__wasi_sdflags_t
__wasi_siflags_t
__wasi_signal_t
__wasi_subclockflags_t
__wasi_timestamp_t
__wasi_userdata_t
__wasi_whence_t

Unions

+
__wasi_event_u_t
__wasi_subscription_u_t
\ No newline at end of file diff --git a/api/wasi_common/wasi/sidebar-items.js b/api/wasi_common/wasi/sidebar-items.js new file mode 100644 index 000000000000..f7cfeaeae683 --- /dev/null +++ b/api/wasi_common/wasi/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["__WASI_ADVICE_DONTNEED",""],["__WASI_ADVICE_NOREUSE",""],["__WASI_ADVICE_NORMAL",""],["__WASI_ADVICE_RANDOM",""],["__WASI_ADVICE_SEQUENTIAL",""],["__WASI_ADVICE_WILLNEED",""],["__WASI_CLOCKID_MONOTONIC",""],["__WASI_CLOCKID_PROCESS_CPUTIME_ID",""],["__WASI_CLOCKID_REALTIME",""],["__WASI_CLOCKID_THREAD_CPUTIME_ID",""],["__WASI_DIRCOOKIE_START",""],["__WASI_ERRNO_2BIG",""],["__WASI_ERRNO_ACCES",""],["__WASI_ERRNO_ADDRINUSE",""],["__WASI_ERRNO_ADDRNOTAVAIL",""],["__WASI_ERRNO_AFNOSUPPORT",""],["__WASI_ERRNO_AGAIN",""],["__WASI_ERRNO_ALREADY",""],["__WASI_ERRNO_BADF",""],["__WASI_ERRNO_BADMSG",""],["__WASI_ERRNO_BUSY",""],["__WASI_ERRNO_CANCELED",""],["__WASI_ERRNO_CHILD",""],["__WASI_ERRNO_CONNABORTED",""],["__WASI_ERRNO_CONNREFUSED",""],["__WASI_ERRNO_CONNRESET",""],["__WASI_ERRNO_DEADLK",""],["__WASI_ERRNO_DESTADDRREQ",""],["__WASI_ERRNO_DOM",""],["__WASI_ERRNO_DQUOT",""],["__WASI_ERRNO_EXIST",""],["__WASI_ERRNO_FAULT",""],["__WASI_ERRNO_FBIG",""],["__WASI_ERRNO_HOSTUNREACH",""],["__WASI_ERRNO_IDRM",""],["__WASI_ERRNO_ILSEQ",""],["__WASI_ERRNO_INPROGRESS",""],["__WASI_ERRNO_INTR",""],["__WASI_ERRNO_INVAL",""],["__WASI_ERRNO_IO",""],["__WASI_ERRNO_ISCONN",""],["__WASI_ERRNO_ISDIR",""],["__WASI_ERRNO_LOOP",""],["__WASI_ERRNO_MFILE",""],["__WASI_ERRNO_MLINK",""],["__WASI_ERRNO_MSGSIZE",""],["__WASI_ERRNO_MULTIHOP",""],["__WASI_ERRNO_NAMETOOLONG",""],["__WASI_ERRNO_NETDOWN",""],["__WASI_ERRNO_NETRESET",""],["__WASI_ERRNO_NETUNREACH",""],["__WASI_ERRNO_NFILE",""],["__WASI_ERRNO_NOBUFS",""],["__WASI_ERRNO_NODEV",""],["__WASI_ERRNO_NOENT",""],["__WASI_ERRNO_NOEXEC",""],["__WASI_ERRNO_NOLCK",""],["__WASI_ERRNO_NOLINK",""],["__WASI_ERRNO_NOMEM",""],["__WASI_ERRNO_NOMSG",""],["__WASI_ERRNO_NOPROTOOPT",""],["__WASI_ERRNO_NOSPC",""],["__WASI_ERRNO_NOSYS",""],["__WASI_ERRNO_NOTCAPABLE",""],["__WASI_ERRNO_NOTCONN",""],["__WASI_ERRNO_NOTDIR",""],["__WASI_ERRNO_NOTEMPTY",""],["__WASI_ERRNO_NOTRECOVERABLE",""],["__WASI_ERRNO_NOTSOCK",""],["__WASI_ERRNO_NOTSUP",""],["__WASI_ERRNO_NOTTY",""],["__WASI_ERRNO_NXIO",""],["__WASI_ERRNO_OVERFLOW",""],["__WASI_ERRNO_OWNERDEAD",""],["__WASI_ERRNO_PERM",""],["__WASI_ERRNO_PIPE",""],["__WASI_ERRNO_PROTO",""],["__WASI_ERRNO_PROTONOSUPPORT",""],["__WASI_ERRNO_PROTOTYPE",""],["__WASI_ERRNO_RANGE",""],["__WASI_ERRNO_ROFS",""],["__WASI_ERRNO_SPIPE",""],["__WASI_ERRNO_SRCH",""],["__WASI_ERRNO_STALE",""],["__WASI_ERRNO_SUCCESS",""],["__WASI_ERRNO_TIMEDOUT",""],["__WASI_ERRNO_TXTBSY",""],["__WASI_ERRNO_XDEV",""],["__WASI_EVENTRWFLAGS_FD_READWRITE_HANGUP",""],["__WASI_EVENTTYPE_CLOCK",""],["__WASI_EVENTTYPE_FD_READ",""],["__WASI_EVENTTYPE_FD_WRITE",""],["__WASI_FDFLAGS_APPEND",""],["__WASI_FDFLAGS_DSYNC",""],["__WASI_FDFLAGS_NONBLOCK",""],["__WASI_FDFLAGS_RSYNC",""],["__WASI_FDFLAGS_SYNC",""],["__WASI_FILETYPE_BLOCK_DEVICE",""],["__WASI_FILETYPE_CHARACTER_DEVICE",""],["__WASI_FILETYPE_DIRECTORY",""],["__WASI_FILETYPE_REGULAR_FILE",""],["__WASI_FILETYPE_SOCKET_DGRAM",""],["__WASI_FILETYPE_SOCKET_STREAM",""],["__WASI_FILETYPE_SYMBOLIC_LINK",""],["__WASI_FILETYPE_UNKNOWN",""],["__WASI_FSTFLAGS_ATIM",""],["__WASI_FSTFLAGS_ATIM_NOW",""],["__WASI_FSTFLAGS_MTIM",""],["__WASI_FSTFLAGS_MTIM_NOW",""],["__WASI_LOOKUPFLAGS_SYMLINK_FOLLOW",""],["__WASI_OFLAGS_CREAT",""],["__WASI_OFLAGS_DIRECTORY",""],["__WASI_OFLAGS_EXCL",""],["__WASI_OFLAGS_TRUNC",""],["__WASI_PREOPENTYPE_DIR",""],["__WASI_RIFLAGS_RECV_PEEK",""],["__WASI_RIFLAGS_RECV_WAITALL",""],["__WASI_RIGHTS_FD_ADVISE",""],["__WASI_RIGHTS_FD_ALLOCATE",""],["__WASI_RIGHTS_FD_DATASYNC",""],["__WASI_RIGHTS_FD_FDSTAT_SET_FLAGS",""],["__WASI_RIGHTS_FD_FILESTAT_GET",""],["__WASI_RIGHTS_FD_FILESTAT_SET_SIZE",""],["__WASI_RIGHTS_FD_FILESTAT_SET_TIMES",""],["__WASI_RIGHTS_FD_READ",""],["__WASI_RIGHTS_FD_READDIR",""],["__WASI_RIGHTS_FD_SEEK",""],["__WASI_RIGHTS_FD_SYNC",""],["__WASI_RIGHTS_FD_TELL",""],["__WASI_RIGHTS_FD_WRITE",""],["__WASI_RIGHTS_PATH_CREATE_DIRECTORY",""],["__WASI_RIGHTS_PATH_CREATE_FILE",""],["__WASI_RIGHTS_PATH_FILESTAT_GET",""],["__WASI_RIGHTS_PATH_FILESTAT_SET_SIZE",""],["__WASI_RIGHTS_PATH_FILESTAT_SET_TIMES",""],["__WASI_RIGHTS_PATH_LINK_SOURCE",""],["__WASI_RIGHTS_PATH_LINK_TARGET",""],["__WASI_RIGHTS_PATH_OPEN",""],["__WASI_RIGHTS_PATH_READLINK",""],["__WASI_RIGHTS_PATH_REMOVE_DIRECTORY",""],["__WASI_RIGHTS_PATH_RENAME_SOURCE",""],["__WASI_RIGHTS_PATH_RENAME_TARGET",""],["__WASI_RIGHTS_PATH_SYMLINK",""],["__WASI_RIGHTS_PATH_UNLINK_FILE",""],["__WASI_RIGHTS_POLL_FD_READWRITE",""],["__WASI_RIGHTS_SOCK_SHUTDOWN",""],["__WASI_ROFLAGS_RECV_DATA_TRUNCATED",""],["__WASI_SDFLAGS_RD",""],["__WASI_SDFLAGS_WR",""],["__WASI_SIGNAL_ABRT",""],["__WASI_SIGNAL_ALRM",""],["__WASI_SIGNAL_BUS",""],["__WASI_SIGNAL_CHLD",""],["__WASI_SIGNAL_CONT",""],["__WASI_SIGNAL_FPE",""],["__WASI_SIGNAL_HUP",""],["__WASI_SIGNAL_ILL",""],["__WASI_SIGNAL_INT",""],["__WASI_SIGNAL_KILL",""],["__WASI_SIGNAL_NONE",""],["__WASI_SIGNAL_PIPE",""],["__WASI_SIGNAL_POLL",""],["__WASI_SIGNAL_PROF",""],["__WASI_SIGNAL_PWR",""],["__WASI_SIGNAL_QUIT",""],["__WASI_SIGNAL_SEGV",""],["__WASI_SIGNAL_STOP",""],["__WASI_SIGNAL_SYS",""],["__WASI_SIGNAL_TERM",""],["__WASI_SIGNAL_TRAP",""],["__WASI_SIGNAL_TSTP",""],["__WASI_SIGNAL_TTIN",""],["__WASI_SIGNAL_TTOU",""],["__WASI_SIGNAL_URG",""],["__WASI_SIGNAL_USR1",""],["__WASI_SIGNAL_USR2",""],["__WASI_SIGNAL_VTALRM",""],["__WASI_SIGNAL_WINCH",""],["__WASI_SIGNAL_XCPU",""],["__WASI_SIGNAL_XFSZ",""],["__WASI_SUBCLOCKFLAGS_SUBSCRIPTION_CLOCK_ABSTIME",""],["__WASI_WHENCE_CUR",""],["__WASI_WHENCE_END",""],["__WASI_WHENCE_SET",""]],"fn":[["strerror",""],["whence_to_str",""]],"struct":[["__wasi_dirent_t",""],["__wasi_event_fd_readwrite_t",""],["__wasi_event_t",""],["__wasi_fdstat_t",""],["__wasi_filestat_t",""],["__wasi_subscription_clock_t",""],["__wasi_subscription_fd_readwrite_t",""],["__wasi_subscription_t",""]],"type":[["__wasi_advice_t",""],["__wasi_clockid_t",""],["__wasi_device_t",""],["__wasi_dircookie_t",""],["__wasi_dirnamlen_t",""],["__wasi_errno_t",""],["__wasi_eventrwflags_t",""],["__wasi_eventtype_t",""],["__wasi_exitcode_t",""],["__wasi_fd_t",""],["__wasi_fdflags_t",""],["__wasi_filedelta_t",""],["__wasi_filesize_t",""],["__wasi_filetype_t",""],["__wasi_fstflags_t",""],["__wasi_inode_t",""],["__wasi_linkcount_t",""],["__wasi_lookupflags_t",""],["__wasi_oflags_t",""],["__wasi_preopentype_t",""],["__wasi_riflags_t",""],["__wasi_rights_t",""],["__wasi_roflags_t",""],["__wasi_sdflags_t",""],["__wasi_siflags_t",""],["__wasi_signal_t",""],["__wasi_subclockflags_t",""],["__wasi_timestamp_t",""],["__wasi_userdata_t",""],["__wasi_whence_t",""]],"union":[["__wasi_event_u_t",""],["__wasi_subscription_u_t",""]]}); \ No newline at end of file diff --git a/api/wasi_common/wasi/struct.__wasi_dirent_t.html b/api/wasi_common/wasi/struct.__wasi_dirent_t.html new file mode 100644 index 000000000000..b3302c851e1e --- /dev/null +++ b/api/wasi_common/wasi/struct.__wasi_dirent_t.html @@ -0,0 +1,28 @@ +wasi_common::wasi::__wasi_dirent_t - Rust

[][src]Struct wasi_common::wasi::__wasi_dirent_t

#[repr(C)]
+pub struct __wasi_dirent_t {
+    pub d_next: __wasi_dircookie_t,
+    pub d_ino: __wasi_inode_t,
+    pub d_namlen: __wasi_dirnamlen_t,
+    pub d_type: __wasi_filetype_t,
+}

+ Fields

d_next: __wasi_dircookie_td_ino: __wasi_inode_td_namlen: __wasi_dirnamlen_td_type: __wasi_filetype_t

Trait Implementations

impl Clone for __wasi_dirent_t[src]

impl Copy for __wasi_dirent_t[src]

impl Debug for __wasi_dirent_t[src]

impl Eq for __wasi_dirent_t[src]

impl Hash for __wasi_dirent_t[src]

impl PartialEq<__wasi_dirent_t> for __wasi_dirent_t[src]

impl StructuralEq for __wasi_dirent_t[src]

impl StructuralPartialEq for __wasi_dirent_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi/struct.__wasi_event_fd_readwrite_t.html b/api/wasi_common/wasi/struct.__wasi_event_fd_readwrite_t.html new file mode 100644 index 000000000000..b06af957a317 --- /dev/null +++ b/api/wasi_common/wasi/struct.__wasi_event_fd_readwrite_t.html @@ -0,0 +1,26 @@ +wasi_common::wasi::__wasi_event_fd_readwrite_t - Rust

[][src]Struct wasi_common::wasi::__wasi_event_fd_readwrite_t

#[repr(C)]
+pub struct __wasi_event_fd_readwrite_t {
+    pub nbytes: __wasi_filesize_t,
+    pub flags: __wasi_eventrwflags_t,
+}

+ Fields

nbytes: __wasi_filesize_tflags: __wasi_eventrwflags_t

Trait Implementations

impl Clone for __wasi_event_fd_readwrite_t[src]

impl Copy for __wasi_event_fd_readwrite_t[src]

impl Debug for __wasi_event_fd_readwrite_t[src]

impl Eq for __wasi_event_fd_readwrite_t[src]

impl Hash for __wasi_event_fd_readwrite_t[src]

impl PartialEq<__wasi_event_fd_readwrite_t> for __wasi_event_fd_readwrite_t[src]

impl StructuralEq for __wasi_event_fd_readwrite_t[src]

impl StructuralPartialEq for __wasi_event_fd_readwrite_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi/struct.__wasi_event_t.html b/api/wasi_common/wasi/struct.__wasi_event_t.html new file mode 100644 index 000000000000..719348544998 --- /dev/null +++ b/api/wasi_common/wasi/struct.__wasi_event_t.html @@ -0,0 +1,23 @@ +wasi_common::wasi::__wasi_event_t - Rust

[][src]Struct wasi_common::wasi::__wasi_event_t

#[repr(C)]
+pub struct __wasi_event_t {
+    pub userdata: __wasi_userdata_t,
+    pub error: __wasi_errno_t,
+    pub type: __wasi_eventtype_t,
+    pub u: __wasi_event_u_t,
+}

+ Fields

userdata: __wasi_userdata_terror: __wasi_errno_ttype: __wasi_eventtype_tu: __wasi_event_u_t

Trait Implementations

impl Clone for __wasi_event_t[src]

impl Copy for __wasi_event_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi/struct.__wasi_fdstat_t.html b/api/wasi_common/wasi/struct.__wasi_fdstat_t.html new file mode 100644 index 000000000000..f5e41e95ebb0 --- /dev/null +++ b/api/wasi_common/wasi/struct.__wasi_fdstat_t.html @@ -0,0 +1,28 @@ +wasi_common::wasi::__wasi_fdstat_t - Rust

[][src]Struct wasi_common::wasi::__wasi_fdstat_t

#[repr(C)]
+pub struct __wasi_fdstat_t {
+    pub fs_filetype: __wasi_filetype_t,
+    pub fs_flags: __wasi_fdflags_t,
+    pub fs_rights_base: __wasi_rights_t,
+    pub fs_rights_inheriting: __wasi_rights_t,
+}

+ Fields

fs_filetype: __wasi_filetype_tfs_flags: __wasi_fdflags_tfs_rights_base: __wasi_rights_tfs_rights_inheriting: __wasi_rights_t

Trait Implementations

impl Clone for __wasi_fdstat_t[src]

impl Copy for __wasi_fdstat_t[src]

impl Debug for __wasi_fdstat_t[src]

impl Eq for __wasi_fdstat_t[src]

impl Hash for __wasi_fdstat_t[src]

impl PartialEq<__wasi_fdstat_t> for __wasi_fdstat_t[src]

impl StructuralEq for __wasi_fdstat_t[src]

impl StructuralPartialEq for __wasi_fdstat_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi/struct.__wasi_filestat_t.html b/api/wasi_common/wasi/struct.__wasi_filestat_t.html new file mode 100644 index 000000000000..bf401209dbfd --- /dev/null +++ b/api/wasi_common/wasi/struct.__wasi_filestat_t.html @@ -0,0 +1,32 @@ +wasi_common::wasi::__wasi_filestat_t - Rust

[][src]Struct wasi_common::wasi::__wasi_filestat_t

#[repr(C)]
+pub struct __wasi_filestat_t {
+    pub dev: __wasi_device_t,
+    pub ino: __wasi_inode_t,
+    pub filetype: __wasi_filetype_t,
+    pub nlink: __wasi_linkcount_t,
+    pub size: __wasi_filesize_t,
+    pub atim: __wasi_timestamp_t,
+    pub mtim: __wasi_timestamp_t,
+    pub ctim: __wasi_timestamp_t,
+}

+ Fields

dev: __wasi_device_tino: __wasi_inode_tfiletype: __wasi_filetype_tnlink: __wasi_linkcount_tsize: __wasi_filesize_tatim: __wasi_timestamp_tmtim: __wasi_timestamp_tctim: __wasi_timestamp_t

Trait Implementations

impl Clone for __wasi_filestat_t[src]

impl Copy for __wasi_filestat_t[src]

impl Debug for __wasi_filestat_t[src]

impl Eq for __wasi_filestat_t[src]

impl Hash for __wasi_filestat_t[src]

impl PartialEq<__wasi_filestat_t> for __wasi_filestat_t[src]

impl StructuralEq for __wasi_filestat_t[src]

impl StructuralPartialEq for __wasi_filestat_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi/struct.__wasi_subscription_clock_t.html b/api/wasi_common/wasi/struct.__wasi_subscription_clock_t.html new file mode 100644 index 000000000000..2d2b93c4d28e --- /dev/null +++ b/api/wasi_common/wasi/struct.__wasi_subscription_clock_t.html @@ -0,0 +1,28 @@ +wasi_common::wasi::__wasi_subscription_clock_t - Rust

[][src]Struct wasi_common::wasi::__wasi_subscription_clock_t

#[repr(C)]
+pub struct __wasi_subscription_clock_t {
+    pub id: __wasi_clockid_t,
+    pub timeout: __wasi_timestamp_t,
+    pub precision: __wasi_timestamp_t,
+    pub flags: __wasi_subclockflags_t,
+}

+ Fields

id: __wasi_clockid_ttimeout: __wasi_timestamp_tprecision: __wasi_timestamp_tflags: __wasi_subclockflags_t

Trait Implementations

impl Clone for __wasi_subscription_clock_t[src]

impl Copy for __wasi_subscription_clock_t[src]

impl Debug for __wasi_subscription_clock_t[src]

impl Eq for __wasi_subscription_clock_t[src]

impl Hash for __wasi_subscription_clock_t[src]

impl PartialEq<__wasi_subscription_clock_t> for __wasi_subscription_clock_t[src]

impl StructuralEq for __wasi_subscription_clock_t[src]

impl StructuralPartialEq for __wasi_subscription_clock_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi/struct.__wasi_subscription_fd_readwrite_t.html b/api/wasi_common/wasi/struct.__wasi_subscription_fd_readwrite_t.html new file mode 100644 index 000000000000..9db1524ab9bc --- /dev/null +++ b/api/wasi_common/wasi/struct.__wasi_subscription_fd_readwrite_t.html @@ -0,0 +1,25 @@ +wasi_common::wasi::__wasi_subscription_fd_readwrite_t - Rust

[][src]Struct wasi_common::wasi::__wasi_subscription_fd_readwrite_t

#[repr(C)]
+pub struct __wasi_subscription_fd_readwrite_t {
+    pub file_descriptor: __wasi_fd_t,
+}

+ Fields

file_descriptor: __wasi_fd_t

Trait Implementations

impl Clone for __wasi_subscription_fd_readwrite_t[src]

impl Copy for __wasi_subscription_fd_readwrite_t[src]

impl Debug for __wasi_subscription_fd_readwrite_t[src]

impl Eq for __wasi_subscription_fd_readwrite_t[src]

impl Hash for __wasi_subscription_fd_readwrite_t[src]

impl PartialEq<__wasi_subscription_fd_readwrite_t> for __wasi_subscription_fd_readwrite_t[src]

impl StructuralEq for __wasi_subscription_fd_readwrite_t[src]

impl StructuralPartialEq for __wasi_subscription_fd_readwrite_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi/struct.__wasi_subscription_t.html b/api/wasi_common/wasi/struct.__wasi_subscription_t.html new file mode 100644 index 000000000000..ddee66e0e7f5 --- /dev/null +++ b/api/wasi_common/wasi/struct.__wasi_subscription_t.html @@ -0,0 +1,22 @@ +wasi_common::wasi::__wasi_subscription_t - Rust

[][src]Struct wasi_common::wasi::__wasi_subscription_t

#[repr(C)]
+pub struct __wasi_subscription_t {
+    pub userdata: __wasi_userdata_t,
+    pub type: __wasi_eventtype_t,
+    pub u: __wasi_subscription_u_t,
+}

+ Fields

userdata: __wasi_userdata_ttype: __wasi_eventtype_tu: __wasi_subscription_u_t

Trait Implementations

impl Clone for __wasi_subscription_t[src]

impl Copy for __wasi_subscription_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_advice_t.html b/api/wasi_common/wasi/type.__wasi_advice_t.html new file mode 100644 index 000000000000..d9a6aea270f0 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_advice_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_advice_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_advice_t

type __wasi_advice_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_clockid_t.html b/api/wasi_common/wasi/type.__wasi_clockid_t.html new file mode 100644 index 000000000000..77995c06b491 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_clockid_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_clockid_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_clockid_t

type __wasi_clockid_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_device_t.html b/api/wasi_common/wasi/type.__wasi_device_t.html new file mode 100644 index 000000000000..887438d5ef38 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_device_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_device_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_device_t

type __wasi_device_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_dircookie_t.html b/api/wasi_common/wasi/type.__wasi_dircookie_t.html new file mode 100644 index 000000000000..25f6126bd26b --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_dircookie_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_dircookie_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_dircookie_t

type __wasi_dircookie_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_dirnamlen_t.html b/api/wasi_common/wasi/type.__wasi_dirnamlen_t.html new file mode 100644 index 000000000000..08e5d4397aeb --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_dirnamlen_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_dirnamlen_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_dirnamlen_t

type __wasi_dirnamlen_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_errno_t.html b/api/wasi_common/wasi/type.__wasi_errno_t.html new file mode 100644 index 000000000000..3b9f0ab41d4f --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_errno_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_errno_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_errno_t

type __wasi_errno_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_eventrwflags_t.html b/api/wasi_common/wasi/type.__wasi_eventrwflags_t.html new file mode 100644 index 000000000000..bfbcf423fc9d --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_eventrwflags_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_eventrwflags_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_eventrwflags_t

type __wasi_eventrwflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_eventtype_t.html b/api/wasi_common/wasi/type.__wasi_eventtype_t.html new file mode 100644 index 000000000000..f0c2abf42c82 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_eventtype_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_eventtype_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_eventtype_t

type __wasi_eventtype_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_exitcode_t.html b/api/wasi_common/wasi/type.__wasi_exitcode_t.html new file mode 100644 index 000000000000..0c2ce43c2565 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_exitcode_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_exitcode_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_exitcode_t

type __wasi_exitcode_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_fd_t.html b/api/wasi_common/wasi/type.__wasi_fd_t.html new file mode 100644 index 000000000000..2afcd57baab1 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_fd_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_fd_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_fd_t

type __wasi_fd_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_fdflags_t.html b/api/wasi_common/wasi/type.__wasi_fdflags_t.html new file mode 100644 index 000000000000..fb570d957508 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_fdflags_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_fdflags_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_fdflags_t

type __wasi_fdflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_filedelta_t.html b/api/wasi_common/wasi/type.__wasi_filedelta_t.html new file mode 100644 index 000000000000..dbcfdb6b3951 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_filedelta_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_filedelta_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_filedelta_t

type __wasi_filedelta_t = i64;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_filesize_t.html b/api/wasi_common/wasi/type.__wasi_filesize_t.html new file mode 100644 index 000000000000..5944a12e7d97 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_filesize_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_filesize_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_filesize_t

type __wasi_filesize_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_filetype_t.html b/api/wasi_common/wasi/type.__wasi_filetype_t.html new file mode 100644 index 000000000000..2f3bd065474b --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_filetype_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_filetype_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_filetype_t

type __wasi_filetype_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_fstflags_t.html b/api/wasi_common/wasi/type.__wasi_fstflags_t.html new file mode 100644 index 000000000000..d289d2b922bd --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_fstflags_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_fstflags_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_fstflags_t

type __wasi_fstflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_inode_t.html b/api/wasi_common/wasi/type.__wasi_inode_t.html new file mode 100644 index 000000000000..04bccb88a07f --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_inode_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_inode_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_inode_t

type __wasi_inode_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_linkcount_t.html b/api/wasi_common/wasi/type.__wasi_linkcount_t.html new file mode 100644 index 000000000000..dae2ff2d8565 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_linkcount_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_linkcount_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_linkcount_t

type __wasi_linkcount_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_lookupflags_t.html b/api/wasi_common/wasi/type.__wasi_lookupflags_t.html new file mode 100644 index 000000000000..e39069c5e423 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_lookupflags_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_lookupflags_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_lookupflags_t

type __wasi_lookupflags_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_oflags_t.html b/api/wasi_common/wasi/type.__wasi_oflags_t.html new file mode 100644 index 000000000000..a05d00a85f5a --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_oflags_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_oflags_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_oflags_t

type __wasi_oflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_preopentype_t.html b/api/wasi_common/wasi/type.__wasi_preopentype_t.html new file mode 100644 index 000000000000..69d3e65834c5 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_preopentype_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_preopentype_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_preopentype_t

type __wasi_preopentype_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_riflags_t.html b/api/wasi_common/wasi/type.__wasi_riflags_t.html new file mode 100644 index 000000000000..44362fad49dc --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_riflags_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_riflags_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_riflags_t

type __wasi_riflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_rights_t.html b/api/wasi_common/wasi/type.__wasi_rights_t.html new file mode 100644 index 000000000000..c639b1503975 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_rights_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_rights_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_rights_t

type __wasi_rights_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_roflags_t.html b/api/wasi_common/wasi/type.__wasi_roflags_t.html new file mode 100644 index 000000000000..5cabb384ae9e --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_roflags_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_roflags_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_roflags_t

type __wasi_roflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_sdflags_t.html b/api/wasi_common/wasi/type.__wasi_sdflags_t.html new file mode 100644 index 000000000000..6f89a2380612 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_sdflags_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_sdflags_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_sdflags_t

type __wasi_sdflags_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_siflags_t.html b/api/wasi_common/wasi/type.__wasi_siflags_t.html new file mode 100644 index 000000000000..53df7f9f3c0d --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_siflags_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_siflags_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_siflags_t

type __wasi_siflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_signal_t.html b/api/wasi_common/wasi/type.__wasi_signal_t.html new file mode 100644 index 000000000000..3a117c660259 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_signal_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_signal_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_signal_t

type __wasi_signal_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_subclockflags_t.html b/api/wasi_common/wasi/type.__wasi_subclockflags_t.html new file mode 100644 index 000000000000..83a7fc9211fe --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_subclockflags_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_subclockflags_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_subclockflags_t

type __wasi_subclockflags_t = u16;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_timestamp_t.html b/api/wasi_common/wasi/type.__wasi_timestamp_t.html new file mode 100644 index 000000000000..cbc29d9943a4 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_timestamp_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_timestamp_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_timestamp_t

type __wasi_timestamp_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_userdata_t.html b/api/wasi_common/wasi/type.__wasi_userdata_t.html new file mode 100644 index 000000000000..a91812f79a23 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_userdata_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_userdata_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_userdata_t

type __wasi_userdata_t = u64;
\ No newline at end of file diff --git a/api/wasi_common/wasi/type.__wasi_whence_t.html b/api/wasi_common/wasi/type.__wasi_whence_t.html new file mode 100644 index 000000000000..854d7c0176f2 --- /dev/null +++ b/api/wasi_common/wasi/type.__wasi_whence_t.html @@ -0,0 +1 @@ +wasi_common::wasi::__wasi_whence_t - Rust

[][src]Type Definition wasi_common::wasi::__wasi_whence_t

type __wasi_whence_t = u8;
\ No newline at end of file diff --git a/api/wasi_common/wasi/union.__wasi_event_u_t.html b/api/wasi_common/wasi/union.__wasi_event_u_t.html new file mode 100644 index 000000000000..97a934332674 --- /dev/null +++ b/api/wasi_common/wasi/union.__wasi_event_u_t.html @@ -0,0 +1,20 @@ +wasi_common::wasi::__wasi_event_u_t - Rust

[][src]Union wasi_common::wasi::__wasi_event_u_t

#[repr(C)]
+pub union __wasi_event_u_t {
+    pub fd_readwrite: __wasi_event_fd_readwrite_t,
+}

+ Fields

fd_readwrite: __wasi_event_fd_readwrite_t

Trait Implementations

impl Clone for __wasi_event_u_t[src]

impl Copy for __wasi_event_u_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi/union.__wasi_subscription_u_t.html b/api/wasi_common/wasi/union.__wasi_subscription_u_t.html new file mode 100644 index 000000000000..0a6742202c36 --- /dev/null +++ b/api/wasi_common/wasi/union.__wasi_subscription_u_t.html @@ -0,0 +1,21 @@ +wasi_common::wasi::__wasi_subscription_u_t - Rust

[][src]Union wasi_common::wasi::__wasi_subscription_u_t

#[repr(C)]
+pub union __wasi_subscription_u_t {
+    pub clock: __wasi_subscription_clock_t,
+    pub fd_readwrite: __wasi_subscription_fd_readwrite_t,
+}

+ Fields

clock: __wasi_subscription_clock_tfd_readwrite: __wasi_subscription_fd_readwrite_t

Trait Implementations

impl Clone for __wasi_subscription_u_t[src]

impl Copy for __wasi_subscription_u_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi32/index.html b/api/wasi_common/wasi32/index.html new file mode 100644 index 000000000000..7222cce515f9 --- /dev/null +++ b/api/wasi_common/wasi32/index.html @@ -0,0 +1,7 @@ +wasi_common::wasi32 - Rust

[][src]Module wasi_common::wasi32

Types and constants specific to 32-bit wasi. These are similar to the types +in the host module, but pointers and usize values are replaced with +u32-sized types.

+

Structs

+
__wasi_ciovec_t
__wasi_iovec_t
__wasi_prestat_dir_t
__wasi_prestat_t

Type Definitions

+
__wasi_ciovec_array_t
__wasi_iovec_array_t
__wasi_size_t
size_t
uintptr_t

Unions

+
__wasi_prestat_u_t
\ No newline at end of file diff --git a/api/wasi_common/wasi32/sidebar-items.js b/api/wasi_common/wasi32/sidebar-items.js new file mode 100644 index 000000000000..aa1bb14afae0 --- /dev/null +++ b/api/wasi_common/wasi32/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["__wasi_ciovec_t",""],["__wasi_iovec_t",""],["__wasi_prestat_dir_t",""],["__wasi_prestat_t",""]],"type":[["__wasi_ciovec_array_t",""],["__wasi_iovec_array_t",""],["__wasi_size_t",""],["size_t",""],["uintptr_t",""]],"union":[["__wasi_prestat_u_t",""]]}); \ No newline at end of file diff --git a/api/wasi_common/wasi32/struct.__wasi_ciovec_t.html b/api/wasi_common/wasi32/struct.__wasi_ciovec_t.html new file mode 100644 index 000000000000..ccf6e79c866a --- /dev/null +++ b/api/wasi_common/wasi32/struct.__wasi_ciovec_t.html @@ -0,0 +1,26 @@ +wasi_common::wasi32::__wasi_ciovec_t - Rust

[][src]Struct wasi_common::wasi32::__wasi_ciovec_t

#[repr(C)]
+pub struct __wasi_ciovec_t {
+    pub buf: u32,
+    pub buf_len: __wasi_size_t,
+}

+ Fields

buf: u32buf_len: __wasi_size_t

Trait Implementations

impl Clone for __wasi_ciovec_t[src]

impl Copy for __wasi_ciovec_t[src]

impl Debug for __wasi_ciovec_t[src]

impl Eq for __wasi_ciovec_t[src]

impl Hash for __wasi_ciovec_t[src]

impl PartialEq<__wasi_ciovec_t> for __wasi_ciovec_t[src]

impl StructuralEq for __wasi_ciovec_t[src]

impl StructuralPartialEq for __wasi_ciovec_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi32/struct.__wasi_iovec_t.html b/api/wasi_common/wasi32/struct.__wasi_iovec_t.html new file mode 100644 index 000000000000..34c3b4168100 --- /dev/null +++ b/api/wasi_common/wasi32/struct.__wasi_iovec_t.html @@ -0,0 +1,26 @@ +wasi_common::wasi32::__wasi_iovec_t - Rust

[][src]Struct wasi_common::wasi32::__wasi_iovec_t

#[repr(C)]
+pub struct __wasi_iovec_t {
+    pub buf: u32,
+    pub buf_len: __wasi_size_t,
+}

+ Fields

buf: u32buf_len: __wasi_size_t

Trait Implementations

impl Clone for __wasi_iovec_t[src]

impl Copy for __wasi_iovec_t[src]

impl Debug for __wasi_iovec_t[src]

impl Eq for __wasi_iovec_t[src]

impl Hash for __wasi_iovec_t[src]

impl PartialEq<__wasi_iovec_t> for __wasi_iovec_t[src]

impl StructuralEq for __wasi_iovec_t[src]

impl StructuralPartialEq for __wasi_iovec_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi32/struct.__wasi_prestat_dir_t.html b/api/wasi_common/wasi32/struct.__wasi_prestat_dir_t.html new file mode 100644 index 000000000000..7ce4114dcd65 --- /dev/null +++ b/api/wasi_common/wasi32/struct.__wasi_prestat_dir_t.html @@ -0,0 +1,25 @@ +wasi_common::wasi32::__wasi_prestat_dir_t - Rust

[][src]Struct wasi_common::wasi32::__wasi_prestat_dir_t

#[repr(C)]
+pub struct __wasi_prestat_dir_t {
+    pub pr_name_len: __wasi_size_t,
+}

+ Fields

pr_name_len: __wasi_size_t

Trait Implementations

impl Clone for __wasi_prestat_dir_t[src]

impl Copy for __wasi_prestat_dir_t[src]

impl Debug for __wasi_prestat_dir_t[src]

impl Eq for __wasi_prestat_dir_t[src]

impl Hash for __wasi_prestat_dir_t[src]

impl PartialEq<__wasi_prestat_dir_t> for __wasi_prestat_dir_t[src]

impl StructuralEq for __wasi_prestat_dir_t[src]

impl StructuralPartialEq for __wasi_prestat_dir_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi32/struct.__wasi_prestat_t.html b/api/wasi_common/wasi32/struct.__wasi_prestat_t.html new file mode 100644 index 000000000000..a686eaf3c5e2 --- /dev/null +++ b/api/wasi_common/wasi32/struct.__wasi_prestat_t.html @@ -0,0 +1,21 @@ +wasi_common::wasi32::__wasi_prestat_t - Rust

[][src]Struct wasi_common::wasi32::__wasi_prestat_t

#[repr(C)]
+pub struct __wasi_prestat_t {
+    pub pr_type: __wasi_preopentype_t,
+    pub u: __wasi_prestat_u_t,
+}

+ Fields

pr_type: __wasi_preopentype_tu: __wasi_prestat_u_t

Trait Implementations

impl Clone for __wasi_prestat_t[src]

impl Copy for __wasi_prestat_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasi_common/wasi32/type.__wasi_ciovec_array_t.html b/api/wasi_common/wasi32/type.__wasi_ciovec_array_t.html new file mode 100644 index 000000000000..12ff9e9f3ea0 --- /dev/null +++ b/api/wasi_common/wasi32/type.__wasi_ciovec_array_t.html @@ -0,0 +1 @@ +wasi_common::wasi32::__wasi_ciovec_array_t - Rust

[][src]Type Definition wasi_common::wasi32::__wasi_ciovec_array_t

type __wasi_ciovec_array_t = (u32, u32);
\ No newline at end of file diff --git a/api/wasi_common/wasi32/type.__wasi_iovec_array_t.html b/api/wasi_common/wasi32/type.__wasi_iovec_array_t.html new file mode 100644 index 000000000000..c456a224e561 --- /dev/null +++ b/api/wasi_common/wasi32/type.__wasi_iovec_array_t.html @@ -0,0 +1 @@ +wasi_common::wasi32::__wasi_iovec_array_t - Rust

[][src]Type Definition wasi_common::wasi32::__wasi_iovec_array_t

type __wasi_iovec_array_t = (u32, u32);
\ No newline at end of file diff --git a/api/wasi_common/wasi32/type.__wasi_size_t.html b/api/wasi_common/wasi32/type.__wasi_size_t.html new file mode 100644 index 000000000000..35df26776d04 --- /dev/null +++ b/api/wasi_common/wasi32/type.__wasi_size_t.html @@ -0,0 +1 @@ +wasi_common::wasi32::__wasi_size_t - Rust

[][src]Type Definition wasi_common::wasi32::__wasi_size_t

type __wasi_size_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/wasi32/type.size_t.html b/api/wasi_common/wasi32/type.size_t.html new file mode 100644 index 000000000000..d57977bdfaca --- /dev/null +++ b/api/wasi_common/wasi32/type.size_t.html @@ -0,0 +1 @@ +wasi_common::wasi32::size_t - Rust

[][src]Type Definition wasi_common::wasi32::size_t

type size_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/wasi32/type.uintptr_t.html b/api/wasi_common/wasi32/type.uintptr_t.html new file mode 100644 index 000000000000..cfeecd17b357 --- /dev/null +++ b/api/wasi_common/wasi32/type.uintptr_t.html @@ -0,0 +1 @@ +wasi_common::wasi32::uintptr_t - Rust

[][src]Type Definition wasi_common::wasi32::uintptr_t

type uintptr_t = u32;
\ No newline at end of file diff --git a/api/wasi_common/wasi32/union.__wasi_prestat_u_t.html b/api/wasi_common/wasi32/union.__wasi_prestat_u_t.html new file mode 100644 index 000000000000..73e1e9d7098a --- /dev/null +++ b/api/wasi_common/wasi32/union.__wasi_prestat_u_t.html @@ -0,0 +1,20 @@ +wasi_common::wasi32::__wasi_prestat_u_t - Rust

[][src]Union wasi_common::wasi32::__wasi_prestat_u_t

#[repr(C)]
+pub union __wasi_prestat_u_t {
+    pub dir: __wasi_prestat_dir_t,
+}

+ Fields

dir: __wasi_prestat_dir_t

Trait Implementations

impl Clone for __wasi_prestat_u_t[src]

impl Copy for __wasi_prestat_u_t[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/all.html b/api/wasmtime/all.html new file mode 100644 index 000000000000..d33c9ddbac45 --- /dev/null +++ b/api/wasmtime/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Enums

Traits

\ No newline at end of file diff --git a/api/wasmtime/callable/trait.Callable.html b/api/wasmtime/callable/trait.Callable.html new file mode 100644 index 000000000000..35d76a14677c --- /dev/null +++ b/api/wasmtime/callable/trait.Callable.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/trait.Callable.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/enum.AnyRef.html b/api/wasmtime/enum.AnyRef.html new file mode 100644 index 000000000000..c4f8ccd45ff5 --- /dev/null +++ b/api/wasmtime/enum.AnyRef.html @@ -0,0 +1,42 @@ +wasmtime::AnyRef - Rust

[][src]Enum wasmtime::AnyRef

pub enum AnyRef {
+    Null,
+    Ref(InternalRef),
+    Other(OtherRef),
+}

Represents an opaque reference to any data within WebAssembly.

+

+ Variants

+
Null

A reference to no data.

+
Ref(InternalRef)

A reference to data stored internally in wasmtime.

+
Other(OtherRef)

A reference to data located outside of wasmtime.

+

Methods

impl AnyRef[src]

pub fn new(data: Box<dyn Any>) -> Self[src]

Creates a new instance of AnyRef from Box<dyn Any>.

+

pub fn null() -> Self[src]

Creates a Null reference.

+

pub fn data(&self) -> Ref<Box<dyn Any>>[src]

Returns the data stored in the reference if available.

+

Panics

+

Panics if the variant isn't AnyRef::Other.

+

pub fn ptr_eq(&self, other: &AnyRef) -> bool[src]

Returns true if the two AnyRef<T>'s point to the same value (not just +values that compare as equal).

+

pub fn host_info(&self) -> Option<RefMut<Box<dyn HostInfo>>>[src]

Returns a mutable reference to the host information if available.

+

Panics

+

Panics if AnyRef is already borrowed or AnyRef is Null.

+

pub fn set_host_info(&self, info: Option<Box<dyn HostInfo>>)[src]

Sets the host information for an AnyRef.

+

Panics

+

Panics if AnyRef is already borrowed or AnyRef is Null.

+

Trait Implementations

impl Clone for AnyRef[src]

impl Debug for AnyRef[src]

impl From<AnyRef> for Val[src]

Auto Trait Implementations

impl !RefUnwindSafe for AnyRef

impl !Send for AnyRef

impl !Sync for AnyRef

impl Unpin for AnyRef

impl !UnwindSafe for AnyRef

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/enum.Extern.html b/api/wasmtime/enum.Extern.html new file mode 100644 index 000000000000..c117fda583da --- /dev/null +++ b/api/wasmtime/enum.Extern.html @@ -0,0 +1,48 @@ +wasmtime::Extern - Rust

[][src]Enum wasmtime::Extern

pub enum Extern {
+    Func(Func),
+    Global(Global),
+    Table(Table),
+    Memory(Memory),
+}

An external item to a WebAssembly module, or a list of what can possibly be +exported from a wasm module.

+

This is both returned from Instance::exports +as well as required by Instance::new. In other +words, this is the type of extracted values from an instantiated module, and +it's also used to provide imported values when instantiating a module.

+

+ Variants

+
Func(Func)

A WebAssembly func which can be called.

+
Global(Global)

A WebAssembly global which acts like a Cell<T> of sorts, supporting +get and set operations.

+
Table(Table)

A WebAssembly table which is an array of Val types.

+
Memory(Memory)

A WebAssembly linear memory.

+

Methods

impl Extern[src]

pub fn func(&self) -> Option<&Func>[src]

Returns the underlying Func, if this external is a function.

+

Returns None if this is not a function.

+

pub fn global(&self) -> Option<&Global>[src]

Returns the underlying Global, if this external is a global.

+

Returns None if this is not a global.

+

pub fn table(&self) -> Option<&Table>[src]

Returns the underlying Table, if this external is a table.

+

Returns None if this is not a table.

+

pub fn memory(&self) -> Option<&Memory>[src]

Returns the underlying Memory, if this external is a memory.

+

Returns None if this is not a memory.

+

pub fn ty(&self) -> ExternType[src]

Returns the type associated with this Extern.

+

Trait Implementations

impl Clone for Extern[src]

impl From<Func> for Extern[src]

impl From<Global> for Extern[src]

impl From<Memory> for Extern[src]

impl From<Table> for Extern[src]

Auto Trait Implementations

impl !RefUnwindSafe for Extern

impl !Send for Extern

impl !Sync for Extern

impl Unpin for Extern

impl !UnwindSafe for Extern

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/enum.ExternType.html b/api/wasmtime/enum.ExternType.html new file mode 100644 index 000000000000..658e3f25164f --- /dev/null +++ b/api/wasmtime/enum.ExternType.html @@ -0,0 +1,57 @@ +wasmtime::ExternType - Rust

[][src]Enum wasmtime::ExternType

pub enum ExternType {
+    Func(FuncType),
+    Global(GlobalType),
+    Table(TableType),
+    Memory(MemoryType),
+}

A list of all possible types which can be externally referenced from a +WebAssembly module.

+

This list can be found in ImportType or ExportType, so these types +can either be imported or exported.

+

+ Variants

+
Func(FuncType)

This external type is the type of a WebAssembly function.

+
Global(GlobalType)

This external type is the type of a WebAssembly global.

+
Table(TableType)

This external type is the type of a WebAssembly table.

+
Memory(MemoryType)

This external type is the type of a WebAssembly memory.

+

Methods

impl ExternType[src]

pub fn func(&self) -> Option<&FuncType>[src]

Attempt to return the underlying type of this external type, +returning None if it is a different type.

+

pub fn unwrap_func(&self) -> &FuncType[src]

Returns the underlying descriptor of this ExternType, panicking +if it is a different type.

+

Panics

+

Panics if self is not of the right type.

+

pub fn global(&self) -> Option<&GlobalType>[src]

Attempt to return the underlying type of this external type, +returning None if it is a different type.

+

pub fn unwrap_global(&self) -> &GlobalType[src]

Returns the underlying descriptor of this ExternType, panicking +if it is a different type.

+

Panics

+

Panics if self is not of the right type.

+

pub fn table(&self) -> Option<&TableType>[src]

Attempt to return the underlying type of this external type, +returning None if it is a different type.

+

pub fn unwrap_table(&self) -> &TableType[src]

Returns the underlying descriptor of this ExternType, panicking +if it is a different type.

+

Panics

+

Panics if self is not of the right type.

+

pub fn memory(&self) -> Option<&MemoryType>[src]

Attempt to return the underlying type of this external type, +returning None if it is a different type.

+

pub fn unwrap_memory(&self) -> &MemoryType[src]

Returns the underlying descriptor of this ExternType, panicking +if it is a different type.

+

Panics

+

Panics if self is not of the right type.

+

Trait Implementations

impl Clone for ExternType[src]

impl Debug for ExternType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/enum.Mutability.html b/api/wasmtime/enum.Mutability.html new file mode 100644 index 000000000000..5b0b9a20e536 --- /dev/null +++ b/api/wasmtime/enum.Mutability.html @@ -0,0 +1,29 @@ +wasmtime::Mutability - Rust

[][src]Enum wasmtime::Mutability

pub enum Mutability {
+    Const,
+    Var,
+}

Indicator of whether a global is mutable or not

+

+ Variants

+
Const

The global is constant and its value does not change

+
Var

The value of the global can change over time

+

Trait Implementations

impl Clone for Mutability[src]

impl Copy for Mutability[src]

impl Debug for Mutability[src]

impl PartialEq<Mutability> for Mutability[src]

impl StructuralPartialEq for Mutability[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/enum.OptLevel.html b/api/wasmtime/enum.OptLevel.html new file mode 100644 index 000000000000..330d4539dbc5 --- /dev/null +++ b/api/wasmtime/enum.OptLevel.html @@ -0,0 +1,31 @@ +wasmtime::OptLevel - Rust

[][src]Enum wasmtime::OptLevel

#[non_exhaustive]
+pub enum OptLevel {
+    None,
+    Speed,
+    SpeedAndSize,
+}

Possible optimization levels for the Cranelift codegen backend.

+

+ Variants (Non-exhaustive)

+
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None

No optimizations performed, minimizes compilation time by disabling most +optimizations.

+
Speed

Generates the fastest possible code, but may take longer.

+
SpeedAndSize

Similar to speed, but also performs transformations aimed at reducing +code size.

+

Trait Implementations

impl Clone for OptLevel[src]

impl Debug for OptLevel[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/enum.Strategy.html b/api/wasmtime/enum.Strategy.html new file mode 100644 index 000000000000..2d8f9dda6f10 --- /dev/null +++ b/api/wasmtime/enum.Strategy.html @@ -0,0 +1,40 @@ +wasmtime::Strategy - Rust

[][src]Enum wasmtime::Strategy

#[non_exhaustive]
+pub enum Strategy {
+    Auto,
+    Cranelift,
+    Lightbeam,
+}

Possible Compilation strategies for a wasm module.

+

This is used as an argument to the Config::strategy method.

+

+ Variants (Non-exhaustive)

+
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Auto

An indicator that the compilation strategy should be automatically +selected.

+

This is generally what you want for most projects and indicates that the +wasmtime crate itself should make the decision about what the best +code generator for a wasm module is.

+

Currently this always defaults to Cranelift, but the default value will +change over time.

+
Cranelift

Currently the default backend, Cranelift aims to be a reasonably fast +code generator which generates high quality machine code.

+
Lightbeam

A single-pass code generator that is faster than Cranelift but doesn't +produce as high-quality code.

+

To successfully pass this argument to Config::strategy the +lightbeam feature of this crate must be enabled.

+

Trait Implementations

impl Clone for Strategy[src]

impl Debug for Strategy[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/enum.Val.html b/api/wasmtime/enum.Val.html new file mode 100644 index 000000000000..fdc57e059416 --- /dev/null +++ b/api/wasmtime/enum.Val.html @@ -0,0 +1,93 @@ +wasmtime::Val - Rust

[][src]Enum wasmtime::Val

pub enum Val {
+    I32(i32),
+    I64(i64),
+    F32(u32),
+    F64(u64),
+    AnyRef(AnyRef),
+    FuncRef(Func),
+    V128(u128),
+}

Possible runtime values that a WebAssembly module can either consume or +produce.

+

+ Variants

+
I32(i32)

A 32-bit integer

+
I64(i64)

A 64-bit integer

+
F32(u32)

A 32-bit float.

+

Note that the raw bits of the float are stored here, and you can use +f32::from_bits to create an f32 value.

+
F64(u64)

A 64-bit float.

+

Note that the raw bits of the float are stored here, and you can use +f64::from_bits to create an f64 value.

+
AnyRef(AnyRef)

An anyref value which can hold opaque data to the wasm instance itself.

+

Note that this is a nullable value as well.

+
FuncRef(Func)

A first-class reference to a WebAssembly function.

+
V128(u128)

A 128-bit number

+

Methods

impl Val[src]

pub fn null() -> Val[src]

Returns a null anyref value.

+

pub fn ty(&self) -> ValType[src]

Returns the corresponding ValType for this Val.

+

pub fn i32(&self) -> Option<i32>[src]

Attempt to access the underlying value of this Val, returning +None if it is not the correct type.

+

pub fn unwrap_i32(&self) -> i32[src]

Returns the underlying value of this Val, panicking if it's the +wrong type.

+

Panics

+

Panics if self is not of the right type.

+

pub fn i64(&self) -> Option<i64>[src]

Attempt to access the underlying value of this Val, returning +None if it is not the correct type.

+

pub fn unwrap_i64(&self) -> i64[src]

Returns the underlying value of this Val, panicking if it's the +wrong type.

+

Panics

+

Panics if self is not of the right type.

+

pub fn f32(&self) -> Option<f32>[src]

Attempt to access the underlying value of this Val, returning +None if it is not the correct type.

+

pub fn unwrap_f32(&self) -> f32[src]

Returns the underlying value of this Val, panicking if it's the +wrong type.

+

Panics

+

Panics if self is not of the right type.

+

pub fn f64(&self) -> Option<f64>[src]

Attempt to access the underlying value of this Val, returning +None if it is not the correct type.

+

pub fn unwrap_f64(&self) -> f64[src]

Returns the underlying value of this Val, panicking if it's the +wrong type.

+

Panics

+

Panics if self is not of the right type.

+

pub fn funcref(&self) -> Option<&Func>[src]

Attempt to access the underlying value of this Val, returning +None if it is not the correct type.

+

pub fn unwrap_funcref(&self) -> &Func[src]

Returns the underlying value of this Val, panicking if it's the +wrong type.

+

Panics

+

Panics if self is not of the right type.

+

pub fn v128(&self) -> Option<u128>[src]

Attempt to access the underlying value of this Val, returning +None if it is not the correct type.

+

pub fn unwrap_v128(&self) -> u128[src]

Returns the underlying value of this Val, panicking if it's the +wrong type.

+

Panics

+

Panics if self is not of the right type.

+

pub fn anyref(&self) -> Option<AnyRef>[src]

Attempt to access the underlying value of this Val, returning +None if it is not the correct type.

+

This will return Some for both the AnyRef and FuncRef types.

+

pub fn unwrap_anyref(&self) -> AnyRef[src]

Returns the underlying value of this Val, panicking if it's the +wrong type.

+

Panics

+

Panics if self is not of the right type.

+

Trait Implementations

impl Clone for Val[src]

impl Debug for Val[src]

impl From<AnyRef> for Val[src]

impl From<Func> for Val[src]

impl From<f32> for Val[src]

impl From<f64> for Val[src]

impl From<i32> for Val[src]

impl From<i64> for Val[src]

Auto Trait Implementations

impl !RefUnwindSafe for Val

impl !Send for Val

impl !Sync for Val

impl Unpin for Val

impl !UnwindSafe for Val

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/enum.ValType.html b/api/wasmtime/enum.ValType.html new file mode 100644 index 000000000000..104adb9a3b3f --- /dev/null +++ b/api/wasmtime/enum.ValType.html @@ -0,0 +1,43 @@ +wasmtime::ValType - Rust

[][src]Enum wasmtime::ValType

pub enum ValType {
+    I32,
+    I64,
+    F32,
+    F64,
+    V128,
+    AnyRef,
+    FuncRef,
+}

A list of all possible value types in WebAssembly.

+

+ Variants

+
I32

Signed 32 bit integer.

+
I64

Signed 64 bit integer.

+
F32

Floating point 32 bit integer.

+
F64

Floating point 64 bit integer.

+
V128

A 128 bit number.

+
AnyRef

A reference to opaque data in the Wasm instance.

+
FuncRef

A reference to a Wasm function.

+

Methods

impl ValType[src]

pub fn is_num(&self) -> bool[src]

Returns true if ValType matches any of the numeric types. (e.g. I32, +I64, F32, F64).

+

pub fn is_ref(&self) -> bool[src]

Returns true if ValType matches either of the reference types.

+

Trait Implementations

impl Clone for ValType[src]

impl Debug for ValType[src]

impl Eq for ValType[src]

impl PartialEq<ValType> for ValType[src]

impl StructuralEq for ValType[src]

impl StructuralPartialEq for ValType[src]

Auto Trait Implementations

impl RefUnwindSafe for ValType

impl Send for ValType

impl Sync for ValType

impl Unpin for ValType

impl UnwindSafe for ValType

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/externals/enum.Extern.html b/api/wasmtime/externals/enum.Extern.html new file mode 100644 index 000000000000..222da1748a40 --- /dev/null +++ b/api/wasmtime/externals/enum.Extern.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/enum.Extern.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/externals/struct.Global.html b/api/wasmtime/externals/struct.Global.html new file mode 100644 index 000000000000..a71b770f4ee2 --- /dev/null +++ b/api/wasmtime/externals/struct.Global.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.Global.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/externals/struct.Memory.html b/api/wasmtime/externals/struct.Memory.html new file mode 100644 index 000000000000..12ef49c421e1 --- /dev/null +++ b/api/wasmtime/externals/struct.Memory.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.Memory.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/externals/struct.Table.html b/api/wasmtime/externals/struct.Table.html new file mode 100644 index 000000000000..d68cd5d571d3 --- /dev/null +++ b/api/wasmtime/externals/struct.Table.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.Table.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/frame_info/struct.FrameInfo.html b/api/wasmtime/frame_info/struct.FrameInfo.html new file mode 100644 index 000000000000..d0754d75c84f --- /dev/null +++ b/api/wasmtime/frame_info/struct.FrameInfo.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.FrameInfo.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/func/struct.Func.html b/api/wasmtime/func/struct.Func.html new file mode 100644 index 000000000000..31ac0f0b9a4d --- /dev/null +++ b/api/wasmtime/func/struct.Func.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.Func.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/func/trait.WasmRet.html b/api/wasmtime/func/trait.WasmRet.html new file mode 100644 index 000000000000..dc5250344eab --- /dev/null +++ b/api/wasmtime/func/trait.WasmRet.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/trait.WasmRet.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/func/trait.WasmTy.html b/api/wasmtime/func/trait.WasmTy.html new file mode 100644 index 000000000000..4cdbeded1e34 --- /dev/null +++ b/api/wasmtime/func/trait.WasmTy.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/trait.WasmTy.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/index.html b/api/wasmtime/index.html new file mode 100644 index 000000000000..bcf1b4d7a0ad --- /dev/null +++ b/api/wasmtime/index.html @@ -0,0 +1,52 @@ +wasmtime - Rust

[][src]Crate wasmtime

Wasmtime's embedding API

+

This crate contains a high-level API used to interact with WebAssembly +modules. The API here is intended to mirror the proposed WebAssembly C +API, with small extensions here +and there to implement Rust idioms. This crate also defines the actual C API +itself for consumption from other languages.

+

Modules

+
unix

Unix-specific extension for the wasmtime crate.

+

Structs

+
Config

Global configuration options used to create an Engine and customize its +behavior.

+
Engine

An Engine which is a global context for compilation and management of wasm +modules.

+
ExportType

A descriptor for an exported WebAssembly value.

+
FrameInfo

Description of a frame in a backtrace for a [Trap].

+
Func

A WebAssembly function which can be called.

+
FuncType

A descriptor for a function in a WebAssembly module.

+
Global

A WebAssembly global value which can be read and written to.

+
GlobalType

A WebAssembly global descriptor.

+
HostRef

Represents a piece of data located in the host environment.

+
ImportType

A descriptor for an imported value into a wasm module.

+
Instance

An instantiated WebAssembly module.

+
Limits

Limits of tables/memories where the units of the limits are defined by the +table/memory types.

+
Memory

A WebAssembly linear memory.

+
MemoryType

A descriptor for a WebAssembly memory type.

+
Module

A compiled WebAssembly module, ready to be instantiated.

+
Store

A Store is a shared cache of information between WebAssembly modules.

+
Table

A WebAssembly table, or an array of values.

+
TableType

A descriptor for a table in a WebAssembly module.

+
Trap

A struct representing an aborted instruction execution, with a message +indicating the cause.

+

Enums

+
AnyRef

Represents an opaque reference to any data within WebAssembly.

+
Extern

An external item to a WebAssembly module, or a list of what can possibly be +exported from a wasm module.

+
ExternType

A list of all possible types which can be externally referenced from a +WebAssembly module.

+
Mutability

Indicator of whether a global is mutable or not

+
OptLevel

Possible optimization levels for the Cranelift codegen backend.

+
Strategy

Possible Compilation strategies for a wasm module.

+
Val

Possible runtime values that a WebAssembly module can either consume or +produce.

+
ValType

A list of all possible value types in WebAssembly.

+

Traits

+
Callable

A trait representing a function that can be imported and called from inside +WebAssembly.

+
HostInfo
WasmRet

A trait implemented for types which can be returned from closures passed to +Func::wrap1 and friends.

+
WasmTy

A trait implemented for types which can be arguments to closures passed to +Func::wrap1 and friends.

+
\ No newline at end of file diff --git a/api/wasmtime/instance/struct.Instance.html b/api/wasmtime/instance/struct.Instance.html new file mode 100644 index 000000000000..da2c51fa8722 --- /dev/null +++ b/api/wasmtime/instance/struct.Instance.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.Instance.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/module/struct.Module.html b/api/wasmtime/module/struct.Module.html new file mode 100644 index 000000000000..cc95f8b9089f --- /dev/null +++ b/api/wasmtime/module/struct.Module.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.Module.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/ref/enum.AnyRef.html b/api/wasmtime/ref/enum.AnyRef.html new file mode 100644 index 000000000000..8df507fb5a1a --- /dev/null +++ b/api/wasmtime/ref/enum.AnyRef.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/enum.AnyRef.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/ref/struct.HostRef.html b/api/wasmtime/ref/struct.HostRef.html new file mode 100644 index 000000000000..c15415726cb0 --- /dev/null +++ b/api/wasmtime/ref/struct.HostRef.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.HostRef.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/ref/trait.HostInfo.html b/api/wasmtime/ref/trait.HostInfo.html new file mode 100644 index 000000000000..35e4a584dd71 --- /dev/null +++ b/api/wasmtime/ref/trait.HostInfo.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/trait.HostInfo.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/runtime/enum.OptLevel.html b/api/wasmtime/runtime/enum.OptLevel.html new file mode 100644 index 000000000000..6f9336789bf3 --- /dev/null +++ b/api/wasmtime/runtime/enum.OptLevel.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/enum.OptLevel.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/runtime/enum.Strategy.html b/api/wasmtime/runtime/enum.Strategy.html new file mode 100644 index 000000000000..700cfd5c4b47 --- /dev/null +++ b/api/wasmtime/runtime/enum.Strategy.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/enum.Strategy.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/runtime/struct.Config.html b/api/wasmtime/runtime/struct.Config.html new file mode 100644 index 000000000000..bbdc3a956005 --- /dev/null +++ b/api/wasmtime/runtime/struct.Config.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.Config.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/runtime/struct.Engine.html b/api/wasmtime/runtime/struct.Engine.html new file mode 100644 index 000000000000..60b9aef59544 --- /dev/null +++ b/api/wasmtime/runtime/struct.Engine.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.Engine.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/runtime/struct.Store.html b/api/wasmtime/runtime/struct.Store.html new file mode 100644 index 000000000000..58e38d39ed50 --- /dev/null +++ b/api/wasmtime/runtime/struct.Store.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.Store.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/sidebar-items.js b/api/wasmtime/sidebar-items.js new file mode 100644 index 000000000000..1c30aae9521c --- /dev/null +++ b/api/wasmtime/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["AnyRef","Represents an opaque reference to any data within WebAssembly."],["Extern","An external item to a WebAssembly module, or a list of what can possibly be exported from a wasm module."],["ExternType","A list of all possible types which can be externally referenced from a WebAssembly module."],["Mutability","Indicator of whether a global is mutable or not"],["OptLevel","Possible optimization levels for the Cranelift codegen backend."],["Strategy","Possible Compilation strategies for a wasm module."],["Val","Possible runtime values that a WebAssembly module can either consume or produce."],["ValType","A list of all possible value types in WebAssembly."]],"mod":[["unix","Unix-specific extension for the `wasmtime` crate."]],"struct":[["Config","Global configuration options used to create an [`Engine`] and customize its behavior."],["Engine","An `Engine` which is a global context for compilation and management of wasm modules."],["ExportType","A descriptor for an exported WebAssembly value."],["FrameInfo","Description of a frame in a backtrace for a [`Trap`]."],["Func","A WebAssembly function which can be called."],["FuncType","A descriptor for a function in a WebAssembly module."],["Global","A WebAssembly `global` value which can be read and written to."],["GlobalType","A WebAssembly global descriptor."],["HostRef","Represents a piece of data located in the host environment."],["ImportType","A descriptor for an imported value into a wasm module."],["Instance","An instantiated WebAssembly module."],["Limits","Limits of tables/memories where the units of the limits are defined by the table/memory types."],["Memory","A WebAssembly linear memory."],["MemoryType","A descriptor for a WebAssembly memory type."],["Module","A compiled WebAssembly module, ready to be instantiated."],["Store","A `Store` is a shared cache of information between WebAssembly modules."],["Table","A WebAssembly `table`, or an array of values."],["TableType","A descriptor for a table in a WebAssembly module."],["Trap","A struct representing an aborted instruction execution, with a message indicating the cause."]],"trait":[["Callable","A trait representing a function that can be imported and called from inside WebAssembly. # Example ``` use wasmtime::Val;"],["HostInfo",""],["WasmRet","A trait implemented for types which can be returned from closures passed to [`Func::wrap1`] and friends."],["WasmTy","A trait implemented for types which can be arguments to closures passed to [`Func::wrap1`] and friends."]]}); \ No newline at end of file diff --git a/api/wasmtime/struct.Config.html b/api/wasmtime/struct.Config.html new file mode 100644 index 000000000000..c8a12a9dd52c --- /dev/null +++ b/api/wasmtime/struct.Config.html @@ -0,0 +1,120 @@ +wasmtime::Config - Rust

[][src]Struct wasmtime::Config

pub struct Config { /* fields omitted */ }

Global configuration options used to create an Engine and customize its +behavior.

+

This structure exposed a builder-like interface and is primarily consumed by +Engine::new()

+

Methods

impl Config[src]

pub fn new() -> Config[src]

Creates a new configuration object with the default configuration +specified.

+

pub fn debug_info(&mut self, enable: bool) -> &mut Self[src]

Configures whether DWARF debug information will be emitted during +compilation.

+

By default this option is false.

+

pub fn wasm_threads(&mut self, enable: bool) -> &mut Self[src]

Configures whether the WebAssembly threads proposal will be enabled for +compilation.

+

The WebAssembly threads proposal is not currently fully +standardized and is undergoing development. Additionally the support in +wasmtime itself is still being worked on. Support for this feature can +be enabled through this method for appropriate wasm modules.

+

This feature gates items such as shared memories and atomic +instructions. Note that enabling the threads feature will +also enable the bulk memory feature.

+

This is false by default.

+

pub fn wasm_reference_types(&mut self, enable: bool) -> &mut Self[src]

Configures whether the WebAssembly reference types proposal will be +enabled for compilation.

+

The WebAssembly reference types proposal is not currently +fully standardized and is undergoing development. Additionally the +support in wasmtime itself is still being worked on. Support for this +feature can be enabled through this method for appropriate wasm +modules.

+

This feature gates items such as the anyref type and multiple tables +being in a module. Note that enabling the reference types feature will +also enable the bulk memory feature.

+

This is false by default.

+

pub fn wasm_simd(&mut self, enable: bool) -> &mut Self[src]

Configures whether the WebAssembly SIMD proposal will be +enabled for compilation.

+

The WebAssembly SIMD proposal is not currently +fully standardized and is undergoing development. Additionally the +support in wasmtime itself is still being worked on. Support for this +feature can be enabled through this method for appropriate wasm +modules.

+

This feature gates items such as the v128 type and all of its +operators being in a module.

+

This is false by default.

+

pub fn wasm_bulk_memory(&mut self, enable: bool) -> &mut Self[src]

Configures whether the WebAssembly bulk memory operations proposal will +be enabled for compilation.

+

The WebAssembly bulk memory operations proposal is not +currently fully standardized and is undergoing development. +Additionally the support in wasmtime itself is still being worked on. +Support for this feature can be enabled through this method for +appropriate wasm modules.

+

This feature gates items such as the memory.copy instruction, passive +data/table segments, etc, being in a module.

+

This is false by default.

+

pub fn wasm_multi_value(&mut self, enable: bool) -> &mut Self[src]

Configures whether the WebAssembly multi-value proposal will +be enabled for compilation.

+

The WebAssembly multi-value proposal is not +currently fully standardized and is undergoing development. +Additionally the support in wasmtime itself is still being worked on. +Support for this feature can be enabled through this method for +appropriate wasm modules.

+

This feature gates functions and blocks returning multiple values in a +module, for example.

+

This is false by default.

+

pub fn strategy(&mut self, strategy: Strategy) -> Result<&mut Self>[src]

Configures which compilation strategy will be used for wasm modules.

+

This method can be used to configure which compiler is used for wasm +modules, and for more documentation consult the Strategy enumeration +and its documentation.

+

The default value for this is Strategy::Auto.

+

Errors

+

Some compilation strategies require compile-time options of wasmtime +itself to be set, but if they're not set and the strategy is specified +here then an error will be returned.

+

pub fn cranelift_debug_verifier(&mut self, enable: bool) -> &mut Self[src]

Configures whether the debug verifier of Cranelift is enabled or not.

+

When Cranelift is used as a code generation backend this will configure +it to have the enable_verifier flag which will enable a number of debug +checks inside of Cranelift. This is largely only useful for the +developers of wasmtime itself.

+

The default value for this is false

+

pub fn cranelift_opt_level(&mut self, level: OptLevel) -> &mut Self[src]

Configures the Cranelift code generator optimization level.

+

When the Cranelift code generator is used you can configure the +optimization level used for generated code in a few various ways. For +more information see the documentation of OptLevel.

+

The default value for this is OptLevel::None.

+

pub fn cache_config_load(&mut self, path: impl AsRef<Path>) -> Result<&mut Self>[src]

Loads cache configuration specified at path.

+

This method will read the file specified by path on the filesystem and +attempt to load cache configuration from it. This method can also fail +due to I/O errors, misconfiguration, syntax errors, etc. For expected +syntax in the configuration file see the documentation online.

+

By default cache configuration is not enabled or loaded.

+

Errors

+

This method can fail due to any error that happens when loading the file +pointed to by path and attempting to load the cache configuration.

+

pub fn cache_config_load_default(&mut self) -> Result<&mut Self>[src]

Loads cache configuration from the system default path.

+

This commit is the same as Config::cache_config_load except that it +does not take a path argument and instead loads the default +configuration present on the system. This is located, for example, on +Unix at $HOME/.config/wasmtime/config.toml and is typically created +with the wasmtime config new command.

+

By default cache configuration is not enabled or loaded.

+

Errors

+

This method can fail due to any error that happens when loading the +default system configuration. Note that it is not an error if the +default config file does not exist, in which case the default settings +for an enabled cache are applied.

+

Trait Implementations

impl Clone for Config[src]

impl Debug for Config[src]

impl Default for Config[src]

Auto Trait Implementations

impl RefUnwindSafe for Config

impl Send for Config

impl Sync for Config

impl Unpin for Config

impl UnwindSafe for Config

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.Engine.html b/api/wasmtime/struct.Engine.html new file mode 100644 index 000000000000..d6680f1cfee5 --- /dev/null +++ b/api/wasmtime/struct.Engine.html @@ -0,0 +1,37 @@ +wasmtime::Engine - Rust

[][src]Struct wasmtime::Engine

pub struct Engine { /* fields omitted */ }

An Engine which is a global context for compilation and management of wasm +modules.

+

An engine can be safely shared across threads and is a cheap cloneable +handle to the actual engine. The engine itself will be deallocate once all +references to it have gone away.

+

Engines store global configuration preferences such as compilation settings, +enabled features, etc. You'll likely only need at most one of these for a +program.

+

Engines and Clone

+

Using clone on an Engine is a cheap operation. It will not create an +entirely new engine, but rather just a new reference to the existing engine. +In other words it's a shallow copy, not a deep copy.

+

Engines and Default

+

You can create an engine with default configuration settings using +Engine::default(). Be sure to consult the documentation of Config for +default settings.

+

Methods

impl Engine[src]

pub fn new(config: &Config) -> Engine[src]

Creates a new Engine with the specified compilation and +configuration settings.

+

pub fn config(&self) -> &Config[src]

Returns the configuration settings that this engine is using.

+

Trait Implementations

impl Clone for Engine[src]

impl Default for Engine[src]

Auto Trait Implementations

impl RefUnwindSafe for Engine

impl Send for Engine

impl Sync for Engine

impl Unpin for Engine

impl UnwindSafe for Engine

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.ExportType.html b/api/wasmtime/struct.ExportType.html new file mode 100644 index 000000000000..f0c01ff8b0e5 --- /dev/null +++ b/api/wasmtime/struct.ExportType.html @@ -0,0 +1,27 @@ +wasmtime::ExportType - Rust

[][src]Struct wasmtime::ExportType

pub struct ExportType { /* fields omitted */ }

A descriptor for an exported WebAssembly value.

+

This type is primarily accessed from the +Module::exports accessor and describes what +names are exported from a wasm module and the type of the item that is +exported.

+

Methods

impl ExportType[src]

pub fn new(name: &str, ty: ExternType) -> ExportType[src]

Creates a new export which is exported with the given name and has the +given ty.

+

pub fn name(&self) -> &str[src]

Returns the name by which this export is known by.

+

pub fn ty(&self) -> &ExternType[src]

Returns the type of this export.

+

Trait Implementations

impl Clone for ExportType[src]

impl Debug for ExportType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.FrameInfo.html b/api/wasmtime/struct.FrameInfo.html new file mode 100644 index 000000000000..1edbd7592c5e --- /dev/null +++ b/api/wasmtime/struct.FrameInfo.html @@ -0,0 +1,37 @@ +wasmtime::FrameInfo - Rust

[][src]Struct wasmtime::FrameInfo

pub struct FrameInfo { /* fields omitted */ }

Description of a frame in a backtrace for a [Trap].

+

Whenever a WebAssembly trap occurs an instance of [Trap] is created. Each +[Trap] has a backtrace of the WebAssembly frames that led to the trap, and +each frame is described by this structure.

+

Methods

impl FrameInfo[src]

pub fn func_index(&self) -> u32[src]

Returns the WebAssembly function index for this frame.

+

This function index is the index in the function index space of the +WebAssembly module that this frame comes from.

+

pub fn module_name(&self) -> Option<&str>[src]

Returns the identifer of the module that this frame is for.

+

Module identifiers are present in the name section of a WebAssembly +binary, but this may not return the exact item in the name section. +Module names can be overwritten at construction time or perhaps inferred +from file names. The primary purpose of this function is to assist in +debugging and therefore may be tweaked over time.

+

This function returns None when no name can be found or inferred.

+

pub fn func_name(&self) -> Option<&str>[src]

Returns a descriptive name of the function for this frame, if one is +available.

+

The name of this function may come from the name section of the +WebAssembly binary, or wasmtime may try to infer a better name for it if +not available, for example the name of the export if it's exported.

+

This return value is primarily used for debugging and human-readable +purposes for things like traps. Note that the exact return value may be +tweaked over time here and isn't guaranteed to be something in +particular about a wasm module due to its primary purpose of assisting +in debugging.

+

This function returns None when no name could be inferred.

+

Trait Implementations

impl Debug for FrameInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.Func.html b/api/wasmtime/struct.Func.html new file mode 100644 index 000000000000..9d7d6d71ce48 --- /dev/null +++ b/api/wasmtime/struct.Func.html @@ -0,0 +1,147 @@ +wasmtime::Func - Rust

[][src]Struct wasmtime::Func

pub struct Func { /* fields omitted */ }

A WebAssembly function which can be called.

+

This type can represent a number of callable items, such as:

+
    +
  • An exported function from a WebAssembly module.
  • +
  • A user-defined function used to satisfy an import.
  • +
+

These types of callable items are all wrapped up in this Func and can be +used to both instantiate an Instance as well as be +extracted from an Instance.

+

Func and Clone

+

Functions are internally reference counted so you can clone a Func. The +cloning process only performs a shallow clone, so two cloned Func +instances are equivalent in their functionality.

+

Methods

impl Func[src]

pub fn new(
    store: &Store,
    ty: FuncType,
    callable: Rc<dyn Callable + 'static>
) -> Self
[src]

Creates a new Func with the given arguments, typically to create a +user-defined function to pass as an import to a module.

+
    +
  • +

    store - a cache of data where information is stored, typically +shared with a Module.

    +
  • +
  • +

    ty - the signature of this function, used to indicate what the +inputs and outputs are, which must be WebAssembly types.

    +
  • +
  • +

    callable - a type implementing the Callable trait which +is the implementation of this Func value.

    +
  • +
+

Note that the implementation of callable must adhere to the ty +signature given, error or traps may occur if it does not respect the +ty signature.

+

pub fn wrap0<F, R>(store: &Store, func: F) -> Func where
    F: Fn() -> R + 'static,
    R: WasmRet
[src]

Creates a new Func from the given Rust closure, which takes 0 +arguments.

+

For more information about this function, see Func::wrap1.

+

pub fn wrap1<F, A, R>(store: &Store, func: F) -> Func where
    F: Fn(A) -> R + 'static,
    A: WasmTy,
    R: WasmRet
[src]

Creates a new Func from the given Rust closure, which takes 1 +argument.

+

This function will create a new Func which, when called, will +execute the given Rust closure. Unlike Func::new the target +function being called is known statically so the type signature can +be inferred. Rust types will map to WebAssembly types as follows:

+ + + + + + + +
Rust Argument TypeWebAssembly Type
i32i32
i64i64
f32f32
f64f64
(not supported)v128
(not supported)anyref
+

Any of the Rust types can be returned from the closure as well, in +addition to some extra types

+ + + +
Rust Return TypeWebAssembly Return TypeMeaning
()nothingno return value
Result<T, Trap>Tfunction may trap
+

Note that when using this API (and the related wrap* family of +functions), the intention is to create as thin of a layer as +possible for when WebAssembly calls the function provided. With +sufficient inlining and optimization the WebAssembly will call +straight into func provided, with no extra fluff entailed.

+

pub fn wrap2<F, A, B, R>(store: &Store, func: F) -> Func where
    F: Fn(A, B) -> R + 'static,
    A: WasmTy,
    B: WasmTy,
    R: WasmRet
[src]

Creates a new Func from the given Rust closure, which takes 2 +arguments.

+

For more information about this function, see Func::wrap1.

+

pub fn wrap3<F, A, B, C, R>(store: &Store, func: F) -> Func where
    F: Fn(A, B, C) -> R + 'static,
    A: WasmTy,
    B: WasmTy,
    C: WasmTy,
    R: WasmRet
[src]

Creates a new Func from the given Rust closure, which takes 3 +arguments.

+

For more information about this function, see Func::wrap1.

+

pub fn wrap4<F, A, B, C, D, R>(store: &Store, func: F) -> Func where
    F: Fn(A, B, C, D) -> R + 'static,
    A: WasmTy,
    B: WasmTy,
    C: WasmTy,
    D: WasmTy,
    R: WasmRet
[src]

Creates a new Func from the given Rust closure, which takes 4 +arguments.

+

For more information about this function, see Func::wrap1.

+

pub fn wrap5<F, A, B, C, D, E, R>(store: &Store, func: F) -> Func where
    F: Fn(A, B, C, D, E) -> R + 'static,
    A: WasmTy,
    B: WasmTy,
    C: WasmTy,
    D: WasmTy,
    E: WasmTy,
    R: WasmRet
[src]

Creates a new Func from the given Rust closure, which takes 5 +arguments.

+

For more information about this function, see Func::wrap1.

+

pub fn wrap6<F, A, B, C, D, E, G, R>(store: &Store, func: F) -> Func where
    F: Fn(A, B, C, D, E, G) -> R + 'static,
    A: WasmTy,
    B: WasmTy,
    C: WasmTy,
    D: WasmTy,
    E: WasmTy,
    G: WasmTy,
    R: WasmRet
[src]

Creates a new Func from the given Rust closure, which takes 6 +arguments.

+

For more information about this function, see Func::wrap1.

+

pub fn wrap7<F, A, B, C, D, E, G, H, R>(store: &Store, func: F) -> Func where
    F: Fn(A, B, C, D, E, G, H) -> R + 'static,
    A: WasmTy,
    B: WasmTy,
    C: WasmTy,
    D: WasmTy,
    E: WasmTy,
    G: WasmTy,
    H: WasmTy,
    R: WasmRet
[src]

Creates a new Func from the given Rust closure, which takes 7 +arguments.

+

For more information about this function, see Func::wrap1.

+

pub fn wrap8<F, A, B, C, D, E, G, H, I, R>(store: &Store, func: F) -> Func where
    F: Fn(A, B, C, D, E, G, H, I) -> R + 'static,
    A: WasmTy,
    B: WasmTy,
    C: WasmTy,
    D: WasmTy,
    E: WasmTy,
    G: WasmTy,
    H: WasmTy,
    I: WasmTy,
    R: WasmRet
[src]

Creates a new Func from the given Rust closure, which takes 8 +arguments.

+

For more information about this function, see Func::wrap1.

+

pub fn wrap9<F, A, B, C, D, E, G, H, I, J, R>(store: &Store, func: F) -> Func where
    F: Fn(A, B, C, D, E, G, H, I, J) -> R + 'static,
    A: WasmTy,
    B: WasmTy,
    C: WasmTy,
    D: WasmTy,
    E: WasmTy,
    G: WasmTy,
    H: WasmTy,
    I: WasmTy,
    J: WasmTy,
    R: WasmRet
[src]

Creates a new Func from the given Rust closure, which takes 9 +arguments.

+

For more information about this function, see Func::wrap1.

+

pub fn wrap10<F, A, B, C, D, E, G, H, I, J, K, R>(
    store: &Store,
    func: F
) -> Func where
    F: Fn(A, B, C, D, E, G, H, I, J, K) -> R + 'static,
    A: WasmTy,
    B: WasmTy,
    C: WasmTy,
    D: WasmTy,
    E: WasmTy,
    G: WasmTy,
    H: WasmTy,
    I: WasmTy,
    J: WasmTy,
    K: WasmTy,
    R: WasmRet
[src]

Creates a new Func from the given Rust closure, which takes 10 +arguments.

+

For more information about this function, see Func::wrap1.

+

pub fn ty(&self) -> &FuncType[src]

Returns the underlying wasm type that this Func has.

+

pub fn param_arity(&self) -> usize[src]

Returns the number of parameters that this function takes.

+

pub fn result_arity(&self) -> usize[src]

Returns the number of results this function produces.

+

pub fn call(&self, params: &[Val]) -> Result<Box<[Val]>, Trap>[src]

Invokes this function with the params given, returning the results and +any trap, if one occurs.

+

The params here must match the type signature of this Func, or a +trap will occur. If a trap occurs while executing this function, then a +trap will also be returned.

+

This function should not panic unless the underlying function itself +initiates a panic.

+

pub fn get0<R>(&self) -> Option<impl Fn() -> Result<R, Trap>> where
    R: WasmTy
[src]

Extracts a natively-callable object from this Func, if the +signature matches.

+

See the Func::get1 method for more documentation.

+

pub fn get1<A, R>(&self) -> Option<impl Fn(A) -> Result<R, Trap>> where
    A: WasmTy,
    R: WasmTy
[src]

Extracts a natively-callable object from this Func, if the +signature matches.

+

This function serves as an optimized version of the Func::call +method if the type signature of a function is statically known to +the program. This method is faster than call on a few metrics:

+
    +
  • Runtime type-checking only happens once, when this method is +called.
  • +
  • The result values, if any, aren't boxed into a vector.
  • +
  • Arguments and return values don't go through boxing and unboxing.
  • +
  • No trampolines are used to transfer control flow to/from JIT code, +instead this function jumps directly into JIT code.
  • +
+

For more information about which Rust types match up to which wasm +types, see the documentation on Func::wrap1.

+

Return

+

This function will return None if the type signature asserted +statically does not match the runtime type signature. Some, +however, will be returned if the underlying function takes one +parameter of type A and returns the parameter R. Currently R +can either be () (no return values) or one wasm type. At this time +a multi-value return isn't supported.

+

The returned closure will always return a Result<R, Trap> and an +Err is returned if a trap happens while the wasm is executing.

+

pub fn get2<A, B, R>(&self) -> Option<impl Fn(A, B) -> Result<R, Trap>> where
    A: WasmTy,
    B: WasmTy,
    R: WasmTy
[src]

Extracts a natively-callable object from this Func, if the +signature matches.

+

See the Func::get1 method for more documentation.

+

Trait Implementations

impl Clone for Func[src]

impl Debug for Func[src]

impl From<Func> for Extern[src]

impl From<Func> for Val[src]

Auto Trait Implementations

impl !RefUnwindSafe for Func

impl !Send for Func

impl !Sync for Func

impl Unpin for Func

impl !UnwindSafe for Func

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.FuncType.html b/api/wasmtime/struct.FuncType.html new file mode 100644 index 000000000000..367df05196c4 --- /dev/null +++ b/api/wasmtime/struct.FuncType.html @@ -0,0 +1,25 @@ +wasmtime::FuncType - Rust

[][src]Struct wasmtime::FuncType

pub struct FuncType { /* fields omitted */ }

A descriptor for a function in a WebAssembly module.

+

WebAssembly functions can have 0 or more parameters and results.

+

Methods

impl FuncType[src]

pub fn new(params: Box<[ValType]>, results: Box<[ValType]>) -> FuncType[src]

Creates a new function descriptor from the given parameters and results.

+

The function descriptor returned will represent a function which takes +params as arguments and returns results when it is finished.

+

pub fn params(&self) -> &[ValType][src]

Returns the list of parameter types for this function.

+

pub fn results(&self) -> &[ValType][src]

Returns the list of result types for this function.

+

Trait Implementations

impl Clone for FuncType[src]

impl Debug for FuncType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.Global.html b/api/wasmtime/struct.Global.html new file mode 100644 index 000000000000..e0a22bab3666 --- /dev/null +++ b/api/wasmtime/struct.Global.html @@ -0,0 +1,43 @@ +wasmtime::Global - Rust

[][src]Struct wasmtime::Global

pub struct Global { /* fields omitted */ }

A WebAssembly global value which can be read and written to.

+

A global in WebAssembly is sort of like a global variable within an +Instance. The global.get and global.set +instructions will modify and read global values in a wasm module. Globals +can either be imported or exported from wasm modules.

+

If you're familiar with Rust already you can think of a Global as a sort +of Rc<Cell<Val>>, more or less.

+

Global and Clone

+

Globals are internally reference counted so you can clone a Global. The +cloning process only performs a shallow clone, so two cloned Global +instances are equivalent in their functionality.

+

Methods

impl Global[src]

pub fn new(store: &Store, ty: GlobalType, val: Val) -> Result<Global>[src]

Creates a new WebAssembly global value with the provide type ty and +initial value val.

+

The store argument provided is used as a general global cache for +information, and otherwise the ty and val arguments are used to +initialize the global.

+

Errors

+

Returns an error if the ty provided does not match the type of the +value val.

+

pub fn ty(&self) -> &GlobalType[src]

Returns the underlying type of this global.

+

pub fn get(&self) -> Val[src]

Returns the current Val of this global.

+

pub fn set(&self, val: Val) -> Result<()>[src]

Attempts to set the current value of this global to Val.

+

Errors

+

Returns an error if this global has a different type than Val, or if +it's not a mutable global.

+

Trait Implementations

impl Clone for Global[src]

impl From<Global> for Extern[src]

Auto Trait Implementations

impl !RefUnwindSafe for Global

impl !Send for Global

impl !Sync for Global

impl Unpin for Global

impl !UnwindSafe for Global

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.GlobalType.html b/api/wasmtime/struct.GlobalType.html new file mode 100644 index 000000000000..07e9a9aeed93 --- /dev/null +++ b/api/wasmtime/struct.GlobalType.html @@ -0,0 +1,26 @@ +wasmtime::GlobalType - Rust

[][src]Struct wasmtime::GlobalType

pub struct GlobalType { /* fields omitted */ }

A WebAssembly global descriptor.

+

This type describes an instance of a global in a WebAssembly module. Globals +are local to an Instance and are either immutable or +mutable.

+

Methods

impl GlobalType[src]

pub fn new(content: ValType, mutability: Mutability) -> GlobalType[src]

Creates a new global descriptor of the specified content type and +whether or not it's mutable.

+

pub fn content(&self) -> &ValType[src]

Returns the value type of this global descriptor.

+

pub fn mutability(&self) -> Mutability[src]

Returns whether or not this global is mutable.

+

Trait Implementations

impl Clone for GlobalType[src]

impl Debug for GlobalType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.HostRef.html b/api/wasmtime/struct.HostRef.html new file mode 100644 index 000000000000..9acd93bedfcb --- /dev/null +++ b/api/wasmtime/struct.HostRef.html @@ -0,0 +1,32 @@ +wasmtime::HostRef - Rust

[][src]Struct wasmtime::HostRef

pub struct HostRef<T>(_);

Represents a piece of data located in the host environment.

+

Methods

impl<T: 'static> HostRef<T>[src]

pub fn new(item: T) -> HostRef<T>[src]

Creates a new HostRef<T> from T.

+

pub fn borrow(&self) -> Ref<T>[src]

Immutably borrows the wrapped data.

+

Panics

+

Panics if the value is currently mutably borrowed.

+

pub fn borrow_mut(&self) -> RefMut<T>[src]

Mutably borrows the wrapped data.

+

Panics

+

Panics if the HostRef<T> is already borrowed.

+

pub fn ptr_eq(&self, other: &HostRef<T>) -> bool[src]

Returns true if the two HostRef<T>'s point to the same value (not just +values that compare as equal).

+

pub fn anyref(&self) -> AnyRef[src]

Returns an opaque reference to the wrapped data in the form of +an AnyRef.

+

Panics

+

Panics if HostRef<T> is already mutably borrowed.

+

Trait Implementations

impl<T> Clone for HostRef<T>[src]

impl<T: Debug> Debug for HostRef<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for HostRef<T>

impl<T> !Send for HostRef<T>

impl<T> !Sync for HostRef<T>

impl<T> Unpin for HostRef<T>

impl<T> !UnwindSafe for HostRef<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.ImportType.html b/api/wasmtime/struct.ImportType.html new file mode 100644 index 000000000000..b44bc1133252 --- /dev/null +++ b/api/wasmtime/struct.ImportType.html @@ -0,0 +1,29 @@ +wasmtime::ImportType - Rust

[][src]Struct wasmtime::ImportType

pub struct ImportType { /* fields omitted */ }

A descriptor for an imported value into a wasm module.

+

This type is primarily accessed from the +Module::imports API. Each ImportType +describes an import into the wasm module with the module/name that it's +imported from as well as the type of item that's being imported.

+

Methods

impl ImportType[src]

pub fn new(module: &str, name: &str, ty: ExternType) -> ImportType[src]

Creates a new import descriptor which comes from module and name and +is of type ty.

+

pub fn module(&self) -> &str[src]

Returns the module name that this import is expected to come from.

+

pub fn name(&self) -> &str[src]

Returns the field name of the module that this import is expected to +come from.

+

pub fn ty(&self) -> &ExternType[src]

Returns the expected type of this import.

+

Trait Implementations

impl Clone for ImportType[src]

impl Debug for ImportType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.Instance.html b/api/wasmtime/struct.Instance.html new file mode 100644 index 000000000000..3091f7250706 --- /dev/null +++ b/api/wasmtime/struct.Instance.html @@ -0,0 +1,82 @@ +wasmtime::Instance - Rust

[][src]Struct wasmtime::Instance

pub struct Instance { /* fields omitted */ }

An instantiated WebAssembly module.

+

This type represents the instantiation of a Module. Once instantiated +you can access the exports which are of type +Extern and provide the ability to call functions, set globals, read +memory, etc. This is where all the fun stuff happens!

+

An Instance is created from two inputs, a Module and a list of +imports, provided as a list of Extern values. The Module is the wasm +code that was compiled and we're instantiating, and the Extern imports +are how we're satisfying the imports of the module provided. On successful +instantiation an Instance will automatically invoke the wasm start +function.

+

When interacting with any wasm code you'll want to make an Instance to +call any code or execute anything!

+

Methods

impl Instance[src]

pub fn new(module: &Module, imports: &[Extern]) -> Result<Instance, Error>[src]

Creates a new Instance from the previously compiled Module and +list of imports specified.

+

This method instantiates the module provided with the imports, +following the procedure in the core specification to +instantiate. Instantiation can fail for a number of reasons (many +specified below), but if successful the start function will be +automatically run (if provided) and then the Instance will be +returned.

+

Providing Imports

+

The imports array here is a bit tricky. The entries in the list of +imports are intended to correspond 1:1 with the list of imports +returned by Module::imports. Before calling Instance::new you'll +want to inspect the return value of Module::imports and, for each +import type, create an Extern which corresponds to that type. +These Extern values are all then collected into a list and passed to +this function.

+

Note that this function is intentionally relatively low level. It is the +intention that we'll soon provide a higher level API which will +be much more ergonomic for instantiating modules. If you need the full +power of customization of imports, though, this is the method for you!

+

Errors

+

This function can fail for a number of reasons, including, but not +limited to:

+
    +
  • The number of imports provided doesn't match the number of imports +returned by the module's Module::imports method.
  • +
  • The type of any Extern doesn't match the corresponding +[ExternType] entry that it maps to.
  • +
  • The start function in the instance, if present, traps.
  • +
  • Module/instance resource limits are exceeded.
  • +
+

When instantiation fails it's recommended to inspect the return value to +see why it failed, or bubble it upwards. If you'd like to specifically +check for trap errors, you can use error.downcast::<Trap>().

+

pub fn store(&self) -> &Store[src]

Returns the associated Store that this Instance is compiled into.

+

This is the Store that generally serves as a sort of global cache +for various instance-related things.

+

pub fn module(&self) -> &Module[src]

Returns the associated Module that this Instance instantiated.

+

The corresponding Module here is a static version of this Instance +which can be used to learn information such as naming information about +various functions.

+

pub fn exports(&self) -> &[Extern][src]

Returns the list of exported items from this Instance.

+

Note that the exports here do not have names associated with them, +they're simply the values that are exported. To learn the value of each +export you'll need to consult Module::exports. The list returned +here maps 1:1 with the list that Module::exports returns, and +[ExportType] contains the name of each export.

+

pub fn get_export(&self, name: &str) -> Option<&Extern>[src]

Looks up an exported Extern value by name.

+

This method will search the module for an export named name and return +the value, if found.

+

Returns None if there was no export named name.

+

Trait Implementations

impl Clone for Instance[src]

impl InstanceExt for Instance[src]

Auto Trait Implementations

impl !RefUnwindSafe for Instance

impl !Send for Instance

impl !Sync for Instance

impl Unpin for Instance

impl !UnwindSafe for Instance

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.Limits.html b/api/wasmtime/struct.Limits.html new file mode 100644 index 000000000000..3cf4d627ff5a --- /dev/null +++ b/api/wasmtime/struct.Limits.html @@ -0,0 +1,25 @@ +wasmtime::Limits - Rust

[][src]Struct wasmtime::Limits

pub struct Limits { /* fields omitted */ }

Limits of tables/memories where the units of the limits are defined by the +table/memory types.

+

A minimum is always available but the maximum may not be present.

+

Methods

impl Limits[src]

pub fn new(min: u32, max: Option<u32>) -> Limits[src]

Creates a new set of limits with the minimum and maximum both specified.

+

pub fn at_least(min: u32) -> Limits[src]

Creates a new Limits with the min specified and no maximum specified.

+

pub fn min(&self) -> u32[src]

Returns the minimum amount for these limits.

+

pub fn max(&self) -> Option<u32>[src]

Returns the maximum amount for these limits, if specified.

+

Trait Implementations

impl Clone for Limits[src]

impl Debug for Limits[src]

Auto Trait Implementations

impl RefUnwindSafe for Limits

impl Send for Limits

impl Sync for Limits

impl Unpin for Limits

impl UnwindSafe for Limits

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.Memory.html b/api/wasmtime/struct.Memory.html new file mode 100644 index 000000000000..2daa6324c713 --- /dev/null +++ b/api/wasmtime/struct.Memory.html @@ -0,0 +1,86 @@ +wasmtime::Memory - Rust

[][src]Struct wasmtime::Memory

pub struct Memory { /* fields omitted */ }

A WebAssembly linear memory.

+

WebAssembly memories represent a contiguous array of bytes that have a size +that is always a multiple of the WebAssembly page size, currently 64 +kilobytes.

+

WebAssembly memory is used for global data, statics in C/C++/Rust, shadow +stack memory, etc. Accessing wasm memory is generally quite fast!

+

Memory and Clone

+

Memories are internally reference counted so you can clone a Memory. The +cloning process only performs a shallow clone, so two cloned Memory +instances are equivalent in their functionality.

+

Memory and threads

+

It is intended that Memory is safe to share between threads. At this time +this is not implemented in wasmtime, however. This is planned to be +implemented though!

+

Methods

impl Memory[src]

pub fn new(store: &Store, ty: MemoryType) -> Memory[src]

Creates a new WebAssembly memory given the configuration of ty.

+

The store argument is a general location for cache information, and +otherwise the memory will immediately be allocated according to the +type's configuration. All WebAssembly memory is initialized to zero.

+

pub fn ty(&self) -> &MemoryType[src]

Returns the underlying type of this memory.

+

pub unsafe fn data_unchecked(&self) -> &[u8][src]

Returns this memory as a slice view that can be read natively in Rust.

+

Safety

+

This is an unsafe operation because there is no guarantee that the +following operations do not happen concurrently while the slice is in +use:

+
    +
  • Data could be modified by calling into a wasm module.
  • +
  • Memory could be relocated through growth by calling into a wasm +module.
  • +
  • When threads are supported, non-atomic reads will race with other +writes.
  • +
+

Extreme care need be taken when the data of a Memory is read. The +above invariants all need to be upheld at a bare minimum, and in +general you'll need to ensure that while you're looking at slice you're +the only one who can possibly look at the slice and read/write it.

+

Be sure to keep in mind that Memory is reference counted, meaning +that there may be other users of this Memory instance elsewhere in +your program. Additionally Memory can be shared and used in any number +of wasm instances, so calling any wasm code should be considered +dangerous while you're holding a slice of memory.

+

pub unsafe fn data_unchecked_mut(&self) -> &mut [u8][src]

Returns this memory as a slice view that can be read and written +natively in Rust.

+

Safety

+

All of the same safety caveats of Memory::data_unchecked apply +here, doubly so because this is returning a mutable slice! As a +double-extra reminder, remember that Memory is reference counted, so +you can very easily acquire two mutable slices by simply calling this +function twice. Extreme caution should be used when using this method, +and in general you probably want to result to unsafe accessors and the +data methods below.

+

pub fn data_ptr(&self) -> *mut u8[src]

Returns the base pointer, in the host's address space, that the memory +is located at.

+

When reading and manipulating memory be sure to read up on the caveats +of Memory::data_unchecked to make sure that you can safely +read/write the memory.

+

pub fn data_size(&self) -> usize[src]

Returns the byte length of this memory.

+

The returned value will be a multiple of the wasm page size, 64k.

+

pub fn size(&self) -> u32[src]

Returns the size, in pages, of this wasm memory.

+

pub fn grow(&self, delta: u32) -> Result<u32>[src]

Grows this WebAssembly memory by delta pages.

+

This will attempt to add delta more pages of memory on to the end of +this Memory instance. If successful this may relocate the memory and +cause Memory::data_ptr to return a new value. Additionally previous +slices into this memory may no longer be valid.

+

On success returns the number of pages this memory previously had +before the growth succeeded.

+

Errors

+

Returns an error if memory could not be grown, for example if it exceeds +the maximum limits of this memory.

+

Trait Implementations

impl Clone for Memory[src]

impl From<Memory> for Extern[src]

Auto Trait Implementations

impl !RefUnwindSafe for Memory

impl !Send for Memory

impl !Sync for Memory

impl Unpin for Memory

impl !UnwindSafe for Memory

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.MemoryType.html b/api/wasmtime/struct.MemoryType.html new file mode 100644 index 000000000000..5673f05e31fd --- /dev/null +++ b/api/wasmtime/struct.MemoryType.html @@ -0,0 +1,24 @@ +wasmtime::MemoryType - Rust

[][src]Struct wasmtime::MemoryType

pub struct MemoryType { /* fields omitted */ }

A descriptor for a WebAssembly memory type.

+

Memories are described in units of pages (64KB) and represent contiguous +chunks of addressable memory.

+

Methods

impl MemoryType[src]

pub fn new(limits: Limits) -> MemoryType[src]

Creates a new descriptor for a WebAssembly memory given the specified +limits of the memory.

+

pub fn limits(&self) -> &Limits[src]

Returns the limits (in pages) that are configured for this memory.

+

Trait Implementations

impl Clone for MemoryType[src]

impl Debug for MemoryType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.Module.html b/api/wasmtime/struct.Module.html new file mode 100644 index 000000000000..66a455821ec1 --- /dev/null +++ b/api/wasmtime/struct.Module.html @@ -0,0 +1,121 @@ +wasmtime::Module - Rust

[][src]Struct wasmtime::Module

pub struct Module { /* fields omitted */ }

A compiled WebAssembly module, ready to be instantiated.

+

A Module is a compiled in-memory representation of an input WebAssembly +binary. A Module is then used to create an Instance +through an instantiation process. You cannot call functions or fetch +globals, for example, on a Module because it's purely a code +representation. Instead you'll need to create an +Instance to interact with the wasm module.

+

Modules and Clone

+

Using clone on a Module is a cheap operation. It will not create an +entirely new module, but rather just a new reference to the existing module. +In other words it's a shallow copy, not a deep copy.

+

Methods

impl Module[src]

pub fn new(store: &Store, bytes: impl AsRef<[u8]>) -> Result<Module>[src]

Creates a new WebAssembly Module from the given in-memory bytes.

+

The bytes provided must be in one of two formats:

+
    +
  • It can be a binary-encoded WebAssembly module. This +is always supported.
  • +
  • It may also be a text-encoded instance of the WebAssembly +text format. This is only supported when the wat feature of this +crate is enabled. If this is supplied then the text format will be +parsed before validation. Note that the wat feature is enabled by +default.
  • +
+

The data for the wasm module must be loaded in-memory if it's present +elsewhere, for example on disk. This requires that the entire binary is +loaded into memory all at once, this API does not support streaming +compilation of a module.

+

The WebAssembly binary will be decoded and validated. It will also be +compiled according to the configuration of the provided store and +cached in this type.

+

The provided store is a global cache for compiled resources as well as +configuration for what wasm features are enabled. It's recommended to +share a store among modules if possible.

+

Errors

+

This function may fail and return an error. Errors may include +situations such as:

+
    +
  • The binary provided could not be decoded because it's not a valid +WebAssembly binary
  • +
  • The WebAssembly binary may not validate (e.g. contains type errors)
  • +
  • Implementation-specific limits were exceeded with a valid binary (for +example too many locals)
  • +
  • The wasm binary may use features that are not enabled in the +configuration of store
  • +
  • If the wat feature is enabled and the input is text, then it may be +rejected if it fails to parse.
  • +
+

The error returned should contain full information about why module +creation failed if one is returned.

+

pub fn new_with_name(
    store: &Store,
    bytes: impl AsRef<[u8]>,
    name: &str
) -> Result<Module>
[src]

Creates a new WebAssembly Module from the given in-memory binary +data. The provided name will be used in traps/backtrace details.

+

See Module::new for other details.

+

pub fn from_file(store: &Store, file: impl AsRef<Path>) -> Result<Module>[src]

Creates a new WebAssembly Module from the contents of the given +file on disk.

+

This is a convenience function that will read the file provided and +pass the bytes to the Module::new function. For more information +see Module::new

+

pub fn from_binary(store: &Store, binary: &[u8]) -> Result<Module>[src]

Creates a new WebAssembly Module from the given in-memory binary +data.

+

This is similar to Module::new except that it requires that the +binary input is a WebAssembly binary, the text format is not supported +by this function. It's generally recommended to use Module::new, +but if it's required to not support the text format this function can be +used instead.

+

pub unsafe fn from_binary_unchecked(
    store: &Store,
    binary: &[u8]
) -> Result<Module>
[src]

Creates a new WebAssembly Module from the given in-memory binary +data, skipping validation and asserting that binary is a valid +WebAssembly module.

+

This function is the same as Module::new except that it skips the +call to Module::validate and it does not support the text format of +WebAssembly. The WebAssembly binary is not validated for +correctness and it is simply assumed as valid.

+

For more information about creation of a module and the store argument +see the documentation of Module::new.

+

Unsafety

+

This function is unsafe due to the unchecked assumption that the input +binary is valid. If the binary is not actually a valid wasm binary it +may cause invalid machine code to get generated, cause panics, etc.

+

It is only safe to call this method if Module::validate succeeds on +the same arguments passed to this function.

+

Errors

+

This function may fail for many of the same reasons as Module::new. +While this assumes that the binary is valid it still needs to actually +be somewhat valid for decoding purposes, and the basics of decoding can +still fail.

+

pub fn validate(store: &Store, binary: &[u8]) -> Result<()>[src]

Validates binary input data as a WebAssembly binary given the +configuration in store.

+

This function will perform a speedy validation of the binary input +WebAssembly module (which is in binary form, the text format +is not accepted by this function) and return either Ok or Err +depending on the results of validation. The store argument indicates +configuration for WebAssembly features, for example, which are used to +indicate what should be valid and what shouldn't be.

+

Validation automatically happens as part of Module::new, but is a +requirement for [Module::new_unchecked] to be safe.

+

Errors

+

If validation fails for any reason (type check error, usage of a feature +that wasn't enabled, etc) then an error with a description of the +validation issue will be returned.

+

pub fn name(&self) -> Option<&str>[src]

Returns identifier/name that this Module has. This name +is used in traps/backtrace details.

+

pub fn imports(&self) -> &[ImportType][src]

Returns the list of imports that this Module has and must be +satisfied.

+

pub fn exports(&self) -> &[ExportType][src]

Returns the list of exports that this Module has and will be +available after instantiation.

+

pub fn store(&self) -> &Store[src]

Returns the Store that this Module was compiled into.

+

Trait Implementations

impl Clone for Module[src]

Auto Trait Implementations

impl !RefUnwindSafe for Module

impl !Send for Module

impl !Sync for Module

impl Unpin for Module

impl !UnwindSafe for Module

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.Store.html b/api/wasmtime/struct.Store.html new file mode 100644 index 000000000000..90c3e9b51be7 --- /dev/null +++ b/api/wasmtime/struct.Store.html @@ -0,0 +1,37 @@ +wasmtime::Store - Rust

[][src]Struct wasmtime::Store

pub struct Store { /* fields omitted */ }

A Store is a shared cache of information between WebAssembly modules.

+

Each Module is compiled into a Store and a Store is associated with an +Engine. You'll use a Store to attach to a number of global items in +the production of various items for wasm modules.

+

Stores and Clone

+

Using clone on a Store is a cheap operation. It will not create an +entirely new store, but rather just a new reference to the existing object. +In other words it's a shallow copy, not a deep copy.

+

Stores and Default

+

You can create a store with default configuration settings using +Store::default(). This will create a brand new Engine with default +ocnfiguration (see Config for more information).

+

Methods

impl Store[src]

pub fn new(engine: &Engine) -> Store[src]

Creates a new store to be associated with the given Engine.

+

pub fn engine(&self) -> &Engine[src]

Returns the Engine that this store is associated with.

+

pub fn same(a: &Store, b: &Store) -> bool[src]

Returns whether the stores a and b refer to the same underlying +Store.

+

Because the Store type is reference counted multiple clones may point +to the same underlying storage, and this method can be used to determine +whether two stores are indeed the same.

+

Trait Implementations

impl Clone for Store[src]

impl Default for Store[src]

Auto Trait Implementations

impl !RefUnwindSafe for Store

impl !Send for Store

impl !Sync for Store

impl Unpin for Store

impl !UnwindSafe for Store

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.Table.html b/api/wasmtime/struct.Table.html new file mode 100644 index 000000000000..e8474a1e27c3 --- /dev/null +++ b/api/wasmtime/struct.Table.html @@ -0,0 +1,54 @@ +wasmtime::Table - Rust

[][src]Struct wasmtime::Table

pub struct Table { /* fields omitted */ }

A WebAssembly table, or an array of values.

+

Like Memory a table is an indexed array of values, but unlike Memory +it's an array of WebAssembly values rather than bytes. One of the most +common usages of a table is a function table for wasm modules, where each +element has the Func type.

+

Tables, like globals, are not threadsafe and can only be used on one thread. +Tables can be grown in size and each element can be read/written.

+

Table and Clone

+

Tables are internally reference counted so you can clone a Table. The +cloning process only performs a shallow clone, so two cloned Table +instances are equivalent in their functionality.

+

Methods

impl Table[src]

pub fn new(store: &Store, ty: TableType, init: Val) -> Result<Table>[src]

Creates a new Table with the given parameters.

+
    +
  • store - a global cache to store information in
  • +
  • ty - the type of this table, containing both the element type as +well as the initial size and maximum size, if any.
  • +
  • init - the initial value to fill all table entries with, if the +table starts with an initial size.
  • +
+

Errors

+

Returns an error if init does not match the element type of the table.

+

pub fn ty(&self) -> &TableType[src]

Returns the underlying type of this table, including its element type as +well as the maximum/minimum lower bounds.

+

pub fn get(&self, index: u32) -> Option<Val>[src]

Returns the table element value at index.

+

Returns None if index is out of bounds.

+

pub fn set(&self, index: u32, val: Val) -> Result<()>[src]

Writes the val provided into index within this table.

+

Errors

+

Returns an error if index is out of bounds or if val does not have +the right type to be stored in this table.

+

pub fn size(&self) -> u32[src]

Returns the current size of this table.

+

pub fn grow(&self, delta: u32, init: Val) -> Result<u32>[src]

Grows the size of this table by delta more elements, initialization +all new elements to init.

+

Errors

+

Returns an error if the table cannot be grown by delta, for example +if it would cause the table to exceed its maximum size. Also returns an +error if init is not of the right type.

+

Trait Implementations

impl Clone for Table[src]

impl From<Table> for Extern[src]

Auto Trait Implementations

impl !RefUnwindSafe for Table

impl !Send for Table

impl !Sync for Table

impl Unpin for Table

impl !UnwindSafe for Table

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.TableType.html b/api/wasmtime/struct.TableType.html new file mode 100644 index 000000000000..9b7f8402c4dc --- /dev/null +++ b/api/wasmtime/struct.TableType.html @@ -0,0 +1,26 @@ +wasmtime::TableType - Rust

[][src]Struct wasmtime::TableType

pub struct TableType { /* fields omitted */ }

A descriptor for a table in a WebAssembly module.

+

Tables are contiguous chunks of a specific element, typically a funcref or +an anyref. The most common use for tables is a function table through +which call_indirect can invoke other functions.

+

Methods

impl TableType[src]

pub fn new(element: ValType, limits: Limits) -> TableType[src]

Creates a new table descriptor which will contain the specified +element and have the limits applied to its length.

+

pub fn element(&self) -> &ValType[src]

Returns the element value type of this table.

+

pub fn limits(&self) -> &Limits[src]

Returns the limits, in units of elements, of this table.

+

Trait Implementations

impl Clone for TableType[src]

impl Debug for TableType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/struct.Trap.html b/api/wasmtime/struct.Trap.html new file mode 100644 index 000000000000..407e506d4125 --- /dev/null +++ b/api/wasmtime/struct.Trap.html @@ -0,0 +1,35 @@ +wasmtime::Trap - Rust

[][src]Struct wasmtime::Trap

pub struct Trap { /* fields omitted */ }

A struct representing an aborted instruction execution, with a message +indicating the cause.

+

Methods

impl Trap[src]

pub fn new<I: Into<String>>(message: I) -> Self[src]

Creates a new Trap with message.

+

Example

+
+let trap = wasmtime::Trap::new("unexpected error");
+assert_eq!("unexpected error", trap.message());
+

pub fn message(&self) -> &str[src]

Returns a reference the message stored in Trap.

+

pub fn trace(&self) -> &[FrameInfo][src]

Returns a list of function frames in WebAssembly code that led to this +trap happening.

+

Trait Implementations

impl Clone for Trap[src]

impl Debug for Trap[src]

impl Display for Trap[src]

impl Error for Trap[src]

Auto Trait Implementations

impl RefUnwindSafe for Trap

impl Send for Trap

impl Sync for Trap

impl Unpin for Trap

impl UnwindSafe for Trap

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime/trait.Callable.html b/api/wasmtime/trait.Callable.html new file mode 100644 index 000000000000..c82bd3da2862 --- /dev/null +++ b/api/wasmtime/trait.Callable.html @@ -0,0 +1,74 @@ +wasmtime::Callable - Rust

[][src]Trait wasmtime::Callable

pub trait Callable {
+    fn call(&self, params: &[Val], results: &mut [Val]) -> Result<(), Trap>;
+}

A trait representing a function that can be imported and called from inside +WebAssembly.

+

Example

+
+use wasmtime::Val;
+
+struct TimesTwo;
+
+impl wasmtime::Callable for TimesTwo {
+    fn call(&self, params: &[Val], results: &mut [Val]) -> Result<(), wasmtime::Trap> {
+        let mut value = params[0].unwrap_i32();
+        value *= 2;
+        results[0] = value.into();
+
+        Ok(())
+    }
+}
+
+// Simple module that imports our host function ("times_two") and re-exports
+// it as "run".
+let wat = r#"
+   (module
+     (func $times_two (import "" "times_two") (param i32) (result i32))
+     (func
+       (export "run")
+       (param i32)
+       (result i32)
+       (local.get 0)
+       (call $times_two))
+   )
+"#;
+
+// Initialise environment and our module.
+let store = wasmtime::Store::default();
+let module = wasmtime::Module::new(&store, wat)?;
+
+// Define the type of the function we're going to call.
+let times_two_type = wasmtime::FuncType::new(
+    // Parameters
+    Box::new([wasmtime::ValType::I32]),
+    // Results
+    Box::new([wasmtime::ValType::I32])
+);
+
+// Build a reference to the "times_two" function that can be used.
+let times_two_function =
+    wasmtime::Func::new(&store, times_two_type, std::rc::Rc::new(TimesTwo));
+
+// Create module instance that imports our function
+let instance = wasmtime::Instance::new(
+    &module,
+    &[times_two_function.into()]
+)?;
+
+// Get "run" function from the exports.
+let run_function = instance.exports()[0].func().unwrap();
+
+// Borrow and call "run". Returning any error message from Wasm as a string.
+let original = 5i32;
+let results = run_function
+    .call(&[original.into()])
+    .map_err(|trap| trap.to_string())?;
+
+// Compare that the results returned matches what we expect.
+assert_eq!(original * 2, results[0].unwrap_i32());
+
+

Required methods

fn call(&self, params: &[Val], results: &mut [Val]) -> Result<(), Trap>

What is called when the function is invoked in WebAssembly. +params is an immutable list of parameters provided to the function. +results is mutable list of results to be potentially set by your +function. Produces a Trap if the function encounters any errors.

+
Loading content... +

Implementors

Loading content...
\ No newline at end of file diff --git a/api/wasmtime/trait.HostInfo.html b/api/wasmtime/trait.HostInfo.html new file mode 100644 index 000000000000..f38dccaa41d1 --- /dev/null +++ b/api/wasmtime/trait.HostInfo.html @@ -0,0 +1,5 @@ +wasmtime::HostInfo - Rust

[][src]Trait wasmtime::HostInfo

pub trait HostInfo {
+    fn finalize(&mut self) { ... }
+}
+

Provided methods

fn finalize(&mut self)

Loading content... +

Implementors

Loading content...
\ No newline at end of file diff --git a/api/wasmtime/trait.WasmRet.html b/api/wasmtime/trait.WasmRet.html new file mode 100644 index 000000000000..6d391c2d49b8 --- /dev/null +++ b/api/wasmtime/trait.WasmRet.html @@ -0,0 +1,9 @@ +wasmtime::WasmRet - Rust

[][src]Trait wasmtime::WasmRet

pub trait WasmRet { }

A trait implemented for types which can be returned from closures passed to +Func::wrap1 and friends.

+

This trait should not be implemented by user types. This trait may change at +any time internally. The types which implement this trait, however, are +stable over time.

+

For more information see Func::wrap1

+
+

Implementations on Foreign Types

impl<T: WasmTy> WasmRet for Result<T, Trap>[src]

type Abi = T::Abi

Loading content... +

Implementors

impl<T: WasmTy> WasmRet for T[src]

type Abi = T::Abi

Loading content...
\ No newline at end of file diff --git a/api/wasmtime/trait.WasmTy.html b/api/wasmtime/trait.WasmTy.html new file mode 100644 index 000000000000..620ed5ae6082 --- /dev/null +++ b/api/wasmtime/trait.WasmTy.html @@ -0,0 +1,9 @@ +wasmtime::WasmTy - Rust

[][src]Trait wasmtime::WasmTy

pub trait WasmTy { }

A trait implemented for types which can be arguments to closures passed to +Func::wrap1 and friends.

+

This trait should not be implemented by user types. This trait may change at +any time internally. The types which implement this trait, however, are +stable over time.

+

For more information see Func::wrap1

+
+

Implementations on Foreign Types

impl WasmTy for ()[src]

type Abi = ()

impl WasmTy for i32[src]

type Abi = Self

impl WasmTy for i64[src]

type Abi = Self

impl WasmTy for f32[src]

type Abi = Self

impl WasmTy for f64[src]

type Abi = Self

Loading content... +

Implementors

Loading content...
\ No newline at end of file diff --git a/api/wasmtime/trap/struct.Trap.html b/api/wasmtime/trap/struct.Trap.html new file mode 100644 index 000000000000..f1bfae27e4b8 --- /dev/null +++ b/api/wasmtime/trap/struct.Trap.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.Trap.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/types/enum.ExternType.html b/api/wasmtime/types/enum.ExternType.html new file mode 100644 index 000000000000..19c2ad8a3651 --- /dev/null +++ b/api/wasmtime/types/enum.ExternType.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/enum.ExternType.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/types/enum.Mutability.html b/api/wasmtime/types/enum.Mutability.html new file mode 100644 index 000000000000..239aeee546f5 --- /dev/null +++ b/api/wasmtime/types/enum.Mutability.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/enum.Mutability.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/types/enum.ValType.html b/api/wasmtime/types/enum.ValType.html new file mode 100644 index 000000000000..85e7bb308366 --- /dev/null +++ b/api/wasmtime/types/enum.ValType.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/enum.ValType.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/types/struct.ExportType.html b/api/wasmtime/types/struct.ExportType.html new file mode 100644 index 000000000000..f104a9256f7f --- /dev/null +++ b/api/wasmtime/types/struct.ExportType.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.ExportType.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/types/struct.FuncType.html b/api/wasmtime/types/struct.FuncType.html new file mode 100644 index 000000000000..edf108c843f4 --- /dev/null +++ b/api/wasmtime/types/struct.FuncType.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.FuncType.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/types/struct.GlobalType.html b/api/wasmtime/types/struct.GlobalType.html new file mode 100644 index 000000000000..581443959f76 --- /dev/null +++ b/api/wasmtime/types/struct.GlobalType.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.GlobalType.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/types/struct.ImportType.html b/api/wasmtime/types/struct.ImportType.html new file mode 100644 index 000000000000..2ffbcaaf61c1 --- /dev/null +++ b/api/wasmtime/types/struct.ImportType.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.ImportType.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/types/struct.Limits.html b/api/wasmtime/types/struct.Limits.html new file mode 100644 index 000000000000..0fec41a939ac --- /dev/null +++ b/api/wasmtime/types/struct.Limits.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.Limits.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/types/struct.MemoryType.html b/api/wasmtime/types/struct.MemoryType.html new file mode 100644 index 000000000000..b95737113d28 --- /dev/null +++ b/api/wasmtime/types/struct.MemoryType.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.MemoryType.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/types/struct.TableType.html b/api/wasmtime/types/struct.TableType.html new file mode 100644 index 000000000000..47eceab36c61 --- /dev/null +++ b/api/wasmtime/types/struct.TableType.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/struct.TableType.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime/unix/index.html b/api/wasmtime/unix/index.html new file mode 100644 index 000000000000..18f03beb9e5c --- /dev/null +++ b/api/wasmtime/unix/index.html @@ -0,0 +1,11 @@ +wasmtime::unix - Rust

[][src]Module wasmtime::unix

Unix-specific extension for the wasmtime crate.

+

This module is only available on Unix targets, for example Linux and macOS. +It is not available on Windows, for example. Note that the import path for +this module is wasmtime::unix::..., which is intended to emphasize that it +is platform-specific.

+

The traits contained in this module are intended to extend various types +throughout the wasmtime crate with extra functionality that's only +available on Unix.

+

Traits

+
InstanceExt

Extensions for the Instance type only available on Unix.

+
\ No newline at end of file diff --git a/api/wasmtime/unix/sidebar-items.js b/api/wasmtime/unix/sidebar-items.js new file mode 100644 index 000000000000..ec3ac4de444c --- /dev/null +++ b/api/wasmtime/unix/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"trait":[["InstanceExt","Extensions for the [`Instance`] type only available on Unix."]]}); \ No newline at end of file diff --git a/api/wasmtime/unix/trait.InstanceExt.html b/api/wasmtime/unix/trait.InstanceExt.html new file mode 100644 index 000000000000..ad541961b478 --- /dev/null +++ b/api/wasmtime/unix/trait.InstanceExt.html @@ -0,0 +1,8 @@ +wasmtime::unix::InstanceExt - Rust

[][src]Trait wasmtime::unix::InstanceExt

pub trait InstanceExt {
+    unsafe fn set_signal_handler<H>(&self, handler: H)
    where
        H: 'static + Fn(c_int, *const siginfo_t, *const c_void) -> bool
; +}

Extensions for the Instance type only available on Unix.

+
+

Required methods

unsafe fn set_signal_handler<H>(&self, handler: H) where
    H: 'static + Fn(c_int, *const siginfo_t, *const c_void) -> bool

The signal handler must be +async-signal-safe.

+
Loading content... +

Implementors

impl InstanceExt for Instance[src]

Loading content...
\ No newline at end of file diff --git a/api/wasmtime/values/enum.Val.html b/api/wasmtime/values/enum.Val.html new file mode 100644 index 000000000000..12b2d4968652 --- /dev/null +++ b/api/wasmtime/values/enum.Val.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime/enum.Val.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_debug/all.html b/api/wasmtime_debug/all.html new file mode 100644 index 000000000000..f6b226266ed9 --- /dev/null +++ b/api/wasmtime_debug/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Enums

Traits

Functions

\ No newline at end of file diff --git a/api/wasmtime_debug/enum.ResolvedSymbol.html b/api/wasmtime_debug/enum.ResolvedSymbol.html new file mode 100644 index 000000000000..ccd313d5895d --- /dev/null +++ b/api/wasmtime_debug/enum.ResolvedSymbol.html @@ -0,0 +1,19 @@ +wasmtime_debug::ResolvedSymbol - Rust

[][src]Enum wasmtime_debug::ResolvedSymbol

pub enum ResolvedSymbol {
+    PhysicalAddress(u64),
+    Reloc {
+        name: String,
+        addend: i64,
+    },
+}

+ Variants

+
PhysicalAddress(u64)
Reloc

Fields of Reloc

name: Stringaddend: i64

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_debug/fn.emit_debugsections.html b/api/wasmtime_debug/fn.emit_debugsections.html new file mode 100644 index 000000000000..6a68eda50914 --- /dev/null +++ b/api/wasmtime_debug/fn.emit_debugsections.html @@ -0,0 +1 @@ +wasmtime_debug::emit_debugsections - Rust

[][src]Function wasmtime_debug::emit_debugsections

pub fn emit_debugsections(
    obj: &mut Artifact,
    vmctx_info: &ModuleVmctxInfo,
    target_config: TargetFrontendConfig,
    debuginfo_data: &DebugInfoData,
    at: &ModuleAddressMap,
    ranges: &ValueLabelsRanges
) -> Result<(), Error>
\ No newline at end of file diff --git a/api/wasmtime_debug/fn.emit_debugsections_image.html b/api/wasmtime_debug/fn.emit_debugsections_image.html new file mode 100644 index 000000000000..f5fc2d9dd694 --- /dev/null +++ b/api/wasmtime_debug/fn.emit_debugsections_image.html @@ -0,0 +1 @@ +wasmtime_debug::emit_debugsections_image - Rust

[][src]Function wasmtime_debug::emit_debugsections_image

pub fn emit_debugsections_image(
    triple: Triple,
    target_config: TargetFrontendConfig,
    debuginfo_data: &DebugInfoData,
    vmctx_info: &ModuleVmctxInfo,
    at: &ModuleAddressMap,
    ranges: &ValueLabelsRanges,
    funcs: &[(*const u8, usize)]
) -> Result<Vec<u8>, Error>
\ No newline at end of file diff --git a/api/wasmtime_debug/fn.emit_dwarf.html b/api/wasmtime_debug/fn.emit_dwarf.html new file mode 100644 index 000000000000..7c6db584ab87 --- /dev/null +++ b/api/wasmtime_debug/fn.emit_dwarf.html @@ -0,0 +1 @@ +wasmtime_debug::emit_dwarf - Rust

[][src]Function wasmtime_debug::emit_dwarf

pub fn emit_dwarf(
    artifact: &mut Artifact,
    dwarf: Dwarf,
    symbol_resolver: &dyn SymbolResolver
) -> Result<()>
\ No newline at end of file diff --git a/api/wasmtime_debug/fn.read_debuginfo.html b/api/wasmtime_debug/fn.read_debuginfo.html new file mode 100644 index 000000000000..cd324995a347 --- /dev/null +++ b/api/wasmtime_debug/fn.read_debuginfo.html @@ -0,0 +1 @@ +wasmtime_debug::read_debuginfo - Rust

[][src]Function wasmtime_debug::read_debuginfo

pub fn read_debuginfo(data: &[u8]) -> DebugInfoData
\ No newline at end of file diff --git a/api/wasmtime_debug/fn.transform_dwarf.html b/api/wasmtime_debug/fn.transform_dwarf.html new file mode 100644 index 000000000000..6f378a8c1255 --- /dev/null +++ b/api/wasmtime_debug/fn.transform_dwarf.html @@ -0,0 +1 @@ +wasmtime_debug::transform_dwarf - Rust

[][src]Function wasmtime_debug::transform_dwarf

pub fn transform_dwarf(
    target_config: TargetFrontendConfig,
    di: &DebugInfoData,
    at: &ModuleAddressMap,
    vmctx_info: &ModuleVmctxInfo,
    ranges: &ValueLabelsRanges
) -> Result<Dwarf, Error>
\ No newline at end of file diff --git a/api/wasmtime_debug/index.html b/api/wasmtime_debug/index.html new file mode 100644 index 000000000000..c0f909857241 --- /dev/null +++ b/api/wasmtime_debug/index.html @@ -0,0 +1,6 @@ +wasmtime_debug - Rust

[][src]Crate wasmtime_debug

Debug utils for WebAssembly using Cranelift.

+

Structs

+
DebugInfoData
WasmFileInfo

Enums

+
ResolvedSymbol

Traits

+
SymbolResolver

Functions

+
emit_debugsections
emit_debugsections_image
emit_dwarf
read_debuginfo
transform_dwarf
\ No newline at end of file diff --git a/api/wasmtime_debug/read_debuginfo/fn.read_debuginfo.html b/api/wasmtime_debug/read_debuginfo/fn.read_debuginfo.html new file mode 100644 index 000000000000..d71aa46b6c5d --- /dev/null +++ b/api/wasmtime_debug/read_debuginfo/fn.read_debuginfo.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_debug/fn.read_debuginfo.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_debug/read_debuginfo/struct.DebugInfoData.html b/api/wasmtime_debug/read_debuginfo/struct.DebugInfoData.html new file mode 100644 index 000000000000..92103c2c51d7 --- /dev/null +++ b/api/wasmtime_debug/read_debuginfo/struct.DebugInfoData.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_debug/struct.DebugInfoData.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_debug/read_debuginfo/struct.WasmFileInfo.html b/api/wasmtime_debug/read_debuginfo/struct.WasmFileInfo.html new file mode 100644 index 000000000000..ffcb7db7b29d --- /dev/null +++ b/api/wasmtime_debug/read_debuginfo/struct.WasmFileInfo.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_debug/struct.WasmFileInfo.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_debug/sidebar-items.js b/api/wasmtime_debug/sidebar-items.js new file mode 100644 index 000000000000..9ae5e3cffb55 --- /dev/null +++ b/api/wasmtime_debug/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["ResolvedSymbol",""]],"fn":[["emit_debugsections",""],["emit_debugsections_image",""],["emit_dwarf",""],["read_debuginfo",""],["transform_dwarf",""]],"struct":[["DebugInfoData",""],["WasmFileInfo",""]],"trait":[["SymbolResolver",""]]}); \ No newline at end of file diff --git a/api/wasmtime_debug/struct.DebugInfoData.html b/api/wasmtime_debug/struct.DebugInfoData.html new file mode 100644 index 000000000000..3167e0ad0c28 --- /dev/null +++ b/api/wasmtime_debug/struct.DebugInfoData.html @@ -0,0 +1,17 @@ +wasmtime_debug::DebugInfoData - Rust

[][src]Struct wasmtime_debug::DebugInfoData

pub struct DebugInfoData<'a> {
+    pub dwarf: Dwarf<EndianSlice<'a, LittleEndian>>,
+    pub name_section: Option<NameSection>,
+    pub wasm_file: WasmFileInfo,
+}

+ Fields

dwarf: Dwarf<EndianSlice<'a, LittleEndian>>name_section: Option<NameSection>wasm_file: WasmFileInfo

Trait Implementations

impl<'a> Debug for DebugInfoData<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for DebugInfoData<'a>

impl<'a> Send for DebugInfoData<'a>

impl<'a> Sync for DebugInfoData<'a>

impl<'a> Unpin for DebugInfoData<'a>

impl<'a> UnwindSafe for DebugInfoData<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_debug/struct.WasmFileInfo.html b/api/wasmtime_debug/struct.WasmFileInfo.html new file mode 100644 index 000000000000..7e36873830d9 --- /dev/null +++ b/api/wasmtime_debug/struct.WasmFileInfo.html @@ -0,0 +1,17 @@ +wasmtime_debug::WasmFileInfo - Rust

[][src]Struct wasmtime_debug::WasmFileInfo

pub struct WasmFileInfo {
+    pub path: Option<PathBuf>,
+    pub code_section_offset: u64,
+    pub funcs: Box<[FunctionMetadata]>,
+}

+ Fields

path: Option<PathBuf>code_section_offset: u64funcs: Box<[FunctionMetadata]>

Trait Implementations

impl Debug for WasmFileInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_debug/trait.SymbolResolver.html b/api/wasmtime_debug/trait.SymbolResolver.html new file mode 100644 index 000000000000..8f47c251a946 --- /dev/null +++ b/api/wasmtime_debug/trait.SymbolResolver.html @@ -0,0 +1,5 @@ +wasmtime_debug::SymbolResolver - Rust

[][src]Trait wasmtime_debug::SymbolResolver

pub trait SymbolResolver {
+    fn resolve_symbol(&self, symbol: usize, addend: i64) -> ResolvedSymbol;
+}
+

Required methods

fn resolve_symbol(&self, symbol: usize, addend: i64) -> ResolvedSymbol

Loading content... +

Implementors

Loading content...
\ No newline at end of file diff --git a/api/wasmtime_debug/transform/fn.transform_dwarf.html b/api/wasmtime_debug/transform/fn.transform_dwarf.html new file mode 100644 index 000000000000..eed456425970 --- /dev/null +++ b/api/wasmtime_debug/transform/fn.transform_dwarf.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_debug/fn.transform_dwarf.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_debug/write_debuginfo/enum.ResolvedSymbol.html b/api/wasmtime_debug/write_debuginfo/enum.ResolvedSymbol.html new file mode 100644 index 000000000000..de92e395b8b5 --- /dev/null +++ b/api/wasmtime_debug/write_debuginfo/enum.ResolvedSymbol.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_debug/enum.ResolvedSymbol.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_debug/write_debuginfo/fn.emit_dwarf.html b/api/wasmtime_debug/write_debuginfo/fn.emit_dwarf.html new file mode 100644 index 000000000000..e629536edba8 --- /dev/null +++ b/api/wasmtime_debug/write_debuginfo/fn.emit_dwarf.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_debug/fn.emit_dwarf.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_debug/write_debuginfo/trait.SymbolResolver.html b/api/wasmtime_debug/write_debuginfo/trait.SymbolResolver.html new file mode 100644 index 000000000000..778ef6582663 --- /dev/null +++ b/api/wasmtime_debug/write_debuginfo/trait.SymbolResolver.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_debug/trait.SymbolResolver.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/address_map/enum.ModuleMemoryOffset.html b/api/wasmtime_environ/address_map/enum.ModuleMemoryOffset.html new file mode 100644 index 000000000000..77178c99f567 --- /dev/null +++ b/api/wasmtime_environ/address_map/enum.ModuleMemoryOffset.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/enum.ModuleMemoryOffset.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/address_map/struct.FunctionAddressMap.html b/api/wasmtime_environ/address_map/struct.FunctionAddressMap.html new file mode 100644 index 000000000000..809c0931fbdc --- /dev/null +++ b/api/wasmtime_environ/address_map/struct.FunctionAddressMap.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.FunctionAddressMap.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/address_map/struct.InstructionAddressMap.html b/api/wasmtime_environ/address_map/struct.InstructionAddressMap.html new file mode 100644 index 000000000000..63f600f5040a --- /dev/null +++ b/api/wasmtime_environ/address_map/struct.InstructionAddressMap.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.InstructionAddressMap.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/address_map/struct.ModuleVmctxInfo.html b/api/wasmtime_environ/address_map/struct.ModuleVmctxInfo.html new file mode 100644 index 000000000000..05e2cbb555c8 --- /dev/null +++ b/api/wasmtime_environ/address_map/struct.ModuleVmctxInfo.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.ModuleVmctxInfo.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/address_map/type.ModuleAddressMap.html b/api/wasmtime_environ/address_map/type.ModuleAddressMap.html new file mode 100644 index 000000000000..32031225b3f6 --- /dev/null +++ b/api/wasmtime_environ/address_map/type.ModuleAddressMap.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/type.ModuleAddressMap.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/address_map/type.ValueLabelsRanges.html b/api/wasmtime_environ/address_map/type.ValueLabelsRanges.html new file mode 100644 index 000000000000..992ee64ff507 --- /dev/null +++ b/api/wasmtime_environ/address_map/type.ValueLabelsRanges.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/type.ValueLabelsRanges.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/all.html b/api/wasmtime_environ/all.html new file mode 100644 index 000000000000..fac9fdc798af --- /dev/null +++ b/api/wasmtime_environ/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Enums

Traits

Functions

Typedefs

Constants

\ No newline at end of file diff --git a/api/wasmtime_environ/cache/config/fn.create_new_config.html b/api/wasmtime_environ/cache/config/fn.create_new_config.html new file mode 100644 index 000000000000..bc639cf5a1e7 --- /dev/null +++ b/api/wasmtime_environ/cache/config/fn.create_new_config.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/fn.cache_create_new_config.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/cache/config/struct.CacheConfig.html b/api/wasmtime_environ/cache/config/struct.CacheConfig.html new file mode 100644 index 000000000000..d7efbf3b41f0 --- /dev/null +++ b/api/wasmtime_environ/cache/config/struct.CacheConfig.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/struct.CacheConfig.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/compilation/enum.CompileError.html b/api/wasmtime_environ/compilation/enum.CompileError.html new file mode 100644 index 000000000000..675e6ec7b58f --- /dev/null +++ b/api/wasmtime_environ/compilation/enum.CompileError.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/enum.CompileError.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/compilation/enum.CompiledFunctionUnwindInfo.html b/api/wasmtime_environ/compilation/enum.CompiledFunctionUnwindInfo.html new file mode 100644 index 000000000000..9e3c5386f433 --- /dev/null +++ b/api/wasmtime_environ/compilation/enum.CompiledFunctionUnwindInfo.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/enum.CompiledFunctionUnwindInfo.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/compilation/enum.RelocationTarget.html b/api/wasmtime_environ/compilation/enum.RelocationTarget.html new file mode 100644 index 000000000000..7bd2ff6a0b2c --- /dev/null +++ b/api/wasmtime_environ/compilation/enum.RelocationTarget.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/enum.RelocationTarget.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/compilation/struct.Compilation.html b/api/wasmtime_environ/compilation/struct.Compilation.html new file mode 100644 index 000000000000..acf1aaa24e36 --- /dev/null +++ b/api/wasmtime_environ/compilation/struct.Compilation.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.Compilation.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/compilation/struct.CompiledFunction.html b/api/wasmtime_environ/compilation/struct.CompiledFunction.html new file mode 100644 index 000000000000..a2d90c71b62c --- /dev/null +++ b/api/wasmtime_environ/compilation/struct.CompiledFunction.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.CompiledFunction.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/compilation/struct.CompiledFunctionUnwindInfoReloc.html b/api/wasmtime_environ/compilation/struct.CompiledFunctionUnwindInfoReloc.html new file mode 100644 index 000000000000..2dbd31b7950e --- /dev/null +++ b/api/wasmtime_environ/compilation/struct.CompiledFunctionUnwindInfoReloc.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.CompiledFunctionUnwindInfoReloc.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/compilation/struct.Relocation.html b/api/wasmtime_environ/compilation/struct.Relocation.html new file mode 100644 index 000000000000..0d3aae1f4764 --- /dev/null +++ b/api/wasmtime_environ/compilation/struct.Relocation.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.Relocation.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/compilation/struct.TrapInformation.html b/api/wasmtime_environ/compilation/struct.TrapInformation.html new file mode 100644 index 000000000000..abf952527a68 --- /dev/null +++ b/api/wasmtime_environ/compilation/struct.TrapInformation.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.TrapInformation.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/compilation/trait.Compiler.html b/api/wasmtime_environ/compilation/trait.Compiler.html new file mode 100644 index 000000000000..5787685f7fff --- /dev/null +++ b/api/wasmtime_environ/compilation/trait.Compiler.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/trait.Compiler.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/compilation/type.Relocations.html b/api/wasmtime_environ/compilation/type.Relocations.html new file mode 100644 index 000000000000..290db1900b6a --- /dev/null +++ b/api/wasmtime_environ/compilation/type.Relocations.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/type.Relocations.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/compilation/type.Traps.html b/api/wasmtime_environ/compilation/type.Traps.html new file mode 100644 index 000000000000..61a926c8dabd --- /dev/null +++ b/api/wasmtime_environ/compilation/type.Traps.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/type.Traps.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/constant.VERSION.html b/api/wasmtime_environ/constant.VERSION.html new file mode 100644 index 000000000000..58fff61e05f7 --- /dev/null +++ b/api/wasmtime_environ/constant.VERSION.html @@ -0,0 +1,2 @@ +wasmtime_environ::VERSION - Rust

[][src]Constant wasmtime_environ::VERSION

pub const VERSION: &str = env!("CARGO_PKG_VERSION");

Version number of this crate.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/constant.WASM_MAX_PAGES.html b/api/wasmtime_environ/constant.WASM_MAX_PAGES.html new file mode 100644 index 000000000000..018936ac3913 --- /dev/null +++ b/api/wasmtime_environ/constant.WASM_MAX_PAGES.html @@ -0,0 +1,2 @@ +wasmtime_environ::WASM_MAX_PAGES - Rust

[][src]Constant wasmtime_environ::WASM_MAX_PAGES

pub const WASM_MAX_PAGES: u32 = 0x10000;

The number of pages we can have before we run out of byte index space.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/constant.WASM_PAGE_SIZE.html b/api/wasmtime_environ/constant.WASM_PAGE_SIZE.html new file mode 100644 index 000000000000..b97f3ac817f0 --- /dev/null +++ b/api/wasmtime_environ/constant.WASM_PAGE_SIZE.html @@ -0,0 +1,2 @@ +wasmtime_environ::WASM_PAGE_SIZE - Rust

[][src]Constant wasmtime_environ::WASM_PAGE_SIZE

pub const WASM_PAGE_SIZE: u32 = 0x10000;

WebAssembly page sizes are defined to be 64KiB.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/cranelift/index.html b/api/wasmtime_environ/cranelift/index.html new file mode 100644 index 000000000000..9315bd580859 --- /dev/null +++ b/api/wasmtime_environ/cranelift/index.html @@ -0,0 +1,6 @@ +wasmtime_environ::cranelift - Rust

[][src]Module wasmtime_environ::cranelift

Support for compiling with Cranelift.

+

Structs

+
Cranelift

A compiler that compiles a WebAssembly module with Cranelift, translating the Wasm to Cranelift IR, +optimizing it and then translating to assembly.

+
RelocSink

Implementation of a relocation sink that just saves all the information for later

+
\ No newline at end of file diff --git a/api/wasmtime_environ/cranelift/sidebar-items.js b/api/wasmtime_environ/cranelift/sidebar-items.js new file mode 100644 index 000000000000..22de9162971a --- /dev/null +++ b/api/wasmtime_environ/cranelift/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["Cranelift","A compiler that compiles a WebAssembly module with Cranelift, translating the Wasm to Cranelift IR, optimizing it and then translating to assembly."],["RelocSink","Implementation of a relocation sink that just saves all the information for later"]]}); \ No newline at end of file diff --git a/api/wasmtime_environ/cranelift/struct.Cranelift.html b/api/wasmtime_environ/cranelift/struct.Cranelift.html new file mode 100644 index 000000000000..66566fb347fd --- /dev/null +++ b/api/wasmtime_environ/cranelift/struct.Cranelift.html @@ -0,0 +1,15 @@ +wasmtime_environ::cranelift::Cranelift - Rust

[][src]Struct wasmtime_environ::cranelift::Cranelift

pub struct Cranelift;

A compiler that compiles a WebAssembly module with Cranelift, translating the Wasm to Cranelift IR, +optimizing it and then translating to assembly.

+

Trait Implementations

impl Compiler for Cranelift[src]

fn compile_module<'data, 'module>(
    module: &'module Module,
    module_translation: &ModuleTranslationState,
    function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
    isa: &dyn TargetIsa,
    generate_debug_info: bool,
    cache_config: &CacheConfig
) -> Result<(Compilation, Relocations, ModuleAddressMap, ValueLabelsRanges, PrimaryMap<DefinedFuncIndex, StackSlots>, Traps), CompileError>
[src]

Compile the module using Cranelift, producing a compilation result with +associated relocations.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/cranelift/struct.RelocSink.html b/api/wasmtime_environ/cranelift/struct.RelocSink.html new file mode 100644 index 000000000000..971fe5180eaf --- /dev/null +++ b/api/wasmtime_environ/cranelift/struct.RelocSink.html @@ -0,0 +1,22 @@ +wasmtime_environ::cranelift::RelocSink - Rust

[][src]Struct wasmtime_environ::cranelift::RelocSink

pub struct RelocSink {
+    pub func_relocs: Vec<Relocation>,
+    // some fields omitted
+}

Implementation of a relocation sink that just saves all the information for later

+

+ Fields

func_relocs: Vec<Relocation>

Relocations recorded for the function.

+

Methods

impl RelocSink[src]

pub fn new(func_index: FuncIndex) -> Self[src]

Return a new RelocSink instance.

+

Trait Implementations

impl RelocSink for RelocSink[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/entity/index.html b/api/wasmtime_environ/data_structures/entity/index.html new file mode 100644 index 000000000000..7d767095510a --- /dev/null +++ b/api/wasmtime_environ/data_structures/entity/index.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/entity/index.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/entity/struct.BoxedSlice.html b/api/wasmtime_environ/data_structures/entity/struct.BoxedSlice.html new file mode 100644 index 000000000000..6d246dc50d24 --- /dev/null +++ b/api/wasmtime_environ/data_structures/entity/struct.BoxedSlice.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/entity/struct.BoxedSlice.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/entity/struct.PrimaryMap.html b/api/wasmtime_environ/data_structures/entity/struct.PrimaryMap.html new file mode 100644 index 000000000000..78fc6dbe8e57 --- /dev/null +++ b/api/wasmtime_environ/data_structures/entity/struct.PrimaryMap.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/entity/struct.PrimaryMap.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/entity/trait.EntityRef.html b/api/wasmtime_environ/data_structures/entity/trait.EntityRef.html new file mode 100644 index 000000000000..4a7fa8a3bb0d --- /dev/null +++ b/api/wasmtime_environ/data_structures/entity/trait.EntityRef.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/entity/trait.EntityRef.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/enum.ArgumentPurpose.html b/api/wasmtime_environ/data_structures/ir/enum.ArgumentPurpose.html new file mode 100644 index 000000000000..4c714c7c1250 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/enum.ArgumentPurpose.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/ir/enum.ArgumentPurpose.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/enum.TrapCode.html b/api/wasmtime_environ/data_structures/ir/enum.TrapCode.html new file mode 100644 index 000000000000..8616dbb6585b --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/enum.TrapCode.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/ir/enum.TrapCode.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/enum.ValueLoc.html b/api/wasmtime_environ/data_structures/ir/enum.ValueLoc.html new file mode 100644 index 000000000000..2a2de1429e5c --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/enum.ValueLoc.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/ir/enum.ValueLoc.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/index.html b/api/wasmtime_environ/data_structures/ir/index.html new file mode 100644 index 000000000000..1bda21920b8f --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/index.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/ir/index.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/struct.AbiParam.html b/api/wasmtime_environ/data_structures/ir/struct.AbiParam.html new file mode 100644 index 000000000000..c9200e949aac --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/struct.AbiParam.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/ir/struct.AbiParam.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/struct.Signature.html b/api/wasmtime_environ/data_structures/ir/struct.Signature.html new file mode 100644 index 000000000000..5cd5b7f45155 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/struct.Signature.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/ir/struct.Signature.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/struct.SourceLoc.html b/api/wasmtime_environ/data_structures/ir/struct.SourceLoc.html new file mode 100644 index 000000000000..f0cc981e3565 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/struct.SourceLoc.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/ir/struct.SourceLoc.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/struct.StackSlots.html b/api/wasmtime_environ/data_structures/ir/struct.StackSlots.html new file mode 100644 index 000000000000..96780dd74d93 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/struct.StackSlots.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/ir/struct.StackSlots.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/struct.Type.html b/api/wasmtime_environ/data_structures/ir/struct.Type.html new file mode 100644 index 000000000000..71b757fc8426 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/struct.Type.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/ir/struct.Type.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/struct.ValueLabel.html b/api/wasmtime_environ/data_structures/ir/struct.ValueLabel.html new file mode 100644 index 000000000000..bf3ec81debe4 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/struct.ValueLabel.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/ir/struct.ValueLabel.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/type.ValueLabelsRanges.html b/api/wasmtime_environ/data_structures/ir/type.ValueLabelsRanges.html new file mode 100644 index 000000000000..ec5724f35f24 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/type.ValueLabelsRanges.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/ir/type.ValueLabelsRanges.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B1.html b/api/wasmtime_environ/data_structures/ir/types/constant.B1.html new file mode 100644 index 000000000000..f37774e058cb --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B1.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B1.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B128.html b/api/wasmtime_environ/data_structures/ir/types/constant.B128.html new file mode 100644 index 000000000000..68323af13cd8 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B128.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B128.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B128X2.html b/api/wasmtime_environ/data_structures/ir/types/constant.B128X2.html new file mode 100644 index 000000000000..0e8109dbded3 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B128X2.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B128X2.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B128X4.html b/api/wasmtime_environ/data_structures/ir/types/constant.B128X4.html new file mode 100644 index 000000000000..350c49cf8908 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B128X4.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B128X4.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B16.html b/api/wasmtime_environ/data_structures/ir/types/constant.B16.html new file mode 100644 index 000000000000..daf10d8f93ed --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B16.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B16.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B16X16.html b/api/wasmtime_environ/data_structures/ir/types/constant.B16X16.html new file mode 100644 index 000000000000..7b06d79d61ee --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B16X16.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B16X16.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B16X32.html b/api/wasmtime_environ/data_structures/ir/types/constant.B16X32.html new file mode 100644 index 000000000000..b1e5b7b313d0 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B16X32.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B16X32.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B16X4.html b/api/wasmtime_environ/data_structures/ir/types/constant.B16X4.html new file mode 100644 index 000000000000..1638d3d4faa8 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B16X4.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B16X4.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B16X8.html b/api/wasmtime_environ/data_structures/ir/types/constant.B16X8.html new file mode 100644 index 000000000000..a8570207eeda --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B16X8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B16X8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B32.html b/api/wasmtime_environ/data_structures/ir/types/constant.B32.html new file mode 100644 index 000000000000..f42d30f4326f --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B32.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B32.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B32X16.html b/api/wasmtime_environ/data_structures/ir/types/constant.B32X16.html new file mode 100644 index 000000000000..8fe1354cdb9f --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B32X16.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B32X16.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B32X2.html b/api/wasmtime_environ/data_structures/ir/types/constant.B32X2.html new file mode 100644 index 000000000000..a74b8f64b78c --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B32X2.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B32X2.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B32X4.html b/api/wasmtime_environ/data_structures/ir/types/constant.B32X4.html new file mode 100644 index 000000000000..0fb6d30fc567 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B32X4.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B32X4.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B32X8.html b/api/wasmtime_environ/data_structures/ir/types/constant.B32X8.html new file mode 100644 index 000000000000..be1eafb42344 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B32X8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B32X8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B64.html b/api/wasmtime_environ/data_structures/ir/types/constant.B64.html new file mode 100644 index 000000000000..22d0a9ac28c5 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B64.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B64.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B64X2.html b/api/wasmtime_environ/data_structures/ir/types/constant.B64X2.html new file mode 100644 index 000000000000..7b1e587d1c56 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B64X2.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B64X2.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B64X4.html b/api/wasmtime_environ/data_structures/ir/types/constant.B64X4.html new file mode 100644 index 000000000000..3ac35ff3b736 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B64X4.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B64X4.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B64X8.html b/api/wasmtime_environ/data_structures/ir/types/constant.B64X8.html new file mode 100644 index 000000000000..a299370a9a07 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B64X8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B64X8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B8.html b/api/wasmtime_environ/data_structures/ir/types/constant.B8.html new file mode 100644 index 000000000000..a45cea47f524 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B8X16.html b/api/wasmtime_environ/data_structures/ir/types/constant.B8X16.html new file mode 100644 index 000000000000..f3d0cefe409d --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B8X16.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B8X16.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B8X32.html b/api/wasmtime_environ/data_structures/ir/types/constant.B8X32.html new file mode 100644 index 000000000000..afd3aa39def8 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B8X32.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B8X32.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B8X64.html b/api/wasmtime_environ/data_structures/ir/types/constant.B8X64.html new file mode 100644 index 000000000000..18f881e186c4 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B8X64.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B8X64.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.B8X8.html b/api/wasmtime_environ/data_structures/ir/types/constant.B8X8.html new file mode 100644 index 000000000000..966eb98e0808 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.B8X8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.B8X8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.F32.html b/api/wasmtime_environ/data_structures/ir/types/constant.F32.html new file mode 100644 index 000000000000..112479ab5305 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.F32.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.F32.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.F32X16.html b/api/wasmtime_environ/data_structures/ir/types/constant.F32X16.html new file mode 100644 index 000000000000..d7e0ce181b65 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.F32X16.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.F32X16.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.F32X2.html b/api/wasmtime_environ/data_structures/ir/types/constant.F32X2.html new file mode 100644 index 000000000000..b4b9ee246610 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.F32X2.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.F32X2.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.F32X4.html b/api/wasmtime_environ/data_structures/ir/types/constant.F32X4.html new file mode 100644 index 000000000000..37012a8f4cb9 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.F32X4.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.F32X4.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.F32X8.html b/api/wasmtime_environ/data_structures/ir/types/constant.F32X8.html new file mode 100644 index 000000000000..ef7cfbb89d60 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.F32X8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.F32X8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.F64.html b/api/wasmtime_environ/data_structures/ir/types/constant.F64.html new file mode 100644 index 000000000000..db58101442e4 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.F64.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.F64.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.F64X2.html b/api/wasmtime_environ/data_structures/ir/types/constant.F64X2.html new file mode 100644 index 000000000000..e305bd0f72b9 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.F64X2.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.F64X2.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.F64X4.html b/api/wasmtime_environ/data_structures/ir/types/constant.F64X4.html new file mode 100644 index 000000000000..0bd8114ac98a --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.F64X4.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.F64X4.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.F64X8.html b/api/wasmtime_environ/data_structures/ir/types/constant.F64X8.html new file mode 100644 index 000000000000..6189a3654fa1 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.F64X8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.F64X8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.FFLAGS.html b/api/wasmtime_environ/data_structures/ir/types/constant.FFLAGS.html new file mode 100644 index 000000000000..4caba8c55cf5 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.FFLAGS.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.FFLAGS.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I128.html b/api/wasmtime_environ/data_structures/ir/types/constant.I128.html new file mode 100644 index 000000000000..4d65b4685b29 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I128.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I128.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I128X2.html b/api/wasmtime_environ/data_structures/ir/types/constant.I128X2.html new file mode 100644 index 000000000000..0e9e97193944 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I128X2.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I128X2.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I128X4.html b/api/wasmtime_environ/data_structures/ir/types/constant.I128X4.html new file mode 100644 index 000000000000..58a272893b28 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I128X4.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I128X4.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I16.html b/api/wasmtime_environ/data_structures/ir/types/constant.I16.html new file mode 100644 index 000000000000..fd3260baa8a6 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I16.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I16.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I16X16.html b/api/wasmtime_environ/data_structures/ir/types/constant.I16X16.html new file mode 100644 index 000000000000..8a228e895c40 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I16X16.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I16X16.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I16X32.html b/api/wasmtime_environ/data_structures/ir/types/constant.I16X32.html new file mode 100644 index 000000000000..f0cd7e3a51ce --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I16X32.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I16X32.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I16X4.html b/api/wasmtime_environ/data_structures/ir/types/constant.I16X4.html new file mode 100644 index 000000000000..e2b1b68f6085 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I16X4.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I16X4.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I16X8.html b/api/wasmtime_environ/data_structures/ir/types/constant.I16X8.html new file mode 100644 index 000000000000..7799ae5ef902 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I16X8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I16X8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I32.html b/api/wasmtime_environ/data_structures/ir/types/constant.I32.html new file mode 100644 index 000000000000..e98eae882550 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I32.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I32.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I32X16.html b/api/wasmtime_environ/data_structures/ir/types/constant.I32X16.html new file mode 100644 index 000000000000..58cc786a9ac7 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I32X16.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I32X16.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I32X2.html b/api/wasmtime_environ/data_structures/ir/types/constant.I32X2.html new file mode 100644 index 000000000000..4676027a1827 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I32X2.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I32X2.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I32X4.html b/api/wasmtime_environ/data_structures/ir/types/constant.I32X4.html new file mode 100644 index 000000000000..b2551c4d4bd3 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I32X4.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I32X4.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I32X8.html b/api/wasmtime_environ/data_structures/ir/types/constant.I32X8.html new file mode 100644 index 000000000000..3ff0e6bc5be7 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I32X8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I32X8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I64.html b/api/wasmtime_environ/data_structures/ir/types/constant.I64.html new file mode 100644 index 000000000000..9108b2cba4a7 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I64.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I64.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I64X2.html b/api/wasmtime_environ/data_structures/ir/types/constant.I64X2.html new file mode 100644 index 000000000000..46e5645c8cff --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I64X2.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I64X2.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I64X4.html b/api/wasmtime_environ/data_structures/ir/types/constant.I64X4.html new file mode 100644 index 000000000000..2dc1f6987992 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I64X4.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I64X4.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I64X8.html b/api/wasmtime_environ/data_structures/ir/types/constant.I64X8.html new file mode 100644 index 000000000000..94b3ad7d7461 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I64X8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I64X8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I8.html b/api/wasmtime_environ/data_structures/ir/types/constant.I8.html new file mode 100644 index 000000000000..48398d3aa4d6 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I8X16.html b/api/wasmtime_environ/data_structures/ir/types/constant.I8X16.html new file mode 100644 index 000000000000..af1c5f846496 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I8X16.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I8X16.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I8X32.html b/api/wasmtime_environ/data_structures/ir/types/constant.I8X32.html new file mode 100644 index 000000000000..aee5193808f5 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I8X32.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I8X32.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I8X64.html b/api/wasmtime_environ/data_structures/ir/types/constant.I8X64.html new file mode 100644 index 000000000000..d37aafc556b7 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I8X64.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I8X64.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.I8X8.html b/api/wasmtime_environ/data_structures/ir/types/constant.I8X8.html new file mode 100644 index 000000000000..b679a48516b0 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.I8X8.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.I8X8.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.IFLAGS.html b/api/wasmtime_environ/data_structures/ir/types/constant.IFLAGS.html new file mode 100644 index 000000000000..b803cdba2200 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.IFLAGS.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.IFLAGS.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.INVALID.html b/api/wasmtime_environ/data_structures/ir/types/constant.INVALID.html new file mode 100644 index 000000000000..66f83f7869b1 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.INVALID.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.INVALID.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.R32.html b/api/wasmtime_environ/data_structures/ir/types/constant.R32.html new file mode 100644 index 000000000000..b3c4e415cc6b --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.R32.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.R32.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/constant.R64.html b/api/wasmtime_environ/data_structures/ir/types/constant.R64.html new file mode 100644 index 000000000000..205c85b1b4f4 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/constant.R64.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/constant.R64.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/index.html b/api/wasmtime_environ/data_structures/ir/types/index.html new file mode 100644 index 000000000000..7bd51dbf6b74 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/index.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/types/index.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/ir/types/struct.Type.html b/api/wasmtime_environ/data_structures/ir/types/struct.Type.html new file mode 100644 index 000000000000..729e32fdcfe1 --- /dev/null +++ b/api/wasmtime_environ/data_structures/ir/types/struct.Type.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../wasmtime_environ/ir/struct.Type.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/isa/enum.CallConv.html b/api/wasmtime_environ/data_structures/isa/enum.CallConv.html new file mode 100644 index 000000000000..546dc5443b79 --- /dev/null +++ b/api/wasmtime_environ/data_structures/isa/enum.CallConv.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/isa/enum.CallConv.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/isa/index.html b/api/wasmtime_environ/data_structures/isa/index.html new file mode 100644 index 000000000000..ab731470105f --- /dev/null +++ b/api/wasmtime_environ/data_structures/isa/index.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/isa/index.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/isa/struct.TargetFrontendConfig.html b/api/wasmtime_environ/data_structures/isa/struct.TargetFrontendConfig.html new file mode 100644 index 000000000000..68160d756f65 --- /dev/null +++ b/api/wasmtime_environ/data_structures/isa/struct.TargetFrontendConfig.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/isa/struct.TargetFrontendConfig.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/isa/trait.TargetIsa.html b/api/wasmtime_environ/data_structures/isa/trait.TargetIsa.html new file mode 100644 index 000000000000..0b2139641da7 --- /dev/null +++ b/api/wasmtime_environ/data_structures/isa/trait.TargetIsa.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/isa/trait.TargetIsa.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/isa/type.RegUnit.html b/api/wasmtime_environ/data_structures/isa/type.RegUnit.html new file mode 100644 index 000000000000..78f736930261 --- /dev/null +++ b/api/wasmtime_environ/data_structures/isa/type.RegUnit.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/isa/type.RegUnit.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/settings/fn.builder.html b/api/wasmtime_environ/data_structures/settings/fn.builder.html new file mode 100644 index 000000000000..c67b77dff233 --- /dev/null +++ b/api/wasmtime_environ/data_structures/settings/fn.builder.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/settings/fn.builder.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/settings/index.html b/api/wasmtime_environ/data_structures/settings/index.html new file mode 100644 index 000000000000..a5b02c50f1d6 --- /dev/null +++ b/api/wasmtime_environ/data_structures/settings/index.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/settings/index.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/settings/struct.Builder.html b/api/wasmtime_environ/data_structures/settings/struct.Builder.html new file mode 100644 index 000000000000..a0409db659de --- /dev/null +++ b/api/wasmtime_environ/data_structures/settings/struct.Builder.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/settings/struct.Builder.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/settings/struct.Flags.html b/api/wasmtime_environ/data_structures/settings/struct.Flags.html new file mode 100644 index 000000000000..d132b13ae1d8 --- /dev/null +++ b/api/wasmtime_environ/data_structures/settings/struct.Flags.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/settings/struct.Flags.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/settings/trait.Configurable.html b/api/wasmtime_environ/data_structures/settings/trait.Configurable.html new file mode 100644 index 000000000000..febfa18a4fe5 --- /dev/null +++ b/api/wasmtime_environ/data_structures/settings/trait.Configurable.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/settings/trait.Configurable.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/enum.GlobalInit.html b/api/wasmtime_environ/data_structures/wasm/enum.GlobalInit.html new file mode 100644 index 000000000000..5682d8373e44 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/enum.GlobalInit.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/enum.GlobalInit.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/enum.TableElementType.html b/api/wasmtime_environ/data_structures/wasm/enum.TableElementType.html new file mode 100644 index 000000000000..0e2fed292675 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/enum.TableElementType.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/enum.TableElementType.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/fn.get_vmctx_value_label.html b/api/wasmtime_environ/data_structures/wasm/fn.get_vmctx_value_label.html new file mode 100644 index 000000000000..3c5546978918 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/fn.get_vmctx_value_label.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/fn.get_vmctx_value_label.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/index.html b/api/wasmtime_environ/data_structures/wasm/index.html new file mode 100644 index 000000000000..1830440b7dd4 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/index.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/index.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.DefinedFuncIndex.html b/api/wasmtime_environ/data_structures/wasm/struct.DefinedFuncIndex.html new file mode 100644 index 000000000000..6eea0520f039 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.DefinedFuncIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.DefinedFuncIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.DefinedGlobalIndex.html b/api/wasmtime_environ/data_structures/wasm/struct.DefinedGlobalIndex.html new file mode 100644 index 000000000000..9c04182ce881 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.DefinedGlobalIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.DefinedGlobalIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.DefinedMemoryIndex.html b/api/wasmtime_environ/data_structures/wasm/struct.DefinedMemoryIndex.html new file mode 100644 index 000000000000..065567078bf2 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.DefinedMemoryIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.DefinedMemoryIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.DefinedTableIndex.html b/api/wasmtime_environ/data_structures/wasm/struct.DefinedTableIndex.html new file mode 100644 index 000000000000..3fb74d00a88b --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.DefinedTableIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.DefinedTableIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.FuncIndex.html b/api/wasmtime_environ/data_structures/wasm/struct.FuncIndex.html new file mode 100644 index 000000000000..d3b2f330dfef --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.FuncIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.FuncIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.Global.html b/api/wasmtime_environ/data_structures/wasm/struct.Global.html new file mode 100644 index 000000000000..275bec1456e8 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.Global.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.Global.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.GlobalIndex.html b/api/wasmtime_environ/data_structures/wasm/struct.GlobalIndex.html new file mode 100644 index 000000000000..54b4f0151703 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.GlobalIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.GlobalIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.Memory.html b/api/wasmtime_environ/data_structures/wasm/struct.Memory.html new file mode 100644 index 000000000000..e238c15c5a6c --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.Memory.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.Memory.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.MemoryIndex.html b/api/wasmtime_environ/data_structures/wasm/struct.MemoryIndex.html new file mode 100644 index 000000000000..659d9c2cfc12 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.MemoryIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.MemoryIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.SignatureIndex.html b/api/wasmtime_environ/data_structures/wasm/struct.SignatureIndex.html new file mode 100644 index 000000000000..9b1859e8da54 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.SignatureIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.SignatureIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.Table.html b/api/wasmtime_environ/data_structures/wasm/struct.Table.html new file mode 100644 index 000000000000..c3b76f966fd6 --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.Table.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.Table.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/data_structures/wasm/struct.TableIndex.html b/api/wasmtime_environ/data_structures/wasm/struct.TableIndex.html new file mode 100644 index 000000000000..f9a68986082b --- /dev/null +++ b/api/wasmtime_environ/data_structures/wasm/struct.TableIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../wasmtime_environ/wasm/struct.TableIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/entity/index.html b/api/wasmtime_environ/entity/index.html new file mode 100644 index 000000000000..8d63bdb17307 --- /dev/null +++ b/api/wasmtime_environ/entity/index.html @@ -0,0 +1,7 @@ +wasmtime_environ::entity - Rust

[][src]Module wasmtime_environ::entity

Structs

+
BoxedSlice

A slice mapping K -> V allocating dense entity references.

+
PrimaryMap

A primary mapping K -> V allocating dense entity references.

+

Traits

+
EntityRef

A type wrapping a small integer index should implement EntityRef so it can be used as the key +of an SecondaryMap or SparseMap.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/entity/sidebar-items.js b/api/wasmtime_environ/entity/sidebar-items.js new file mode 100644 index 000000000000..5b00385b7726 --- /dev/null +++ b/api/wasmtime_environ/entity/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["BoxedSlice","A slice mapping `K -> V` allocating dense entity references."],["PrimaryMap","A primary mapping `K -> V` allocating dense entity references."]],"trait":[["EntityRef","A type wrapping a small integer index should implement `EntityRef` so it can be used as the key of an `SecondaryMap` or `SparseMap`."]]}); \ No newline at end of file diff --git a/api/wasmtime_environ/entity/struct.BoxedSlice.html b/api/wasmtime_environ/entity/struct.BoxedSlice.html new file mode 100644 index 000000000000..1c79073623bb --- /dev/null +++ b/api/wasmtime_environ/entity/struct.BoxedSlice.html @@ -0,0 +1,48 @@ +wasmtime_environ::entity::BoxedSlice - Rust

[]Struct wasmtime_environ::entity::BoxedSlice

pub struct BoxedSlice<K, V> where
    K: EntityRef
{ /* fields omitted */ }

A slice mapping K -> V allocating dense entity references.

+

The BoxedSlice data structure uses the dense index space to implement a map with a boxed +slice.

+

Methods

impl<K, V> BoxedSlice<K, V> where
    K: EntityRef

pub unsafe fn from_raw(raw: *mut [V]) -> BoxedSlice<K, V>

Create a new slice from a raw pointer. A safer way to create slices is +to use PrimaryMap::into_boxed_slice().

+

Safety

+

This relies on raw pointing to a valid slice of Vs.

+

pub fn is_valid(&self, k: K) -> bool

Check if k is a valid key in the map.

+

pub fn get(&self, k: K) -> Option<&V>

Get the element at k if it exists.

+

pub fn get_mut(&mut self, k: K) -> Option<&mut V>

Get the element at k if it exists, mutable version.

+

pub fn is_empty(&self) -> bool

Is this map completely empty?

+

pub fn len(&self) -> usize

Get the total number of entity references created.

+

pub fn keys(&self) -> Keys<K>

Iterate over all the keys in this map.

+

pub fn values(&self) -> Iter<V>

Iterate over all the values in this map.

+

pub fn values_mut(&mut self) -> IterMut<V>

Iterate over all the values in this map, mutable edition.

+

pub fn iter(&self) -> Iter<K, V>

Iterate over all the keys and values in this map.

+

pub fn iter_mut(&mut self) -> IterMut<K, V>

Iterate over all the keys and values in this map, mutable edition.

+

pub fn last(&self) -> Option<&V>

Returns the last element that was inserted in the map.

+

Trait Implementations

impl<K, V> Clone for BoxedSlice<K, V> where
    K: Clone + EntityRef,
    V: Clone

impl<K, V> Debug for BoxedSlice<K, V> where
    K: Debug + EntityRef,
    V: Debug

impl<K, V> Index<K> for BoxedSlice<K, V> where
    K: EntityRef

Immutable indexing into a BoxedSlice. +The indexed value must be in the map.

+

type Output = V

The returned type after indexing.

+

impl<K, V> IndexMut<K> for BoxedSlice<K, V> where
    K: EntityRef

Mutable indexing into a BoxedSlice.

+

impl<'a, K, V> IntoIterator for &'a mut BoxedSlice<K, V> where
    K: EntityRef

type Item = (K, &'a mut V)

The type of the elements being iterated over.

+

type IntoIter = IterMut<'a, K, V>

Which kind of iterator are we turning this into?

+

impl<'a, K, V> IntoIterator for &'a BoxedSlice<K, V> where
    K: EntityRef

type Item = (K, &'a V)

The type of the elements being iterated over.

+

type IntoIter = Iter<'a, K, V>

Which kind of iterator are we turning this into?

+

Auto Trait Implementations

impl<K, V> RefUnwindSafe for BoxedSlice<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Send for BoxedSlice<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for BoxedSlice<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for BoxedSlice<K, V> where
    K: Unpin

impl<K, V> UnwindSafe for BoxedSlice<K, V> where
    K: UnwindSafe,
    V: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/entity/struct.PrimaryMap.html b/api/wasmtime_environ/entity/struct.PrimaryMap.html new file mode 100644 index 000000000000..22437d9936d5 --- /dev/null +++ b/api/wasmtime_environ/entity/struct.PrimaryMap.html @@ -0,0 +1,69 @@ +wasmtime_environ::entity::PrimaryMap - Rust

[]Struct wasmtime_environ::entity::PrimaryMap

pub struct PrimaryMap<K, V> where
    K: EntityRef
{ /* fields omitted */ }

A primary mapping K -> V allocating dense entity references.

+

The PrimaryMap data structure uses the dense index space to implement a map with a vector.

+

A primary map contains the main definition of an entity, and it can be used to allocate new +entity references with the push method.

+

There should only be a single PrimaryMap instance for a given EntityRef type, otherwise +conflicting references will be created. Using unknown keys for indexing will cause a panic.

+

Note that PrimaryMap doesn't implement Deref or DerefMut, which would allow +&PrimaryMap<K, V> to convert to &[V]. One of the main advantages of PrimaryMap is +that it only allows indexing with the distinct EntityRef key type, so converting to a +plain slice would make it easier to use incorrectly. To make a slice of a PrimaryMap, use +into_boxed_slice.

+

Methods

impl<K, V> PrimaryMap<K, V> where
    K: EntityRef

pub fn new() -> PrimaryMap<K, V>

Create a new empty map.

+

pub fn with_capacity(capacity: usize) -> PrimaryMap<K, V>

Create a new empty map with the given capacity.

+

pub fn is_valid(&self, k: K) -> bool

Check if k is a valid key in the map.

+

pub fn get(&self, k: K) -> Option<&V>

Get the element at k if it exists.

+

pub fn get_mut(&mut self, k: K) -> Option<&mut V>

Get the element at k if it exists, mutable version.

+

pub fn is_empty(&self) -> bool

Is this map completely empty?

+

pub fn len(&self) -> usize

Get the total number of entity references created.

+

pub fn keys(&self) -> Keys<K>

Iterate over all the keys in this map.

+

pub fn values(&self) -> Iter<V>

Iterate over all the values in this map.

+

pub fn values_mut(&mut self) -> IterMut<V>

Iterate over all the values in this map, mutable edition.

+

pub fn iter(&self) -> Iter<K, V>

Iterate over all the keys and values in this map.

+

pub fn iter_mut(&mut self) -> IterMut<K, V>

Iterate over all the keys and values in this map, mutable edition.

+

pub fn clear(&mut self)

Remove all entries from this map.

+

pub fn next_key(&self) -> K

Get the key that will be assigned to the next pushed value.

+

pub fn push(&mut self, v: V) -> K

Append v to the mapping, assigning a new key which is returned.

+

pub fn last(&self) -> Option<&V>

Returns the last element that was inserted in the map.

+

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least additional more elements to be inserted.

+

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for exactly additional more elements to be inserted.

+

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the PrimaryMap as much as possible.

+

pub fn into_boxed_slice(self) -> BoxedSlice<K, V>

Consumes this PrimaryMap and produces a BoxedSlice.

+

Trait Implementations

impl<K, V> Clone for PrimaryMap<K, V> where
    K: Clone + EntityRef,
    V: Clone

impl<K, V> Debug for PrimaryMap<K, V> where
    K: Debug + EntityRef,
    V: Debug

impl<'de, K, V> Deserialize<'de> for PrimaryMap<K, V> where
    K: EntityRef,
    V: Deserialize<'de>, 

impl<K, V> Eq for PrimaryMap<K, V> where
    K: Eq + EntityRef,
    V: Eq

impl<K, V> FromIterator<V> for PrimaryMap<K, V> where
    K: EntityRef

impl<K, V> Hash for PrimaryMap<K, V> where
    K: Hash + EntityRef,
    V: Hash

impl<K, V> Index<K> for PrimaryMap<K, V> where
    K: EntityRef

Immutable indexing into an PrimaryMap. +The indexed value must be in the map.

+

type Output = V

The returned type after indexing.

+

impl<K, V> IndexMut<K> for PrimaryMap<K, V> where
    K: EntityRef

Mutable indexing into an PrimaryMap.

+

impl<'a, K, V> IntoIterator for &'a PrimaryMap<K, V> where
    K: EntityRef

type Item = (K, &'a V)

The type of the elements being iterated over.

+

type IntoIter = Iter<'a, K, V>

Which kind of iterator are we turning this into?

+

impl<'a, K, V> IntoIterator for &'a mut PrimaryMap<K, V> where
    K: EntityRef

type Item = (K, &'a mut V)

The type of the elements being iterated over.

+

type IntoIter = IterMut<'a, K, V>

Which kind of iterator are we turning this into?

+

impl<K, V> PartialEq<PrimaryMap<K, V>> for PrimaryMap<K, V> where
    K: PartialEq<K> + EntityRef,
    V: PartialEq<V>, 

impl<K, V> Serialize for PrimaryMap<K, V> where
    K: EntityRef,
    V: Serialize

impl<K, V> StructuralEq for PrimaryMap<K, V> where
    K: EntityRef

impl<K, V> StructuralPartialEq for PrimaryMap<K, V> where
    K: EntityRef

Auto Trait Implementations

impl<K, V> RefUnwindSafe for PrimaryMap<K, V> where
    K: RefUnwindSafe,
    V: RefUnwindSafe

impl<K, V> Send for PrimaryMap<K, V> where
    K: Send,
    V: Send

impl<K, V> Sync for PrimaryMap<K, V> where
    K: Sync,
    V: Sync

impl<K, V> Unpin for PrimaryMap<K, V> where
    K: Unpin,
    V: Unpin

impl<K, V> UnwindSafe for PrimaryMap<K, V> where
    K: UnwindSafe,
    V: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/entity/trait.EntityRef.html b/api/wasmtime_environ/entity/trait.EntityRef.html new file mode 100644 index 000000000000..be467fe559e5 --- /dev/null +++ b/api/wasmtime_environ/entity/trait.EntityRef.html @@ -0,0 +1,12 @@ +wasmtime_environ::entity::EntityRef - Rust

[]Trait wasmtime_environ::entity::EntityRef

pub trait EntityRef: Eq + Copy {
+    fn new(usize) -> Self;
+
fn index(self) -> usize; +}

A type wrapping a small integer index should implement EntityRef so it can be used as the key +of an SecondaryMap or SparseMap.

+
+

Required methods

fn new(usize) -> Self

Create a new entity reference from a small integer. +This should crash if the requested index is not representable.

+

fn index(self) -> usize

Get the index that was used to create this entity reference.

+
Loading content... +

Implementations on Foreign Types

impl EntityRef for JumpTable

impl EntityRef for SigRef

impl EntityRef for Table

impl EntityRef for Inst

impl EntityRef for GlobalValue

impl EntityRef for Constant

impl EntityRef for Block

impl EntityRef for RegClassIndex

impl EntityRef for FuncRef

impl EntityRef for Heap

impl EntityRef for StackSlot

impl EntityRef for Immediate

impl EntityRef for Value

impl EntityRef for Loop

impl EntityRef for Variable

Loading content... +

Implementors

impl EntityRef for ValueLabel

impl EntityRef for DefinedFuncIndex

impl EntityRef for DefinedGlobalIndex

impl EntityRef for DefinedMemoryIndex

impl EntityRef for DefinedTableIndex

impl EntityRef for FuncIndex

impl EntityRef for GlobalIndex

impl EntityRef for MemoryIndex

impl EntityRef for SignatureIndex

impl EntityRef for TableIndex

Loading content...
\ No newline at end of file diff --git a/api/wasmtime_environ/enum.CompileError.html b/api/wasmtime_environ/enum.CompileError.html new file mode 100644 index 000000000000..295e7f40817e --- /dev/null +++ b/api/wasmtime_environ/enum.CompileError.html @@ -0,0 +1,30 @@ +wasmtime_environ::CompileError - Rust

[][src]Enum wasmtime_environ::CompileError

pub enum CompileError {
+    Wasm(WasmError),
+    Codegen(String),
+    DebugInfoNotSupported,
+}

An error while compiling WebAssembly to machine code.

+

+ Variants

+
Wasm(WasmError)

A wasm translation error occured.

+
Codegen(String)

A compilation error occured.

+
DebugInfoNotSupported

A compilation error occured.

+

Trait Implementations

impl Debug for CompileError[src]

impl Display for CompileError[src]

impl Error for CompileError[src]

impl From<WasmError> for CompileError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/enum.CompiledFunctionUnwindInfo.html b/api/wasmtime_environ/enum.CompiledFunctionUnwindInfo.html new file mode 100644 index 000000000000..28c49e5d52e5 --- /dev/null +++ b/api/wasmtime_environ/enum.CompiledFunctionUnwindInfo.html @@ -0,0 +1,37 @@ +wasmtime_environ::CompiledFunctionUnwindInfo - Rust

[][src]Enum wasmtime_environ::CompiledFunctionUnwindInfo

pub enum CompiledFunctionUnwindInfo {
+    None,
+    Windows(Vec<u8>),
+    FrameLayout(Vec<u8>, usizeVec<FDERelocEntry>),
+}

Compiled function unwind information.

+

+ Variants

+
None

No info.

+
Windows(Vec<u8>)

Windows UNWIND_INFO.

+
FrameLayout(Vec<u8>, usizeVec<FDERelocEntry>)

Frame layout info.

+

Methods

impl CompiledFunctionUnwindInfo[src]

pub fn new(isa: &dyn TargetIsa, context: &Context) -> Self[src]

Constructs unwind info object.

+

pub fn is_empty(&self) -> bool[src]

Retuns true is no unwind info data.

+

pub fn len(&self) -> usize[src]

Returns size of serilized unwind info.

+

pub fn serialize(
    &self,
    dest: &mut [u8],
    relocs: &mut Vec<CompiledFunctionUnwindInfoReloc>
)
[src]

Serializes data into byte array.

+

Trait Implementations

impl Clone for CompiledFunctionUnwindInfo[src]

impl Debug for CompiledFunctionUnwindInfo[src]

impl<'de> Deserialize<'de> for CompiledFunctionUnwindInfo[src]

impl Eq for CompiledFunctionUnwindInfo[src]

impl PartialEq<CompiledFunctionUnwindInfo> for CompiledFunctionUnwindInfo[src]

impl Serialize for CompiledFunctionUnwindInfo[src]

impl StructuralEq for CompiledFunctionUnwindInfo[src]

impl StructuralPartialEq for CompiledFunctionUnwindInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/enum.Export.html b/api/wasmtime_environ/enum.Export.html new file mode 100644 index 000000000000..cac5743d8582 --- /dev/null +++ b/api/wasmtime_environ/enum.Export.html @@ -0,0 +1,47 @@ +wasmtime_environ::Export - Rust

[][src]Enum wasmtime_environ::Export

pub enum Export {
+    Function(FuncIndex),
+    Table(TableIndex),
+    Memory(MemoryIndex),
+    Global(GlobalIndex),
+}

An entity to export.

+

+ Variants

+
Function(FuncIndex)

Function export.

+
Table(TableIndex)

Table export.

+
Memory(MemoryIndex)

Memory export.

+
Global(GlobalIndex)

Global export.

+

Trait Implementations

impl Clone for Export[src]

impl Debug for Export[src]

impl Eq for Export[src]

impl Hash for Export[src]

impl Ord for Export[src]

impl PartialEq<Export> for Export[src]

impl PartialOrd<Export> for Export[src]

impl StructuralEq for Export[src]

impl StructuralPartialEq for Export[src]

Auto Trait Implementations

impl RefUnwindSafe for Export

impl Send for Export

impl Sync for Export

impl Unpin for Export

impl UnwindSafe for Export

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/enum.MemoryStyle.html b/api/wasmtime_environ/enum.MemoryStyle.html new file mode 100644 index 000000000000..39438c307e62 --- /dev/null +++ b/api/wasmtime_environ/enum.MemoryStyle.html @@ -0,0 +1,32 @@ +wasmtime_environ::MemoryStyle - Rust

[][src]Enum wasmtime_environ::MemoryStyle

pub enum MemoryStyle {
+    Dynamic,
+    Static {
+        bound: u32,
+    },
+}

Implemenation styles for WebAssembly linear memory.

+

+ Variants

+
Dynamic

The actual memory can be resized and moved.

+
Static

Addresss space is allocated up front.

+

Fields of Static

bound: u32

The number of mapped and unmapped pages.

+

Methods

impl MemoryStyle[src]

pub fn for_memory(memory: Memory, tunables: &Tunables) -> (Self, u64)[src]

Decide on an implementation style for the given Memory.

+

Trait Implementations

impl Clone for MemoryStyle[src]

impl Debug for MemoryStyle[src]

impl Hash for MemoryStyle[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/enum.ModuleMemoryOffset.html b/api/wasmtime_environ/enum.ModuleMemoryOffset.html new file mode 100644 index 000000000000..be825e228db2 --- /dev/null +++ b/api/wasmtime_environ/enum.ModuleMemoryOffset.html @@ -0,0 +1,28 @@ +wasmtime_environ::ModuleMemoryOffset - Rust

[][src]Enum wasmtime_environ::ModuleMemoryOffset

pub enum ModuleMemoryOffset {
+    None,
+    Defined(u32),
+    Imported(u32),
+}

Memory definition offset in the VMContext structure.

+

+ Variants

+
None

Not available.

+
Defined(u32)

Offset to the defined memory.

+
Imported(u32)

Offset to the imported memory.

+

Trait Implementations

impl Clone for ModuleMemoryOffset[src]

impl Debug for ModuleMemoryOffset[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/enum.RelocationTarget.html b/api/wasmtime_environ/enum.RelocationTarget.html new file mode 100644 index 000000000000..832ee644a673 --- /dev/null +++ b/api/wasmtime_environ/enum.RelocationTarget.html @@ -0,0 +1,33 @@ +wasmtime_environ::RelocationTarget - Rust

[][src]Enum wasmtime_environ::RelocationTarget

pub enum RelocationTarget {
+    UserFunc(FuncIndex),
+    LibCall(LibCall),
+    JumpTable(FuncIndex, JumpTable),
+}

Destination function. Can be either user function or some special one, like memory.grow.

+

+ Variants

+
UserFunc(FuncIndex)

The user function index.

+
LibCall(LibCall)

A compiler-generated libcall.

+
JumpTable(FuncIndex, JumpTable)

Jump table index.

+

Trait Implementations

impl Clone for RelocationTarget[src]

impl Copy for RelocationTarget[src]

impl Debug for RelocationTarget[src]

impl<'de> Deserialize<'de> for RelocationTarget[src]

impl Eq for RelocationTarget[src]

impl PartialEq<RelocationTarget> for RelocationTarget[src]

impl Serialize for RelocationTarget[src]

impl StructuralEq for RelocationTarget[src]

impl StructuralPartialEq for RelocationTarget[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/enum.TableStyle.html b/api/wasmtime_environ/enum.TableStyle.html new file mode 100644 index 000000000000..e088ae1a09f1 --- /dev/null +++ b/api/wasmtime_environ/enum.TableStyle.html @@ -0,0 +1,27 @@ +wasmtime_environ::TableStyle - Rust

[][src]Enum wasmtime_environ::TableStyle

pub enum TableStyle {
+    CallerChecksSignature,
+}

Implemenation styles for WebAssembly tables.

+

+ Variants

+
CallerChecksSignature

Signatures are stored in the table and checked in the caller.

+

Methods

impl TableStyle[src]

pub fn for_table(_table: Table, _tunables: &Tunables) -> Self[src]

Decide on an implementation style for the given Table.

+

Trait Implementations

impl Clone for TableStyle[src]

impl Debug for TableStyle[src]

impl Hash for TableStyle[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/fn.cache_create_new_config.html b/api/wasmtime_environ/fn.cache_create_new_config.html new file mode 100644 index 000000000000..748d55163e8e --- /dev/null +++ b/api/wasmtime_environ/fn.cache_create_new_config.html @@ -0,0 +1,3 @@ +wasmtime_environ::cache_create_new_config - Rust

[][src]Function wasmtime_environ::cache_create_new_config

pub fn cache_create_new_config<P: AsRef<Path> + Debug>(
    config_file: Option<P>
) -> Result<PathBuf>

Creates a new configuration file at specified path, or default path if None is passed. +Fails if file already exists.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/fn.translate_signature.html b/api/wasmtime_environ/fn.translate_signature.html new file mode 100644 index 000000000000..0a327f8dcc25 --- /dev/null +++ b/api/wasmtime_environ/fn.translate_signature.html @@ -0,0 +1,2 @@ +wasmtime_environ::translate_signature - Rust

[][src]Function wasmtime_environ::translate_signature

pub fn translate_signature(sig: Signature, pointer_type: Type) -> Signature

Add environment-specific function parameters.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/func_environ/struct.BuiltinFunctionIndex.html b/api/wasmtime_environ/func_environ/struct.BuiltinFunctionIndex.html new file mode 100644 index 000000000000..f145dec7e6f3 --- /dev/null +++ b/api/wasmtime_environ/func_environ/struct.BuiltinFunctionIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.BuiltinFunctionIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/index.html b/api/wasmtime_environ/index.html new file mode 100644 index 000000000000..5c9df9e977ae --- /dev/null +++ b/api/wasmtime_environ/index.html @@ -0,0 +1,61 @@ +wasmtime_environ - Rust

[][src]Crate wasmtime_environ

Standalone environment for WebAssembly using Cranelift. Provides functions to translate +get_global, set_global, memory.size, memory.grow, call_indirect that hardcode in +the translation the base addresses of regions of memory that will hold the globals, tables and +linear memories.

+

Re-exports

+
pub use crate::cranelift::Cranelift;

Modules

+
cranelift

Support for compiling with Cranelift.

+
entity
ir
isa
settings
wasm

Structs

+
BuiltinFunctionIndex

An index type for builtin functions.

+
CacheConfig

Global configuration for how the cache is managed

+
Compilation

The result of compiling a WebAssembly module's functions.

+
CompiledFunction

Compiled function: machine code body, jump table offsets, and unwind information.

+
CompiledFunctionUnwindInfoReloc

Relocation entry for unwind info.

+
DataInitializer

A data initializer for linear memory.

+
DataInitializerLocation

A memory index and offset within that memory where a data initialization +should is to be performed.

+
FunctionAddressMap

Function and its instructions addresses mappings.

+
FunctionBodyData

Contains function data: byte code and its offset in the module.

+
InstructionAddressMap

Single source location to generated address mapping.

+
MemoryPlan

A WebAssembly linear memory description along with our chosen style for +implementing it.

+
Module

A translated WebAssembly module, excluding the function bodies and +memory initializers.

+
ModuleEnvironment

Object containing the standalone environment information.

+
ModuleTranslation

The result of translating via ModuleEnvironment. Function bodies are not +yet translated, and data initializers have not yet been copied out of the +original buffer.

+
ModuleVmctxInfo

Module vmctx related info.

+
Relocation

A record of a relocation to perform.

+
TableElements

A WebAssembly table initializer.

+
TablePlan

A WebAssembly table description along with our chosen style for +implementing it.

+
TargetSharedSignatureIndex

Target specific type for shared signature index.

+
TrapInformation

Information about trap.

+
Tunables

Tunable parameters for WebAssembly compilation.

+
VMOffsets

This class computes offsets to fields within VMContext and other +related structs that JIT code accesses directly.

+

Enums

+
CompileError

An error while compiling WebAssembly to machine code.

+
CompiledFunctionUnwindInfo

Compiled function unwind information.

+
Export

An entity to export.

+
MemoryStyle

Implemenation styles for WebAssembly linear memory.

+
ModuleMemoryOffset

Memory definition offset in the VMContext structure.

+
RelocationTarget

Destination function. Can be either user function or some special one, like memory.grow.

+
TableStyle

Implemenation styles for WebAssembly tables.

+

Constants

+
VERSION

Version number of this crate.

+
WASM_MAX_PAGES

The number of pages we can have before we run out of byte index space.

+
WASM_PAGE_SIZE

WebAssembly page sizes are defined to be 64KiB.

+

Traits

+
Compiler

An implementation of a compiler from parsed WebAssembly module to native code.

+

Functions

+
cache_create_new_config

Creates a new configuration file at specified path, or default path if None is passed. +Fails if file already exists.

+
translate_signature

Add environment-specific function parameters.

+

Type Definitions

+
ModuleAddressMap

Module functions addresses mappings.

+
Relocations

Relocations to apply to function bodies.

+
Traps

Information about traps associated with the functions where the traps are placed.

+
ValueLabelsRanges

Value ranges for functions.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/enum.ArgumentPurpose.html b/api/wasmtime_environ/ir/enum.ArgumentPurpose.html new file mode 100644 index 000000000000..7d03c5c402da --- /dev/null +++ b/api/wasmtime_environ/ir/enum.ArgumentPurpose.html @@ -0,0 +1,72 @@ +wasmtime_environ::ir::ArgumentPurpose - Rust

[]Enum wasmtime_environ::ir::ArgumentPurpose

pub enum ArgumentPurpose {
+    Normal,
+    StructReturn,
+    Link,
+    FramePointer,
+    CalleeSaved,
+    VMContext,
+    SignatureId,
+    StackLimit,
+}

The special purpose of a function argument.

+

Function arguments and return values are used to pass user program values between functions, +but they are also used to represent special registers with significance to the ABI such as +frame pointers and callee-saved registers.

+

The argument purpose is used to indicate any special meaning of an argument or return value.

+

+ Variants

+
Normal

A normal user program value passed to or from a function.

+
StructReturn

Struct return pointer.

+

When a function needs to return more data than will fit in registers, the caller passes a +pointer to a memory location where the return value can be written. In some ABIs, this +struct return pointer is passed in a specific register.

+

This argument kind can also appear as a return value for ABIs that require a function with +a StructReturn pointer argument to also return that pointer in a register.

+

The link register.

+

Most RISC architectures implement calls by saving the return address in a designated +register rather than pushing it on the stack. This is represented with a Link argument.

+

Similarly, some return instructions expect the return address in a register represented as +a Link return value.

+
FramePointer

The frame pointer.

+

This indicates the frame pointer register which has a special meaning in some ABIs.

+

The frame pointer appears as an argument and as a return value since it is a callee-saved +register.

+
CalleeSaved

A callee-saved register.

+

Some calling conventions have registers that must be saved by the callee. These registers +are represented as CalleeSaved arguments and return values.

+
VMContext

A VM context pointer.

+

This is a pointer to a context struct containing details about the current sandbox. It is +used as a base pointer for vmctx global values.

+
SignatureId

A signature identifier.

+

This is a special-purpose argument used to identify the calling convention expected by the +caller in an indirect call. The callee can verify that the expected signature ID matches.

+
StackLimit

A stack limit pointer.

+

This is a pointer to a stack limit. It is used to check the current stack pointer +against. Can only appear once in a signature.

+

Trait Implementations

impl Clone for ArgumentPurpose

impl Copy for ArgumentPurpose

impl Debug for ArgumentPurpose

impl Display for ArgumentPurpose

impl Eq for ArgumentPurpose

impl FromStr for ArgumentPurpose

type Err = ()

The associated error which can be returned from parsing.

+

impl Hash for ArgumentPurpose

impl PartialEq<ArgumentPurpose> for ArgumentPurpose

impl StructuralEq for ArgumentPurpose

impl StructuralPartialEq for ArgumentPurpose

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/enum.TrapCode.html b/api/wasmtime_environ/ir/enum.TrapCode.html new file mode 100644 index 000000000000..33e2f9693f24 --- /dev/null +++ b/api/wasmtime_environ/ir/enum.TrapCode.html @@ -0,0 +1,64 @@ +wasmtime_environ::ir::TrapCode - Rust

[]Enum wasmtime_environ::ir::TrapCode

pub enum TrapCode {
+    StackOverflow,
+    HeapOutOfBounds,
+    TableOutOfBounds,
+    OutOfBounds,
+    IndirectCallToNull,
+    BadSignature,
+    IntegerOverflow,
+    IntegerDivisionByZero,
+    BadConversionToInteger,
+    UnreachableCodeReached,
+    Interrupt,
+    User(u16),
+}

A trap code describing the reason for a trap.

+

All trap instructions have an explicit trap code.

+

+ Variants

+
StackOverflow

The current stack space was exhausted.

+

On some platforms, a stack overflow may also be indicated by a segmentation fault from the +stack guard page.

+
HeapOutOfBounds

A heap_addr instruction detected an out-of-bounds error.

+

Note that not all out-of-bounds heap accesses are reported this way; +some are detected by a segmentation fault on the heap unmapped or +offset-guard pages.

+
TableOutOfBounds

A table_addr instruction detected an out-of-bounds error.

+
OutOfBounds

Other bounds checking error.

+
IndirectCallToNull

Indirect call to a null table entry.

+
BadSignature

Signature mismatch on indirect call.

+
IntegerOverflow

An integer arithmetic operation caused an overflow.

+
IntegerDivisionByZero

An integer division by zero.

+
BadConversionToInteger

Failed float-to-int conversion.

+
UnreachableCodeReached

Code that was supposed to have been unreachable was reached.

+
Interrupt

Execution has potentially run too long and may be interrupted. +This trap is resumable.

+
User(u16)

A user-defined trap code.

+

Trait Implementations

impl Clone for TrapCode

impl Copy for TrapCode

impl Debug for TrapCode

impl<'de> Deserialize<'de> for TrapCode

impl Display for TrapCode

impl Eq for TrapCode

impl FromStr for TrapCode

type Err = ()

The associated error which can be returned from parsing.

+

impl Hash for TrapCode

impl PartialEq<TrapCode> for TrapCode

impl Serialize for TrapCode

impl StructuralEq for TrapCode

impl StructuralPartialEq for TrapCode

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/enum.ValueLoc.html b/api/wasmtime_environ/ir/enum.ValueLoc.html new file mode 100644 index 000000000000..4376e152428b --- /dev/null +++ b/api/wasmtime_environ/ir/enum.ValueLoc.html @@ -0,0 +1,39 @@ +wasmtime_environ::ir::ValueLoc - Rust

[]Enum wasmtime_environ::ir::ValueLoc

pub enum ValueLoc {
+    Unassigned,
+    Reg(u16),
+    Stack(StackSlot),
+}

Value location.

+

+ Variants

+
Unassigned

This value has not been assigned to a location yet.

+
Reg(u16)

Value is assigned to a register.

+
Stack(StackSlot)

Value is assigned to a stack slot.

+

Methods

impl ValueLoc

pub fn is_assigned(self) -> bool

Is this an assigned location? (That is, not Unassigned).

+

pub fn unwrap_reg(self) -> u16

Get the register unit of this location, or panic.

+

pub fn unwrap_stack(self) -> StackSlot

Get the stack slot of this location, or panic.

+

pub fn display<'a, R>(self, regs: R) -> DisplayValueLoc<'a> where
    R: Into<Option<&'a RegInfo>>, 

Return an object that can display this value location, using the register info from the +target ISA.

+

Trait Implementations

impl Clone for ValueLoc

impl Copy for ValueLoc

impl Debug for ValueLoc

impl Default for ValueLoc

impl<'de> Deserialize<'de> for ValueLoc

impl Eq for ValueLoc

impl PartialEq<ValueLoc> for ValueLoc

impl Serialize for ValueLoc

impl StructuralEq for ValueLoc

impl StructuralPartialEq for ValueLoc

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/index.html b/api/wasmtime_environ/ir/index.html new file mode 100644 index 000000000000..f2f46a813fbe --- /dev/null +++ b/api/wasmtime_environ/ir/index.html @@ -0,0 +1,16 @@ +wasmtime_environ::ir - Rust

[][src]Module wasmtime_environ::ir

Modules

+
types

Common types for the Cranelift code generator.

+

Structs

+
AbiParam

Function parameter or return value descriptor.

+
Signature

Function signature.

+
SourceLoc

A source location.

+
StackSlots

Stack frame manager.

+
Type

The type of an SSA value.

+
ValueLabel

Marked with a label value.

+

Enums

+
ArgumentPurpose

The special purpose of a function argument.

+
TrapCode

A trap code describing the reason for a trap.

+
ValueLoc

Value location.

+

Type Definitions

+
ValueLabelsRanges

Resulting map of Value labels and their ranges/locations.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/sidebar-items.js b/api/wasmtime_environ/ir/sidebar-items.js new file mode 100644 index 000000000000..d7951f8a5d19 --- /dev/null +++ b/api/wasmtime_environ/ir/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["ArgumentPurpose","The special purpose of a function argument."],["TrapCode","A trap code describing the reason for a trap."],["ValueLoc","Value location."]],"mod":[["types","Common types for the Cranelift code generator."]],"struct":[["AbiParam","Function parameter or return value descriptor."],["Signature","Function signature."],["SourceLoc","A source location."],["StackSlots","Stack frame manager."],["Type","The type of an SSA value."],["ValueLabel","Marked with a label value."]],"type":[["ValueLabelsRanges","Resulting map of Value labels and their ranges/locations."]]}); \ No newline at end of file diff --git a/api/wasmtime_environ/ir/struct.AbiParam.html b/api/wasmtime_environ/ir/struct.AbiParam.html new file mode 100644 index 000000000000..c8ca04f308a5 --- /dev/null +++ b/api/wasmtime_environ/ir/struct.AbiParam.html @@ -0,0 +1,45 @@ +wasmtime_environ::ir::AbiParam - Rust

[]Struct wasmtime_environ::ir::AbiParam

pub struct AbiParam {
+    pub value_type: Type,
+    pub purpose: ArgumentPurpose,
+    pub extension: ArgumentExtension,
+    pub location: ArgumentLoc,
+}

Function parameter or return value descriptor.

+

This describes the value type being passed to or from a function along with flags that affect +how the argument is passed.

+

+ Fields

value_type: Type

Type of the argument value.

+
purpose: ArgumentPurpose

Special purpose of argument, or Normal.

+
extension: ArgumentExtension

Method for extending argument to a full register.

+
location: ArgumentLoc

ABI-specific location of this argument, or Unassigned for arguments that have not yet +been legalized.

+

Methods

impl AbiParam

pub fn new(vt: Type) -> AbiParam

Create a parameter with default flags.

+

pub fn special(vt: Type, purpose: ArgumentPurpose) -> AbiParam

Create a special-purpose parameter that is not (yet) bound to a specific register.

+

pub fn special_reg(vt: Type, purpose: ArgumentPurpose, regunit: u16) -> AbiParam

Create a parameter for a special-purpose register.

+

pub fn uext(self) -> AbiParam

Convert self to a parameter with the uext flag set.

+

pub fn sext(self) -> AbiParam

Convert self to a parameter type with the sext flag set.

+

pub fn display<'a, R>(&'a self, regs: R) -> DisplayAbiParam<'a> where
    R: Into<Option<&'a RegInfo>>, 

Return an object that can display self with correct register names.

+

Trait Implementations

impl Clone for AbiParam

impl Copy for AbiParam

impl Debug for AbiParam

impl Display for AbiParam

impl Eq for AbiParam

impl Hash for AbiParam

impl PartialEq<AbiParam> for AbiParam

impl StructuralEq for AbiParam

impl StructuralPartialEq for AbiParam

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/struct.Signature.html b/api/wasmtime_environ/ir/struct.Signature.html new file mode 100644 index 000000000000..87784f7b0f23 --- /dev/null +++ b/api/wasmtime_environ/ir/struct.Signature.html @@ -0,0 +1,51 @@ +wasmtime_environ::ir::Signature - Rust

[]Struct wasmtime_environ::ir::Signature

pub struct Signature {
+    pub params: Vec<AbiParam>,
+    pub returns: Vec<AbiParam>,
+    pub call_conv: CallConv,
+}

Function signature.

+

The function signature describes the types of formal parameters and return values along with +other details that are needed to call a function correctly.

+

A signature can optionally include ISA-specific ABI information which specifies exactly how +arguments and return values are passed.

+

+ Fields

params: Vec<AbiParam>

The arguments passed to the function.

+
returns: Vec<AbiParam>

Values returned from the function.

+
call_conv: CallConv

Calling convention.

+

Methods

impl Signature

pub fn new(call_conv: CallConv) -> Signature

Create a new blank signature.

+

pub fn clear(&mut self, call_conv: CallConv)

Clear the signature so it is identical to a fresh one returned by new().

+

pub fn display<'a, R>(&'a self, regs: R) -> DisplaySignature<'a> where
    R: Into<Option<&'a RegInfo>>, 

Return an object that can display self with correct register names.

+

pub fn special_param_index(&self, purpose: ArgumentPurpose) -> Option<usize>

Find the index of a presumed unique special-purpose parameter.

+

pub fn special_return_index(&self, purpose: ArgumentPurpose) -> Option<usize>

Find the index of a presumed unique special-purpose parameter.

+

pub fn uses_special_param(&self, purpose: ArgumentPurpose) -> bool

Does this signature have a parameter whose ArgumentPurpose is +purpose?

+

pub fn uses_special_return(&self, purpose: ArgumentPurpose) -> bool

Does this signature have a return whose ArgumentPurpose is purpose?

+

pub fn num_special_params(&self) -> usize

How many special parameters does this function have?

+

pub fn num_special_returns(&self) -> usize

How many special returns does this function have?

+

pub fn uses_struct_return_param(&self) -> bool

Does this signature take an struct return pointer parameter?

+

pub fn is_multi_return(&self) -> bool

Does this return more than one normal value? (Pre-struct return +legalization)

+

Trait Implementations

impl Clone for Signature

impl Debug for Signature

impl Display for Signature

impl Eq for Signature

impl Hash for Signature

impl PartialEq<Signature> for Signature

impl StructuralEq for Signature

impl StructuralPartialEq for Signature

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/struct.SourceLoc.html b/api/wasmtime_environ/ir/struct.SourceLoc.html new file mode 100644 index 000000000000..db741e03abb9 --- /dev/null +++ b/api/wasmtime_environ/ir/struct.SourceLoc.html @@ -0,0 +1,34 @@ +wasmtime_environ::ir::SourceLoc - Rust

[]Struct wasmtime_environ::ir::SourceLoc

pub struct SourceLoc(_);

A source location.

+

This is an opaque 32-bit number attached to each Cranelift IR instruction. Cranelift does not +interpret source locations in any way, they are simply preserved from the input to the output.

+

The default source location uses the all-ones bit pattern !0. It is used for instructions +that can't be given a real source location.

+

Methods

impl SourceLoc

pub fn new(bits: u32) -> SourceLoc

Create a new source location with the given bits.

+

pub fn is_default(self) -> bool

Is this the default source location?

+

pub fn bits(self) -> u32

Read the bits of this source location.

+

Trait Implementations

impl Clone for SourceLoc

impl Copy for SourceLoc

impl Debug for SourceLoc

impl Default for SourceLoc

impl<'de> Deserialize<'de> for SourceLoc

impl Display for SourceLoc

impl Eq for SourceLoc

impl PartialEq<SourceLoc> for SourceLoc

impl Serialize for SourceLoc

impl StructuralEq for SourceLoc

impl StructuralPartialEq for SourceLoc

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/struct.StackSlots.html b/api/wasmtime_environ/ir/struct.StackSlots.html new file mode 100644 index 000000000000..4719c7b24e7a --- /dev/null +++ b/api/wasmtime_environ/ir/struct.StackSlots.html @@ -0,0 +1,58 @@ +wasmtime_environ::ir::StackSlots - Rust

[]Struct wasmtime_environ::ir::StackSlots

pub struct StackSlots {
+    pub layout_info: Option<StackLayoutInfo>,
+    // some fields omitted
+}

Stack frame manager.

+

Keep track of all the stack slots used by a function.

+

+ Fields

layout_info: Option<StackLayoutInfo>

Layout information computed from layout_stack.

+

Methods

impl StackSlots

Stack slot manager functions that behave mostly like an entity map.

+

pub fn new() -> StackSlots

Create an empty stack slot manager.

+

pub fn clear(&mut self)

Clear out everything.

+

pub fn push(&mut self, data: StackSlotData) -> StackSlot

Allocate a new stack slot.

+

This function should be primarily used by the text format parser. There are more convenient +functions for creating specific kinds of stack slots below.

+

pub fn is_valid(&self, ss: StackSlot) -> bool

Check if ss is a valid stack slot reference.

+

pub fn iter(&self) -> Iter<StackSlot, StackSlotData>

Get an iterator over all the stack slot keys.

+

pub fn iter_mut(&mut self) -> IterMut<StackSlot, StackSlotData>

Get an iterator over all the stack slot keys, mutable edition.

+

pub fn values(&self) -> Iter<StackSlotData>

Get an iterator over all the stack slot records.

+

pub fn values_mut(&mut self) -> IterMut<StackSlotData>

Get an iterator over all the stack slot records, mutable edition.

+

pub fn keys(&self) -> Keys<StackSlot>

Get an iterator over all the stack slot keys.

+

pub fn next_key(&self) -> StackSlot

Get a reference to the next stack slot that would be created by push().

+

This should just be used by the parser.

+

impl StackSlots

Higher-level stack frame manipulation functions.

+

pub fn make_spill_slot(&mut self, ty: Type) -> StackSlot

Create a new spill slot for spilling values of type ty.

+

pub fn make_incoming_arg(&mut self, ty: Type, offset: i32) -> StackSlot

Create a stack slot representing an incoming function argument.

+

pub fn get_outgoing_arg(&mut self, ty: Type, offset: i32) -> StackSlot

Get a stack slot representing an outgoing argument.

+

This may create a new stack slot, or reuse an existing outgoing stack slot with the +requested offset and size.

+

The requested offset is relative to this function's stack pointer immediately before making +the call.

+

pub fn get_emergency_slot(
    &mut self,
    ty: Type,
    in_use: &[PackedOption<StackSlot>]
) -> StackSlot

Get an emergency spill slot that can be used to store a ty value.

+

This may allocate a new slot, or it may reuse an existing emergency spill slot, excluding +any slots in the in_use list.

+

Trait Implementations

impl Clone for StackSlots

impl Debug for StackSlots

impl<'de> Deserialize<'de> for StackSlots

impl Eq for StackSlots

impl Index<StackSlot> for StackSlots

type Output = StackSlotData

The returned type after indexing.

+

impl IndexMut<StackSlot> for StackSlots

impl PartialEq<StackSlots> for StackSlots

impl Serialize for StackSlots

impl StructuralEq for StackSlots

impl StructuralPartialEq for StackSlots

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/struct.Type.html b/api/wasmtime_environ/ir/struct.Type.html new file mode 100644 index 000000000000..085b0ced8f9d --- /dev/null +++ b/api/wasmtime_environ/ir/struct.Type.html @@ -0,0 +1,85 @@ +wasmtime_environ::ir::Type - Rust

[]Struct wasmtime_environ::ir::Type

pub struct Type(_);

The type of an SSA value.

+

The INVALID type isn't a real type, and is used as a placeholder in the IR where a type +field is present put no type is needed, such as the controlling type variable for a +non-polymorphic instruction.

+

Basic integer types: I8, I16, I32, I64, and I128. These types are sign-agnostic.

+

Basic floating point types: F32 and F64. IEEE single and double precision.

+

Boolean types: B1, B8, B16, B32, B64, and B128. These all encode 'true' or 'false'. The +larger types use redundant bits.

+

SIMD vector types have power-of-two lanes, up to 256. Lanes can be any int/float/bool type.

+

Methods

impl Type

pub fn lane_type(self) -> Type

Get the lane type of this SIMD vector type.

+

A lane type is the same as a SIMD vector type with one lane, so it returns itself.

+

pub fn lane_of(self) -> Type

The type transformation that returns the lane type of a type variable; it is just a +renaming of lane_type() to be used in context where we think in terms of type variable +transformations.

+

pub fn log2_lane_bits(self) -> u8

Get log_2 of the number of bits in a lane.

+

pub fn lane_bits(self) -> u8

Get the number of bits in a lane.

+

pub fn int(bits: u16) -> Option<Type>

Get an integer type with the requested number of bits.

+

pub fn as_bool_pedantic(self) -> Type

Get a type with the same number of lanes as this type, but with the lanes replaced by +booleans of the same size.

+

Lane types are treated as vectors with one lane, so they are converted to the multi-bit +boolean types.

+

pub fn as_bool(self) -> Type

Get a type with the same number of lanes as this type, but with the lanes replaced by +booleans of the same size.

+

Scalar types are all converted to b1 which is usually what you want.

+

pub fn half_width(self) -> Option<Type>

Get a type with the same number of lanes as this type, but with lanes that are half the +number of bits.

+

pub fn double_width(self) -> Option<Type>

Get a type with the same number of lanes as this type, but with lanes that are twice the +number of bits.

+

pub fn is_invalid(self) -> bool

Is this the INVALID type?

+

pub fn is_special(self) -> bool

Is this a special type?

+

pub fn is_lane(self) -> bool

Is this a lane type?

+

This is a scalar type that can also appear as the lane type of a SIMD vector.

+

pub fn is_vector(self) -> bool

Is this a SIMD vector type?

+

A vector type has 2 or more lanes.

+

pub fn is_bool(self) -> bool

Is this a scalar boolean type?

+

pub fn is_int(self) -> bool

Is this a scalar integer type?

+

pub fn is_float(self) -> bool

Is this a scalar floating point type?

+

pub fn is_flags(self) -> bool

Is this a CPU flags type?

+

pub fn is_ref(self) -> bool

Is this a ref type?

+

pub fn log2_lane_count(self) -> u8

Get log_2 of the number of lanes in this SIMD vector type.

+

All SIMD types have a lane count that is a power of two and no larger than 256, so this +will be a number in the range 0-8.

+

A scalar type is the same as a SIMD vector type with one lane, so it returns 0.

+

pub fn lane_count(self) -> u16

Get the number of lanes in this SIMD vector type.

+

A scalar type is the same as a SIMD vector type with one lane, so it returns 1.

+

pub fn bits(self) -> u16

Get the total number of bits used to represent this type.

+

pub fn bytes(self) -> u32

Get the number of bytes used to store this type in memory.

+

pub fn by(self, n: u16) -> Option<Type>

Get a SIMD vector type with n times more lanes than this one.

+

If this is a scalar type, this produces a SIMD type with this as a lane type and n lanes.

+

If this is already a SIMD vector type, this produces a SIMD vector type with n * self.lane_count() lanes.

+

pub fn half_vector(self) -> Option<Type>

Get a SIMD vector with half the number of lanes.

+

There is no double_vector() method. Use t.by(2) instead.

+

pub fn index(self) -> usize

Index of this type, for use with hash tables etc.

+

pub fn wider_or_equal(self, other: Type) -> bool

True iff:

+
    +
  1. self.lane_count() == other.lane_count() and
  2. +
  3. self.lane_bits() >= other.lane_bits()
  4. +
+

pub fn triple_pointer_type(triple: &Triple) -> Type

Return the pointer type for the given target triple.

+

Trait Implementations

impl Clone for Type

impl Copy for Type

impl Debug for Type

impl Default for Type

impl Display for Type

impl Eq for Type

impl Hash for Type

impl PartialEq<Type> for Type

impl StructuralEq for Type

impl StructuralPartialEq for Type

Auto Trait Implementations

impl RefUnwindSafe for Type

impl Send for Type

impl Sync for Type

impl Unpin for Type

impl UnwindSafe for Type

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/struct.ValueLabel.html b/api/wasmtime_environ/ir/struct.ValueLabel.html new file mode 100644 index 000000000000..0a21f4a9f9d0 --- /dev/null +++ b/api/wasmtime_environ/ir/struct.ValueLabel.html @@ -0,0 +1,34 @@ +wasmtime_environ::ir::ValueLabel - Rust

[]Struct wasmtime_environ::ir::ValueLabel

pub struct ValueLabel(_);

Marked with a label value.

+

Methods

impl ValueLabel

pub fn from_u32(x: u32) -> ValueLabel

Return the underlying index value as a u32.

+

pub fn as_u32(self) -> u32

Return the underlying index value as a u32.

+

Trait Implementations

impl Clone for ValueLabel

impl Copy for ValueLabel

impl Debug for ValueLabel

impl<'de> Deserialize<'de> for ValueLabel

impl Display for ValueLabel

impl EntityRef for ValueLabel

impl Eq for ValueLabel

impl Hash for ValueLabel

impl PartialEq<ValueLabel> for ValueLabel

impl ReservedValue for ValueLabel

impl Serialize for ValueLabel

impl StructuralEq for ValueLabel

impl StructuralPartialEq for ValueLabel

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> SparseMapValue<T> for T where
    T: EntityRef

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/type.ValueLabelsRanges.html b/api/wasmtime_environ/ir/type.ValueLabelsRanges.html new file mode 100644 index 000000000000..869c541e49f9 --- /dev/null +++ b/api/wasmtime_environ/ir/type.ValueLabelsRanges.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::ValueLabelsRanges - Rust

[]Type Definition wasmtime_environ::ir::ValueLabelsRanges

type ValueLabelsRanges = HashMap<ValueLabel, Vec<ValueLocRange>, RandomState>;

Resulting map of Value labels and their ranges/locations.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B1.html b/api/wasmtime_environ/ir/types/constant.B1.html new file mode 100644 index 000000000000..6c5b593214d1 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B1.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B1 - Rust

[]Constant wasmtime_environ::ir::types::B1

pub const B1: Type;

A boolean type with 1 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B128.html b/api/wasmtime_environ/ir/types/constant.B128.html new file mode 100644 index 000000000000..0e7726f3f0d5 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B128.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B128 - Rust

[]Constant wasmtime_environ::ir::types::B128

pub const B128: Type;

A boolean type with 128 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B128X2.html b/api/wasmtime_environ/ir/types/constant.B128X2.html new file mode 100644 index 000000000000..bfec479b0321 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B128X2.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B128X2 - Rust

[]Constant wasmtime_environ::ir::types::B128X2

pub const B128X2: Type;

A SIMD vector with 2 lanes containing a b128 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B128X4.html b/api/wasmtime_environ/ir/types/constant.B128X4.html new file mode 100644 index 000000000000..582a1565e9ab --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B128X4.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B128X4 - Rust

[]Constant wasmtime_environ::ir::types::B128X4

pub const B128X4: Type;

A SIMD vector with 4 lanes containing a b128 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B16.html b/api/wasmtime_environ/ir/types/constant.B16.html new file mode 100644 index 000000000000..f9ddb6433d36 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B16.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B16 - Rust

[]Constant wasmtime_environ::ir::types::B16

pub const B16: Type;

A boolean type with 16 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B16X16.html b/api/wasmtime_environ/ir/types/constant.B16X16.html new file mode 100644 index 000000000000..804eed965835 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B16X16.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B16X16 - Rust

[]Constant wasmtime_environ::ir::types::B16X16

pub const B16X16: Type;

A SIMD vector with 16 lanes containing a b16 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B16X32.html b/api/wasmtime_environ/ir/types/constant.B16X32.html new file mode 100644 index 000000000000..d6de07c9ec61 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B16X32.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B16X32 - Rust

[]Constant wasmtime_environ::ir::types::B16X32

pub const B16X32: Type;

A SIMD vector with 32 lanes containing a b16 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B16X4.html b/api/wasmtime_environ/ir/types/constant.B16X4.html new file mode 100644 index 000000000000..3eb6e2344610 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B16X4.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B16X4 - Rust

[]Constant wasmtime_environ::ir::types::B16X4

pub const B16X4: Type;

A SIMD vector with 4 lanes containing a b16 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B16X8.html b/api/wasmtime_environ/ir/types/constant.B16X8.html new file mode 100644 index 000000000000..52ffff4a351d --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B16X8.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B16X8 - Rust

[]Constant wasmtime_environ::ir::types::B16X8

pub const B16X8: Type;

A SIMD vector with 8 lanes containing a b16 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B32.html b/api/wasmtime_environ/ir/types/constant.B32.html new file mode 100644 index 000000000000..823a6850f7ab --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B32.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B32 - Rust

[]Constant wasmtime_environ::ir::types::B32

pub const B32: Type;

A boolean type with 32 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B32X16.html b/api/wasmtime_environ/ir/types/constant.B32X16.html new file mode 100644 index 000000000000..1ff577c70e01 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B32X16.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B32X16 - Rust

[]Constant wasmtime_environ::ir::types::B32X16

pub const B32X16: Type;

A SIMD vector with 16 lanes containing a b32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B32X2.html b/api/wasmtime_environ/ir/types/constant.B32X2.html new file mode 100644 index 000000000000..78979af79bc5 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B32X2.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B32X2 - Rust

[]Constant wasmtime_environ::ir::types::B32X2

pub const B32X2: Type;

A SIMD vector with 2 lanes containing a b32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B32X4.html b/api/wasmtime_environ/ir/types/constant.B32X4.html new file mode 100644 index 000000000000..53025c1f4d06 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B32X4.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B32X4 - Rust

[]Constant wasmtime_environ::ir::types::B32X4

pub const B32X4: Type;

A SIMD vector with 4 lanes containing a b32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B32X8.html b/api/wasmtime_environ/ir/types/constant.B32X8.html new file mode 100644 index 000000000000..878926a8ad4b --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B32X8.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B32X8 - Rust

[]Constant wasmtime_environ::ir::types::B32X8

pub const B32X8: Type;

A SIMD vector with 8 lanes containing a b32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B64.html b/api/wasmtime_environ/ir/types/constant.B64.html new file mode 100644 index 000000000000..bd600cd3516f --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B64.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B64 - Rust

[]Constant wasmtime_environ::ir::types::B64

pub const B64: Type;

A boolean type with 64 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B64X2.html b/api/wasmtime_environ/ir/types/constant.B64X2.html new file mode 100644 index 000000000000..2008abdf7018 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B64X2.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B64X2 - Rust

[]Constant wasmtime_environ::ir::types::B64X2

pub const B64X2: Type;

A SIMD vector with 2 lanes containing a b64 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B64X4.html b/api/wasmtime_environ/ir/types/constant.B64X4.html new file mode 100644 index 000000000000..a9ade022acf4 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B64X4.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B64X4 - Rust

[]Constant wasmtime_environ::ir::types::B64X4

pub const B64X4: Type;

A SIMD vector with 4 lanes containing a b64 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B64X8.html b/api/wasmtime_environ/ir/types/constant.B64X8.html new file mode 100644 index 000000000000..2a0af200c894 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B64X8.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B64X8 - Rust

[]Constant wasmtime_environ::ir::types::B64X8

pub const B64X8: Type;

A SIMD vector with 8 lanes containing a b64 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B8.html b/api/wasmtime_environ/ir/types/constant.B8.html new file mode 100644 index 000000000000..ff26156e3902 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B8.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B8 - Rust

[]Constant wasmtime_environ::ir::types::B8

pub const B8: Type;

A boolean type with 8 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B8X16.html b/api/wasmtime_environ/ir/types/constant.B8X16.html new file mode 100644 index 000000000000..4222eb14b767 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B8X16.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B8X16 - Rust

[]Constant wasmtime_environ::ir::types::B8X16

pub const B8X16: Type;

A SIMD vector with 16 lanes containing a b8 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B8X32.html b/api/wasmtime_environ/ir/types/constant.B8X32.html new file mode 100644 index 000000000000..856e038994be --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B8X32.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B8X32 - Rust

[]Constant wasmtime_environ::ir::types::B8X32

pub const B8X32: Type;

A SIMD vector with 32 lanes containing a b8 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B8X64.html b/api/wasmtime_environ/ir/types/constant.B8X64.html new file mode 100644 index 000000000000..ccf1a55ac673 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B8X64.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B8X64 - Rust

[]Constant wasmtime_environ::ir::types::B8X64

pub const B8X64: Type;

A SIMD vector with 64 lanes containing a b8 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.B8X8.html b/api/wasmtime_environ/ir/types/constant.B8X8.html new file mode 100644 index 000000000000..96d07f307e3a --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.B8X8.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::B8X8 - Rust

[]Constant wasmtime_environ::ir::types::B8X8

pub const B8X8: Type;

A SIMD vector with 8 lanes containing a b8 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.F32.html b/api/wasmtime_environ/ir/types/constant.F32.html new file mode 100644 index 000000000000..167cc6be128a --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.F32.html @@ -0,0 +1,4 @@ +wasmtime_environ::ir::types::F32 - Rust

[]Constant wasmtime_environ::ir::types::F32

pub const F32: Type;

A 32-bit floating point type represented in the IEEE 754-2008 +binary32 interchange format. This corresponds to the :c:type:float +type in most C implementations.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.F32X16.html b/api/wasmtime_environ/ir/types/constant.F32X16.html new file mode 100644 index 000000000000..ceab61bc5185 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.F32X16.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::F32X16 - Rust

[]Constant wasmtime_environ::ir::types::F32X16

pub const F32X16: Type;

A SIMD vector with 16 lanes containing a f32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.F32X2.html b/api/wasmtime_environ/ir/types/constant.F32X2.html new file mode 100644 index 000000000000..106aedb0338d --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.F32X2.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::F32X2 - Rust

[]Constant wasmtime_environ::ir::types::F32X2

pub const F32X2: Type;

A SIMD vector with 2 lanes containing a f32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.F32X4.html b/api/wasmtime_environ/ir/types/constant.F32X4.html new file mode 100644 index 000000000000..e67fd6657b45 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.F32X4.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::F32X4 - Rust

[]Constant wasmtime_environ::ir::types::F32X4

pub const F32X4: Type;

A SIMD vector with 4 lanes containing a f32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.F32X8.html b/api/wasmtime_environ/ir/types/constant.F32X8.html new file mode 100644 index 000000000000..dee4a1ebf2c0 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.F32X8.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::F32X8 - Rust

[]Constant wasmtime_environ::ir::types::F32X8

pub const F32X8: Type;

A SIMD vector with 8 lanes containing a f32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.F64.html b/api/wasmtime_environ/ir/types/constant.F64.html new file mode 100644 index 000000000000..76bea1892b2e --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.F64.html @@ -0,0 +1,4 @@ +wasmtime_environ::ir::types::F64 - Rust

[]Constant wasmtime_environ::ir::types::F64

pub const F64: Type;

A 64-bit floating point type represented in the IEEE 754-2008 +binary64 interchange format. This corresponds to the :c:type:double +type in most C implementations.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.F64X2.html b/api/wasmtime_environ/ir/types/constant.F64X2.html new file mode 100644 index 000000000000..39fe340a3022 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.F64X2.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::F64X2 - Rust

[]Constant wasmtime_environ::ir::types::F64X2

pub const F64X2: Type;

A SIMD vector with 2 lanes containing a f64 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.F64X4.html b/api/wasmtime_environ/ir/types/constant.F64X4.html new file mode 100644 index 000000000000..a1d1f812b79f --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.F64X4.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::F64X4 - Rust

[]Constant wasmtime_environ::ir::types::F64X4

pub const F64X4: Type;

A SIMD vector with 4 lanes containing a f64 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.F64X8.html b/api/wasmtime_environ/ir/types/constant.F64X8.html new file mode 100644 index 000000000000..6ec77bb6b817 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.F64X8.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::F64X8 - Rust

[]Constant wasmtime_environ::ir::types::F64X8

pub const F64X8: Type;

A SIMD vector with 8 lanes containing a f64 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.FFLAGS.html b/api/wasmtime_environ/ir/types/constant.FFLAGS.html new file mode 100644 index 000000000000..8698fe1dd94d --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.FFLAGS.html @@ -0,0 +1,3 @@ +wasmtime_environ::ir::types::FFLAGS - Rust

[]Constant wasmtime_environ::ir::types::FFLAGS

pub const FFLAGS: Type;

CPU flags representing the result of a floating point comparison. These +flags can be tested with a :type:floatcc condition code.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I128.html b/api/wasmtime_environ/ir/types/constant.I128.html new file mode 100644 index 000000000000..1e3d2e36d47a --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I128.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I128 - Rust

[]Constant wasmtime_environ::ir::types::I128

pub const I128: Type;

An integer type with 128 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I128X2.html b/api/wasmtime_environ/ir/types/constant.I128X2.html new file mode 100644 index 000000000000..eec06dd4675e --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I128X2.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I128X2 - Rust

[]Constant wasmtime_environ::ir::types::I128X2

pub const I128X2: Type;

A SIMD vector with 2 lanes containing a i128 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I128X4.html b/api/wasmtime_environ/ir/types/constant.I128X4.html new file mode 100644 index 000000000000..1f86d1704f5b --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I128X4.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I128X4 - Rust

[]Constant wasmtime_environ::ir::types::I128X4

pub const I128X4: Type;

A SIMD vector with 4 lanes containing a i128 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I16.html b/api/wasmtime_environ/ir/types/constant.I16.html new file mode 100644 index 000000000000..90a939822dc6 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I16.html @@ -0,0 +1,3 @@ +wasmtime_environ::ir::types::I16 - Rust

[]Constant wasmtime_environ::ir::types::I16

pub const I16: Type;

An integer type with 16 bits. +WARNING: arithmetic on 16bit integers is incomplete

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I16X16.html b/api/wasmtime_environ/ir/types/constant.I16X16.html new file mode 100644 index 000000000000..c0ef428c1ef5 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I16X16.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I16X16 - Rust

[]Constant wasmtime_environ::ir::types::I16X16

pub const I16X16: Type;

A SIMD vector with 16 lanes containing a i16 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I16X32.html b/api/wasmtime_environ/ir/types/constant.I16X32.html new file mode 100644 index 000000000000..bdd67a870868 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I16X32.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I16X32 - Rust

[]Constant wasmtime_environ::ir::types::I16X32

pub const I16X32: Type;

A SIMD vector with 32 lanes containing a i16 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I16X4.html b/api/wasmtime_environ/ir/types/constant.I16X4.html new file mode 100644 index 000000000000..74c9badc877c --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I16X4.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I16X4 - Rust

[]Constant wasmtime_environ::ir::types::I16X4

pub const I16X4: Type;

A SIMD vector with 4 lanes containing a i16 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I16X8.html b/api/wasmtime_environ/ir/types/constant.I16X8.html new file mode 100644 index 000000000000..d08df5b9059a --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I16X8.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I16X8 - Rust

[]Constant wasmtime_environ::ir::types::I16X8

pub const I16X8: Type;

A SIMD vector with 8 lanes containing a i16 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I32.html b/api/wasmtime_environ/ir/types/constant.I32.html new file mode 100644 index 000000000000..8f21436c0e19 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I32.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I32 - Rust

[]Constant wasmtime_environ::ir::types::I32

pub const I32: Type;

An integer type with 32 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I32X16.html b/api/wasmtime_environ/ir/types/constant.I32X16.html new file mode 100644 index 000000000000..e15538fef042 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I32X16.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I32X16 - Rust

[]Constant wasmtime_environ::ir::types::I32X16

pub const I32X16: Type;

A SIMD vector with 16 lanes containing a i32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I32X2.html b/api/wasmtime_environ/ir/types/constant.I32X2.html new file mode 100644 index 000000000000..b37f3ed3eb13 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I32X2.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I32X2 - Rust

[]Constant wasmtime_environ::ir::types::I32X2

pub const I32X2: Type;

A SIMD vector with 2 lanes containing a i32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I32X4.html b/api/wasmtime_environ/ir/types/constant.I32X4.html new file mode 100644 index 000000000000..85427192380e --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I32X4.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I32X4 - Rust

[]Constant wasmtime_environ::ir::types::I32X4

pub const I32X4: Type;

A SIMD vector with 4 lanes containing a i32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I32X8.html b/api/wasmtime_environ/ir/types/constant.I32X8.html new file mode 100644 index 000000000000..65f0613305e7 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I32X8.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I32X8 - Rust

[]Constant wasmtime_environ::ir::types::I32X8

pub const I32X8: Type;

A SIMD vector with 8 lanes containing a i32 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I64.html b/api/wasmtime_environ/ir/types/constant.I64.html new file mode 100644 index 000000000000..531c1f26ed8b --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I64.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I64 - Rust

[]Constant wasmtime_environ::ir::types::I64

pub const I64: Type;

An integer type with 64 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I64X2.html b/api/wasmtime_environ/ir/types/constant.I64X2.html new file mode 100644 index 000000000000..44cf0da54147 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I64X2.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I64X2 - Rust

[]Constant wasmtime_environ::ir::types::I64X2

pub const I64X2: Type;

A SIMD vector with 2 lanes containing a i64 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I64X4.html b/api/wasmtime_environ/ir/types/constant.I64X4.html new file mode 100644 index 000000000000..cc6868d5f6b9 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I64X4.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I64X4 - Rust

[]Constant wasmtime_environ::ir::types::I64X4

pub const I64X4: Type;

A SIMD vector with 4 lanes containing a i64 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I64X8.html b/api/wasmtime_environ/ir/types/constant.I64X8.html new file mode 100644 index 000000000000..040d28315a33 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I64X8.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I64X8 - Rust

[]Constant wasmtime_environ::ir::types::I64X8

pub const I64X8: Type;

A SIMD vector with 8 lanes containing a i64 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I8.html b/api/wasmtime_environ/ir/types/constant.I8.html new file mode 100644 index 000000000000..fa2fe39a43f6 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I8.html @@ -0,0 +1,3 @@ +wasmtime_environ::ir::types::I8 - Rust

[]Constant wasmtime_environ::ir::types::I8

pub const I8: Type;

An integer type with 8 bits. +WARNING: arithmetic on 8bit integers is incomplete

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I8X16.html b/api/wasmtime_environ/ir/types/constant.I8X16.html new file mode 100644 index 000000000000..0ee2125b910b --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I8X16.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I8X16 - Rust

[]Constant wasmtime_environ::ir::types::I8X16

pub const I8X16: Type;

A SIMD vector with 16 lanes containing a i8 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I8X32.html b/api/wasmtime_environ/ir/types/constant.I8X32.html new file mode 100644 index 000000000000..bd5084ce312b --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I8X32.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I8X32 - Rust

[]Constant wasmtime_environ::ir::types::I8X32

pub const I8X32: Type;

A SIMD vector with 32 lanes containing a i8 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I8X64.html b/api/wasmtime_environ/ir/types/constant.I8X64.html new file mode 100644 index 000000000000..337bb2d8c620 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I8X64.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I8X64 - Rust

[]Constant wasmtime_environ::ir::types::I8X64

pub const I8X64: Type;

A SIMD vector with 64 lanes containing a i8 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.I8X8.html b/api/wasmtime_environ/ir/types/constant.I8X8.html new file mode 100644 index 000000000000..53ce03a7feb0 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.I8X8.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::I8X8 - Rust

[]Constant wasmtime_environ::ir::types::I8X8

pub const I8X8: Type;

A SIMD vector with 8 lanes containing a i8 each.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.IFLAGS.html b/api/wasmtime_environ/ir/types/constant.IFLAGS.html new file mode 100644 index 000000000000..78b10361607f --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.IFLAGS.html @@ -0,0 +1,3 @@ +wasmtime_environ::ir::types::IFLAGS - Rust

[]Constant wasmtime_environ::ir::types::IFLAGS

pub const IFLAGS: Type;

CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.INVALID.html b/api/wasmtime_environ/ir/types/constant.INVALID.html new file mode 100644 index 000000000000..4d492e04d164 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.INVALID.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::INVALID - Rust

[]Constant wasmtime_environ::ir::types::INVALID

pub const INVALID: Type;

Not a valid type. Can't be loaded or stored. Can't be part of a SIMD vector.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.R32.html b/api/wasmtime_environ/ir/types/constant.R32.html new file mode 100644 index 000000000000..c7c6ff72b556 --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.R32.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::R32 - Rust

[]Constant wasmtime_environ::ir::types::R32

pub const R32: Type;

An opaque reference type with 32 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/constant.R64.html b/api/wasmtime_environ/ir/types/constant.R64.html new file mode 100644 index 000000000000..d6c18ef1f66b --- /dev/null +++ b/api/wasmtime_environ/ir/types/constant.R64.html @@ -0,0 +1,2 @@ +wasmtime_environ::ir::types::R64 - Rust

[]Constant wasmtime_environ::ir::types::R64

pub const R64: Type;

An opaque reference type with 64 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/index.html b/api/wasmtime_environ/ir/types/index.html new file mode 100644 index 000000000000..312963316fa2 --- /dev/null +++ b/api/wasmtime_environ/ir/types/index.html @@ -0,0 +1,72 @@ +wasmtime_environ::ir::types - Rust

[]Module wasmtime_environ::ir::types

Common types for the Cranelift code generator.

+

Structs

+
Type

The type of an SSA value.

+

Constants

+
B1

A boolean type with 1 bits.

+
B8

A boolean type with 8 bits.

+
B16

A boolean type with 16 bits.

+
B32

A boolean type with 32 bits.

+
B64

A boolean type with 64 bits.

+
B128

A boolean type with 128 bits.

+
B128X2

A SIMD vector with 2 lanes containing a b128 each.

+
B128X4

A SIMD vector with 4 lanes containing a b128 each.

+
B16X4

A SIMD vector with 4 lanes containing a b16 each.

+
B16X8

A SIMD vector with 8 lanes containing a b16 each.

+
B16X16

A SIMD vector with 16 lanes containing a b16 each.

+
B16X32

A SIMD vector with 32 lanes containing a b16 each.

+
B32X2

A SIMD vector with 2 lanes containing a b32 each.

+
B32X4

A SIMD vector with 4 lanes containing a b32 each.

+
B32X8

A SIMD vector with 8 lanes containing a b32 each.

+
B32X16

A SIMD vector with 16 lanes containing a b32 each.

+
B64X2

A SIMD vector with 2 lanes containing a b64 each.

+
B64X4

A SIMD vector with 4 lanes containing a b64 each.

+
B64X8

A SIMD vector with 8 lanes containing a b64 each.

+
B8X8

A SIMD vector with 8 lanes containing a b8 each.

+
B8X16

A SIMD vector with 16 lanes containing a b8 each.

+
B8X32

A SIMD vector with 32 lanes containing a b8 each.

+
B8X64

A SIMD vector with 64 lanes containing a b8 each.

+
F32

A 32-bit floating point type represented in the IEEE 754-2008 +binary32 interchange format. This corresponds to the :c:type:float +type in most C implementations.

+
F64

A 64-bit floating point type represented in the IEEE 754-2008 +binary64 interchange format. This corresponds to the :c:type:double +type in most C implementations.

+
F32X2

A SIMD vector with 2 lanes containing a f32 each.

+
F32X4

A SIMD vector with 4 lanes containing a f32 each.

+
F32X8

A SIMD vector with 8 lanes containing a f32 each.

+
F32X16

A SIMD vector with 16 lanes containing a f32 each.

+
F64X2

A SIMD vector with 2 lanes containing a f64 each.

+
F64X4

A SIMD vector with 4 lanes containing a f64 each.

+
F64X8

A SIMD vector with 8 lanes containing a f64 each.

+
FFLAGS

CPU flags representing the result of a floating point comparison. These +flags can be tested with a :type:floatcc condition code.

+
I8

An integer type with 8 bits. +WARNING: arithmetic on 8bit integers is incomplete

+
I16

An integer type with 16 bits. +WARNING: arithmetic on 16bit integers is incomplete

+
I32

An integer type with 32 bits.

+
I64

An integer type with 64 bits.

+
I128

An integer type with 128 bits.

+
I128X2

A SIMD vector with 2 lanes containing a i128 each.

+
I128X4

A SIMD vector with 4 lanes containing a i128 each.

+
I16X4

A SIMD vector with 4 lanes containing a i16 each.

+
I16X8

A SIMD vector with 8 lanes containing a i16 each.

+
I16X16

A SIMD vector with 16 lanes containing a i16 each.

+
I16X32

A SIMD vector with 32 lanes containing a i16 each.

+
I32X2

A SIMD vector with 2 lanes containing a i32 each.

+
I32X4

A SIMD vector with 4 lanes containing a i32 each.

+
I32X8

A SIMD vector with 8 lanes containing a i32 each.

+
I32X16

A SIMD vector with 16 lanes containing a i32 each.

+
I64X2

A SIMD vector with 2 lanes containing a i64 each.

+
I64X4

A SIMD vector with 4 lanes containing a i64 each.

+
I64X8

A SIMD vector with 8 lanes containing a i64 each.

+
I8X8

A SIMD vector with 8 lanes containing a i8 each.

+
I8X16

A SIMD vector with 16 lanes containing a i8 each.

+
I8X32

A SIMD vector with 32 lanes containing a i8 each.

+
I8X64

A SIMD vector with 64 lanes containing a i8 each.

+
IFLAGS

CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.

+
INVALID

Not a valid type. Can't be loaded or stored. Can't be part of a SIMD vector.

+
R32

An opaque reference type with 32 bits.

+
R64

An opaque reference type with 64 bits.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/sidebar-items.js b/api/wasmtime_environ/ir/types/sidebar-items.js new file mode 100644 index 000000000000..d8388aeef0c2 --- /dev/null +++ b/api/wasmtime_environ/ir/types/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["B1","A boolean type with 1 bits."],["B128","A boolean type with 128 bits."],["B128X2","A SIMD vector with 2 lanes containing a `b128` each."],["B128X4","A SIMD vector with 4 lanes containing a `b128` each."],["B16","A boolean type with 16 bits."],["B16X16","A SIMD vector with 16 lanes containing a `b16` each."],["B16X32","A SIMD vector with 32 lanes containing a `b16` each."],["B16X4","A SIMD vector with 4 lanes containing a `b16` each."],["B16X8","A SIMD vector with 8 lanes containing a `b16` each."],["B32","A boolean type with 32 bits."],["B32X16","A SIMD vector with 16 lanes containing a `b32` each."],["B32X2","A SIMD vector with 2 lanes containing a `b32` each."],["B32X4","A SIMD vector with 4 lanes containing a `b32` each."],["B32X8","A SIMD vector with 8 lanes containing a `b32` each."],["B64","A boolean type with 64 bits."],["B64X2","A SIMD vector with 2 lanes containing a `b64` each."],["B64X4","A SIMD vector with 4 lanes containing a `b64` each."],["B64X8","A SIMD vector with 8 lanes containing a `b64` each."],["B8","A boolean type with 8 bits."],["B8X16","A SIMD vector with 16 lanes containing a `b8` each."],["B8X32","A SIMD vector with 32 lanes containing a `b8` each."],["B8X64","A SIMD vector with 64 lanes containing a `b8` each."],["B8X8","A SIMD vector with 8 lanes containing a `b8` each."],["F32","A 32-bit floating point type represented in the IEEE 754-2008 binary32 interchange format. This corresponds to the :c:type:`float` type in most C implementations."],["F32X16","A SIMD vector with 16 lanes containing a `f32` each."],["F32X2","A SIMD vector with 2 lanes containing a `f32` each."],["F32X4","A SIMD vector with 4 lanes containing a `f32` each."],["F32X8","A SIMD vector with 8 lanes containing a `f32` each."],["F64","A 64-bit floating point type represented in the IEEE 754-2008 binary64 interchange format. This corresponds to the :c:type:`double` type in most C implementations."],["F64X2","A SIMD vector with 2 lanes containing a `f64` each."],["F64X4","A SIMD vector with 4 lanes containing a `f64` each."],["F64X8","A SIMD vector with 8 lanes containing a `f64` each."],["FFLAGS","CPU flags representing the result of a floating point comparison. These flags can be tested with a :type:`floatcc` condition code."],["I128","An integer type with 128 bits."],["I128X2","A SIMD vector with 2 lanes containing a `i128` each."],["I128X4","A SIMD vector with 4 lanes containing a `i128` each."],["I16","An integer type with 16 bits. WARNING: arithmetic on 16bit integers is incomplete"],["I16X16","A SIMD vector with 16 lanes containing a `i16` each."],["I16X32","A SIMD vector with 32 lanes containing a `i16` each."],["I16X4","A SIMD vector with 4 lanes containing a `i16` each."],["I16X8","A SIMD vector with 8 lanes containing a `i16` each."],["I32","An integer type with 32 bits."],["I32X16","A SIMD vector with 16 lanes containing a `i32` each."],["I32X2","A SIMD vector with 2 lanes containing a `i32` each."],["I32X4","A SIMD vector with 4 lanes containing a `i32` each."],["I32X8","A SIMD vector with 8 lanes containing a `i32` each."],["I64","An integer type with 64 bits."],["I64X2","A SIMD vector with 2 lanes containing a `i64` each."],["I64X4","A SIMD vector with 4 lanes containing a `i64` each."],["I64X8","A SIMD vector with 8 lanes containing a `i64` each."],["I8","An integer type with 8 bits. WARNING: arithmetic on 8bit integers is incomplete"],["I8X16","A SIMD vector with 16 lanes containing a `i8` each."],["I8X32","A SIMD vector with 32 lanes containing a `i8` each."],["I8X64","A SIMD vector with 64 lanes containing a `i8` each."],["I8X8","A SIMD vector with 8 lanes containing a `i8` each."],["IFLAGS","CPU flags representing the result of an integer comparison. These flags can be tested with an :type:`intcc` condition code."],["INVALID","Not a valid type. Can't be loaded or stored. Can't be part of a SIMD vector."],["R32","An opaque reference type with 32 bits."],["R64","An opaque reference type with 64 bits."]],"struct":[["Type","The type of an SSA value."]]}); \ No newline at end of file diff --git a/api/wasmtime_environ/ir/types/struct.Type.html b/api/wasmtime_environ/ir/types/struct.Type.html new file mode 100644 index 000000000000..fc249f1cb71a --- /dev/null +++ b/api/wasmtime_environ/ir/types/struct.Type.html @@ -0,0 +1,85 @@ +wasmtime_environ::ir::types::Type - Rust

[]Struct wasmtime_environ::ir::types::Type

pub struct Type(_);

The type of an SSA value.

+

The INVALID type isn't a real type, and is used as a placeholder in the IR where a type +field is present put no type is needed, such as the controlling type variable for a +non-polymorphic instruction.

+

Basic integer types: I8, I16, I32, I64, and I128. These types are sign-agnostic.

+

Basic floating point types: F32 and F64. IEEE single and double precision.

+

Boolean types: B1, B8, B16, B32, B64, and B128. These all encode 'true' or 'false'. The +larger types use redundant bits.

+

SIMD vector types have power-of-two lanes, up to 256. Lanes can be any int/float/bool type.

+

Methods

impl Type

pub fn lane_type(self) -> Type

Get the lane type of this SIMD vector type.

+

A lane type is the same as a SIMD vector type with one lane, so it returns itself.

+

pub fn lane_of(self) -> Type

The type transformation that returns the lane type of a type variable; it is just a +renaming of lane_type() to be used in context where we think in terms of type variable +transformations.

+

pub fn log2_lane_bits(self) -> u8

Get log_2 of the number of bits in a lane.

+

pub fn lane_bits(self) -> u8

Get the number of bits in a lane.

+

pub fn int(bits: u16) -> Option<Type>

Get an integer type with the requested number of bits.

+

pub fn as_bool_pedantic(self) -> Type

Get a type with the same number of lanes as this type, but with the lanes replaced by +booleans of the same size.

+

Lane types are treated as vectors with one lane, so they are converted to the multi-bit +boolean types.

+

pub fn as_bool(self) -> Type

Get a type with the same number of lanes as this type, but with the lanes replaced by +booleans of the same size.

+

Scalar types are all converted to b1 which is usually what you want.

+

pub fn half_width(self) -> Option<Type>

Get a type with the same number of lanes as this type, but with lanes that are half the +number of bits.

+

pub fn double_width(self) -> Option<Type>

Get a type with the same number of lanes as this type, but with lanes that are twice the +number of bits.

+

pub fn is_invalid(self) -> bool

Is this the INVALID type?

+

pub fn is_special(self) -> bool

Is this a special type?

+

pub fn is_lane(self) -> bool

Is this a lane type?

+

This is a scalar type that can also appear as the lane type of a SIMD vector.

+

pub fn is_vector(self) -> bool

Is this a SIMD vector type?

+

A vector type has 2 or more lanes.

+

pub fn is_bool(self) -> bool

Is this a scalar boolean type?

+

pub fn is_int(self) -> bool

Is this a scalar integer type?

+

pub fn is_float(self) -> bool

Is this a scalar floating point type?

+

pub fn is_flags(self) -> bool

Is this a CPU flags type?

+

pub fn is_ref(self) -> bool

Is this a ref type?

+

pub fn log2_lane_count(self) -> u8

Get log_2 of the number of lanes in this SIMD vector type.

+

All SIMD types have a lane count that is a power of two and no larger than 256, so this +will be a number in the range 0-8.

+

A scalar type is the same as a SIMD vector type with one lane, so it returns 0.

+

pub fn lane_count(self) -> u16

Get the number of lanes in this SIMD vector type.

+

A scalar type is the same as a SIMD vector type with one lane, so it returns 1.

+

pub fn bits(self) -> u16

Get the total number of bits used to represent this type.

+

pub fn bytes(self) -> u32

Get the number of bytes used to store this type in memory.

+

pub fn by(self, n: u16) -> Option<Type>

Get a SIMD vector type with n times more lanes than this one.

+

If this is a scalar type, this produces a SIMD type with this as a lane type and n lanes.

+

If this is already a SIMD vector type, this produces a SIMD vector type with n * self.lane_count() lanes.

+

pub fn half_vector(self) -> Option<Type>

Get a SIMD vector with half the number of lanes.

+

There is no double_vector() method. Use t.by(2) instead.

+

pub fn index(self) -> usize

Index of this type, for use with hash tables etc.

+

pub fn wider_or_equal(self, other: Type) -> bool

True iff:

+
    +
  1. self.lane_count() == other.lane_count() and
  2. +
  3. self.lane_bits() >= other.lane_bits()
  4. +
+

pub fn triple_pointer_type(triple: &Triple) -> Type

Return the pointer type for the given target triple.

+

Trait Implementations

impl Clone for Type

impl Copy for Type

impl Debug for Type

impl Default for Type

impl Display for Type

impl Eq for Type

impl Hash for Type

impl PartialEq<Type> for Type

impl StructuralEq for Type

impl StructuralPartialEq for Type

Auto Trait Implementations

impl RefUnwindSafe for Type

impl Send for Type

impl Sync for Type

impl Unpin for Type

impl UnwindSafe for Type

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/isa/enum.CallConv.html b/api/wasmtime_environ/isa/enum.CallConv.html new file mode 100644 index 000000000000..f6bba6e259f7 --- /dev/null +++ b/api/wasmtime_environ/isa/enum.CallConv.html @@ -0,0 +1,50 @@ +wasmtime_environ::isa::CallConv - Rust

[]Enum wasmtime_environ::isa::CallConv

pub enum CallConv {
+    Fast,
+    Cold,
+    SystemV,
+    WindowsFastcall,
+    BaldrdashSystemV,
+    BaldrdashWindows,
+    Probestack,
+}

Calling convention identifiers.

+

+ Variants

+
Fast

Best performance, not ABI-stable

+
Cold

Smallest caller code size, not ABI-stable

+
SystemV

System V-style convention used on many platforms

+
WindowsFastcall

Windows "fastcall" convention, also used for x64 and ARM

+
BaldrdashSystemV

SpiderMonkey WebAssembly convention on systems using natively SystemV

+
BaldrdashWindows

SpiderMonkey WebAssembly convention on Windows

+
Probestack

Specialized convention for the probestack function

+

Methods

impl CallConv

pub fn triple_default(triple: &Triple) -> CallConv

Return the default calling convention for the given target triple.

+

pub fn for_libcall(isa: &dyn TargetIsa) -> CallConv

Returns the calling convention used for libcalls for the given ISA.

+

pub fn extends_windows_fastcall(self) -> bool

Is the calling convention extending the Windows Fastcall ABI?

+

pub fn extends_baldrdash(self) -> bool

Is the calling convention extending the Baldrdash ABI?

+

Trait Implementations

impl Clone for CallConv

impl Copy for CallConv

impl Debug for CallConv

impl Display for CallConv

impl Eq for CallConv

impl FromStr for CallConv

type Err = ()

The associated error which can be returned from parsing.

+

impl Hash for CallConv

impl PartialEq<CallConv> for CallConv

impl StructuralEq for CallConv

impl StructuralPartialEq for CallConv

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/isa/index.html b/api/wasmtime_environ/isa/index.html new file mode 100644 index 000000000000..f47e2a3eb790 --- /dev/null +++ b/api/wasmtime_environ/isa/index.html @@ -0,0 +1,11 @@ +wasmtime_environ::isa - Rust

[][src]Module wasmtime_environ::isa

Structs

+
TargetFrontendConfig

This struct provides information that a frontend may need to know about a target to +produce Cranelift IR for the target.

+

Enums

+
CallConv

Calling convention identifiers.

+

Traits

+
TargetIsa

Methods that are specialized to a target ISA. Implies a Display trait that shows the +shared flags, as well as any isa-specific flags.

+

Type Definitions

+
RegUnit

Register units are the smallest units of register allocation.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/isa/sidebar-items.js b/api/wasmtime_environ/isa/sidebar-items.js new file mode 100644 index 000000000000..41d5085fb27e --- /dev/null +++ b/api/wasmtime_environ/isa/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["CallConv","Calling convention identifiers."]],"struct":[["TargetFrontendConfig","This struct provides information that a frontend may need to know about a target to produce Cranelift IR for the target."]],"trait":[["TargetIsa","Methods that are specialized to a target ISA. Implies a Display trait that shows the shared flags, as well as any isa-specific flags."]],"type":[["RegUnit","Register units are the smallest units of register allocation."]]}); \ No newline at end of file diff --git a/api/wasmtime_environ/isa/struct.TargetFrontendConfig.html b/api/wasmtime_environ/isa/struct.TargetFrontendConfig.html new file mode 100644 index 000000000000..412bf998abb1 --- /dev/null +++ b/api/wasmtime_environ/isa/struct.TargetFrontendConfig.html @@ -0,0 +1,28 @@ +wasmtime_environ::isa::TargetFrontendConfig - Rust

[]Struct wasmtime_environ::isa::TargetFrontendConfig

pub struct TargetFrontendConfig {
+    pub default_call_conv: CallConv,
+    pub pointer_width: PointerWidth,
+}

This struct provides information that a frontend may need to know about a target to +produce Cranelift IR for the target.

+

+ Fields

default_call_conv: CallConv

The default calling convention of the target.

+
pointer_width: PointerWidth

The pointer width of the target.

+

Methods

impl TargetFrontendConfig

pub fn pointer_type(self) -> Type

Get the pointer type of this target.

+

pub fn pointer_bits(self) -> u8

Get the width of pointers on this target, in units of bits.

+

pub fn pointer_bytes(self) -> u8

Get the width of pointers on this target, in units of bytes.

+

Trait Implementations

impl Clone for TargetFrontendConfig

impl Copy for TargetFrontendConfig

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/isa/trait.TargetIsa.html b/api/wasmtime_environ/isa/trait.TargetIsa.html new file mode 100644 index 000000000000..cd8d40bf1f84 --- /dev/null +++ b/api/wasmtime_environ/isa/trait.TargetIsa.html @@ -0,0 +1,94 @@ +wasmtime_environ::isa::TargetIsa - Rust

[]Trait wasmtime_environ::isa::TargetIsa

pub trait TargetIsa: Send + Sync + Display {
+    fn name(&self) -> &'static str;
+
fn triple(&self) -> &Triple; +
fn flags(&self) -> &Flags; +
fn register_info(&self) -> RegInfo; +
fn legal_encodings(
        &'a self,
        func: &'a Function,
        inst: &'a InstructionData,
        ctrl_typevar: Type
    ) -> Encodings<'a>; +
fn encoding_info(&self) -> EncInfo; +
fn legalize_signature(&self, sig: &mut Cow<Signature>, current: bool); +
fn regclass_for_abi_type(&self, ty: Type) -> &'static RegClassData; +
fn allocatable_registers(&self, func: &Function) -> RegisterSet; +
fn emit_function_to_memory(
        &self,
        func: &Function,
        sink: &mut MemoryCodeSink
    ); +
fn unsigned_add_overflow_condition(&self) -> IntCC; +
fn unsigned_sub_overflow_condition(&self) -> IntCC; + + fn default_call_conv(&self) -> CallConv { ... } +
fn pointer_type(&self) -> Type { ... } +
fn pointer_width(&self) -> PointerWidth { ... } +
fn pointer_bits(&self) -> u8 { ... } +
fn pointer_bytes(&self) -> u8 { ... } +
fn frontend_config(&self) -> TargetFrontendConfig { ... } +
fn uses_cpu_flags(&self) -> bool { ... } +
fn uses_complex_addresses(&self) -> bool { ... } +
fn encode(
        &self,
        func: &Function,
        inst: &InstructionData,
        ctrl_typevar: Type
    ) -> Result<Encoding, fn(Inst, &mut Function, &mut ControlFlowGraph, &dyn TargetIsa) -> bool> { ... } +
fn prologue_epilogue(&self, func: &mut Function) -> Result<(), CodegenError> { ... } +
fn emit_unwind_info(
        &self,
        _func: &Function,
        _kind: FrameUnwindKind,
        _sink: &mut dyn FrameUnwindSink
    ) { ... } +}

Methods that are specialized to a target ISA. Implies a Display trait that shows the +shared flags, as well as any isa-specific flags.

+
+

Required methods

fn name(&self) -> &'static str

Get the name of this ISA.

+

fn triple(&self) -> &Triple

Get the target triple that was used to make this trait object.

+

fn flags(&self) -> &Flags

Get the ISA-independent flags that were used to make this trait object.

+

fn register_info(&self) -> RegInfo

Get a data structure describing the registers in this ISA.

+

fn legal_encodings(
    &'a self,
    func: &'a Function,
    inst: &'a InstructionData,
    ctrl_typevar: Type
) -> Encodings<'a>

Returns an iterator over legal encodings for the instruction.

+

fn encoding_info(&self) -> EncInfo

Get a data structure describing the instruction encodings in this ISA.

+

fn legalize_signature(&self, sig: &mut Cow<Signature>, current: bool)

Legalize a function signature.

+

This is used to legalize both the signature of the function being compiled and any called +functions. The signature should be modified by adding ArgumentLoc annotations to all +arguments and return values.

+

Arguments with types that are not supported by the ABI can be expanded into multiple +arguments:

+
    +
  • Integer types that are too large to fit in a register can be broken into multiple +arguments of a smaller integer type.
  • +
  • Floating point types can be bit-cast to an integer type of the same size, and possible +broken into smaller integer types.
  • +
  • Vector types can be bit-cast and broken down into smaller vectors or scalars.
  • +
+

The legalizer will adapt argument and return values as necessary at all ABI boundaries.

+

When this function is called to legalize the signature of the function currently being +compiled, current is true. The legalized signature can then also contain special purpose +arguments and return values such as:

+
    +
  • A link argument representing the link registers on RISC architectures that don't push +the return address on the stack.
  • +
  • A link return value which will receive the value that was passed to the link +argument.
  • +
  • An sret argument can be added if one wasn't present already. This is necessary if the +signature returns more values than registers are available for returning values.
  • +
  • An sret return value can be added if the ABI requires a function to return its sret +argument in a register.
  • +
+

Arguments and return values for the caller's frame pointer and other callee-saved registers +should not be added by this function. These arguments are not added until after register +allocation.

+

fn regclass_for_abi_type(&self, ty: Type) -> &'static RegClassData

Get the register class that should be used to represent an ABI argument or return value of +type ty. This should be the top-level register class that contains the argument +registers.

+

This function can assume that it will only be asked to provide register classes for types +that legalize_signature() produces in ArgumentLoc::Reg entries.

+

fn allocatable_registers(&self, func: &Function) -> RegisterSet

Get the set of allocatable registers that can be used when compiling func.

+

This set excludes reserved registers like the stack pointer and other special-purpose +registers.

+

fn emit_function_to_memory(&self, func: &Function, sink: &mut MemoryCodeSink)

Emit a whole function into memory.

+

fn unsigned_add_overflow_condition(&self) -> IntCC

IntCC condition for Unsigned Addition Overflow (Carry).

+

fn unsigned_sub_overflow_condition(&self) -> IntCC

IntCC condition for Unsigned Subtraction Overflow (Borrow/Carry).

+
Loading content... +

Provided methods

fn default_call_conv(&self) -> CallConv

Get the default calling convention of this target.

+

fn pointer_type(&self) -> Type

Get the pointer type of this ISA.

+

fn pointer_width(&self) -> PointerWidth

Get the width of pointers on this ISA.

+

fn pointer_bits(&self) -> u8

Get the width of pointers on this ISA, in units of bits.

+

fn pointer_bytes(&self) -> u8

Get the width of pointers on this ISA, in units of bytes.

+

fn frontend_config(&self) -> TargetFrontendConfig

Get the information needed by frontends producing Cranelift IR.

+

fn uses_cpu_flags(&self) -> bool

Does the CPU implement scalar comparisons using a CPU flags register?

+

fn uses_complex_addresses(&self) -> bool

Does the CPU implement multi-register addressing?

+

fn encode(
    &self,
    func: &Function,
    inst: &InstructionData,
    ctrl_typevar: Type
) -> Result<Encoding, fn(Inst, &mut Function, &mut ControlFlowGraph, &dyn TargetIsa) -> bool>

Encode an instruction after determining it is legal.

+

If inst can legally be encoded in this ISA, produce the corresponding Encoding object. +Otherwise, return Legalize action.

+

This is also the main entry point for determining if an instruction is legal.

+

fn prologue_epilogue(&self, func: &mut Function) -> Result<(), CodegenError>

Compute the stack layout and insert prologue and epilogue code into func.

+

Return an error if the stack frame is too large.

+

fn emit_unwind_info(
    &self,
    _func: &Function,
    _kind: FrameUnwindKind,
    _sink: &mut dyn FrameUnwindSink
)

Emit unwind information for the given function.

+

Only some calling conventions (e.g. Windows fastcall) will have unwind information.

+
Loading content... +

Implementors

Loading content...
\ No newline at end of file diff --git a/api/wasmtime_environ/isa/type.RegUnit.html b/api/wasmtime_environ/isa/type.RegUnit.html new file mode 100644 index 000000000000..c6e353316cfe --- /dev/null +++ b/api/wasmtime_environ/isa/type.RegUnit.html @@ -0,0 +1,6 @@ +wasmtime_environ::isa::RegUnit - Rust

[]Type Definition wasmtime_environ::isa::RegUnit

type RegUnit = u16;

Register units are the smallest units of register allocation.

+

Normally there is a 1-1 correspondence between registers and register units, but when an ISA +has aliasing registers, the aliasing can be modeled with registers that cover multiple +register units.

+

The register allocator will enforce that each register unit only gets used for one thing.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/module/enum.Export.html b/api/wasmtime_environ/module/enum.Export.html new file mode 100644 index 000000000000..aa6031880174 --- /dev/null +++ b/api/wasmtime_environ/module/enum.Export.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/enum.Export.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module/enum.MemoryStyle.html b/api/wasmtime_environ/module/enum.MemoryStyle.html new file mode 100644 index 000000000000..0dcbd7ff12a7 --- /dev/null +++ b/api/wasmtime_environ/module/enum.MemoryStyle.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/enum.MemoryStyle.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module/enum.TableStyle.html b/api/wasmtime_environ/module/enum.TableStyle.html new file mode 100644 index 000000000000..af785eb16e5e --- /dev/null +++ b/api/wasmtime_environ/module/enum.TableStyle.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/enum.TableStyle.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module/struct.MemoryPlan.html b/api/wasmtime_environ/module/struct.MemoryPlan.html new file mode 100644 index 000000000000..13ac466da897 --- /dev/null +++ b/api/wasmtime_environ/module/struct.MemoryPlan.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.MemoryPlan.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module/struct.Module.html b/api/wasmtime_environ/module/struct.Module.html new file mode 100644 index 000000000000..9b213189643b --- /dev/null +++ b/api/wasmtime_environ/module/struct.Module.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.Module.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module/struct.TableElements.html b/api/wasmtime_environ/module/struct.TableElements.html new file mode 100644 index 000000000000..5fa968c071f6 --- /dev/null +++ b/api/wasmtime_environ/module/struct.TableElements.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.TableElements.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module/struct.TablePlan.html b/api/wasmtime_environ/module/struct.TablePlan.html new file mode 100644 index 000000000000..1532731199d6 --- /dev/null +++ b/api/wasmtime_environ/module/struct.TablePlan.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.TablePlan.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module_environ/fn.translate_signature.html b/api/wasmtime_environ/module_environ/fn.translate_signature.html new file mode 100644 index 000000000000..040f415e7e4c --- /dev/null +++ b/api/wasmtime_environ/module_environ/fn.translate_signature.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/fn.translate_signature.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module_environ/struct.DataInitializer.html b/api/wasmtime_environ/module_environ/struct.DataInitializer.html new file mode 100644 index 000000000000..fc21eddafe5e --- /dev/null +++ b/api/wasmtime_environ/module_environ/struct.DataInitializer.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.DataInitializer.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module_environ/struct.DataInitializerLocation.html b/api/wasmtime_environ/module_environ/struct.DataInitializerLocation.html new file mode 100644 index 000000000000..580d73cb3adb --- /dev/null +++ b/api/wasmtime_environ/module_environ/struct.DataInitializerLocation.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.DataInitializerLocation.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module_environ/struct.FunctionBodyData.html b/api/wasmtime_environ/module_environ/struct.FunctionBodyData.html new file mode 100644 index 000000000000..3477ae9bb549 --- /dev/null +++ b/api/wasmtime_environ/module_environ/struct.FunctionBodyData.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.FunctionBodyData.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module_environ/struct.ModuleEnvironment.html b/api/wasmtime_environ/module_environ/struct.ModuleEnvironment.html new file mode 100644 index 000000000000..acde676352a3 --- /dev/null +++ b/api/wasmtime_environ/module_environ/struct.ModuleEnvironment.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.ModuleEnvironment.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/module_environ/struct.ModuleTranslation.html b/api/wasmtime_environ/module_environ/struct.ModuleTranslation.html new file mode 100644 index 000000000000..b04eb1d963db --- /dev/null +++ b/api/wasmtime_environ/module_environ/struct.ModuleTranslation.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.ModuleTranslation.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/settings/fn.builder.html b/api/wasmtime_environ/settings/fn.builder.html new file mode 100644 index 000000000000..6fa24c86b66c --- /dev/null +++ b/api/wasmtime_environ/settings/fn.builder.html @@ -0,0 +1,2 @@ +wasmtime_environ::settings::builder - Rust

[]Function wasmtime_environ::settings::builder

pub fn builder() -> Builder

Create a settings::Builder for the shared settings group.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/settings/index.html b/api/wasmtime_environ/settings/index.html new file mode 100644 index 000000000000..74600cf49438 --- /dev/null +++ b/api/wasmtime_environ/settings/index.html @@ -0,0 +1,8 @@ +wasmtime_environ::settings - Rust

[][src]Module wasmtime_environ::settings

Structs

+
Builder

Collect settings values based on a template.

+
Flags

Flags group shared.

+

Traits

+
Configurable

A string-based configurator for settings groups.

+

Functions

+
builder

Create a settings::Builder for the shared settings group.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/settings/sidebar-items.js b/api/wasmtime_environ/settings/sidebar-items.js new file mode 100644 index 000000000000..59d5bc537c0c --- /dev/null +++ b/api/wasmtime_environ/settings/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["builder","Create a `settings::Builder` for the shared settings group."]],"struct":[["Builder","Collect settings values based on a template."],["Flags","Flags group `shared`."]],"trait":[["Configurable","A string-based configurator for settings groups."]]}); \ No newline at end of file diff --git a/api/wasmtime_environ/settings/struct.Builder.html b/api/wasmtime_environ/settings/struct.Builder.html new file mode 100644 index 000000000000..9d03f74ae413 --- /dev/null +++ b/api/wasmtime_environ/settings/struct.Builder.html @@ -0,0 +1,22 @@ +wasmtime_environ::settings::Builder - Rust

[]Struct wasmtime_environ::settings::Builder

pub struct Builder { /* fields omitted */ }

Collect settings values based on a template.

+

Methods

impl Builder

pub fn new(tmpl: &'static Template) -> Builder

Create a new builder with defaults and names from the given template.

+

pub fn state_for(self, name: &str) -> Box<[u8]>

Extract contents of builder once everything is configured.

+

Trait Implementations

impl Clone for Builder

impl Configurable for Builder

Auto Trait Implementations

impl RefUnwindSafe for Builder

impl Send for Builder

impl Sync for Builder

impl Unpin for Builder

impl UnwindSafe for Builder

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/settings/struct.Flags.html b/api/wasmtime_environ/settings/struct.Flags.html new file mode 100644 index 000000000000..284a50c33359 --- /dev/null +++ b/api/wasmtime_environ/settings/struct.Flags.html @@ -0,0 +1,91 @@ +wasmtime_environ::settings::Flags - Rust

[]Struct wasmtime_environ::settings::Flags

pub struct Flags { /* fields omitted */ }

Flags group shared.

+

Methods

impl Flags

pub fn new(builder: Builder) -> Flags

Create flags shared settings group.

+

impl Flags

User-defined settings.

+

pub fn predicate_view(&self) -> PredicateView

Get a view of the boolean predicates.

+

pub fn opt_level(&self) -> OptLevel

Optimization level:

+
    +
  • none: Minimise compile time by disabling most optimizations.
  • +
  • speed: Generate the fastest possible code
  • +
  • speed_and_size: like "speed", but also perform transformations +aimed at reducing code size.
  • +
+

pub fn libcall_call_conv(&self) -> LibcallCallConv

Defines the calling convention to use for LibCalls call expansion, +since it may be different from the ISA default calling convention.

+

The default value is to use the same calling convention as the ISA +default calling convention.

+

This list should be kept in sync with the list of calling +conventions available in isa/call_conv.rs.

+

pub fn baldrdash_prologue_words(&self) -> u8

Number of pointer-sized words pushed by the baldrdash prologue.

+

Functions with the baldrdash calling convention don't generate their +own prologue and epilogue. They depend on externally generated code +that pushes a fixed number of words in the prologue and restores them +in the epilogue.

+

This setting configures the number of pointer-sized words pushed on the +stack when the Cranelift-generated code is entered. This includes the +pushed return address on x86.

+

pub fn probestack_size_log2(&self) -> u8

The log2 of the size of the stack guard region.

+

Stack frames larger than this size will have stack overflow checked +by calling the probestack function.

+

The default is 12, which translates to a size of 4096.

+

pub fn enable_verifier(&self) -> bool

Run the Cranelift IR verifier at strategic times during compilation.

+

This makes compilation slower but catches many bugs. The verifier is always enabled by +default, which is useful during development.

+

pub fn is_pic(&self) -> bool

Enable Position-Independent Code generation

+

pub fn use_colocated_libcalls(&self) -> bool

Use colocated libcalls.

+

Generate code that assumes that libcalls can be declared "colocated", +meaning they will be defined along with the current function, such that +they can use more efficient addressing.

+

pub fn avoid_div_traps(&self) -> bool

Generate explicit checks around native division instructions to avoid +their trapping.

+

This is primarily used by SpiderMonkey which doesn't install a signal +handler for SIGFPE, but expects a SIGILL trap for division by zero.

+

On ISAs like ARM where the native division instructions don't trap, +this setting has no effect - explicit checks are always inserted.

+

pub fn enable_float(&self) -> bool

Enable the use of floating-point instructions

+

Disabling use of floating-point instructions is not yet implemented.

+

pub fn enable_nan_canonicalization(&self) -> bool

Enable NaN canonicalization

+

This replaces NaNs with a single canonical value, for users requiring +entirely deterministic WebAssembly computation. This is not required +by the WebAssembly spec, so it is not enabled by default.

+

pub fn enable_pinned_reg(&self) -> bool

Enable the use of the pinned register.

+

This register is excluded from register allocation, and is completely under the control of +the end-user. It is possible to read it via the get_pinned_reg instruction, and to set it +with the set_pinned_reg instruction.

+

pub fn use_pinned_reg_as_heap_base(&self) -> bool

Use the pinned register as the heap base.

+

Enabling this requires the enable_pinned_reg setting to be set to true. It enables a custom +legalization of the heap_addr instruction so it will use the pinned register as the heap +base, instead of fetching it from a global value.

+

Warning! Enabling this means that the pinned register must be maintained to contain the +heap base address at all times, during the lifetime of a function. Using the pinned +register for other purposes when this is set is very likely to cause crashes.

+

pub fn enable_simd(&self) -> bool

Enable the use of SIMD instructions.

+

pub fn enable_atomics(&self) -> bool

Enable the use of atomic instructions

+

pub fn enable_safepoints(&self) -> bool

Enable safepoint instruction insertions.

+

This will allow the emit_stackmaps() function to insert the safepoint +instruction on top of calls and interrupt traps in order to display the +live reference values at that point in the program.

+

pub fn emit_all_ones_funcaddrs(&self) -> bool

Emit not-yet-relocated function addresses as all-ones bit patterns.

+

pub fn enable_probestack(&self) -> bool

Enable the use of stack probes, for calling conventions which support this +functionality.

+

pub fn probestack_func_adjusts_sp(&self) -> bool

Set this to true of the stack probe function modifies the stack pointer +itself.

+

pub fn enable_jump_tables(&self) -> bool

Enable the use of jump tables in generated machine code.

+

Trait Implementations

impl Clone for Flags

impl Display for Flags

Auto Trait Implementations

impl RefUnwindSafe for Flags

impl Send for Flags

impl Sync for Flags

impl Unpin for Flags

impl UnwindSafe for Flags

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/settings/trait.Configurable.html b/api/wasmtime_environ/settings/trait.Configurable.html new file mode 100644 index 000000000000..b3993f7e8562 --- /dev/null +++ b/api/wasmtime_environ/settings/trait.Configurable.html @@ -0,0 +1,14 @@ +wasmtime_environ::settings::Configurable - Rust

[]Trait wasmtime_environ::settings::Configurable

pub trait Configurable {
+    fn set(&mut self, name: &str, value: &str) -> Result<(), SetError>;
+
fn enable(&mut self, name: &str) -> Result<(), SetError>; +}

A string-based configurator for settings groups.

+

The Configurable protocol allows settings to be modified by name before a finished Flags +struct is created.

+
+

Required methods

fn set(&mut self, name: &str, value: &str) -> Result<(), SetError>

Set the string value of any setting by name.

+

This can set any type of setting whether it is numeric, boolean, or enumerated.

+

fn enable(&mut self, name: &str) -> Result<(), SetError>

Enable a boolean setting or apply a preset.

+

If the identified setting isn't a boolean or a preset, a BadType error is returned.

+
Loading content... +

Implementations on Foreign Types

impl Configurable for Builder

Loading content... +

Implementors

impl Configurable for wasmtime_environ::settings::Builder

Loading content...
\ No newline at end of file diff --git a/api/wasmtime_environ/sidebar-items.js b/api/wasmtime_environ/sidebar-items.js new file mode 100644 index 000000000000..bc667e0f8d57 --- /dev/null +++ b/api/wasmtime_environ/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["VERSION","Version number of this crate."],["WASM_MAX_PAGES","The number of pages we can have before we run out of byte index space."],["WASM_PAGE_SIZE","WebAssembly page sizes are defined to be 64KiB."]],"enum":[["CompileError","An error while compiling WebAssembly to machine code."],["CompiledFunctionUnwindInfo","Compiled function unwind information."],["Export","An entity to export."],["MemoryStyle","Implemenation styles for WebAssembly linear memory."],["ModuleMemoryOffset","Memory definition offset in the VMContext structure."],["RelocationTarget","Destination function. Can be either user function or some special one, like `memory.grow`."],["TableStyle","Implemenation styles for WebAssembly tables."]],"fn":[["cache_create_new_config","Creates a new configuration file at specified path, or default path if None is passed. Fails if file already exists."],["translate_signature","Add environment-specific function parameters."]],"mod":[["cranelift","Support for compiling with Cranelift."],["entity",""],["ir",""],["isa",""],["settings",""],["wasm",""]],"struct":[["BuiltinFunctionIndex","An index type for builtin functions."],["CacheConfig","Global configuration for how the cache is managed"],["Compilation","The result of compiling a WebAssembly module's functions."],["CompiledFunction","Compiled function: machine code body, jump table offsets, and unwind information."],["CompiledFunctionUnwindInfoReloc","Relocation entry for unwind info."],["DataInitializer","A data initializer for linear memory."],["DataInitializerLocation","A memory index and offset within that memory where a data initialization should is to be performed."],["FunctionAddressMap","Function and its instructions addresses mappings."],["FunctionBodyData","Contains function data: byte code and its offset in the module."],["InstructionAddressMap","Single source location to generated address mapping."],["MemoryPlan","A WebAssembly linear memory description along with our chosen style for implementing it."],["Module","A translated WebAssembly module, excluding the function bodies and memory initializers."],["ModuleEnvironment","Object containing the standalone environment information."],["ModuleTranslation","The result of translating via `ModuleEnvironment`. Function bodies are not yet translated, and data initializers have not yet been copied out of the original buffer."],["ModuleVmctxInfo","Module `vmctx` related info."],["Relocation","A record of a relocation to perform."],["TableElements","A WebAssembly table initializer."],["TablePlan","A WebAssembly table description along with our chosen style for implementing it."],["TargetSharedSignatureIndex","Target specific type for shared signature index."],["TrapInformation","Information about trap."],["Tunables","Tunable parameters for WebAssembly compilation."],["VMOffsets","This class computes offsets to fields within `VMContext` and other related structs that JIT code accesses directly."]],"trait":[["Compiler","An implementation of a compiler from parsed WebAssembly module to native code."]],"type":[["ModuleAddressMap","Module functions addresses mappings."],["Relocations","Relocations to apply to function bodies."],["Traps","Information about traps associated with the functions where the traps are placed."],["ValueLabelsRanges","Value ranges for functions."]]}); \ No newline at end of file diff --git a/api/wasmtime_environ/struct.BuiltinFunctionIndex.html b/api/wasmtime_environ/struct.BuiltinFunctionIndex.html new file mode 100644 index 000000000000..ced82730b7a9 --- /dev/null +++ b/api/wasmtime_environ/struct.BuiltinFunctionIndex.html @@ -0,0 +1,18 @@ +wasmtime_environ::BuiltinFunctionIndex - Rust

[][src]Struct wasmtime_environ::BuiltinFunctionIndex

pub struct BuiltinFunctionIndex(_);

An index type for builtin functions.

+

Methods

impl BuiltinFunctionIndex[src]

pub const fn get_memory32_grow_index() -> Self[src]

Returns an index for wasm's memory.grow builtin function.

+

pub const fn get_imported_memory32_grow_index() -> Self[src]

Returns an index for wasm's imported memory.grow builtin function.

+

pub const fn get_memory32_size_index() -> Self[src]

Returns an index for wasm's memory.size builtin function.

+

pub const fn get_imported_memory32_size_index() -> Self[src]

Returns an index for wasm's imported memory.size builtin function.

+

pub const fn builtin_functions_total_number() -> u32[src]

Returns the total number of builtin functions.

+

pub const fn index(&self) -> u32[src]

Return the index as an u32 number.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.CacheConfig.html b/api/wasmtime_environ/struct.CacheConfig.html new file mode 100644 index 000000000000..931293a1102c --- /dev/null +++ b/api/wasmtime_environ/struct.CacheConfig.html @@ -0,0 +1,47 @@ +wasmtime_environ::CacheConfig - Rust

[][src]Struct wasmtime_environ::CacheConfig

pub struct CacheConfig { /* fields omitted */ }

Global configuration for how the cache is managed

+

Methods

impl CacheConfig[src]

pub fn worker_event_queue_size(&self) -> u64[src]

Returns $setting.

+

Panics if the cache is disabled.

+

pub fn baseline_compression_level(&self) -> i32[src]

Returns $setting.

+

Panics if the cache is disabled.

+

pub fn optimized_compression_level(&self) -> i32[src]

Returns $setting.

+

Panics if the cache is disabled.

+

pub fn optimized_compression_usage_counter_threshold(&self) -> u64[src]

Returns $setting.

+

Panics if the cache is disabled.

+

pub fn cleanup_interval(&self) -> Duration[src]

Returns $setting.

+

Panics if the cache is disabled.

+

pub fn optimizing_compression_task_timeout(&self) -> Duration[src]

Returns $setting.

+

Panics if the cache is disabled.

+

pub fn allowed_clock_drift_for_files_from_future(&self) -> Duration[src]

Returns $setting.

+

Panics if the cache is disabled.

+

pub fn file_count_soft_limit(&self) -> u64[src]

Returns $setting.

+

Panics if the cache is disabled.

+

pub fn files_total_size_soft_limit(&self) -> u64[src]

Returns $setting.

+

Panics if the cache is disabled.

+

pub fn file_count_limit_percent_if_deleting(&self) -> u8[src]

Returns $setting.

+

Panics if the cache is disabled.

+

pub fn files_total_size_limit_percent_if_deleting(&self) -> u8[src]

Returns $setting.

+

Panics if the cache is disabled.

+

pub fn enabled(&self) -> bool[src]

Returns true if and only if the cache is enabled.

+

pub fn directory(&self) -> &PathBuf[src]

Returns path to the cache directory.

+

Panics if the cache is disabled.

+

pub fn new_cache_disabled() -> Self[src]

Creates a new set of configuration which represents a disabled cache

+

pub fn from_file(config_file: Option<&Path>) -> Result<Self>[src]

Parses cache configuration from the file specified

+

Trait Implementations

impl Clone for CacheConfig[src]

impl Debug for CacheConfig[src]

impl<'de> Deserialize<'de> for CacheConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.Compilation.html b/api/wasmtime_environ/struct.Compilation.html new file mode 100644 index 000000000000..6a5e18bb4656 --- /dev/null +++ b/api/wasmtime_environ/struct.Compilation.html @@ -0,0 +1,27 @@ +wasmtime_environ::Compilation - Rust

[][src]Struct wasmtime_environ::Compilation

pub struct Compilation { /* fields omitted */ }

The result of compiling a WebAssembly module's functions.

+

Methods

impl Compilation[src]

pub fn new(functions: PrimaryMap<DefinedFuncIndex, CompiledFunction>) -> Self[src]

Creates a compilation artifact from a contiguous function buffer and a set of ranges

+

pub fn from_buffer(
    buffer: Vec<u8>,
    functions: impl IntoIterator<Item = (Range<usize>, JumpTableOffsets, Range<usize>)>
) -> Self
[src]

Allocates the compilation result with the given function bodies.

+

pub fn get(&self, func: DefinedFuncIndex) -> &CompiledFunction[src]

Gets the bytes of a single function

+

pub fn len(&self) -> usize[src]

Gets the number of functions defined.

+

pub fn is_empty(&self) -> bool[src]

Returns whether there are no functions defined.

+

pub fn get_jt_offsets(&self) -> PrimaryMap<DefinedFuncIndex, JumpTableOffsets>[src]

Gets functions jump table offsets.

+

Trait Implementations

impl Debug for Compilation[src]

impl<'de> Deserialize<'de> for Compilation[src]

impl Eq for Compilation[src]

impl<'a> IntoIterator for &'a Compilation[src]

type IntoIter = Iter<'a>

Which kind of iterator are we turning this into?

+

type Item = <Self::IntoIter as Iterator>::Item

The type of the elements being iterated over.

+

impl PartialEq<Compilation> for Compilation[src]

impl Serialize for Compilation[src]

impl StructuralEq for Compilation[src]

impl StructuralPartialEq for Compilation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.CompiledFunction.html b/api/wasmtime_environ/struct.CompiledFunction.html new file mode 100644 index 000000000000..70c21ceb5670 --- /dev/null +++ b/api/wasmtime_environ/struct.CompiledFunction.html @@ -0,0 +1,32 @@ +wasmtime_environ::CompiledFunction - Rust

[][src]Struct wasmtime_environ::CompiledFunction

pub struct CompiledFunction {
+    pub body: Vec<u8>,
+    pub jt_offsets: JumpTableOffsets,
+    pub unwind_info: CompiledFunctionUnwindInfo,
+}

Compiled function: machine code body, jump table offsets, and unwind information.

+

+ Fields

body: Vec<u8>

The function body.

+
jt_offsets: JumpTableOffsets

The jump tables offsets (in the body).

+
unwind_info: CompiledFunctionUnwindInfo

The unwind information.

+

Trait Implementations

impl Clone for CompiledFunction[src]

impl Debug for CompiledFunction[src]

impl<'de> Deserialize<'de> for CompiledFunction[src]

impl Eq for CompiledFunction[src]

impl PartialEq<CompiledFunction> for CompiledFunction[src]

impl Serialize for CompiledFunction[src]

impl StructuralEq for CompiledFunction[src]

impl StructuralPartialEq for CompiledFunction[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.CompiledFunctionUnwindInfoReloc.html b/api/wasmtime_environ/struct.CompiledFunctionUnwindInfoReloc.html new file mode 100644 index 000000000000..5d7c0a3f17fe --- /dev/null +++ b/api/wasmtime_environ/struct.CompiledFunctionUnwindInfoReloc.html @@ -0,0 +1,30 @@ +wasmtime_environ::CompiledFunctionUnwindInfoReloc - Rust

[][src]Struct wasmtime_environ::CompiledFunctionUnwindInfoReloc

pub struct CompiledFunctionUnwindInfoReloc {
+    pub offset: u32,
+    pub addend: u32,
+}

Relocation entry for unwind info.

+

+ Fields

offset: u32

Entry offest in the code block.

+
addend: u32

Entry addend relative to the code block.

+

Trait Implementations

impl Clone for CompiledFunctionUnwindInfoReloc[src]

impl Debug for CompiledFunctionUnwindInfoReloc[src]

impl<'de> Deserialize<'de> for CompiledFunctionUnwindInfoReloc[src]

impl Eq for CompiledFunctionUnwindInfoReloc[src]

impl PartialEq<CompiledFunctionUnwindInfoReloc> for CompiledFunctionUnwindInfoReloc[src]

impl Serialize for CompiledFunctionUnwindInfoReloc[src]

impl StructuralEq for CompiledFunctionUnwindInfoReloc[src]

impl StructuralPartialEq for CompiledFunctionUnwindInfoReloc[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.DataInitializer.html b/api/wasmtime_environ/struct.DataInitializer.html new file mode 100644 index 000000000000..5c9b47d3afd1 --- /dev/null +++ b/api/wasmtime_environ/struct.DataInitializer.html @@ -0,0 +1,18 @@ +wasmtime_environ::DataInitializer - Rust

[][src]Struct wasmtime_environ::DataInitializer

pub struct DataInitializer<'data> {
+    pub location: DataInitializerLocation,
+    pub data: &'data [u8],
+}

A data initializer for linear memory.

+

+ Fields

location: DataInitializerLocation

The location where the initialization is to be performed.

+
data: &'data [u8]

The initialization data.

+

Auto Trait Implementations

impl<'data> RefUnwindSafe for DataInitializer<'data>

impl<'data> Send for DataInitializer<'data>

impl<'data> Sync for DataInitializer<'data>

impl<'data> Unpin for DataInitializer<'data>

impl<'data> UnwindSafe for DataInitializer<'data>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.DataInitializerLocation.html b/api/wasmtime_environ/struct.DataInitializerLocation.html new file mode 100644 index 000000000000..dc56f78ff9a2 --- /dev/null +++ b/api/wasmtime_environ/struct.DataInitializerLocation.html @@ -0,0 +1,27 @@ +wasmtime_environ::DataInitializerLocation - Rust

[][src]Struct wasmtime_environ::DataInitializerLocation

pub struct DataInitializerLocation {
+    pub memory_index: MemoryIndex,
+    pub base: Option<GlobalIndex>,
+    pub offset: usize,
+}

A memory index and offset within that memory where a data initialization +should is to be performed.

+

+ Fields

memory_index: MemoryIndex

The index of the memory to initialize.

+
base: Option<GlobalIndex>

Optionally a globalvar base to initialize at.

+
offset: usize

A constant offset to initialize at.

+

Trait Implementations

impl Clone for DataInitializerLocation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.FunctionAddressMap.html b/api/wasmtime_environ/struct.FunctionAddressMap.html new file mode 100644 index 000000000000..8d7335b97905 --- /dev/null +++ b/api/wasmtime_environ/struct.FunctionAddressMap.html @@ -0,0 +1,37 @@ +wasmtime_environ::FunctionAddressMap - Rust

[][src]Struct wasmtime_environ::FunctionAddressMap

pub struct FunctionAddressMap {
+    pub instructions: Vec<InstructionAddressMap>,
+    pub start_srcloc: SourceLoc,
+    pub end_srcloc: SourceLoc,
+    pub body_offset: usize,
+    pub body_len: usize,
+}

Function and its instructions addresses mappings.

+

+ Fields

instructions: Vec<InstructionAddressMap>

Instructions maps. +The array is sorted by the InstructionAddressMap::code_offset field.

+
start_srcloc: SourceLoc

Function start source location (normally declaration).

+
end_srcloc: SourceLoc

Function end source location.

+
body_offset: usize

Generated function body offset if applicable, otherwise 0.

+
body_len: usize

Generated function body length.

+

Trait Implementations

impl Clone for FunctionAddressMap[src]

impl Debug for FunctionAddressMap[src]

impl<'de> Deserialize<'de> for FunctionAddressMap[src]

impl Eq for FunctionAddressMap[src]

impl PartialEq<FunctionAddressMap> for FunctionAddressMap[src]

impl Serialize for FunctionAddressMap[src]

impl StructuralEq for FunctionAddressMap[src]

impl StructuralPartialEq for FunctionAddressMap[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.FunctionBodyData.html b/api/wasmtime_environ/struct.FunctionBodyData.html new file mode 100644 index 000000000000..12c5e210a1a6 --- /dev/null +++ b/api/wasmtime_environ/struct.FunctionBodyData.html @@ -0,0 +1,20 @@ +wasmtime_environ::FunctionBodyData - Rust

[][src]Struct wasmtime_environ::FunctionBodyData

pub struct FunctionBodyData<'a> {
+    pub data: &'a [u8],
+    pub module_offset: usize,
+}

Contains function data: byte code and its offset in the module.

+

+ Fields

data: &'a [u8]

Body byte code.

+
module_offset: usize

Body offset in the module file.

+

Trait Implementations

impl<'a> Hash for FunctionBodyData<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for FunctionBodyData<'a>

impl<'a> Send for FunctionBodyData<'a>

impl<'a> Sync for FunctionBodyData<'a>

impl<'a> Unpin for FunctionBodyData<'a>

impl<'a> UnwindSafe for FunctionBodyData<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.InstructionAddressMap.html b/api/wasmtime_environ/struct.InstructionAddressMap.html new file mode 100644 index 000000000000..67b5c51bc90c --- /dev/null +++ b/api/wasmtime_environ/struct.InstructionAddressMap.html @@ -0,0 +1,32 @@ +wasmtime_environ::InstructionAddressMap - Rust

[][src]Struct wasmtime_environ::InstructionAddressMap

pub struct InstructionAddressMap {
+    pub srcloc: SourceLoc,
+    pub code_offset: usize,
+    pub code_len: usize,
+}

Single source location to generated address mapping.

+

+ Fields

srcloc: SourceLoc

Original source location.

+
code_offset: usize

Generated instructions offset.

+
code_len: usize

Generated instructions length.

+

Trait Implementations

impl Clone for InstructionAddressMap[src]

impl Debug for InstructionAddressMap[src]

impl<'de> Deserialize<'de> for InstructionAddressMap[src]

impl Eq for InstructionAddressMap[src]

impl PartialEq<InstructionAddressMap> for InstructionAddressMap[src]

impl Serialize for InstructionAddressMap[src]

impl StructuralEq for InstructionAddressMap[src]

impl StructuralPartialEq for InstructionAddressMap[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.MemoryPlan.html b/api/wasmtime_environ/struct.MemoryPlan.html new file mode 100644 index 000000000000..0eda716a0930 --- /dev/null +++ b/api/wasmtime_environ/struct.MemoryPlan.html @@ -0,0 +1,31 @@ +wasmtime_environ::MemoryPlan - Rust

[][src]Struct wasmtime_environ::MemoryPlan

pub struct MemoryPlan {
+    pub memory: Memory,
+    pub style: MemoryStyle,
+    pub offset_guard_size: u64,
+}

A WebAssembly linear memory description along with our chosen style for +implementing it.

+

+ Fields

memory: Memory

The WebAssembly linear memory description.

+
style: MemoryStyle

Our chosen implementation style.

+
offset_guard_size: u64

Our chosen offset-guard size.

+

Methods

impl MemoryPlan[src]

pub fn for_memory(memory: Memory, tunables: &Tunables) -> Self[src]

Draw up a plan for implementing a Memory.

+

Trait Implementations

impl Clone for MemoryPlan[src]

impl Debug for MemoryPlan[src]

impl Hash for MemoryPlan[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.Module.html b/api/wasmtime_environ/struct.Module.html new file mode 100644 index 000000000000..7582712c0b28 --- /dev/null +++ b/api/wasmtime_environ/struct.Module.html @@ -0,0 +1,63 @@ +wasmtime_environ::Module - Rust

[][src]Struct wasmtime_environ::Module

pub struct Module {
+    pub id: usize,
+    pub signatures: PrimaryMap<SignatureIndex, Signature>,
+    pub imported_funcs: PrimaryMap<FuncIndex, (String, String, u32)>,
+    pub imported_tables: PrimaryMap<TableIndex, (String, String, u32)>,
+    pub imported_memories: PrimaryMap<MemoryIndex, (String, String, u32)>,
+    pub imported_globals: PrimaryMap<GlobalIndex, (String, String, u32)>,
+    pub functions: PrimaryMap<FuncIndex, SignatureIndex>,
+    pub table_plans: PrimaryMap<TableIndex, TablePlan>,
+    pub memory_plans: PrimaryMap<MemoryIndex, MemoryPlan>,
+    pub globals: PrimaryMap<GlobalIndex, Global>,
+    pub exports: IndexMap<String, Export>,
+    pub start_func: Option<FuncIndex>,
+    pub table_elements: Vec<TableElements>,
+    pub func_names: HashMap<FuncIndex, String>,
+}

A translated WebAssembly module, excluding the function bodies and +memory initializers.

+

+ Fields

id: usize

A unique identifier (within this process) for this module.

+
signatures: PrimaryMap<SignatureIndex, Signature>

Unprocessed signatures exactly as provided by declare_signature().

+
imported_funcs: PrimaryMap<FuncIndex, (String, String, u32)>

Names of imported functions, as well as the index of the import that +performed this import.

+
imported_tables: PrimaryMap<TableIndex, (String, String, u32)>

Names of imported tables.

+
imported_memories: PrimaryMap<MemoryIndex, (String, String, u32)>

Names of imported memories.

+
imported_globals: PrimaryMap<GlobalIndex, (String, String, u32)>

Names of imported globals.

+
functions: PrimaryMap<FuncIndex, SignatureIndex>

Types of functions, imported and local.

+
table_plans: PrimaryMap<TableIndex, TablePlan>

WebAssembly tables.

+
memory_plans: PrimaryMap<MemoryIndex, MemoryPlan>

WebAssembly linear memory plans.

+
globals: PrimaryMap<GlobalIndex, Global>

WebAssembly global variables.

+
exports: IndexMap<String, Export>

Exported entities.

+
start_func: Option<FuncIndex>

The module "start" function, if present.

+
table_elements: Vec<TableElements>

WebAssembly table initializers.

+
func_names: HashMap<FuncIndex, String>

WebAssembly table initializers.

+

Methods

impl Module[src]

pub fn new() -> Self[src]

Allocates the module data structures.

+

pub fn func_index(&self, defined_func: DefinedFuncIndex) -> FuncIndex[src]

Convert a DefinedFuncIndex into a FuncIndex.

+

pub fn defined_func_index(&self, func: FuncIndex) -> Option<DefinedFuncIndex>[src]

Convert a FuncIndex into a DefinedFuncIndex. Returns None if the +index is an imported function.

+

pub fn is_imported_function(&self, index: FuncIndex) -> bool[src]

Test whether the given function index is for an imported function.

+

pub fn table_index(&self, defined_table: DefinedTableIndex) -> TableIndex[src]

Convert a DefinedTableIndex into a TableIndex.

+

pub fn defined_table_index(
    &self,
    table: TableIndex
) -> Option<DefinedTableIndex>
[src]

Convert a TableIndex into a DefinedTableIndex. Returns None if the +index is an imported table.

+

pub fn is_imported_table(&self, index: TableIndex) -> bool[src]

Test whether the given table index is for an imported table.

+

pub fn memory_index(&self, defined_memory: DefinedMemoryIndex) -> MemoryIndex[src]

Convert a DefinedMemoryIndex into a MemoryIndex.

+

pub fn defined_memory_index(
    &self,
    memory: MemoryIndex
) -> Option<DefinedMemoryIndex>
[src]

Convert a MemoryIndex into a DefinedMemoryIndex. Returns None if the +index is an imported memory.

+

pub fn is_imported_memory(&self, index: MemoryIndex) -> bool[src]

Test whether the given memory index is for an imported memory.

+

pub fn global_index(&self, defined_global: DefinedGlobalIndex) -> GlobalIndex[src]

Convert a DefinedGlobalIndex into a GlobalIndex.

+

pub fn defined_global_index(
    &self,
    global: GlobalIndex
) -> Option<DefinedGlobalIndex>
[src]

Convert a GlobalIndex into a DefinedGlobalIndex. Returns None if the +index is an imported global.

+

pub fn is_imported_global(&self, index: GlobalIndex) -> bool[src]

Test whether the given global index is for an imported global.

+

pub fn hash_for_cache<'data, H>(
    &self,
    function_body_inputs: &PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
    state: &mut H
) where
    H: Hasher
[src]

Computes hash of the module for the purpose of caching.

+

Trait Implementations

impl Debug for Module[src]

Auto Trait Implementations

impl RefUnwindSafe for Module

impl Send for Module

impl Sync for Module

impl Unpin for Module

impl UnwindSafe for Module

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.ModuleEnvironment.html b/api/wasmtime_environ/struct.ModuleEnvironment.html new file mode 100644 index 000000000000..2abe54e07de2 --- /dev/null +++ b/api/wasmtime_environ/struct.ModuleEnvironment.html @@ -0,0 +1,51 @@ +wasmtime_environ::ModuleEnvironment - Rust

[][src]Struct wasmtime_environ::ModuleEnvironment

pub struct ModuleEnvironment<'data> { /* fields omitted */ }

Object containing the standalone environment information.

+

Methods

impl<'data> ModuleEnvironment<'data>[src]

pub fn new(target_config: TargetFrontendConfig, tunables: Tunables) -> Self[src]

Allocates the environment data structures.

+

pub fn translate(
    self,
    data: &'data [u8]
) -> WasmResult<ModuleTranslation<'data>>
[src]

Translate a wasm module using this environment. This consumes the +ModuleEnvironment and produces a ModuleTranslation.

+

Trait Implementations

impl<'data> ModuleEnvironment<'data> for ModuleEnvironment<'data>[src]

This trait is useful for translate_module because it tells how to translate +environment-dependent wasm instructions. These functions should not be called by the user.

+

impl<'data> TargetEnvironment for ModuleEnvironment<'data>[src]

Auto Trait Implementations

impl<'data> RefUnwindSafe for ModuleEnvironment<'data>

impl<'data> Send for ModuleEnvironment<'data>

impl<'data> Sync for ModuleEnvironment<'data>

impl<'data> Unpin for ModuleEnvironment<'data>

impl<'data> UnwindSafe for ModuleEnvironment<'data>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.ModuleTranslation.html b/api/wasmtime_environ/struct.ModuleTranslation.html new file mode 100644 index 000000000000..7d3d421b57ba --- /dev/null +++ b/api/wasmtime_environ/struct.ModuleTranslation.html @@ -0,0 +1,29 @@ +wasmtime_environ::ModuleTranslation - Rust

[][src]Struct wasmtime_environ::ModuleTranslation

pub struct ModuleTranslation<'data> {
+    pub target_config: TargetFrontendConfig,
+    pub module: Module,
+    pub function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
+    pub data_initializers: Vec<DataInitializer<'data>>,
+    pub tunables: Tunables,
+    pub module_translation: Option<ModuleTranslationState>,
+}

The result of translating via ModuleEnvironment. Function bodies are not +yet translated, and data initializers have not yet been copied out of the +original buffer.

+

+ Fields

target_config: TargetFrontendConfig

Compilation setting flags.

+
module: Module

Module information.

+
function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>

References to the function bodies.

+
data_initializers: Vec<DataInitializer<'data>>

References to the data initializers.

+
tunables: Tunables

Tunable parameters.

+
module_translation: Option<ModuleTranslationState>

The decoded Wasm types for the module.

+

Methods

impl<'data> ModuleTranslation<'data>[src]

pub fn func_env(&self) -> FuncEnvironment[src]

Return a new FuncEnvironment for translating a function.

+

Auto Trait Implementations

impl<'data> RefUnwindSafe for ModuleTranslation<'data>

impl<'data> Send for ModuleTranslation<'data>

impl<'data> Sync for ModuleTranslation<'data>

impl<'data> Unpin for ModuleTranslation<'data>

impl<'data> UnwindSafe for ModuleTranslation<'data>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.ModuleVmctxInfo.html b/api/wasmtime_environ/struct.ModuleVmctxInfo.html new file mode 100644 index 000000000000..e1a843f49608 --- /dev/null +++ b/api/wasmtime_environ/struct.ModuleVmctxInfo.html @@ -0,0 +1,25 @@ +wasmtime_environ::ModuleVmctxInfo - Rust

[][src]Struct wasmtime_environ::ModuleVmctxInfo

pub struct ModuleVmctxInfo {
+    pub memory_offset: ModuleMemoryOffset,
+    pub stack_slots: PrimaryMap<DefinedFuncIndex, StackSlots>,
+}

Module vmctx related info.

+

+ Fields

memory_offset: ModuleMemoryOffset

The memory definition offset in the VMContext structure.

+
stack_slots: PrimaryMap<DefinedFuncIndex, StackSlots>

The functions stack slots.

+

Trait Implementations

impl Clone for ModuleVmctxInfo[src]

impl Debug for ModuleVmctxInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.Relocation.html b/api/wasmtime_environ/struct.Relocation.html new file mode 100644 index 000000000000..206639993ab2 --- /dev/null +++ b/api/wasmtime_environ/struct.Relocation.html @@ -0,0 +1,34 @@ +wasmtime_environ::Relocation - Rust

[][src]Struct wasmtime_environ::Relocation

pub struct Relocation {
+    pub reloc: Reloc,
+    pub reloc_target: RelocationTarget,
+    pub offset: CodeOffset,
+    pub addend: Addend,
+}

A record of a relocation to perform.

+

+ Fields

reloc: Reloc

The relocation code.

+
reloc_target: RelocationTarget

Relocation target.

+
offset: CodeOffset

The offset where to apply the relocation.

+
addend: Addend

The addend to add to the relocation value.

+

Trait Implementations

impl Clone for Relocation[src]

impl Debug for Relocation[src]

impl<'de> Deserialize<'de> for Relocation[src]

impl Eq for Relocation[src]

impl PartialEq<Relocation> for Relocation[src]

impl Serialize for Relocation[src]

impl StructuralEq for Relocation[src]

impl StructuralPartialEq for Relocation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.TableElements.html b/api/wasmtime_environ/struct.TableElements.html new file mode 100644 index 000000000000..be0293a5ff6d --- /dev/null +++ b/api/wasmtime_environ/struct.TableElements.html @@ -0,0 +1,31 @@ +wasmtime_environ::TableElements - Rust

[][src]Struct wasmtime_environ::TableElements

pub struct TableElements {
+    pub table_index: TableIndex,
+    pub base: Option<GlobalIndex>,
+    pub offset: usize,
+    pub elements: Box<[FuncIndex]>,
+}

A WebAssembly table initializer.

+

+ Fields

table_index: TableIndex

The index of a table to initialize.

+
base: Option<GlobalIndex>

Optionally, a global variable giving a base index.

+
offset: usize

The offset to add to the base.

+
elements: Box<[FuncIndex]>

The values to write into the table elements.

+

Trait Implementations

impl Clone for TableElements[src]

impl Debug for TableElements[src]

impl Hash for TableElements[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.TablePlan.html b/api/wasmtime_environ/struct.TablePlan.html new file mode 100644 index 000000000000..21b142c0af5c --- /dev/null +++ b/api/wasmtime_environ/struct.TablePlan.html @@ -0,0 +1,29 @@ +wasmtime_environ::TablePlan - Rust

[][src]Struct wasmtime_environ::TablePlan

pub struct TablePlan {
+    pub table: Table,
+    pub style: TableStyle,
+}

A WebAssembly table description along with our chosen style for +implementing it.

+

+ Fields

table: Table

The WebAssembly table description.

+
style: TableStyle

Our chosen implementation style.

+

Methods

impl TablePlan[src]

pub fn for_table(table: Table, tunables: &Tunables) -> Self[src]

Draw up a plan for implementing a Table.

+

Trait Implementations

impl Clone for TablePlan[src]

impl Debug for TablePlan[src]

impl Hash for TablePlan[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.TargetSharedSignatureIndex.html b/api/wasmtime_environ/struct.TargetSharedSignatureIndex.html new file mode 100644 index 000000000000..249ae39e3eee --- /dev/null +++ b/api/wasmtime_environ/struct.TargetSharedSignatureIndex.html @@ -0,0 +1,21 @@ +wasmtime_environ::TargetSharedSignatureIndex - Rust

[][src]Struct wasmtime_environ::TargetSharedSignatureIndex

pub struct TargetSharedSignatureIndex(_);

Target specific type for shared signature index.

+

Methods

impl TargetSharedSignatureIndex[src]

pub fn new(value: u32) -> Self[src]

Constructs TargetSharedSignatureIndex.

+

pub fn index(self) -> u32[src]

Returns index value.

+

Trait Implementations

impl Clone for TargetSharedSignatureIndex[src]

impl Copy for TargetSharedSignatureIndex[src]

impl Debug for TargetSharedSignatureIndex[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.TrapInformation.html b/api/wasmtime_environ/struct.TrapInformation.html new file mode 100644 index 000000000000..ad042f252091 --- /dev/null +++ b/api/wasmtime_environ/struct.TrapInformation.html @@ -0,0 +1,26 @@ +wasmtime_environ::TrapInformation - Rust

[][src]Struct wasmtime_environ::TrapInformation

pub struct TrapInformation {
+    pub code_offset: CodeOffset,
+    pub source_loc: SourceLoc,
+    pub trap_code: TrapCode,
+}

Information about trap.

+

+ Fields

code_offset: CodeOffset

The offset of the trapping instruction in native code. It is relative to the beginning of the function.

+
source_loc: SourceLoc

Location of trapping instruction in WebAssembly binary module.

+
trap_code: TrapCode

Code of the trap.

+

Trait Implementations

impl Debug for TrapInformation[src]

impl<'de> Deserialize<'de> for TrapInformation[src]

impl Eq for TrapInformation[src]

impl PartialEq<TrapInformation> for TrapInformation[src]

impl Serialize for TrapInformation[src]

impl StructuralEq for TrapInformation[src]

impl StructuralPartialEq for TrapInformation[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.Tunables.html b/api/wasmtime_environ/struct.Tunables.html new file mode 100644 index 000000000000..db78724477ac --- /dev/null +++ b/api/wasmtime_environ/struct.Tunables.html @@ -0,0 +1,27 @@ +wasmtime_environ::Tunables - Rust

[][src]Struct wasmtime_environ::Tunables

pub struct Tunables {
+    pub static_memory_bound: u32,
+    pub static_memory_offset_guard_size: u64,
+    pub dynamic_memory_offset_guard_size: u64,
+}

Tunable parameters for WebAssembly compilation.

+

+ Fields

static_memory_bound: u32

For static heaps, the size in wasm pages of the heap protected by bounds checking.

+
static_memory_offset_guard_size: u64

The size in bytes of the offset guard for static heaps.

+
dynamic_memory_offset_guard_size: u64

The size in bytes of the offset guard for dynamic heaps.

+

Trait Implementations

impl Clone for Tunables[src]

impl Default for Tunables[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/struct.VMOffsets.html b/api/wasmtime_environ/struct.VMOffsets.html new file mode 100644 index 000000000000..f93b5eb9770f --- /dev/null +++ b/api/wasmtime_environ/struct.VMOffsets.html @@ -0,0 +1,103 @@ +wasmtime_environ::VMOffsets - Rust

[][src]Struct wasmtime_environ::VMOffsets

pub struct VMOffsets {
+    pub pointer_size: u8,
+    pub num_signature_ids: u32,
+    pub num_imported_functions: u32,
+    pub num_imported_tables: u32,
+    pub num_imported_memories: u32,
+    pub num_imported_globals: u32,
+    pub num_defined_tables: u32,
+    pub num_defined_memories: u32,
+    pub num_defined_globals: u32,
+}

This class computes offsets to fields within VMContext and other +related structs that JIT code accesses directly.

+

+ Fields

pointer_size: u8

The size in bytes of a pointer on the target.

+
num_signature_ids: u32

The number of signature declarations in the module.

+
num_imported_functions: u32

The number of imported functions in the module.

+
num_imported_tables: u32

The number of imported tables in the module.

+
num_imported_memories: u32

The number of imported memories in the module.

+
num_imported_globals: u32

The number of imported globals in the module.

+
num_defined_tables: u32

The number of defined tables in the module.

+
num_defined_memories: u32

The number of defined memories in the module.

+
num_defined_globals: u32

The number of defined globals in the module.

+

Methods

impl VMOffsets[src]

pub fn new(pointer_size: u8, module: &Module) -> Self[src]

Return a new VMOffsets instance, for a given pointer size.

+

impl VMOffsets[src]

Offsets for VMFunctionImport.

+

pub fn vmfunction_import_body(&self) -> u8[src]

The offset of the body field.

+

pub fn vmfunction_import_vmctx(&self) -> u8[src]

The offset of the vmctx field.

+

pub fn size_of_vmfunction_import(&self) -> u8[src]

Return the size of VMFunctionImport.

+

impl VMOffsets[src]

Offsets for *const VMFunctionBody.

+

pub fn size_of_vmfunction_body_ptr(&self) -> u8[src]

The size of the current_elements field.

+

impl VMOffsets[src]

Offsets for VMTableImport.

+

pub fn vmtable_import_from(&self) -> u8[src]

The offset of the from field.

+

pub fn vmtable_import_vmctx(&self) -> u8[src]

The offset of the vmctx field.

+

pub fn size_of_vmtable_import(&self) -> u8[src]

Return the size of VMTableImport.

+

impl VMOffsets[src]

Offsets for VMTableDefinition.

+

pub fn vmtable_definition_base(&self) -> u8[src]

The offset of the base field.

+

pub fn vmtable_definition_current_elements(&self) -> u8[src]

The offset of the current_elements field.

+

pub fn size_of_vmtable_definition_current_elements(&self) -> u8[src]

The size of the current_elements field.

+

pub fn size_of_vmtable_definition(&self) -> u8[src]

Return the size of VMTableDefinition.

+

pub fn type_of_vmtable_definition_current_elements(&self) -> Type[src]

The type of the current_elements field.

+

impl VMOffsets[src]

Offsets for VMMemoryImport.

+

pub fn vmmemory_import_from(&self) -> u8[src]

The offset of the from field.

+

pub fn vmmemory_import_vmctx(&self) -> u8[src]

The offset of the vmctx field.

+

pub fn size_of_vmmemory_import(&self) -> u8[src]

Return the size of VMMemoryImport.

+

impl VMOffsets[src]

Offsets for VMMemoryDefinition.

+

pub fn vmmemory_definition_base(&self) -> u8[src]

The offset of the base field.

+

pub fn vmmemory_definition_current_length(&self) -> u8[src]

The offset of the current_length field.

+

pub fn size_of_vmmemory_definition_current_length(&self) -> u8[src]

The size of the current_length field.

+

pub fn size_of_vmmemory_definition(&self) -> u8[src]

Return the size of VMMemoryDefinition.

+

pub fn type_of_vmmemory_definition_current_length(&self) -> Type[src]

The type of the current_length field.

+

impl VMOffsets[src]

Offsets for VMGlobalImport.

+

pub fn vmglobal_import_from(&self) -> u8[src]

The offset of the from field.

+

pub fn size_of_vmglobal_import(&self) -> u8[src]

Return the size of VMGlobalImport.

+

impl VMOffsets[src]

Offsets for VMGlobalDefinition.

+

pub fn size_of_vmglobal_definition(&self) -> u8[src]

Return the size of VMGlobalDefinition; this is the size of the largest value type (i.e. a +V128).

+

impl VMOffsets[src]

Offsets for VMSharedSignatureIndex.

+

pub fn size_of_vmshared_signature_index(&self) -> u8[src]

Return the size of VMSharedSignatureIndex.

+

impl VMOffsets[src]

Offsets for VMCallerCheckedAnyfunc.

+

pub fn vmcaller_checked_anyfunc_func_ptr(&self) -> u8[src]

The offset of the func_ptr field.

+

pub fn vmcaller_checked_anyfunc_type_index(&self) -> u8[src]

The offset of the type_index field.

+

pub fn vmcaller_checked_anyfunc_vmctx(&self) -> u8[src]

The offset of the vmctx field.

+

pub fn size_of_vmcaller_checked_anyfunc(&self) -> u8[src]

Return the size of VMCallerCheckedAnyfunc.

+

impl VMOffsets[src]

Offsets for VMContext.

+

pub fn vmctx_signature_ids_begin(&self) -> u32[src]

The offset of the signature_ids array.

+

pub fn vmctx_imported_functions_begin(&self) -> u32[src]

The offset of the tables array.

+

pub fn vmctx_imported_tables_begin(&self) -> u32[src]

The offset of the tables array.

+

pub fn vmctx_imported_memories_begin(&self) -> u32[src]

The offset of the memories array.

+

pub fn vmctx_imported_globals_begin(&self) -> u32[src]

The offset of the globals array.

+

pub fn vmctx_tables_begin(&self) -> u32[src]

The offset of the tables array.

+

pub fn vmctx_memories_begin(&self) -> u32[src]

The offset of the memories array.

+

pub fn vmctx_globals_begin(&self) -> u32[src]

The offset of the globals array.

+

pub fn vmctx_builtin_functions_begin(&self) -> u32[src]

The offset of the builtin functions array.

+

pub fn size_of_vmctx(&self) -> u32[src]

Return the size of the VMContext allocation.

+

pub fn vmctx_vmshared_signature_id(&self, index: SignatureIndex) -> u32[src]

Return the offset to VMSharedSignatureId index index.

+

pub fn vmctx_vmfunction_import(&self, index: FuncIndex) -> u32[src]

Return the offset to VMFunctionImport index index.

+

pub fn vmctx_vmtable_import(&self, index: TableIndex) -> u32[src]

Return the offset to VMTableImport index index.

+

pub fn vmctx_vmmemory_import(&self, index: MemoryIndex) -> u32[src]

Return the offset to VMMemoryImport index index.

+

pub fn vmctx_vmglobal_import(&self, index: GlobalIndex) -> u32[src]

Return the offset to VMGlobalImport index index.

+

pub fn vmctx_vmtable_definition(&self, index: DefinedTableIndex) -> u32[src]

Return the offset to VMTableDefinition index index.

+

pub fn vmctx_vmmemory_definition(&self, index: DefinedMemoryIndex) -> u32[src]

Return the offset to VMMemoryDefinition index index.

+

pub fn vmctx_vmglobal_definition(&self, index: DefinedGlobalIndex) -> u32[src]

Return the offset to the VMGlobalDefinition index index.

+

pub fn vmctx_vmfunction_import_body(&self, index: FuncIndex) -> u32[src]

Return the offset to the body field in *const VMFunctionBody index index.

+

pub fn vmctx_vmfunction_import_vmctx(&self, index: FuncIndex) -> u32[src]

Return the offset to the vmctx field in *const VMFunctionBody index index.

+

pub fn vmctx_vmtable_import_from(&self, index: TableIndex) -> u32[src]

Return the offset to the from field in VMTableImport index index.

+

pub fn vmctx_vmtable_definition_base(&self, index: DefinedTableIndex) -> u32[src]

Return the offset to the base field in VMTableDefinition index index.

+

pub fn vmctx_vmtable_definition_current_elements(
    &self,
    index: DefinedTableIndex
) -> u32
[src]

Return the offset to the current_elements field in VMTableDefinition index index.

+

pub fn vmctx_vmmemory_import_from(&self, index: MemoryIndex) -> u32[src]

Return the offset to the from field in VMMemoryImport index index.

+

pub fn vmctx_vmmemory_import_vmctx(&self, index: MemoryIndex) -> u32[src]

Return the offset to the vmctx field in VMMemoryImport index index.

+

pub fn vmctx_vmmemory_definition_base(&self, index: DefinedMemoryIndex) -> u32[src]

Return the offset to the base field in VMMemoryDefinition index index.

+

pub fn vmctx_vmmemory_definition_current_length(
    &self,
    index: DefinedMemoryIndex
) -> u32
[src]

Return the offset to the current_length field in VMMemoryDefinition index index.

+

pub fn vmctx_vmglobal_import_from(&self, index: GlobalIndex) -> u32[src]

Return the offset to the from field in VMGlobalImport index index.

+

pub fn vmctx_builtin_function(&self, index: BuiltinFunctionIndex) -> u32[src]

Return the offset to builtin function in VMBuiltinFunctionsArray index index.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/trait.Compiler.html b/api/wasmtime_environ/trait.Compiler.html new file mode 100644 index 000000000000..c461104dade8 --- /dev/null +++ b/api/wasmtime_environ/trait.Compiler.html @@ -0,0 +1,9 @@ +wasmtime_environ::Compiler - Rust

[][src]Trait wasmtime_environ::Compiler

pub trait Compiler {
+    fn compile_module<'data, 'module>(
        module: &'module Module,
        module_translation: &ModuleTranslationState,
        function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
        isa: &dyn TargetIsa,
        generate_debug_info: bool,
        cache_config: &CacheConfig
    ) -> Result<(Compilation, Relocations, ModuleAddressMap, ValueLabelsRanges, PrimaryMap<DefinedFuncIndex, StackSlots>, Traps), CompileError>; +}

An implementation of a compiler from parsed WebAssembly module to native code.

+
+

Required methods

fn compile_module<'data, 'module>(
    module: &'module Module,
    module_translation: &ModuleTranslationState,
    function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
    isa: &dyn TargetIsa,
    generate_debug_info: bool,
    cache_config: &CacheConfig
) -> Result<(Compilation, Relocations, ModuleAddressMap, ValueLabelsRanges, PrimaryMap<DefinedFuncIndex, StackSlots>, Traps), CompileError>

Compile a parsed module with the given TargetIsa.

+
Loading content... +

Implementors

impl Compiler for Cranelift[src]

fn compile_module<'data, 'module>(
    module: &'module Module,
    module_translation: &ModuleTranslationState,
    function_body_inputs: PrimaryMap<DefinedFuncIndex, FunctionBodyData<'data>>,
    isa: &dyn TargetIsa,
    generate_debug_info: bool,
    cache_config: &CacheConfig
) -> Result<(Compilation, Relocations, ModuleAddressMap, ValueLabelsRanges, PrimaryMap<DefinedFuncIndex, StackSlots>, Traps), CompileError>
[src]

Compile the module using Cranelift, producing a compilation result with +associated relocations.

+
Loading content...
\ No newline at end of file diff --git a/api/wasmtime_environ/tunables/struct.Tunables.html b/api/wasmtime_environ/tunables/struct.Tunables.html new file mode 100644 index 000000000000..e8de532ae390 --- /dev/null +++ b/api/wasmtime_environ/tunables/struct.Tunables.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.Tunables.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/type.ModuleAddressMap.html b/api/wasmtime_environ/type.ModuleAddressMap.html new file mode 100644 index 000000000000..1148388ec6ff --- /dev/null +++ b/api/wasmtime_environ/type.ModuleAddressMap.html @@ -0,0 +1,2 @@ +wasmtime_environ::ModuleAddressMap - Rust

[][src]Type Definition wasmtime_environ::ModuleAddressMap

type ModuleAddressMap = PrimaryMap<DefinedFuncIndex, FunctionAddressMap>;

Module functions addresses mappings.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/type.Relocations.html b/api/wasmtime_environ/type.Relocations.html new file mode 100644 index 000000000000..e54fdda027b5 --- /dev/null +++ b/api/wasmtime_environ/type.Relocations.html @@ -0,0 +1,2 @@ +wasmtime_environ::Relocations - Rust

[][src]Type Definition wasmtime_environ::Relocations

type Relocations = PrimaryMap<DefinedFuncIndex, Vec<Relocation>>;

Relocations to apply to function bodies.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/type.Traps.html b/api/wasmtime_environ/type.Traps.html new file mode 100644 index 000000000000..6bc84af029e6 --- /dev/null +++ b/api/wasmtime_environ/type.Traps.html @@ -0,0 +1,2 @@ +wasmtime_environ::Traps - Rust

[][src]Type Definition wasmtime_environ::Traps

type Traps = PrimaryMap<DefinedFuncIndex, Vec<TrapInformation>>;

Information about traps associated with the functions where the traps are placed.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/type.ValueLabelsRanges.html b/api/wasmtime_environ/type.ValueLabelsRanges.html new file mode 100644 index 000000000000..fa13f80e54db --- /dev/null +++ b/api/wasmtime_environ/type.ValueLabelsRanges.html @@ -0,0 +1,2 @@ +wasmtime_environ::ValueLabelsRanges - Rust

[][src]Type Definition wasmtime_environ::ValueLabelsRanges

type ValueLabelsRanges = PrimaryMap<DefinedFuncIndex, ValueLabelsRanges>;

Value ranges for functions.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/vmoffsets/struct.TargetSharedSignatureIndex.html b/api/wasmtime_environ/vmoffsets/struct.TargetSharedSignatureIndex.html new file mode 100644 index 000000000000..2d947080f801 --- /dev/null +++ b/api/wasmtime_environ/vmoffsets/struct.TargetSharedSignatureIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.TargetSharedSignatureIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/vmoffsets/struct.VMOffsets.html b/api/wasmtime_environ/vmoffsets/struct.VMOffsets.html new file mode 100644 index 000000000000..4392c211cd01 --- /dev/null +++ b/api/wasmtime_environ/vmoffsets/struct.VMOffsets.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_environ/struct.VMOffsets.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_environ/wasm/enum.GlobalInit.html b/api/wasmtime_environ/wasm/enum.GlobalInit.html new file mode 100644 index 000000000000..6d4ea1085ae1 --- /dev/null +++ b/api/wasmtime_environ/wasm/enum.GlobalInit.html @@ -0,0 +1,42 @@ +wasmtime_environ::wasm::GlobalInit - Rust

[]Enum wasmtime_environ::wasm::GlobalInit

pub enum GlobalInit {
+    I32Const(i32),
+    I64Const(i64),
+    F32Const(u32),
+    F64Const(u64),
+    V128Const(V128Imm),
+    GetGlobal(GlobalIndex),
+    RefNullConst,
+    RefFunc(FuncIndex),
+    Import,
+}

Globals are initialized via the const operators or by referring to another import.

+

+ Variants

+
I32Const(i32)

An i32.const.

+
I64Const(i64)

An i64.const.

+
F32Const(u32)

An f32.const.

+
F64Const(u64)

An f64.const.

+
V128Const(V128Imm)

A vconst.

+
GetGlobal(GlobalIndex)

A global.get of another global.

+
RefNullConst

A ref.null.

+
RefFunc(FuncIndex)

A ref.func <index>.

+
Import

< The global is imported from, and thus initialized by, a different module.

+

Trait Implementations

impl Clone for GlobalInit

impl Copy for GlobalInit

impl Debug for GlobalInit

impl Hash for GlobalInit

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/enum.TableElementType.html b/api/wasmtime_environ/wasm/enum.TableElementType.html new file mode 100644 index 000000000000..bd00865d2243 --- /dev/null +++ b/api/wasmtime_environ/wasm/enum.TableElementType.html @@ -0,0 +1,28 @@ +wasmtime_environ::wasm::TableElementType - Rust

[]Enum wasmtime_environ::wasm::TableElementType

pub enum TableElementType {
+    Val(Type),
+    Func,
+}

WebAssembly table element. Can be a function or a scalar type.

+

+ Variants

+
Val(Type)

A scalar type.

+
Func

A function.

+

Trait Implementations

impl Clone for TableElementType

impl Copy for TableElementType

impl Debug for TableElementType

impl Hash for TableElementType

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/fn.get_vmctx_value_label.html b/api/wasmtime_environ/wasm/fn.get_vmctx_value_label.html new file mode 100644 index 000000000000..b16168fe3578 --- /dev/null +++ b/api/wasmtime_environ/wasm/fn.get_vmctx_value_label.html @@ -0,0 +1,2 @@ +wasmtime_environ::wasm::get_vmctx_value_label - Rust

[]Function wasmtime_environ::wasm::get_vmctx_value_label

pub fn get_vmctx_value_label() -> ValueLabel

Special VMContext value label. It is tracked as 0xffff_fffe label.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/index.html b/api/wasmtime_environ/wasm/index.html new file mode 100644 index 000000000000..e65d952c06ff --- /dev/null +++ b/api/wasmtime_environ/wasm/index.html @@ -0,0 +1,19 @@ +wasmtime_environ::wasm - Rust

[][src]Module wasmtime_environ::wasm

Structs

+
DefinedFuncIndex

Index type of a defined function inside the WebAssembly module.

+
DefinedGlobalIndex

Index type of a defined global inside the WebAssembly module.

+
DefinedMemoryIndex

Index type of a defined memory inside the WebAssembly module.

+
DefinedTableIndex

Index type of a defined table inside the WebAssembly module.

+
FuncIndex

Index type of a function (imported or defined) inside the WebAssembly module.

+
Global

WebAssembly global.

+
GlobalIndex

Index type of a global variable (imported or defined) inside the WebAssembly module.

+
Memory

WebAssembly linear memory.

+
MemoryIndex

Index type of a linear memory (imported or defined) inside the WebAssembly module.

+
SignatureIndex

Index type of a signature (imported or defined) inside the WebAssembly module.

+
Table

WebAssembly table.

+
TableIndex

Index type of a table (imported or defined) inside the WebAssembly module.

+

Enums

+
GlobalInit

Globals are initialized via the const operators or by referring to another import.

+
TableElementType

WebAssembly table element. Can be a function or a scalar type.

+

Functions

+
get_vmctx_value_label

Special VMContext value label. It is tracked as 0xffff_fffe label.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/sidebar-items.js b/api/wasmtime_environ/wasm/sidebar-items.js new file mode 100644 index 000000000000..8f34db905e87 --- /dev/null +++ b/api/wasmtime_environ/wasm/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["GlobalInit","Globals are initialized via the `const` operators or by referring to another import."],["TableElementType","WebAssembly table element. Can be a function or a scalar type."]],"fn":[["get_vmctx_value_label","Special VMContext value label. It is tracked as 0xffff_fffe label."]],"struct":[["DefinedFuncIndex","Index type of a defined function inside the WebAssembly module."],["DefinedGlobalIndex","Index type of a defined global inside the WebAssembly module."],["DefinedMemoryIndex","Index type of a defined memory inside the WebAssembly module."],["DefinedTableIndex","Index type of a defined table inside the WebAssembly module."],["FuncIndex","Index type of a function (imported or defined) inside the WebAssembly module."],["Global","WebAssembly global."],["GlobalIndex","Index type of a global variable (imported or defined) inside the WebAssembly module."],["Memory","WebAssembly linear memory."],["MemoryIndex","Index type of a linear memory (imported or defined) inside the WebAssembly module."],["SignatureIndex","Index type of a signature (imported or defined) inside the WebAssembly module."],["Table","WebAssembly table."],["TableIndex","Index type of a table (imported or defined) inside the WebAssembly module."]]}); \ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.DefinedFuncIndex.html b/api/wasmtime_environ/wasm/struct.DefinedFuncIndex.html new file mode 100644 index 000000000000..c727e4b0a684 --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.DefinedFuncIndex.html @@ -0,0 +1,42 @@ +wasmtime_environ::wasm::DefinedFuncIndex - Rust

[]Struct wasmtime_environ::wasm::DefinedFuncIndex

pub struct DefinedFuncIndex(_);

Index type of a defined function inside the WebAssembly module.

+

Methods

impl DefinedFuncIndex

pub fn from_u32(x: u32) -> DefinedFuncIndex

Return the underlying index value as a u32.

+

pub fn as_u32(self) -> u32

Return the underlying index value as a u32.

+

Trait Implementations

impl Clone for DefinedFuncIndex

impl Copy for DefinedFuncIndex

impl Debug for DefinedFuncIndex

impl EntityRef for DefinedFuncIndex

impl Eq for DefinedFuncIndex

impl Hash for DefinedFuncIndex

impl Ord for DefinedFuncIndex

impl PartialEq<DefinedFuncIndex> for DefinedFuncIndex

impl PartialOrd<DefinedFuncIndex> for DefinedFuncIndex

impl ReservedValue for DefinedFuncIndex

impl StructuralEq for DefinedFuncIndex

impl StructuralPartialEq for DefinedFuncIndex

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> SparseMapValue<T> for T where
    T: EntityRef

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.DefinedGlobalIndex.html b/api/wasmtime_environ/wasm/struct.DefinedGlobalIndex.html new file mode 100644 index 000000000000..57fbe39d6aec --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.DefinedGlobalIndex.html @@ -0,0 +1,42 @@ +wasmtime_environ::wasm::DefinedGlobalIndex - Rust

[]Struct wasmtime_environ::wasm::DefinedGlobalIndex

pub struct DefinedGlobalIndex(_);

Index type of a defined global inside the WebAssembly module.

+

Methods

impl DefinedGlobalIndex

pub fn from_u32(x: u32) -> DefinedGlobalIndex

Return the underlying index value as a u32.

+

pub fn as_u32(self) -> u32

Return the underlying index value as a u32.

+

Trait Implementations

impl Clone for DefinedGlobalIndex

impl Copy for DefinedGlobalIndex

impl Debug for DefinedGlobalIndex

impl EntityRef for DefinedGlobalIndex

impl Eq for DefinedGlobalIndex

impl Hash for DefinedGlobalIndex

impl Ord for DefinedGlobalIndex

impl PartialEq<DefinedGlobalIndex> for DefinedGlobalIndex

impl PartialOrd<DefinedGlobalIndex> for DefinedGlobalIndex

impl ReservedValue for DefinedGlobalIndex

impl StructuralEq for DefinedGlobalIndex

impl StructuralPartialEq for DefinedGlobalIndex

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> SparseMapValue<T> for T where
    T: EntityRef

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.DefinedMemoryIndex.html b/api/wasmtime_environ/wasm/struct.DefinedMemoryIndex.html new file mode 100644 index 000000000000..44859c4fafd9 --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.DefinedMemoryIndex.html @@ -0,0 +1,42 @@ +wasmtime_environ::wasm::DefinedMemoryIndex - Rust

[]Struct wasmtime_environ::wasm::DefinedMemoryIndex

pub struct DefinedMemoryIndex(_);

Index type of a defined memory inside the WebAssembly module.

+

Methods

impl DefinedMemoryIndex

pub fn from_u32(x: u32) -> DefinedMemoryIndex

Return the underlying index value as a u32.

+

pub fn as_u32(self) -> u32

Return the underlying index value as a u32.

+

Trait Implementations

impl Clone for DefinedMemoryIndex

impl Copy for DefinedMemoryIndex

impl Debug for DefinedMemoryIndex

impl EntityRef for DefinedMemoryIndex

impl Eq for DefinedMemoryIndex

impl Hash for DefinedMemoryIndex

impl Ord for DefinedMemoryIndex

impl PartialEq<DefinedMemoryIndex> for DefinedMemoryIndex

impl PartialOrd<DefinedMemoryIndex> for DefinedMemoryIndex

impl ReservedValue for DefinedMemoryIndex

impl StructuralEq for DefinedMemoryIndex

impl StructuralPartialEq for DefinedMemoryIndex

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> SparseMapValue<T> for T where
    T: EntityRef

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.DefinedTableIndex.html b/api/wasmtime_environ/wasm/struct.DefinedTableIndex.html new file mode 100644 index 000000000000..29d86f4e443d --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.DefinedTableIndex.html @@ -0,0 +1,42 @@ +wasmtime_environ::wasm::DefinedTableIndex - Rust

[]Struct wasmtime_environ::wasm::DefinedTableIndex

pub struct DefinedTableIndex(_);

Index type of a defined table inside the WebAssembly module.

+

Methods

impl DefinedTableIndex

pub fn from_u32(x: u32) -> DefinedTableIndex

Return the underlying index value as a u32.

+

pub fn as_u32(self) -> u32

Return the underlying index value as a u32.

+

Trait Implementations

impl Clone for DefinedTableIndex

impl Copy for DefinedTableIndex

impl Debug for DefinedTableIndex

impl EntityRef for DefinedTableIndex

impl Eq for DefinedTableIndex

impl Hash for DefinedTableIndex

impl Ord for DefinedTableIndex

impl PartialEq<DefinedTableIndex> for DefinedTableIndex

impl PartialOrd<DefinedTableIndex> for DefinedTableIndex

impl ReservedValue for DefinedTableIndex

impl StructuralEq for DefinedTableIndex

impl StructuralPartialEq for DefinedTableIndex

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> SparseMapValue<T> for T where
    T: EntityRef

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.FuncIndex.html b/api/wasmtime_environ/wasm/struct.FuncIndex.html new file mode 100644 index 000000000000..7e1d519d860c --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.FuncIndex.html @@ -0,0 +1,44 @@ +wasmtime_environ::wasm::FuncIndex - Rust

[]Struct wasmtime_environ::wasm::FuncIndex

pub struct FuncIndex(_);

Index type of a function (imported or defined) inside the WebAssembly module.

+

Methods

impl FuncIndex

pub fn from_u32(x: u32) -> FuncIndex

Return the underlying index value as a u32.

+

pub fn as_u32(self) -> u32

Return the underlying index value as a u32.

+

Trait Implementations

impl Clone for FuncIndex

impl Copy for FuncIndex

impl Debug for FuncIndex

impl<'de> Deserialize<'de> for FuncIndex

impl EntityRef for FuncIndex

impl Eq for FuncIndex

impl Hash for FuncIndex

impl Ord for FuncIndex

impl PartialEq<FuncIndex> for FuncIndex

impl PartialOrd<FuncIndex> for FuncIndex

impl ReservedValue for FuncIndex

impl Serialize for FuncIndex

impl StructuralEq for FuncIndex

impl StructuralPartialEq for FuncIndex

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> SparseMapValue<T> for T where
    T: EntityRef

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.Global.html b/api/wasmtime_environ/wasm/struct.Global.html new file mode 100644 index 000000000000..80aec5697c8f --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.Global.html @@ -0,0 +1,29 @@ +wasmtime_environ::wasm::Global - Rust

[]Struct wasmtime_environ::wasm::Global

pub struct Global {
+    pub ty: Type,
+    pub mutability: bool,
+    pub initializer: GlobalInit,
+}

WebAssembly global.

+

+ Fields

ty: Type

The type of the value stored in the global.

+
mutability: bool

A flag indicating whether the value may change at runtime.

+
initializer: GlobalInit

The source of the initial value.

+

Trait Implementations

impl Clone for Global

impl Copy for Global

impl Debug for Global

impl Hash for Global

Auto Trait Implementations

impl RefUnwindSafe for Global

impl Send for Global

impl Sync for Global

impl Unpin for Global

impl UnwindSafe for Global

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.GlobalIndex.html b/api/wasmtime_environ/wasm/struct.GlobalIndex.html new file mode 100644 index 000000000000..38c9c6284a4a --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.GlobalIndex.html @@ -0,0 +1,42 @@ +wasmtime_environ::wasm::GlobalIndex - Rust

[]Struct wasmtime_environ::wasm::GlobalIndex

pub struct GlobalIndex(_);

Index type of a global variable (imported or defined) inside the WebAssembly module.

+

Methods

impl GlobalIndex

pub fn from_u32(x: u32) -> GlobalIndex

Return the underlying index value as a u32.

+

pub fn as_u32(self) -> u32

Return the underlying index value as a u32.

+

Trait Implementations

impl Clone for GlobalIndex

impl Copy for GlobalIndex

impl Debug for GlobalIndex

impl EntityRef for GlobalIndex

impl Eq for GlobalIndex

impl Hash for GlobalIndex

impl Ord for GlobalIndex

impl PartialEq<GlobalIndex> for GlobalIndex

impl PartialOrd<GlobalIndex> for GlobalIndex

impl ReservedValue for GlobalIndex

impl StructuralEq for GlobalIndex

impl StructuralPartialEq for GlobalIndex

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> SparseMapValue<T> for T where
    T: EntityRef

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.Memory.html b/api/wasmtime_environ/wasm/struct.Memory.html new file mode 100644 index 000000000000..5edff6892166 --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.Memory.html @@ -0,0 +1,29 @@ +wasmtime_environ::wasm::Memory - Rust

[]Struct wasmtime_environ::wasm::Memory

pub struct Memory {
+    pub minimum: u32,
+    pub maximum: Option<u32>,
+    pub shared: bool,
+}

WebAssembly linear memory.

+

+ Fields

minimum: u32

The minimum number of pages in the memory.

+
maximum: Option<u32>

The maximum number of pages in the memory.

+
shared: bool

Whether the memory may be shared between multiple threads.

+

Trait Implementations

impl Clone for Memory

impl Copy for Memory

impl Debug for Memory

impl Hash for Memory

Auto Trait Implementations

impl RefUnwindSafe for Memory

impl Send for Memory

impl Sync for Memory

impl Unpin for Memory

impl UnwindSafe for Memory

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.MemoryIndex.html b/api/wasmtime_environ/wasm/struct.MemoryIndex.html new file mode 100644 index 000000000000..ff4449c34055 --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.MemoryIndex.html @@ -0,0 +1,42 @@ +wasmtime_environ::wasm::MemoryIndex - Rust

[]Struct wasmtime_environ::wasm::MemoryIndex

pub struct MemoryIndex(_);

Index type of a linear memory (imported or defined) inside the WebAssembly module.

+

Methods

impl MemoryIndex

pub fn from_u32(x: u32) -> MemoryIndex

Return the underlying index value as a u32.

+

pub fn as_u32(self) -> u32

Return the underlying index value as a u32.

+

Trait Implementations

impl Clone for MemoryIndex

impl Copy for MemoryIndex

impl Debug for MemoryIndex

impl EntityRef for MemoryIndex

impl Eq for MemoryIndex

impl Hash for MemoryIndex

impl Ord for MemoryIndex

impl PartialEq<MemoryIndex> for MemoryIndex

impl PartialOrd<MemoryIndex> for MemoryIndex

impl ReservedValue for MemoryIndex

impl StructuralEq for MemoryIndex

impl StructuralPartialEq for MemoryIndex

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> SparseMapValue<T> for T where
    T: EntityRef

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.SignatureIndex.html b/api/wasmtime_environ/wasm/struct.SignatureIndex.html new file mode 100644 index 000000000000..f558e816d1f1 --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.SignatureIndex.html @@ -0,0 +1,42 @@ +wasmtime_environ::wasm::SignatureIndex - Rust

[]Struct wasmtime_environ::wasm::SignatureIndex

pub struct SignatureIndex(_);

Index type of a signature (imported or defined) inside the WebAssembly module.

+

Methods

impl SignatureIndex

pub fn from_u32(x: u32) -> SignatureIndex

Return the underlying index value as a u32.

+

pub fn as_u32(self) -> u32

Return the underlying index value as a u32.

+

Trait Implementations

impl Clone for SignatureIndex

impl Copy for SignatureIndex

impl Debug for SignatureIndex

impl EntityRef for SignatureIndex

impl Eq for SignatureIndex

impl Hash for SignatureIndex

impl Ord for SignatureIndex

impl PartialEq<SignatureIndex> for SignatureIndex

impl PartialOrd<SignatureIndex> for SignatureIndex

impl ReservedValue for SignatureIndex

impl StructuralEq for SignatureIndex

impl StructuralPartialEq for SignatureIndex

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> SparseMapValue<T> for T where
    T: EntityRef

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.Table.html b/api/wasmtime_environ/wasm/struct.Table.html new file mode 100644 index 000000000000..edbddf55adc2 --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.Table.html @@ -0,0 +1,29 @@ +wasmtime_environ::wasm::Table - Rust

[]Struct wasmtime_environ::wasm::Table

pub struct Table {
+    pub ty: TableElementType,
+    pub minimum: u32,
+    pub maximum: Option<u32>,
+}

WebAssembly table.

+

+ Fields

ty: TableElementType

The type of data stored in elements of the table.

+
minimum: u32

The minimum number of elements in the table.

+
maximum: Option<u32>

The maximum number of elements in the table.

+

Trait Implementations

impl Clone for Table

impl Copy for Table

impl Debug for Table

impl Hash for Table

Auto Trait Implementations

impl RefUnwindSafe for Table

impl Send for Table

impl Sync for Table

impl Unpin for Table

impl UnwindSafe for Table

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_environ/wasm/struct.TableIndex.html b/api/wasmtime_environ/wasm/struct.TableIndex.html new file mode 100644 index 000000000000..339b55d10162 --- /dev/null +++ b/api/wasmtime_environ/wasm/struct.TableIndex.html @@ -0,0 +1,42 @@ +wasmtime_environ::wasm::TableIndex - Rust

[]Struct wasmtime_environ::wasm::TableIndex

pub struct TableIndex(_);

Index type of a table (imported or defined) inside the WebAssembly module.

+

Methods

impl TableIndex

pub fn from_u32(x: u32) -> TableIndex

Return the underlying index value as a u32.

+

pub fn as_u32(self) -> u32

Return the underlying index value as a u32.

+

Trait Implementations

impl Clone for TableIndex

impl Copy for TableIndex

impl Debug for TableIndex

impl EntityRef for TableIndex

impl Eq for TableIndex

impl Hash for TableIndex

impl Ord for TableIndex

impl PartialEq<TableIndex> for TableIndex

impl PartialOrd<TableIndex> for TableIndex

impl ReservedValue for TableIndex

impl StructuralEq for TableIndex

impl StructuralPartialEq for TableIndex

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> SparseMapValue<T> for T where
    T: EntityRef

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/all.html b/api/wasmtime_fuzzing/all.html new file mode 100644 index 000000000000..513cf2e20165 --- /dev/null +++ b/api/wasmtime_fuzzing/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Enums

Functions

\ No newline at end of file diff --git a/api/wasmtime_fuzzing/generators/api/enum.ApiCall.html b/api/wasmtime_fuzzing/generators/api/enum.ApiCall.html new file mode 100644 index 000000000000..0595ebbbcf1c --- /dev/null +++ b/api/wasmtime_fuzzing/generators/api/enum.ApiCall.html @@ -0,0 +1,48 @@ +wasmtime_fuzzing::generators::api::ApiCall - Rust

[][src]Enum wasmtime_fuzzing::generators::api::ApiCall

pub enum ApiCall {
+    ConfigNew,
+    ConfigDebugInfo(bool),
+    EngineNew,
+    StoreNew,
+    ModuleNew {
+        id: usize,
+        wasm: WasmOptTtf,
+    },
+    ModuleDrop {
+        id: usize,
+    },
+    InstanceNew {
+        id: usize,
+        module: usize,
+    },
+    InstanceDrop {
+        id: usize,
+    },
+    CallExportedFunc {
+        instance: usize,
+        nth: usize,
+    },
+}

A call to one of Wasmtime's public APIs.

+

+ Variants

+
ConfigNew
ConfigDebugInfo(bool)
EngineNew
StoreNew
ModuleNew

Fields of ModuleNew

id: usizewasm: WasmOptTtf
ModuleDrop

Fields of ModuleDrop

id: usize
InstanceNew

Fields of InstanceNew

id: usizemodule: usize
InstanceDrop

Fields of InstanceDrop

id: usize
CallExportedFunc

Fields of CallExportedFunc

instance: usizenth: usize

Trait Implementations

impl Arbitrary for ApiCall[src]

impl Clone for ApiCall[src]

impl Debug for ApiCall[src]

Auto Trait Implementations

impl RefUnwindSafe for ApiCall

impl Send for ApiCall

impl Sync for ApiCall

impl Unpin for ApiCall

impl UnwindSafe for ApiCall

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/generators/api/index.html b/api/wasmtime_fuzzing/generators/api/index.html new file mode 100644 index 000000000000..6889dfaa5fd1 --- /dev/null +++ b/api/wasmtime_fuzzing/generators/api/index.html @@ -0,0 +1,17 @@ +wasmtime_fuzzing::generators::api - Rust

[][src]Module wasmtime_fuzzing::generators::api

Generating sequences of Wasmtime API calls.

+

We only generate valid sequences of API calls. To do this, we keep track +of what objects we've already created in earlier API calls via the Scope +struct.

+

To generate even-more-pathological sequences of API calls, we use swarm +testing:

+
+

In swarm testing, the usual practice of potentially including all features +in every test case is abandoned. Rather, a large “swarm” of randomly +generated configurations, each of which omits some features, is used, with +configurations receiving equal resources.

+
+

Structs

+
ApiCalls

A sequence of API calls.

+

Enums

+
ApiCall

A call to one of Wasmtime's public APIs.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/generators/api/sidebar-items.js b/api/wasmtime_fuzzing/generators/api/sidebar-items.js new file mode 100644 index 000000000000..0caa84a24035 --- /dev/null +++ b/api/wasmtime_fuzzing/generators/api/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["ApiCall","A call to one of Wasmtime's public APIs."]],"struct":[["ApiCalls","A sequence of API calls."]]}); \ No newline at end of file diff --git a/api/wasmtime_fuzzing/generators/api/struct.ApiCalls.html b/api/wasmtime_fuzzing/generators/api/struct.ApiCalls.html new file mode 100644 index 000000000000..3bc83fd65440 --- /dev/null +++ b/api/wasmtime_fuzzing/generators/api/struct.ApiCalls.html @@ -0,0 +1,21 @@ +wasmtime_fuzzing::generators::api::ApiCalls - Rust

[][src]Struct wasmtime_fuzzing::generators::api::ApiCalls

pub struct ApiCalls {
+    pub calls: Vec<ApiCall>,
+}

A sequence of API calls.

+

+ Fields

calls: Vec<ApiCall>

The API calls.

+

Trait Implementations

impl Arbitrary for ApiCalls[src]

impl Debug for ApiCalls[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/generators/index.html b/api/wasmtime_fuzzing/generators/index.html new file mode 100644 index 000000000000..36b9318f13c9 --- /dev/null +++ b/api/wasmtime_fuzzing/generators/index.html @@ -0,0 +1,14 @@ +wasmtime_fuzzing::generators - Rust

[][src]Module wasmtime_fuzzing::generators

Test case generators.

+

Test case generators take raw, unstructured input from a fuzzer +(e.g. libFuzzer) and translate that into a structured test case (e.g. a +valid Wasm binary).

+

These are generally implementations of the Arbitrary trait, or some +wrapper over an external tool, such that the wrapper implements the +Arbitrary trait for the wrapped external tool.

+

Modules

+
api

Generating sequences of Wasmtime API calls.

+

Structs

+
DifferentialConfig

A description of configuration options that we should do differential +testing between.

+
WasmOptTtf

A Wasm test case generator that is powered by Binaryen's wasm-opt -ttf.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/generators/sidebar-items.js b/api/wasmtime_fuzzing/generators/sidebar-items.js new file mode 100644 index 000000000000..acf15338c20c --- /dev/null +++ b/api/wasmtime_fuzzing/generators/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["api","Generating sequences of Wasmtime API calls."]],"struct":[["DifferentialConfig","A description of configuration options that we should do differential testing between."],["WasmOptTtf","A Wasm test case generator that is powered by Binaryen's `wasm-opt -ttf`."]]}); \ No newline at end of file diff --git a/api/wasmtime_fuzzing/generators/struct.DifferentialConfig.html b/api/wasmtime_fuzzing/generators/struct.DifferentialConfig.html new file mode 100644 index 000000000000..ea5de102ce45 --- /dev/null +++ b/api/wasmtime_fuzzing/generators/struct.DifferentialConfig.html @@ -0,0 +1,30 @@ +wasmtime_fuzzing::generators::DifferentialConfig - Rust

[][src]Struct wasmtime_fuzzing::generators::DifferentialConfig

pub struct DifferentialConfig { /* fields omitted */ }

A description of configuration options that we should do differential +testing between.

+

Methods

impl DifferentialConfig[src]

pub fn to_wasmtime_config(&self) -> Result<Config>[src]

Convert this differential fuzzing config into a wasmtime::Config.

+

Trait Implementations

impl Arbitrary for DifferentialConfig[src]

impl Clone for DifferentialConfig[src]

impl Debug for DifferentialConfig[src]

impl Eq for DifferentialConfig[src]

impl Hash for DifferentialConfig[src]

impl PartialEq<DifferentialConfig> for DifferentialConfig[src]

impl StructuralEq for DifferentialConfig[src]

impl StructuralPartialEq for DifferentialConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/generators/struct.WasmOptTtf.html b/api/wasmtime_fuzzing/generators/struct.WasmOptTtf.html new file mode 100644 index 000000000000..245c3dc37943 --- /dev/null +++ b/api/wasmtime_fuzzing/generators/struct.WasmOptTtf.html @@ -0,0 +1,27 @@ +wasmtime_fuzzing::generators::WasmOptTtf - Rust

[][src]Struct wasmtime_fuzzing::generators::WasmOptTtf

pub struct WasmOptTtf {
+    pub wasm: Vec<u8>,
+}

A Wasm test case generator that is powered by Binaryen's wasm-opt -ttf.

+

+ Fields

wasm: Vec<u8>

The raw, encoded Wasm bytes.

+

Trait Implementations

impl Arbitrary for WasmOptTtf[src]

impl Clone for WasmOptTtf[src]

impl Debug for WasmOptTtf[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/index.html b/api/wasmtime_fuzzing/index.html new file mode 100644 index 000000000000..3baf7b639927 --- /dev/null +++ b/api/wasmtime_fuzzing/index.html @@ -0,0 +1,5 @@ +wasmtime_fuzzing - Rust

[][src]Crate wasmtime_fuzzing

Fuzzing infrastructure for Wasmtime.

+

Modules

+
generators

Test case generators.

+
oracles

Oracles.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_global.html b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_global.html new file mode 100644 index 000000000000..351da11e9d6d --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_global.html @@ -0,0 +1,2 @@ +wasmtime_fuzzing::oracles::dummy::dummy_global - Rust

[][src]Function wasmtime_fuzzing::oracles::dummy::dummy_global

pub fn dummy_global(store: &Store, ty: GlobalType) -> Result<Global, Trap>

Construct a dummy global for the given global type.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_imports.html b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_imports.html new file mode 100644 index 000000000000..f2a05499ac23 --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_imports.html @@ -0,0 +1,2 @@ +wasmtime_fuzzing::oracles::dummy::dummy_imports - Rust

[][src]Function wasmtime_fuzzing::oracles::dummy::dummy_imports

pub fn dummy_imports(
    store: &Store,
    import_tys: &[ImportType]
) -> Result<Vec<Extern>, Trap>

Create a set of dummy functions/globals/etc for the given imports.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_memory.html b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_memory.html new file mode 100644 index 000000000000..10e22c8779cc --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_memory.html @@ -0,0 +1,2 @@ +wasmtime_fuzzing::oracles::dummy::dummy_memory - Rust

[][src]Function wasmtime_fuzzing::oracles::dummy::dummy_memory

pub fn dummy_memory(store: &Store, ty: MemoryType) -> Memory

Construct a dummy memory for the given memory type.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_table.html b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_table.html new file mode 100644 index 000000000000..cc05e7abb26b --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_table.html @@ -0,0 +1,2 @@ +wasmtime_fuzzing::oracles::dummy::dummy_table - Rust

[][src]Function wasmtime_fuzzing::oracles::dummy::dummy_table

pub fn dummy_table(store: &Store, ty: TableType) -> Result<Table, Trap>

Construct a dummy table for the given table type.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_value.html b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_value.html new file mode 100644 index 000000000000..49b7f989d053 --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_value.html @@ -0,0 +1,2 @@ +wasmtime_fuzzing::oracles::dummy::dummy_value - Rust

[][src]Function wasmtime_fuzzing::oracles::dummy::dummy_value

pub fn dummy_value(val_ty: &ValType) -> Result<Val, Trap>

Construct a dummy value for the given value type.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_values.html b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_values.html new file mode 100644 index 000000000000..67a49ade9769 --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/dummy/fn.dummy_values.html @@ -0,0 +1,2 @@ +wasmtime_fuzzing::oracles::dummy::dummy_values - Rust

[][src]Function wasmtime_fuzzing::oracles::dummy::dummy_values

pub fn dummy_values(val_tys: &[ValType]) -> Result<Vec<Val>, Trap>

Construct a sequence of dummy values for the given types.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/dummy/index.html b/api/wasmtime_fuzzing/oracles/dummy/index.html new file mode 100644 index 000000000000..57857e83ebcc --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/dummy/index.html @@ -0,0 +1,12 @@ +wasmtime_fuzzing::oracles::dummy - Rust

[][src]Module wasmtime_fuzzing::oracles::dummy

Dummy implementations of things that a Wasm module can import.

+

Structs

+
DummyFunc

A function that doesn't do anything but return the default (zero) value for +the function's type.

+

Functions

+
dummy_global

Construct a dummy global for the given global type.

+
dummy_imports

Create a set of dummy functions/globals/etc for the given imports.

+
dummy_memory

Construct a dummy memory for the given memory type.

+
dummy_table

Construct a dummy table for the given table type.

+
dummy_value

Construct a dummy value for the given value type.

+
dummy_values

Construct a sequence of dummy values for the given types.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/dummy/sidebar-items.js b/api/wasmtime_fuzzing/oracles/dummy/sidebar-items.js new file mode 100644 index 000000000000..3a63dc14d850 --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/dummy/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["dummy_global","Construct a dummy global for the given global type."],["dummy_imports","Create a set of dummy functions/globals/etc for the given imports."],["dummy_memory","Construct a dummy memory for the given memory type."],["dummy_table","Construct a dummy table for the given table type."],["dummy_value","Construct a dummy value for the given value type."],["dummy_values","Construct a sequence of dummy values for the given types."]],"struct":[["DummyFunc","A function that doesn't do anything but return the default (zero) value for the function's type."]]}); \ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/dummy/struct.DummyFunc.html b/api/wasmtime_fuzzing/oracles/dummy/struct.DummyFunc.html new file mode 100644 index 000000000000..43ba97034841 --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/dummy/struct.DummyFunc.html @@ -0,0 +1,16 @@ +wasmtime_fuzzing::oracles::dummy::DummyFunc - Rust

[][src]Struct wasmtime_fuzzing::oracles::dummy::DummyFunc

pub struct DummyFunc(_);

A function that doesn't do anything but return the default (zero) value for +the function's type.

+

Methods

impl DummyFunc[src]

pub fn new(store: &Store, ty: FuncType) -> Func[src]

Construct a new dummy Func.

+

Trait Implementations

impl Callable for DummyFunc[src]

impl Debug for DummyFunc[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/fn.compile.html b/api/wasmtime_fuzzing/oracles/fn.compile.html new file mode 100644 index 000000000000..4a897cff5c91 --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/fn.compile.html @@ -0,0 +1,5 @@ +wasmtime_fuzzing::oracles::compile - Rust

[][src]Function wasmtime_fuzzing::oracles::compile

pub fn compile(wasm: &[u8], strategy: Strategy)

Compile the Wasm buffer, and implicitly fail if we have an unexpected +panic or segfault or anything else that can be detected "passively".

+

Performs initial validation, and returns early if the Wasm is invalid.

+

You can control which compiler is used via passing a Strategy.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/fn.differential_execution.html b/api/wasmtime_fuzzing/oracles/fn.differential_execution.html new file mode 100644 index 000000000000..83e5914d9832 --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/fn.differential_execution.html @@ -0,0 +1,5 @@ +wasmtime_fuzzing::oracles::differential_execution - Rust

[][src]Function wasmtime_fuzzing::oracles::differential_execution

pub fn differential_execution(ttf: &WasmOptTtf, configs: &[DifferentialConfig])

Instantiate the given Wasm module with each Config and call all of its +exports. Modulo OOM, non-canonical NaNs, and usage of Wasm features that are +or aren't enabled for different configs, we should get the same results when +we call the exported functions for all of our different configs.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/fn.instantiate.html b/api/wasmtime_fuzzing/oracles/fn.instantiate.html new file mode 100644 index 000000000000..becb033a3f36 --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/fn.instantiate.html @@ -0,0 +1,5 @@ +wasmtime_fuzzing::oracles::instantiate - Rust

[][src]Function wasmtime_fuzzing::oracles::instantiate

pub fn instantiate(wasm: &[u8], strategy: Strategy)

Instantiate the Wasm buffer, and implicitly fail if we have an unexpected +panic or segfault or anything else that can be detected "passively".

+

Performs initial validation, and returns early if the Wasm is invalid.

+

You can control which compiler is used via passing a Strategy.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/fn.instantiate_with_config.html b/api/wasmtime_fuzzing/oracles/fn.instantiate_with_config.html new file mode 100644 index 000000000000..c83c917e0b82 --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/fn.instantiate_with_config.html @@ -0,0 +1,5 @@ +wasmtime_fuzzing::oracles::instantiate_with_config - Rust

[][src]Function wasmtime_fuzzing::oracles::instantiate_with_config

pub fn instantiate_with_config(wasm: &[u8], config: Config)

Instantiate the Wasm buffer, and implicitly fail if we have an unexpected +panic or segfault or anything else that can be detected "passively".

+

The engine will be configured using provided config.

+

See also instantiate functions.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/fn.make_api_calls.html b/api/wasmtime_fuzzing/oracles/fn.make_api_calls.html new file mode 100644 index 000000000000..e1b3d415e2bf --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/fn.make_api_calls.html @@ -0,0 +1,2 @@ +wasmtime_fuzzing::oracles::make_api_calls - Rust

[][src]Function wasmtime_fuzzing::oracles::make_api_calls

pub fn make_api_calls(api: ApiCalls)

Invoke the given API calls.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/index.html b/api/wasmtime_fuzzing/oracles/index.html new file mode 100644 index 000000000000..44cc0d55566c --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/index.html @@ -0,0 +1,24 @@ +wasmtime_fuzzing::oracles - Rust

[][src]Module wasmtime_fuzzing::oracles

Oracles.

+

Oracles take a test case and determine whether we have a bug. For example, +one of the simplest oracles is to take a Wasm binary as our input test case, +validate and instantiate it, and (implicitly) check that no assertions +failed or segfaults happened. A more complicated oracle might compare the +result of executing a Wasm file with and without optimizations enabled, and +make sure that the two executions are observably identical.

+

When an oracle finds a bug, it should report it to the fuzzing engine by +panicking.

+

Modules

+
dummy

Dummy implementations of things that a Wasm module can import.

+

Functions

+
compile

Compile the Wasm buffer, and implicitly fail if we have an unexpected +panic or segfault or anything else that can be detected "passively".

+
differential_execution

Instantiate the given Wasm module with each Config and call all of its +exports. Modulo OOM, non-canonical NaNs, and usage of Wasm features that are +or aren't enabled for different configs, we should get the same results when +we call the exported functions for all of our different configs.

+
instantiate

Instantiate the Wasm buffer, and implicitly fail if we have an unexpected +panic or segfault or anything else that can be detected "passively".

+
instantiate_with_config

Instantiate the Wasm buffer, and implicitly fail if we have an unexpected +panic or segfault or anything else that can be detected "passively".

+
make_api_calls

Invoke the given API calls.

+
\ No newline at end of file diff --git a/api/wasmtime_fuzzing/oracles/sidebar-items.js b/api/wasmtime_fuzzing/oracles/sidebar-items.js new file mode 100644 index 000000000000..48b9025f468f --- /dev/null +++ b/api/wasmtime_fuzzing/oracles/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["compile","Compile the Wasm buffer, and implicitly fail if we have an unexpected panic or segfault or anything else that can be detected \"passively\"."],["differential_execution","Instantiate the given Wasm module with each `Config` and call all of its exports. Modulo OOM, non-canonical NaNs, and usage of Wasm features that are or aren't enabled for different configs, we should get the same results when we call the exported functions for all of our different configs."],["instantiate","Instantiate the Wasm buffer, and implicitly fail if we have an unexpected panic or segfault or anything else that can be detected \"passively\"."],["instantiate_with_config","Instantiate the Wasm buffer, and implicitly fail if we have an unexpected panic or segfault or anything else that can be detected \"passively\"."],["make_api_calls","Invoke the given API calls."]],"mod":[["dummy","Dummy implementations of things that a Wasm module can import."]]}); \ No newline at end of file diff --git a/api/wasmtime_fuzzing/sidebar-items.js b/api/wasmtime_fuzzing/sidebar-items.js new file mode 100644 index 000000000000..b06f3cd5e8d8 --- /dev/null +++ b/api/wasmtime_fuzzing/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["generators","Test case generators."],["oracles","Oracles."]]}); \ No newline at end of file diff --git a/api/wasmtime_interface_types/all.html b/api/wasmtime_interface_types/all.html new file mode 100644 index 000000000000..52368a89207a --- /dev/null +++ b/api/wasmtime_interface_types/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Enums

\ No newline at end of file diff --git a/api/wasmtime_interface_types/enum.Value.html b/api/wasmtime_interface_types/enum.Value.html new file mode 100644 index 000000000000..755fb3318b5d --- /dev/null +++ b/api/wasmtime_interface_types/enum.Value.html @@ -0,0 +1,53 @@ +wasmtime_interface_types::Value - Rust

[][src]Enum wasmtime_interface_types::Value

pub enum Value {
+    String(String),
+    I32(i32),
+    U32(u32),
+    I64(i64),
+    U64(u64),
+    F32(f32),
+    F64(f64),
+}

The set of all possible WebAssembly Interface Types

+

+ Variants

+
String(String)
I32(i32)
U32(u32)
I64(i64)
U64(u64)
F32(f32)
F64(f64)

Trait Implementations

impl Clone for Value[src]

impl Debug for Value[src]

impl Display for Value[src]

impl<'a> From<&'a str> for Value[src]

impl From<String> for Value[src]

impl From<f32> for Value[src]

impl From<f64> for Value[src]

impl From<i32> for Value[src]

impl From<i64> for Value[src]

impl From<u32> for Value[src]

impl From<u64> for Value[src]

impl TryFrom<Value> for String[src]

type Error = Error

The type returned in the event of a conversion error.

+

impl TryFrom<Value> for i32[src]

type Error = Error

The type returned in the event of a conversion error.

+

impl TryFrom<Value> for u32[src]

type Error = Error

The type returned in the event of a conversion error.

+

impl TryFrom<Value> for i64[src]

type Error = Error

The type returned in the event of a conversion error.

+

impl TryFrom<Value> for u64[src]

type Error = Error

The type returned in the event of a conversion error.

+

impl TryFrom<Value> for f32[src]

type Error = Error

The type returned in the event of a conversion error.

+

impl TryFrom<Value> for f64[src]

type Error = Error

The type returned in the event of a conversion error.

+

Auto Trait Implementations

impl RefUnwindSafe for Value

impl Send for Value

impl Sync for Value

impl Unpin for Value

impl UnwindSafe for Value

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_interface_types/index.html b/api/wasmtime_interface_types/index.html new file mode 100644 index 000000000000..d7b1eac3925b --- /dev/null +++ b/api/wasmtime_interface_types/index.html @@ -0,0 +1,10 @@ +wasmtime_interface_types - Rust

[][src]Crate wasmtime_interface_types

A small crate to handle WebAssembly interface types in wasmtime.

+

Note that this is intended to follow the official proposal and +is highly susceptible to change/breakage/etc.

+

Structs

+
ExportBinding

Representation of a binding of an exported function.

+
ModuleData

A data structure intended to hold a parsed representation of the wasm +interface types of a module.

+

Enums

+
Value

The set of all possible WebAssembly Interface Types

+
\ No newline at end of file diff --git a/api/wasmtime_interface_types/sidebar-items.js b/api/wasmtime_interface_types/sidebar-items.js new file mode 100644 index 000000000000..5c75ee8c4bf9 --- /dev/null +++ b/api/wasmtime_interface_types/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["Value","The set of all possible WebAssembly Interface Types"]],"struct":[["ExportBinding","Representation of a binding of an exported function."],["ModuleData","A data structure intended to hold a parsed representation of the wasm interface types of a module."]]}); \ No newline at end of file diff --git a/api/wasmtime_interface_types/struct.ExportBinding.html b/api/wasmtime_interface_types/struct.ExportBinding.html new file mode 100644 index 000000000000..34a6402f3e1b --- /dev/null +++ b/api/wasmtime_interface_types/struct.ExportBinding.html @@ -0,0 +1,18 @@ +wasmtime_interface_types::ExportBinding - Rust

[][src]Struct wasmtime_interface_types::ExportBinding

pub struct ExportBinding<'a> { /* fields omitted */ }

Representation of a binding of an exported function.

+

Can be used to learn about binding expressions and/or binding types.

+

Methods

impl<'_> ExportBinding<'_>[src]

pub fn param_bindings(&self) -> Result<Vec<IncomingBindingExpression>>[src]

Returns the list of binding expressions used to create the parameters +for this binding.

+

pub fn param_types(&self) -> Result<Vec<WebidlScalarType>>[src]

Returns the list of scalar types used for this binding

+

pub fn result_bindings(&self) -> Result<Vec<OutgoingBindingExpression>>[src]

Returns the list of binding expressions used to extract the return +values of this binding.

+

Auto Trait Implementations

impl<'a> RefUnwindSafe for ExportBinding<'a>

impl<'a> Send for ExportBinding<'a>

impl<'a> Sync for ExportBinding<'a>

impl<'a> Unpin for ExportBinding<'a>

impl<'a> UnwindSafe for ExportBinding<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_interface_types/struct.ModuleData.html b/api/wasmtime_interface_types/struct.ModuleData.html new file mode 100644 index 000000000000..87bb85338a3f --- /dev/null +++ b/api/wasmtime_interface_types/struct.ModuleData.html @@ -0,0 +1,25 @@ +wasmtime_interface_types::ModuleData - Rust

[][src]Struct wasmtime_interface_types::ModuleData

pub struct ModuleData { /* fields omitted */ }

A data structure intended to hold a parsed representation of the wasm +interface types of a module.

+

The expected usage pattern is to create this next to wasmtime data +structures and then use this to process arguments into wasm arguments as +appropriate for bound functions.

+

Methods

impl ModuleData[src]

pub fn new(wasm: &[u8]) -> Result<ModuleData>[src]

Parses a raw binary wasm file, extracting information about wasm +interface types.

+

Returns an error if the wasm file is malformed.

+

pub fn find_wasi_module_name(&self) -> Option<String>[src]

Detects if WASI support is needed: returns module name that is requested.

+

pub fn invoke_export(
    &self,
    instance: &Instance,
    export: &str,
    args: &[Value]
) -> Result<Vec<Value>>
[src]

Invokes wasmtime function with a &[Value] list. Value the set of +wasm interface types.

+

pub fn binding_for_export(
    &self,
    instance: &mut InstanceHandle,
    name: &str
) -> Result<ExportBinding>
[src]

Returns an appropriate binding for the name export in this module +which has also been instantiated as instance provided here.

+

Returns an error if name is not present in the module.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_interface_types/value/enum.Value.html b/api/wasmtime_interface_types/value/enum.Value.html new file mode 100644 index 000000000000..c0b416511dfa --- /dev/null +++ b/api/wasmtime_interface_types/value/enum.Value.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_interface_types/enum.Value.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_jit/all.html b/api/wasmtime_jit/all.html new file mode 100644 index 000000000000..5381a88baf7b --- /dev/null +++ b/api/wasmtime_jit/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Enums

Traits

Functions

Typedefs

Constants

\ No newline at end of file diff --git a/api/wasmtime_jit/code_memory/struct.CodeMemory.html b/api/wasmtime_jit/code_memory/struct.CodeMemory.html new file mode 100644 index 000000000000..e9ba2cfa14a0 --- /dev/null +++ b/api/wasmtime_jit/code_memory/struct.CodeMemory.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_jit/struct.CodeMemory.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_jit/compiler/enum.CompilationStrategy.html b/api/wasmtime_jit/compiler/enum.CompilationStrategy.html new file mode 100644 index 000000000000..a56336871635 --- /dev/null +++ b/api/wasmtime_jit/compiler/enum.CompilationStrategy.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_jit/enum.CompilationStrategy.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_jit/compiler/struct.Compiler.html b/api/wasmtime_jit/compiler/struct.Compiler.html new file mode 100644 index 000000000000..2ec3ce855131 --- /dev/null +++ b/api/wasmtime_jit/compiler/struct.Compiler.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_jit/struct.Compiler.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_jit/constant.VERSION.html b/api/wasmtime_jit/constant.VERSION.html new file mode 100644 index 000000000000..d193d5cf3d82 --- /dev/null +++ b/api/wasmtime_jit/constant.VERSION.html @@ -0,0 +1,2 @@ +wasmtime_jit::VERSION - Rust

[][src]Constant wasmtime_jit::VERSION

pub const VERSION: &str = env!("CARGO_PKG_VERSION");

Version number of this crate.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/enum.CompilationStrategy.html b/api/wasmtime_jit/enum.CompilationStrategy.html new file mode 100644 index 000000000000..073409f078d0 --- /dev/null +++ b/api/wasmtime_jit/enum.CompilationStrategy.html @@ -0,0 +1,26 @@ +wasmtime_jit::CompilationStrategy - Rust

[][src]Enum wasmtime_jit::CompilationStrategy

pub enum CompilationStrategy {
+    Auto,
+    Cranelift,
+}

Select which kind of compilation to use.

+

+ Variants

+
Auto

Let Wasmtime pick the strategy.

+
Cranelift

Compile all functions with Cranelift.

+

Trait Implementations

impl Clone for CompilationStrategy[src]

impl Copy for CompilationStrategy[src]

impl Debug for CompilationStrategy[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/enum.InstantiationError.html b/api/wasmtime_jit/enum.InstantiationError.html new file mode 100644 index 000000000000..e96b60662fa3 --- /dev/null +++ b/api/wasmtime_jit/enum.InstantiationError.html @@ -0,0 +1,31 @@ +wasmtime_jit::InstantiationError - Rust

[][src]Enum wasmtime_jit::InstantiationError

pub enum InstantiationError {
+    Resource(String),
+    Link(LinkError),
+    StartTrap(Trap),
+}

An error while instantiating a module.

+

+ Variants

+
Resource(String)

Insufficient resources available for execution.

+

A wasm link error occured.

+
StartTrap(Trap)

A compilation error occured.

+

Trait Implementations

impl Debug for InstantiationError[src]

impl Display for InstantiationError[src]

impl Error for InstantiationError[src]

impl From<InstantiationError> for SetupError[src]

impl From<LinkError> for InstantiationError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/enum.SetupError.html b/api/wasmtime_jit/enum.SetupError.html new file mode 100644 index 000000000000..c79f82bd79f9 --- /dev/null +++ b/api/wasmtime_jit/enum.SetupError.html @@ -0,0 +1,36 @@ +wasmtime_jit::SetupError - Rust

[][src]Enum wasmtime_jit::SetupError

pub enum SetupError {
+    Validate(String),
+    Compile(CompileError),
+    Instantiate(InstantiationError),
+    DebugInfo(Error),
+}

An error condition while setting up a wasm instance, be it validation, +compilation, or instantiation.

+

+ Variants

+
Validate(String)

The module did not pass validation.

+
Compile(CompileError)

A wasm translation error occured.

+
Instantiate(InstantiationError)

Some runtime resource was unavailable or insufficient, or the start function +trapped.

+
DebugInfo(Error)

Debug information generation error occured.

+

Trait Implementations

impl Debug for SetupError[src]

impl Display for SetupError[src]

impl Error for SetupError[src]

impl From<CompileError> for SetupError[src]

impl From<Error> for SetupError[src]

impl From<InstantiationError> for SetupError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/fn.instantiate.html b/api/wasmtime_jit/fn.instantiate.html new file mode 100644 index 000000000000..dfa15f27ac1d --- /dev/null +++ b/api/wasmtime_jit/fn.instantiate.html @@ -0,0 +1,6 @@ +wasmtime_jit::instantiate - Rust

[][src]Function wasmtime_jit::instantiate

pub unsafe fn instantiate(
    compiler: &mut Compiler,
    data: &[u8],
    resolver: &mut dyn Resolver,
    debug_info: bool
) -> Result<InstanceHandle, SetupError>

Create a new wasm instance by compiling the wasm module in data and instatiating it.

+

This is equivalent to createing a CompiledModule and calling instantiate() on it, +but avoids creating an intermediate copy of the data initializers.

+

Unsafety

+

See InstanceHandle::new

+
\ No newline at end of file diff --git a/api/wasmtime_jit/fn.link_module.html b/api/wasmtime_jit/fn.link_module.html new file mode 100644 index 000000000000..ce412e369ab7 --- /dev/null +++ b/api/wasmtime_jit/fn.link_module.html @@ -0,0 +1,3 @@ +wasmtime_jit::link_module - Rust

[][src]Function wasmtime_jit::link_module

pub fn link_module(
    module: &Module,
    allocated_functions: &PrimaryMap<DefinedFuncIndex, *mut [VMFunctionBody]>,
    jt_offsets: &PrimaryMap<DefinedFuncIndex, JumpTableOffsets>,
    relocations: Relocations
)

Links a module that has been compiled with compiled_module in wasmtime-environ.

+

Performs all required relocations inside the function code, provided the necessary metadata.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/fn.target_tunables.html b/api/wasmtime_jit/fn.target_tunables.html new file mode 100644 index 000000000000..f62758b6a337 --- /dev/null +++ b/api/wasmtime_jit/fn.target_tunables.html @@ -0,0 +1,2 @@ +wasmtime_jit::target_tunables - Rust

[][src]Function wasmtime_jit::target_tunables

pub fn target_tunables(triple: &Triple) -> Tunables

Return a Tunables instance tuned for the given target platform.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/index.html b/api/wasmtime_jit/index.html new file mode 100644 index 000000000000..9d79f7a86663 --- /dev/null +++ b/api/wasmtime_jit/index.html @@ -0,0 +1,22 @@ +wasmtime_jit - Rust

[][src]Crate wasmtime_jit

JIT-style runtime for WebAssembly using Cranelift.

+

Modules

+
native
trampoline

Structs

+
CodeMemory

Memory manager for executable code.

+
CompiledModule

A compiled wasm module, ready to be instantiated.

+
Compiler

A WebAssembly code JIT compiler.

+
InstanceHandle

A handle holding an Instance of a WebAssembly module.

+
NullResolver

Resolver implementation that always resolves to None.

+

Enums

+
CompilationStrategy

Select which kind of compilation to use.

+
InstantiationError

An error while instantiating a module.

+
SetupError

An error condition while setting up a wasm instance, be it validation, +compilation, or instantiation.

+

Constants

+
VERSION

Version number of this crate.

+

Traits

+
Resolver

Import resolver connects imports with available exported values.

+

Functions

+
instantiate

Create a new wasm instance by compiling the wasm module in data and instatiating it.

+
link_module

Links a module that has been compiled with compiled_module in wasmtime-environ.

+
target_tunables

Return a Tunables instance tuned for the given target platform.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/instantiate/enum.SetupError.html b/api/wasmtime_jit/instantiate/enum.SetupError.html new file mode 100644 index 000000000000..ea1e43bd56d1 --- /dev/null +++ b/api/wasmtime_jit/instantiate/enum.SetupError.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_jit/enum.SetupError.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_jit/instantiate/fn.instantiate.html b/api/wasmtime_jit/instantiate/fn.instantiate.html new file mode 100644 index 000000000000..b1cc3abbc255 --- /dev/null +++ b/api/wasmtime_jit/instantiate/fn.instantiate.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_jit/fn.instantiate.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_jit/instantiate/struct.CompiledModule.html b/api/wasmtime_jit/instantiate/struct.CompiledModule.html new file mode 100644 index 000000000000..b182e5408a1d --- /dev/null +++ b/api/wasmtime_jit/instantiate/struct.CompiledModule.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_jit/struct.CompiledModule.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_jit/link/fn.link_module.html b/api/wasmtime_jit/link/fn.link_module.html new file mode 100644 index 000000000000..955151b83785 --- /dev/null +++ b/api/wasmtime_jit/link/fn.link_module.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_jit/fn.link_module.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_jit/native/fn.builder.html b/api/wasmtime_jit/native/fn.builder.html new file mode 100644 index 000000000000..d221b9c1a10e --- /dev/null +++ b/api/wasmtime_jit/native/fn.builder.html @@ -0,0 +1 @@ +wasmtime_jit::native::builder - Rust

[][src]Function wasmtime_jit::native::builder

pub fn builder() -> Builder
\ No newline at end of file diff --git a/api/wasmtime_jit/native/fn.call_conv.html b/api/wasmtime_jit/native/fn.call_conv.html new file mode 100644 index 000000000000..e6437c7602cc --- /dev/null +++ b/api/wasmtime_jit/native/fn.call_conv.html @@ -0,0 +1 @@ +wasmtime_jit::native::call_conv - Rust

[][src]Function wasmtime_jit::native::call_conv

pub fn call_conv() -> CallConv
\ No newline at end of file diff --git a/api/wasmtime_jit/native/fn.lookup.html b/api/wasmtime_jit/native/fn.lookup.html new file mode 100644 index 000000000000..b6576c357c08 --- /dev/null +++ b/api/wasmtime_jit/native/fn.lookup.html @@ -0,0 +1,3 @@ +wasmtime_jit::native::lookup - Rust

[]Function wasmtime_jit::native::lookup

pub fn lookup(triple: Triple) -> Result<Builder, LookupError>

Look for an ISA for the given triple. +Return a builder that can create a corresponding TargetIsa.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/native/index.html b/api/wasmtime_jit/native/index.html new file mode 100644 index 000000000000..cd508a32f960 --- /dev/null +++ b/api/wasmtime_jit/native/index.html @@ -0,0 +1,4 @@ +wasmtime_jit::native - Rust

[][src]Module wasmtime_jit::native

Functions

+
builder
call_conv
lookup

Look for an ISA for the given triple. +Return a builder that can create a corresponding TargetIsa.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/native/sidebar-items.js b/api/wasmtime_jit/native/sidebar-items.js new file mode 100644 index 000000000000..42345b43a4ee --- /dev/null +++ b/api/wasmtime_jit/native/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["builder",""],["call_conv",""],["lookup","Look for an ISA for the given `triple`. Return a builder that can create a corresponding `TargetIsa`."]]}); \ No newline at end of file diff --git a/api/wasmtime_jit/resolver/struct.NullResolver.html b/api/wasmtime_jit/resolver/struct.NullResolver.html new file mode 100644 index 000000000000..f0b3fd77b20a --- /dev/null +++ b/api/wasmtime_jit/resolver/struct.NullResolver.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_jit/struct.NullResolver.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_jit/resolver/trait.Resolver.html b/api/wasmtime_jit/resolver/trait.Resolver.html new file mode 100644 index 000000000000..417f5cb20806 --- /dev/null +++ b/api/wasmtime_jit/resolver/trait.Resolver.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_jit/trait.Resolver.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_jit/sidebar-items.js b/api/wasmtime_jit/sidebar-items.js new file mode 100644 index 000000000000..f712042d2694 --- /dev/null +++ b/api/wasmtime_jit/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["VERSION","Version number of this crate."]],"enum":[["CompilationStrategy","Select which kind of compilation to use."],["InstantiationError","An error while instantiating a module."],["SetupError","An error condition while setting up a wasm instance, be it validation, compilation, or instantiation."]],"fn":[["instantiate","Create a new wasm instance by compiling the wasm module in `data` and instatiating it."],["link_module","Links a module that has been compiled with `compiled_module` in `wasmtime-environ`."],["target_tunables","Return a `Tunables` instance tuned for the given target platform."]],"mod":[["native",""],["trampoline",""]],"struct":[["CodeMemory","Memory manager for executable code."],["CompiledModule","A compiled wasm module, ready to be instantiated."],["Compiler","A WebAssembly code JIT compiler."],["InstanceHandle","A handle holding an `Instance` of a WebAssembly module."],["NullResolver","`Resolver` implementation that always resolves to `None`."]],"trait":[["Resolver","Import resolver connects imports with available exported values."]]}); \ No newline at end of file diff --git a/api/wasmtime_jit/struct.CodeMemory.html b/api/wasmtime_jit/struct.CodeMemory.html new file mode 100644 index 000000000000..04ed3ec1ca7b --- /dev/null +++ b/api/wasmtime_jit/struct.CodeMemory.html @@ -0,0 +1,19 @@ +wasmtime_jit::CodeMemory - Rust

[][src]Struct wasmtime_jit::CodeMemory

pub struct CodeMemory { /* fields omitted */ }

Memory manager for executable code.

+

Methods

impl CodeMemory[src]

pub fn new() -> Self[src]

Create a new CodeMemory instance.

+

pub fn allocate_for_function(
    &mut self,
    func: &CompiledFunction
) -> Result<&mut [VMFunctionBody], String>
[src]

Allocate a continuous memory block for a single compiled function. +TODO: Reorganize the code that calls this to emit code directly into the +mmap region rather than into a Vec that we need to copy in.

+

pub fn allocate_for_compilation(
    &mut self,
    compilation: &Compilation
) -> Result<Box<[&mut [VMFunctionBody]]>, String>
[src]

Allocate a continuous memory block for a compilation.

+

Allocates memory for both the function bodies as well as function unwind data.

+

pub fn publish(&mut self)[src]

Make all allocated memory executable.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/struct.CompiledModule.html b/api/wasmtime_jit/struct.CompiledModule.html new file mode 100644 index 000000000000..0c61f1c0e80f --- /dev/null +++ b/api/wasmtime_jit/struct.CompiledModule.html @@ -0,0 +1,23 @@ +wasmtime_jit::CompiledModule - Rust

[][src]Struct wasmtime_jit::CompiledModule

pub struct CompiledModule { /* fields omitted */ }

A compiled wasm module, ready to be instantiated.

+

Methods

impl CompiledModule[src]

pub fn new<'data>(
    compiler: &mut Compiler,
    data: &'data [u8],
    debug_info: bool
) -> Result<Self, SetupError>
[src]

Compile a data buffer into a CompiledModule, which may then be instantiated.

+

pub fn from_parts(
    module: Module,
    finished_functions: BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]>,
    data_initializers: Box<[OwnedDataInitializer]>,
    signatures: BoxedSlice<SignatureIndex, VMSharedSignatureIndex>,
    dbg_jit_registration: Option<GdbJitImageRegistration>,
    trap_registration: TrapRegistration
) -> Self
[src]

Construct a CompiledModule from component parts.

+

pub unsafe fn instantiate(
    &self,
    resolver: &mut dyn Resolver
) -> Result<InstanceHandle, InstantiationError>
[src]

Crate an Instance from this CompiledModule.

+

Note that if only one instance of this module is needed, it may be more +efficient to call the top-level instantiate, since that avoids copying +the data initializers.

+

Unsafety

+

See InstanceHandle::new

+

pub fn module(&self) -> &Arc<Module>[src]

Return a reference-counting pointer to a module.

+

pub fn module_ref(&self) -> &Module[src]

Return a reference to a module.

+

pub fn finished_functions(
    &self
) -> &BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]>
[src]

Returns the map of all finished JIT functions compiled for this module

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/struct.Compiler.html b/api/wasmtime_jit/struct.Compiler.html new file mode 100644 index 000000000000..4d77d049295c --- /dev/null +++ b/api/wasmtime_jit/struct.Compiler.html @@ -0,0 +1,22 @@ +wasmtime_jit::Compiler - Rust

[][src]Struct wasmtime_jit::Compiler

pub struct Compiler { /* fields omitted */ }

A WebAssembly code JIT compiler.

+

A Compiler instance owns the executable memory that it allocates.

+

TODO: Evolve this to support streaming rather than requiring a &[u8] +containing a whole wasm module at once.

+

TODO: Consider using cranelift-module.

+

Methods

impl Compiler[src]

pub fn new(
    isa: Box<dyn TargetIsa>,
    strategy: CompilationStrategy,
    cache_config: CacheConfig
) -> Self
[src]

Construct a new Compiler.

+

impl Compiler[src]

pub fn frontend_config(&self) -> TargetFrontendConfig[src]

Return the target's frontend configuration settings.

+

pub fn tunables(&self) -> Tunables[src]

Return the tunables in use by this engine.

+

pub fn get_published_trampoline(
    &mut self,
    signature: &Signature,
    value_size: usize
) -> Result<*const VMFunctionBody, SetupError>
[src]

Create and publish a trampoline for invoking a function.

+

pub fn signatures(&self) -> &SignatureRegistry[src]

Shared signature registry.

+

pub fn trap_registry(&self) -> &TrapRegistry[src]

Shared registration of trap information

+

Auto Trait Implementations

impl !RefUnwindSafe for Compiler

impl !Send for Compiler

impl !Sync for Compiler

impl Unpin for Compiler

impl !UnwindSafe for Compiler

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/struct.InstanceHandle.html b/api/wasmtime_jit/struct.InstanceHandle.html new file mode 100644 index 000000000000..306cbc6becfe --- /dev/null +++ b/api/wasmtime_jit/struct.InstanceHandle.html @@ -0,0 +1,65 @@ +wasmtime_jit::InstanceHandle - Rust

[][src]Struct wasmtime_jit::InstanceHandle

pub struct InstanceHandle { /* fields omitted */ }

A handle holding an Instance of a WebAssembly module.

+

Methods

impl InstanceHandle[src]

pub unsafe fn new(
    module: Arc<Module>,
    trap_registration: TrapRegistration,
    finished_functions: BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]>,
    imports: Imports,
    data_initializers: &[DataInitializer],
    vmshared_signatures: BoxedSlice<SignatureIndex, VMSharedSignatureIndex>,
    dbg_jit_registration: Option<Rc<GdbJitImageRegistration>>,
    host_state: Box<dyn Any + 'static>
) -> Result<InstanceHandle, InstantiationError>
[src]

Create a new InstanceHandle pointing at a new Instance.

+

Unsafety

+

This method is not necessarily inherently unsafe to call, but in general +the APIs of an Instance are quite unsafe and have not been really +audited for safety that much. As a result the unsafety here on this +method is a low-overhead way of saying "this is an extremely unsafe type +to work with".

+

Extreme care must be taken when working with InstanceHandle and it's +recommended to have relatively intimate knowledge of how it works +internally if you'd like to do so. If possible it's recommended to use +the wasmtime crate API rather than this type since that is vetted for +safety.

+

pub unsafe fn from_vmctx(vmctx: *mut VMContext) -> InstanceHandle[src]

Create a new InstanceHandle pointing at the instance +pointed to by the given VMContext pointer.

+

Safety

+

This is unsafe because it doesn't work on just any VMContext, it must +be a VMContext allocated as part of an Instance.

+

pub fn vmctx(&self) -> &VMContext[src]

Return a reference to the vmctx used by compiled wasm code.

+

pub fn vmctx_ptr(&self) -> *mut VMContext[src]

Return a raw pointer to the vmctx used by compiled wasm code.

+

pub fn module(&self) -> &Arc<Module>[src]

Return a reference-counting pointer to a module.

+

pub fn module_ref(&self) -> &Module[src]

Return a reference to a module.

+

pub fn lookup(&self, field: &str) -> Option<Export>[src]

Lookup an export with the given name.

+

pub fn lookup_by_declaration(&self, export: &Export) -> Export[src]

Lookup an export with the given export declaration.

+

pub fn exports(&self) -> Iter<String, Export>[src]

Return an iterator over the exports of this instance.

+

Specifically, it provides access to the key-value pairs, where the keys +are export names, and the values are export declarations which can be +resolved lookup_by_declaration.

+

pub fn host_state(&self) -> &(dyn Any + 'static)[src]

Return a reference to the custom state attached to this instance.

+

pub fn memory_index(&self, memory: &VMMemoryDefinition) -> DefinedMemoryIndex[src]

Return the memory index for the given VMMemoryDefinition in this instance.

+

pub fn memory_grow(
    &self,
    memory_index: DefinedMemoryIndex,
    delta: u32
) -> Option<u32>
[src]

Grow memory in this instance by the specified amount of pages.

+

Returns None if memory can't be grown by the specified amount +of pages.

+

pub fn table_index(&self, table: &VMTableDefinition) -> DefinedTableIndex[src]

Return the table index for the given VMTableDefinition in this instance.

+

pub fn table_grow(
    &self,
    table_index: DefinedTableIndex,
    delta: u32
) -> Option<u32>
[src]

Grow table in this instance by the specified amount of pages.

+

Returns None if memory can't be grown by the specified amount +of pages.

+

pub fn table_get(
    &self,
    table_index: DefinedTableIndex,
    index: u32
) -> Option<VMCallerCheckedAnyfunc>
[src]

Get table element reference.

+

Returns None if index is out of bounds.

+

pub fn table_set(
    &self,
    table_index: DefinedTableIndex,
    index: u32,
    val: VMCallerCheckedAnyfunc
) -> Result<(), ()>
[src]

Set table element reference.

+

Returns an error if the index is out of bounds

+

impl InstanceHandle[src]

pub fn set_signal_handler<H>(&mut self, handler: H) where
    H: 'static + Fn(i32, *const siginfo_t, *const c_void) -> bool
[src]

Set a custom signal handler

+

Trait Implementations

impl Clone for InstanceHandle[src]

impl Drop for InstanceHandle[src]

impl Eq for InstanceHandle[src]

impl Hash for InstanceHandle[src]

impl PartialEq<InstanceHandle> for InstanceHandle[src]

impl StructuralEq for InstanceHandle[src]

impl StructuralPartialEq for InstanceHandle[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/struct.NullResolver.html b/api/wasmtime_jit/struct.NullResolver.html new file mode 100644 index 000000000000..df267a324a1e --- /dev/null +++ b/api/wasmtime_jit/struct.NullResolver.html @@ -0,0 +1,13 @@ +wasmtime_jit::NullResolver - Rust

[][src]Struct wasmtime_jit::NullResolver

pub struct NullResolver {}

Resolver implementation that always resolves to None.

+

Trait Implementations

impl Resolver for NullResolver[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/target_tunables/fn.target_tunables.html b/api/wasmtime_jit/target_tunables/fn.target_tunables.html new file mode 100644 index 000000000000..f171fd6632ca --- /dev/null +++ b/api/wasmtime_jit/target_tunables/fn.target_tunables.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_jit/fn.target_tunables.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_jit/trait.Resolver.html b/api/wasmtime_jit/trait.Resolver.html new file mode 100644 index 000000000000..59468fcd00cd --- /dev/null +++ b/api/wasmtime_jit/trait.Resolver.html @@ -0,0 +1,12 @@ +wasmtime_jit::Resolver - Rust

[][src]Trait wasmtime_jit::Resolver

pub trait Resolver {
+    fn resolve(
        &mut self,
        index: u32,
        module: &str,
        field: &str
    ) -> Option<Export>; +}

Import resolver connects imports with available exported values.

+
+

Required methods

fn resolve(&mut self, index: u32, module: &str, field: &str) -> Option<Export>

Resolves an import a WebAssembly module to an export it's hooked up to.

+

The index provided is the index of the import in the wasm module +that's being resolved. For example 1 means that it's the second import +listed in the wasm module.

+

The module and field arguments provided are the module/field names +listed on the import itself.

+
Loading content... +

Implementors

impl Resolver for NullResolver[src]

Loading content...
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/binemit/index.html b/api/wasmtime_jit/trampoline/binemit/index.html new file mode 100644 index 000000000000..7ddfa53345de --- /dev/null +++ b/api/wasmtime_jit/trampoline/binemit/index.html @@ -0,0 +1,11 @@ +wasmtime_jit::trampoline::binemit - Rust

[][src]Module wasmtime_jit::trampoline::binemit

Structs

+
NullStackmapSink

Placeholder StackmapSink that does nothing.

+
NullTrapSink

A TrapSink implementation that does nothing, which is convenient when +compiling code that does not rely on trapping semantics.

+
TrampolineRelocSink

We don't expect trampoline compilation to produce any relocations, so +this RelocSink just asserts that it doesn't recieve any.

+

Traits

+
TrapSink

A trait for receiving trap codes and offsets.

+

Type Definitions

+
CodeOffset

Offset in bytes from the beginning of the function.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/binemit/sidebar-items.js b/api/wasmtime_jit/trampoline/binemit/sidebar-items.js new file mode 100644 index 000000000000..f98266597cfe --- /dev/null +++ b/api/wasmtime_jit/trampoline/binemit/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"struct":[["NullStackmapSink","Placeholder StackmapSink that does nothing."],["NullTrapSink","A `TrapSink` implementation that does nothing, which is convenient when compiling code that does not rely on trapping semantics."],["TrampolineRelocSink","We don't expect trampoline compilation to produce any relocations, so this `RelocSink` just asserts that it doesn't recieve any."]],"trait":[["TrapSink","A trait for receiving trap codes and offsets."]],"type":[["CodeOffset","Offset in bytes from the beginning of the function."]]}); \ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/binemit/struct.NullStackmapSink.html b/api/wasmtime_jit/trampoline/binemit/struct.NullStackmapSink.html new file mode 100644 index 000000000000..d4b14186fc32 --- /dev/null +++ b/api/wasmtime_jit/trampoline/binemit/struct.NullStackmapSink.html @@ -0,0 +1,13 @@ +wasmtime_jit::trampoline::binemit::NullStackmapSink - Rust

[]Struct wasmtime_jit::trampoline::binemit::NullStackmapSink

pub struct NullStackmapSink {}

Placeholder StackmapSink that does nothing.

+

Trait Implementations

impl StackmapSink for NullStackmapSink

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/binemit/struct.NullTrapSink.html b/api/wasmtime_jit/trampoline/binemit/struct.NullTrapSink.html new file mode 100644 index 000000000000..495591b2b73f --- /dev/null +++ b/api/wasmtime_jit/trampoline/binemit/struct.NullTrapSink.html @@ -0,0 +1,14 @@ +wasmtime_jit::trampoline::binemit::NullTrapSink - Rust

[]Struct wasmtime_jit::trampoline::binemit::NullTrapSink

pub struct NullTrapSink {}

A TrapSink implementation that does nothing, which is convenient when +compiling code that does not rely on trapping semantics.

+

Trait Implementations

impl TrapSink for NullTrapSink

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/binemit/struct.TrampolineRelocSink.html b/api/wasmtime_jit/trampoline/binemit/struct.TrampolineRelocSink.html new file mode 100644 index 000000000000..de84231a2429 --- /dev/null +++ b/api/wasmtime_jit/trampoline/binemit/struct.TrampolineRelocSink.html @@ -0,0 +1,17 @@ +wasmtime_jit::trampoline::binemit::TrampolineRelocSink - Rust

[][src]Struct wasmtime_jit::trampoline::binemit::TrampolineRelocSink

pub struct TrampolineRelocSink {}

We don't expect trampoline compilation to produce any relocations, so +this RelocSink just asserts that it doesn't recieve any.

+

Trait Implementations

impl RelocSink for TrampolineRelocSink[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/binemit/trait.TrapSink.html b/api/wasmtime_jit/trampoline/binemit/trait.TrapSink.html new file mode 100644 index 000000000000..0a93b3c951c1 --- /dev/null +++ b/api/wasmtime_jit/trampoline/binemit/trait.TrapSink.html @@ -0,0 +1,9 @@ +wasmtime_jit::trampoline::binemit::TrapSink - Rust

[]Trait wasmtime_jit::trampoline::binemit::TrapSink

pub trait TrapSink {
+    fn trap(&mut self, u32, SourceLoc, TrapCode);
+}

A trait for receiving trap codes and offsets.

+

If you don't need information about possible traps, you can use the +NullTrapSink implementation.

+
+

Required methods

fn trap(&mut self, u32, SourceLoc, TrapCode)

Add trap information for a specific offset.

+
Loading content... +

Implementors

impl TrapSink for NullTrapSink

Loading content...
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/binemit/type.CodeOffset.html b/api/wasmtime_jit/trampoline/binemit/type.CodeOffset.html new file mode 100644 index 000000000000..e53c4392d847 --- /dev/null +++ b/api/wasmtime_jit/trampoline/binemit/type.CodeOffset.html @@ -0,0 +1,4 @@ +wasmtime_jit::trampoline::binemit::CodeOffset - Rust

[]Type Definition wasmtime_jit::trampoline::binemit::CodeOffset

type CodeOffset = u32;

Offset in bytes from the beginning of the function.

+

Cranelift can be used as a cross compiler, so we don't want to use a type like usize which +depends on the host platform, not the target platform.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/fn.pretty_error.html b/api/wasmtime_jit/trampoline/fn.pretty_error.html new file mode 100644 index 000000000000..cfa533de20fa --- /dev/null +++ b/api/wasmtime_jit/trampoline/fn.pretty_error.html @@ -0,0 +1,2 @@ +wasmtime_jit::trampoline::pretty_error - Rust

[]Function wasmtime_jit::trampoline::pretty_error

pub fn pretty_error(
    func: &Function,
    isa: Option<&dyn TargetIsa>,
    err: CodegenError
) -> String

Pretty-print a Cranelift error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/index.html b/api/wasmtime_jit/trampoline/index.html new file mode 100644 index 000000000000..fede4fc6fd28 --- /dev/null +++ b/api/wasmtime_jit/trampoline/index.html @@ -0,0 +1,8 @@ +wasmtime_jit::trampoline - Rust

[][src]Module wasmtime_jit::trampoline

Modules

+
binemit
ir

Structs

+
Context

Persistent data structures and compilation pipeline.

+
FunctionBuilder

Temporary object used to build a single Cranelift IR Function.

+
FunctionBuilderContext

Structure used for translating a series of functions into Cranelift IR.

+

Functions

+
pretty_error

Pretty-print a Cranelift error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/ir/enum.ExternalName.html b/api/wasmtime_jit/trampoline/ir/enum.ExternalName.html new file mode 100644 index 000000000000..341aecff1737 --- /dev/null +++ b/api/wasmtime_jit/trampoline/ir/enum.ExternalName.html @@ -0,0 +1,69 @@ +wasmtime_jit::trampoline::ir::ExternalName - Rust

[]Enum wasmtime_jit::trampoline::ir::ExternalName

pub enum ExternalName {
+    User {
+        namespace: u32,
+        index: u32,
+    },
+    TestCase {
+        length: u8,
+        ascii: [u8; 16],
+    },
+    LibCall(LibCall),
+}

The name of an external is either a reference to a user-defined symbol +table, or a short sequence of ascii bytes so that test cases do not have +to keep track of a symbol table.

+

External names are primarily used as keys by code using Cranelift to map +from a cranelift_codegen::ir::FuncRef or similar to additional associated +data.

+

External names can also serve as a primitive testing and debugging tool. +In particular, many .clif test files use function names to identify +functions.

+

+ Variants

+
User

A name in a user-defined symbol table. Cranelift does not interpret +these numbers in any way.

+

Fields of User

namespace: u32

Arbitrary.

+
index: u32

Arbitrary.

+
TestCase

A test case function name of up to a hardcoded amount of ascii +characters. This is not intended to be used outside test cases.

+

Fields of TestCase

length: u8

How many of the bytes in ascii are valid?

+
ascii: [u8; 16]

Ascii bytes of the name.

+
LibCall(LibCall)

A well-known runtime library function.

+

Methods

impl ExternalName

pub fn testcase<T>(v: T) -> ExternalName where
    T: AsRef<[u8]>, 

Creates a new external name from a sequence of bytes. Caller is expected +to guarantee bytes are only ascii alphanumeric or _.

+

Examples

+
+// Create `ExternalName` from a string.
+let name = ExternalName::testcase("hello");
+assert_eq!(name.to_string(), "%hello");
+

pub fn user(namespace: u32, index: u32) -> ExternalName

Create a new external name from user-provided integer indices.

+

Examples

+
+// Create `ExternalName` from integer indices
+let name = ExternalName::user(123, 456);
+assert_eq!(name.to_string(), "u123:456");
+

Trait Implementations

impl Clone for ExternalName

impl Debug for ExternalName

impl Default for ExternalName

impl Display for ExternalName

impl Eq for ExternalName

impl FromStr for ExternalName

type Err = ()

The associated error which can be returned from parsing.

+

impl PartialEq<ExternalName> for ExternalName

impl StructuralEq for ExternalName

impl StructuralPartialEq for ExternalName

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/ir/enum.StackSlotKind.html b/api/wasmtime_jit/trampoline/ir/enum.StackSlotKind.html new file mode 100644 index 000000000000..d80e18a819e5 --- /dev/null +++ b/api/wasmtime_jit/trampoline/ir/enum.StackSlotKind.html @@ -0,0 +1,58 @@ +wasmtime_jit::trampoline::ir::StackSlotKind - Rust

[]Enum wasmtime_jit::trampoline::ir::StackSlotKind

pub enum StackSlotKind {
+    SpillSlot,
+    ExplicitSlot,
+    IncomingArg,
+    OutgoingArg,
+    StructReturnSlot,
+    EmergencySlot,
+}

The kind of a stack slot.

+

+ Variants

+
SpillSlot

A spill slot. This is a stack slot created by the register allocator.

+
ExplicitSlot

An explicit stack slot. This is a chunk of stack memory for use by the stack_load +and stack_store instructions.

+
IncomingArg

An incoming function argument.

+

If the current function has more arguments than fits in registers, the remaining arguments +are passed on the stack by the caller. These incoming arguments are represented as SSA +values assigned to incoming stack slots.

+
OutgoingArg

An outgoing function argument.

+

When preparing to call a function whose arguments don't fit in registers, outgoing argument +stack slots are used to represent individual arguments in the outgoing call frame. These +stack slots are only valid while setting up a call.

+
StructReturnSlot

Space allocated in the caller's frame for the callee's return values +that are passed out via return pointer.

+

If there are more return values than registers available for the callee's calling +convention, or the return value is larger than the available registers' space, then we +allocate stack space in this frame and pass a pointer to the callee, which then writes its +return values into this space.

+
EmergencySlot

An emergency spill slot.

+

Emergency slots are allocated late when the register's constraint solver needs extra space +to shuffle registers around. They are only used briefly, and can be reused.

+

Trait Implementations

impl Clone for StackSlotKind

impl Copy for StackSlotKind

impl Debug for StackSlotKind

impl<'de> Deserialize<'de> for StackSlotKind

impl Display for StackSlotKind

impl Eq for StackSlotKind

impl FromStr for StackSlotKind

type Err = ()

The associated error which can be returned from parsing.

+

impl PartialEq<StackSlotKind> for StackSlotKind

impl Serialize for StackSlotKind

impl StructuralEq for StackSlotKind

impl StructuralPartialEq for StackSlotKind

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/ir/index.html b/api/wasmtime_jit/trampoline/ir/index.html new file mode 100644 index 000000000000..2110383f4bc5 --- /dev/null +++ b/api/wasmtime_jit/trampoline/ir/index.html @@ -0,0 +1,12 @@ +wasmtime_jit::trampoline::ir - Rust

[][src]Module wasmtime_jit::trampoline::ir

Structs

+
Function

A function.

+
MemFlags

Flags for memory operations like load/store.

+
StackSlotData

Contents of a stack slot.

+

Enums

+
ExternalName

The name of an external is either a reference to a user-defined symbol +table, or a short sequence of ascii bytes so that test cases do not have +to keep track of a symbol table.

+
StackSlotKind

The kind of a stack slot.

+

Traits

+
InstBuilder

Convenience methods for building instructions.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/ir/sidebar-items.js b/api/wasmtime_jit/trampoline/ir/sidebar-items.js new file mode 100644 index 000000000000..8bca51a9068a --- /dev/null +++ b/api/wasmtime_jit/trampoline/ir/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["ExternalName","The name of an external is either a reference to a user-defined symbol table, or a short sequence of ascii bytes so that test cases do not have to keep track of a symbol table."],["StackSlotKind","The kind of a stack slot."]],"struct":[["Function","A function."],["MemFlags","Flags for memory operations like load/store."],["StackSlotData","Contents of a stack slot."]],"trait":[["InstBuilder","Convenience methods for building instructions."]]}); \ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/ir/struct.Function.html b/api/wasmtime_jit/trampoline/ir/struct.Function.html new file mode 100644 index 000000000000..20b84a015a10 --- /dev/null +++ b/api/wasmtime_jit/trampoline/ir/struct.Function.html @@ -0,0 +1,107 @@ +wasmtime_jit::trampoline::ir::Function - Rust

[]Struct wasmtime_jit::trampoline::ir::Function

pub struct Function {
+    pub name: ExternalName,
+    pub signature: Signature,
+    pub old_signature: Option<Signature>,
+    pub stack_slots: StackSlots,
+    pub global_values: PrimaryMap<GlobalValue, GlobalValueData>,
+    pub heaps: PrimaryMap<Heap, HeapData>,
+    pub tables: PrimaryMap<Table, TableData>,
+    pub jump_tables: PrimaryMap<JumpTable, JumpTableData>,
+    pub dfg: DataFlowGraph,
+    pub layout: Layout,
+    pub encodings: SecondaryMap<Inst, Encoding>,
+    pub locations: SecondaryMap<Value, ValueLoc>,
+    pub entry_diversions: EntryRegDiversions,
+    pub offsets: SecondaryMap<Block, u32>,
+    pub jt_offsets: SecondaryMap<JumpTable, u32>,
+    pub srclocs: SecondaryMap<Inst, SourceLoc>,
+    pub prologue_end: Option<Inst>,
+    pub frame_layout: Option<FrameLayout>,
+}

A function.

+

Functions can be cloned, but it is not a very fast operation. +The clone will have all the same entity numbers as the original.

+

+ Fields

name: ExternalName

Name of this function. Mostly used by .clif files.

+
signature: Signature

Signature of this function.

+
old_signature: Option<Signature>

The old signature of this function, before the most recent legalization, +if any.

+
stack_slots: StackSlots

Stack slots allocated in this function.

+
global_values: PrimaryMap<GlobalValue, GlobalValueData>

Global values referenced.

+
heaps: PrimaryMap<Heap, HeapData>

Heaps referenced.

+
tables: PrimaryMap<Table, TableData>

Tables referenced.

+
jump_tables: PrimaryMap<JumpTable, JumpTableData>

Jump tables used in this function.

+
dfg: DataFlowGraph

Data flow graph containing the primary definition of all instructions, blocks and values.

+
layout: Layout

Layout of blocks and instructions in the function body.

+
encodings: SecondaryMap<Inst, Encoding>

Encoding recipe and bits for the legal instructions. +Illegal instructions have the Encoding::default() value.

+
locations: SecondaryMap<Value, ValueLoc>

Location assigned to every value.

+
entry_diversions: EntryRegDiversions

Non-default locations assigned to value at the entry of basic blocks.

+

At the entry of each basic block, we might have values which are not in their default +ValueLocation. This field records these register-to-register moves as Diversions.

+
offsets: SecondaryMap<Block, u32>

Code offsets of the block headers.

+

This information is only transiently available after the binemit::relax_branches function +computes it, and it can easily be recomputed by calling that function. It is not included +in the textual IR format.

+
jt_offsets: SecondaryMap<JumpTable, u32>

Code offsets of Jump Table headers.

+
srclocs: SecondaryMap<Inst, SourceLoc>

Source locations.

+

Track the original source location for each instruction. The source locations are not +interpreted by Cranelift, only preserved.

+
prologue_end: Option<Inst>

Instruction that marks the end (inclusive) of the function's prologue.

+

This is used for some calling conventions to track the end of unwind information.

+
frame_layout: Option<FrameLayout>

Frame layout for the instructions.

+

The stack unwinding requires to have information about which registers and where they +are saved in the frame. This information is created during the prologue and epilogue +passes.

+

Methods

impl Function

pub fn with_name_signature(name: ExternalName, sig: Signature) -> Function

Create a function with the given name and signature.

+

pub fn clear(&mut self)

Clear all data structures in this function.

+

pub fn new() -> Function

Create a new empty, anonymous function with a Fast calling convention.

+

pub fn create_jump_table(&mut self, data: JumpTableData) -> JumpTable

Creates a jump table in the function, to be used by br_table instructions.

+

pub fn create_stack_slot(&mut self, data: StackSlotData) -> StackSlot

Creates a stack slot in the function, to be used by stack_load, stack_store and +stack_addr instructions.

+

pub fn import_signature(&mut self, signature: Signature) -> SigRef

Adds a signature which can later be used to declare an external function import.

+

pub fn import_function(&mut self, data: ExtFuncData) -> FuncRef

Declare an external function import.

+

pub fn create_global_value(&mut self, data: GlobalValueData) -> GlobalValue

Declares a global value accessible to the function.

+

pub fn create_heap(&mut self, data: HeapData) -> Heap

Declares a heap accessible to the function.

+

pub fn create_table(&mut self, data: TableData) -> Table

Declares a table accessible to the function.

+

pub fn display<'a, I>(&'a self, isa: I) -> DisplayFunction<'a> where
    I: Into<Option<&'a (dyn TargetIsa + 'a)>>, 

Return an object that can display this function with correct ISA-specific annotations.

+

pub fn display_with(
    &'a self,
    annotations: DisplayFunctionAnnotations<'a>
) -> DisplayFunction<'a>

Return an object that can display this function with correct ISA-specific annotations.

+

pub fn special_param(&self, purpose: ArgumentPurpose) -> Option<Value>

Find a presumed unique special-purpose function parameter value.

+

Returns the value of the last purpose parameter, or None if no such parameter exists.

+

pub fn inst_offsets(
    &'a self,
    block: Block,
    encinfo: &EncInfo
) -> InstOffsetIter<'a>

Get an iterator over the instructions in block, including offsets and encoded instruction +sizes.

+

The iterator returns (offset, inst, size) tuples, where offset if the offset in bytes +from the beginning of the function to the instruction, and size is the size of the +instruction in bytes, or 0 for unencoded instructions.

+

This function can only be used after the code layout has been computed by the +binemit::relax_branches() function.

+

pub fn update_encoding(
    &mut self,
    inst: Inst,
    isa: &dyn TargetIsa
) -> Result<(), fn(Inst, &mut Function, &mut ControlFlowGraph, &dyn TargetIsa) -> bool>

Wrapper around encode which assigns inst the resulting encoding.

+

pub fn encode(
    &self,
    inst: Inst,
    isa: &dyn TargetIsa
) -> Result<Encoding, fn(Inst, &mut Function, &mut ControlFlowGraph, &dyn TargetIsa) -> bool>

Wrapper around TargetIsa::encode for encoding an existing instruction +in the Function.

+

pub fn collect_debug_info(&mut self)

Starts collection of debug information.

+

pub fn collect_frame_layout_info(&mut self)

Starts collection of frame layout information.

+

pub fn change_branch_destination(&mut self, inst: Inst, new_dest: Block)

Changes the destination of a jump or branch instruction. +Does nothing if called with a non-jump or non-branch instruction.

+

pub fn is_block_basic(&self, block: Block) -> Result<(), (Inst, &'static str)>

Checks that the specified block can be encoded as a basic block.

+

On error, returns the first invalid instruction and an error message.

+

pub fn is_leaf(&self) -> bool

Returns true if the function is function that doesn't call any other functions. This is not +to be confused with a "leaf function" in Windows terminology.

+

Trait Implementations

impl Clone for Function

impl Debug for Function

impl Display for Function

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/ir/struct.MemFlags.html b/api/wasmtime_jit/trampoline/ir/struct.MemFlags.html new file mode 100644 index 000000000000..41621f63a55b --- /dev/null +++ b/api/wasmtime_jit/trampoline/ir/struct.MemFlags.html @@ -0,0 +1,52 @@ +wasmtime_jit::trampoline::ir::MemFlags - Rust

[]Struct wasmtime_jit::trampoline::ir::MemFlags

pub struct MemFlags { /* fields omitted */ }

Flags for memory operations like load/store.

+

Each of these flags introduce a limited form of undefined behavior. The flags each enable +certain optimizations that need to make additional assumptions. Generally, the semantics of a +program does not change when a flag is removed, but adding a flag will.

+

Methods

impl MemFlags

pub fn new() -> MemFlags

Create a new empty set of flags.

+

pub fn trusted() -> MemFlags

Create a set of flags representing an access from a "trusted" address, meaning it's +known to be aligned and non-trapping.

+

pub fn set_by_name(&mut self, name: &str) -> bool

Set a flag bit by name.

+

Returns true if the flag was found and set, false for an unknown flag name.

+

pub fn notrap(self) -> bool

Test if the notrap flag is set.

+

Normally, trapping is part of the semantics of a load/store operation. If the platform +would cause a trap when accessing the effective address, the Cranelift memory operation is +also required to trap.

+

The notrap flag tells Cranelift that the memory is accessible, which means that +accesses will not trap. This makes it possible to delete an unused load or a dead store +instruction.

+

pub fn set_notrap(&mut self)

Set the notrap flag.

+

pub fn aligned(self) -> bool

Test if the aligned flag is set.

+

By default, Cranelift memory instructions work with any unaligned effective address. If the +aligned flag is set, the instruction is permitted to trap or return a wrong result if the +effective address is misaligned.

+

pub fn set_aligned(&mut self)

Set the aligned flag.

+

pub fn readonly(self) -> bool

Test if the readonly flag is set.

+

Loads with this flag have no memory dependencies. +This results in undefined behavior if the dereferenced memory is mutated at any time +between when the function is called and when it is exited.

+

pub fn set_readonly(&mut self)

Set the readonly flag.

+

Trait Implementations

impl Clone for MemFlags

impl Copy for MemFlags

impl Debug for MemFlags

impl Display for MemFlags

impl Eq for MemFlags

impl Hash for MemFlags

impl PartialEq<MemFlags> for MemFlags

impl StructuralEq for MemFlags

impl StructuralPartialEq for MemFlags

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/ir/struct.StackSlotData.html b/api/wasmtime_jit/trampoline/ir/struct.StackSlotData.html new file mode 100644 index 000000000000..db769560c700 --- /dev/null +++ b/api/wasmtime_jit/trampoline/ir/struct.StackSlotData.html @@ -0,0 +1,40 @@ +wasmtime_jit::trampoline::ir::StackSlotData - Rust

[]Struct wasmtime_jit::trampoline::ir::StackSlotData

pub struct StackSlotData {
+    pub kind: StackSlotKind,
+    pub size: u32,
+    pub offset: Option<i32>,
+}

Contents of a stack slot.

+

+ Fields

kind: StackSlotKind

The kind of stack slot.

+
size: u32

Size of stack slot in bytes.

+
offset: Option<i32>

Offset of stack slot relative to the stack pointer in the caller.

+

On x86, the base address is the stack pointer before the return address was pushed. On +RISC ISAs, the base address is the value of the stack pointer on entry to the function.

+

For OutgoingArg stack slots, the offset is relative to the current function's stack +pointer immediately before the call.

+

Methods

impl StackSlotData

pub fn new(kind: StackSlotKind, size: u32) -> StackSlotData

Create a stack slot with the specified byte size.

+

pub fn alignment(&self, max_align: u32) -> u32

Get the alignment in bytes of this stack slot given the stack pointer alignment.

+

Trait Implementations

impl Clone for StackSlotData

impl Debug for StackSlotData

impl<'de> Deserialize<'de> for StackSlotData

impl Display for StackSlotData

impl Eq for StackSlotData

impl PartialEq<StackSlotData> for StackSlotData

impl Serialize for StackSlotData

impl StructuralEq for StackSlotData

impl StructuralPartialEq for StackSlotData

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/ir/trait.InstBuilder.html b/api/wasmtime_jit/trampoline/ir/trait.InstBuilder.html new file mode 100644 index 000000000000..e165709430c4 --- /dev/null +++ b/api/wasmtime_jit/trampoline/ir/trait.InstBuilder.html @@ -0,0 +1,3114 @@ +wasmtime_jit::trampoline::ir::InstBuilder - Rust

[]Trait wasmtime_jit::trampoline::ir::InstBuilder

pub trait InstBuilder<'f>: InstBuilderBase<'f> {
+    fn jump(self, block: Block, args: &[Value]) -> Inst { ... }
+
fn fallthrough(self, block: Block, args: &[Value]) -> Inst { ... } +
fn brz(self, c: Value, block: Block, args: &[Value]) -> Inst { ... } +
fn brnz(self, c: Value, block: Block, args: &[Value]) -> Inst { ... } +
fn br_icmp<T1>(
        self,
        Cond: T1,
        x: Value,
        y: Value,
        block: Block,
        args: &[Value]
    ) -> Inst
    where
        T1: Into<IntCC>
, + { ... } +
fn brif<T1>(self, Cond: T1, f: Value, block: Block, args: &[Value]) -> Inst
    where
        T1: Into<IntCC>
, + { ... } +
fn brff<T1>(self, Cond: T1, f: Value, block: Block, args: &[Value]) -> Inst
    where
        T1: Into<FloatCC>
, + { ... } +
fn br_table(self, x: Value, block: Block, JT: JumpTable) -> Inst { ... } +
fn jump_table_entry<T1>(
        self,
        x: Value,
        addr: Value,
        Size: T1,
        JT: JumpTable
    ) -> Value
    where
        T1: Into<u8>
, + { ... } +
fn jump_table_base(self, iAddr: Type, JT: JumpTable) -> Value { ... } +
fn indirect_jump_table_br(self, addr: Value, JT: JumpTable) -> Inst { ... } +
fn debugtrap(self) -> Inst { ... } +
fn trap<T1>(self, code: T1) -> Inst
    where
        T1: Into<TrapCode>
, + { ... } +
fn trapz<T1>(self, c: Value, code: T1) -> Inst
    where
        T1: Into<TrapCode>
, + { ... } +
fn resumable_trap<T1>(self, code: T1) -> Inst
    where
        T1: Into<TrapCode>
, + { ... } +
fn trapnz<T1>(self, c: Value, code: T1) -> Inst
    where
        T1: Into<TrapCode>
, + { ... } +
fn trapif<T1, T2>(self, Cond: T1, f: Value, code: T2) -> Inst
    where
        T1: Into<IntCC>,
        T2: Into<TrapCode>
, + { ... } +
fn trapff<T1, T2>(self, Cond: T1, f: Value, code: T2) -> Inst
    where
        T1: Into<FloatCC>,
        T2: Into<TrapCode>
, + { ... } +
fn return_(self, rvals: &[Value]) -> Inst { ... } +
fn fallthrough_return(self, rvals: &[Value]) -> Inst { ... } +
fn call(self, FN: FuncRef, args: &[Value]) -> Inst { ... } +
fn call_indirect(self, SIG: SigRef, callee: Value, args: &[Value]) -> Inst { ... } +
fn func_addr(self, iAddr: Type, FN: FuncRef) -> Value { ... } +
fn load<T1, T2>(
        self,
        Mem: Type,
        MemFlags: T1,
        p: Value,
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn load_complex<T1, T2>(
        self,
        Mem: Type,
        MemFlags: T1,
        args: &[Value],
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn store<T1, T2>(self, MemFlags: T1, x: Value, p: Value, Offset: T2) -> Inst
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn store_complex<T1, T2>(
        self,
        MemFlags: T1,
        x: Value,
        args: &[Value],
        Offset: T2
    ) -> Inst
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn uload8<T1, T2>(
        self,
        iExt8: Type,
        MemFlags: T1,
        p: Value,
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn uload8_complex<T1, T2>(
        self,
        iExt8: Type,
        MemFlags: T1,
        args: &[Value],
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn sload8<T1, T2>(
        self,
        iExt8: Type,
        MemFlags: T1,
        p: Value,
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn sload8_complex<T1, T2>(
        self,
        iExt8: Type,
        MemFlags: T1,
        args: &[Value],
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn istore8<T1, T2>(
        self,
        MemFlags: T1,
        x: Value,
        p: Value,
        Offset: T2
    ) -> Inst
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn istore8_complex<T1, T2>(
        self,
        MemFlags: T1,
        x: Value,
        args: &[Value],
        Offset: T2
    ) -> Inst
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn uload16<T1, T2>(
        self,
        iExt16: Type,
        MemFlags: T1,
        p: Value,
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn uload16_complex<T1, T2>(
        self,
        iExt16: Type,
        MemFlags: T1,
        args: &[Value],
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn sload16<T1, T2>(
        self,
        iExt16: Type,
        MemFlags: T1,
        p: Value,
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn sload16_complex<T1, T2>(
        self,
        iExt16: Type,
        MemFlags: T1,
        args: &[Value],
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn istore16<T1, T2>(
        self,
        MemFlags: T1,
        x: Value,
        p: Value,
        Offset: T2
    ) -> Inst
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn istore16_complex<T1, T2>(
        self,
        MemFlags: T1,
        x: Value,
        args: &[Value],
        Offset: T2
    ) -> Inst
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn uload32<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn uload32_complex<T1, T2>(
        self,
        MemFlags: T1,
        args: &[Value],
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn sload32<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn sload32_complex<T1, T2>(
        self,
        MemFlags: T1,
        args: &[Value],
        Offset: T2
    ) -> Value
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn istore32<T1, T2>(
        self,
        MemFlags: T1,
        x: Value,
        p: Value,
        Offset: T2
    ) -> Inst
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn istore32_complex<T1, T2>(
        self,
        MemFlags: T1,
        x: Value,
        args: &[Value],
        Offset: T2
    ) -> Inst
    where
        T1: Into<MemFlags>,
        T2: Into<Offset32>
, + { ... } +
fn stack_load<T1>(self, Mem: Type, SS: StackSlot, Offset: T1) -> Value
    where
        T1: Into<Offset32>
, + { ... } +
fn stack_store<T1>(self, x: Value, SS: StackSlot, Offset: T1) -> Inst
    where
        T1: Into<Offset32>
, + { ... } +
fn stack_addr<T1>(self, iAddr: Type, SS: StackSlot, Offset: T1) -> Value
    where
        T1: Into<Offset32>
, + { ... } +
fn global_value(self, Mem: Type, GV: GlobalValue) -> Value { ... } +
fn symbol_value(self, Mem: Type, GV: GlobalValue) -> Value { ... } +
fn heap_addr<T1>(self, iAddr: Type, H: Heap, p: Value, Size: T1) -> Value
    where
        T1: Into<Uimm32>
, + { ... } +
fn get_pinned_reg(self, iAddr: Type) -> Value { ... } +
fn set_pinned_reg(self, addr: Value) -> Inst { ... } +
fn table_addr<T1>(
        self,
        iAddr: Type,
        T: Table,
        p: Value,
        Offset: T1
    ) -> Value
    where
        T1: Into<Offset32>
, + { ... } +
fn iconst<T1>(self, Int: Type, N: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn f32const<T1>(self, N: T1) -> Value
    where
        T1: Into<Ieee32>
, + { ... } +
fn f64const<T1>(self, N: T1) -> Value
    where
        T1: Into<Ieee64>
, + { ... } +
fn bconst<T1>(self, Bool: Type, N: T1) -> Value
    where
        T1: Into<bool>
, + { ... } +
fn vconst<T1>(self, TxN: Type, N: T1) -> Value
    where
        T1: Into<Constant>
, + { ... } +
fn shuffle<T1>(self, a: Value, b: Value, mask: T1) -> Value
    where
        T1: Into<Immediate>
, + { ... } +
fn null(self, Ref: Type) -> Value { ... } +
fn nop(self) -> Inst { ... } +
fn select(self, c: Value, x: Value, y: Value) -> Value { ... } +
fn selectif<T1>(
        self,
        Any: Type,
        cc: T1,
        flags: Value,
        x: Value,
        y: Value
    ) -> Value
    where
        T1: Into<IntCC>
, + { ... } +
fn bitselect(self, c: Value, x: Value, y: Value) -> Value { ... } +
fn copy(self, x: Value) -> Value { ... } +
fn spill(self, x: Value) -> Value { ... } +
fn fill(self, x: Value) -> Value { ... } +
fn fill_nop(self, x: Value) -> Value { ... } +
fn regmove<T1, T2>(self, x: Value, src: T1, dst: T2) -> Inst
    where
        T1: Into<u16>,
        T2: Into<u16>
, + { ... } +
fn copy_special<T1, T2>(self, src: T1, dst: T2) -> Inst
    where
        T1: Into<u16>,
        T2: Into<u16>
, + { ... } +
fn copy_to_ssa<T1>(self, Any: Type, src: T1) -> Value
    where
        T1: Into<u16>
, + { ... } +
fn copy_nop(self, x: Value) -> Value { ... } +
fn adjust_sp_down(self, delta: Value) -> Inst { ... } +
fn adjust_sp_up_imm<T1>(self, Offset: T1) -> Inst
    where
        T1: Into<Imm64>
, + { ... } +
fn adjust_sp_down_imm<T1>(self, Offset: T1) -> Inst
    where
        T1: Into<Imm64>
, + { ... } +
fn ifcmp_sp(self, addr: Value) -> Value { ... } +
fn regspill<T1>(self, x: Value, src: T1, SS: StackSlot) -> Inst
    where
        T1: Into<u16>
, + { ... } +
fn regfill<T1>(self, x: Value, SS: StackSlot, dst: T1) -> Inst
    where
        T1: Into<u16>
, + { ... } +
fn safepoint(self, args: &[Value]) -> Inst { ... } +
fn vsplit(self, x: Value) -> (Value, Value) { ... } +
fn vconcat(self, x: Value, y: Value) -> Value { ... } +
fn vselect(self, c: Value, x: Value, y: Value) -> Value { ... } +
fn vany_true(self, a: Value) -> Value { ... } +
fn vall_true(self, a: Value) -> Value { ... } +
fn splat(self, TxN: Type, x: Value) -> Value { ... } +
fn insertlane<T1>(self, x: Value, Idx: T1, y: Value) -> Value
    where
        T1: Into<u8>
, + { ... } +
fn extractlane<T1>(self, x: Value, Idx: T1) -> Value
    where
        T1: Into<u8>
, + { ... } +
fn icmp<T1>(self, Cond: T1, x: Value, y: Value) -> Value
    where
        T1: Into<IntCC>
, + { ... } +
fn icmp_imm<T1, T2>(self, Cond: T1, x: Value, Y: T2) -> Value
    where
        T1: Into<IntCC>,
        T2: Into<Imm64>
, + { ... } +
fn ifcmp(self, x: Value, y: Value) -> Value { ... } +
fn ifcmp_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn iadd(self, x: Value, y: Value) -> Value { ... } +
fn uadd_sat(self, x: Value, y: Value) -> Value { ... } +
fn sadd_sat(self, x: Value, y: Value) -> Value { ... } +
fn isub(self, x: Value, y: Value) -> Value { ... } +
fn usub_sat(self, x: Value, y: Value) -> Value { ... } +
fn ssub_sat(self, x: Value, y: Value) -> Value { ... } +
fn ineg(self, x: Value) -> Value { ... } +
fn imul(self, x: Value, y: Value) -> Value { ... } +
fn umulhi(self, x: Value, y: Value) -> Value { ... } +
fn smulhi(self, x: Value, y: Value) -> Value { ... } +
fn udiv(self, x: Value, y: Value) -> Value { ... } +
fn sdiv(self, x: Value, y: Value) -> Value { ... } +
fn urem(self, x: Value, y: Value) -> Value { ... } +
fn srem(self, x: Value, y: Value) -> Value { ... } +
fn iadd_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn imul_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn udiv_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn sdiv_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn urem_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn srem_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn irsub_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn iadd_cin(self, x: Value, y: Value, c_in: Value) -> Value { ... } +
fn iadd_ifcin(self, x: Value, y: Value, c_in: Value) -> Value { ... } +
fn iadd_cout(self, x: Value, y: Value) -> (Value, Value) { ... } +
fn iadd_ifcout(self, x: Value, y: Value) -> (Value, Value) { ... } +
fn iadd_carry(self, x: Value, y: Value, c_in: Value) -> (Value, Value) { ... } +
fn iadd_ifcarry(self, x: Value, y: Value, c_in: Value) -> (Value, Value) { ... } +
fn isub_bin(self, x: Value, y: Value, b_in: Value) -> Value { ... } +
fn isub_ifbin(self, x: Value, y: Value, b_in: Value) -> Value { ... } +
fn isub_bout(self, x: Value, y: Value) -> (Value, Value) { ... } +
fn isub_ifbout(self, x: Value, y: Value) -> (Value, Value) { ... } +
fn isub_borrow(self, x: Value, y: Value, b_in: Value) -> (Value, Value) { ... } +
fn isub_ifborrow(self, x: Value, y: Value, b_in: Value) -> (Value, Value) { ... } +
fn band(self, x: Value, y: Value) -> Value { ... } +
fn bor(self, x: Value, y: Value) -> Value { ... } +
fn bxor(self, x: Value, y: Value) -> Value { ... } +
fn bnot(self, x: Value) -> Value { ... } +
fn band_not(self, x: Value, y: Value) -> Value { ... } +
fn bor_not(self, x: Value, y: Value) -> Value { ... } +
fn bxor_not(self, x: Value, y: Value) -> Value { ... } +
fn band_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn bor_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn bxor_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn rotl(self, x: Value, y: Value) -> Value { ... } +
fn rotr(self, x: Value, y: Value) -> Value { ... } +
fn rotl_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn rotr_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn ishl(self, x: Value, y: Value) -> Value { ... } +
fn ushr(self, x: Value, y: Value) -> Value { ... } +
fn sshr(self, x: Value, y: Value) -> Value { ... } +
fn ishl_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn ushr_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn sshr_imm<T1>(self, x: Value, Y: T1) -> Value
    where
        T1: Into<Imm64>
, + { ... } +
fn bitrev(self, x: Value) -> Value { ... } +
fn clz(self, x: Value) -> Value { ... } +
fn cls(self, x: Value) -> Value { ... } +
fn ctz(self, x: Value) -> Value { ... } +
fn popcnt(self, x: Value) -> Value { ... } +
fn fcmp<T1>(self, Cond: T1, x: Value, y: Value) -> Value
    where
        T1: Into<FloatCC>
, + { ... } +
fn ffcmp(self, x: Value, y: Value) -> Value { ... } +
fn fadd(self, x: Value, y: Value) -> Value { ... } +
fn fsub(self, x: Value, y: Value) -> Value { ... } +
fn fmul(self, x: Value, y: Value) -> Value { ... } +
fn fdiv(self, x: Value, y: Value) -> Value { ... } +
fn sqrt(self, x: Value) -> Value { ... } +
fn fma(self, x: Value, y: Value, z: Value) -> Value { ... } +
fn fneg(self, x: Value) -> Value { ... } +
fn fabs(self, x: Value) -> Value { ... } +
fn fcopysign(self, x: Value, y: Value) -> Value { ... } +
fn fmin(self, x: Value, y: Value) -> Value { ... } +
fn fmax(self, x: Value, y: Value) -> Value { ... } +
fn ceil(self, x: Value) -> Value { ... } +
fn floor(self, x: Value) -> Value { ... } +
fn trunc(self, x: Value) -> Value { ... } +
fn nearest(self, x: Value) -> Value { ... } +
fn is_null(self, x: Value) -> Value { ... } +
fn is_invalid(self, x: Value) -> Value { ... } +
fn trueif<T1>(self, Cond: T1, f: Value) -> Value
    where
        T1: Into<IntCC>
, + { ... } +
fn trueff<T1>(self, Cond: T1, f: Value) -> Value
    where
        T1: Into<FloatCC>
, + { ... } +
fn bitcast(self, MemTo: Type, x: Value) -> Value { ... } +
fn raw_bitcast(self, AnyTo: Type, x: Value) -> Value { ... } +
fn scalar_to_vector(self, TxN: Type, s: Value) -> Value { ... } +
fn breduce(self, BoolTo: Type, x: Value) -> Value { ... } +
fn bextend(self, BoolTo: Type, x: Value) -> Value { ... } +
fn bint(self, IntTo: Type, x: Value) -> Value { ... } +
fn bmask(self, IntTo: Type, x: Value) -> Value { ... } +
fn ireduce(self, IntTo: Type, x: Value) -> Value { ... } +
fn uextend(self, IntTo: Type, x: Value) -> Value { ... } +
fn sextend(self, IntTo: Type, x: Value) -> Value { ... } +
fn fpromote(self, FloatTo: Type, x: Value) -> Value { ... } +
fn fdemote(self, FloatTo: Type, x: Value) -> Value { ... } +
fn fcvt_to_uint(self, IntTo: Type, x: Value) -> Value { ... } +
fn fcvt_to_uint_sat(self, IntTo: Type, x: Value) -> Value { ... } +
fn fcvt_to_sint(self, IntTo: Type, x: Value) -> Value { ... } +
fn fcvt_to_sint_sat(self, IntTo: Type, x: Value) -> Value { ... } +
fn fcvt_from_uint(self, FloatTo: Type, x: Value) -> Value { ... } +
fn fcvt_from_sint(self, FloatTo: Type, x: Value) -> Value { ... } +
fn isplit(self, x: Value) -> (Value, Value) { ... } +
fn iconcat(self, lo: Value, hi: Value) -> Value { ... } +
fn x86_udivmodx(self, nlo: Value, nhi: Value, d: Value) -> (Value, Value) { ... } +
fn x86_sdivmodx(self, nlo: Value, nhi: Value, d: Value) -> (Value, Value) { ... } +
fn x86_umulx(self, argL: Value, argR: Value) -> (Value, Value) { ... } +
fn x86_smulx(self, argL: Value, argR: Value) -> (Value, Value) { ... } +
fn x86_cvtt2si(self, IntTo: Type, x: Value) -> Value { ... } +
fn x86_fmin(self, x: Value, y: Value) -> Value { ... } +
fn x86_fmax(self, x: Value, y: Value) -> Value { ... } +
fn x86_push(self, x: Value) -> Inst { ... } +
fn x86_pop(self, iWord: Type) -> Value { ... } +
fn x86_bsr(self, x: Value) -> (Value, Value) { ... } +
fn x86_bsf(self, x: Value) -> (Value, Value) { ... } +
fn x86_pshufd<T1>(self, a: Value, i: T1) -> Value
    where
        T1: Into<u8>
, + { ... } +
fn x86_pshufb(self, a: Value, b: Value) -> Value { ... } +
fn x86_pextr<T1>(self, x: Value, Idx: T1) -> Value
    where
        T1: Into<u8>
, + { ... } +
fn x86_pinsr<T1>(self, x: Value, Idx: T1, y: Value) -> Value
    where
        T1: Into<u8>
, + { ... } +
fn x86_insertps<T1>(self, x: Value, Idx: T1, y: Value) -> Value
    where
        T1: Into<u8>
, + { ... } +
fn x86_movsd(self, x: Value, y: Value) -> Value { ... } +
fn x86_movlhps(self, x: Value, y: Value) -> Value { ... } +
fn x86_psll(self, x: Value, y: Value) -> Value { ... } +
fn x86_psrl(self, x: Value, y: Value) -> Value { ... } +
fn x86_psra(self, x: Value, y: Value) -> Value { ... } +
fn x86_ptest(self, x: Value, y: Value) -> Value { ... } +
fn x86_pmaxs(self, x: Value, y: Value) -> Value { ... } +
fn x86_pmaxu(self, x: Value, y: Value) -> Value { ... } +
fn x86_pmins(self, x: Value, y: Value) -> Value { ... } +
fn x86_pminu(self, x: Value, y: Value) -> Value { ... } +
fn Binary(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        arg0: Value,
        arg1: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn BinaryImm(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        imm: Imm64,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn Branch(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        destination: Block,
        args: EntityList<Value>
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn BranchFloat(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        cond: FloatCC,
        destination: Block,
        args: EntityList<Value>
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn BranchIcmp(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        cond: IntCC,
        destination: Block,
        args: EntityList<Value>
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn BranchInt(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        cond: IntCC,
        destination: Block,
        args: EntityList<Value>
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn BranchTable(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        destination: Block,
        table: JumpTable,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn BranchTableBase(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        table: JumpTable
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn BranchTableEntry(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        imm: u8,
        table: JumpTable,
        arg0: Value,
        arg1: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn Call(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        func_ref: FuncRef,
        args: EntityList<Value>
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn CallIndirect(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        sig_ref: SigRef,
        args: EntityList<Value>
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn CondTrap(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        code: TrapCode,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn CopySpecial(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        src: u16,
        dst: u16
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn CopyToSsa(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        src: u16
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn ExtractLane(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        lane: u8,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn FloatCompare(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        cond: FloatCC,
        arg0: Value,
        arg1: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn FloatCond(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        cond: FloatCC,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn FloatCondTrap(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        cond: FloatCC,
        code: TrapCode,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn FuncAddr(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        func_ref: FuncRef
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn HeapAddr(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        heap: Heap,
        imm: Uimm32,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn IndirectJump(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        table: JumpTable,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn InsertLane(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        lane: u8,
        arg0: Value,
        arg1: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn IntCompare(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        cond: IntCC,
        arg0: Value,
        arg1: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn IntCompareImm(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        cond: IntCC,
        imm: Imm64,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn IntCond(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        cond: IntCC,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn IntCondTrap(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        cond: IntCC,
        code: TrapCode,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn IntSelect(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        cond: IntCC,
        arg0: Value,
        arg1: Value,
        arg2: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn Jump(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        destination: Block,
        args: EntityList<Value>
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn Load(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        flags: MemFlags,
        offset: Offset32,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn LoadComplex(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        flags: MemFlags,
        offset: Offset32,
        args: EntityList<Value>
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn MultiAry(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        args: EntityList<Value>
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn NullAry(
        self,
        opcode: Opcode,
        ctrl_typevar: Type
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn RegFill(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        src: StackSlot,
        dst: u16,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn RegMove(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        src: u16,
        dst: u16,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn RegSpill(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        src: u16,
        dst: StackSlot,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn Shuffle(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        mask: Immediate,
        arg0: Value,
        arg1: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn StackLoad(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        stack_slot: StackSlot,
        offset: Offset32
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn StackStore(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        stack_slot: StackSlot,
        offset: Offset32,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn Store(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        flags: MemFlags,
        offset: Offset32,
        arg0: Value,
        arg1: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn StoreComplex(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        flags: MemFlags,
        offset: Offset32,
        args: EntityList<Value>
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn TableAddr(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        table: Table,
        offset: Offset32,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn Ternary(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        arg0: Value,
        arg1: Value,
        arg2: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn Trap(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        code: TrapCode
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn Unary(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        arg0: Value
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn UnaryBool(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        imm: bool
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn UnaryConst(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        constant_handle: Constant
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn UnaryGlobalValue(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        global_value: GlobalValue
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn UnaryIeee32(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        imm: Ieee32
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn UnaryIeee64(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        imm: Ieee64
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +
fn UnaryImm(
        self,
        opcode: Opcode,
        ctrl_typevar: Type,
        imm: Imm64
    ) -> (Inst, &'f mut DataFlowGraph) { ... } +}

Convenience methods for building instructions.

+

The InstBuilder trait has one method per instruction opcode for +conveniently constructing the instruction with minimum arguments. +Polymorphic instructions infer their result types from the input +arguments when possible. In some cases, an explicit ctrl_typevar +argument is required.

+

The opcode methods return the new instruction's result values, or +the Inst itself for instructions that don't have any results.

+

There is also a method per instruction format. These methods all +return an Inst.

+
+

Provided methods

fn jump(self, block: Block, args: &[Value]) -> Inst

Jump.

+

Unconditionally jump to a basic block, passing the specified +block arguments. The number and types of arguments must match the +destination block.

+

Inputs:

+
    +
  • block: Destination basic block
  • +
  • args: block arguments
  • +
+

fn fallthrough(self, block: Block, args: &[Value]) -> Inst

Fall through to the next block.

+

This is the same as jump, except the destination block must be +the next one in the layout.

+

Jumps are turned into fall-through instructions by the branch +relaxation pass. There is no reason to use this instruction outside +that pass.

+

Inputs:

+
    +
  • block: Destination basic block
  • +
  • args: block arguments
  • +
+

fn brz(self, c: Value, block: Block, args: &[Value]) -> Inst

Branch when zero.

+

If c is a b1 value, take the branch when c is false. If +c is an integer value, take the branch when c = 0.

+

Inputs:

+
    +
  • c: Controlling value to test
  • +
  • block: Destination basic block
  • +
  • args: block arguments
  • +
+

fn brnz(self, c: Value, block: Block, args: &[Value]) -> Inst

Branch when non-zero.

+

If c is a b1 value, take the branch when c is true. If +c is an integer value, take the branch when c != 0.

+

Inputs:

+
    +
  • c: Controlling value to test
  • +
  • block: Destination basic block
  • +
  • args: block arguments
  • +
+

fn br_icmp<T1>(
    self,
    Cond: T1,
    x: Value,
    y: Value,
    block: Block,
    args: &[Value]
) -> Inst where
    T1: Into<IntCC>, 

Compare scalar integers and branch.

+

Compare x and y in the same way as the icmp instruction +and take the branch if the condition is true:

+
    br_icmp ugt v1, v2, block4(v5, v6)
+
+

is semantically equivalent to:

+
    v10 = icmp ugt, v1, v2
+    brnz v10, block4(v5, v6)
+
+

Some RISC architectures like MIPS and RISC-V provide instructions that +implement all or some of the condition codes. The instruction can also +be used to represent macro-op fusion on architectures like Intel's.

+

Inputs:

+
    +
  • Cond: An integer comparison condition code.
  • +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
  • block: Destination basic block
  • +
  • args: block arguments
  • +
+

fn brif<T1>(self, Cond: T1, f: Value, block: Block, args: &[Value]) -> Inst where
    T1: Into<IntCC>, 

Branch when condition is true in integer CPU flags.

+

Inputs:

+
    +
  • Cond: An integer comparison condition code.
  • +
  • f: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
  • block: Destination basic block
  • +
  • args: block arguments
  • +
+

fn brff<T1>(self, Cond: T1, f: Value, block: Block, args: &[Value]) -> Inst where
    T1: Into<FloatCC>, 

Branch when condition is true in floating point CPU flags.

+

Inputs:

+
    +
  • Cond: A floating point comparison condition code
  • +
  • f: CPU flags representing the result of a floating point comparison. These +flags can be tested with a :type:floatcc condition code.
  • +
  • block: Destination basic block
  • +
  • args: block arguments
  • +
+

fn br_table(self, x: Value, block: Block, JT: JumpTable) -> Inst

Indirect branch via jump table.

+

Use x as an unsigned index into the jump table JT. If a jump +table entry is found, branch to the corresponding block. If no entry was +found or the index is out-of-bounds, branch to the given default block.

+

Note that this branch instruction can't pass arguments to the targeted +blocks. Split critical edges as needed to work around this.

+

Do not confuse this with "tables" in WebAssembly. br_table is for +jump tables with destinations within the current function only -- think +of a match in Rust or a switch in C. If you want to call a +function in a dynamic library, that will typically use +call_indirect.

+

Inputs:

+
    +
  • x: index into jump table
  • +
  • block: Destination basic block
  • +
  • JT: A jump table.
  • +
+

fn jump_table_entry<T1>(
    self,
    x: Value,
    addr: Value,
    Size: T1,
    JT: JumpTable
) -> Value where
    T1: Into<u8>, 

Get an entry from a jump table.

+

Load a serialized entry from a jump table JT at a given index +addr with a specific Size. The retrieved entry may need to be +decoded after loading, depending upon the jump table type used.

+

Currently, the only type supported is entries which are relative to the +base of the jump table.

+

Inputs:

+
    +
  • x: index into jump table
  • +
  • addr: An integer address type
  • +
  • Size: Size in bytes
  • +
  • JT: A jump table.
  • +
+

Outputs:

+
    +
  • entry: entry of jump table
  • +
+

fn jump_table_base(self, iAddr: Type, JT: JumpTable) -> Value

Get the absolute base address of a jump table.

+

This is used for jump tables wherein the entries are stored relative to +the base of jump table. In order to use these, generated code should first +load an entry using jump_table_entry, then use this instruction to add +the relative base back to it.

+

Inputs:

+
    +
  • iAddr (controlling type variable): An integer address type
  • +
  • JT: A jump table.
  • +
+

Outputs:

+
    +
  • addr: An integer address type
  • +
+

fn indirect_jump_table_br(self, addr: Value, JT: JumpTable) -> Inst

Branch indirectly via a jump table entry.

+

Unconditionally jump via a jump table entry that was previously loaded +with the jump_table_entry instruction.

+

Inputs:

+
    +
  • addr: An integer address type
  • +
  • JT: A jump table.
  • +
+

fn debugtrap(self) -> Inst

Encodes an assembly debug trap.

+

fn trap<T1>(self, code: T1) -> Inst where
    T1: Into<TrapCode>, 

Terminate execution unconditionally.

+

Inputs:

+
    +
  • code: A trap reason code.
  • +
+

fn trapz<T1>(self, c: Value, code: T1) -> Inst where
    T1: Into<TrapCode>, 

Trap when zero.

+

if c is non-zero, execution continues at the following instruction.

+

Inputs:

+
    +
  • c: Controlling value to test
  • +
  • code: A trap reason code.
  • +
+

fn resumable_trap<T1>(self, code: T1) -> Inst where
    T1: Into<TrapCode>, 

A resumable trap.

+

This instruction allows non-conditional traps to be used as non-terminal instructions.

+

Inputs:

+
    +
  • code: A trap reason code.
  • +
+

fn trapnz<T1>(self, c: Value, code: T1) -> Inst where
    T1: Into<TrapCode>, 

Trap when non-zero.

+

if c is zero, execution continues at the following instruction.

+

Inputs:

+
    +
  • c: Controlling value to test
  • +
  • code: A trap reason code.
  • +
+

fn trapif<T1, T2>(self, Cond: T1, f: Value, code: T2) -> Inst where
    T1: Into<IntCC>,
    T2: Into<TrapCode>, 

Trap when condition is true in integer CPU flags.

+

Inputs:

+
    +
  • Cond: An integer comparison condition code.
  • +
  • f: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
  • code: A trap reason code.
  • +
+

fn trapff<T1, T2>(self, Cond: T1, f: Value, code: T2) -> Inst where
    T1: Into<FloatCC>,
    T2: Into<TrapCode>, 

Trap when condition is true in floating point CPU flags.

+

Inputs:

+
    +
  • Cond: A floating point comparison condition code
  • +
  • f: CPU flags representing the result of a floating point comparison. These +flags can be tested with a :type:floatcc condition code.
  • +
  • code: A trap reason code.
  • +
+

fn return_(self, rvals: &[Value]) -> Inst

Return from the function.

+

Unconditionally transfer control to the calling function, passing the +provided return values. The list of return values must match the +function signature's return types.

+

Inputs:

+
    +
  • rvals: return values
  • +
+

fn fallthrough_return(self, rvals: &[Value]) -> Inst

Return from the function by fallthrough.

+

This is a specialized instruction for use where one wants to append +a custom epilogue, which will then perform the real return. This +instruction has no encoding.

+

Inputs:

+
    +
  • rvals: return values
  • +
+

fn call(self, FN: FuncRef, args: &[Value]) -> Inst

Direct function call.

+

Call a function which has been declared in the preamble. The argument +types must match the function's signature.

+

Inputs:

+
    +
  • FN: function to call, declared by function
  • +
  • args: call arguments
  • +
+

Outputs:

+
    +
  • rvals: return values
  • +
+

fn call_indirect(self, SIG: SigRef, callee: Value, args: &[Value]) -> Inst

Indirect function call.

+

Call the function pointed to by callee with the given arguments. The +called function must match the specified signature.

+

Note that this is different from WebAssembly's call_indirect; the +callee is a native address, rather than a table index. For WebAssembly, +table_addr and load are used to obtain a native address +from a table.

+

Inputs:

+
    +
  • SIG: function signature
  • +
  • callee: address of function to call
  • +
  • args: call arguments
  • +
+

Outputs:

+
    +
  • rvals: return values
  • +
+

fn func_addr(self, iAddr: Type, FN: FuncRef) -> Value

Get the address of a function.

+

Compute the absolute address of a function declared in the preamble. +The returned address can be used as a callee argument to +call_indirect. This is also a method for calling functions that +are too far away to be addressable by a direct call +instruction.

+

Inputs:

+
    +
  • iAddr (controlling type variable): An integer address type
  • +
  • FN: function to call, declared by function
  • +
+

Outputs:

+
    +
  • addr: An integer address type
  • +
+

fn load<T1, T2>(self, Mem: Type, MemFlags: T1, p: Value, Offset: T2) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load from memory at p + Offset.

+

This is a polymorphic instruction that can load any value type which +has a memory representation.

+

Inputs:

+
    +
  • Mem (controlling type variable): Any type that can be stored in memory
  • +
  • MemFlags: Memory operation flags
  • +
  • p: An integer address type
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: Value loaded
  • +
+

fn load_complex<T1, T2>(
    self,
    Mem: Type,
    MemFlags: T1,
    args: &[Value],
    Offset: T2
) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load from memory at sum(args) + Offset.

+

This is a polymorphic instruction that can load any value type which +has a memory representation.

+

Inputs:

+
    +
  • Mem (controlling type variable): Any type that can be stored in memory
  • +
  • MemFlags: Memory operation flags
  • +
  • args: Address arguments
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: Value loaded
  • +
+

fn store<T1, T2>(self, MemFlags: T1, x: Value, p: Value, Offset: T2) -> Inst where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Store x to memory at p + Offset.

+

This is a polymorphic instruction that can store any value type with a +memory representation.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • x: Value to be stored
  • +
  • p: An integer address type
  • +
  • Offset: Byte offset from base address
  • +
+

fn store_complex<T1, T2>(
    self,
    MemFlags: T1,
    x: Value,
    args: &[Value],
    Offset: T2
) -> Inst where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Store x to memory at sum(args) + Offset.

+

This is a polymorphic instruction that can store any value type with a +memory representation.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • x: Value to be stored
  • +
  • args: Address arguments
  • +
  • Offset: Byte offset from base address
  • +
+

fn uload8<T1, T2>(
    self,
    iExt8: Type,
    MemFlags: T1,
    p: Value,
    Offset: T2
) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 8 bits from memory at p + Offset and zero-extend.

+

This is equivalent to load.i8 followed by uextend.

+

Inputs:

+
    +
  • iExt8 (controlling type variable): An integer type with more than 8 bits
  • +
  • MemFlags: Memory operation flags
  • +
  • p: An integer address type
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 8 bits
  • +
+

fn uload8_complex<T1, T2>(
    self,
    iExt8: Type,
    MemFlags: T1,
    args: &[Value],
    Offset: T2
) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 8 bits from memory at sum(args) + Offset and zero-extend.

+

This is equivalent to load.i8 followed by uextend.

+

Inputs:

+
    +
  • iExt8 (controlling type variable): An integer type with more than 8 bits
  • +
  • MemFlags: Memory operation flags
  • +
  • args: Address arguments
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 8 bits
  • +
+

fn sload8<T1, T2>(
    self,
    iExt8: Type,
    MemFlags: T1,
    p: Value,
    Offset: T2
) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 8 bits from memory at p + Offset and sign-extend.

+

This is equivalent to load.i8 followed by sextend.

+

Inputs:

+
    +
  • iExt8 (controlling type variable): An integer type with more than 8 bits
  • +
  • MemFlags: Memory operation flags
  • +
  • p: An integer address type
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 8 bits
  • +
+

fn sload8_complex<T1, T2>(
    self,
    iExt8: Type,
    MemFlags: T1,
    args: &[Value],
    Offset: T2
) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 8 bits from memory at sum(args) + Offset and sign-extend.

+

This is equivalent to load.i8 followed by sextend.

+

Inputs:

+
    +
  • iExt8 (controlling type variable): An integer type with more than 8 bits
  • +
  • MemFlags: Memory operation flags
  • +
  • args: Address arguments
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 8 bits
  • +
+

fn istore8<T1, T2>(self, MemFlags: T1, x: Value, p: Value, Offset: T2) -> Inst where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Store the low 8 bits of x to memory at p + Offset.

+

This is equivalent to ireduce.i8 followed by store.i8.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • x: An integer type with more than 8 bits
  • +
  • p: An integer address type
  • +
  • Offset: Byte offset from base address
  • +
+

fn istore8_complex<T1, T2>(
    self,
    MemFlags: T1,
    x: Value,
    args: &[Value],
    Offset: T2
) -> Inst where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Store the low 8 bits of x to memory at sum(args) + Offset.

+

This is equivalent to ireduce.i8 followed by store.i8.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • x: An integer type with more than 8 bits
  • +
  • args: Address arguments
  • +
  • Offset: Byte offset from base address
  • +
+

fn uload16<T1, T2>(
    self,
    iExt16: Type,
    MemFlags: T1,
    p: Value,
    Offset: T2
) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 16 bits from memory at p + Offset and zero-extend.

+

This is equivalent to load.i16 followed by uextend.

+

Inputs:

+
    +
  • iExt16 (controlling type variable): An integer type with more than 16 bits
  • +
  • MemFlags: Memory operation flags
  • +
  • p: An integer address type
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 16 bits
  • +
+

fn uload16_complex<T1, T2>(
    self,
    iExt16: Type,
    MemFlags: T1,
    args: &[Value],
    Offset: T2
) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 16 bits from memory at sum(args) + Offset and zero-extend.

+

This is equivalent to load.i16 followed by uextend.

+

Inputs:

+
    +
  • iExt16 (controlling type variable): An integer type with more than 16 bits
  • +
  • MemFlags: Memory operation flags
  • +
  • args: Address arguments
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 16 bits
  • +
+

fn sload16<T1, T2>(
    self,
    iExt16: Type,
    MemFlags: T1,
    p: Value,
    Offset: T2
) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 16 bits from memory at p + Offset and sign-extend.

+

This is equivalent to load.i16 followed by sextend.

+

Inputs:

+
    +
  • iExt16 (controlling type variable): An integer type with more than 16 bits
  • +
  • MemFlags: Memory operation flags
  • +
  • p: An integer address type
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 16 bits
  • +
+

fn sload16_complex<T1, T2>(
    self,
    iExt16: Type,
    MemFlags: T1,
    args: &[Value],
    Offset: T2
) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 16 bits from memory at sum(args) + Offset and sign-extend.

+

This is equivalent to load.i16 followed by sextend.

+

Inputs:

+
    +
  • iExt16 (controlling type variable): An integer type with more than 16 bits
  • +
  • MemFlags: Memory operation flags
  • +
  • args: Address arguments
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 16 bits
  • +
+

fn istore16<T1, T2>(self, MemFlags: T1, x: Value, p: Value, Offset: T2) -> Inst where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Store the low 16 bits of x to memory at p + Offset.

+

This is equivalent to ireduce.i16 followed by store.i16.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • x: An integer type with more than 16 bits
  • +
  • p: An integer address type
  • +
  • Offset: Byte offset from base address
  • +
+

fn istore16_complex<T1, T2>(
    self,
    MemFlags: T1,
    x: Value,
    args: &[Value],
    Offset: T2
) -> Inst where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Store the low 16 bits of x to memory at sum(args) + Offset.

+

This is equivalent to ireduce.i16 followed by store.i16.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • x: An integer type with more than 16 bits
  • +
  • args: Address arguments
  • +
  • Offset: Byte offset from base address
  • +
+

fn uload32<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 32 bits from memory at p + Offset and zero-extend.

+

This is equivalent to load.i32 followed by uextend.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • p: An integer address type
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 32 bits
  • +
+

fn uload32_complex<T1, T2>(
    self,
    MemFlags: T1,
    args: &[Value],
    Offset: T2
) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 32 bits from memory at sum(args) + Offset and zero-extend.

+

This is equivalent to load.i32 followed by uextend.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • args: Address arguments
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 32 bits
  • +
+

fn sload32<T1, T2>(self, MemFlags: T1, p: Value, Offset: T2) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 32 bits from memory at p + Offset and sign-extend.

+

This is equivalent to load.i32 followed by sextend.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • p: An integer address type
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 32 bits
  • +
+

fn sload32_complex<T1, T2>(
    self,
    MemFlags: T1,
    args: &[Value],
    Offset: T2
) -> Value where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Load 32 bits from memory at sum(args) + Offset and sign-extend.

+

This is equivalent to load.i32 followed by sextend.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • args: Address arguments
  • +
  • Offset: Byte offset from base address
  • +
+

Outputs:

+
    +
  • a: An integer type with more than 32 bits
  • +
+

fn istore32<T1, T2>(self, MemFlags: T1, x: Value, p: Value, Offset: T2) -> Inst where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Store the low 32 bits of x to memory at p + Offset.

+

This is equivalent to ireduce.i32 followed by store.i32.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • x: An integer type with more than 32 bits
  • +
  • p: An integer address type
  • +
  • Offset: Byte offset from base address
  • +
+

fn istore32_complex<T1, T2>(
    self,
    MemFlags: T1,
    x: Value,
    args: &[Value],
    Offset: T2
) -> Inst where
    T1: Into<MemFlags>,
    T2: Into<Offset32>, 

Store the low 32 bits of x to memory at sum(args) + Offset.

+

This is equivalent to ireduce.i32 followed by store.i32.

+

Inputs:

+
    +
  • MemFlags: Memory operation flags
  • +
  • x: An integer type with more than 32 bits
  • +
  • args: Address arguments
  • +
  • Offset: Byte offset from base address
  • +
+

fn stack_load<T1>(self, Mem: Type, SS: StackSlot, Offset: T1) -> Value where
    T1: Into<Offset32>, 

Load a value from a stack slot at the constant offset.

+

This is a polymorphic instruction that can load any value type which +has a memory representation.

+

The offset is an immediate constant, not an SSA value. The memory +access cannot go out of bounds, i.e. +sizeof(a) + Offset <= sizeof(SS).

+

Inputs:

+
    +
  • Mem (controlling type variable): Any type that can be stored in memory
  • +
  • SS: A stack slot
  • +
  • Offset: In-bounds offset into stack slot
  • +
+

Outputs:

+
    +
  • a: Value loaded
  • +
+

fn stack_store<T1>(self, x: Value, SS: StackSlot, Offset: T1) -> Inst where
    T1: Into<Offset32>, 

Store a value to a stack slot at a constant offset.

+

This is a polymorphic instruction that can store any value type with a +memory representation.

+

The offset is an immediate constant, not an SSA value. The memory +access cannot go out of bounds, i.e. +sizeof(a) + Offset <= sizeof(SS).

+

Inputs:

+
    +
  • x: Value to be stored
  • +
  • SS: A stack slot
  • +
  • Offset: In-bounds offset into stack slot
  • +
+

fn stack_addr<T1>(self, iAddr: Type, SS: StackSlot, Offset: T1) -> Value where
    T1: Into<Offset32>, 

Get the address of a stack slot.

+

Compute the absolute address of a byte in a stack slot. The offset must +refer to a byte inside the stack slot: +0 <= Offset < sizeof(SS).

+

Inputs:

+
    +
  • iAddr (controlling type variable): An integer address type
  • +
  • SS: A stack slot
  • +
  • Offset: In-bounds offset into stack slot
  • +
+

Outputs:

+
    +
  • addr: An integer address type
  • +
+

fn global_value(self, Mem: Type, GV: GlobalValue) -> Value

Compute the value of global GV.

+

Inputs:

+
    +
  • Mem (controlling type variable): Any type that can be stored in memory
  • +
  • GV: A global value.
  • +
+

Outputs:

+
    +
  • a: Value loaded
  • +
+

fn symbol_value(self, Mem: Type, GV: GlobalValue) -> Value

Compute the value of global GV, which is a symbolic value.

+

Inputs:

+
    +
  • Mem (controlling type variable): Any type that can be stored in memory
  • +
  • GV: A global value.
  • +
+

Outputs:

+
    +
  • a: Value loaded
  • +
+

fn heap_addr<T1>(self, iAddr: Type, H: Heap, p: Value, Size: T1) -> Value where
    T1: Into<Uimm32>, 

Bounds check and compute absolute address of heap memory.

+

Verify that the offset range p .. p + Size - 1 is in bounds for the +heap H, and generate an absolute address that is safe to dereference.

+
    +
  1. If p + Size is not greater than the heap bound, return an +absolute address corresponding to a byte offset of p from the +heap's base address.
  2. +
  3. If p + Size is greater than the heap bound, generate a trap.
  4. +
+

Inputs:

+
    +
  • iAddr (controlling type variable): An integer address type
  • +
  • H: A heap.
  • +
  • p: An unsigned heap offset
  • +
  • Size: Size in bytes
  • +
+

Outputs:

+
    +
  • addr: An integer address type
  • +
+

fn get_pinned_reg(self, iAddr: Type) -> Value

Gets the content of the pinned register, when it's enabled.

+

Inputs:

+
    +
  • iAddr (controlling type variable): An integer address type
  • +
+

Outputs:

+
    +
  • addr: An integer address type
  • +
+

fn set_pinned_reg(self, addr: Value) -> Inst

Sets the content of the pinned register, when it's enabled.

+

Inputs:

+
    +
  • addr: An integer address type
  • +
+

fn table_addr<T1>(self, iAddr: Type, T: Table, p: Value, Offset: T1) -> Value where
    T1: Into<Offset32>, 

Bounds check and compute absolute address of a table entry.

+

Verify that the offset p is in bounds for the table T, and generate +an absolute address that is safe to dereference.

+

Offset must be less than the size of a table element.

+
    +
  1. If p is not greater than the table bound, return an absolute +address corresponding to a byte offset of p from the table's +base address.
  2. +
  3. If p is greater than the table bound, generate a trap.
  4. +
+

Inputs:

+
    +
  • iAddr (controlling type variable): An integer address type
  • +
  • T: A table.
  • +
  • p: An unsigned table offset
  • +
  • Offset: Byte offset from element address
  • +
+

Outputs:

+
    +
  • addr: An integer address type
  • +
+

fn iconst<T1>(self, Int: Type, N: T1) -> Value where
    T1: Into<Imm64>, 

Integer constant.

+

Create a scalar integer SSA value with an immediate constant value, or +an integer vector where all the lanes have the same value.

+

Inputs:

+
    +
  • Int (controlling type variable): A scalar or vector integer type
  • +
  • N: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A constant integer scalar or vector value
  • +
+

fn f32const<T1>(self, N: T1) -> Value where
    T1: Into<Ieee32>, 

Floating point constant.

+

Create a f32 SSA value with an immediate constant value.

+

Inputs:

+
    +
  • N: A 32-bit immediate floating point number.
  • +
+

Outputs:

+
    +
  • a: A constant f32 scalar value
  • +
+

fn f64const<T1>(self, N: T1) -> Value where
    T1: Into<Ieee64>, 

Floating point constant.

+

Create a f64 SSA value with an immediate constant value.

+

Inputs:

+
    +
  • N: A 64-bit immediate floating point number.
  • +
+

Outputs:

+
    +
  • a: A constant f64 scalar value
  • +
+

fn bconst<T1>(self, Bool: Type, N: T1) -> Value where
    T1: Into<bool>, 

Boolean constant.

+

Create a scalar boolean SSA value with an immediate constant value, or +a boolean vector where all the lanes have the same value.

+

Inputs:

+
    +
  • Bool (controlling type variable): A scalar or vector boolean type
  • +
  • N: An immediate boolean.
  • +
+

Outputs:

+
    +
  • a: A constant boolean scalar or vector value
  • +
+

fn vconst<T1>(self, TxN: Type, N: T1) -> Value where
    T1: Into<Constant>, 

SIMD vector constant.

+

Construct a vector with the given immediate bytes.

+

Inputs:

+
    +
  • TxN (controlling type variable): A SIMD vector type
  • +
  • N: The 16 immediate bytes of a 128-bit vector
  • +
+

Outputs:

+
    +
  • a: A constant vector value
  • +
+

fn shuffle<T1>(self, a: Value, b: Value, mask: T1) -> Value where
    T1: Into<Immediate>, 

SIMD vector shuffle.

+

Shuffle two vectors using the given immediate bytes. For each of the 16 bytes of the +immediate, a value i of 0-15 selects the i-th element of the first vector and a value i of +16-31 selects the (i-16)th element of the second vector. Immediate values outside of the +0-31 range place a 0 in the resulting vector lane.

+

Inputs:

+
    +
  • a: A vector value
  • +
  • b: A vector value
  • +
  • mask: The 16 immediate bytes used for selecting the elements to shuffle
  • +
+

Outputs:

+
    +
  • a: A vector value
  • +
+

fn null(self, Ref: Type) -> Value

Null constant value for reference types.

+

Create a scalar reference SSA value with a constant null value.

+

Inputs:

+
    +
  • Ref (controlling type variable): A scalar reference type
  • +
+

Outputs:

+
    +
  • a: A constant reference null value
  • +
+

fn nop(self) -> Inst

Just a dummy instruction.

+

Note: this doesn't compile to a machine code nop.

+

fn select(self, c: Value, x: Value, y: Value) -> Value

Conditional select.

+

This instruction selects whole values. Use vselect for +lane-wise selection.

+

Inputs:

+
    +
  • c: Controlling value to test
  • +
  • x: Value to use when c is true
  • +
  • y: Value to use when c is false
  • +
+

Outputs:

+
    +
  • a: Any integer, float, boolean, or reference scalar or vector type
  • +
+

fn selectif<T1>(
    self,
    Any: Type,
    cc: T1,
    flags: Value,
    x: Value,
    y: Value
) -> Value where
    T1: Into<IntCC>, 

Conditional select, dependent on integer condition codes.

+

Inputs:

+
    +
  • Any (controlling type variable): Any integer, float, boolean, or reference scalar or vector type
  • +
  • cc: Controlling condition code
  • +
  • flags: The machine's flag register
  • +
  • x: Value to use when c is true
  • +
  • y: Value to use when c is false
  • +
+

Outputs:

+
    +
  • a: Any integer, float, boolean, or reference scalar or vector type
  • +
+

fn bitselect(self, c: Value, x: Value, y: Value) -> Value

Conditional select of bits.

+

For each bit in c, this instruction selects the corresponding bit from x if the bit +in c is 1 and the corresponding bit from y if the bit in c is 0. See also: +select, vselect.

+

Inputs:

+
    +
  • c: Controlling value to test
  • +
  • x: Value to use when c is true
  • +
  • y: Value to use when c is false
  • +
+

Outputs:

+
    +
  • a: Any integer, float, boolean, or reference scalar or vector type
  • +
+

fn copy(self, x: Value) -> Value

Register-register copy.

+

This instruction copies its input, preserving the value type.

+

A pure SSA-form program does not need to copy values, but this +instruction is useful for representing intermediate stages during +instruction transformations, and the register allocator needs a way of +representing register copies.

+

Inputs:

+
    +
  • x: Any integer, float, boolean, or reference scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, boolean, or reference scalar or vector type
  • +
+

fn spill(self, x: Value) -> Value

Spill a register value to a stack slot.

+

This instruction behaves exactly like copy, but the result +value is assigned to a spill slot.

+

Inputs:

+
    +
  • x: Any integer, float, boolean, or reference scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, boolean, or reference scalar or vector type
  • +
+

fn fill(self, x: Value) -> Value

Load a register value from a stack slot.

+

This instruction behaves exactly like copy, but creates a new +SSA value for the spilled input value.

+

Inputs:

+
    +
  • x: Any integer, float, boolean, or reference scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, boolean, or reference scalar or vector type
  • +
+

fn fill_nop(self, x: Value) -> Value

This is identical to fill, except it has no encoding, since it is a no-op.

+

This instruction is created only during late-stage redundant-reload removal, after all +registers and stack slots have been assigned. It is used to replace fills that have +been identified as redundant.

+

Inputs:

+
    +
  • x: Any integer, float, boolean, or reference scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, boolean, or reference scalar or vector type
  • +
+

fn regmove<T1, T2>(self, x: Value, src: T1, dst: T2) -> Inst where
    T1: Into<u16>,
    T2: Into<u16>, 

Temporarily divert x from src to dst.

+

This instruction moves the location of a value from one register to +another without creating a new SSA value. It is used by the register +allocator to temporarily rearrange register assignments in order to +satisfy instruction constraints.

+

The register diversions created by this instruction must be undone +before the value leaves the block. At the entry to a new block, all live +values must be in their originally assigned registers.

+

Inputs:

+
    +
  • x: Any integer, float, boolean, or reference scalar or vector type
  • +
  • src: A register unit in the target ISA
  • +
  • dst: A register unit in the target ISA
  • +
+

fn copy_special<T1, T2>(self, src: T1, dst: T2) -> Inst where
    T1: Into<u16>,
    T2: Into<u16>, 

Copies the contents of ''src'' register to ''dst'' register.

+

This instructions copies the contents of one register to another +register without involving any SSA values. This is used for copying +special registers, e.g. copying the stack register to the frame +register in a function prologue.

+

Inputs:

+
    +
  • src: A register unit in the target ISA
  • +
  • dst: A register unit in the target ISA
  • +
+

fn copy_to_ssa<T1>(self, Any: Type, src: T1) -> Value where
    T1: Into<u16>, 

Copies the contents of ''src'' register to ''a'' SSA name.

+

This instruction copies the contents of one register, regardless of its SSA name, to +another register, creating a new SSA name. In that sense it is a one-sided version +of ''copy_special''. This instruction is internal and should not be created by +Cranelift users.

+

Inputs:

+
    +
  • Any (controlling type variable): Any integer, float, boolean, or reference scalar or vector type
  • +
  • src: A register unit in the target ISA
  • +
+

Outputs:

+
    +
  • a: Any integer, float, boolean, or reference scalar or vector type
  • +
+

fn copy_nop(self, x: Value) -> Value

Stack-slot-to-the-same-stack-slot copy, which is guaranteed to turn +into a no-op. This instruction is for use only within Cranelift itself.

+

This instruction copies its input, preserving the value type.

+

Inputs:

+
    +
  • x: Any integer, float, boolean, or reference scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, boolean, or reference scalar or vector type
  • +
+

fn adjust_sp_down(self, delta: Value) -> Inst

Subtracts delta offset value from the stack pointer register.

+

This instruction is used to adjust the stack pointer by a dynamic amount.

+

Inputs:

+
    +
  • delta: A scalar or vector integer type
  • +
+

fn adjust_sp_up_imm<T1>(self, Offset: T1) -> Inst where
    T1: Into<Imm64>, 

Adds Offset immediate offset value to the stack pointer register.

+

This instruction is used to adjust the stack pointer, primarily in function +prologues and epilogues. Offset is constrained to the size of a signed +32-bit integer.

+

Inputs:

+
    +
  • Offset: Offset from current stack pointer
  • +
+

fn adjust_sp_down_imm<T1>(self, Offset: T1) -> Inst where
    T1: Into<Imm64>, 

Subtracts Offset immediate offset value from the stack pointer +register.

+

This instruction is used to adjust the stack pointer, primarily in function +prologues and epilogues. Offset is constrained to the size of a signed +32-bit integer.

+

Inputs:

+
    +
  • Offset: Offset from current stack pointer
  • +
+

fn ifcmp_sp(self, addr: Value) -> Value

Compare addr with the stack pointer and set the CPU flags.

+

This is like ifcmp where addr is the LHS operand and the stack +pointer is the RHS.

+

Inputs:

+
    +
  • addr: An integer address type
  • +
+

Outputs:

+
    +
  • f: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

fn regspill<T1>(self, x: Value, src: T1, SS: StackSlot) -> Inst where
    T1: Into<u16>, 

Temporarily divert x from src to SS.

+

This instruction moves the location of a value from a register to a +stack slot without creating a new SSA value. It is used by the register +allocator to temporarily rearrange register assignments in order to +satisfy instruction constraints.

+

See also regmove.

+

Inputs:

+
    +
  • x: Any integer, float, boolean, or reference scalar or vector type
  • +
  • src: A register unit in the target ISA
  • +
  • SS: A stack slot
  • +
+

fn regfill<T1>(self, x: Value, SS: StackSlot, dst: T1) -> Inst where
    T1: Into<u16>, 

Temporarily divert x from SS to dst.

+

This instruction moves the location of a value from a stack slot to a +register without creating a new SSA value. It is used by the register +allocator to temporarily rearrange register assignments in order to +satisfy instruction constraints.

+

See also regmove.

+

Inputs:

+
    +
  • x: Any integer, float, boolean, or reference scalar or vector type
  • +
  • SS: A stack slot
  • +
  • dst: A register unit in the target ISA
  • +
+

fn safepoint(self, args: &[Value]) -> Inst

This instruction will provide live reference values at a point in +the function. It can only be used by the compiler.

+

Inputs:

+
    +
  • args: Variable number of args for Stackmap
  • +
+

fn vsplit(self, x: Value) -> (Value, Value)

Split a vector into two halves.

+

Split the vector x into two separate values, each containing half of +the lanes from x. The result may be two scalars if x only had +two lanes.

+

Inputs:

+
    +
  • x: Vector to split
  • +
+

Outputs:

+
    +
  • lo: Low-numbered lanes of x
  • +
  • hi: High-numbered lanes of x
  • +
+

fn vconcat(self, x: Value, y: Value) -> Value

Vector concatenation.

+

Return a vector formed by concatenating x and y. The resulting +vector type has twice as many lanes as each of the inputs. The lanes of +x appear as the low-numbered lanes, and the lanes of y become +the high-numbered lanes of a.

+

It is possible to form a vector by concatenating two scalars.

+

Inputs:

+
    +
  • x: Low-numbered lanes
  • +
  • y: High-numbered lanes
  • +
+

Outputs:

+
    +
  • a: Concatenation of x and y
  • +
+

fn vselect(self, c: Value, x: Value, y: Value) -> Value

Vector lane select.

+

Select lanes from x or y controlled by the lanes of the boolean +vector c.

+

Inputs:

+
    +
  • c: Controlling vector
  • +
  • x: Value to use where c is true
  • +
  • y: Value to use where c is false
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type
  • +
+

fn vany_true(self, a: Value) -> Value

Reduce a vector to a scalar boolean.

+

Return a scalar boolean true if any lane in a is non-zero, false otherwise.

+

Inputs:

+
    +
  • a: A SIMD vector type
  • +
+

Outputs:

+
    +
  • s: A boolean type with 1 bits.
  • +
+

fn vall_true(self, a: Value) -> Value

Reduce a vector to a scalar boolean.

+

Return a scalar boolean true if all lanes in i are non-zero, false otherwise.

+

Inputs:

+
    +
  • a: A SIMD vector type
  • +
+

Outputs:

+
    +
  • s: A boolean type with 1 bits.
  • +
+

fn splat(self, TxN: Type, x: Value) -> Value

Vector splat.

+

Return a vector whose lanes are all x.

+

Inputs:

+
    +
  • TxN (controlling type variable): A SIMD vector type
  • +
  • x:
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type
  • +
+

fn insertlane<T1>(self, x: Value, Idx: T1, y: Value) -> Value where
    T1: Into<u8>, 

Insert y as lane Idx in x.

+

The lane index, Idx, is an immediate value, not an SSA value. It +must indicate a valid lane index for the type of x.

+

Inputs:

+
    +
  • x: SIMD vector to modify
  • +
  • Idx: Lane index
  • +
  • y: New lane value
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type
  • +
+

fn extractlane<T1>(self, x: Value, Idx: T1) -> Value where
    T1: Into<u8>, 

Extract lane Idx from x.

+

The lane index, Idx, is an immediate value, not an SSA value. It +must indicate a valid lane index for the type of x. Note that the upper bits of a +may or may not be zeroed depending on the ISA but the type system should prevent using +a as anything other than the extracted value.

+

Inputs:

+
    +
  • x: A SIMD vector type
  • +
  • Idx: Lane index
  • +
+

Outputs:

+
    +
  • a:
  • +
+

fn icmp<T1>(self, Cond: T1, x: Value, y: Value) -> Value where
    T1: Into<IntCC>, 

Integer comparison.

+

The condition code determines if the operands are interpreted as signed +or unsigned integers.

+ + + + + + + + + +
SignedUnsignedCondition
eqeqEqual
neneNot equal
sltultLess than
sgeugeGreater than or equal
sgtugtGreater than
sleuleLess than or equal
of*Overflow
nof*No Overflow
+

* The unsigned version of overflow conditions have ISA-specific +semantics and thus have been kept as methods on the TargetIsa trait as +[unsigned_add_overflow_condition][isa::TargetIsa::unsigned_add_overflow_condition] and +[unsigned_sub_overflow_condition][isa::TargetIsa::unsigned_sub_overflow_condition].

+

When this instruction compares integer vectors, it returns a boolean +vector of lane-wise comparisons.

+

Inputs:

+
    +
  • Cond: An integer comparison condition code.
  • +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a:
  • +
+

fn icmp_imm<T1, T2>(self, Cond: T1, x: Value, Y: T2) -> Value where
    T1: Into<IntCC>,
    T2: Into<Imm64>, 

Compare scalar integer to a constant.

+

This is the same as the icmp instruction, except one operand is +an immediate constant.

+

This instruction can only compare scalars. Use icmp for +lane-wise vector comparisons.

+

Inputs:

+
    +
  • Cond: An integer comparison condition code.
  • +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A boolean type with 1 bits.
  • +
+

fn ifcmp(self, x: Value, y: Value) -> Value

Compare scalar integers and return flags.

+

Compare two scalar integer values and return integer CPU flags +representing the result.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
+

Outputs:

+
    +
  • f: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

fn ifcmp_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Compare scalar integer to a constant and return flags.

+

Like icmp_imm, but returns integer CPU flags instead of testing +a specific condition code.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • f: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

fn iadd(self, x: Value, y: Value) -> Value

Wrapping integer addition: a := x + y \pmod{2^B}.

+

This instruction does not depend on the signed/unsigned interpretation +of the operands.

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn uadd_sat(self, x: Value, y: Value) -> Value

Add with unsigned saturation.

+

This is similar to iadd but the operands are interpreted as unsigned integers and their +summed result, instead of wrapping, will be saturated to the highest unsigned integer for +the controlling type (e.g. 0xFF for i8).

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn sadd_sat(self, x: Value, y: Value) -> Value

Add with signed saturation.

+

This is similar to iadd but the operands are interpreted as signed integers and their +summed result, instead of wrapping, will be saturated to the lowest or highest +signed integer for the controlling type (e.g. 0x80 or 0x7F for i8). For example, +since an iadd_ssat.i8 of 0x70 and 0x70 is greater than 0x7F, the result will be +clamped to 0x7F.

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn isub(self, x: Value, y: Value) -> Value

Wrapping integer subtraction: a := x - y \pmod{2^B}.

+

This instruction does not depend on the signed/unsigned interpretation +of the operands.

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn usub_sat(self, x: Value, y: Value) -> Value

Subtract with unsigned saturation.

+

This is similar to isub but the operands are interpreted as unsigned integers and their +difference, instead of wrapping, will be saturated to the lowest unsigned integer for +the controlling type (e.g. 0x00 for i8).

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn ssub_sat(self, x: Value, y: Value) -> Value

Subtract with signed saturation.

+

This is similar to isub but the operands are interpreted as signed integers and their +difference, instead of wrapping, will be saturated to the lowest or highest +signed integer for the controlling type (e.g. 0x80 or 0x7F for i8).

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn ineg(self, x: Value) -> Value

Integer negation: a := -x \pmod{2^B}.

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn imul(self, x: Value, y: Value) -> Value

Wrapping integer multiplication: a := x y \pmod{2^B}.

+

This instruction does not depend on the signed/unsigned interpretation +of the operands.

+

Polymorphic over all integer types (vector and scalar).

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn umulhi(self, x: Value, y: Value) -> Value

Unsigned integer multiplication, producing the high half of a +double-length result.

+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn smulhi(self, x: Value, y: Value) -> Value

Signed integer multiplication, producing the high half of a +double-length result.

+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn udiv(self, x: Value, y: Value) -> Value

Unsigned integer division: a := \lfloor {x \over y} \rfloor.

+

This operation traps if the divisor is zero.

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn sdiv(self, x: Value, y: Value) -> Value

Signed integer division rounded toward zero: a := sign(xy) \lfloor {|x| \over |y|}\rfloor.

+

This operation traps if the divisor is zero, or if the result is not +representable in B bits two's complement. This only happens +when x = -2^{B-1}, y = -1.

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn urem(self, x: Value, y: Value) -> Value

Unsigned integer remainder.

+

This operation traps if the divisor is zero.

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn srem(self, x: Value, y: Value) -> Value

Signed integer remainder. The result has the sign of the dividend.

+

This operation traps if the divisor is zero.

+

Inputs:

+
    +
  • x: A scalar or vector integer type
  • +
  • y: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn iadd_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Add immediate integer.

+

Same as iadd, but one operand is an immediate constant.

+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn imul_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Integer multiplication by immediate constant.

+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn udiv_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Unsigned integer division by an immediate constant.

+

This operation traps if the divisor is zero.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn sdiv_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Signed integer division by an immediate constant.

+

This operation traps if the divisor is zero, or if the result is not +representable in B bits two's complement. This only happens +when x = -2^{B-1}, Y = -1.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn urem_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Unsigned integer remainder with immediate divisor.

+

This operation traps if the divisor is zero.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn srem_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Signed integer remainder with immediate divisor.

+

This operation traps if the divisor is zero.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn irsub_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Immediate reverse wrapping subtraction: a := Y - x \pmod{2^B}.

+

Also works as integer negation when Y = 0. Use iadd_imm +with a negative immediate operand for the reverse immediate +subtraction.

+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn iadd_cin(self, x: Value, y: Value, c_in: Value) -> Value

Add integers with carry in.

+

Same as iadd with an additional carry input. Computes:

+
    a = x + y + c_{in} \pmod 2^B
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
  • c_in: Input carry flag
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn iadd_ifcin(self, x: Value, y: Value, c_in: Value) -> Value

Add integers with carry in.

+

Same as iadd with an additional carry flag input. Computes:

+
    a = x + y + c_{in} \pmod 2^B
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
  • c_in: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn iadd_cout(self, x: Value, y: Value) -> (Value, Value)

Add integers with carry out.

+

Same as iadd with an additional carry output.

+
    a &= x + y \pmod 2^B \\
+    c_{out} &= x+y >= 2^B
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
  • c_out: Output carry flag
  • +
+

fn iadd_ifcout(self, x: Value, y: Value) -> (Value, Value)

Add integers with carry out.

+

Same as iadd with an additional carry flag output.

+
    a &= x + y \pmod 2^B \\
+    c_{out} &= x+y >= 2^B
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
  • c_out: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

fn iadd_carry(self, x: Value, y: Value, c_in: Value) -> (Value, Value)

Add integers with carry in and out.

+

Same as iadd with an additional carry input and output.

+
    a &= x + y + c_{in} \pmod 2^B \\
+    c_{out} &= x + y + c_{in} >= 2^B
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
  • c_in: Input carry flag
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
  • c_out: Output carry flag
  • +
+

fn iadd_ifcarry(self, x: Value, y: Value, c_in: Value) -> (Value, Value)

Add integers with carry in and out.

+

Same as iadd with an additional carry flag input and output.

+
    a &= x + y + c_{in} \pmod 2^B \\
+    c_{out} &= x + y + c_{in} >= 2^B
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
  • c_in: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
  • c_out: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

fn isub_bin(self, x: Value, y: Value, b_in: Value) -> Value

Subtract integers with borrow in.

+

Same as isub with an additional borrow flag input. Computes:

+
    a = x - (y + b_{in}) \pmod 2^B
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
  • b_in: Input borrow flag
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn isub_ifbin(self, x: Value, y: Value, b_in: Value) -> Value

Subtract integers with borrow in.

+

Same as isub with an additional borrow flag input. Computes:

+
    a = x - (y + b_{in}) \pmod 2^B
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
  • b_in: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn isub_bout(self, x: Value, y: Value) -> (Value, Value)

Subtract integers with borrow out.

+

Same as isub with an additional borrow flag output.

+
    a &= x - y \pmod 2^B \\
+    b_{out} &= x < y
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
  • b_out: Output borrow flag
  • +
+

fn isub_ifbout(self, x: Value, y: Value) -> (Value, Value)

Subtract integers with borrow out.

+

Same as isub with an additional borrow flag output.

+
    a &= x - y \pmod 2^B \\
+    b_{out} &= x < y
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
  • b_out: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

fn isub_borrow(self, x: Value, y: Value, b_in: Value) -> (Value, Value)

Subtract integers with borrow in and out.

+

Same as isub with an additional borrow flag input and output.

+
    a &= x - (y + b_{in}) \pmod 2^B \\
+    b_{out} &= x < y + b_{in}
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
  • b_in: Input borrow flag
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
  • b_out: Output borrow flag
  • +
+

fn isub_ifborrow(self, x: Value, y: Value, b_in: Value) -> (Value, Value)

Subtract integers with borrow in and out.

+

Same as isub with an additional borrow flag input and output.

+
    a &= x - (y + b_{in}) \pmod 2^B \\
+    b_{out} &= x < y + b_{in}
+
+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • y: A scalar integer type
  • +
  • b_in: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
  • b_out: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

fn band(self, x: Value, y: Value) -> Value

Bitwise and.

+

Inputs:

+
    +
  • x: Any integer, float, or boolean scalar or vector type
  • +
  • y: Any integer, float, or boolean scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, or boolean scalar or vector type
  • +
+

fn bor(self, x: Value, y: Value) -> Value

Bitwise or.

+

Inputs:

+
    +
  • x: Any integer, float, or boolean scalar or vector type
  • +
  • y: Any integer, float, or boolean scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, or boolean scalar or vector type
  • +
+

fn bxor(self, x: Value, y: Value) -> Value

Bitwise xor.

+

Inputs:

+
    +
  • x: Any integer, float, or boolean scalar or vector type
  • +
  • y: Any integer, float, or boolean scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, or boolean scalar or vector type
  • +
+

fn bnot(self, x: Value) -> Value

Bitwise not.

+

Inputs:

+
    +
  • x: Any integer, float, or boolean scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, or boolean scalar or vector type
  • +
+

fn band_not(self, x: Value, y: Value) -> Value

Bitwise and not.

+

Computes x & ~y.

+

Inputs:

+
    +
  • x: Any integer, float, or boolean scalar or vector type
  • +
  • y: Any integer, float, or boolean scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, or boolean scalar or vector type
  • +
+

fn bor_not(self, x: Value, y: Value) -> Value

Bitwise or not.

+

Computes x | ~y.

+

Inputs:

+
    +
  • x: Any integer, float, or boolean scalar or vector type
  • +
  • y: Any integer, float, or boolean scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, or boolean scalar or vector type
  • +
+

fn bxor_not(self, x: Value, y: Value) -> Value

Bitwise xor not.

+

Computes x ^ ~y.

+

Inputs:

+
    +
  • x: Any integer, float, or boolean scalar or vector type
  • +
  • y: Any integer, float, or boolean scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Any integer, float, or boolean scalar or vector type
  • +
+

fn band_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Bitwise and with immediate.

+

Same as band, but one operand is an immediate constant.

+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn bor_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Bitwise or with immediate.

+

Same as bor, but one operand is an immediate constant.

+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn bxor_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Bitwise xor with immediate.

+

Same as bxor, but one operand is an immediate constant.

+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn rotl(self, x: Value, y: Value) -> Value

Rotate left.

+

Rotate the bits in x by y places.

+

Inputs:

+
    +
  • x: Scalar or vector value to shift
  • +
  • y: Number of bits to shift
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn rotr(self, x: Value, y: Value) -> Value

Rotate right.

+

Rotate the bits in x by y places.

+

Inputs:

+
    +
  • x: Scalar or vector value to shift
  • +
  • y: Number of bits to shift
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn rotl_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Rotate left by immediate.

+

Inputs:

+
    +
  • x: Scalar or vector value to shift
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn rotr_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Rotate right by immediate.

+

Inputs:

+
    +
  • x: Scalar or vector value to shift
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn ishl(self, x: Value, y: Value) -> Value

Integer shift left. Shift the bits in x towards the MSB by y +places. Shift in zero bits to the LSB.

+

The shift amount is masked to the size of x.

+

When shifting a B-bits integer type, this instruction computes:

+
    s &:= y \pmod B,
+    a &:= x \cdot 2^s \pmod{2^B}.
+
+

Inputs:

+
    +
  • x: Scalar or vector value to shift
  • +
  • y: Number of bits to shift
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn ushr(self, x: Value, y: Value) -> Value

Unsigned shift right. Shift bits in x towards the LSB by y +places, shifting in zero bits to the MSB. Also called a logical +shift.

+

The shift amount is masked to the size of the register.

+

When shifting a B-bits integer type, this instruction computes:

+
    s &:= y \pmod B,
+    a &:= \lfloor x \cdot 2^{-s} \rfloor.
+
+

Inputs:

+
    +
  • x: Scalar or vector value to shift
  • +
  • y: Number of bits to shift
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn sshr(self, x: Value, y: Value) -> Value

Signed shift right. Shift bits in x towards the LSB by y +places, shifting in sign bits to the MSB. Also called an arithmetic +shift.

+

The shift amount is masked to the size of the register.

+

Inputs:

+
    +
  • x: Scalar or vector value to shift
  • +
  • y: Number of bits to shift
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn ishl_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Integer shift left by immediate.

+

The shift amount is masked to the size of x.

+

Inputs:

+
    +
  • x: Scalar or vector value to shift
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn ushr_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Unsigned shift right by immediate.

+

The shift amount is masked to the size of the register.

+

Inputs:

+
    +
  • x: Scalar or vector value to shift
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn sshr_imm<T1>(self, x: Value, Y: T1) -> Value where
    T1: Into<Imm64>, 

Signed shift right by immediate.

+

The shift amount is masked to the size of the register.

+

Inputs:

+
    +
  • x: Scalar or vector value to shift
  • +
  • Y: A 64-bit immediate integer.
  • +
+

Outputs:

+
    +
  • a: A scalar or vector integer type
  • +
+

fn bitrev(self, x: Value) -> Value

Reverse the bits of a integer.

+

Reverses the bits in x.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn clz(self, x: Value) -> Value

Count leading zero bits.

+

Starting from the MSB in x, count the number of zero bits before +reaching the first one bit. When x is zero, returns the size of x +in bits.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn cls(self, x: Value) -> Value

Count leading sign bits.

+

Starting from the MSB after the sign bit in x, count the number of +consecutive bits identical to the sign bit. When x is 0 or -1, +returns one less than the size of x in bits.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn ctz(self, x: Value) -> Value

Count trailing zeros.

+

Starting from the LSB in x, count the number of zero bits before +reaching the first one bit. When x is zero, returns the size of x +in bits.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn popcnt(self, x: Value) -> Value

Population count

+

Count the number of one bits in x.

+

Inputs:

+
    +
  • x: A scalar integer type
  • +
+

Outputs:

+
    +
  • a: A scalar integer type
  • +
+

fn fcmp<T1>(self, Cond: T1, x: Value, y: Value) -> Value where
    T1: Into<FloatCC>, 

Floating point comparison.

+

Two IEEE 754-2008 floating point numbers, x and y, relate to each +other in exactly one of four ways:

+

== ========================================== +UN Unordered when one or both numbers is NaN. +EQ When x = y. (And 0.0 = -0.0). +LT When x < y. +GT When x > y. +== ==========================================

+

The 14 floatcc condition codes each correspond to a subset of +the four relations, except for the empty set which would always be +false, and the full set which would always be true.

+

The condition codes are divided into 7 'ordered' conditions which don't +include UN, and 7 unordered conditions which all include UN.

+

+-------+------------+---------+------------+-------------------------+ +|Ordered |Unordered |Condition | ++=======+============+=========+============+=========================+ +|ord |EQ | LT | GT|uno |UN |NaNs absent / present. | ++-------+------------+---------+------------+-------------------------+ +|eq |EQ |ueq |UN | EQ |Equal | ++-------+------------+---------+------------+-------------------------+ +|one |LT | GT |ne |UN | LT | GT|Not equal | ++-------+------------+---------+------------+-------------------------+ +|lt |LT |ult |UN | LT |Less than | ++-------+------------+---------+------------+-------------------------+ +|le |LT | EQ |ule |UN | LT | EQ|Less than or equal | ++-------+------------+---------+------------+-------------------------+ +|gt |GT |ugt |UN | GT |Greater than | ++-------+------------+---------+------------+-------------------------+ +|ge |GT | EQ |uge |UN | GT | EQ|Greater than or equal | ++-------+------------+---------+------------+-------------------------+

+

The standard C comparison operators, <, <=, >, >=, are all ordered, +so they are false if either operand is NaN. The C equality operator, +==, is ordered, and since inequality is defined as the logical +inverse it is unordered. They map to the floatcc condition +codes as follows:

+

==== ====== ============ +C Cond Subset +==== ====== ============ +== eq EQ +!= ne UN | LT | GT +< lt LT +<= le LT | EQ +> gt GT +>= ge GT | EQ +==== ====== ============

+

This subset of condition codes also corresponds to the WebAssembly +floating point comparisons of the same name.

+

When this instruction compares floating point vectors, it returns a +boolean vector with the results of lane-wise comparisons.

+

Inputs:

+
    +
  • Cond: A floating point comparison condition code
  • +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a:
  • +
+

fn ffcmp(self, x: Value, y: Value) -> Value

Floating point comparison returning flags.

+

Compares two numbers like fcmp, but returns floating point CPU +flags instead of testing a specific condition.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • f: CPU flags representing the result of a floating point comparison. These +flags can be tested with a :type:floatcc condition code.
  • +
+

fn fadd(self, x: Value, y: Value) -> Value

Floating point addition.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: Result of applying operator to each lane
  • +
+

fn fsub(self, x: Value, y: Value) -> Value

Floating point subtraction.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: Result of applying operator to each lane
  • +
+

fn fmul(self, x: Value, y: Value) -> Value

Floating point multiplication.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: Result of applying operator to each lane
  • +
+

fn fdiv(self, x: Value, y: Value) -> Value

Floating point division.

+

Unlike the integer division instructions andudiv`, this can't trap. Division by zero is infinity or +NaN, depending on the dividend.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: Result of applying operator to each lane
  • +
+

fn sqrt(self, x: Value) -> Value

Floating point square root.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: Result of applying operator to each lane
  • +
+

fn fma(self, x: Value, y: Value, z: Value) -> Value

Floating point fused multiply-and-add.

+

Computes a := xy+z without any intermediate rounding of the +product.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
  • z: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: Result of applying operator to each lane
  • +
+

fn fneg(self, x: Value) -> Value

Floating point negation.

+

Note that this is a pure bitwise operation.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: x with its sign bit inverted
  • +
+

fn fabs(self, x: Value) -> Value

Floating point absolute value.

+

Note that this is a pure bitwise operation.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: x with its sign bit cleared
  • +
+

fn fcopysign(self, x: Value, y: Value) -> Value

Floating point copy sign.

+

Note that this is a pure bitwise operation. The sign bit from y is +copied to the sign bit of x.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: x with its sign bit changed to that of y
  • +
+

fn fmin(self, x: Value, y: Value) -> Value

Floating point minimum, propagating NaNs.

+

If either operand is NaN, this returns a NaN.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: The smaller of x and y
  • +
+

fn fmax(self, x: Value, y: Value) -> Value

Floating point maximum, propagating NaNs.

+

If either operand is NaN, this returns a NaN.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: The larger of x and y
  • +
+

fn ceil(self, x: Value) -> Value

Round floating point round to integral, towards positive infinity.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: x rounded to integral value
  • +
+

fn floor(self, x: Value) -> Value

Round floating point round to integral, towards negative infinity.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: x rounded to integral value
  • +
+

fn trunc(self, x: Value) -> Value

Round floating point round to integral, towards zero.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: x rounded to integral value
  • +
+

fn nearest(self, x: Value) -> Value

Round floating point round to integral, towards nearest with ties to +even.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: x rounded to integral value
  • +
+

fn is_null(self, x: Value) -> Value

Reference verification.

+

The condition code determines if the reference type in question is +null or not.

+

Inputs:

+
    +
  • x: A scalar reference type
  • +
+

Outputs:

+
    +
  • a: A boolean type with 1 bits.
  • +
+

fn is_invalid(self, x: Value) -> Value

Reference verification.

+

The condition code determines if the reference type in question is +invalid or not.

+

Inputs:

+
    +
  • x: A scalar reference type
  • +
+

Outputs:

+
    +
  • a: A boolean type with 1 bits.
  • +
+

fn trueif<T1>(self, Cond: T1, f: Value) -> Value where
    T1: Into<IntCC>, 

Test integer CPU flags for a specific condition.

+

Check the CPU flags in f against the Cond condition code and +return true when the condition code is satisfied.

+

Inputs:

+
    +
  • Cond: An integer comparison condition code.
  • +
  • f: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

Outputs:

+
    +
  • a: A boolean type with 1 bits.
  • +
+

fn trueff<T1>(self, Cond: T1, f: Value) -> Value where
    T1: Into<FloatCC>, 

Test floating point CPU flags for a specific condition.

+

Check the CPU flags in f against the Cond condition code and +return true when the condition code is satisfied.

+

Inputs:

+
    +
  • Cond: A floating point comparison condition code
  • +
  • f: CPU flags representing the result of a floating point comparison. These +flags can be tested with a :type:floatcc condition code.
  • +
+

Outputs:

+
    +
  • a: A boolean type with 1 bits.
  • +
+

fn bitcast(self, MemTo: Type, x: Value) -> Value

Reinterpret the bits in x as a different type.

+

The input and output types must be storable to memory and of the same +size. A bitcast is equivalent to storing one type and loading the other +type from the same address.

+

Inputs:

+
    +
  • MemTo (controlling type variable):
  • +
  • x: Any type that can be stored in memory
  • +
+

Outputs:

+
    +
  • a: Bits of x reinterpreted
  • +
+

fn raw_bitcast(self, AnyTo: Type, x: Value) -> Value

Cast the bits in x as a different type of the same bit width.

+

This instruction does not change the data's representation but allows +data in registers to be used as different types, e.g. an i32x4 as a +b8x16. The only constraint on the result a is that it can be +raw_bitcast back to the original type. Also, in a raw_bitcast between +vector types with the same number of lanes, the value of each result +lane is a raw_bitcast of the corresponding operand lane. TODO there is +currently no mechanism for enforcing the bit width constraint.

+

Inputs:

+
    +
  • AnyTo (controlling type variable):
  • +
  • x: Any integer, float, boolean, or reference scalar or vector type
  • +
+

Outputs:

+
    +
  • a: Bits of x reinterpreted
  • +
+

fn scalar_to_vector(self, TxN: Type, s: Value) -> Value

Scalar To Vector -- move a value out of a scalar register and into a vector register; the +scalar will be moved to the lowest-order bits of the vector register. Note that this +instruction is intended as a low-level legalization instruction and frontends should prefer +insertlane; on certain architectures, scalar_to_vector may zero the highest-order bits for some +types (e.g. integers) but not for others (e.g. floats).

+

Inputs:

+
    +
  • TxN (controlling type variable): A SIMD vector type
  • +
  • s: A scalar value
  • +
+

Outputs:

+
    +
  • a: A vector value
  • +
+

fn breduce(self, BoolTo: Type, x: Value) -> Value

Convert x to a smaller boolean type in the platform-defined way.

+

The result type must have the same number of vector lanes as the input, +and each lane must not have more bits that the input lanes. If the +input and output types are the same, this is a no-op.

+

Inputs:

+
    +
  • BoolTo (controlling type variable): A smaller boolean type with the same number of lanes
  • +
  • x: A scalar or vector boolean type
  • +
+

Outputs:

+
    +
  • a: A smaller boolean type with the same number of lanes
  • +
+

fn bextend(self, BoolTo: Type, x: Value) -> Value

Convert x to a larger boolean type in the platform-defined way.

+

The result type must have the same number of vector lanes as the input, +and each lane must not have fewer bits that the input lanes. If the +input and output types are the same, this is a no-op.

+

Inputs:

+
    +
  • BoolTo (controlling type variable): A larger boolean type with the same number of lanes
  • +
  • x: A scalar or vector boolean type
  • +
+

Outputs:

+
    +
  • a: A larger boolean type with the same number of lanes
  • +
+

fn bint(self, IntTo: Type, x: Value) -> Value

Convert x to an integer.

+

True maps to 1 and false maps to 0. The result type must have the same +number of vector lanes as the input.

+

Inputs:

+
    +
  • IntTo (controlling type variable): An integer type with the same number of lanes
  • +
  • x: A scalar or vector boolean type
  • +
+

Outputs:

+
    +
  • a: An integer type with the same number of lanes
  • +
+

fn bmask(self, IntTo: Type, x: Value) -> Value

Convert x to an integer mask.

+

True maps to all 1s and false maps to all 0s. The result type must have +the same number of vector lanes as the input.

+

Inputs:

+
    +
  • IntTo (controlling type variable): An integer type with the same number of lanes
  • +
  • x: A scalar or vector boolean type
  • +
+

Outputs:

+
    +
  • a: An integer type with the same number of lanes
  • +
+

fn ireduce(self, IntTo: Type, x: Value) -> Value

Convert x to a smaller integer type by dropping high bits.

+

Each lane in x is converted to a smaller integer type by discarding +the most significant bits. This is the same as reducing modulo +2^n.

+

The result type must have the same number of vector lanes as the input, +and each lane must not have more bits that the input lanes. If the +input and output types are the same, this is a no-op.

+

Inputs:

+
    +
  • IntTo (controlling type variable): A smaller integer type with the same number of lanes
  • +
  • x: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A smaller integer type with the same number of lanes
  • +
+

fn uextend(self, IntTo: Type, x: Value) -> Value

Convert x to a larger integer type by zero-extending.

+

Each lane in x is converted to a larger integer type by adding +zeroes. The result has the same numerical value as x when both are +interpreted as unsigned integers.

+

The result type must have the same number of vector lanes as the input, +and each lane must not have fewer bits that the input lanes. If the +input and output types are the same, this is a no-op.

+

Inputs:

+
    +
  • IntTo (controlling type variable): A larger integer type with the same number of lanes
  • +
  • x: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A larger integer type with the same number of lanes
  • +
+

fn sextend(self, IntTo: Type, x: Value) -> Value

Convert x to a larger integer type by sign-extending.

+

Each lane in x is converted to a larger integer type by replicating +the sign bit. The result has the same numerical value as x when both +are interpreted as signed integers.

+

The result type must have the same number of vector lanes as the input, +and each lane must not have fewer bits that the input lanes. If the +input and output types are the same, this is a no-op.

+

Inputs:

+
    +
  • IntTo (controlling type variable): A larger integer type with the same number of lanes
  • +
  • x: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A larger integer type with the same number of lanes
  • +
+

fn fpromote(self, FloatTo: Type, x: Value) -> Value

Convert x to a larger floating point format.

+

Each lane in x is converted to the destination floating point format. +This is an exact operation.

+

Cranelift currently only supports two floating point formats

+
    +
  • f32 and f64. This may change in the future.
  • +
+

The result type must have the same number of vector lanes as the input, +and the result lanes must not have fewer bits than the input lanes. If +the input and output types are the same, this is a no-op.

+

Inputs:

+
    +
  • FloatTo (controlling type variable): A scalar or vector floating point number
  • +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: A scalar or vector floating point number
  • +
+

fn fdemote(self, FloatTo: Type, x: Value) -> Value

Convert x to a smaller floating point format.

+

Each lane in x is converted to the destination floating point format +by rounding to nearest, ties to even.

+

Cranelift currently only supports two floating point formats

+
    +
  • f32 and f64. This may change in the future.
  • +
+

The result type must have the same number of vector lanes as the input, +and the result lanes must not have more bits than the input lanes. If +the input and output types are the same, this is a no-op.

+

Inputs:

+
    +
  • FloatTo (controlling type variable): A scalar or vector floating point number
  • +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: A scalar or vector floating point number
  • +
+

fn fcvt_to_uint(self, IntTo: Type, x: Value) -> Value

Convert floating point to unsigned integer.

+

Each lane in x is converted to an unsigned integer by rounding +towards zero. If x is NaN or if the unsigned integral value cannot be +represented in the result type, this instruction traps.

+

The result type must have the same number of vector lanes as the input.

+

Inputs:

+
    +
  • IntTo (controlling type variable): A larger integer type with the same number of lanes
  • +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: A larger integer type with the same number of lanes
  • +
+

fn fcvt_to_uint_sat(self, IntTo: Type, x: Value) -> Value

Convert floating point to unsigned integer as fcvt_to_uint does, but +saturates the input instead of trapping. NaN and negative values are +converted to 0.

+

Inputs:

+
    +
  • IntTo (controlling type variable): A larger integer type with the same number of lanes
  • +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: A larger integer type with the same number of lanes
  • +
+

fn fcvt_to_sint(self, IntTo: Type, x: Value) -> Value

Convert floating point to signed integer.

+

Each lane in x is converted to a signed integer by rounding towards +zero. If x is NaN or if the signed integral value cannot be +represented in the result type, this instruction traps.

+

The result type must have the same number of vector lanes as the input.

+

Inputs:

+
    +
  • IntTo (controlling type variable): A larger integer type with the same number of lanes
  • +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: A larger integer type with the same number of lanes
  • +
+

fn fcvt_to_sint_sat(self, IntTo: Type, x: Value) -> Value

Convert floating point to signed integer as fcvt_to_sint does, but +saturates the input instead of trapping. NaN values are converted to 0.

+

Inputs:

+
    +
  • IntTo (controlling type variable): A larger integer type with the same number of lanes
  • +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: A larger integer type with the same number of lanes
  • +
+

fn fcvt_from_uint(self, FloatTo: Type, x: Value) -> Value

Convert unsigned integer to floating point.

+

Each lane in x is interpreted as an unsigned integer and converted to +floating point using round to nearest, ties to even.

+

The result type must have the same number of vector lanes as the input.

+

Inputs:

+
    +
  • FloatTo (controlling type variable): A scalar or vector floating point number
  • +
  • x: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector floating point number
  • +
+

fn fcvt_from_sint(self, FloatTo: Type, x: Value) -> Value

Convert signed integer to floating point.

+

Each lane in x is interpreted as a signed integer and converted to +floating point using round to nearest, ties to even.

+

The result type must have the same number of vector lanes as the input.

+

Inputs:

+
    +
  • FloatTo (controlling type variable): A scalar or vector floating point number
  • +
  • x: A scalar or vector integer type
  • +
+

Outputs:

+
    +
  • a: A scalar or vector floating point number
  • +
+

fn isplit(self, x: Value) -> (Value, Value)

Split an integer into low and high parts.

+

Vectors of integers are split lane-wise, so the results have the same +number of lanes as the input, but the lanes are half the size.

+

Returns the low half of x and the high half of x as two independent +values.

+

Inputs:

+
    +
  • x: An integer type with lanes from i16 upwards
  • +
+

Outputs:

+
    +
  • lo: The low bits of x
  • +
  • hi: The high bits of x
  • +
+

fn iconcat(self, lo: Value, hi: Value) -> Value

Concatenate low and high bits to form a larger integer type.

+

Vectors of integers are concatenated lane-wise such that the result has +the same number of lanes as the inputs, but the lanes are twice the +size.

+

Inputs:

+
    +
  • lo: An integer type with lanes type to i64
  • +
  • hi: An integer type with lanes type to i64
  • +
+

Outputs:

+
    +
  • a: The concatenation of lo and hi
  • +
+

fn x86_udivmodx(self, nlo: Value, nhi: Value, d: Value) -> (Value, Value)

Extended unsigned division.

+

Concatenate the bits in nhi and nlo to form the numerator. +Interpret the bits as an unsigned number and divide by the unsigned +denominator d. Trap when d is zero or if the quotient is larger +than the range of the output.

+

Return both quotient and remainder.

+

Inputs:

+
    +
  • nlo: Low part of numerator
  • +
  • nhi: High part of numerator
  • +
  • d: Denominator
  • +
+

Outputs:

+
    +
  • q: Quotient
  • +
  • r: Remainder
  • +
+

fn x86_sdivmodx(self, nlo: Value, nhi: Value, d: Value) -> (Value, Value)

Extended signed division.

+

Concatenate the bits in nhi and nlo to form the numerator. +Interpret the bits as a signed number and divide by the signed +denominator d. Trap when d is zero or if the quotient is outside +the range of the output.

+

Return both quotient and remainder.

+

Inputs:

+
    +
  • nlo: Low part of numerator
  • +
  • nhi: High part of numerator
  • +
  • d: Denominator
  • +
+

Outputs:

+
    +
  • q: Quotient
  • +
  • r: Remainder
  • +
+

fn x86_umulx(self, argL: Value, argR: Value) -> (Value, Value)

Unsigned integer multiplication, producing a double-length result.

+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • argL: A scalar integer machine word
  • +
  • argR: A scalar integer machine word
  • +
+

Outputs:

+
    +
  • resLo: A scalar integer machine word
  • +
  • resHi: A scalar integer machine word
  • +
+

fn x86_smulx(self, argL: Value, argR: Value) -> (Value, Value)

Signed integer multiplication, producing a double-length result.

+

Polymorphic over all scalar integer types, but does not support vector +types.

+

Inputs:

+
    +
  • argL: A scalar integer machine word
  • +
  • argR: A scalar integer machine word
  • +
+

Outputs:

+
    +
  • resLo: A scalar integer machine word
  • +
  • resHi: A scalar integer machine word
  • +
+

fn x86_cvtt2si(self, IntTo: Type, x: Value) -> Value

Convert with truncation floating point to signed integer.

+

The source floating point operand is converted to a signed integer by +rounding towards zero. If the result can't be represented in the output +type, returns the smallest signed value the output type can represent.

+

This instruction does not trap.

+

Inputs:

+
    +
  • IntTo (controlling type variable): An integer type with the same number of lanes
  • +
  • x: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: An integer type with the same number of lanes
  • +
+

fn x86_fmin(self, x: Value, y: Value) -> Value

Floating point minimum with x86 semantics.

+

This is equivalent to the C ternary operator x < y ? x : y which +differs from fmin when either operand is NaN or when comparing ++0.0 to -0.0.

+

When the two operands don't compare as LT, y is returned unchanged, +even if it is a signalling NaN.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: A scalar or vector floating point number
  • +
+

fn x86_fmax(self, x: Value, y: Value) -> Value

Floating point maximum with x86 semantics.

+

This is equivalent to the C ternary operator x > y ? x : y which +differs from fmax when either operand is NaN or when comparing ++0.0 to -0.0.

+

When the two operands don't compare as GT, y is returned unchanged, +even if it is a signalling NaN.

+

Inputs:

+
    +
  • x: A scalar or vector floating point number
  • +
  • y: A scalar or vector floating point number
  • +
+

Outputs:

+
    +
  • a: A scalar or vector floating point number
  • +
+

fn x86_push(self, x: Value) -> Inst

Pushes a value onto the stack.

+

Decrements the stack pointer and stores the specified value on to the top.

+

This is polymorphic in i32 and i64. However, it is only implemented for i64 +in 64-bit mode, and only for i32 in 32-bit mode.

+

Inputs:

+
    +
  • x: A scalar integer machine word
  • +
+

fn x86_pop(self, iWord: Type) -> Value

Pops a value from the stack.

+

Loads a value from the top of the stack and then increments the stack +pointer.

+

This is polymorphic in i32 and i64. However, it is only implemented for i64 +in 64-bit mode, and only for i32 in 32-bit mode.

+

Inputs:

+
    +
  • iWord (controlling type variable): A scalar integer machine word
  • +
+

Outputs:

+
    +
  • x: A scalar integer machine word
  • +
+

fn x86_bsr(self, x: Value) -> (Value, Value)

Bit Scan Reverse -- returns the bit-index of the most significant 1 +in the word. Result is undefined if the argument is zero. However, it +sets the Z flag depending on the argument, so it is at least easy to +detect and handle that case.

+

This is polymorphic in i32 and i64. It is implemented for both i64 and +i32 in 64-bit mode, and only for i32 in 32-bit mode.

+

Inputs:

+
    +
  • x: A scalar integer machine word
  • +
+

Outputs:

+
    +
  • y: A scalar integer machine word
  • +
  • rflags: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

fn x86_bsf(self, x: Value) -> (Value, Value)

Bit Scan Forwards -- returns the bit-index of the least significant 1 +in the word. Is otherwise identical to 'bsr', just above.

+

Inputs:

+
    +
  • x: A scalar integer machine word
  • +
+

Outputs:

+
    +
  • y: A scalar integer machine word
  • +
  • rflags: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

fn x86_pshufd<T1>(self, a: Value, i: T1) -> Value where
    T1: Into<u8>, 

Packed Shuffle Doublewords -- copies data from either memory or lanes in an extended +register and re-orders the data according to the passed immediate byte.

+

Inputs:

+
    +
  • a: A vector value (i.e. held in an XMM register)
  • +
  • i: An ordering operand controlling the copying of data from the source to the destination; see PSHUFD in Intel manual for details
  • +
+

Outputs:

+
    +
  • a: A vector value (i.e. held in an XMM register)
  • +
+

fn x86_pshufb(self, a: Value, b: Value) -> Value

Packed Shuffle Bytes -- re-orders data in an extended register using a shuffle +mask from either memory or another extended register

+

Inputs:

+
    +
  • a: A vector value (i.e. held in an XMM register)
  • +
  • b: A vector value (i.e. held in an XMM register)
  • +
+

Outputs:

+
    +
  • a: A vector value (i.e. held in an XMM register)
  • +
+

fn x86_pextr<T1>(self, x: Value, Idx: T1) -> Value where
    T1: Into<u8>, 

Extract lane Idx from x. +The lane index, Idx, is an immediate value, not an SSA value. It +must indicate a valid lane index for the type of x.

+

Inputs:

+
    +
  • x: A SIMD vector type
  • +
  • Idx: Lane index
  • +
+

Outputs:

+
    +
  • a:
  • +
+

fn x86_pinsr<T1>(self, x: Value, Idx: T1, y: Value) -> Value where
    T1: Into<u8>, 

Insert y into x at lane Idx. +The lane index, Idx, is an immediate value, not an SSA value. It +must indicate a valid lane index for the type of x.

+

Inputs:

+
    +
  • x: A SIMD vector type containing only booleans and integers
  • +
  • Idx: Lane index
  • +
  • y: New lane value
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type containing only booleans and integers
  • +
+

fn x86_insertps<T1>(self, x: Value, Idx: T1, y: Value) -> Value where
    T1: Into<u8>, 

Insert a lane of y into x at using Idx to encode both which lane the value is +extracted from and which it is inserted to. This is similar to x86_pinsr but inserts +floats, which are already stored in an XMM register.

+

Inputs:

+
    +
  • x: A SIMD vector type containing floats
  • +
  • Idx: Lane index
  • +
  • y: New lane value
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type containing floats
  • +
+

fn x86_movsd(self, x: Value, y: Value) -> Value

Move the low 64 bits of the float vector y to the low 64 bits of float vector x

+

Inputs:

+
    +
  • x: A SIMD vector type containing floats
  • +
  • y: A SIMD vector type containing floats
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type containing floats
  • +
+

fn x86_movlhps(self, x: Value, y: Value) -> Value

Move the low 64 bits of the float vector y to the high 64 bits of float vector x

+

Inputs:

+
    +
  • x: A SIMD vector type containing floats
  • +
  • y: A SIMD vector type containing floats
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type containing floats
  • +
+

fn x86_psll(self, x: Value, y: Value) -> Value

Shift Packed Data Left Logical -- This implements the behavior of the shared instruction +ishl but alters the shift operand to live in an XMM register as expected by the PSLL* +family of instructions.

+

Inputs:

+
    +
  • x: Vector value to shift
  • +
  • y: Number of bits to shift
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type containing integers
  • +
+

fn x86_psrl(self, x: Value, y: Value) -> Value

Shift Packed Data Right Logical -- This implements the behavior of the shared instruction +ushr but alters the shift operand to live in an XMM register as expected by the PSRL* +family of instructions.

+

Inputs:

+
    +
  • x: Vector value to shift
  • +
  • y: Number of bits to shift
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type containing integers
  • +
+

fn x86_psra(self, x: Value, y: Value) -> Value

Shift Packed Data Right Arithmetic -- This implements the behavior of the shared +instruction sshr but alters the shift operand to live in an XMM register as expected by +the PSRA* family of instructions.

+

Inputs:

+
    +
  • x: Vector value to shift
  • +
  • y: Number of bits to shift
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type containing integers
  • +
+

fn x86_ptest(self, x: Value, y: Value) -> Value

Logical Compare -- PTEST will set the ZF flag if all bits in the result are 0 of the +bitwise AND of the first source operand (first operand) and the second source operand +(second operand). PTEST sets the CF flag if all bits in the result are 0 of the bitwise +AND of the second source operand (second operand) and the logical NOT of the destination +operand (first operand).

+

Inputs:

+
    +
  • x: A SIMD vector type
  • +
  • y: A SIMD vector type
  • +
+

Outputs:

+
    +
  • f: CPU flags representing the result of an integer comparison. These flags +can be tested with an :type:intcc condition code.
  • +
+

fn x86_pmaxs(self, x: Value, y: Value) -> Value

Maximum of Packed Signed Integers -- Compare signed integers in the first and second +operand and return the maximum values.

+

Inputs:

+
    +
  • x: A SIMD vector type containing integers
  • +
  • y: A SIMD vector type containing integers
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type containing integers
  • +
+

fn x86_pmaxu(self, x: Value, y: Value) -> Value

Maximum of Packed Unsigned Integers -- Compare unsigned integers in the first and second +operand and return the maximum values.

+

Inputs:

+
    +
  • x: A SIMD vector type containing integers
  • +
  • y: A SIMD vector type containing integers
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type containing integers
  • +
+

fn x86_pmins(self, x: Value, y: Value) -> Value

Minimum of Packed Signed Integers -- Compare signed integers in the first and second +operand and return the minimum values.

+

Inputs:

+
    +
  • x: A SIMD vector type containing integers
  • +
  • y: A SIMD vector type containing integers
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type containing integers
  • +
+

fn x86_pminu(self, x: Value, y: Value) -> Value

Minimum of Packed Unsigned Integers -- Compare unsigned integers in the first and second +operand and return the minimum values.

+

Inputs:

+
    +
  • x: A SIMD vector type containing integers
  • +
  • y: A SIMD vector type containing integers
  • +
+

Outputs:

+
    +
  • a: A SIMD vector type containing integers
  • +
+

fn Binary(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    arg0: Value,
    arg1: Value
) -> (Inst, &'f mut DataFlowGraph)

Binary(imms=(), vals=2)

+

fn BinaryImm(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    imm: Imm64,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

BinaryImm(imms=(imm: ir::immediates::Imm64), vals=1)

+

fn Branch(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    destination: Block,
    args: EntityList<Value>
) -> (Inst, &'f mut DataFlowGraph)

Branch(imms=(destination: ir::Block), vals=1)

+

fn BranchFloat(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    cond: FloatCC,
    destination: Block,
    args: EntityList<Value>
) -> (Inst, &'f mut DataFlowGraph)

BranchFloat(imms=(cond: ir::condcodes::FloatCC, destination: ir::Block), vals=1)

+

fn BranchIcmp(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    cond: IntCC,
    destination: Block,
    args: EntityList<Value>
) -> (Inst, &'f mut DataFlowGraph)

BranchIcmp(imms=(cond: ir::condcodes::IntCC, destination: ir::Block), vals=2)

+

fn BranchInt(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    cond: IntCC,
    destination: Block,
    args: EntityList<Value>
) -> (Inst, &'f mut DataFlowGraph)

BranchInt(imms=(cond: ir::condcodes::IntCC, destination: ir::Block), vals=1)

+

fn BranchTable(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    destination: Block,
    table: JumpTable,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

BranchTable(imms=(destination: ir::Block, table: ir::JumpTable), vals=1)

+

fn BranchTableBase(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    table: JumpTable
) -> (Inst, &'f mut DataFlowGraph)

BranchTableBase(imms=(table: ir::JumpTable), vals=0)

+

fn BranchTableEntry(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    imm: u8,
    table: JumpTable,
    arg0: Value,
    arg1: Value
) -> (Inst, &'f mut DataFlowGraph)

BranchTableEntry(imms=(imm: ir::immediates::Uimm8, table: ir::JumpTable), vals=2)

+

fn Call(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    func_ref: FuncRef,
    args: EntityList<Value>
) -> (Inst, &'f mut DataFlowGraph)

Call(imms=(func_ref: ir::FuncRef), vals=0)

+

fn CallIndirect(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    sig_ref: SigRef,
    args: EntityList<Value>
) -> (Inst, &'f mut DataFlowGraph)

CallIndirect(imms=(sig_ref: ir::SigRef), vals=1)

+

fn CondTrap(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    code: TrapCode,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

CondTrap(imms=(code: ir::TrapCode), vals=1)

+

fn CopySpecial(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    src: u16,
    dst: u16
) -> (Inst, &'f mut DataFlowGraph)

CopySpecial(imms=(src: isa::RegUnit, dst: isa::RegUnit), vals=0)

+

fn CopyToSsa(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    src: u16
) -> (Inst, &'f mut DataFlowGraph)

CopyToSsa(imms=(src: isa::RegUnit), vals=0)

+

fn ExtractLane(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    lane: u8,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

ExtractLane(imms=(lane: ir::immediates::Uimm8), vals=1)

+

fn FloatCompare(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    cond: FloatCC,
    arg0: Value,
    arg1: Value
) -> (Inst, &'f mut DataFlowGraph)

FloatCompare(imms=(cond: ir::condcodes::FloatCC), vals=2)

+

fn FloatCond(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    cond: FloatCC,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

FloatCond(imms=(cond: ir::condcodes::FloatCC), vals=1)

+

fn FloatCondTrap(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    cond: FloatCC,
    code: TrapCode,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

FloatCondTrap(imms=(cond: ir::condcodes::FloatCC, code: ir::TrapCode), vals=1)

+

fn FuncAddr(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    func_ref: FuncRef
) -> (Inst, &'f mut DataFlowGraph)

FuncAddr(imms=(func_ref: ir::FuncRef), vals=0)

+

fn HeapAddr(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    heap: Heap,
    imm: Uimm32,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

HeapAddr(imms=(heap: ir::Heap, imm: ir::immediates::Uimm32), vals=1)

+

fn IndirectJump(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    table: JumpTable,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

IndirectJump(imms=(table: ir::JumpTable), vals=1)

+

fn InsertLane(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    lane: u8,
    arg0: Value,
    arg1: Value
) -> (Inst, &'f mut DataFlowGraph)

InsertLane(imms=(lane: ir::immediates::Uimm8), vals=2)

+

fn IntCompare(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    cond: IntCC,
    arg0: Value,
    arg1: Value
) -> (Inst, &'f mut DataFlowGraph)

IntCompare(imms=(cond: ir::condcodes::IntCC), vals=2)

+

fn IntCompareImm(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    cond: IntCC,
    imm: Imm64,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

IntCompareImm(imms=(cond: ir::condcodes::IntCC, imm: ir::immediates::Imm64), vals=1)

+

fn IntCond(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    cond: IntCC,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

IntCond(imms=(cond: ir::condcodes::IntCC), vals=1)

+

fn IntCondTrap(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    cond: IntCC,
    code: TrapCode,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

IntCondTrap(imms=(cond: ir::condcodes::IntCC, code: ir::TrapCode), vals=1)

+

fn IntSelect(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    cond: IntCC,
    arg0: Value,
    arg1: Value,
    arg2: Value
) -> (Inst, &'f mut DataFlowGraph)

IntSelect(imms=(cond: ir::condcodes::IntCC), vals=3)

+

fn Jump(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    destination: Block,
    args: EntityList<Value>
) -> (Inst, &'f mut DataFlowGraph)

Jump(imms=(destination: ir::Block), vals=0)

+

fn Load(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    flags: MemFlags,
    offset: Offset32,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

Load(imms=(flags: ir::MemFlags, offset: ir::immediates::Offset32), vals=1)

+

fn LoadComplex(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    flags: MemFlags,
    offset: Offset32,
    args: EntityList<Value>
) -> (Inst, &'f mut DataFlowGraph)

LoadComplex(imms=(flags: ir::MemFlags, offset: ir::immediates::Offset32), vals=0)

+

fn MultiAry(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    args: EntityList<Value>
) -> (Inst, &'f mut DataFlowGraph)

MultiAry(imms=(), vals=0)

+

fn NullAry(
    self,
    opcode: Opcode,
    ctrl_typevar: Type
) -> (Inst, &'f mut DataFlowGraph)

NullAry(imms=(), vals=0)

+

fn RegFill(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    src: StackSlot,
    dst: u16,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

RegFill(imms=(src: ir::StackSlot, dst: isa::RegUnit), vals=1)

+

fn RegMove(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    src: u16,
    dst: u16,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

RegMove(imms=(src: isa::RegUnit, dst: isa::RegUnit), vals=1)

+

fn RegSpill(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    src: u16,
    dst: StackSlot,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

RegSpill(imms=(src: isa::RegUnit, dst: ir::StackSlot), vals=1)

+

fn Shuffle(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    mask: Immediate,
    arg0: Value,
    arg1: Value
) -> (Inst, &'f mut DataFlowGraph)

Shuffle(imms=(mask: ir::Immediate), vals=2)

+

fn StackLoad(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    stack_slot: StackSlot,
    offset: Offset32
) -> (Inst, &'f mut DataFlowGraph)

StackLoad(imms=(stack_slot: ir::StackSlot, offset: ir::immediates::Offset32), vals=0)

+

fn StackStore(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    stack_slot: StackSlot,
    offset: Offset32,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

StackStore(imms=(stack_slot: ir::StackSlot, offset: ir::immediates::Offset32), vals=1)

+

fn Store(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    flags: MemFlags,
    offset: Offset32,
    arg0: Value,
    arg1: Value
) -> (Inst, &'f mut DataFlowGraph)

Store(imms=(flags: ir::MemFlags, offset: ir::immediates::Offset32), vals=2)

+

fn StoreComplex(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    flags: MemFlags,
    offset: Offset32,
    args: EntityList<Value>
) -> (Inst, &'f mut DataFlowGraph)

StoreComplex(imms=(flags: ir::MemFlags, offset: ir::immediates::Offset32), vals=1)

+

fn TableAddr(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    table: Table,
    offset: Offset32,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

TableAddr(imms=(table: ir::Table, offset: ir::immediates::Offset32), vals=1)

+

fn Ternary(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    arg0: Value,
    arg1: Value,
    arg2: Value
) -> (Inst, &'f mut DataFlowGraph)

Ternary(imms=(), vals=3)

+

fn Trap(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    code: TrapCode
) -> (Inst, &'f mut DataFlowGraph)

Trap(imms=(code: ir::TrapCode), vals=0)

+

fn Unary(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    arg0: Value
) -> (Inst, &'f mut DataFlowGraph)

Unary(imms=(), vals=1)

+

fn UnaryBool(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    imm: bool
) -> (Inst, &'f mut DataFlowGraph)

UnaryBool(imms=(imm: bool), vals=0)

+

fn UnaryConst(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    constant_handle: Constant
) -> (Inst, &'f mut DataFlowGraph)

UnaryConst(imms=(constant_handle: ir::Constant), vals=0)

+

fn UnaryGlobalValue(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    global_value: GlobalValue
) -> (Inst, &'f mut DataFlowGraph)

UnaryGlobalValue(imms=(global_value: ir::GlobalValue), vals=0)

+

fn UnaryIeee32(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    imm: Ieee32
) -> (Inst, &'f mut DataFlowGraph)

UnaryIeee32(imms=(imm: ir::immediates::Ieee32), vals=0)

+

fn UnaryIeee64(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    imm: Ieee64
) -> (Inst, &'f mut DataFlowGraph)

UnaryIeee64(imms=(imm: ir::immediates::Ieee64), vals=0)

+

fn UnaryImm(
    self,
    opcode: Opcode,
    ctrl_typevar: Type,
    imm: Imm64
) -> (Inst, &'f mut DataFlowGraph)

UnaryImm(imms=(imm: ir::immediates::Imm64), vals=0)

+
Loading content... +

Implementors

impl<'f, T> InstBuilder<'f> for T where
    T: InstBuilderBase<'f>, 

Any type implementing InstBuilderBase gets all the InstBuilder methods for free.

+
Loading content...
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/sidebar-items.js b/api/wasmtime_jit/trampoline/sidebar-items.js new file mode 100644 index 000000000000..c9ac8a7bae5e --- /dev/null +++ b/api/wasmtime_jit/trampoline/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["pretty_error","Pretty-print a Cranelift error."]],"mod":[["binemit",""],["ir",""]],"struct":[["Context","Persistent data structures and compilation pipeline."],["FunctionBuilder","Temporary object used to build a single Cranelift IR `Function`."],["FunctionBuilderContext","Structure used for translating a series of functions into Cranelift IR."]]}); \ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/struct.Context.html b/api/wasmtime_jit/trampoline/struct.Context.html new file mode 100644 index 000000000000..d03ea46be6c7 --- /dev/null +++ b/api/wasmtime_jit/trampoline/struct.Context.html @@ -0,0 +1,82 @@ +wasmtime_jit::trampoline::Context - Rust

[]Struct wasmtime_jit::trampoline::Context

pub struct Context {
+    pub func: Function,
+    pub cfg: ControlFlowGraph,
+    pub domtree: DominatorTree,
+    pub regalloc: Context,
+    pub loop_analysis: LoopAnalysis,
+    pub redundant_reload_remover: RedundantReloadRemover,
+}

Persistent data structures and compilation pipeline.

+

+ Fields

func: Function

The function we're compiling.

+
cfg: ControlFlowGraph

The control flow graph of func.

+
domtree: DominatorTree

Dominator tree for func.

+
regalloc: Context

Register allocation context.

+
loop_analysis: LoopAnalysis

Loop analysis of func.

+
redundant_reload_remover: RedundantReloadRemover

Redundant-reload remover context.

+

Methods

impl Context

pub fn new() -> Context

Allocate a new compilation context.

+

The returned instance should be reused for compiling multiple functions in order to avoid +needless allocator thrashing.

+

pub fn for_function(func: Function) -> Context

Allocate a new compilation context with an existing Function.

+

The returned instance should be reused for compiling multiple functions in order to avoid +needless allocator thrashing.

+

pub fn clear(&mut self)

Clear all data structures in this context.

+

pub fn compile_and_emit(
    &mut self,
    isa: &dyn TargetIsa,
    mem: &mut Vec<u8>,
    relocs: &mut dyn RelocSink,
    traps: &mut dyn TrapSink,
    stackmaps: &mut dyn StackmapSink
) -> Result<CodeInfo, CodegenError>

Compile the function, and emit machine code into a Vec<u8>.

+

Run the function through all the passes necessary to generate code for the target ISA +represented by isa, as well as the final step of emitting machine code into a +Vec<u8>. The machine code is not relocated. Instead, any relocations are emitted +into relocs.

+

This function calls compile and emit_to_memory, taking care to resize mem as +needed, so it provides a safe interface.

+

Returns information about the function's code and read-only data.

+

pub fn compile(&mut self, isa: &dyn TargetIsa) -> Result<CodeInfo, CodegenError>

Compile the function.

+

Run the function through all the passes necessary to generate code for the target ISA +represented by isa. This does not include the final step of emitting machine code into a +code sink.

+

Returns information about the function's code and read-only data.

+

pub unsafe fn emit_to_memory(
    &self,
    isa: &dyn TargetIsa,
    mem: *mut u8,
    relocs: &mut dyn RelocSink,
    traps: &mut dyn TrapSink,
    stackmaps: &mut dyn StackmapSink
) -> CodeInfo

Emit machine code directly into raw memory.

+

Write all of the function's machine code to the memory at mem. The size of the machine +code is returned by compile above.

+

The machine code is not relocated. Instead, any relocations are emitted into relocs.

+

Safety

+

This function is unsafe since it does not perform bounds checking on the memory buffer, +and it can't guarantee that the mem pointer is valid.

+

Returns information about the emitted code and data.

+

pub fn emit_unwind_info(
    &self,
    isa: &dyn TargetIsa,
    kind: FrameUnwindKind,
    sink: &mut dyn FrameUnwindSink
)

Emit unwind information.

+

Requires that the function layout be calculated (see relax_branches).

+

Only some calling conventions (e.g. Windows fastcall) will have unwind information. +This is a no-op if the function has no unwind information.

+

pub fn verify<'a, FOI>(&self, fisa: FOI) -> Result<(), VerifierErrors> where
    FOI: Into<FlagsOrIsa<'a>>, 

Run the verifier on the function.

+

Also check that the dominator tree and control flow graph are consistent with the function.

+

pub fn verify_if<'a, FOI>(&self, fisa: FOI) -> Result<(), CodegenError> where
    FOI: Into<FlagsOrIsa<'a>>, 

Run the verifier only if the enable_verifier setting is true.

+

pub fn verify_locations(
    &self,
    isa: &dyn TargetIsa
) -> Result<(), VerifierErrors>

Run the locations verifier on the function.

+

pub fn verify_locations_if(
    &self,
    isa: &dyn TargetIsa
) -> Result<(), CodegenError>

Run the locations verifier only if the enable_verifier setting is true.

+

pub fn dce<'a, FOI>(&mut self, fisa: FOI) -> Result<(), CodegenError> where
    FOI: Into<FlagsOrIsa<'a>>, 

Perform dead-code elimination on the function.

+

pub fn preopt(&mut self, isa: &dyn TargetIsa) -> Result<(), CodegenError>

Perform pre-legalization rewrites on the function.

+

pub fn canonicalize_nans(
    &mut self,
    isa: &dyn TargetIsa
) -> Result<(), CodegenError>

Perform NaN canonicalizing rewrites on the function.

+

pub fn legalize(&mut self, isa: &dyn TargetIsa) -> Result<(), CodegenError>

Run the legalizer for isa on the function.

+

pub fn postopt(&mut self, isa: &dyn TargetIsa) -> Result<(), CodegenError>

Perform post-legalization rewrites on the function.

+

pub fn compute_cfg(&mut self)

Compute the control flow graph.

+

pub fn compute_domtree(&mut self)

Compute dominator tree.

+

pub fn compute_loop_analysis(&mut self)

Compute the loop analysis.

+

pub fn flowgraph(&mut self)

Compute the control flow graph and dominator tree.

+

pub fn simple_gvn<'a, FOI>(&mut self, fisa: FOI) -> Result<(), CodegenError> where
    FOI: Into<FlagsOrIsa<'a>>, 

Perform simple GVN on the function.

+

pub fn licm(&mut self, isa: &dyn TargetIsa) -> Result<(), CodegenError>

Perform LICM on the function.

+

pub fn eliminate_unreachable_code<'a, FOI>(
    &mut self,
    fisa: FOI
) -> Result<(), CodegenError> where
    FOI: Into<FlagsOrIsa<'a>>, 

Perform unreachable code elimination.

+

pub fn regalloc(&mut self, isa: &dyn TargetIsa) -> Result<(), CodegenError>

Run the register allocator.

+

pub fn prologue_epilogue(
    &mut self,
    isa: &dyn TargetIsa
) -> Result<(), CodegenError>

Insert prologue and epilogues after computing the stack frame layout.

+

pub fn redundant_reload_remover(
    &mut self,
    isa: &dyn TargetIsa
) -> Result<(), CodegenError>

Do redundant-reload removal after allocation of both registers and stack slots.

+

pub fn shrink_instructions(
    &mut self,
    isa: &dyn TargetIsa
) -> Result<(), CodegenError>

Run the instruction shrinking pass.

+

pub fn relax_branches(
    &mut self,
    isa: &dyn TargetIsa
) -> Result<CodeInfo, CodegenError>

Run the branch relaxation pass and return information about the function's code and +read-only data.

+

pub fn build_value_labels_ranges(
    &self,
    isa: &dyn TargetIsa
) -> Result<HashMap<ValueLabel, Vec<ValueLocRange>, RandomState>, CodegenError>

Builds ranges and location for specified value labels.

+

Auto Trait Implementations

impl RefUnwindSafe for Context

impl !Send for Context

impl !Sync for Context

impl Unpin for Context

impl UnwindSafe for Context

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/struct.FunctionBuilder.html b/api/wasmtime_jit/trampoline/struct.FunctionBuilder.html new file mode 100644 index 000000000000..916f185d7ac0 --- /dev/null +++ b/api/wasmtime_jit/trampoline/struct.FunctionBuilder.html @@ -0,0 +1,133 @@ +wasmtime_jit::trampoline::FunctionBuilder - Rust

[]Struct wasmtime_jit::trampoline::FunctionBuilder

pub struct FunctionBuilder<'a> {
+    pub func: &'a mut Function,
+    // some fields omitted
+}

Temporary object used to build a single Cranelift IR Function.

+

+ Fields

func: &'a mut Function

The function currently being built. +This field is public so the function can be re-borrowed.

+

Methods

impl<'a> FunctionBuilder<'a>

This module allows you to create a function in Cranelift IR in a straightforward way, hiding +all the complexity of its internal representation.

+

The module is parametrized by one type which is the representation of variables in your +origin language. It offers a way to conveniently append instruction to your program flow. +You are responsible to split your instruction flow into extended blocks (declared with +create_block) whose properties are:

+
    +
  • branch and jump instructions can only point at the top of extended blocks;
  • +
  • the last instruction of each block is a terminator instruction which has no natural successor, +and those instructions can only appear at the end of extended blocks.
  • +
+

The parameters of Cranelift IR instructions are Cranelift IR values, which can only be created +as results of other Cranelift IR instructions. To be able to create variables redefined multiple +times in your program, use the def_var and use_var command, that will maintain the +correspondence between your variables and Cranelift IR SSA values.

+

The first block for which you call switch_to_block will be assumed to be the beginning of +the function.

+

At creation, a FunctionBuilder instance borrows an already allocated Function which it +modifies with the information stored in the mutable borrowed +FunctionBuilderContext. The function passed in +argument should be newly created with +Function::with_name_signature(), whereas the +FunctionBuilderContext can be kept as is between two function translations.

+

Errors

+

The functions below will panic in debug mode whenever you try to modify the Cranelift IR +function in a way that violate the coherence of the code. For instance: switching to a new +Block when you haven't filled the current one with a terminator instruction, inserting a +return instruction with arguments that don't match the function's signature.

+

pub fn new(
    func: &'a mut Function,
    func_ctx: &'a mut FunctionBuilderContext
) -> FunctionBuilder<'a>

Creates a new FunctionBuilder structure that will operate on a Function using a +FunctionBuilderContext.

+

pub fn set_srcloc(&mut self, srcloc: SourceLoc)

Set the source location that should be assigned to all new instructions.

+

pub fn create_block(&mut self) -> Block

Creates a new Block and returns its reference.

+

pub fn switch_to_block(&mut self, block: Block)

After the call to this function, new instructions will be inserted into the designated +block, in the order they are declared. You must declare the types of the Block arguments +you will use here.

+

When inserting the terminator instruction (which doesn't have a fallthrough to its immediate +successor), the block will be declared filled and it will not be possible to append +instructions to it.

+

pub fn seal_block(&mut self, block: Block)

Declares that all the predecessors of this block are known.

+

Function to call with block as soon as the last branch instruction to block has been +created. Forgetting to call this method on every block will cause inconsistencies in the +produced functions.

+

pub fn seal_all_blocks(&mut self)

Effectively calls seal_block on all blocks in the function.

+

It's more efficient to seal Blocks as soon as possible, during +translation, but for frontends where this is impractical to do, this +function can be used at the end of translating all blocks to ensure +that everything is sealed.

+

pub fn declare_var(&mut self, var: Variable, ty: Type)

In order to use a variable in a use_var, you need to declare its type with this method.

+

pub fn use_var(&mut self, var: Variable) -> Value

Returns the Cranelift IR value corresponding to the utilization at the current program +position of a previously defined user variable.

+

pub fn def_var(&mut self, var: Variable, val: Value)

Register a new definition of a user variable. The type of the value must be +the same as the type registered for the variable.

+

pub fn set_val_label(&mut self, val: Value, label: ValueLabel)

Set label for Value

+

This will not do anything unless func.dfg.collect_debug_info is called first.

+

pub fn create_jump_table(&mut self, data: JumpTableData) -> JumpTable

Creates a jump table in the function, to be used by br_table instructions.

+

pub fn create_stack_slot(&mut self, data: StackSlotData) -> StackSlot

Creates a stack slot in the function, to be used by stack_load, stack_store and +stack_addr instructions.

+

pub fn import_signature(&mut self, signature: Signature) -> SigRef

Adds a signature which can later be used to declare an external function import.

+

pub fn import_function(&mut self, data: ExtFuncData) -> FuncRef

Declare an external function import.

+

pub fn create_global_value(&mut self, data: GlobalValueData) -> GlobalValue

Declares a global value accessible to the function.

+

pub fn create_heap(&mut self, data: HeapData) -> Heap

Declares a heap accessible to the function.

+

pub fn ins(&'short mut self) -> FuncInstBuilder<'short, 'a>

Returns an object with the InstBuilder +trait that allows to conveniently append an instruction to the current Block being built.

+

pub fn ensure_inserted_block(&mut self)

Make sure that the current block is inserted in the layout.

+

pub fn cursor(&mut self) -> FuncCursor

Returns a FuncCursor pointed at the current position ready for inserting instructions.

+

This can be used to insert SSA code that doesn't need to access locals and that doesn't +need to know about FunctionBuilder at all.

+

pub fn append_block_params_for_function_params(&mut self, block: Block)

Append parameters to the given Block corresponding to the function +parameters. This can be used to set up the block parameters for the +entry block.

+

pub fn append_block_params_for_function_returns(&mut self, block: Block)

Append parameters to the given Block corresponding to the function +return values. This can be used to set up the block parameters for a +function exit block.

+

pub fn finalize(&mut self)

Declare that translation of the current function is complete. This +resets the state of the FunctionBuilder in preparation to be used +for another function.

+

impl<'a> FunctionBuilder<'a>

All the functions documented in the previous block are write-only and help you build a valid +Cranelift IR functions via multiple debug asserts. However, you might need to improve the +performance of your translation perform more complex transformations to your Cranelift IR +function. The functions below help you inspect the function you're creating and modify it +in ways that can be unsafe if used incorrectly.

+

pub fn block_params(&self, block: Block) -> &[Value]

Retrieves all the parameters for a Block currently inferred from the jump instructions +inserted that target it and the SSA construction.

+

pub fn signature(&self, sigref: SigRef) -> Option<&Signature>

Retrieves the signature with reference sigref previously added with import_signature.

+

pub fn append_block_param(&mut self, block: Block, ty: Type) -> Value

Creates a parameter for a specific Block by appending it to the list of already existing +parameters.

+

Note: this function has to be called at the creation of the Block before adding +instructions to it, otherwise this could interfere with SSA construction.

+

pub fn inst_results(&self, inst: Inst) -> &[Value]

Returns the result values of an instruction.

+

pub fn change_jump_destination(&mut self, inst: Inst, new_dest: Block)

Changes the destination of a jump instruction after creation.

+

Note: You are responsible for maintaining the coherence with the arguments of +other jump instructions.

+

pub fn is_unreachable(&self) -> bool

Returns true if and only if the current Block is sealed and has no predecessors declared.

+

The entry block of a function is never unreachable.

+

pub fn is_pristine(&self) -> bool

Returns true if and only if no instructions have been added since the last call to +switch_to_block.

+

pub fn is_filled(&self) -> bool

Returns true if and only if a terminator instruction has been inserted since the +last call to switch_to_block.

+

pub fn display<'b, I>(&'b self, isa: I) -> DisplayFunction<'b> where
    I: Into<Option<&'b (dyn TargetIsa + 'b)>>, 

Returns a displayable object for the function as it is.

+

Useful for debug purposes. Use it with None for standard printing.

+

impl<'a> FunctionBuilder<'a>

Helper functions

+

pub fn call_memcpy(
    &mut self,
    config: TargetFrontendConfig,
    dest: Value,
    src: Value,
    size: Value
)

Calls libc.memcpy

+

Copies the size bytes from src to dest, assumes that src + size +won't overlap onto dest. If dest and src overlap, the behavior is +undefined. Applications in which dest and src might overlap should +use call_memmove instead.

+

pub fn emit_small_memcpy(
    &mut self,
    config: TargetFrontendConfig,
    dest: Value,
    src: Value,
    size: u64,
    dest_align: u8,
    src_align: u8
)

Optimised memcpy for small copies.

+

pub fn call_memset(
    &mut self,
    config: TargetFrontendConfig,
    buffer: Value,
    ch: Value,
    size: Value
)

Calls libc.memset

+

Writes size bytes of i8 value ch to memory starting at buffer.

+

pub fn emit_small_memset(
    &mut self,
    config: TargetFrontendConfig,
    buffer: Value,
    ch: u8,
    size: u64,
    buffer_align: u8
)

Calls libc.memset

+

Writes size bytes of value ch to memory starting at buffer.

+

pub fn call_memmove(
    &mut self,
    config: TargetFrontendConfig,
    dest: Value,
    source: Value,
    size: Value
)

Calls libc.memmove

+

Copies size bytes from memory starting at source to memory starting +at dest. source is always read before writing to dest.

+

pub fn emit_small_memmove(
    &mut self,
    config: TargetFrontendConfig,
    dest: Value,
    src: Value,
    size: u64,
    dest_align: u8,
    src_align: u8
)

Optimised memmove for small moves.

+

Auto Trait Implementations

impl<'a> RefUnwindSafe for FunctionBuilder<'a>

impl<'a> Send for FunctionBuilder<'a>

impl<'a> Sync for FunctionBuilder<'a>

impl<'a> Unpin for FunctionBuilder<'a>

impl<'a> !UnwindSafe for FunctionBuilder<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_jit/trampoline/struct.FunctionBuilderContext.html b/api/wasmtime_jit/trampoline/struct.FunctionBuilderContext.html new file mode 100644 index 000000000000..155a9ce76d50 --- /dev/null +++ b/api/wasmtime_jit/trampoline/struct.FunctionBuilderContext.html @@ -0,0 +1,17 @@ +wasmtime_jit::trampoline::FunctionBuilderContext - Rust

[]Struct wasmtime_jit::trampoline::FunctionBuilderContext

pub struct FunctionBuilderContext { /* fields omitted */ }

Structure used for translating a series of functions into Cranelift IR.

+

In order to reduce memory reallocations when compiling multiple functions, +FunctionBuilderContext holds various data structures which are cleared between +functions, rather than dropped, preserving the underlying allocations.

+

Methods

impl FunctionBuilderContext

pub fn new() -> FunctionBuilderContext

Creates a FunctionBuilderContext structure. The structure is automatically cleared after +each FunctionBuilder completes translating a function.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_obj/all.html b/api/wasmtime_obj/all.html new file mode 100644 index 000000000000..e165a545751b --- /dev/null +++ b/api/wasmtime_obj/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Functions

Constants

\ No newline at end of file diff --git a/api/wasmtime_obj/constant.VERSION.html b/api/wasmtime_obj/constant.VERSION.html new file mode 100644 index 000000000000..6d8ff485e629 --- /dev/null +++ b/api/wasmtime_obj/constant.VERSION.html @@ -0,0 +1,2 @@ +wasmtime_obj::VERSION - Rust

[][src]Constant wasmtime_obj::VERSION

pub const VERSION: &str = env!("CARGO_PKG_VERSION");

Version number of this crate.

+
\ No newline at end of file diff --git a/api/wasmtime_obj/fn.emit_module.html b/api/wasmtime_obj/fn.emit_module.html new file mode 100644 index 000000000000..0c642e358f40 --- /dev/null +++ b/api/wasmtime_obj/fn.emit_module.html @@ -0,0 +1,3 @@ +wasmtime_obj::emit_module - Rust

[][src]Function wasmtime_obj::emit_module

pub fn emit_module(
    obj: &mut Artifact,
    module: &Module,
    compilation: &Compilation,
    relocations: &Relocations,
    data_initializers: &[DataInitializer],
    target_config: &TargetFrontendConfig
) -> Result<()>

Emits a module that has been emitted with the wasmtime-environ environment +implementation to a native object file.

+
\ No newline at end of file diff --git a/api/wasmtime_obj/index.html b/api/wasmtime_obj/index.html new file mode 100644 index 000000000000..6639931994da --- /dev/null +++ b/api/wasmtime_obj/index.html @@ -0,0 +1,7 @@ +wasmtime_obj - Rust

[][src]Crate wasmtime_obj

Object-file writing library using the wasmtime environment.

+

Constants

+
VERSION

Version number of this crate.

+

Functions

+
emit_module

Emits a module that has been emitted with the wasmtime-environ environment +implementation to a native object file.

+
\ No newline at end of file diff --git a/api/wasmtime_obj/module/fn.emit_module.html b/api/wasmtime_obj/module/fn.emit_module.html new file mode 100644 index 000000000000..5fd8bc35ba24 --- /dev/null +++ b/api/wasmtime_obj/module/fn.emit_module.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_obj/fn.emit_module.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_obj/sidebar-items.js b/api/wasmtime_obj/sidebar-items.js new file mode 100644 index 000000000000..3224fac68b50 --- /dev/null +++ b/api/wasmtime_obj/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["VERSION","Version number of this crate."]],"fn":[["emit_module","Emits a module that has been emitted with the `wasmtime-environ` environment implementation to a native object file."]]}); \ No newline at end of file diff --git a/api/wasmtime_runtime/all.html b/api/wasmtime_runtime/all.html new file mode 100644 index 000000000000..12418ae62cca --- /dev/null +++ b/api/wasmtime_runtime/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Enums

Functions

Constants

\ No newline at end of file diff --git a/api/wasmtime_runtime/constant.VERSION.html b/api/wasmtime_runtime/constant.VERSION.html new file mode 100644 index 000000000000..26d1efb5c8d8 --- /dev/null +++ b/api/wasmtime_runtime/constant.VERSION.html @@ -0,0 +1,2 @@ +wasmtime_runtime::VERSION - Rust

[][src]Constant wasmtime_runtime::VERSION

pub const VERSION: &str = env!("CARGO_PKG_VERSION");

Version number of this crate.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/enum.Export.html b/api/wasmtime_runtime/enum.Export.html new file mode 100644 index 000000000000..c2c582a94763 --- /dev/null +++ b/api/wasmtime_runtime/enum.Export.html @@ -0,0 +1,62 @@ +wasmtime_runtime::Export - Rust

[][src]Enum wasmtime_runtime::Export

pub enum Export {
+    Function {
+        address: *const VMFunctionBody,
+        vmctx: *mut VMContext,
+        signature: Signature,
+    },
+    Table {
+        definition: *mut VMTableDefinition,
+        vmctx: *mut VMContext,
+        table: TablePlan,
+    },
+    Memory {
+        definition: *mut VMMemoryDefinition,
+        vmctx: *mut VMContext,
+        memory: MemoryPlan,
+    },
+    Global {
+        definition: *mut VMGlobalDefinition,
+        vmctx: *mut VMContext,
+        global: Global,
+    },
+}

The value of an export passed from one instance to another.

+

+ Variants

+
Function

A function export value.

+

Fields of Function

address: *const VMFunctionBody

The address of the native-code function.

+
vmctx: *mut VMContext

Pointer to the containing VMContext.

+
signature: Signature

The function signature declaration, used for compatibilty checking.

+
Table

A table export value.

+

Fields of Table

definition: *mut VMTableDefinition

The address of the table descriptor.

+
vmctx: *mut VMContext

Pointer to the containing VMContext.

+
table: TablePlan

The table declaration, used for compatibilty checking.

+
Memory

A memory export value.

+

Fields of Memory

definition: *mut VMMemoryDefinition

The address of the memory descriptor.

+
vmctx: *mut VMContext

Pointer to the containing VMContext.

+
memory: MemoryPlan

The memory declaration, used for compatibilty checking.

+
Global

A global export value.

+

Fields of Global

definition: *mut VMGlobalDefinition

The address of the global storage.

+
vmctx: *mut VMContext

Pointer to the containing VMContext.

+
global: Global

The global declaration, used for compatibilty checking.

+

Methods

impl Export[src]

pub fn function(
    address: *const VMFunctionBody,
    vmctx: *mut VMContext,
    signature: Signature
) -> Self
[src]

Construct a function export value.

+

pub fn table(
    definition: *mut VMTableDefinition,
    vmctx: *mut VMContext,
    table: TablePlan
) -> Self
[src]

Construct a table export value.

+

pub fn memory(
    definition: *mut VMMemoryDefinition,
    vmctx: *mut VMContext,
    memory: MemoryPlan
) -> Self
[src]

Construct a memory export value.

+

pub fn global(
    definition: *mut VMGlobalDefinition,
    vmctx: *mut VMContext,
    global: Global
) -> Self
[src]

Construct a global export value.

+

Trait Implementations

impl Clone for Export[src]

impl Debug for Export[src]

Auto Trait Implementations

impl RefUnwindSafe for Export

impl !Send for Export

impl !Sync for Export

impl Unpin for Export

impl UnwindSafe for Export

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/enum.InstantiationError.html b/api/wasmtime_runtime/enum.InstantiationError.html new file mode 100644 index 000000000000..bdc26e629313 --- /dev/null +++ b/api/wasmtime_runtime/enum.InstantiationError.html @@ -0,0 +1,30 @@ +wasmtime_runtime::InstantiationError - Rust

[][src]Enum wasmtime_runtime::InstantiationError

pub enum InstantiationError {
+    Resource(String),
+    Link(LinkError),
+    StartTrap(Trap),
+}

An error while instantiating a module.

+

+ Variants

+
Resource(String)

Insufficient resources available for execution.

+

A wasm link error occured.

+
StartTrap(Trap)

A compilation error occured.

+

Trait Implementations

impl Debug for InstantiationError[src]

impl Display for InstantiationError[src]

impl Error for InstantiationError[src]

impl From<LinkError> for InstantiationError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/enum.Trap.html b/api/wasmtime_runtime/enum.Trap.html new file mode 100644 index 000000000000..9b8622e04db7 --- /dev/null +++ b/api/wasmtime_runtime/enum.Trap.html @@ -0,0 +1,33 @@ +wasmtime_runtime::Trap - Rust

[][src]Enum wasmtime_runtime::Trap

pub enum Trap {
+    User(Box<dyn Error + Send + Sync>),
+    Wasm {
+        desc: TrapDescription,
+        backtrace: Backtrace,
+    },
+}

Stores trace message with backtrace.

+

+ Variants

+
User(Box<dyn Error + Send + Sync>)

A user-raised trap through raise_user_trap.

+
Wasm

A wasm-originating trap from wasm code itself.

+

Fields of Wasm

desc: TrapDescription

What sort of trap happened, as well as where in the original wasm module +it happened.

+
backtrace: Backtrace

Native stack backtrace at the time the trap occurred

+

Trait Implementations

impl Debug for Trap[src]

impl Display for Trap[src]

impl Error for Trap[src]

Auto Trait Implementations

impl !RefUnwindSafe for Trap

impl Send for Trap

impl Sync for Trap

impl Unpin for Trap

impl !UnwindSafe for Trap

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/export/enum.Export.html b/api/wasmtime_runtime/export/enum.Export.html new file mode 100644 index 000000000000..fd94fee2567a --- /dev/null +++ b/api/wasmtime_runtime/export/enum.Export.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/enum.Export.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/fn.catch_traps.html b/api/wasmtime_runtime/fn.catch_traps.html new file mode 100644 index 000000000000..0f269d8344fc --- /dev/null +++ b/api/wasmtime_runtime/fn.catch_traps.html @@ -0,0 +1,4 @@ +wasmtime_runtime::catch_traps - Rust

[][src]Function wasmtime_runtime::catch_traps

pub unsafe fn catch_traps<F>(
    vmctx: *mut VMContext,
    closure: F
) -> Result<(), Trap> where
    F: FnMut(), 

Catches any wasm traps that happen within the execution of closure, +returning them as a Result.

+

Highly unsafe since closure won't have any dtors run.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/fn.raise_user_trap.html b/api/wasmtime_runtime/fn.raise_user_trap.html new file mode 100644 index 000000000000..5860e6436ae1 --- /dev/null +++ b/api/wasmtime_runtime/fn.raise_user_trap.html @@ -0,0 +1,9 @@ +wasmtime_runtime::raise_user_trap - Rust

[][src]Function wasmtime_runtime::raise_user_trap

pub unsafe fn raise_user_trap(data: Box<dyn Error + Send + Sync>) -> !

Raises a user-defined trap immediately.

+

This function performs as-if a wasm trap was just executed, only the trap +has a dynamic payload associated with it which is user-provided. This trap +payload is then returned from wasmtime_call an wasmtime_call_trampoline +below.

+

Safety

+

Only safe to call when wasm code is on the stack, aka wasmtime_call or +wasmtime_call_trampoline must have been previously called.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/fn.resume_panic.html b/api/wasmtime_runtime/fn.resume_panic.html new file mode 100644 index 000000000000..3d30dd2206b0 --- /dev/null +++ b/api/wasmtime_runtime/fn.resume_panic.html @@ -0,0 +1,6 @@ +wasmtime_runtime::resume_panic - Rust

[][src]Function wasmtime_runtime::resume_panic

pub unsafe fn resume_panic(payload: Box<dyn Any + Send>) -> !

Carries a Rust panic across wasm code and resumes the panic on the other +side.

+

Safety

+

Only safe to call when wasm code is on the stack, aka wasmtime_call or +wasmtime_call_trampoline must have been previously called.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/fn.wasmtime_call_trampoline.html b/api/wasmtime_runtime/fn.wasmtime_call_trampoline.html new file mode 100644 index 000000000000..22b5c5e21258 --- /dev/null +++ b/api/wasmtime_runtime/fn.wasmtime_call_trampoline.html @@ -0,0 +1,14 @@ +wasmtime_runtime::wasmtime_call_trampoline - Rust

[][src]Function wasmtime_runtime::wasmtime_call_trampoline

pub unsafe fn wasmtime_call_trampoline(
    vmctx: *mut VMContext,
    caller_vmctx: *mut VMContext,
    trampoline: *const VMFunctionBody,
    callee: *const VMFunctionBody,
    values_vec: *mut u8
) -> Result<(), Trap>

Call the wasm function pointed to by callee.

+
    +
  • vmctx - the callee vmctx argument
  • +
  • caller_vmctx - the caller vmctx argument
  • +
  • trampoline - the jit-generated trampoline whose ABI takes 4 values, the +callee vmctx, the caller vmctx, the callee argument below, and then the +values_vec argument.
  • +
  • callee - the third argument to the trampoline function
  • +
  • values_vec - points to a buffer which holds the incoming arguments, and to +which the outgoing return values will be written.
  • +
+

Wildly unsafe because it calls raw function pointers and reads/writes raw +function pointers.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/imports/struct.Imports.html b/api/wasmtime_runtime/imports/struct.Imports.html new file mode 100644 index 000000000000..fa007e821930 --- /dev/null +++ b/api/wasmtime_runtime/imports/struct.Imports.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.Imports.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/index.html b/api/wasmtime_runtime/index.html new file mode 100644 index 000000000000..8661f73aa00d --- /dev/null +++ b/api/wasmtime_runtime/index.html @@ -0,0 +1,60 @@ +wasmtime_runtime - Rust

[][src]Crate wasmtime_runtime

Runtime library support for Wasmtime.

+

Modules

+
libcalls

Runtime library calls. Note that wasm compilers may sometimes perform these +inline rather than calling them, particularly when CPUs have special +instructions which compute them directly.

+

Structs

+
GdbJitImageRegistration

Registeration for JIT image

+
Imports

Resolved import pointers.

+
InstanceHandle

A handle holding an Instance of a WebAssembly module.

+
LinkError

An link error while instantiating a module.

+
Mmap

A simple struct consisting of a page-aligned pointer to page-aligned +and initially-zeroed memory and a length.

+
SignatureRegistry

WebAssembly requires that the caller and callee signatures in an indirect +call must match. To implement this efficiently, keep a registry of all +signatures, shared by all instances, so that call sites can just do an +index comparison.

+
TrapDescription

Description of a trap.

+
TrapRegistration

RAII structure returned from TrapRegistry::register_trap to unregister +trap information on drop.

+
TrapRegistry

The registry maintains descriptions of traps in currently allocated functions.

+
VMCallerCheckedAnyfunc

The VM caller-checked "anyfunc" record, for caller-side signature checking. +It consists of the actual function pointer and a signature id to be checked +by the caller.

+
VMContext

The VM "context", which is pointed to by the vmctx arg in Cranelift. +This has information about globals, memories, tables, and other runtime +state associated with the current instance.

+
VMFunctionBody

A placeholder byte-sized type which is just used to provide some amount of type +safety when dealing with pointers to JIT-compiled function bodies. Note that it's +deliberately not Copy, as we shouldn't be carelessly copying function body bytes +around.

+
VMFunctionImport

An imported function.

+
VMGlobalDefinition

The storage for a WebAssembly global defined within the instance.

+
VMGlobalImport

The fields compiled code needs to access to utilize a WebAssembly global +variable imported from another instance.

+
VMInvokeArgument

The storage for a WebAssembly invocation argument

+
VMMemoryDefinition

The fields compiled code needs to access to utilize a WebAssembly linear +memory defined within the instance, namely the start address and the +size in bytes.

+
VMMemoryImport

The fields compiled code needs to access to utilize a WebAssembly linear +memory imported from another instance.

+
VMSharedSignatureIndex

An index into the shared signature registry, usable for checking signatures +at indirect calls.

+
VMTableDefinition

The fields compiled code needs to access to utilize a WebAssembly table +defined within the instance.

+
VMTableImport

The fields compiled code needs to access to utilize a WebAssembly table +imported from another instance.

+

Enums

+
Export

The value of an export passed from one instance to another.

+
InstantiationError

An error while instantiating a module.

+
Trap

Stores trace message with backtrace.

+

Constants

+
VERSION

Version number of this crate.

+

Functions

+
catch_traps

Catches any wasm traps that happen within the execution of closure, +returning them as a Result.

+
raise_user_trap

Raises a user-defined trap immediately.

+
resume_panic

Carries a Rust panic across wasm code and resumes the panic on the other +side.

+
wasmtime_call_trampoline

Call the wasm function pointed to by callee.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/instance/enum.InstantiationError.html b/api/wasmtime_runtime/instance/enum.InstantiationError.html new file mode 100644 index 000000000000..853f3b0ef244 --- /dev/null +++ b/api/wasmtime_runtime/instance/enum.InstantiationError.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/enum.InstantiationError.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/instance/struct.InstanceHandle.html b/api/wasmtime_runtime/instance/struct.InstanceHandle.html new file mode 100644 index 000000000000..179dd73c9989 --- /dev/null +++ b/api/wasmtime_runtime/instance/struct.InstanceHandle.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.InstanceHandle.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/instance/struct.LinkError.html b/api/wasmtime_runtime/instance/struct.LinkError.html new file mode 100644 index 000000000000..f6665db90b32 --- /dev/null +++ b/api/wasmtime_runtime/instance/struct.LinkError.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.LinkError.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/jit_int/struct.GdbJitImageRegistration.html b/api/wasmtime_runtime/jit_int/struct.GdbJitImageRegistration.html new file mode 100644 index 000000000000..fabaf9514416 --- /dev/null +++ b/api/wasmtime_runtime/jit_int/struct.GdbJitImageRegistration.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.GdbJitImageRegistration.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_ceil.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_ceil.html new file mode 100644 index 000000000000..4c1ff5933f1d --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_ceil.html @@ -0,0 +1,2 @@ +wasmtime_runtime::libcalls::wasmtime_f32_ceil - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_f32_ceil

pub extern "C" fn wasmtime_f32_ceil(x: f32) -> f32

Implementation of f32.ceil

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_floor.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_floor.html new file mode 100644 index 000000000000..b3884f1860be --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_floor.html @@ -0,0 +1,2 @@ +wasmtime_runtime::libcalls::wasmtime_f32_floor - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_f32_floor

pub extern "C" fn wasmtime_f32_floor(x: f32) -> f32

Implementation of f32.floor

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_nearest.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_nearest.html new file mode 100644 index 000000000000..2d069dca5812 --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_nearest.html @@ -0,0 +1,2 @@ +wasmtime_runtime::libcalls::wasmtime_f32_nearest - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_f32_nearest

pub extern "C" fn wasmtime_f32_nearest(x: f32) -> f32

Implementation of f32.nearest

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_trunc.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_trunc.html new file mode 100644 index 000000000000..14805180174d --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_f32_trunc.html @@ -0,0 +1,2 @@ +wasmtime_runtime::libcalls::wasmtime_f32_trunc - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_f32_trunc

pub extern "C" fn wasmtime_f32_trunc(x: f32) -> f32

Implementation of f32.trunc

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_ceil.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_ceil.html new file mode 100644 index 000000000000..11a4efa2006b --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_ceil.html @@ -0,0 +1,2 @@ +wasmtime_runtime::libcalls::wasmtime_f64_ceil - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_f64_ceil

pub extern "C" fn wasmtime_f64_ceil(x: f64) -> f64

Implementation of f64.ceil

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_floor.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_floor.html new file mode 100644 index 000000000000..3493db8a41aa --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_floor.html @@ -0,0 +1,2 @@ +wasmtime_runtime::libcalls::wasmtime_f64_floor - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_f64_floor

pub extern "C" fn wasmtime_f64_floor(x: f64) -> f64

Implementation of f64.floor

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_nearest.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_nearest.html new file mode 100644 index 000000000000..7d48847680fd --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_nearest.html @@ -0,0 +1,2 @@ +wasmtime_runtime::libcalls::wasmtime_f64_nearest - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_f64_nearest

pub extern "C" fn wasmtime_f64_nearest(x: f64) -> f64

Implementation of f64.nearest

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_trunc.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_trunc.html new file mode 100644 index 000000000000..7c0c3c3f4cee --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_f64_trunc.html @@ -0,0 +1,2 @@ +wasmtime_runtime::libcalls::wasmtime_f64_trunc - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_f64_trunc

pub extern "C" fn wasmtime_f64_trunc(x: f64) -> f64

Implementation of f64.trunc

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_imported_memory32_grow.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_imported_memory32_grow.html new file mode 100644 index 000000000000..c8abd5e4635b --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_imported_memory32_grow.html @@ -0,0 +1,3 @@ +wasmtime_runtime::libcalls::wasmtime_imported_memory32_grow - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_imported_memory32_grow

#[no_mangle]
+pub unsafe extern "C" fn wasmtime_imported_memory32_grow(
    vmctx: *mut VMContext,
    delta: u32,
    memory_index: u32
) -> u32

Implementation of memory.grow for imported 32-bit memories.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_imported_memory32_size.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_imported_memory32_size.html new file mode 100644 index 000000000000..d56879ad9028 --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_imported_memory32_size.html @@ -0,0 +1,3 @@ +wasmtime_runtime::libcalls::wasmtime_imported_memory32_size - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_imported_memory32_size

#[no_mangle]
+pub unsafe extern "C" fn wasmtime_imported_memory32_size(
    vmctx: *mut VMContext,
    memory_index: u32
) -> u32

Implementation of memory.size for imported 32-bit memories.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_memory32_grow.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_memory32_grow.html new file mode 100644 index 000000000000..b40ac32dd8d0 --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_memory32_grow.html @@ -0,0 +1,3 @@ +wasmtime_runtime::libcalls::wasmtime_memory32_grow - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_memory32_grow

#[no_mangle]
+pub unsafe extern "C" fn wasmtime_memory32_grow(
    vmctx: *mut VMContext,
    delta: u32,
    memory_index: u32
) -> u32

Implementation of memory.grow for locally-defined 32-bit memories.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/fn.wasmtime_memory32_size.html b/api/wasmtime_runtime/libcalls/fn.wasmtime_memory32_size.html new file mode 100644 index 000000000000..d0fa508d0e3e --- /dev/null +++ b/api/wasmtime_runtime/libcalls/fn.wasmtime_memory32_size.html @@ -0,0 +1,3 @@ +wasmtime_runtime::libcalls::wasmtime_memory32_size - Rust

[][src]Function wasmtime_runtime::libcalls::wasmtime_memory32_size

#[no_mangle]
+pub unsafe extern "C" fn wasmtime_memory32_size(
    vmctx: *mut VMContext,
    memory_index: u32
) -> u32

Implementation of memory.size for locally-defined 32-bit memories.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/index.html b/api/wasmtime_runtime/libcalls/index.html new file mode 100644 index 000000000000..4a520583dfa9 --- /dev/null +++ b/api/wasmtime_runtime/libcalls/index.html @@ -0,0 +1,17 @@ +wasmtime_runtime::libcalls - Rust

[][src]Module wasmtime_runtime::libcalls

Runtime library calls. Note that wasm compilers may sometimes perform these +inline rather than calling them, particularly when CPUs have special +instructions which compute them directly.

+

Functions

+
wasmtime_f32_ceil

Implementation of f32.ceil

+
wasmtime_f32_floor

Implementation of f32.floor

+
wasmtime_f32_trunc

Implementation of f32.trunc

+
wasmtime_f32_nearest

Implementation of f32.nearest

+
wasmtime_f64_ceil

Implementation of f64.ceil

+
wasmtime_f64_floor

Implementation of f64.floor

+
wasmtime_f64_trunc

Implementation of f64.trunc

+
wasmtime_f64_nearest

Implementation of f64.nearest

+
wasmtime_imported_memory32_grow

Implementation of memory.grow for imported 32-bit memories.

+
wasmtime_imported_memory32_size

Implementation of memory.size for imported 32-bit memories.

+
wasmtime_memory32_grow

Implementation of memory.grow for locally-defined 32-bit memories.

+
wasmtime_memory32_size

Implementation of memory.size for locally-defined 32-bit memories.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/libcalls/sidebar-items.js b/api/wasmtime_runtime/libcalls/sidebar-items.js new file mode 100644 index 000000000000..bf67b03c6443 --- /dev/null +++ b/api/wasmtime_runtime/libcalls/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["wasmtime_f32_ceil","Implementation of f32.ceil"],["wasmtime_f32_floor","Implementation of f32.floor"],["wasmtime_f32_nearest","Implementation of f32.nearest"],["wasmtime_f32_trunc","Implementation of f32.trunc"],["wasmtime_f64_ceil","Implementation of f64.ceil"],["wasmtime_f64_floor","Implementation of f64.floor"],["wasmtime_f64_nearest","Implementation of f64.nearest"],["wasmtime_f64_trunc","Implementation of f64.trunc"],["wasmtime_imported_memory32_grow","Implementation of memory.grow for imported 32-bit memories."],["wasmtime_imported_memory32_size","Implementation of memory.size for imported 32-bit memories."],["wasmtime_memory32_grow","Implementation of memory.grow for locally-defined 32-bit memories."],["wasmtime_memory32_size","Implementation of memory.size for locally-defined 32-bit memories."]]}); \ No newline at end of file diff --git a/api/wasmtime_runtime/mmap/struct.Mmap.html b/api/wasmtime_runtime/mmap/struct.Mmap.html new file mode 100644 index 000000000000..2570e0eb7345 --- /dev/null +++ b/api/wasmtime_runtime/mmap/struct.Mmap.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.Mmap.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/sidebar-items.js b/api/wasmtime_runtime/sidebar-items.js new file mode 100644 index 000000000000..515d6be4c231 --- /dev/null +++ b/api/wasmtime_runtime/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["VERSION","Version number of this crate."]],"enum":[["Export","The value of an export passed from one instance to another."],["InstantiationError","An error while instantiating a module."],["Trap","Stores trace message with backtrace."]],"fn":[["catch_traps","Catches any wasm traps that happen within the execution of `closure`, returning them as a `Result`."],["raise_user_trap","Raises a user-defined trap immediately."],["resume_panic","Carries a Rust panic across wasm code and resumes the panic on the other side."],["wasmtime_call_trampoline","Call the wasm function pointed to by `callee`."]],"mod":[["libcalls","Runtime library calls. Note that wasm compilers may sometimes perform these inline rather than calling them, particularly when CPUs have special instructions which compute them directly."]],"struct":[["GdbJitImageRegistration","Registeration for JIT image"],["Imports","Resolved import pointers."],["InstanceHandle","A handle holding an `Instance` of a WebAssembly module."],["LinkError","An link error while instantiating a module."],["Mmap","A simple struct consisting of a page-aligned pointer to page-aligned and initially-zeroed memory and a length."],["SignatureRegistry","WebAssembly requires that the caller and callee signatures in an indirect call must match. To implement this efficiently, keep a registry of all signatures, shared by all instances, so that call sites can just do an index comparison."],["TrapDescription","Description of a trap."],["TrapRegistration","RAII structure returned from `TrapRegistry::register_trap` to unregister trap information on drop."],["TrapRegistry","The registry maintains descriptions of traps in currently allocated functions."],["VMCallerCheckedAnyfunc","The VM caller-checked \"anyfunc\" record, for caller-side signature checking. It consists of the actual function pointer and a signature id to be checked by the caller."],["VMContext","The VM \"context\", which is pointed to by the `vmctx` arg in Cranelift. This has information about globals, memories, tables, and other runtime state associated with the current instance."],["VMFunctionBody","A placeholder byte-sized type which is just used to provide some amount of type safety when dealing with pointers to JIT-compiled function bodies. Note that it's deliberately not Copy, as we shouldn't be carelessly copying function body bytes around."],["VMFunctionImport","An imported function."],["VMGlobalDefinition","The storage for a WebAssembly global defined within the instance."],["VMGlobalImport","The fields compiled code needs to access to utilize a WebAssembly global variable imported from another instance."],["VMInvokeArgument","The storage for a WebAssembly invocation argument"],["VMMemoryDefinition","The fields compiled code needs to access to utilize a WebAssembly linear memory defined within the instance, namely the start address and the size in bytes."],["VMMemoryImport","The fields compiled code needs to access to utilize a WebAssembly linear memory imported from another instance."],["VMSharedSignatureIndex","An index into the shared signature registry, usable for checking signatures at indirect calls."],["VMTableDefinition","The fields compiled code needs to access to utilize a WebAssembly table defined within the instance."],["VMTableImport","The fields compiled code needs to access to utilize a WebAssembly table imported from another instance."]]}); \ No newline at end of file diff --git a/api/wasmtime_runtime/sig_registry/struct.SignatureRegistry.html b/api/wasmtime_runtime/sig_registry/struct.SignatureRegistry.html new file mode 100644 index 000000000000..3b75c16bee9f --- /dev/null +++ b/api/wasmtime_runtime/sig_registry/struct.SignatureRegistry.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.SignatureRegistry.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/struct.GdbJitImageRegistration.html b/api/wasmtime_runtime/struct.GdbJitImageRegistration.html new file mode 100644 index 000000000000..496dd44fe1ab --- /dev/null +++ b/api/wasmtime_runtime/struct.GdbJitImageRegistration.html @@ -0,0 +1,15 @@ +wasmtime_runtime::GdbJitImageRegistration - Rust

[][src]Struct wasmtime_runtime::GdbJitImageRegistration

pub struct GdbJitImageRegistration { /* fields omitted */ }

Registeration for JIT image

+

Methods

impl GdbJitImageRegistration[src]

pub fn register(file: Vec<u8>) -> Self[src]

Registers JIT image using __jit_debug_register_code

+

pub fn file(&self) -> &[u8][src]

JIT image used in registration

+

Trait Implementations

impl Drop for GdbJitImageRegistration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.Imports.html b/api/wasmtime_runtime/struct.Imports.html new file mode 100644 index 000000000000..882307416924 --- /dev/null +++ b/api/wasmtime_runtime/struct.Imports.html @@ -0,0 +1,32 @@ +wasmtime_runtime::Imports - Rust

[][src]Struct wasmtime_runtime::Imports

pub struct Imports {
+    pub dependencies: HashSet<InstanceHandle>,
+    pub functions: BoxedSlice<FuncIndex, VMFunctionImport>,
+    pub tables: BoxedSlice<TableIndex, VMTableImport>,
+    pub memories: BoxedSlice<MemoryIndex, VMMemoryImport>,
+    pub globals: BoxedSlice<GlobalIndex, VMGlobalImport>,
+}

Resolved import pointers.

+

+ Fields

dependencies: HashSet<InstanceHandle>

The set of instances that the imports depend on.

+
functions: BoxedSlice<FuncIndex, VMFunctionImport>

Resolved addresses for imported functions.

+
tables: BoxedSlice<TableIndex, VMTableImport>

Resolved addresses for imported tables.

+
memories: BoxedSlice<MemoryIndex, VMMemoryImport>

Resolved addresses for imported memories.

+
globals: BoxedSlice<GlobalIndex, VMGlobalImport>

Resolved addresses for imported globals.

+

Methods

impl Imports[src]

pub fn new(
    dependencies: HashSet<InstanceHandle>,
    function_imports: PrimaryMap<FuncIndex, VMFunctionImport>,
    table_imports: PrimaryMap<TableIndex, VMTableImport>,
    memory_imports: PrimaryMap<MemoryIndex, VMMemoryImport>,
    global_imports: PrimaryMap<GlobalIndex, VMGlobalImport>
) -> Self
[src]

Construct a new Imports instance.

+

pub fn none() -> Self[src]

Construct a new Imports instance with no imports.

+

Trait Implementations

impl Clone for Imports[src]

Auto Trait Implementations

impl !RefUnwindSafe for Imports

impl !Send for Imports

impl !Sync for Imports

impl Unpin for Imports

impl !UnwindSafe for Imports

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.InstanceHandle.html b/api/wasmtime_runtime/struct.InstanceHandle.html new file mode 100644 index 000000000000..53d5ff3357ee --- /dev/null +++ b/api/wasmtime_runtime/struct.InstanceHandle.html @@ -0,0 +1,65 @@ +wasmtime_runtime::InstanceHandle - Rust

[][src]Struct wasmtime_runtime::InstanceHandle

pub struct InstanceHandle { /* fields omitted */ }

A handle holding an Instance of a WebAssembly module.

+

Methods

impl InstanceHandle[src]

pub fn set_signal_handler<H>(&mut self, handler: H) where
    H: 'static + Fn(c_int, *const siginfo_t, *const c_void) -> bool
[src]

Set a custom signal handler

+

impl InstanceHandle[src]

pub unsafe fn new(
    module: Arc<Module>,
    trap_registration: TrapRegistration,
    finished_functions: BoxedSlice<DefinedFuncIndex, *mut [VMFunctionBody]>,
    imports: Imports,
    data_initializers: &[DataInitializer],
    vmshared_signatures: BoxedSlice<SignatureIndex, VMSharedSignatureIndex>,
    dbg_jit_registration: Option<Rc<GdbJitImageRegistration>>,
    host_state: Box<dyn Any>
) -> Result<Self, InstantiationError>
[src]

Create a new InstanceHandle pointing at a new Instance.

+

Unsafety

+

This method is not necessarily inherently unsafe to call, but in general +the APIs of an Instance are quite unsafe and have not been really +audited for safety that much. As a result the unsafety here on this +method is a low-overhead way of saying "this is an extremely unsafe type +to work with".

+

Extreme care must be taken when working with InstanceHandle and it's +recommended to have relatively intimate knowledge of how it works +internally if you'd like to do so. If possible it's recommended to use +the wasmtime crate API rather than this type since that is vetted for +safety.

+

pub unsafe fn from_vmctx(vmctx: *mut VMContext) -> Self[src]

Create a new InstanceHandle pointing at the instance +pointed to by the given VMContext pointer.

+

Safety

+

This is unsafe because it doesn't work on just any VMContext, it must +be a VMContext allocated as part of an Instance.

+

pub fn vmctx(&self) -> &VMContext[src]

Return a reference to the vmctx used by compiled wasm code.

+

pub fn vmctx_ptr(&self) -> *mut VMContext[src]

Return a raw pointer to the vmctx used by compiled wasm code.

+

pub fn module(&self) -> &Arc<Module>[src]

Return a reference-counting pointer to a module.

+

pub fn module_ref(&self) -> &Module[src]

Return a reference to a module.

+

pub fn lookup(&self, field: &str) -> Option<Export>[src]

Lookup an export with the given name.

+

pub fn lookup_by_declaration(&self, export: &Export) -> Export[src]

Lookup an export with the given export declaration.

+

pub fn exports(&self) -> Iter<String, Export>[src]

Return an iterator over the exports of this instance.

+

Specifically, it provides access to the key-value pairs, where the keys +are export names, and the values are export declarations which can be +resolved lookup_by_declaration.

+

pub fn host_state(&self) -> &dyn Any[src]

Return a reference to the custom state attached to this instance.

+

pub fn memory_index(&self, memory: &VMMemoryDefinition) -> DefinedMemoryIndex[src]

Return the memory index for the given VMMemoryDefinition in this instance.

+

pub fn memory_grow(
    &self,
    memory_index: DefinedMemoryIndex,
    delta: u32
) -> Option<u32>
[src]

Grow memory in this instance by the specified amount of pages.

+

Returns None if memory can't be grown by the specified amount +of pages.

+

pub fn table_index(&self, table: &VMTableDefinition) -> DefinedTableIndex[src]

Return the table index for the given VMTableDefinition in this instance.

+

pub fn table_grow(
    &self,
    table_index: DefinedTableIndex,
    delta: u32
) -> Option<u32>
[src]

Grow table in this instance by the specified amount of pages.

+

Returns None if memory can't be grown by the specified amount +of pages.

+

pub fn table_get(
    &self,
    table_index: DefinedTableIndex,
    index: u32
) -> Option<VMCallerCheckedAnyfunc>
[src]

Get table element reference.

+

Returns None if index is out of bounds.

+

pub fn table_set(
    &self,
    table_index: DefinedTableIndex,
    index: u32,
    val: VMCallerCheckedAnyfunc
) -> Result<(), ()>
[src]

Set table element reference.

+

Returns an error if the index is out of bounds

+

Trait Implementations

impl Clone for InstanceHandle[src]

impl Drop for InstanceHandle[src]

impl Eq for InstanceHandle[src]

impl Hash for InstanceHandle[src]

impl PartialEq<InstanceHandle> for InstanceHandle[src]

impl StructuralEq for InstanceHandle[src]

impl StructuralPartialEq for InstanceHandle[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.LinkError.html b/api/wasmtime_runtime/struct.LinkError.html new file mode 100644 index 000000000000..4f5234f03503 --- /dev/null +++ b/api/wasmtime_runtime/struct.LinkError.html @@ -0,0 +1,21 @@ +wasmtime_runtime::LinkError - Rust

[][src]Struct wasmtime_runtime::LinkError

pub struct LinkError(pub String);

An link error while instantiating a module.

+

Trait Implementations

impl Debug for LinkError[src]

impl Display for LinkError[src]

impl Error for LinkError[src]

impl From<LinkError> for InstantiationError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.Mmap.html b/api/wasmtime_runtime/struct.Mmap.html new file mode 100644 index 000000000000..e1e84c230bec --- /dev/null +++ b/api/wasmtime_runtime/struct.Mmap.html @@ -0,0 +1,29 @@ +wasmtime_runtime::Mmap - Rust

[][src]Struct wasmtime_runtime::Mmap

pub struct Mmap { /* fields omitted */ }

A simple struct consisting of a page-aligned pointer to page-aligned +and initially-zeroed memory and a length.

+

Methods

impl Mmap[src]

pub fn new() -> Self[src]

Construct a new empty instance of Mmap.

+

pub fn with_at_least(size: usize) -> Result<Self, String>[src]

Create a new Mmap pointing to at least size bytes of page-aligned accessible memory.

+

pub fn accessible_reserved(
    accessible_size: usize,
    mapping_size: usize
) -> Result<Self, String>
[src]

Create a new Mmap pointing to accessible_size bytes of page-aligned accessible memory, +within a reserved mapping of mapping_size bytes. accessible_size and mapping_size +must be native page-size multiples.

+

pub fn make_accessible(
    &mut self,
    start: usize,
    len: usize
) -> Result<(), String>
[src]

Make the memory starting at start and extending for len bytes accessible. +start and len must be native page-size multiples and describe a range within +self's reserved memory.

+

pub fn as_slice(&self) -> &[u8][src]

Return the allocated memory as a slice of u8.

+

pub fn as_mut_slice(&mut self) -> &mut [u8][src]

Return the allocated memory as a mutable slice of u8.

+

pub fn as_ptr(&self) -> *const u8[src]

Return the allocated memory as a pointer to u8.

+

pub fn as_mut_ptr(&mut self) -> *mut u8[src]

Return the allocated memory as a mutable pointer to u8.

+

pub fn len(&self) -> usize[src]

Return the length of the allocated memory.

+

pub fn is_empty(&self) -> bool[src]

Return whether any memory has been allocated.

+

Trait Implementations

impl Debug for Mmap[src]

impl Drop for Mmap[src]

Auto Trait Implementations

impl RefUnwindSafe for Mmap

impl Send for Mmap

impl Sync for Mmap

impl Unpin for Mmap

impl UnwindSafe for Mmap

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.SignatureRegistry.html b/api/wasmtime_runtime/struct.SignatureRegistry.html new file mode 100644 index 000000000000..ab4ca866e3aa --- /dev/null +++ b/api/wasmtime_runtime/struct.SignatureRegistry.html @@ -0,0 +1,21 @@ +wasmtime_runtime::SignatureRegistry - Rust

[][src]Struct wasmtime_runtime::SignatureRegistry

pub struct SignatureRegistry { /* fields omitted */ }

WebAssembly requires that the caller and callee signatures in an indirect +call must match. To implement this efficiently, keep a registry of all +signatures, shared by all instances, so that call sites can just do an +index comparison.

+

Methods

impl SignatureRegistry[src]

pub fn new() -> Self[src]

Create a new SignatureRegistry.

+

pub fn register(&self, sig: &Signature) -> VMSharedSignatureIndex[src]

Register a signature and return its unique index.

+

pub fn lookup(&self, idx: VMSharedSignatureIndex) -> Option<Signature>[src]

Looks up a shared signature index within this registry.

+

Note that for this operation to be semantically correct the idx must +have previously come from a call to register of this same object.

+

Trait Implementations

impl Debug for SignatureRegistry[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.TrapDescription.html b/api/wasmtime_runtime/struct.TrapDescription.html new file mode 100644 index 000000000000..c1945892b3aa --- /dev/null +++ b/api/wasmtime_runtime/struct.TrapDescription.html @@ -0,0 +1,29 @@ +wasmtime_runtime::TrapDescription - Rust

[][src]Struct wasmtime_runtime::TrapDescription

pub struct TrapDescription {
+    pub source_loc: SourceLoc,
+    pub trap_code: TrapCode,
+}

Description of a trap.

+

+ Fields

source_loc: SourceLoc

Location of the trap in source binary module.

+
trap_code: TrapCode

Code of the trap.

+

Trait Implementations

impl Clone for TrapDescription[src]

impl Copy for TrapDescription[src]

impl Debug for TrapDescription[src]

impl Display for TrapDescription[src]

impl PartialEq<TrapDescription> for TrapDescription[src]

impl StructuralPartialEq for TrapDescription[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.TrapRegistration.html b/api/wasmtime_runtime/struct.TrapRegistration.html new file mode 100644 index 000000000000..e4419c20339f --- /dev/null +++ b/api/wasmtime_runtime/struct.TrapRegistration.html @@ -0,0 +1,21 @@ +wasmtime_runtime::TrapRegistration - Rust

[][src]Struct wasmtime_runtime::TrapRegistration

pub struct TrapRegistration { /* fields omitted */ }

RAII structure returned from TrapRegistry::register_trap to unregister +trap information on drop.

+

Methods

impl TrapRegistration[src]

pub fn get_trap(&self, address: usize) -> Option<TrapDescription>[src]

Gets a trap description at given address.

+

Trait Implementations

impl Clone for TrapRegistration[src]

impl Drop for TrapRegistration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.TrapRegistry.html b/api/wasmtime_runtime/struct.TrapRegistry.html new file mode 100644 index 000000000000..730bcdd77918 --- /dev/null +++ b/api/wasmtime_runtime/struct.TrapRegistry.html @@ -0,0 +1,15 @@ +wasmtime_runtime::TrapRegistry - Rust

[][src]Struct wasmtime_runtime::TrapRegistry

pub struct TrapRegistry { /* fields omitted */ }

The registry maintains descriptions of traps in currently allocated functions.

+

Methods

impl TrapRegistry[src]

pub fn register_traps(
    &self,
    list: impl IntoIterator<Item = (usize, SourceLoc, TrapCode)>
) -> TrapRegistration
[src]

Registers a list of traps.

+

Returns a RAII guard that deregisters all traps when dropped.

+

Trait Implementations

impl Default for TrapRegistry[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMCallerCheckedAnyfunc.html b/api/wasmtime_runtime/struct.VMCallerCheckedAnyfunc.html new file mode 100644 index 000000000000..1c7cec8c8375 --- /dev/null +++ b/api/wasmtime_runtime/struct.VMCallerCheckedAnyfunc.html @@ -0,0 +1,31 @@ +wasmtime_runtime::VMCallerCheckedAnyfunc - Rust

[][src]Struct wasmtime_runtime::VMCallerCheckedAnyfunc

#[repr(C)]
+pub struct VMCallerCheckedAnyfunc {
+    pub func_ptr: *const VMFunctionBody,
+    pub type_index: VMSharedSignatureIndex,
+    pub vmctx: *mut VMContext,
+}

The VM caller-checked "anyfunc" record, for caller-side signature checking. +It consists of the actual function pointer and a signature id to be checked +by the caller.

+

+ Fields

func_ptr: *const VMFunctionBody

Function body.

+
type_index: VMSharedSignatureIndex

Function signature id.

+
vmctx: *mut VMContext

Function VMContext.

+

Trait Implementations

impl Clone for VMCallerCheckedAnyfunc[src]

impl Debug for VMCallerCheckedAnyfunc[src]

impl Default for VMCallerCheckedAnyfunc[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMContext.html b/api/wasmtime_runtime/struct.VMContext.html new file mode 100644 index 000000000000..572251b1459e --- /dev/null +++ b/api/wasmtime_runtime/struct.VMContext.html @@ -0,0 +1,24 @@ +wasmtime_runtime::VMContext - Rust

[][src]Struct wasmtime_runtime::VMContext

#[repr(C)]
+pub struct VMContext {}

The VM "context", which is pointed to by the vmctx arg in Cranelift. +This has information about globals, memories, tables, and other runtime +state associated with the current instance.

+

The struct here is empty, as the sizes of these fields are dynamic, and +we can't describe them in Rust's type system. Sufficient memory is +allocated at runtime.

+

TODO: We could move the globals into the vmctx allocation too.

+

Methods

impl VMContext[src]

pub unsafe fn host_state(&self) -> &dyn Any[src]

Return a reference to the host state associated with this Instance.

+

Safety

+

This is unsafe because it doesn't work on just any VMContext, it must +be a VMContext allocated as part of an Instance.

+

Trait Implementations

impl Debug for VMContext[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMFunctionBody.html b/api/wasmtime_runtime/struct.VMFunctionBody.html new file mode 100644 index 000000000000..0b94e9bd546d --- /dev/null +++ b/api/wasmtime_runtime/struct.VMFunctionBody.html @@ -0,0 +1,16 @@ +wasmtime_runtime::VMFunctionBody - Rust

[][src]Struct wasmtime_runtime::VMFunctionBody

#[repr(C)]
+pub struct VMFunctionBody(_);

A placeholder byte-sized type which is just used to provide some amount of type +safety when dealing with pointers to JIT-compiled function bodies. Note that it's +deliberately not Copy, as we shouldn't be carelessly copying function body bytes +around.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMFunctionImport.html b/api/wasmtime_runtime/struct.VMFunctionImport.html new file mode 100644 index 000000000000..8cb3cba91d57 --- /dev/null +++ b/api/wasmtime_runtime/struct.VMFunctionImport.html @@ -0,0 +1,26 @@ +wasmtime_runtime::VMFunctionImport - Rust

[][src]Struct wasmtime_runtime::VMFunctionImport

#[repr(C)]
+pub struct VMFunctionImport {
+    pub body: *const VMFunctionBody,
+    pub vmctx: *mut VMContext,
+}

An imported function.

+

+ Fields

body: *const VMFunctionBody

A pointer to the imported function body.

+
vmctx: *mut VMContext

A pointer to the VMContext that owns the function.

+

Trait Implementations

impl Clone for VMFunctionImport[src]

impl Copy for VMFunctionImport[src]

impl Debug for VMFunctionImport[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMGlobalDefinition.html b/api/wasmtime_runtime/struct.VMGlobalDefinition.html new file mode 100644 index 000000000000..d04348ff5d53 --- /dev/null +++ b/api/wasmtime_runtime/struct.VMGlobalDefinition.html @@ -0,0 +1,43 @@ +wasmtime_runtime::VMGlobalDefinition - Rust

[][src]Struct wasmtime_runtime::VMGlobalDefinition

#[repr(C)]
+pub struct VMGlobalDefinition { /* fields omitted */ }

The storage for a WebAssembly global defined within the instance.

+

TODO: Pack the globals more densely, rather than using the same size +for every type.

+

Methods

impl VMGlobalDefinition[src]

pub fn new() -> Self[src]

Construct a VMGlobalDefinition.

+

pub unsafe fn as_i32(&self) -> &i32[src]

Return a reference to the value as an i32.

+

pub unsafe fn as_i32_mut(&mut self) -> &mut i32[src]

Return a mutable reference to the value as an i32.

+

pub unsafe fn as_u32(&self) -> &u32[src]

Return a reference to the value as a u32.

+

pub unsafe fn as_u32_mut(&mut self) -> &mut u32[src]

Return a mutable reference to the value as an u32.

+

pub unsafe fn as_i64(&self) -> &i64[src]

Return a reference to the value as an i64.

+

pub unsafe fn as_i64_mut(&mut self) -> &mut i64[src]

Return a mutable reference to the value as an i64.

+

pub unsafe fn as_u64(&self) -> &u64[src]

Return a reference to the value as an u64.

+

pub unsafe fn as_u64_mut(&mut self) -> &mut u64[src]

Return a mutable reference to the value as an u64.

+

pub unsafe fn as_f32(&self) -> &f32[src]

Return a reference to the value as an f32.

+

pub unsafe fn as_f32_mut(&mut self) -> &mut f32[src]

Return a mutable reference to the value as an f32.

+

pub unsafe fn as_f32_bits(&self) -> &u32[src]

Return a reference to the value as f32 bits.

+

pub unsafe fn as_f32_bits_mut(&mut self) -> &mut u32[src]

Return a mutable reference to the value as f32 bits.

+

pub unsafe fn as_f64(&self) -> &f64[src]

Return a reference to the value as an f64.

+

pub unsafe fn as_f64_mut(&mut self) -> &mut f64[src]

Return a mutable reference to the value as an f64.

+

pub unsafe fn as_f64_bits(&self) -> &u64[src]

Return a reference to the value as f64 bits.

+

pub unsafe fn as_f64_bits_mut(&mut self) -> &mut u64[src]

Return a mutable reference to the value as f64 bits.

+

pub unsafe fn as_u128(&self) -> &u128[src]

Return a reference to the value as an u128.

+

pub unsafe fn as_u128_mut(&mut self) -> &mut u128[src]

Return a mutable reference to the value as an u128.

+

pub unsafe fn as_u128_bits(&self) -> &[u8; 16][src]

Return a reference to the value as u128 bits.

+

pub unsafe fn as_u128_bits_mut(&mut self) -> &mut [u8; 16][src]

Return a mutable reference to the value as u128 bits.

+

Trait Implementations

impl Clone for VMGlobalDefinition[src]

impl Copy for VMGlobalDefinition[src]

impl Debug for VMGlobalDefinition[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMGlobalImport.html b/api/wasmtime_runtime/struct.VMGlobalImport.html new file mode 100644 index 000000000000..8738d6cc9213 --- /dev/null +++ b/api/wasmtime_runtime/struct.VMGlobalImport.html @@ -0,0 +1,25 @@ +wasmtime_runtime::VMGlobalImport - Rust

[][src]Struct wasmtime_runtime::VMGlobalImport

#[repr(C)]
+pub struct VMGlobalImport {
+    pub from: *mut VMGlobalDefinition,
+}

The fields compiled code needs to access to utilize a WebAssembly global +variable imported from another instance.

+

+ Fields

from: *mut VMGlobalDefinition

A pointer to the imported global variable description.

+

Trait Implementations

impl Clone for VMGlobalImport[src]

impl Copy for VMGlobalImport[src]

impl Debug for VMGlobalImport[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMInvokeArgument.html b/api/wasmtime_runtime/struct.VMInvokeArgument.html new file mode 100644 index 000000000000..beb30eac9787 --- /dev/null +++ b/api/wasmtime_runtime/struct.VMInvokeArgument.html @@ -0,0 +1,22 @@ +wasmtime_runtime::VMInvokeArgument - Rust

[][src]Struct wasmtime_runtime::VMInvokeArgument

#[repr(C)]
+pub struct VMInvokeArgument(_);

The storage for a WebAssembly invocation argument

+

TODO: These could be packed more densely, rather than using the same size for every type.

+

Methods

impl VMInvokeArgument[src]

pub fn new() -> Self[src]

Create a new invocation argument filled with zeroes

+

Trait Implementations

impl Clone for VMInvokeArgument[src]

impl Copy for VMInvokeArgument[src]

impl Debug for VMInvokeArgument[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMMemoryDefinition.html b/api/wasmtime_runtime/struct.VMMemoryDefinition.html new file mode 100644 index 000000000000..e04d737f8132 --- /dev/null +++ b/api/wasmtime_runtime/struct.VMMemoryDefinition.html @@ -0,0 +1,28 @@ +wasmtime_runtime::VMMemoryDefinition - Rust

[][src]Struct wasmtime_runtime::VMMemoryDefinition

#[repr(C)]
+pub struct VMMemoryDefinition {
+    pub base: *mut u8,
+    pub current_length: usize,
+}

The fields compiled code needs to access to utilize a WebAssembly linear +memory defined within the instance, namely the start address and the +size in bytes.

+

+ Fields

base: *mut u8

The start address.

+
current_length: usize

The current logical size of this linear memory in bytes.

+

Trait Implementations

impl Clone for VMMemoryDefinition[src]

impl Copy for VMMemoryDefinition[src]

impl Debug for VMMemoryDefinition[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMMemoryImport.html b/api/wasmtime_runtime/struct.VMMemoryImport.html new file mode 100644 index 000000000000..fac6b9542223 --- /dev/null +++ b/api/wasmtime_runtime/struct.VMMemoryImport.html @@ -0,0 +1,27 @@ +wasmtime_runtime::VMMemoryImport - Rust

[][src]Struct wasmtime_runtime::VMMemoryImport

#[repr(C)]
+pub struct VMMemoryImport {
+    pub from: *mut VMMemoryDefinition,
+    pub vmctx: *mut VMContext,
+}

The fields compiled code needs to access to utilize a WebAssembly linear +memory imported from another instance.

+

+ Fields

from: *mut VMMemoryDefinition

A pointer to the imported memory description.

+
vmctx: *mut VMContext

A pointer to the VMContext that owns the memory description.

+

Trait Implementations

impl Clone for VMMemoryImport[src]

impl Copy for VMMemoryImport[src]

impl Debug for VMMemoryImport[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMSharedSignatureIndex.html b/api/wasmtime_runtime/struct.VMSharedSignatureIndex.html new file mode 100644 index 000000000000..eeb6fc2784c7 --- /dev/null +++ b/api/wasmtime_runtime/struct.VMSharedSignatureIndex.html @@ -0,0 +1,28 @@ +wasmtime_runtime::VMSharedSignatureIndex - Rust

[][src]Struct wasmtime_runtime::VMSharedSignatureIndex

#[repr(C)]
+pub struct VMSharedSignatureIndex(_);

An index into the shared signature registry, usable for checking signatures +at indirect calls.

+

Methods

impl VMSharedSignatureIndex[src]

pub fn new(value: u32) -> Self[src]

Create a new VMSharedSignatureIndex.

+

Trait Implementations

impl Clone for VMSharedSignatureIndex[src]

impl Copy for VMSharedSignatureIndex[src]

impl Debug for VMSharedSignatureIndex[src]

impl Default for VMSharedSignatureIndex[src]

impl Eq for VMSharedSignatureIndex[src]

impl Hash for VMSharedSignatureIndex[src]

impl PartialEq<VMSharedSignatureIndex> for VMSharedSignatureIndex[src]

impl StructuralEq for VMSharedSignatureIndex[src]

impl StructuralPartialEq for VMSharedSignatureIndex[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMTableDefinition.html b/api/wasmtime_runtime/struct.VMTableDefinition.html new file mode 100644 index 000000000000..bc128196408b --- /dev/null +++ b/api/wasmtime_runtime/struct.VMTableDefinition.html @@ -0,0 +1,27 @@ +wasmtime_runtime::VMTableDefinition - Rust

[][src]Struct wasmtime_runtime::VMTableDefinition

#[repr(C)]
+pub struct VMTableDefinition {
+    pub base: *mut u8,
+    pub current_elements: u32,
+}

The fields compiled code needs to access to utilize a WebAssembly table +defined within the instance.

+

+ Fields

base: *mut u8

Pointer to the table data.

+
current_elements: u32

The current number of elements in the table.

+

Trait Implementations

impl Clone for VMTableDefinition[src]

impl Copy for VMTableDefinition[src]

impl Debug for VMTableDefinition[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/struct.VMTableImport.html b/api/wasmtime_runtime/struct.VMTableImport.html new file mode 100644 index 000000000000..05c5495eb8f4 --- /dev/null +++ b/api/wasmtime_runtime/struct.VMTableImport.html @@ -0,0 +1,27 @@ +wasmtime_runtime::VMTableImport - Rust

[][src]Struct wasmtime_runtime::VMTableImport

#[repr(C)]
+pub struct VMTableImport {
+    pub from: *mut VMTableDefinition,
+    pub vmctx: *mut VMContext,
+}

The fields compiled code needs to access to utilize a WebAssembly table +imported from another instance.

+

+ Fields

from: *mut VMTableDefinition

A pointer to the imported table description.

+
vmctx: *mut VMContext

A pointer to the VMContext that owns the table description.

+

Trait Implementations

impl Clone for VMTableImport[src]

impl Copy for VMTableImport[src]

impl Debug for VMTableImport[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_runtime/trap_registry/struct.TrapDescription.html b/api/wasmtime_runtime/trap_registry/struct.TrapDescription.html new file mode 100644 index 000000000000..1ab1649235f4 --- /dev/null +++ b/api/wasmtime_runtime/trap_registry/struct.TrapDescription.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.TrapDescription.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/trap_registry/struct.TrapRegistration.html b/api/wasmtime_runtime/trap_registry/struct.TrapRegistration.html new file mode 100644 index 000000000000..43819e60eddc --- /dev/null +++ b/api/wasmtime_runtime/trap_registry/struct.TrapRegistration.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.TrapRegistration.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/trap_registry/struct.TrapRegistry.html b/api/wasmtime_runtime/trap_registry/struct.TrapRegistry.html new file mode 100644 index 000000000000..9bae1af33b0e --- /dev/null +++ b/api/wasmtime_runtime/trap_registry/struct.TrapRegistry.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.TrapRegistry.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/traphandlers/enum.Trap.html b/api/wasmtime_runtime/traphandlers/enum.Trap.html new file mode 100644 index 000000000000..cf961fc294f2 --- /dev/null +++ b/api/wasmtime_runtime/traphandlers/enum.Trap.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/enum.Trap.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/traphandlers/fn.catch_traps.html b/api/wasmtime_runtime/traphandlers/fn.catch_traps.html new file mode 100644 index 000000000000..207487906d7e --- /dev/null +++ b/api/wasmtime_runtime/traphandlers/fn.catch_traps.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/fn.catch_traps.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/traphandlers/fn.raise_user_trap.html b/api/wasmtime_runtime/traphandlers/fn.raise_user_trap.html new file mode 100644 index 000000000000..fb8b8a5ac651 --- /dev/null +++ b/api/wasmtime_runtime/traphandlers/fn.raise_user_trap.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/fn.raise_user_trap.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/traphandlers/fn.resume_panic.html b/api/wasmtime_runtime/traphandlers/fn.resume_panic.html new file mode 100644 index 000000000000..847b2359d497 --- /dev/null +++ b/api/wasmtime_runtime/traphandlers/fn.resume_panic.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/fn.resume_panic.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/traphandlers/fn.wasmtime_call_trampoline.html b/api/wasmtime_runtime/traphandlers/fn.wasmtime_call_trampoline.html new file mode 100644 index 000000000000..4b11846ab2c1 --- /dev/null +++ b/api/wasmtime_runtime/traphandlers/fn.wasmtime_call_trampoline.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/fn.wasmtime_call_trampoline.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMCallerCheckedAnyfunc.html b/api/wasmtime_runtime/vmcontext/struct.VMCallerCheckedAnyfunc.html new file mode 100644 index 000000000000..dd5b6e8f0718 --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMCallerCheckedAnyfunc.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMCallerCheckedAnyfunc.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMContext.html b/api/wasmtime_runtime/vmcontext/struct.VMContext.html new file mode 100644 index 000000000000..d4af01fb127a --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMContext.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMContext.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMFunctionBody.html b/api/wasmtime_runtime/vmcontext/struct.VMFunctionBody.html new file mode 100644 index 000000000000..abc7f9e72274 --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMFunctionBody.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMFunctionBody.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMFunctionImport.html b/api/wasmtime_runtime/vmcontext/struct.VMFunctionImport.html new file mode 100644 index 000000000000..0f74b948a0ae --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMFunctionImport.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMFunctionImport.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMGlobalDefinition.html b/api/wasmtime_runtime/vmcontext/struct.VMGlobalDefinition.html new file mode 100644 index 000000000000..8bf61ca5fb56 --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMGlobalDefinition.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMGlobalDefinition.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMGlobalImport.html b/api/wasmtime_runtime/vmcontext/struct.VMGlobalImport.html new file mode 100644 index 000000000000..3588f82125db --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMGlobalImport.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMGlobalImport.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMInvokeArgument.html b/api/wasmtime_runtime/vmcontext/struct.VMInvokeArgument.html new file mode 100644 index 000000000000..08307869a105 --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMInvokeArgument.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMInvokeArgument.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMMemoryDefinition.html b/api/wasmtime_runtime/vmcontext/struct.VMMemoryDefinition.html new file mode 100644 index 000000000000..5763ef295c07 --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMMemoryDefinition.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMMemoryDefinition.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMMemoryImport.html b/api/wasmtime_runtime/vmcontext/struct.VMMemoryImport.html new file mode 100644 index 000000000000..7bf44a1ef0f3 --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMMemoryImport.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMMemoryImport.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMSharedSignatureIndex.html b/api/wasmtime_runtime/vmcontext/struct.VMSharedSignatureIndex.html new file mode 100644 index 000000000000..ec0506191025 --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMSharedSignatureIndex.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMSharedSignatureIndex.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMTableDefinition.html b/api/wasmtime_runtime/vmcontext/struct.VMTableDefinition.html new file mode 100644 index 000000000000..4aa8bdd2edd0 --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMTableDefinition.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMTableDefinition.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_runtime/vmcontext/struct.VMTableImport.html b/api/wasmtime_runtime/vmcontext/struct.VMTableImport.html new file mode 100644 index 000000000000..02184351c479 --- /dev/null +++ b/api/wasmtime_runtime/vmcontext/struct.VMTableImport.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_runtime/struct.VMTableImport.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_rust/all.html b/api/wasmtime_rust/all.html new file mode 100644 index 000000000000..1679be9a603a --- /dev/null +++ b/api/wasmtime_rust/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Attribute Macros

\ No newline at end of file diff --git a/api/wasmtime_rust/attr.wasmtime.html b/api/wasmtime_rust/attr.wasmtime.html new file mode 100644 index 000000000000..22f8da2af3f0 --- /dev/null +++ b/api/wasmtime_rust/attr.wasmtime.html @@ -0,0 +1 @@ +wasmtime_rust::wasmtime - Rust

[][src]Attribute Macro wasmtime_rust::wasmtime

#[wasmtime]
\ No newline at end of file diff --git a/api/wasmtime_rust/index.html b/api/wasmtime_rust/index.html new file mode 100644 index 000000000000..fbba36878397 --- /dev/null +++ b/api/wasmtime_rust/index.html @@ -0,0 +1,2 @@ +wasmtime_rust - Rust

[][src]Crate wasmtime_rust

Attribute Macros

+
wasmtime
\ No newline at end of file diff --git a/api/wasmtime_rust/sidebar-items.js b/api/wasmtime_rust/sidebar-items.js new file mode 100644 index 000000000000..f70a3d3d5dc0 --- /dev/null +++ b/api/wasmtime_rust/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"attr":[["wasmtime",""]]}); \ No newline at end of file diff --git a/api/wasmtime_rust_macro/all.html b/api/wasmtime_rust_macro/all.html new file mode 100644 index 000000000000..702506eb8cd5 --- /dev/null +++ b/api/wasmtime_rust_macro/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Attribute Macros

\ No newline at end of file diff --git a/api/wasmtime_rust_macro/attr.wasmtime.html b/api/wasmtime_rust_macro/attr.wasmtime.html new file mode 100644 index 000000000000..4a156b6a5b92 --- /dev/null +++ b/api/wasmtime_rust_macro/attr.wasmtime.html @@ -0,0 +1 @@ +wasmtime_rust_macro::wasmtime - Rust

[][src]Attribute Macro wasmtime_rust_macro::wasmtime

#[wasmtime]
\ No newline at end of file diff --git a/api/wasmtime_rust_macro/index.html b/api/wasmtime_rust_macro/index.html new file mode 100644 index 000000000000..b18a5051bfa9 --- /dev/null +++ b/api/wasmtime_rust_macro/index.html @@ -0,0 +1,2 @@ +wasmtime_rust_macro - Rust

[][src]Crate wasmtime_rust_macro

Attribute Macros

+
wasmtime
\ No newline at end of file diff --git a/api/wasmtime_rust_macro/sidebar-items.js b/api/wasmtime_rust_macro/sidebar-items.js new file mode 100644 index 000000000000..f70a3d3d5dc0 --- /dev/null +++ b/api/wasmtime_rust_macro/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"attr":[["wasmtime",""]]}); \ No newline at end of file diff --git a/api/wasmtime_wasi/all.html b/api/wasmtime_wasi/all.html new file mode 100644 index 000000000000..1d333ce576ce --- /dev/null +++ b/api/wasmtime_wasi/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Functions

\ No newline at end of file diff --git a/api/wasmtime_wasi/fn.is_wasi_module.html b/api/wasmtime_wasi/fn.is_wasi_module.html new file mode 100644 index 000000000000..d6fdcf9c0273 --- /dev/null +++ b/api/wasmtime_wasi/fn.is_wasi_module.html @@ -0,0 +1 @@ +wasmtime_wasi::is_wasi_module - Rust

[][src]Function wasmtime_wasi::is_wasi_module

pub fn is_wasi_module(name: &str) -> bool
\ No newline at end of file diff --git a/api/wasmtime_wasi/index.html b/api/wasmtime_wasi/index.html new file mode 100644 index 000000000000..9c8847bd0cdc --- /dev/null +++ b/api/wasmtime_wasi/index.html @@ -0,0 +1,6 @@ +wasmtime_wasi - Rust

[][src]Crate wasmtime_wasi

Modules

+
old

Structs

+
Wasi

An instantiated instance of the wasi exports.

+
WasiCtx
WasiCtxBuilder

A builder allowing customizable construction of WasiCtx instances.

+

Functions

+
is_wasi_module
\ No newline at end of file diff --git a/api/wasmtime_wasi/old/index.html b/api/wasmtime_wasi/old/index.html new file mode 100644 index 000000000000..9e6d9181feff --- /dev/null +++ b/api/wasmtime_wasi/old/index.html @@ -0,0 +1,2 @@ +wasmtime_wasi::old - Rust

[][src]Module wasmtime_wasi::old

Modules

+
snapshot_0
\ No newline at end of file diff --git a/api/wasmtime_wasi/old/sidebar-items.js b/api/wasmtime_wasi/old/sidebar-items.js new file mode 100644 index 000000000000..02e15d991f23 --- /dev/null +++ b/api/wasmtime_wasi/old/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"mod":[["snapshot_0",""]]}); \ No newline at end of file diff --git a/api/wasmtime_wasi/old/snapshot_0/fn.is_wasi_module.html b/api/wasmtime_wasi/old/snapshot_0/fn.is_wasi_module.html new file mode 100644 index 000000000000..b30daa7febd4 --- /dev/null +++ b/api/wasmtime_wasi/old/snapshot_0/fn.is_wasi_module.html @@ -0,0 +1 @@ +wasmtime_wasi::old::snapshot_0::is_wasi_module - Rust

[][src]Function wasmtime_wasi::old::snapshot_0::is_wasi_module

pub fn is_wasi_module(name: &str) -> bool
\ No newline at end of file diff --git a/api/wasmtime_wasi/old/snapshot_0/index.html b/api/wasmtime_wasi/old/snapshot_0/index.html new file mode 100644 index 000000000000..2746b58044aa --- /dev/null +++ b/api/wasmtime_wasi/old/snapshot_0/index.html @@ -0,0 +1,4 @@ +wasmtime_wasi::old::snapshot_0 - Rust

[][src]Module wasmtime_wasi::old::snapshot_0

Structs

+
Wasi

An instantiated instance of the wasi exports.

+

Functions

+
is_wasi_module
\ No newline at end of file diff --git a/api/wasmtime_wasi/old/snapshot_0/sidebar-items.js b/api/wasmtime_wasi/old/snapshot_0/sidebar-items.js new file mode 100644 index 000000000000..0f134d6b318b --- /dev/null +++ b/api/wasmtime_wasi/old/snapshot_0/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["is_wasi_module",""]],"struct":[["Wasi","An instantiated instance of the wasi exports."]]}); \ No newline at end of file diff --git a/api/wasmtime_wasi/old/snapshot_0/struct.Wasi.html b/api/wasmtime_wasi/old/snapshot_0/struct.Wasi.html new file mode 100644 index 000000000000..53037fb9783f --- /dev/null +++ b/api/wasmtime_wasi/old/snapshot_0/struct.Wasi.html @@ -0,0 +1,72 @@ +wasmtime_wasi::old::snapshot_0::Wasi - Rust

[][src]Struct wasmtime_wasi::old::snapshot_0::Wasi

pub struct Wasi {
+    pub args_get: Func,
+    pub args_sizes_get: Func,
+    pub environ_get: Func,
+    pub environ_sizes_get: Func,
+    pub clock_res_get: Func,
+    pub clock_time_get: Func,
+    pub fd_advise: Func,
+    pub fd_allocate: Func,
+    pub fd_close: Func,
+    pub fd_datasync: Func,
+    pub fd_fdstat_get: Func,
+    pub fd_fdstat_set_flags: Func,
+    pub fd_fdstat_set_rights: Func,
+    pub fd_filestat_get: Func,
+    pub fd_filestat_set_size: Func,
+    pub fd_filestat_set_times: Func,
+    pub fd_pread: Func,
+    pub fd_prestat_get: Func,
+    pub fd_prestat_dir_name: Func,
+    pub fd_pwrite: Func,
+    pub fd_read: Func,
+    pub fd_readdir: Func,
+    pub fd_renumber: Func,
+    pub fd_seek: Func,
+    pub fd_sync: Func,
+    pub fd_tell: Func,
+    pub fd_write: Func,
+    pub path_create_directory: Func,
+    pub path_filestat_get: Func,
+    pub path_filestat_set_times: Func,
+    pub path_link: Func,
+    pub path_open: Func,
+    pub path_readlink: Func,
+    pub path_remove_directory: Func,
+    pub path_rename: Func,
+    pub path_symlink: Func,
+    pub path_unlink_file: Func,
+    pub poll_oneoff: Func,
+    pub proc_exit: Func,
+    pub proc_raise: Func,
+    pub sched_yield: Func,
+    pub random_get: Func,
+    pub sock_recv: Func,
+    pub sock_send: Func,
+    pub sock_shutdown: Func,
+}

An instantiated instance of the wasi exports.

+

This represents a wasi module which can be used to instantiate other +wasm modules. This structure exports all that various fields of the +wasi instance as fields which can be used to implement your own +instantiation logic, if necessary. Additionally Wasi::get_export +can be used to do name-based resolution.

+

+ Fields

args_get: Funcargs_sizes_get: Funcenviron_get: Funcenviron_sizes_get: Funcclock_res_get: Funcclock_time_get: Funcfd_advise: Funcfd_allocate: Funcfd_close: Funcfd_datasync: Funcfd_fdstat_get: Funcfd_fdstat_set_flags: Funcfd_fdstat_set_rights: Funcfd_filestat_get: Funcfd_filestat_set_size: Funcfd_filestat_set_times: Funcfd_pread: Funcfd_prestat_get: Funcfd_prestat_dir_name: Funcfd_pwrite: Funcfd_read: Funcfd_readdir: Funcfd_renumber: Funcfd_seek: Funcfd_sync: Funcfd_tell: Funcfd_write: Funcpath_create_directory: Funcpath_filestat_get: Funcpath_filestat_set_times: Funcpath_link: Funcpath_open: Funcpath_readlink: Funcpath_remove_directory: Funcpath_rename: Funcpath_symlink: Funcpath_unlink_file: Funcpoll_oneoff: Funcproc_exit: Funcproc_raise: Funcsched_yield: Funcrandom_get: Funcsock_recv: Funcsock_send: Funcsock_shutdown: Func

Methods

impl Wasi[src]

pub fn new(store: &Store, cx: WasiCtx) -> Wasi[src]

Creates a new Wasi instance.

+

External values are allocated into the store provided and +configuration of the wasi instance itself should be all +contained in the cx parameter.

+

pub fn get_export(&self, name: &str) -> Option<&Func>[src]

Looks up a field called name in this structure, returning it +if found.

+

This is often useful when instantiating a wasmtime instance +where name resolution often happens with strings.

+

Auto Trait Implementations

impl !RefUnwindSafe for Wasi

impl !Send for Wasi

impl !Sync for Wasi

impl Unpin for Wasi

impl !UnwindSafe for Wasi

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_wasi/sidebar-items.js b/api/wasmtime_wasi/sidebar-items.js new file mode 100644 index 000000000000..68e4ef7ba5bb --- /dev/null +++ b/api/wasmtime_wasi/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["is_wasi_module",""]],"mod":[["old",""]],"struct":[["Wasi","An instantiated instance of the wasi exports."],["WasiCtx",""],["WasiCtxBuilder","A builder allowing customizable construction of `WasiCtx` instances."]]}); \ No newline at end of file diff --git a/api/wasmtime_wasi/struct.Wasi.html b/api/wasmtime_wasi/struct.Wasi.html new file mode 100644 index 000000000000..1dd26c277f71 --- /dev/null +++ b/api/wasmtime_wasi/struct.Wasi.html @@ -0,0 +1,72 @@ +wasmtime_wasi::Wasi - Rust

[][src]Struct wasmtime_wasi::Wasi

pub struct Wasi {
+    pub args_get: Func,
+    pub args_sizes_get: Func,
+    pub environ_get: Func,
+    pub environ_sizes_get: Func,
+    pub clock_res_get: Func,
+    pub clock_time_get: Func,
+    pub fd_advise: Func,
+    pub fd_allocate: Func,
+    pub fd_close: Func,
+    pub fd_datasync: Func,
+    pub fd_fdstat_get: Func,
+    pub fd_fdstat_set_flags: Func,
+    pub fd_fdstat_set_rights: Func,
+    pub fd_filestat_get: Func,
+    pub fd_filestat_set_size: Func,
+    pub fd_filestat_set_times: Func,
+    pub fd_pread: Func,
+    pub fd_prestat_get: Func,
+    pub fd_prestat_dir_name: Func,
+    pub fd_pwrite: Func,
+    pub fd_read: Func,
+    pub fd_readdir: Func,
+    pub fd_renumber: Func,
+    pub fd_seek: Func,
+    pub fd_sync: Func,
+    pub fd_tell: Func,
+    pub fd_write: Func,
+    pub path_create_directory: Func,
+    pub path_filestat_get: Func,
+    pub path_filestat_set_times: Func,
+    pub path_link: Func,
+    pub path_open: Func,
+    pub path_readlink: Func,
+    pub path_remove_directory: Func,
+    pub path_rename: Func,
+    pub path_symlink: Func,
+    pub path_unlink_file: Func,
+    pub poll_oneoff: Func,
+    pub proc_exit: Func,
+    pub proc_raise: Func,
+    pub sched_yield: Func,
+    pub random_get: Func,
+    pub sock_recv: Func,
+    pub sock_send: Func,
+    pub sock_shutdown: Func,
+}

An instantiated instance of the wasi exports.

+

This represents a wasi module which can be used to instantiate other +wasm modules. This structure exports all that various fields of the +wasi instance as fields which can be used to implement your own +instantiation logic, if necessary. Additionally Wasi::get_export +can be used to do name-based resolution.

+

+ Fields

args_get: Funcargs_sizes_get: Funcenviron_get: Funcenviron_sizes_get: Funcclock_res_get: Funcclock_time_get: Funcfd_advise: Funcfd_allocate: Funcfd_close: Funcfd_datasync: Funcfd_fdstat_get: Funcfd_fdstat_set_flags: Funcfd_fdstat_set_rights: Funcfd_filestat_get: Funcfd_filestat_set_size: Funcfd_filestat_set_times: Funcfd_pread: Funcfd_prestat_get: Funcfd_prestat_dir_name: Funcfd_pwrite: Funcfd_read: Funcfd_readdir: Funcfd_renumber: Funcfd_seek: Funcfd_sync: Funcfd_tell: Funcfd_write: Funcpath_create_directory: Funcpath_filestat_get: Funcpath_filestat_set_times: Funcpath_link: Funcpath_open: Funcpath_readlink: Funcpath_remove_directory: Funcpath_rename: Funcpath_symlink: Funcpath_unlink_file: Funcpoll_oneoff: Funcproc_exit: Funcproc_raise: Funcsched_yield: Funcrandom_get: Funcsock_recv: Funcsock_send: Funcsock_shutdown: Func

Methods

impl Wasi[src]

pub fn new(store: &Store, cx: WasiCtx) -> Wasi[src]

Creates a new Wasi instance.

+

External values are allocated into the store provided and +configuration of the wasi instance itself should be all +contained in the cx parameter.

+

pub fn get_export(&self, name: &str) -> Option<&Func>[src]

Looks up a field called name in this structure, returning it +if found.

+

This is often useful when instantiating a wasmtime instance +where name resolution often happens with strings.

+

Auto Trait Implementations

impl !RefUnwindSafe for Wasi

impl !Send for Wasi

impl !Sync for Wasi

impl Unpin for Wasi

impl !UnwindSafe for Wasi

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_wasi/struct.WasiCtx.html b/api/wasmtime_wasi/struct.WasiCtx.html new file mode 100644 index 000000000000..d09830ea9834 --- /dev/null +++ b/api/wasmtime_wasi/struct.WasiCtx.html @@ -0,0 +1,22 @@ +wasmtime_wasi::WasiCtx - Rust

[][src]Struct wasmtime_wasi::WasiCtx

pub struct WasiCtx { /* fields omitted */ }

Methods

impl WasiCtx[src]

pub fn new<S>(args: impl IntoIterator<Item = S>) -> Result<WasiCtx, Error> where
    S: AsRef<[u8]>, 
[src]

Make a new WasiCtx with some default settings.

+
    +
  • +

    File descriptors 0, 1, and 2 inherit stdin, stdout, and stderr from the host process.

    +
  • +
  • +

    Environment variables are inherited from the host process.

    +
  • +
+

To override these behaviors, use WasiCtxBuilder.

+

Trait Implementations

impl Debug for WasiCtx[src]

Auto Trait Implementations

impl RefUnwindSafe for WasiCtx

impl Send for WasiCtx

impl Sync for WasiCtx

impl Unpin for WasiCtx

impl UnwindSafe for WasiCtx

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_wasi/struct.WasiCtxBuilder.html b/api/wasmtime_wasi/struct.WasiCtxBuilder.html new file mode 100644 index 000000000000..b8e435d147d0 --- /dev/null +++ b/api/wasmtime_wasi/struct.WasiCtxBuilder.html @@ -0,0 +1,40 @@ +wasmtime_wasi::WasiCtxBuilder - Rust

[][src]Struct wasmtime_wasi::WasiCtxBuilder

pub struct WasiCtxBuilder { /* fields omitted */ }

A builder allowing customizable construction of WasiCtx instances.

+

Methods

impl WasiCtxBuilder[src]

pub fn new() -> WasiCtxBuilder[src]

Builder for a new WasiCtx.

+

pub fn args<S>(self, args: impl IntoIterator<Item = S>) -> WasiCtxBuilder where
    S: AsRef<[u8]>, 
[src]

Add arguments to the command-line arguments list.

+

Arguments must be valid UTF-8 with no NUL bytes, or else WasiCtxBuilder::build() will fail +with Error::EILSEQ.

+

pub fn arg<S>(self, arg: S) -> WasiCtxBuilder where
    S: AsRef<[u8]>, 
[src]

Add an argument to the command-line arguments list.

+

Arguments must be valid UTF-8 with no NUL bytes, or else WasiCtxBuilder::build() will fail +with Error::EILSEQ.

+

pub fn inherit_args(self) -> WasiCtxBuilder[src]

Inherit the command-line arguments from the host process.

+

If any arguments from the host process contain invalid UTF-8, WasiCtxBuilder::build() will +fail with Error::EILSEQ.

+

pub fn inherit_stdio(self) -> WasiCtxBuilder[src]

Inherit the stdin, stdout, and stderr streams from the host process.

+

pub fn inherit_env(self) -> WasiCtxBuilder[src]

Inherit the environment variables from the host process.

+

If any environment variables from the host process contain invalid Unicode (UTF-16 for +Windows, UTF-8 for other platforms), WasiCtxBuilder::build() will fail with +Error::EILSEQ.

+

pub fn env<S>(self, k: S, v: S) -> WasiCtxBuilder where
    S: AsRef<[u8]>, 
[src]

Add an entry to the environment.

+

Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else +WasiCtxBuilder::build() will fail with Error::EILSEQ.

+

pub fn envs<S, T>(self, envs: impl IntoIterator<Item = T>) -> WasiCtxBuilder where
    S: AsRef<[u8]>,
    T: Borrow<(S, S)>, 
[src]

Add entries to the environment.

+

Environment variable keys and values must be valid UTF-8 with no NUL bytes, or else +WasiCtxBuilder::build() will fail with Error::EILSEQ.

+

pub fn stdin(self, file: File) -> WasiCtxBuilder[src]

Provide a File to use as stdin

+

pub fn stdout(self, file: File) -> WasiCtxBuilder[src]

Provide a File to use as stdout

+

pub fn stderr(self, file: File) -> WasiCtxBuilder[src]

Provide a File to use as stderr

+

pub fn preopened_dir<P>(self, dir: File, guest_path: P) -> WasiCtxBuilder where
    P: AsRef<Path>, 
[src]

Add a preopened directory.

+

pub fn build(self) -> Result<WasiCtx, Error>[src]

Build a WasiCtx, consuming this WasiCtxBuilder.

+

If any of the arguments or environment variables in this builder cannot be converted into +CStrings, either due to NUL bytes or Unicode conversions, this returns Error::EILSEQ.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_wast/all.html b/api/wasmtime_wast/all.html new file mode 100644 index 000000000000..2f1aacf83800 --- /dev/null +++ b/api/wasmtime_wast/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Functions

Constants

\ No newline at end of file diff --git a/api/wasmtime_wast/constant.VERSION.html b/api/wasmtime_wast/constant.VERSION.html new file mode 100644 index 000000000000..5cafbd78ecca --- /dev/null +++ b/api/wasmtime_wast/constant.VERSION.html @@ -0,0 +1,2 @@ +wasmtime_wast::VERSION - Rust

[][src]Constant wasmtime_wast::VERSION

pub const VERSION: &str = env!("CARGO_PKG_VERSION");

Version number of this crate.

+
\ No newline at end of file diff --git a/api/wasmtime_wast/fn.instantiate_spectest.html b/api/wasmtime_wast/fn.instantiate_spectest.html new file mode 100644 index 000000000000..59d1e5d71c84 --- /dev/null +++ b/api/wasmtime_wast/fn.instantiate_spectest.html @@ -0,0 +1,3 @@ +wasmtime_wast::instantiate_spectest - Rust

[][src]Function wasmtime_wast::instantiate_spectest

pub fn instantiate_spectest(store: &Store) -> HashMap<&'static str, Extern>

Return an instance implementing the "spectest" interface used in the +spec testsuite.

+
\ No newline at end of file diff --git a/api/wasmtime_wast/index.html b/api/wasmtime_wast/index.html new file mode 100644 index 000000000000..6aa424addb68 --- /dev/null +++ b/api/wasmtime_wast/index.html @@ -0,0 +1,10 @@ +wasmtime_wast - Rust

[][src]Crate wasmtime_wast

Implementation of the WAST text format for wasmtime.

+

Structs

+
WastContext

The wast test script language allows modules to be defined and actions +to be performed on them.

+

Constants

+
VERSION

Version number of this crate.

+

Functions

+
instantiate_spectest

Return an instance implementing the "spectest" interface used in the +spec testsuite.

+
\ No newline at end of file diff --git a/api/wasmtime_wast/sidebar-items.js b/api/wasmtime_wast/sidebar-items.js new file mode 100644 index 000000000000..d6f2b6d761f5 --- /dev/null +++ b/api/wasmtime_wast/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"constant":[["VERSION","Version number of this crate."]],"fn":[["instantiate_spectest","Return an instance implementing the \"spectest\" interface used in the spec testsuite."]],"struct":[["WastContext","The wast test script language allows modules to be defined and actions to be performed on them."]]}); \ No newline at end of file diff --git a/api/wasmtime_wast/spectest/fn.instantiate_spectest.html b/api/wasmtime_wast/spectest/fn.instantiate_spectest.html new file mode 100644 index 000000000000..98be258b74ee --- /dev/null +++ b/api/wasmtime_wast/spectest/fn.instantiate_spectest.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_wast/fn.instantiate_spectest.html...

+ + + \ No newline at end of file diff --git a/api/wasmtime_wast/struct.WastContext.html b/api/wasmtime_wast/struct.WastContext.html new file mode 100644 index 000000000000..d22b5e6e705a --- /dev/null +++ b/api/wasmtime_wast/struct.WastContext.html @@ -0,0 +1,17 @@ +wasmtime_wast::WastContext - Rust

[][src]Struct wasmtime_wast::WastContext

pub struct WastContext { /* fields omitted */ }

The wast test script language allows modules to be defined and actions +to be performed on them.

+

Methods

impl WastContext[src]

pub fn new(store: Store) -> Self[src]

Construct a new instance of WastContext.

+

pub fn register_spectest(&mut self) -> Result<()>[src]

Register "spectest" which is used by the spec testsuite.

+

pub fn run_buffer(&mut self, filename: &str, wast: &[u8]) -> Result<()>[src]

Run a wast script from a byte buffer.

+

pub fn run_file(&mut self, path: &Path) -> Result<()>[src]

Run a wast script from a file.

+

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/wasmtime_wast/wast/struct.WastContext.html b/api/wasmtime_wast/wast/struct.WastContext.html new file mode 100644 index 000000000000..93072ae2c529 --- /dev/null +++ b/api/wasmtime_wast/wast/struct.WastContext.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../wasmtime_wast/struct.WastContext.html...

+ + + \ No newline at end of file diff --git a/api/wheel.svg b/api/wheel.svg new file mode 100644 index 000000000000..01da3b24c7c4 --- /dev/null +++ b/api/wheel.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/api/wig/all.html b/api/wig/all.html new file mode 100644 index 000000000000..0d1897e02ef5 --- /dev/null +++ b/api/wig/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Macros

\ No newline at end of file diff --git a/api/wig/index.html b/api/wig/index.html new file mode 100644 index 000000000000..86b056378849 --- /dev/null +++ b/api/wig/index.html @@ -0,0 +1,3 @@ +wig - Rust

[][src]Crate wig

Macros

+
define_hostcalls
define_wasi_struct

A single-use macro in the wasmtime-wasi crate.

+
witx_host_types
witx_wasi32_types
witx_wasi_types
\ No newline at end of file diff --git a/api/wig/macro.define_hostcalls!.html b/api/wig/macro.define_hostcalls!.html new file mode 100644 index 000000000000..df060afc2199 --- /dev/null +++ b/api/wig/macro.define_hostcalls!.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to macro.define_hostcalls.html...

+ + + \ No newline at end of file diff --git a/api/wig/macro.define_hostcalls.html b/api/wig/macro.define_hostcalls.html new file mode 100644 index 000000000000..e879d929d10c --- /dev/null +++ b/api/wig/macro.define_hostcalls.html @@ -0,0 +1 @@ +wig::define_hostcalls - Rust

[][src]Macro wig::define_hostcalls

define_hostcalls!() { /* proc-macro */ }
\ No newline at end of file diff --git a/api/wig/macro.define_wasi_struct!.html b/api/wig/macro.define_wasi_struct!.html new file mode 100644 index 000000000000..5669ac899e6a --- /dev/null +++ b/api/wig/macro.define_wasi_struct!.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to macro.define_wasi_struct.html...

+ + + \ No newline at end of file diff --git a/api/wig/macro.define_wasi_struct.html b/api/wig/macro.define_wasi_struct.html new file mode 100644 index 000000000000..6d9c93de3621 --- /dev/null +++ b/api/wig/macro.define_wasi_struct.html @@ -0,0 +1,2 @@ +wig::define_wasi_struct - Rust

[][src]Macro wig::define_wasi_struct

define_wasi_struct!() { /* proc-macro */ }

A single-use macro in the wasmtime-wasi crate.

+
\ No newline at end of file diff --git a/api/wig/macro.witx_host_types!.html b/api/wig/macro.witx_host_types!.html new file mode 100644 index 000000000000..f955e93832fb --- /dev/null +++ b/api/wig/macro.witx_host_types!.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to macro.witx_host_types.html...

+ + + \ No newline at end of file diff --git a/api/wig/macro.witx_host_types.html b/api/wig/macro.witx_host_types.html new file mode 100644 index 000000000000..c03788ba2317 --- /dev/null +++ b/api/wig/macro.witx_host_types.html @@ -0,0 +1 @@ +wig::witx_host_types - Rust

[][src]Macro wig::witx_host_types

witx_host_types!() { /* proc-macro */ }
\ No newline at end of file diff --git a/api/wig/macro.witx_wasi32_types!.html b/api/wig/macro.witx_wasi32_types!.html new file mode 100644 index 000000000000..c7ed6346699f --- /dev/null +++ b/api/wig/macro.witx_wasi32_types!.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to macro.witx_wasi32_types.html...

+ + + \ No newline at end of file diff --git a/api/wig/macro.witx_wasi32_types.html b/api/wig/macro.witx_wasi32_types.html new file mode 100644 index 000000000000..ae65b4774ca6 --- /dev/null +++ b/api/wig/macro.witx_wasi32_types.html @@ -0,0 +1 @@ +wig::witx_wasi32_types - Rust

[][src]Macro wig::witx_wasi32_types

witx_wasi32_types!() { /* proc-macro */ }
\ No newline at end of file diff --git a/api/wig/macro.witx_wasi_types!.html b/api/wig/macro.witx_wasi_types!.html new file mode 100644 index 000000000000..27d25ed47846 --- /dev/null +++ b/api/wig/macro.witx_wasi_types!.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to macro.witx_wasi_types.html...

+ + + \ No newline at end of file diff --git a/api/wig/macro.witx_wasi_types.html b/api/wig/macro.witx_wasi_types.html new file mode 100644 index 000000000000..1985e54ebccc --- /dev/null +++ b/api/wig/macro.witx_wasi_types.html @@ -0,0 +1 @@ +wig::witx_wasi_types - Rust

[][src]Macro wig::witx_wasi_types

witx_wasi_types!() { /* proc-macro */ }
\ No newline at end of file diff --git a/api/wig/sidebar-items.js b/api/wig/sidebar-items.js new file mode 100644 index 000000000000..9bc9e1a55c72 --- /dev/null +++ b/api/wig/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"macro":[["define_hostcalls",""],["define_wasi_struct","A single-use macro in the `wasmtime-wasi` crate."],["witx_host_types",""],["witx_wasi32_types",""],["witx_wasi_types",""]]}); \ No newline at end of file diff --git a/api/winx/all.html b/api/winx/all.html new file mode 100644 index 000000000000..e3d03e2f6333 --- /dev/null +++ b/api/winx/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

\ No newline at end of file diff --git a/api/winx/index.html b/api/winx/index.html new file mode 100644 index 000000000000..ce379a2a7bdb --- /dev/null +++ b/api/winx/index.html @@ -0,0 +1 @@ +winx - Rust

[][src]Crate winx

\ No newline at end of file diff --git a/api/winx/sidebar-items.js b/api/winx/sidebar-items.js new file mode 100644 index 000000000000..48333d31f325 --- /dev/null +++ b/api/winx/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({}); \ No newline at end of file diff --git a/api/yanix/all.html b/api/yanix/all.html new file mode 100644 index 000000000000..95deaf80b888 --- /dev/null +++ b/api/yanix/all.html @@ -0,0 +1,3 @@ +List of all items in this crate

[] + + List of all items

Structs

Enums

Traits

Functions

Typedefs

\ No newline at end of file diff --git a/api/yanix/clock/enum.ClockId.html b/api/yanix/clock/enum.ClockId.html new file mode 100644 index 000000000000..3f4f72a008e6 --- /dev/null +++ b/api/yanix/clock/enum.ClockId.html @@ -0,0 +1,24 @@ +yanix::clock::ClockId - Rust

[][src]Enum yanix::clock::ClockId

pub enum ClockId {
+    Realtime,
+    Monotonic,
+    ProcessCPUTime,
+    ThreadCPUTime,
+}

+ Variants

+
Realtime
Monotonic
ProcessCPUTime
ThreadCPUTime

Methods

impl ClockId[src]

pub fn as_raw(&self) -> clockid_t[src]

Trait Implementations

impl Clone for ClockId[src]

impl Copy for ClockId[src]

impl Debug for ClockId[src]

Auto Trait Implementations

impl RefUnwindSafe for ClockId

impl Send for ClockId

impl Sync for ClockId

impl Unpin for ClockId

impl UnwindSafe for ClockId

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/clock/fn.clock_getres.html b/api/yanix/clock/fn.clock_getres.html new file mode 100644 index 000000000000..5840979ecb0a --- /dev/null +++ b/api/yanix/clock/fn.clock_getres.html @@ -0,0 +1 @@ +yanix::clock::clock_getres - Rust

[][src]Function yanix::clock::clock_getres

pub fn clock_getres(clock_id: ClockId) -> Result<timespec>
\ No newline at end of file diff --git a/api/yanix/clock/fn.clock_gettime.html b/api/yanix/clock/fn.clock_gettime.html new file mode 100644 index 000000000000..d10739175657 --- /dev/null +++ b/api/yanix/clock/fn.clock_gettime.html @@ -0,0 +1 @@ +yanix::clock::clock_gettime - Rust

[][src]Function yanix::clock::clock_gettime

pub fn clock_gettime(clock_id: ClockId) -> Result<timespec>
\ No newline at end of file diff --git a/api/yanix/clock/index.html b/api/yanix/clock/index.html new file mode 100644 index 000000000000..b5c52dbff55d --- /dev/null +++ b/api/yanix/clock/index.html @@ -0,0 +1,3 @@ +yanix::clock - Rust

[][src]Module yanix::clock

Enums

+
ClockId

Functions

+
clock_getres
clock_gettime
\ No newline at end of file diff --git a/api/yanix/clock/sidebar-items.js b/api/yanix/clock/sidebar-items.js new file mode 100644 index 000000000000..4b4dd1f530a6 --- /dev/null +++ b/api/yanix/clock/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["ClockId",""]],"fn":[["clock_getres",""],["clock_gettime",""]]}); \ No newline at end of file diff --git a/api/yanix/dir/enum.FileType.html b/api/yanix/dir/enum.FileType.html new file mode 100644 index 000000000000..5995334c3983 --- /dev/null +++ b/api/yanix/dir/enum.FileType.html @@ -0,0 +1,29 @@ +yanix::dir::FileType - Rust

[][src]Enum yanix::dir::FileType

#[repr(u8)]
+pub enum FileType {
+    CharacterDevice,
+    Directory,
+    BlockDevice,
+    RegularFile,
+    Symlink,
+    Fifo,
+    Socket,
+    Unknown,
+}

+ Variants

+
CharacterDevice
Directory
BlockDevice
RegularFile
Fifo
Socket
Unknown

Methods

impl FileType[src]

pub fn from_raw(file_type: u8) -> Self[src]

pub fn to_raw(&self) -> u8[src]

Trait Implementations

impl Clone for FileType[src]

impl Copy for FileType[src]

impl Debug for FileType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/dir/index.html b/api/yanix/dir/index.html new file mode 100644 index 000000000000..8e571ea73320 --- /dev/null +++ b/api/yanix/dir/index.html @@ -0,0 +1,4 @@ +yanix::dir - Rust

[][src]Module yanix::dir

Structs

+
Dir
DirIter
Entry
SeekLoc

Enums

+
FileType

Traits

+
EntryExt
\ No newline at end of file diff --git a/api/yanix/dir/sidebar-items.js b/api/yanix/dir/sidebar-items.js new file mode 100644 index 000000000000..221f4a245fea --- /dev/null +++ b/api/yanix/dir/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["FileType",""]],"struct":[["Dir",""],["DirIter",""],["Entry",""],["SeekLoc",""]],"trait":[["EntryExt",""]]}); \ No newline at end of file diff --git a/api/yanix/dir/struct.Dir.html b/api/yanix/dir/struct.Dir.html new file mode 100644 index 000000000000..f743fbb3846d --- /dev/null +++ b/api/yanix/dir/struct.Dir.html @@ -0,0 +1,30 @@ +yanix::dir::Dir - Rust

[][src]Struct yanix::dir::Dir

pub struct Dir(_);

Methods

impl Dir[src]

pub fn from<F: IntoRawFd>(fd: F) -> Result<Self>[src]

Takes the ownership of the passed-in descriptor-based object, +and creates a new instance of Dir.

+

pub fn seek(&mut self, loc: SeekLoc)[src]

Set the position of the directory stream, see seekdir(3).

+

pub fn rewind(&mut self)[src]

Reset directory stream, see rewinddir(3).

+

pub fn tell(&self) -> SeekLoc[src]

Get the current position in the directory stream.

+

If this location is given to Dir::seek, the entries up to the previously returned +will be omitted and the iteration will start from the currently pending directory entry.

+

Trait Implementations

impl AsRawFd for Dir[src]

impl Clone for Dir[src]

impl Debug for Dir[src]

impl Drop for Dir[src]

impl Eq for Dir[src]

impl Hash for Dir[src]

impl PartialEq<Dir> for Dir[src]

impl Send for Dir[src]

impl StructuralEq for Dir[src]

impl StructuralPartialEq for Dir[src]

Auto Trait Implementations

impl RefUnwindSafe for Dir

impl !Sync for Dir

impl Unpin for Dir

impl UnwindSafe for Dir

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/dir/struct.DirIter.html b/api/yanix/dir/struct.DirIter.html new file mode 100644 index 000000000000..4e290144fca6 --- /dev/null +++ b/api/yanix/dir/struct.DirIter.html @@ -0,0 +1,89 @@ +yanix::dir::DirIter - Rust

[][src]Struct yanix::dir::DirIter

pub struct DirIter<T: Deref<Target = Dir>>(_);

Methods

impl<T> DirIter<T> where
    T: Deref<Target = Dir>, 
[src]

pub fn new(dir: T) -> Self[src]

Trait Implementations

impl<T: Debug + Deref<Target = Dir>> Debug for DirIter<T>[src]

impl<T> Iterator for DirIter<T> where
    T: Deref<Target = Dir>, 
[src]

type Item = Result<Entry>

The type of the elements being iterated over.

+

Auto Trait Implementations

impl<T> RefUnwindSafe for DirIter<T> where
    T: RefUnwindSafe

impl<T> Send for DirIter<T> where
    T: Send

impl<T> Sync for DirIter<T> where
    T: Sync

impl<T> Unpin for DirIter<T> where
    T: Unpin

impl<T> UnwindSafe for DirIter<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

+

type IntoIter = I

Which kind of iterator are we turning this into?

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/dir/struct.Entry.html b/api/yanix/dir/struct.Entry.html new file mode 100644 index 000000000000..ec624753033f --- /dev/null +++ b/api/yanix/dir/struct.Entry.html @@ -0,0 +1,19 @@ +yanix::dir::Entry - Rust

[][src]Struct yanix::dir::Entry

pub struct Entry(_);

Methods

impl Entry[src]

pub fn file_name(&self) -> &CStr[src]

Returns the file name of this directory entry.

+

pub fn file_type(&self) -> FileType[src]

Returns the type of this directory entry.

+

Trait Implementations

impl Clone for Entry[src]

impl Copy for Entry[src]

impl Debug for Entry[src]

impl EntryExt for Entry[src]

Auto Trait Implementations

impl RefUnwindSafe for Entry

impl Send for Entry

impl Sync for Entry

impl Unpin for Entry

impl UnwindSafe for Entry

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/dir/struct.SeekLoc.html b/api/yanix/dir/struct.SeekLoc.html new file mode 100644 index 000000000000..0a7dc8abc3de --- /dev/null +++ b/api/yanix/dir/struct.SeekLoc.html @@ -0,0 +1,17 @@ +yanix::dir::SeekLoc - Rust

[][src]Struct yanix::dir::SeekLoc

pub struct SeekLoc(_);

Methods

impl SeekLoc[src]

pub fn to_raw(&self) -> i64[src]

impl SeekLoc[src]

pub unsafe fn from_raw(loc: i64) -> Result<Self>[src]

Trait Implementations

impl Clone for SeekLoc[src]

impl Copy for SeekLoc[src]

impl Debug for SeekLoc[src]

Auto Trait Implementations

impl RefUnwindSafe for SeekLoc

impl Send for SeekLoc

impl Sync for SeekLoc

impl Unpin for SeekLoc

impl UnwindSafe for SeekLoc

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/dir/trait.EntryExt.html b/api/yanix/dir/trait.EntryExt.html new file mode 100644 index 000000000000..4f8301b2f95f --- /dev/null +++ b/api/yanix/dir/trait.EntryExt.html @@ -0,0 +1,6 @@ +yanix::dir::EntryExt - Rust

[][src]Trait yanix::dir::EntryExt

pub trait EntryExt {
+    fn ino(&self) -> u64;
+
fn seek_loc(&self) -> Result<SeekLoc>; +}
+

Required methods

fn ino(&self) -> u64

fn seek_loc(&self) -> Result<SeekLoc>

Loading content... +

Implementors

impl EntryExt for Entry[src]

Loading content...
\ No newline at end of file diff --git a/api/yanix/enum.Errno.html b/api/yanix/enum.Errno.html new file mode 100644 index 000000000000..487ef113913c --- /dev/null +++ b/api/yanix/enum.Errno.html @@ -0,0 +1,108 @@ +yanix::Errno - Rust

[][src]Enum yanix::Errno

#[repr(i32)]
+pub enum Errno {
+    EPERM,
+    ENOENT,
+    ESRCH,
+    EINTR,
+    EIO,
+    ENXIO,
+    E2BIG,
+    ENOEXEC,
+    EBADF,
+    ECHILD,
+    EAGAIN,
+    ENOMEM,
+    EACCES,
+    EFAULT,
+    EBUSY,
+    EEXIST,
+    EXDEV,
+    ENODEV,
+    ENOTDIR,
+    EISDIR,
+    EINVAL,
+    ENFILE,
+    EMFILE,
+    ENOTTY,
+    ETXTBSY,
+    EFBIG,
+    ENOSPC,
+    ESPIPE,
+    EROFS,
+    EMLINK,
+    EPIPE,
+    EDOM,
+    ERANGE,
+    EDEADLK,
+    ENAMETOOLONG,
+    ENOLCK,
+    ENOSYS,
+    ENOTEMPTY,
+    ELOOP,
+    ENOMSG,
+    EIDRM,
+    ENOLINK,
+    EPROTO,
+    EMULTIHOP,
+    EBADMSG,
+    EOVERFLOW,
+    EILSEQ,
+    ENOTSOCK,
+    EDESTADDRREQ,
+    EMSGSIZE,
+    EPROTOTYPE,
+    ENOPROTOOPT,
+    EPROTONOSUPPORT,
+    EAFNOSUPPORT,
+    EADDRINUSE,
+    EADDRNOTAVAIL,
+    ENETDOWN,
+    ENETUNREACH,
+    ENETRESET,
+    ECONNABORTED,
+    ECONNRESET,
+    ENOBUFS,
+    EISCONN,
+    ENOTCONN,
+    ETIMEDOUT,
+    ECONNREFUSED,
+    EHOSTUNREACH,
+    EALREADY,
+    EINPROGRESS,
+    ESTALE,
+    EDQUOT,
+    ECANCELED,
+    EOWNERDEAD,
+    ENOTRECOVERABLE,
+}

+ Variants

+
EPERM
ENOENT
ESRCH
EINTR
EIO
ENXIO
E2BIG
ENOEXEC
EBADF
ECHILD
EAGAIN
ENOMEM
EACCES
EFAULT
EBUSY
EEXIST
EXDEV
ENODEV
ENOTDIR
EISDIR
EINVAL
ENFILE
EMFILE
ENOTTY
ETXTBSY
EFBIG
ENOSPC
ESPIPE
EROFS
EPIPE
EDOM
ERANGE
EDEADLK
ENAMETOOLONG
ENOLCK
ENOSYS
ENOTEMPTY
ELOOP
ENOMSG
EIDRM
EPROTO
EMULTIHOP
EBADMSG
EOVERFLOW
EILSEQ
ENOTSOCK
EDESTADDRREQ
EMSGSIZE
EPROTOTYPE
ENOPROTOOPT
EPROTONOSUPPORT
EAFNOSUPPORT
EADDRINUSE
EADDRNOTAVAIL
ENETDOWN
ENETUNREACH
ENETRESET
ECONNABORTED
ECONNRESET
ENOBUFS
EISCONN
ENOTCONN
ETIMEDOUT
ECONNREFUSED
EHOSTUNREACH
EALREADY
EINPROGRESS
ESTALE
EDQUOT
ECANCELED
EOWNERDEAD
ENOTRECOVERABLE

Methods

impl Errno[src]

pub fn from_i32(err: i32) -> Self[src]

pub fn last() -> Self[src]

pub fn from_success_code<T: IsZero>(t: T) -> Result<()>[src]

pub fn from_result<T: IsMinusOne>(t: T) -> Result<T>[src]

Trait Implementations

impl Clone for Errno[src]

impl Copy for Errno[src]

impl Debug for Errno[src]

impl Display for Errno[src]

impl Eq for Errno[src]

impl Error for Errno[src]

impl From<Errno> for YanixError[src]

impl Hash for Errno[src]

impl PartialEq<Errno> for Errno[src]

impl StructuralEq for Errno[src]

impl StructuralPartialEq for Errno[src]

Auto Trait Implementations

impl RefUnwindSafe for Errno

impl Send for Errno

impl Sync for Errno

impl Unpin for Errno

impl UnwindSafe for Errno

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/enum.YanixError.html b/api/yanix/enum.YanixError.html new file mode 100644 index 000000000000..58312843ad6d --- /dev/null +++ b/api/yanix/enum.YanixError.html @@ -0,0 +1,27 @@ +yanix::YanixError - Rust

[][src]Enum yanix::YanixError

pub enum YanixError {
+    Errno(Errno),
+    NulError(NulError),
+    TryFromIntError(TryFromIntError),
+}

+ Variants

+
Errno(Errno)
NulError(NulError)
TryFromIntError(TryFromIntError)

Trait Implementations

impl Debug for YanixError[src]

impl Display for YanixError[src]

impl Error for YanixError[src]

impl From<Errno> for YanixError[src]

impl From<NulError> for YanixError[src]

impl From<TryFromIntError> for YanixError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/errno/enum.Errno.html b/api/yanix/errno/enum.Errno.html new file mode 100644 index 000000000000..3ead7fec911b --- /dev/null +++ b/api/yanix/errno/enum.Errno.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../yanix/enum.Errno.html...

+ + + \ No newline at end of file diff --git a/api/yanix/fadvise/enum.PosixFadviseAdvice.html b/api/yanix/fadvise/enum.PosixFadviseAdvice.html new file mode 100644 index 000000000000..839ea71e5761 --- /dev/null +++ b/api/yanix/fadvise/enum.PosixFadviseAdvice.html @@ -0,0 +1,27 @@ +yanix::fadvise::PosixFadviseAdvice - Rust

[][src]Enum yanix::fadvise::PosixFadviseAdvice

#[repr(i32)]
+pub enum PosixFadviseAdvice {
+    Normal,
+    Sequential,
+    Random,
+    NoReuse,
+    WillNeed,
+    DontNeed,
+}

+ Variants

+
Normal
Sequential
Random
NoReuse
WillNeed
DontNeed

Trait Implementations

impl Clone for PosixFadviseAdvice[src]

impl Copy for PosixFadviseAdvice[src]

impl Debug for PosixFadviseAdvice[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/fadvise/fn.posix_fadvise.html b/api/yanix/fadvise/fn.posix_fadvise.html new file mode 100644 index 000000000000..e7aa5d250e9b --- /dev/null +++ b/api/yanix/fadvise/fn.posix_fadvise.html @@ -0,0 +1 @@ +yanix::fadvise::posix_fadvise - Rust

[][src]Function yanix::fadvise::posix_fadvise

pub unsafe fn posix_fadvise(
    fd: RawFd,
    offset: off_t,
    len: off_t,
    advice: PosixFadviseAdvice
) -> Result<()>
\ No newline at end of file diff --git a/api/yanix/fadvise/index.html b/api/yanix/fadvise/index.html new file mode 100644 index 000000000000..7b810b6854d9 --- /dev/null +++ b/api/yanix/fadvise/index.html @@ -0,0 +1,3 @@ +yanix::fadvise - Rust

[][src]Module yanix::fadvise

Enums

+
PosixFadviseAdvice

Functions

+
posix_fadvise
\ No newline at end of file diff --git a/api/yanix/fadvise/sidebar-items.js b/api/yanix/fadvise/sidebar-items.js new file mode 100644 index 000000000000..35a5c8360ae4 --- /dev/null +++ b/api/yanix/fadvise/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["PosixFadviseAdvice",""]],"fn":[["posix_fadvise",""]]}); \ No newline at end of file diff --git a/api/yanix/fcntl/fn.dup_fd.html b/api/yanix/fcntl/fn.dup_fd.html new file mode 100644 index 000000000000..6d8ebcf0a82c --- /dev/null +++ b/api/yanix/fcntl/fn.dup_fd.html @@ -0,0 +1 @@ +yanix::fcntl::dup_fd - Rust

[][src]Function yanix::fcntl::dup_fd

pub unsafe fn dup_fd(fd: RawFd, close_on_exec: bool) -> Result<RawFd>
\ No newline at end of file diff --git a/api/yanix/fcntl/fn.get_fd_flags.html b/api/yanix/fcntl/fn.get_fd_flags.html new file mode 100644 index 000000000000..4a8307545b6c --- /dev/null +++ b/api/yanix/fcntl/fn.get_fd_flags.html @@ -0,0 +1 @@ +yanix::fcntl::get_fd_flags - Rust

[][src]Function yanix::fcntl::get_fd_flags

pub unsafe fn get_fd_flags(fd: RawFd) -> Result<FdFlag>
\ No newline at end of file diff --git a/api/yanix/fcntl/fn.get_status_flags.html b/api/yanix/fcntl/fn.get_status_flags.html new file mode 100644 index 000000000000..354edc8852b1 --- /dev/null +++ b/api/yanix/fcntl/fn.get_status_flags.html @@ -0,0 +1 @@ +yanix::fcntl::get_status_flags - Rust

[][src]Function yanix::fcntl::get_status_flags

pub unsafe fn get_status_flags(fd: RawFd) -> Result<OFlag>
\ No newline at end of file diff --git a/api/yanix/fcntl/fn.set_fd_flags.html b/api/yanix/fcntl/fn.set_fd_flags.html new file mode 100644 index 000000000000..9757c230ef94 --- /dev/null +++ b/api/yanix/fcntl/fn.set_fd_flags.html @@ -0,0 +1 @@ +yanix::fcntl::set_fd_flags - Rust

[][src]Function yanix::fcntl::set_fd_flags

pub unsafe fn set_fd_flags(fd: RawFd, flags: FdFlag) -> Result<()>
\ No newline at end of file diff --git a/api/yanix/fcntl/fn.set_status_flags.html b/api/yanix/fcntl/fn.set_status_flags.html new file mode 100644 index 000000000000..cb6276ee406d --- /dev/null +++ b/api/yanix/fcntl/fn.set_status_flags.html @@ -0,0 +1 @@ +yanix::fcntl::set_status_flags - Rust

[][src]Function yanix::fcntl::set_status_flags

pub unsafe fn set_status_flags(fd: RawFd, flags: OFlag) -> Result<()>
\ No newline at end of file diff --git a/api/yanix/fcntl/index.html b/api/yanix/fcntl/index.html new file mode 100644 index 000000000000..f3039caac6c7 --- /dev/null +++ b/api/yanix/fcntl/index.html @@ -0,0 +1,2 @@ +yanix::fcntl - Rust

[][src]Module yanix::fcntl

Functions

+
dup_fd
get_fd_flags
get_status_flags
set_fd_flags
set_status_flags
\ No newline at end of file diff --git a/api/yanix/fcntl/sidebar-items.js b/api/yanix/fcntl/sidebar-items.js new file mode 100644 index 000000000000..92306f9dcd5c --- /dev/null +++ b/api/yanix/fcntl/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["dup_fd",""],["get_fd_flags",""],["get_status_flags",""],["set_fd_flags",""],["set_status_flags",""]]}); \ No newline at end of file diff --git a/api/yanix/file/fn.fionread.html b/api/yanix/file/fn.fionread.html new file mode 100644 index 000000000000..188382aae3f0 --- /dev/null +++ b/api/yanix/file/fn.fionread.html @@ -0,0 +1,2 @@ +yanix::file::fionread - Rust

[][src]Function yanix::file::fionread

pub unsafe fn fionread(fd: RawFd) -> Result<usize>

fionread() function, equivalent to ioctl(fd, FIONREAD, *bytes).

+
\ No newline at end of file diff --git a/api/yanix/file/fn.fstat.html b/api/yanix/file/fn.fstat.html new file mode 100644 index 000000000000..63a431d933a7 --- /dev/null +++ b/api/yanix/file/fn.fstat.html @@ -0,0 +1 @@ +yanix::file::fstat - Rust

[][src]Function yanix::file::fstat

pub unsafe fn fstat(fd: RawFd) -> Result<stat>
\ No newline at end of file diff --git a/api/yanix/file/fn.fstatat.html b/api/yanix/file/fn.fstatat.html new file mode 100644 index 000000000000..495b4a3cda38 --- /dev/null +++ b/api/yanix/file/fn.fstatat.html @@ -0,0 +1 @@ +yanix::file::fstatat - Rust

[][src]Function yanix::file::fstatat

pub unsafe fn fstatat<P: AsRef<OsStr>>(
    dirfd: RawFd,
    path: P,
    flags: AtFlag
) -> Result<stat>
\ No newline at end of file diff --git a/api/yanix/file/fn.isatty.html b/api/yanix/file/fn.isatty.html new file mode 100644 index 000000000000..fb27fffef6b8 --- /dev/null +++ b/api/yanix/file/fn.isatty.html @@ -0,0 +1 @@ +yanix::file::isatty - Rust

[][src]Function yanix::file::isatty

pub unsafe fn isatty(fd: RawFd) -> Result<bool>
\ No newline at end of file diff --git a/api/yanix/file/fn.linkat.html b/api/yanix/file/fn.linkat.html new file mode 100644 index 000000000000..e84d1a52e03b --- /dev/null +++ b/api/yanix/file/fn.linkat.html @@ -0,0 +1 @@ +yanix::file::linkat - Rust

[][src]Function yanix::file::linkat

pub unsafe fn linkat<P: AsRef<OsStr>>(
    old_dirfd: RawFd,
    old_path: P,
    new_dirfd: RawFd,
    new_path: P,
    flags: AtFlag
) -> Result<()>
\ No newline at end of file diff --git a/api/yanix/file/fn.mkdirat.html b/api/yanix/file/fn.mkdirat.html new file mode 100644 index 000000000000..595b14365b79 --- /dev/null +++ b/api/yanix/file/fn.mkdirat.html @@ -0,0 +1 @@ +yanix::file::mkdirat - Rust

[][src]Function yanix::file::mkdirat

pub unsafe fn mkdirat<P: AsRef<OsStr>>(
    dirfd: RawFd,
    path: P,
    mode: Mode
) -> Result<()>
\ No newline at end of file diff --git a/api/yanix/file/fn.openat.html b/api/yanix/file/fn.openat.html new file mode 100644 index 000000000000..ae46db4a4ff4 --- /dev/null +++ b/api/yanix/file/fn.openat.html @@ -0,0 +1 @@ +yanix::file::openat - Rust

[][src]Function yanix::file::openat

pub unsafe fn openat<P: AsRef<OsStr>>(
    dirfd: RawFd,
    path: P,
    oflag: OFlag,
    mode: Mode
) -> Result<RawFd>
\ No newline at end of file diff --git a/api/yanix/file/fn.readlinkat.html b/api/yanix/file/fn.readlinkat.html new file mode 100644 index 000000000000..f4d5be1e60ec --- /dev/null +++ b/api/yanix/file/fn.readlinkat.html @@ -0,0 +1 @@ +yanix::file::readlinkat - Rust

[][src]Function yanix::file::readlinkat

pub unsafe fn readlinkat<P: AsRef<OsStr>>(
    dirfd: RawFd,
    path: P
) -> Result<OsString>
\ No newline at end of file diff --git a/api/yanix/file/fn.renameat.html b/api/yanix/file/fn.renameat.html new file mode 100644 index 000000000000..f1c398b3cb25 --- /dev/null +++ b/api/yanix/file/fn.renameat.html @@ -0,0 +1 @@ +yanix::file::renameat - Rust

[][src]Function yanix::file::renameat

pub unsafe fn renameat<P: AsRef<OsStr>>(
    old_dirfd: RawFd,
    old_path: P,
    new_dirfd: RawFd,
    new_path: P
) -> Result<()>
\ No newline at end of file diff --git a/api/yanix/file/fn.symlinkat.html b/api/yanix/file/fn.symlinkat.html new file mode 100644 index 000000000000..05b83bb7376b --- /dev/null +++ b/api/yanix/file/fn.symlinkat.html @@ -0,0 +1 @@ +yanix::file::symlinkat - Rust

[][src]Function yanix::file::symlinkat

pub unsafe fn symlinkat<P: AsRef<OsStr>>(
    old_path: P,
    new_dirfd: RawFd,
    new_path: P
) -> Result<()>
\ No newline at end of file diff --git a/api/yanix/file/fn.unlinkat.html b/api/yanix/file/fn.unlinkat.html new file mode 100644 index 000000000000..2387014ac979 --- /dev/null +++ b/api/yanix/file/fn.unlinkat.html @@ -0,0 +1 @@ +yanix::file::unlinkat - Rust

[][src]Function yanix::file::unlinkat

pub unsafe fn unlinkat<P: AsRef<OsStr>>(
    dirfd: RawFd,
    path: P,
    flags: AtFlag
) -> Result<()>
\ No newline at end of file diff --git a/api/yanix/file/index.html b/api/yanix/file/index.html new file mode 100644 index 000000000000..0f6c474ae66b --- /dev/null +++ b/api/yanix/file/index.html @@ -0,0 +1,4 @@ +yanix::file - Rust

[][src]Module yanix::file

Structs

+
AtFlag
FdFlag
Mode
OFlag
SFlag

Functions

+
fionread

fionread() function, equivalent to ioctl(fd, FIONREAD, *bytes).

+
fstat
fstatat
isatty
linkat
mkdirat
openat
readlinkat
renameat
symlinkat
unlinkat
\ No newline at end of file diff --git a/api/yanix/file/sidebar-items.js b/api/yanix/file/sidebar-items.js new file mode 100644 index 000000000000..f0ad0b7a9754 --- /dev/null +++ b/api/yanix/file/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["fionread","`fionread()` function, equivalent to `ioctl(fd, FIONREAD, *bytes)`."],["fstat",""],["fstatat",""],["isatty",""],["linkat",""],["mkdirat",""],["openat",""],["readlinkat",""],["renameat",""],["symlinkat",""],["unlinkat",""]],"struct":[["AtFlag",""],["FdFlag",""],["Mode",""],["OFlag",""],["SFlag",""]]}); \ No newline at end of file diff --git a/api/yanix/file/struct.AtFlag.html b/api/yanix/file/struct.AtFlag.html new file mode 100644 index 000000000000..c1293abd6565 --- /dev/null +++ b/api/yanix/file/struct.AtFlag.html @@ -0,0 +1,70 @@ +yanix::file::AtFlag - Rust

[]Struct yanix::file::AtFlag

pub struct AtFlag { /* fields omitted */ }

Methods

impl AtFlag

pub const REMOVEDIR: AtFlag

pub const fn empty() -> AtFlag

Returns an empty set of flags

+

pub const fn all() -> AtFlag

Returns the set containing all flags.

+

pub const fn bits(&self) -> c_int

Returns the raw value of the flags currently stored.

+

pub fn from_bits(bits: c_int) -> Option<AtFlag>

Convert from underlying bit representation, unless that +representation contains bits that do not correspond to a flag.

+

pub const fn from_bits_truncate(bits: c_int) -> AtFlag

Convert from underlying bit representation, dropping any bits +that do not correspond to flags.

+

pub const unsafe fn from_bits_unchecked(bits: c_int) -> AtFlag

Convert from underlying bit representation, preserving all +bits (even those not corresponding to a defined flag).

+

pub const fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

+

pub const fn is_all(&self) -> bool

Returns true if all flags are currently set.

+

pub const fn intersects(&self, other: AtFlag) -> bool

Returns true if there are flags common to both self and other.

+

pub const fn contains(&self, other: AtFlag) -> bool

Returns true all of the flags in other are contained within self.

+

pub fn insert(&mut self, other: AtFlag)

Inserts the specified flags in-place.

+

pub fn remove(&mut self, other: AtFlag)

Removes the specified flags in-place.

+

pub fn toggle(&mut self, other: AtFlag)

Toggles the specified flags in-place.

+

pub fn set(&mut self, other: AtFlag, value: bool)

Inserts or removes the specified flags depending on the passed value.

+

Trait Implementations

impl Binary for AtFlag

impl BitAnd<AtFlag> for AtFlag

type Output = AtFlag

The resulting type after applying the & operator.

+

fn bitand(self, other: AtFlag) -> AtFlag

Returns the intersection between the two sets of flags.

+

impl BitAndAssign<AtFlag> for AtFlag

fn bitand_assign(&mut self, other: AtFlag)

Disables all flags disabled in the set.

+

impl BitOr<AtFlag> for AtFlag

type Output = AtFlag

The resulting type after applying the | operator.

+

fn bitor(self, other: AtFlag) -> AtFlag

Returns the union of the two sets of flags.

+

impl BitOrAssign<AtFlag> for AtFlag

fn bitor_assign(&mut self, other: AtFlag)

Adds the set of flags.

+

impl BitXor<AtFlag> for AtFlag

type Output = AtFlag

The resulting type after applying the ^ operator.

+

fn bitxor(self, other: AtFlag) -> AtFlag

Returns the left flags, but with all the right flags toggled.

+

impl BitXorAssign<AtFlag> for AtFlag

fn bitxor_assign(&mut self, other: AtFlag)

Toggles the set of flags.

+

impl Clone for AtFlag

impl Copy for AtFlag

impl Debug for AtFlag

impl Eq for AtFlag

impl Extend<AtFlag> for AtFlag

impl FromIterator<AtFlag> for AtFlag

impl Hash for AtFlag

impl LowerHex for AtFlag

impl Not for AtFlag

type Output = AtFlag

The resulting type after applying the ! operator.

+

fn not(self) -> AtFlag

Returns the complement of this set of flags.

+

impl Octal for AtFlag

impl Ord for AtFlag

impl PartialEq<AtFlag> for AtFlag

impl PartialOrd<AtFlag> for AtFlag

impl StructuralEq for AtFlag

impl StructuralPartialEq for AtFlag

impl Sub<AtFlag> for AtFlag

type Output = AtFlag

The resulting type after applying the - operator.

+

fn sub(self, other: AtFlag) -> AtFlag

Returns the set difference of the two sets of flags.

+

impl SubAssign<AtFlag> for AtFlag

fn sub_assign(&mut self, other: AtFlag)

Disables all flags enabled in the set.

+

impl UpperHex for AtFlag

Auto Trait Implementations

impl RefUnwindSafe for AtFlag

impl Send for AtFlag

impl Sync for AtFlag

impl Unpin for AtFlag

impl UnwindSafe for AtFlag

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/file/struct.FdFlag.html b/api/yanix/file/struct.FdFlag.html new file mode 100644 index 000000000000..e1933ad0eb76 --- /dev/null +++ b/api/yanix/file/struct.FdFlag.html @@ -0,0 +1,70 @@ +yanix::file::FdFlag - Rust

[]Struct yanix::file::FdFlag

pub struct FdFlag { /* fields omitted */ }

Methods

impl FdFlag

pub const CLOEXEC: FdFlag

pub const fn empty() -> FdFlag

Returns an empty set of flags

+

pub const fn all() -> FdFlag

Returns the set containing all flags.

+

pub const fn bits(&self) -> c_int

Returns the raw value of the flags currently stored.

+

pub fn from_bits(bits: c_int) -> Option<FdFlag>

Convert from underlying bit representation, unless that +representation contains bits that do not correspond to a flag.

+

pub const fn from_bits_truncate(bits: c_int) -> FdFlag

Convert from underlying bit representation, dropping any bits +that do not correspond to flags.

+

pub const unsafe fn from_bits_unchecked(bits: c_int) -> FdFlag

Convert from underlying bit representation, preserving all +bits (even those not corresponding to a defined flag).

+

pub const fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

+

pub const fn is_all(&self) -> bool

Returns true if all flags are currently set.

+

pub const fn intersects(&self, other: FdFlag) -> bool

Returns true if there are flags common to both self and other.

+

pub const fn contains(&self, other: FdFlag) -> bool

Returns true all of the flags in other are contained within self.

+

pub fn insert(&mut self, other: FdFlag)

Inserts the specified flags in-place.

+

pub fn remove(&mut self, other: FdFlag)

Removes the specified flags in-place.

+

pub fn toggle(&mut self, other: FdFlag)

Toggles the specified flags in-place.

+

pub fn set(&mut self, other: FdFlag, value: bool)

Inserts or removes the specified flags depending on the passed value.

+

Trait Implementations

impl Binary for FdFlag

impl BitAnd<FdFlag> for FdFlag

type Output = FdFlag

The resulting type after applying the & operator.

+

fn bitand(self, other: FdFlag) -> FdFlag

Returns the intersection between the two sets of flags.

+

impl BitAndAssign<FdFlag> for FdFlag

fn bitand_assign(&mut self, other: FdFlag)

Disables all flags disabled in the set.

+

impl BitOr<FdFlag> for FdFlag

type Output = FdFlag

The resulting type after applying the | operator.

+

fn bitor(self, other: FdFlag) -> FdFlag

Returns the union of the two sets of flags.

+

impl BitOrAssign<FdFlag> for FdFlag

fn bitor_assign(&mut self, other: FdFlag)

Adds the set of flags.

+

impl BitXor<FdFlag> for FdFlag

type Output = FdFlag

The resulting type after applying the ^ operator.

+

fn bitxor(self, other: FdFlag) -> FdFlag

Returns the left flags, but with all the right flags toggled.

+

impl BitXorAssign<FdFlag> for FdFlag

fn bitxor_assign(&mut self, other: FdFlag)

Toggles the set of flags.

+

impl Clone for FdFlag

impl Copy for FdFlag

impl Debug for FdFlag

impl Eq for FdFlag

impl Extend<FdFlag> for FdFlag

impl FromIterator<FdFlag> for FdFlag

impl Hash for FdFlag

impl LowerHex for FdFlag

impl Not for FdFlag

type Output = FdFlag

The resulting type after applying the ! operator.

+

fn not(self) -> FdFlag

Returns the complement of this set of flags.

+

impl Octal for FdFlag

impl Ord for FdFlag

impl PartialEq<FdFlag> for FdFlag

impl PartialOrd<FdFlag> for FdFlag

impl StructuralEq for FdFlag

impl StructuralPartialEq for FdFlag

impl Sub<FdFlag> for FdFlag

type Output = FdFlag

The resulting type after applying the - operator.

+

fn sub(self, other: FdFlag) -> FdFlag

Returns the set difference of the two sets of flags.

+

impl SubAssign<FdFlag> for FdFlag

fn sub_assign(&mut self, other: FdFlag)

Disables all flags enabled in the set.

+

impl UpperHex for FdFlag

Auto Trait Implementations

impl RefUnwindSafe for FdFlag

impl Send for FdFlag

impl Sync for FdFlag

impl Unpin for FdFlag

impl UnwindSafe for FdFlag

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/file/struct.Mode.html b/api/yanix/file/struct.Mode.html new file mode 100644 index 000000000000..2129cec7655f --- /dev/null +++ b/api/yanix/file/struct.Mode.html @@ -0,0 +1,70 @@ +yanix::file::Mode - Rust

[]Struct yanix::file::Mode

pub struct Mode { /* fields omitted */ }

Methods

impl Mode

pub const IRWXU: Mode

pub const IRUSR: Mode

pub const IWUSR: Mode

pub const IXUSR: Mode

pub const IRWXG: Mode

pub const IRGRP: Mode

pub const IWGRP: Mode

pub const IXGRP: Mode

pub const IRWXO: Mode

pub const IROTH: Mode

pub const IWOTH: Mode

pub const IXOTH: Mode

pub const ISUID: Mode

pub const ISGID: Mode

pub const ISVTX: Mode

pub const fn empty() -> Mode

Returns an empty set of flags

+

pub const fn all() -> Mode

Returns the set containing all flags.

+

pub const fn bits(&self) -> mode_t

Returns the raw value of the flags currently stored.

+

pub fn from_bits(bits: mode_t) -> Option<Mode>

Convert from underlying bit representation, unless that +representation contains bits that do not correspond to a flag.

+

pub const fn from_bits_truncate(bits: mode_t) -> Mode

Convert from underlying bit representation, dropping any bits +that do not correspond to flags.

+

pub const unsafe fn from_bits_unchecked(bits: mode_t) -> Mode

Convert from underlying bit representation, preserving all +bits (even those not corresponding to a defined flag).

+

pub const fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

+

pub const fn is_all(&self) -> bool

Returns true if all flags are currently set.

+

pub const fn intersects(&self, other: Mode) -> bool

Returns true if there are flags common to both self and other.

+

pub const fn contains(&self, other: Mode) -> bool

Returns true all of the flags in other are contained within self.

+

pub fn insert(&mut self, other: Mode)

Inserts the specified flags in-place.

+

pub fn remove(&mut self, other: Mode)

Removes the specified flags in-place.

+

pub fn toggle(&mut self, other: Mode)

Toggles the specified flags in-place.

+

pub fn set(&mut self, other: Mode, value: bool)

Inserts or removes the specified flags depending on the passed value.

+

Trait Implementations

impl Binary for Mode

impl BitAnd<Mode> for Mode

type Output = Mode

The resulting type after applying the & operator.

+

fn bitand(self, other: Mode) -> Mode

Returns the intersection between the two sets of flags.

+

impl BitAndAssign<Mode> for Mode

fn bitand_assign(&mut self, other: Mode)

Disables all flags disabled in the set.

+

impl BitOr<Mode> for Mode

type Output = Mode

The resulting type after applying the | operator.

+

fn bitor(self, other: Mode) -> Mode

Returns the union of the two sets of flags.

+

impl BitOrAssign<Mode> for Mode

fn bitor_assign(&mut self, other: Mode)

Adds the set of flags.

+

impl BitXor<Mode> for Mode

type Output = Mode

The resulting type after applying the ^ operator.

+

fn bitxor(self, other: Mode) -> Mode

Returns the left flags, but with all the right flags toggled.

+

impl BitXorAssign<Mode> for Mode

fn bitxor_assign(&mut self, other: Mode)

Toggles the set of flags.

+

impl Clone for Mode

impl Copy for Mode

impl Debug for Mode

impl Eq for Mode

impl Extend<Mode> for Mode

impl FromIterator<Mode> for Mode

impl Hash for Mode

impl LowerHex for Mode

impl Not for Mode

type Output = Mode

The resulting type after applying the ! operator.

+

fn not(self) -> Mode

Returns the complement of this set of flags.

+

impl Octal for Mode

impl Ord for Mode

impl PartialEq<Mode> for Mode

impl PartialOrd<Mode> for Mode

impl StructuralEq for Mode

impl StructuralPartialEq for Mode

impl Sub<Mode> for Mode

type Output = Mode

The resulting type after applying the - operator.

+

fn sub(self, other: Mode) -> Mode

Returns the set difference of the two sets of flags.

+

impl SubAssign<Mode> for Mode

fn sub_assign(&mut self, other: Mode)

Disables all flags enabled in the set.

+

impl UpperHex for Mode

Auto Trait Implementations

impl RefUnwindSafe for Mode

impl Send for Mode

impl Sync for Mode

impl Unpin for Mode

impl UnwindSafe for Mode

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/file/struct.OFlag.html b/api/yanix/file/struct.OFlag.html new file mode 100644 index 000000000000..b53e625274d9 --- /dev/null +++ b/api/yanix/file/struct.OFlag.html @@ -0,0 +1,70 @@ +yanix::file::OFlag - Rust

[]Struct yanix::file::OFlag

pub struct OFlag { /* fields omitted */ }

Methods

impl OFlag

pub const ACCMODE: OFlag

pub const APPEND: OFlag

pub const CREAT: OFlag

pub const DIRECTORY: OFlag

pub const DSYNC: OFlag

pub const EXCL: OFlag

pub const FSYNC: OFlag

pub const NOFOLLOW: OFlag

pub const NONBLOCK: OFlag

pub const RDONLY: OFlag

pub const WRONLY: OFlag

pub const RDWR: OFlag

pub const RSYNC: OFlag

pub const SYNC: OFlag

pub const TRUNC: OFlag

pub const fn empty() -> OFlag

Returns an empty set of flags

+

pub const fn all() -> OFlag

Returns the set containing all flags.

+

pub const fn bits(&self) -> c_int

Returns the raw value of the flags currently stored.

+

pub fn from_bits(bits: c_int) -> Option<OFlag>

Convert from underlying bit representation, unless that +representation contains bits that do not correspond to a flag.

+

pub const fn from_bits_truncate(bits: c_int) -> OFlag

Convert from underlying bit representation, dropping any bits +that do not correspond to flags.

+

pub const unsafe fn from_bits_unchecked(bits: c_int) -> OFlag

Convert from underlying bit representation, preserving all +bits (even those not corresponding to a defined flag).

+

pub const fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

+

pub const fn is_all(&self) -> bool

Returns true if all flags are currently set.

+

pub const fn intersects(&self, other: OFlag) -> bool

Returns true if there are flags common to both self and other.

+

pub const fn contains(&self, other: OFlag) -> bool

Returns true all of the flags in other are contained within self.

+

pub fn insert(&mut self, other: OFlag)

Inserts the specified flags in-place.

+

pub fn remove(&mut self, other: OFlag)

Removes the specified flags in-place.

+

pub fn toggle(&mut self, other: OFlag)

Toggles the specified flags in-place.

+

pub fn set(&mut self, other: OFlag, value: bool)

Inserts or removes the specified flags depending on the passed value.

+

Trait Implementations

impl Binary for OFlag

impl BitAnd<OFlag> for OFlag

type Output = OFlag

The resulting type after applying the & operator.

+

fn bitand(self, other: OFlag) -> OFlag

Returns the intersection between the two sets of flags.

+

impl BitAndAssign<OFlag> for OFlag

fn bitand_assign(&mut self, other: OFlag)

Disables all flags disabled in the set.

+

impl BitOr<OFlag> for OFlag

type Output = OFlag

The resulting type after applying the | operator.

+

fn bitor(self, other: OFlag) -> OFlag

Returns the union of the two sets of flags.

+

impl BitOrAssign<OFlag> for OFlag

fn bitor_assign(&mut self, other: OFlag)

Adds the set of flags.

+

impl BitXor<OFlag> for OFlag

type Output = OFlag

The resulting type after applying the ^ operator.

+

fn bitxor(self, other: OFlag) -> OFlag

Returns the left flags, but with all the right flags toggled.

+

impl BitXorAssign<OFlag> for OFlag

fn bitxor_assign(&mut self, other: OFlag)

Toggles the set of flags.

+

impl Clone for OFlag

impl Copy for OFlag

impl Debug for OFlag

impl Eq for OFlag

impl Extend<OFlag> for OFlag

impl FromIterator<OFlag> for OFlag

impl Hash for OFlag

impl LowerHex for OFlag

impl Not for OFlag

type Output = OFlag

The resulting type after applying the ! operator.

+

fn not(self) -> OFlag

Returns the complement of this set of flags.

+

impl Octal for OFlag

impl Ord for OFlag

impl PartialEq<OFlag> for OFlag

impl PartialOrd<OFlag> for OFlag

impl StructuralEq for OFlag

impl StructuralPartialEq for OFlag

impl Sub<OFlag> for OFlag

type Output = OFlag

The resulting type after applying the - operator.

+

fn sub(self, other: OFlag) -> OFlag

Returns the set difference of the two sets of flags.

+

impl SubAssign<OFlag> for OFlag

fn sub_assign(&mut self, other: OFlag)

Disables all flags enabled in the set.

+

impl UpperHex for OFlag

Auto Trait Implementations

impl RefUnwindSafe for OFlag

impl Send for OFlag

impl Sync for OFlag

impl Unpin for OFlag

impl UnwindSafe for OFlag

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/file/struct.SFlag.html b/api/yanix/file/struct.SFlag.html new file mode 100644 index 000000000000..98a46aedb666 --- /dev/null +++ b/api/yanix/file/struct.SFlag.html @@ -0,0 +1,70 @@ +yanix::file::SFlag - Rust

[]Struct yanix::file::SFlag

pub struct SFlag { /* fields omitted */ }

Methods

impl SFlag

pub const IFIFO: SFlag

pub const IFCHR: SFlag

pub const IFDIR: SFlag

pub const IFBLK: SFlag

pub const IFREG: SFlag

pub const IFLNK: SFlag

pub const IFSOCK: SFlag

pub const IFMT: SFlag

pub const fn empty() -> SFlag

Returns an empty set of flags

+

pub const fn all() -> SFlag

Returns the set containing all flags.

+

pub const fn bits(&self) -> mode_t

Returns the raw value of the flags currently stored.

+

pub fn from_bits(bits: mode_t) -> Option<SFlag>

Convert from underlying bit representation, unless that +representation contains bits that do not correspond to a flag.

+

pub const fn from_bits_truncate(bits: mode_t) -> SFlag

Convert from underlying bit representation, dropping any bits +that do not correspond to flags.

+

pub const unsafe fn from_bits_unchecked(bits: mode_t) -> SFlag

Convert from underlying bit representation, preserving all +bits (even those not corresponding to a defined flag).

+

pub const fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

+

pub const fn is_all(&self) -> bool

Returns true if all flags are currently set.

+

pub const fn intersects(&self, other: SFlag) -> bool

Returns true if there are flags common to both self and other.

+

pub const fn contains(&self, other: SFlag) -> bool

Returns true all of the flags in other are contained within self.

+

pub fn insert(&mut self, other: SFlag)

Inserts the specified flags in-place.

+

pub fn remove(&mut self, other: SFlag)

Removes the specified flags in-place.

+

pub fn toggle(&mut self, other: SFlag)

Toggles the specified flags in-place.

+

pub fn set(&mut self, other: SFlag, value: bool)

Inserts or removes the specified flags depending on the passed value.

+

Trait Implementations

impl Binary for SFlag

impl BitAnd<SFlag> for SFlag

type Output = SFlag

The resulting type after applying the & operator.

+

fn bitand(self, other: SFlag) -> SFlag

Returns the intersection between the two sets of flags.

+

impl BitAndAssign<SFlag> for SFlag

fn bitand_assign(&mut self, other: SFlag)

Disables all flags disabled in the set.

+

impl BitOr<SFlag> for SFlag

type Output = SFlag

The resulting type after applying the | operator.

+

fn bitor(self, other: SFlag) -> SFlag

Returns the union of the two sets of flags.

+

impl BitOrAssign<SFlag> for SFlag

fn bitor_assign(&mut self, other: SFlag)

Adds the set of flags.

+

impl BitXor<SFlag> for SFlag

type Output = SFlag

The resulting type after applying the ^ operator.

+

fn bitxor(self, other: SFlag) -> SFlag

Returns the left flags, but with all the right flags toggled.

+

impl BitXorAssign<SFlag> for SFlag

fn bitxor_assign(&mut self, other: SFlag)

Toggles the set of flags.

+

impl Clone for SFlag

impl Copy for SFlag

impl Debug for SFlag

impl Eq for SFlag

impl Extend<SFlag> for SFlag

impl FromIterator<SFlag> for SFlag

impl Hash for SFlag

impl LowerHex for SFlag

impl Not for SFlag

type Output = SFlag

The resulting type after applying the ! operator.

+

fn not(self) -> SFlag

Returns the complement of this set of flags.

+

impl Octal for SFlag

impl Ord for SFlag

impl PartialEq<SFlag> for SFlag

impl PartialOrd<SFlag> for SFlag

impl StructuralEq for SFlag

impl StructuralPartialEq for SFlag

impl Sub<SFlag> for SFlag

type Output = SFlag

The resulting type after applying the - operator.

+

fn sub(self, other: SFlag) -> SFlag

Returns the set difference of the two sets of flags.

+

impl SubAssign<SFlag> for SFlag

fn sub_assign(&mut self, other: SFlag)

Disables all flags enabled in the set.

+

impl UpperHex for SFlag

Auto Trait Implementations

impl RefUnwindSafe for SFlag

impl Send for SFlag

impl Sync for SFlag

impl Unpin for SFlag

impl UnwindSafe for SFlag

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/index.html b/api/yanix/index.html new file mode 100644 index 000000000000..bfc2a9c6a211 --- /dev/null +++ b/api/yanix/index.html @@ -0,0 +1,10 @@ +yanix - Rust

[][src]Crate yanix

yanix stands for Yet Another Nix crate, and, well, it is simply +a yet another crate in the spirit of the nix crate. As such, +this crate is inspired by the original nix crate, however, +it takes a different approach, using lower-level interfaces with +less abstraction, so that it fits better with its main use case +which is our WASI implementation, wasi-common.

+

Modules

+
clock
dir
fadvise
fcntl
file
poll
socket

Enums

+
Errno
YanixError

Type Definitions

+
Result
\ No newline at end of file diff --git a/api/yanix/poll/fn.poll.html b/api/yanix/poll/fn.poll.html new file mode 100644 index 000000000000..d59327506f16 --- /dev/null +++ b/api/yanix/poll/fn.poll.html @@ -0,0 +1 @@ +yanix::poll::poll - Rust

[][src]Function yanix::poll::poll

pub fn poll(fds: &mut [PollFd], timeout: c_int) -> Result<usize>
\ No newline at end of file diff --git a/api/yanix/poll/index.html b/api/yanix/poll/index.html new file mode 100644 index 000000000000..46d056eb5547 --- /dev/null +++ b/api/yanix/poll/index.html @@ -0,0 +1,3 @@ +yanix::poll - Rust

[][src]Module yanix::poll

Structs

+
PollFd
PollFlags

Functions

+
poll
\ No newline at end of file diff --git a/api/yanix/poll/sidebar-items.js b/api/yanix/poll/sidebar-items.js new file mode 100644 index 000000000000..891926dd1bfa --- /dev/null +++ b/api/yanix/poll/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"fn":[["poll",""]],"struct":[["PollFd",""],["PollFlags",""]]}); \ No newline at end of file diff --git a/api/yanix/poll/struct.PollFd.html b/api/yanix/poll/struct.PollFd.html new file mode 100644 index 000000000000..767ef4994103 --- /dev/null +++ b/api/yanix/poll/struct.PollFd.html @@ -0,0 +1,22 @@ +yanix::poll::PollFd - Rust

[][src]Struct yanix::poll::PollFd

#[repr(C)]
+pub struct PollFd(_);

Methods

impl PollFd[src]

pub unsafe fn new(fd: RawFd, events: PollFlags) -> Self[src]

pub fn revents(self) -> Option<PollFlags>[src]

Trait Implementations

impl Clone for PollFd[src]

impl Copy for PollFd[src]

impl Debug for PollFd[src]

impl Eq for PollFd[src]

impl Hash for PollFd[src]

impl PartialEq<PollFd> for PollFd[src]

impl StructuralEq for PollFd[src]

impl StructuralPartialEq for PollFd[src]

Auto Trait Implementations

impl RefUnwindSafe for PollFd

impl Send for PollFd

impl Sync for PollFd

impl Unpin for PollFd

impl UnwindSafe for PollFd

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/poll/struct.PollFlags.html b/api/yanix/poll/struct.PollFlags.html new file mode 100644 index 000000000000..fa6d8e82b02c --- /dev/null +++ b/api/yanix/poll/struct.PollFlags.html @@ -0,0 +1,70 @@ +yanix::poll::PollFlags - Rust

[]Struct yanix::poll::PollFlags

pub struct PollFlags { /* fields omitted */ }

Methods

impl PollFlags

pub const POLLIN: PollFlags

pub const POLLPRI: PollFlags

pub const POLLOUT: PollFlags

pub const POLLRDNORM: PollFlags

pub const POLLWRNORM: PollFlags

pub const POLLRDBAND: PollFlags

pub const POLLWRBAND: PollFlags

pub const POLLERR: PollFlags

pub const POLLHUP: PollFlags

pub const POLLNVAL: PollFlags

pub const fn empty() -> PollFlags

Returns an empty set of flags

+

pub const fn all() -> PollFlags

Returns the set containing all flags.

+

pub const fn bits(&self) -> c_short

Returns the raw value of the flags currently stored.

+

pub fn from_bits(bits: c_short) -> Option<PollFlags>

Convert from underlying bit representation, unless that +representation contains bits that do not correspond to a flag.

+

pub const fn from_bits_truncate(bits: c_short) -> PollFlags

Convert from underlying bit representation, dropping any bits +that do not correspond to flags.

+

pub const unsafe fn from_bits_unchecked(bits: c_short) -> PollFlags

Convert from underlying bit representation, preserving all +bits (even those not corresponding to a defined flag).

+

pub const fn is_empty(&self) -> bool

Returns true if no flags are currently stored.

+

pub const fn is_all(&self) -> bool

Returns true if all flags are currently set.

+

pub const fn intersects(&self, other: PollFlags) -> bool

Returns true if there are flags common to both self and other.

+

pub const fn contains(&self, other: PollFlags) -> bool

Returns true all of the flags in other are contained within self.

+

pub fn insert(&mut self, other: PollFlags)

Inserts the specified flags in-place.

+

pub fn remove(&mut self, other: PollFlags)

Removes the specified flags in-place.

+

pub fn toggle(&mut self, other: PollFlags)

Toggles the specified flags in-place.

+

pub fn set(&mut self, other: PollFlags, value: bool)

Inserts or removes the specified flags depending on the passed value.

+

Trait Implementations

impl Binary for PollFlags

impl BitAnd<PollFlags> for PollFlags

type Output = PollFlags

The resulting type after applying the & operator.

+

fn bitand(self, other: PollFlags) -> PollFlags

Returns the intersection between the two sets of flags.

+

impl BitAndAssign<PollFlags> for PollFlags

fn bitand_assign(&mut self, other: PollFlags)

Disables all flags disabled in the set.

+

impl BitOr<PollFlags> for PollFlags

type Output = PollFlags

The resulting type after applying the | operator.

+

fn bitor(self, other: PollFlags) -> PollFlags

Returns the union of the two sets of flags.

+

impl BitOrAssign<PollFlags> for PollFlags

fn bitor_assign(&mut self, other: PollFlags)

Adds the set of flags.

+

impl BitXor<PollFlags> for PollFlags

type Output = PollFlags

The resulting type after applying the ^ operator.

+

fn bitxor(self, other: PollFlags) -> PollFlags

Returns the left flags, but with all the right flags toggled.

+

impl BitXorAssign<PollFlags> for PollFlags

fn bitxor_assign(&mut self, other: PollFlags)

Toggles the set of flags.

+

impl Clone for PollFlags

impl Copy for PollFlags

impl Debug for PollFlags

impl Eq for PollFlags

impl Extend<PollFlags> for PollFlags

impl FromIterator<PollFlags> for PollFlags

impl Hash for PollFlags

impl LowerHex for PollFlags

impl Not for PollFlags

type Output = PollFlags

The resulting type after applying the ! operator.

+

fn not(self) -> PollFlags

Returns the complement of this set of flags.

+

impl Octal for PollFlags

impl Ord for PollFlags

impl PartialEq<PollFlags> for PollFlags

impl PartialOrd<PollFlags> for PollFlags

impl StructuralEq for PollFlags

impl StructuralPartialEq for PollFlags

impl Sub<PollFlags> for PollFlags

type Output = PollFlags

The resulting type after applying the - operator.

+

fn sub(self, other: PollFlags) -> PollFlags

Returns the set difference of the two sets of flags.

+

impl SubAssign<PollFlags> for PollFlags

fn sub_assign(&mut self, other: PollFlags)

Disables all flags enabled in the set.

+

impl UpperHex for PollFlags

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/sidebar-items.js b/api/yanix/sidebar-items.js new file mode 100644 index 000000000000..0affe94e127b --- /dev/null +++ b/api/yanix/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["Errno",""],["YanixError",""]],"mod":[["clock",""],["dir",""],["fadvise",""],["fcntl",""],["file",""],["poll",""],["socket",""]],"type":[["Result",""]]}); \ No newline at end of file diff --git a/api/yanix/socket/enum.SockType.html b/api/yanix/socket/enum.SockType.html new file mode 100644 index 000000000000..57e1876f5377 --- /dev/null +++ b/api/yanix/socket/enum.SockType.html @@ -0,0 +1,26 @@ +yanix::socket::SockType - Rust

[][src]Enum yanix::socket::SockType

#[repr(i32)]
+pub enum SockType {
+    Stream,
+    Datagram,
+    SeqPacket,
+    Raw,
+    Rdm,
+}

+ Variants

+
Stream
Datagram
SeqPacket
Raw
Rdm

Trait Implementations

impl Clone for SockType[src]

impl Copy for SockType[src]

impl Debug for SockType[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

+

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

+

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

+
\ No newline at end of file diff --git a/api/yanix/socket/fn.get_socket_type.html b/api/yanix/socket/fn.get_socket_type.html new file mode 100644 index 000000000000..9f78606f6168 --- /dev/null +++ b/api/yanix/socket/fn.get_socket_type.html @@ -0,0 +1 @@ +yanix::socket::get_socket_type - Rust

[][src]Function yanix::socket::get_socket_type

pub unsafe fn get_socket_type(fd: RawFd) -> Result<SockType>
\ No newline at end of file diff --git a/api/yanix/socket/index.html b/api/yanix/socket/index.html new file mode 100644 index 000000000000..cac05f32c003 --- /dev/null +++ b/api/yanix/socket/index.html @@ -0,0 +1,3 @@ +yanix::socket - Rust

[][src]Module yanix::socket

Enums

+
SockType

Functions

+
get_socket_type
\ No newline at end of file diff --git a/api/yanix/socket/sidebar-items.js b/api/yanix/socket/sidebar-items.js new file mode 100644 index 000000000000..42da371bc9a4 --- /dev/null +++ b/api/yanix/socket/sidebar-items.js @@ -0,0 +1 @@ +initSidebarItems({"enum":[["SockType",""]],"fn":[["get_socket_type",""]]}); \ No newline at end of file diff --git a/api/yanix/sys/linux/fadvise/enum.PosixFadviseAdvice.html b/api/yanix/sys/linux/fadvise/enum.PosixFadviseAdvice.html new file mode 100644 index 000000000000..0763c3c85091 --- /dev/null +++ b/api/yanix/sys/linux/fadvise/enum.PosixFadviseAdvice.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../yanix/fadvise/enum.PosixFadviseAdvice.html...

+ + + \ No newline at end of file diff --git a/api/yanix/sys/linux/fadvise/fn.posix_fadvise.html b/api/yanix/sys/linux/fadvise/fn.posix_fadvise.html new file mode 100644 index 000000000000..0bda02cd3a76 --- /dev/null +++ b/api/yanix/sys/linux/fadvise/fn.posix_fadvise.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../yanix/fadvise/fn.posix_fadvise.html...

+ + + \ No newline at end of file diff --git a/api/yanix/sys/linux/file/fn.isatty.html b/api/yanix/sys/linux/file/fn.isatty.html new file mode 100644 index 000000000000..ee089b494e77 --- /dev/null +++ b/api/yanix/sys/linux/file/fn.isatty.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../../../yanix/file/fn.isatty.html...

+ + + \ No newline at end of file diff --git a/api/yanix/sys/trait.EntryExt.html b/api/yanix/sys/trait.EntryExt.html new file mode 100644 index 000000000000..5528b21579d2 --- /dev/null +++ b/api/yanix/sys/trait.EntryExt.html @@ -0,0 +1,10 @@ + + + + + + +

Redirecting to ../../yanix/dir/trait.EntryExt.html...

+ + + \ No newline at end of file diff --git a/api/yanix/type.Result.html b/api/yanix/type.Result.html new file mode 100644 index 000000000000..1326110d423c --- /dev/null +++ b/api/yanix/type.Result.html @@ -0,0 +1 @@ +yanix::Result - Rust

[][src]Type Definition yanix::Result

type Result<T> = Result<T, YanixError>;
\ No newline at end of file diff --git a/ayu-highlight.css b/ayu-highlight.css new file mode 100644 index 000000000000..128e0166429e --- /dev/null +++ b/ayu-highlight.css @@ -0,0 +1,79 @@ +/* +Based off of the Ayu theme +Original by Dempfi (https://github.com/dempfi/ayu) +*/ + +.hljs { + display: block; + overflow-x: auto; + background: #191f26; + color: #e6e1cf; + padding: 0.5em; +} + +.hljs-comment, +.hljs-quote, +.hljs-meta { + color: #5c6773; + font-style: italic; +} + +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-attr, +.hljs-regexp, +.hljs-link, +.hljs-selector-id, +.hljs-selector-class { + color: #ff7733; +} + +.hljs-number, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #ffee99; +} + +.hljs-string, +.hljs-bullet { + color: #b8cc52; +} + +.hljs-title, +.hljs-built_in, +.hljs-section { + color: #ffb454; +} + +.hljs-keyword, +.hljs-selector-tag, +.hljs-symbol { + color: #ff7733; +} + +.hljs-name { + color: #36a3d9; +} + +.hljs-tag { + color: #00568d; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-addition { + color: #91b362; +} + +.hljs-deletion { + color: #d96c75; +} diff --git a/book.js b/book.js new file mode 100644 index 000000000000..ca73ee14d053 --- /dev/null +++ b/book.js @@ -0,0 +1,620 @@ +"use strict"; + +// Fix back button cache problem +window.onunload = function () { }; + +// Global variable, shared between modules +function playpen_text(playpen) { + let code_block = playpen.querySelector("code"); + + if (window.ace && code_block.classList.contains("editable")) { + let editor = window.ace.edit(code_block); + return editor.getValue(); + } else { + return code_block.textContent; + } +} + +(function codeSnippets() { + // Hide Rust code lines prepended with a specific character + var hiding_character = "#"; + + function fetch_with_timeout(url, options, timeout = 6000) { + return Promise.race([ + fetch(url, options), + new Promise((_, reject) => setTimeout(() => reject(new Error('timeout')), timeout)) + ]); + } + + var playpens = Array.from(document.querySelectorAll(".playpen")); + if (playpens.length > 0) { + fetch_with_timeout("https://play.rust-lang.org/meta/crates", { + headers: { + 'Content-Type': "application/json", + }, + method: 'POST', + mode: 'cors', + }) + .then(response => response.json()) + .then(response => { + // get list of crates available in the rust playground + let playground_crates = response.crates.map(item => item["id"]); + playpens.forEach(block => handle_crate_list_update(block, playground_crates)); + }); + } + + function handle_crate_list_update(playpen_block, playground_crates) { + // update the play buttons after receiving the response + update_play_button(playpen_block, playground_crates); + + // and install on change listener to dynamically update ACE editors + if (window.ace) { + let code_block = playpen_block.querySelector("code"); + if (code_block.classList.contains("editable")) { + let editor = window.ace.edit(code_block); + editor.addEventListener("change", function (e) { + update_play_button(playpen_block, playground_crates); + }); + } + } + } + + // updates the visibility of play button based on `no_run` class and + // used crates vs ones available on http://play.rust-lang.org + function update_play_button(pre_block, playground_crates) { + var play_button = pre_block.querySelector(".play-button"); + + // skip if code is `no_run` + if (pre_block.querySelector('code').classList.contains("no_run")) { + play_button.classList.add("hidden"); + return; + } + + // get list of `extern crate`'s from snippet + var txt = playpen_text(pre_block); + var re = /extern\s+crate\s+([a-zA-Z_0-9]+)\s*;/g; + var snippet_crates = []; + var item; + while (item = re.exec(txt)) { + snippet_crates.push(item[1]); + } + + // check if all used crates are available on play.rust-lang.org + var all_available = snippet_crates.every(function (elem) { + return playground_crates.indexOf(elem) > -1; + }); + + if (all_available) { + play_button.classList.remove("hidden"); + } else { + play_button.classList.add("hidden"); + } + } + + function run_rust_code(code_block) { + var result_block = code_block.querySelector(".result"); + if (!result_block) { + result_block = document.createElement('code'); + result_block.className = 'result hljs language-bash'; + + code_block.append(result_block); + } + + let text = playpen_text(code_block); + let classes = code_block.querySelector('code').classList; + let has_2018 = classes.contains("edition2018"); + let edition = has_2018 ? "2018" : "2015"; + + var params = { + version: "stable", + optimize: "0", + code: text, + edition: edition + }; + + if (text.indexOf("#![feature") !== -1) { + params.version = "nightly"; + } + + result_block.innerText = "Running..."; + + fetch_with_timeout("https://play.rust-lang.org/evaluate.json", { + headers: { + 'Content-Type': "application/json", + }, + method: 'POST', + mode: 'cors', + body: JSON.stringify(params) + }) + .then(response => response.json()) + .then(response => result_block.innerText = response.result) + .catch(error => result_block.innerText = "Playground Communication: " + error.message); + } + + // Syntax highlighting Configuration + hljs.configure({ + tabReplace: ' ', // 4 spaces + languages: [], // Languages used for auto-detection + }); + + if (window.ace) { + // language-rust class needs to be removed for editable + // blocks or highlightjs will capture events + Array + .from(document.querySelectorAll('code.editable')) + .forEach(function (block) { block.classList.remove('language-rust'); }); + + Array + .from(document.querySelectorAll('code:not(.editable)')) + .forEach(function (block) { hljs.highlightBlock(block); }); + } else { + Array + .from(document.querySelectorAll('code')) + .forEach(function (block) { hljs.highlightBlock(block); }); + } + + // Adding the hljs class gives code blocks the color css + // even if highlighting doesn't apply + Array + .from(document.querySelectorAll('code')) + .forEach(function (block) { block.classList.add('hljs'); }); + + Array.from(document.querySelectorAll("code.language-rust")).forEach(function (block) { + + var code_block = block; + var pre_block = block.parentNode; + // hide lines + var lines = code_block.innerHTML.split("\n"); + var first_non_hidden_line = false; + var lines_hidden = false; + var trimmed_line = ""; + + for (var n = 0; n < lines.length; n++) { + trimmed_line = lines[n].trim(); + if (trimmed_line[0] == hiding_character && trimmed_line[1] != hiding_character) { + if (first_non_hidden_line) { + lines[n] = "" + "\n" + lines[n].replace(/(\s*)# ?/, "$1") + ""; + } + else { + lines[n] = "" + lines[n].replace(/(\s*)# ?/, "$1") + "\n" + ""; + } + lines_hidden = true; + } + else if (first_non_hidden_line) { + lines[n] = "\n" + lines[n]; + } + else { + first_non_hidden_line = true; + } + if (trimmed_line[0] == hiding_character && trimmed_line[1] == hiding_character) { + lines[n] = lines[n].replace("##", "#") + } + } + code_block.innerHTML = lines.join(""); + + // If no lines were hidden, return + if (!lines_hidden) { return; } + + var buttons = document.createElement('div'); + buttons.className = 'buttons'; + buttons.innerHTML = ""; + + // add expand button + pre_block.insertBefore(buttons, pre_block.firstChild); + + pre_block.querySelector('.buttons').addEventListener('click', function (e) { + if (e.target.classList.contains('fa-expand')) { + var lines = pre_block.querySelectorAll('span.hidden'); + + e.target.classList.remove('fa-expand'); + e.target.classList.add('fa-compress'); + e.target.title = 'Hide lines'; + e.target.setAttribute('aria-label', e.target.title); + + Array.from(lines).forEach(function (line) { + line.classList.remove('hidden'); + line.classList.add('unhidden'); + }); + } else if (e.target.classList.contains('fa-compress')) { + var lines = pre_block.querySelectorAll('span.unhidden'); + + e.target.classList.remove('fa-compress'); + e.target.classList.add('fa-expand'); + e.target.title = 'Show hidden lines'; + e.target.setAttribute('aria-label', e.target.title); + + Array.from(lines).forEach(function (line) { + line.classList.remove('unhidden'); + line.classList.add('hidden'); + }); + } + }); + }); + + Array.from(document.querySelectorAll('pre code')).forEach(function (block) { + var pre_block = block.parentNode; + if (!pre_block.classList.contains('playpen')) { + var buttons = pre_block.querySelector(".buttons"); + if (!buttons) { + buttons = document.createElement('div'); + buttons.className = 'buttons'; + pre_block.insertBefore(buttons, pre_block.firstChild); + } + + var clipButton = document.createElement('button'); + clipButton.className = 'fa fa-copy clip-button'; + clipButton.title = 'Copy to clipboard'; + clipButton.setAttribute('aria-label', clipButton.title); + clipButton.innerHTML = ''; + + buttons.insertBefore(clipButton, buttons.firstChild); + } + }); + + // Process playpen code blocks + Array.from(document.querySelectorAll(".playpen")).forEach(function (pre_block) { + // Add play button + var buttons = pre_block.querySelector(".buttons"); + if (!buttons) { + buttons = document.createElement('div'); + buttons.className = 'buttons'; + pre_block.insertBefore(buttons, pre_block.firstChild); + } + + var runCodeButton = document.createElement('button'); + runCodeButton.className = 'fa fa-play play-button'; + runCodeButton.hidden = true; + runCodeButton.title = 'Run this code'; + runCodeButton.setAttribute('aria-label', runCodeButton.title); + + var copyCodeClipboardButton = document.createElement('button'); + copyCodeClipboardButton.className = 'fa fa-copy clip-button'; + copyCodeClipboardButton.innerHTML = ''; + copyCodeClipboardButton.title = 'Copy to clipboard'; + copyCodeClipboardButton.setAttribute('aria-label', copyCodeClipboardButton.title); + + buttons.insertBefore(runCodeButton, buttons.firstChild); + buttons.insertBefore(copyCodeClipboardButton, buttons.firstChild); + + runCodeButton.addEventListener('click', function (e) { + run_rust_code(pre_block); + }); + + let code_block = pre_block.querySelector("code"); + if (window.ace && code_block.classList.contains("editable")) { + var undoChangesButton = document.createElement('button'); + undoChangesButton.className = 'fa fa-history reset-button'; + undoChangesButton.title = 'Undo changes'; + undoChangesButton.setAttribute('aria-label', undoChangesButton.title); + + buttons.insertBefore(undoChangesButton, buttons.firstChild); + + undoChangesButton.addEventListener('click', function () { + let editor = window.ace.edit(code_block); + editor.setValue(editor.originalCode); + editor.clearSelection(); + }); + } + }); +})(); + +(function themes() { + var html = document.querySelector('html'); + var themeToggleButton = document.getElementById('theme-toggle'); + var themePopup = document.getElementById('theme-list'); + var themeColorMetaTag = document.querySelector('meta[name="theme-color"]'); + var stylesheets = { + ayuHighlight: document.querySelector("[href$='ayu-highlight.css']"), + tomorrowNight: document.querySelector("[href$='tomorrow-night.css']"), + highlight: document.querySelector("[href$='highlight.css']"), + }; + + function showThemes() { + themePopup.style.display = 'block'; + themeToggleButton.setAttribute('aria-expanded', true); + themePopup.querySelector("button#" + document.body.className).focus(); + } + + function hideThemes() { + themePopup.style.display = 'none'; + themeToggleButton.setAttribute('aria-expanded', false); + themeToggleButton.focus(); + } + + function set_theme(theme) { + let ace_theme; + + if (theme == 'coal' || theme == 'navy') { + stylesheets.ayuHighlight.disabled = true; + stylesheets.tomorrowNight.disabled = false; + stylesheets.highlight.disabled = true; + + ace_theme = "ace/theme/tomorrow_night"; + } else if (theme == 'ayu') { + stylesheets.ayuHighlight.disabled = false; + stylesheets.tomorrowNight.disabled = true; + stylesheets.highlight.disabled = true; + ace_theme = "ace/theme/tomorrow_night"; + } else { + stylesheets.ayuHighlight.disabled = true; + stylesheets.tomorrowNight.disabled = true; + stylesheets.highlight.disabled = false; + ace_theme = "ace/theme/dawn"; + } + + setTimeout(function () { + themeColorMetaTag.content = getComputedStyle(document.body).backgroundColor; + }, 1); + + if (window.ace && window.editors) { + window.editors.forEach(function (editor) { + editor.setTheme(ace_theme); + }); + } + + var previousTheme; + try { previousTheme = localStorage.getItem('mdbook-theme'); } catch (e) { } + if (previousTheme === null || previousTheme === undefined) { previousTheme = default_theme; } + + try { localStorage.setItem('mdbook-theme', theme); } catch (e) { } + + document.body.className = theme; + html.classList.remove(previousTheme); + html.classList.add(theme); + } + + // Set theme + var theme; + try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { } + if (theme === null || theme === undefined) { theme = default_theme; } + + set_theme(theme); + + themeToggleButton.addEventListener('click', function () { + if (themePopup.style.display === 'block') { + hideThemes(); + } else { + showThemes(); + } + }); + + themePopup.addEventListener('click', function (e) { + var theme = e.target.id || e.target.parentElement.id; + set_theme(theme); + }); + + themePopup.addEventListener('focusout', function(e) { + // e.relatedTarget is null in Safari and Firefox on macOS (see workaround below) + if (!!e.relatedTarget && !themeToggleButton.contains(e.relatedTarget) && !themePopup.contains(e.relatedTarget)) { + hideThemes(); + } + }); + + // Should not be needed, but it works around an issue on macOS & iOS: https://github.com/rust-lang-nursery/mdBook/issues/628 + document.addEventListener('click', function(e) { + if (themePopup.style.display === 'block' && !themeToggleButton.contains(e.target) && !themePopup.contains(e.target)) { + hideThemes(); + } + }); + + document.addEventListener('keydown', function (e) { + if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; } + if (!themePopup.contains(e.target)) { return; } + + switch (e.key) { + case 'Escape': + e.preventDefault(); + hideThemes(); + break; + case 'ArrowUp': + e.preventDefault(); + var li = document.activeElement.parentElement; + if (li && li.previousElementSibling) { + li.previousElementSibling.querySelector('button').focus(); + } + break; + case 'ArrowDown': + e.preventDefault(); + var li = document.activeElement.parentElement; + if (li && li.nextElementSibling) { + li.nextElementSibling.querySelector('button').focus(); + } + break; + case 'Home': + e.preventDefault(); + themePopup.querySelector('li:first-child button').focus(); + break; + case 'End': + e.preventDefault(); + themePopup.querySelector('li:last-child button').focus(); + break; + } + }); +})(); + +(function sidebar() { + var html = document.querySelector("html"); + var sidebar = document.getElementById("sidebar"); + var sidebarLinks = document.querySelectorAll('#sidebar a'); + var sidebarToggleButton = document.getElementById("sidebar-toggle"); + var sidebarResizeHandle = document.getElementById("sidebar-resize-handle"); + var firstContact = null; + + function showSidebar() { + html.classList.remove('sidebar-hidden') + html.classList.add('sidebar-visible'); + Array.from(sidebarLinks).forEach(function (link) { + link.setAttribute('tabIndex', 0); + }); + sidebarToggleButton.setAttribute('aria-expanded', true); + sidebar.setAttribute('aria-hidden', false); + try { localStorage.setItem('mdbook-sidebar', 'visible'); } catch (e) { } + } + + function hideSidebar() { + html.classList.remove('sidebar-visible') + html.classList.add('sidebar-hidden'); + Array.from(sidebarLinks).forEach(function (link) { + link.setAttribute('tabIndex', -1); + }); + sidebarToggleButton.setAttribute('aria-expanded', false); + sidebar.setAttribute('aria-hidden', true); + try { localStorage.setItem('mdbook-sidebar', 'hidden'); } catch (e) { } + } + + // Toggle sidebar + sidebarToggleButton.addEventListener('click', function sidebarToggle() { + if (html.classList.contains("sidebar-hidden")) { + showSidebar(); + } else if (html.classList.contains("sidebar-visible")) { + hideSidebar(); + } else { + if (getComputedStyle(sidebar)['transform'] === 'none') { + hideSidebar(); + } else { + showSidebar(); + } + } + }); + + sidebarResizeHandle.addEventListener('mousedown', initResize, false); + + function initResize(e) { + window.addEventListener('mousemove', resize, false); + window.addEventListener('mouseup', stopResize, false); + html.classList.add('sidebar-resizing'); + } + function resize(e) { + document.documentElement.style.setProperty('--sidebar-width', (e.clientX - sidebar.offsetLeft) + 'px'); + } + //on mouseup remove windows functions mousemove & mouseup + function stopResize(e) { + html.classList.remove('sidebar-resizing'); + window.removeEventListener('mousemove', resize, false); + window.removeEventListener('mouseup', stopResize, false); + } + + document.addEventListener('touchstart', function (e) { + firstContact = { + x: e.touches[0].clientX, + time: Date.now() + }; + }, { passive: true }); + + document.addEventListener('touchmove', function (e) { + if (!firstContact) + return; + + var curX = e.touches[0].clientX; + var xDiff = curX - firstContact.x, + tDiff = Date.now() - firstContact.time; + + if (tDiff < 250 && Math.abs(xDiff) >= 150) { + if (xDiff >= 0 && firstContact.x < Math.min(document.body.clientWidth * 0.25, 300)) + showSidebar(); + else if (xDiff < 0 && curX < 300) + hideSidebar(); + + firstContact = null; + } + }, { passive: true }); + + // Scroll sidebar to current active section + var activeSection = sidebar.querySelector(".active"); + if (activeSection) { + sidebar.scrollTop = activeSection.offsetTop; + } +})(); + +(function chapterNavigation() { + document.addEventListener('keydown', function (e) { + if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey) { return; } + if (window.search && window.search.hasFocus()) { return; } + + switch (e.key) { + case 'ArrowRight': + e.preventDefault(); + var nextButton = document.querySelector('.nav-chapters.next'); + if (nextButton) { + window.location.href = nextButton.href; + } + break; + case 'ArrowLeft': + e.preventDefault(); + var previousButton = document.querySelector('.nav-chapters.previous'); + if (previousButton) { + window.location.href = previousButton.href; + } + break; + } + }); +})(); + +(function clipboard() { + var clipButtons = document.querySelectorAll('.clip-button'); + + function hideTooltip(elem) { + elem.firstChild.innerText = ""; + elem.className = 'fa fa-copy clip-button'; + } + + function showTooltip(elem, msg) { + elem.firstChild.innerText = msg; + elem.className = 'fa fa-copy tooltipped'; + } + + var clipboardSnippets = new ClipboardJS('.clip-button', { + text: function (trigger) { + hideTooltip(trigger); + let playpen = trigger.closest("pre"); + return playpen_text(playpen); + } + }); + + Array.from(clipButtons).forEach(function (clipButton) { + clipButton.addEventListener('mouseout', function (e) { + hideTooltip(e.currentTarget); + }); + }); + + clipboardSnippets.on('success', function (e) { + e.clearSelection(); + showTooltip(e.trigger, "Copied!"); + }); + + clipboardSnippets.on('error', function (e) { + showTooltip(e.trigger, "Clipboard error!"); + }); +})(); + +(function scrollToTop () { + var menuTitle = document.querySelector('.menu-title'); + + menuTitle.addEventListener('click', function () { + document.scrollingElement.scrollTo({ top: 0, behavior: 'smooth' }); + }); +})(); + +(function autoHideMenu() { + var menu = document.getElementById('menu-bar'); + + var previousScrollTop = document.scrollingElement.scrollTop; + + document.addEventListener('scroll', function () { + if (menu.classList.contains('folded') && document.scrollingElement.scrollTop < previousScrollTop) { + menu.classList.remove('folded'); + } else if (!menu.classList.contains('folded') && document.scrollingElement.scrollTop > previousScrollTop) { + menu.classList.add('folded'); + } + + if (!menu.classList.contains('bordered') && document.scrollingElement.scrollTop > 0) { + menu.classList.add('bordered'); + } + + if (menu.classList.contains('bordered') && document.scrollingElement.scrollTop === 0) { + menu.classList.remove('bordered'); + } + + previousScrollTop = document.scrollingElement.scrollTop; + }, { passive: true }); +})(); diff --git a/book.toml b/book.toml new file mode 100644 index 000000000000..9fa32dfb63f0 --- /dev/null +++ b/book.toml @@ -0,0 +1,5 @@ +[book] +authors = ["The Wasmtime Project Developers"] +multilingual = false +src = "." +title = "Wasmtime" diff --git a/cli-cache.html b/cli-cache.html new file mode 100644 index 000000000000..d4a54b348279 --- /dev/null +++ b/cli-cache.html @@ -0,0 +1,423 @@ + + + + + + Cache Configuration - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Cache Configuration of wasmtime

+

The configuration file uses the toml format. +You can create a configuration file at the default location with:

+
$ wasmtime config new
+
+

It will print the location regardless of the success. +Please refer to the --help message for using a custom location.

+

All settings, except enabled, are optional. +If the setting is not specified, the default value is used. +Thus, if you don't know what values to use, don't specify them. +The default values might be tuned in the future.

+

Wasmtime assumes all the options are in the cache section.

+

Example config:

+
[cache]
+enabled = true
+directory = "/nfs-share/wasmtime-cache/"
+cleanup-interval = "30m"
+files-total-size-soft-limit = "1Gi"
+
+

Please refer to the cache system section to learn how it works.

+

If you think some default value should be tuned, some new settings +should be introduced or some behavior should be changed, you are +welcome to discuss it and contribute to the Wasmtime repository.

+

Setting enabled

+
    +
  • type: boolean
  • +
  • format: true | false
  • +
  • default: true
  • +
+

Specifies whether the cache system is used or not.

+

This field is mandatory. +The default value is used when configuration file is not specified +and none exists at the default location.

+

Setting directory

+
    +
  • type: string (path)
  • +
  • default: look up cache_dir in directories crate
  • +
+

Specifies where the cache directory is. Must be an absolute path.

+

Setting worker-event-queue-size

+
    +
  • type: string (SI prefix)
  • +
  • format: "{integer}(K | M | G | T | P)?"
  • +
  • default: "16"
  • +
+

Size of cache worker event queue. +If the queue is full, incoming cache usage events will be dropped.

+

Setting baseline-compression-level

+
    +
  • type: integer
  • +
  • default: 3, the default zstd compression level
  • +
+

Compression level used when a new cache file is being written by the cache system. +Wasmtime uses zstd compression.

+

Setting optimized-compression-level

+
    +
  • type: integer
  • +
  • default: 20
  • +
+

Compression level used when the cache worker decides to recompress a cache file. +Wasmtime uses zstd compression.

+

Setting optimized-compression-usage-counter-threshold

+
    +
  • type: string (SI prefix)
  • +
  • format: "{integer}(K | M | G | T | P)?"
  • +
  • default: "256"
  • +
+

One of the conditions for the cache worker to recompress a cache file +is to have usage count of the file exceeding this threshold.

+

Setting cleanup-interval

+
    +
  • type: string (duration)
  • +
  • format: "{integer}(s | m | h | d)"
  • +
  • default: "1h"
  • +
+

When the cache worker is notified about a cache file being updated by the cache system +and this interval has already passed since last cleaning up, +the worker will attempt a new cleanup.

+

Please also refer to allowed-clock-drift-for-files-from-future.

+

Setting optimizing-compression-task-timeout

+
    +
  • type: string (duration)
  • +
  • format: "{integer}(s | m | h | d)"
  • +
  • default: "30m"
  • +
+

When the cache worker decides to recompress a cache file, it makes sure that +no other worker has started the task for this file within the last +optimizing-compression-task-timeout interval. +If some worker has started working on it, other workers are skipping this task.

+

Please also refer to the allowed-clock-drift-for-files-from-future section.

+

Setting allowed-clock-drift-for-files-from-future

+
    +
  • type: string (duration)
  • +
  • format: "{integer}(s | m | h | d)"
  • +
  • default: "1d"
  • +
+

Locks

+

When the cache worker attempts acquiring a lock for some task, +it checks if some other worker has already acquired such a lock. +To be fault tolerant and eventually execute every task, +the locks expire after some interval. +However, because of clock drifts and different timezones, +it would happen that some lock was created in the future. +This setting defines a tolerance limit for these locks. +If the time has been changed in the system (i.e. two years backwards), +the cache system should still work properly. +Thus, these locks will be treated as expired +(assuming the tolerance is not too big).

+

Cache files

+

Similarly to the locks, the cache files or their metadata might +have modification time in distant future. +The cache system tries to keep these files as long as possible. +If the limits are not reached, the cache files will not be deleted. +Otherwise, they will be treated as the oldest files, so they might survive. +If the user actually uses the cache file, the modification time will be updated.

+

Setting file-count-soft-limit

+
    +
  • type: string (SI prefix)
  • +
  • format: "{integer}(K | M | G | T | P)?"
  • +
  • default: "65536"
  • +
+

Soft limit for the file count in the cache directory.

+

This doesn't include files with metadata. +To learn more, please refer to the cache system section.

+

Setting files-total-size-soft-limit

+
    +
  • type: string (disk space)
  • +
  • format: "{integer}(K | Ki | M | Mi | G | Gi | T | Ti | P | Pi)?"
  • +
  • default: "512Mi"
  • +
+

Soft limit for the total size* of files in the cache directory.

+

This doesn't include files with metadata. +To learn more, please refer to the cache system section.

+

*this is the file size, not the space physically occupied on the disk.

+

Setting file-count-limit-percent-if-deleting

+
    +
  • type: string (percent)
  • +
  • format: "{integer}%"
  • +
  • default: "70%"
  • +
+

If file-count-soft-limit is exceeded and the cache worker performs the cleanup task, +then the worker will delete some cache files, so after the task, +the file count should not exceed +file-count-soft-limit * file-count-limit-percent-if-deleting.

+

This doesn't include files with metadata. +To learn more, please refer to the cache system section.

+

Setting files-total-size-limit-percent-if-deleting

+
    +
  • type: string (percent)
  • +
  • format: "{integer}%"
  • +
  • default: "70%"
  • +
+

If files-total-size-soft-limit is exceeded and cache worker performs the cleanup task, +then the worker will delete some cache files, so after the task, +the files total size should not exceed +files-total-size-soft-limit * files-total-size-limit-percent-if-deleting.

+

This doesn't include files with metadata. +To learn more, please refer to the cache system section.

+

How does the cache work?

+

This is an implementation detail and might change in the future. +Information provided here is meant to help understanding the big picture +and configuring the cache.

+

There are two main components - the cache system and the cache worker.

+

Cache system

+

Handles GET and UPDATE cache requests.

+
    +
  • GET request - simply loads the cache from disk if it is there.
  • +
  • UPDATE request - compresses received data with zstd and baseline-compression-level, then writes the data to the disk.
  • +
+

In case of successful handling of a request, it notifies the cache worker about this +event using the queue. +The queue has a limited size of worker-event-queue-size. If it is full, it will drop +new events until the cache worker pops some event from the queue.

+

Cache worker

+

The cache worker runs in a single thread with lower priority and pops events from the queue +in a loop handling them one by one.

+

On GET request

+
    +
  1. +

    Read the statistics file for the cache file, +increase the usage counter and write it back to the disk.

    +
  2. +
  3. +

    Attempt recompressing the cache file if all of the following conditions are met:

    + +

    When recompressing, optimized-compression-level is used as a compression level.

    +
  4. +
+

On UPDATE request

+
    +
  1. Write a fresh statistics file for the cache file.
  2. +
  3. Clean up the cache if no worker has attempted to do this within the last cleanup-interval. +During this task: + +
  4. +
+

Metadata files

+
    +
  • every cached WebAssembly module has its own statistics file
  • +
  • every lock is a file
  • +
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cli-install.html b/cli-install.html new file mode 100644 index 000000000000..b7a4c15d5a6a --- /dev/null +++ b/cli-install.html @@ -0,0 +1,210 @@ + + + + + + Installation - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Installing wasmtime

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cli-options.html b/cli-options.html new file mode 100644 index 000000000000..7825da042949 --- /dev/null +++ b/cli-options.html @@ -0,0 +1,210 @@ + + + + + + CLI Options - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

CLI Options for wasmtime

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cli.html b/cli.html new file mode 100644 index 000000000000..1e3d25767b97 --- /dev/null +++ b/cli.html @@ -0,0 +1,210 @@ + + + + + + Using the wasmtime CLI - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Using the wasmtime CLI

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/clipboard.min.js b/clipboard.min.js new file mode 100644 index 000000000000..02c549e35c86 --- /dev/null +++ b/clipboard.min.js @@ -0,0 +1,7 @@ +/*! + * clipboard.js v2.0.4 + * https://zenorocha.github.io/clipboard.js + * + * Licensed MIT © Zeno Rocha + */ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(n){var o={};function r(t){if(o[t])return o[t].exports;var e=o[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=o,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function o(t,e){for(var n=0;n + + + + + Building - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Building

+

This section describes everything required to build and run Wasmtime.

+

Prerequisites

+

Before we can actually build Wasmtime, we'll need to make sure these things are +installed first.

+

The Rust Toolchain

+

Install the Rust toolchain here. This +includes rustup, cargo, rustc, etc...

+

libclang (optional)

+

The wasmtime-fuzzing crate transitively depends on bindgen, which requires +that your system has a libclang installed. Therefore, if you want to hack on +Wasmtime's fuzzing infrastructure, you'll need libclang. Details on how to +get libclang and make it available for bindgen are +here.

+

Building the wasmtime CLI

+

To make an unoptimized, debug build of the wasmtime CLI tool, go to the root +of the repository and run this command:

+
cargo build
+
+

The built executable will be located at target/debug/wasmtime.

+

To make an optimized build, run this command in the root of the repository:

+
cargo build --release
+
+

The built executable will be located at target/release/wasmtime.

+

You can also build and run a local wasmtime CLI by replacing cargo build +with cargo run.

+

Building Other Wasmtime Crates

+

You can build any of the Wasmtime crates by appending -p wasmtime-whatever to +the cargo build invocation. For example, to build the wasmtime-jit crate, +execute this command:

+
cargo build -p wasmtime-jit
+
+

Alternatively, you can cd into the crate's directory, and run cargo build +there, without needing to supply the -p flag:

+
cd crates/jit/
+cargo build
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contributing-ci.html b/contributing-ci.html new file mode 100644 index 000000000000..4da4bfebfb36 --- /dev/null +++ b/contributing-ci.html @@ -0,0 +1,210 @@ + + + + + + CI - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

CI

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contributing-coc.html b/contributing-coc.html new file mode 100644 index 000000000000..6911256cefb9 --- /dev/null +++ b/contributing-coc.html @@ -0,0 +1,231 @@ + + + + + + Code of Conduct - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Contributor Covenant Code of Conduct

+

Note: this Code of Conduct pertains to individuals' behavior. Please also see the Organizational Code of Conduct.

+

Our Pledge

+

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

+

Our Standards

+

Examples of behavior that contributes to creating a positive environment include:

+
    +
  • Using welcoming and inclusive language
  • +
  • Being respectful of differing viewpoints and experiences
  • +
  • Gracefully accepting constructive criticism
  • +
  • Focusing on what is best for the community
  • +
  • Showing empathy towards other community members
  • +
+

Examples of unacceptable behavior by participants include:

+
    +
  • The use of sexualized language or imagery and unwelcome sexual attention or advances
  • +
  • Trolling, insulting/derogatory comments, and personal or political attacks
  • +
  • Public or private harassment
  • +
  • Publishing others' private information, such as a physical or electronic address, without explicit permission
  • +
  • Other conduct which could reasonably be considered inappropriate in a professional setting
  • +
+

Our Responsibilities

+

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

+

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

+

Scope

+

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

+

Enforcement

+

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Bytecode Alliance CoC team at report@bytecodealliance.org. The CoC team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The CoC team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

+

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the Bytecode Alliance's leadership.

+

Attribution

+

This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contributing-fuzzing.html b/contributing-fuzzing.html new file mode 100644 index 000000000000..ec9b630c0439 --- /dev/null +++ b/contributing-fuzzing.html @@ -0,0 +1,236 @@ + + + + + + Fuzzing - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Fuzzing

+

Test Case Generators and Oracles

+

Test case generators and oracles live in the wasmtime-fuzzing crate, located +in the crates/fuzzing directory.

+

A test case generator takes raw, unstructured input from a fuzzer and +translates that into a test case. This might involve interpreting the raw input +as "DNA" or pre-determined choices through a decision tree and using it to +generate an in-memory data structure, or it might be a no-op where we interpret +the raw bytes as if they were Wasm.

+

An oracle takes a test case and determines whether we have a bug. For example, +one of the simplest oracles is to take a Wasm binary as an input test case, +validate and instantiate it, and (implicitly) check that no assertions failed or +segfaults happened. A more complicated oracle might compare the result of +executing a Wasm file with and without optimizations enabled, and make sure that +the two executions are observably identical.

+

Our test case generators and oracles strive to be fuzzer-agnostic: they can be +reused with libFuzzer or AFL or any other fuzzing engine or driver.

+

libFuzzer and cargo fuzz Fuzz Targets

+

We combine a test case generator and one more more oracles into a fuzz +target. Because the target needs to pipe the raw input from a fuzzer into the +test case generator, it is specific to a particular fuzzer. This is generally +fine, since they're only a couple of lines of glue code.

+

Currently, all of our fuzz targets are written for +libFuzzer and cargo fuzz. They are defined in +the fuzz subdirectory.

+

See +fuzz/README.md +for details on how to run these fuzz targets and set up a corpus of seed inputs.

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contributing-governance.html b/contributing-governance.html new file mode 100644 index 000000000000..41ea7383fbdb --- /dev/null +++ b/contributing-governance.html @@ -0,0 +1,210 @@ + + + + + + Governance - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Governance

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contributing-testing.html b/contributing-testing.html new file mode 100644 index 000000000000..df5afe32186b --- /dev/null +++ b/contributing-testing.html @@ -0,0 +1,310 @@ + + + + + + Testing - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Testing

+

This section describes how to run Wasmtime's tests and add new tests.

+

Before continuing, make sure you can build +Wasmtime successfully. Can't run the tests if you +can't build it!

+

Running All Tests

+

To run all of Wasmtime's tests (excluding WASI integration tests), execute this command:

+
cargo test --all
+
+

To include WASI integration tests, you'll need wasm32-wasi target installed, which, +assuming you're using rustup.rs to manage your Rust versions, +can be done as follows:

+
rustup target add wasm32-wasi
+
+

Next, to run all tests including the WASI integration tests, execute this command:

+
cargo test --features test_programs --all
+
+

You can also exclude a particular crate from testing with --exclude. For +example, if you want to avoid testing the wastime-fuzzing crate — which +requires that libclang is installed on your system, and for some reason maybe +you don't have it — you can run:

+
cargo test --all --exclude wasmtime-fuzzing
+
+

Testing a Specific Crate

+

You can test a particular Wasmtime crate with cargo test -p wasmtime-whatever. For example, to test the wasmtime-environ crate, execute +this command:

+
cargo test -p wasmtime-environ
+
+

Alternatively, you can cd into the crate's directory, and run cargo test +there, without needing to supply the -p flag:

+
cd crates/environ/
+cargo test
+
+

Running the Wasm Spec Tests

+

The spec testsuite itself is in a git submodule, so make sure you've +checked it out and initialized its submodule:

+
git submodule update --init
+
+

When the submodule is checked out, Wasmtime runs the Wasm spec testsuite as part +of testing the wasmtime-cli crate:

+
cargo test -p wasmtime-cli
+
+

Running WASI Integration Tests Only

+

WASI integration tests can be run separately from all other tests which +can be useful when working on the wasi-common crate. This can be done by +executing this command:

+
cargo test --features test_programs -p test-programs
+
+

Adding New Tests

+

Adding Rust's #[test]-Style Tests

+

For very "unit-y" tests, we add test modules in the same .rs file as the +code that is being tested. These test modules are configured to only get +compiled during testing with #[cfg(test)].

+

+# #![allow(unused_variables)]
+#fn main() {
+// some code...
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn some_test_for_that_code() {
+        // ...
+    }
+}
+#}
+

If you're writing a unit test and a test module doesn't already exist, you can +create one.

+

For more "integration-y" tests, we create a tests directory within the crate, +and put the tests inside there. For example, there are various code +cache-related tests at crates/environ/tests/cache_*.rs. Always feel free to +add a tests directory to a crate, if you want to add a new test and there +aren't any existing tests.

+

Adding Specification-Style Wast Tests

+

We use the spec testsuite as-is and without custom patches or a forked +version. This probably isn't what you want to modify when adding a new Wasmtime +test!

+

When you have a Wasmtime-specific test that you'd like to write in Wast and use +the Wast-style assertions, you can add it to our "misc testsuite". The misc +testsuite uses the same syntax and assertions as the spec testsuite, but lives +in tests/misc_testsuite. Feel free to add new tests to existing +tests/misc_testsuite/*.wast files or create new ones as needed. These tests +are run as part of the wasmtime-cli crate's tests.

+

If you have a new test that you think really belongs in the spec testsuite, make +sure it makes sense for every Wasm implementation to run your test (i.e. it +isn't Wasmtime-specific) and send a pull request +upstream. Once it is accepted in +the upstream repo, we can update our git submodule and we'll start running the +new tests.

+

Adding WASI Integration Tests

+

When you have a WASI-specific test program that you'd like to include as a +test case to run against our WASI implementation, you can add it to our +test-programs crate. In particular, you should drop a main-style Rust source +file into crates/test-programs/wasi-tests/src/bin/some_new_test.rs with a +name of your choice. And that's it! The build script included in the +test-programs crate will automatically generate the necessary boilerplate +code for your test program so that it's run on all supported hosts.

+

If you would like to tweak which host to run the test program against however +(for instance, only on Unix but on Windows), you can tweak that in the build +script located under crates/test-programs/build.rs.

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contributing.html b/contributing.html new file mode 100644 index 000000000000..c85ab99849d3 --- /dev/null +++ b/contributing.html @@ -0,0 +1,236 @@ + + + + + + Contributing - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Contributing

+

We're excited to work on Wasmtime together with you! This guide should help you +get up and running with Wasmtime development. But first, make sure you've read +the Code of Conduct!

+

Join Our Chat

+

We chat about Wasmtime development on Gitter — join +us!

+

If you're having trouble building Wasmtime, aren't sure why a test is failing, +or have any other questions, feel free to ask here. You can also open an +issue!

+

Finding Something to Hack On

+

If you're looking for something to do, these are great places to start:

+
    +
  • +

    Issues labeled "good first +issue" +— these issues tend to be simple, what needs to be done is well known, +and are good for new contributors to tackle. The goal is to learn Wasmtime's +development workflow and make sure that you can build and test Wasmtime.

    +
  • +
  • +

    Issues labeled "help +wanted" +— these are issues that we need a little help with!

    +
  • +
+

If you're unsure if an issue is a good fit for you or not, feel free to ask in a +comment on the issue, or in chat.

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/css/chrome.css b/css/chrome.css new file mode 100644 index 000000000000..94f86f790777 --- /dev/null +++ b/css/chrome.css @@ -0,0 +1,451 @@ +/* CSS for UI elements (a.k.a. chrome) */ + +@import 'variables.css'; + +::-webkit-scrollbar { + background: var(--bg); +} +::-webkit-scrollbar-thumb { + background: var(--scrollbar); +} + +#searchresults a, +.content a:link, +a:visited, +a > .hljs { + color: var(--links); +} + +/* Menu Bar */ + +#menu-bar { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 101; + margin: auto calc(0px - var(--page-padding)); +} +#menu-bar > #menu-bar-sticky-container { + display: flex; + flex-wrap: wrap; + background-color: var(--bg); + border-bottom-color: var(--bg); + border-bottom-width: 1px; + border-bottom-style: solid; +} +.js #menu-bar > #menu-bar-sticky-container { + transition: transform 0.3s; +} +#menu-bar.bordered > #menu-bar-sticky-container { + border-bottom-color: var(--table-border-color); +} +#menu-bar i, #menu-bar .icon-button { + position: relative; + padding: 0 8px; + z-index: 10; + line-height: 50px; + cursor: pointer; + transition: color 0.5s; +} +@media only screen and (max-width: 420px) { + #menu-bar i, #menu-bar .icon-button { + padding: 0 5px; + } +} + +.icon-button { + border: none; + background: none; + padding: 0; + color: inherit; +} +.icon-button i { + margin: 0; +} + +.right-buttons { + margin: 0 15px; +} +.right-buttons a { + text-decoration: none; +} + +html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-container { + transform: translateY(-60px); +} + +.left-buttons { + display: flex; + margin: 0 5px; +} +.no-js .left-buttons { + display: none; +} + +.menu-title { + display: inline-block; + font-weight: 200; + font-size: 20px; + line-height: 50px; + text-align: center; + margin: 0; + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} +.js .menu-title { + cursor: pointer; +} + +.menu-bar, +.menu-bar:visited, +.nav-chapters, +.nav-chapters:visited, +.mobile-nav-chapters, +.mobile-nav-chapters:visited, +.menu-bar .icon-button, +.menu-bar a i { + color: var(--icons); +} + +.menu-bar i:hover, +.menu-bar .icon-button:hover, +.nav-chapters:hover, +.mobile-nav-chapters i:hover { + color: var(--icons-hover); +} + +/* Nav Icons */ + +.nav-chapters { + font-size: 2.5em; + text-align: center; + text-decoration: none; + + position: fixed; + top: 50px; /* Height of menu-bar */ + bottom: 0; + margin: 0; + max-width: 150px; + min-width: 90px; + + display: flex; + justify-content: center; + align-content: center; + flex-direction: column; + + transition: color 0.5s; +} + +.nav-chapters:hover { text-decoration: none; } + +.nav-wrapper { + margin-top: 50px; + display: none; +} + +.mobile-nav-chapters { + font-size: 2.5em; + text-align: center; + text-decoration: none; + width: 90px; + border-radius: 5px; + background-color: var(--sidebar-bg); +} + +.previous { + float: left; +} + +.next { + float: right; + right: var(--page-padding); +} + +@media only screen and (max-width: 1080px) { + .nav-wide-wrapper { display: none; } + .nav-wrapper { display: block; } +} + +@media only screen and (max-width: 1380px) { + .sidebar-visible .nav-wide-wrapper { display: none; } + .sidebar-visible .nav-wrapper { display: block; } +} + +/* Inline code */ + +:not(pre) > .hljs { + display: inline-block; + vertical-align: middle; + padding: 0.1em 0.3em; + border-radius: 3px; +} + +:not(pre):not(a) > .hljs { + color: var(--inline-code-color); + overflow-x: initial; +} + +a:hover > .hljs { + text-decoration: underline; +} + +pre { + position: relative; +} +pre > .buttons { + position: absolute; + z-index: 100; + right: 5px; + top: 5px; + + color: var(--sidebar-fg); + cursor: pointer; +} +pre > .buttons :hover { + color: var(--sidebar-active); +} +pre > .buttons i { + margin-left: 8px; +} +pre > .buttons button { + color: inherit; + background: transparent; + border: none; + cursor: inherit; +} +pre > .result { + margin-top: 10px; +} + +/* Search */ + +#searchresults a { + text-decoration: none; +} + +mark { + border-radius: 2px; + padding: 0 3px 1px 3px; + margin: 0 -3px -1px -3px; + background-color: var(--search-mark-bg); + transition: background-color 300ms linear; + cursor: pointer; +} + +mark.fade-out { + background-color: rgba(0,0,0,0) !important; + cursor: auto; +} + +.searchbar-outer { + margin-left: auto; + margin-right: auto; + max-width: var(--content-max-width); +} + +#searchbar { + width: 100%; + margin: 5px auto 0px auto; + padding: 10px 16px; + transition: box-shadow 300ms ease-in-out; + border: 1px solid var(--searchbar-border-color); + border-radius: 3px; + background-color: var(--searchbar-bg); + color: var(--searchbar-fg); +} +#searchbar:focus, +#searchbar.active { + box-shadow: 0 0 3px var(--searchbar-shadow-color); +} + +.searchresults-header { + font-weight: bold; + font-size: 1em; + padding: 18px 0 0 5px; + color: var(--searchresults-header-fg); +} + +.searchresults-outer { + margin-left: auto; + margin-right: auto; + max-width: var(--content-max-width); + border-bottom: 1px dashed var(--searchresults-border-color); +} + +ul#searchresults { + list-style: none; + padding-left: 20px; +} +ul#searchresults li { + margin: 10px 0px; + padding: 2px; + border-radius: 2px; +} +ul#searchresults li.focus { + background-color: var(--searchresults-li-bg); +} +ul#searchresults span.teaser { + display: block; + clear: both; + margin: 5px 0 0 20px; + font-size: 0.8em; +} +ul#searchresults span.teaser em { + font-weight: bold; + font-style: normal; +} + +/* Sidebar */ + +.sidebar { + position: fixed; + left: 0; + top: 0; + bottom: 0; + width: var(--sidebar-width); + font-size: 0.875em; + box-sizing: border-box; + -webkit-overflow-scrolling: touch; + overscroll-behavior-y: contain; + background-color: var(--sidebar-bg); + color: var(--sidebar-fg); +} +.sidebar-resizing { + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} +.js:not(.sidebar-resizing) .sidebar { + transition: transform 0.3s; /* Animation: slide away */ +} +.sidebar code { + line-height: 2em; +} +.sidebar .sidebar-scrollbox { + overflow-y: auto; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + padding: 10px 10px; +} +.sidebar .sidebar-resize-handle { + position: absolute; + cursor: col-resize; + width: 0; + right: 0; + top: 0; + bottom: 0; +} +.js .sidebar .sidebar-resize-handle { + cursor: col-resize; + width: 5px; +} +.sidebar-hidden .sidebar { + transform: translateX(calc(0px - var(--sidebar-width))); +} +.sidebar::-webkit-scrollbar { + background: var(--sidebar-bg); +} +.sidebar::-webkit-scrollbar-thumb { + background: var(--scrollbar); +} + +.sidebar-visible .page-wrapper { + transform: translateX(var(--sidebar-width)); +} +@media only screen and (min-width: 620px) { + .sidebar-visible .page-wrapper { + transform: none; + margin-left: var(--sidebar-width); + } +} + +.chapter { + list-style: none outside none; + padding-left: 0; + line-height: 2.2em; +} +.chapter li { + color: var(--sidebar-non-existant); +} +.chapter li a { + display: block; + padding: 0; + text-decoration: none; + color: var(--sidebar-fg); +} + +.chapter li a:hover { + color: var(--sidebar-active); +} + +.chapter li .active { + color: var(--sidebar-active); +} + +.spacer { + width: 100%; + height: 3px; + margin: 5px 0px; +} +.chapter .spacer { + background-color: var(--sidebar-spacer); +} + +@media (-moz-touch-enabled: 1), (pointer: coarse) { + .chapter li a { padding: 5px 0; } + .spacer { margin: 10px 0; } +} + +.section { + list-style: none outside none; + padding-left: 20px; + line-height: 1.9em; +} + +/* Theme Menu Popup */ + +.theme-popup { + position: absolute; + left: 10px; + top: 50px; + z-index: 1000; + border-radius: 4px; + font-size: 0.7em; + color: var(--fg); + background: var(--theme-popup-bg); + border: 1px solid var(--theme-popup-border); + margin: 0; + padding: 0; + list-style: none; + display: none; +} +.theme-popup .default { + color: var(--icons); +} +.theme-popup .theme { + width: 100%; + border: 0; + margin: 0; + padding: 2px 10px; + line-height: 25px; + white-space: nowrap; + text-align: left; + cursor: pointer; + color: inherit; + background: inherit; + font-size: inherit; +} +.theme-popup .theme:hover { + background-color: var(--theme-hover); +} +.theme-popup .theme:hover:first-child, +.theme-popup .theme:hover:last-child { + border-top-left-radius: inherit; + border-top-right-radius: inherit; +} diff --git a/css/general.css b/css/general.css new file mode 100644 index 000000000000..57d5d7a6021c --- /dev/null +++ b/css/general.css @@ -0,0 +1,143 @@ +/* Base styles and content styles */ + +@import 'variables.css'; + +html { + font-family: "Open Sans", sans-serif; + color: var(--fg); + background-color: var(--bg); + text-size-adjust: none; +} + +body { + margin: 0; + font-size: 1rem; + overflow-x: hidden; +} + +code { + font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace; + font-size: 0.875em; /* please adjust the ace font size accordingly in editor.js */ +} + +.left { float: left; } +.right { float: right; } +.hidden { display: none; } +.play-button.hidden { display: none; } + +h2, h3 { margin-top: 2.5em; } +h4, h5 { margin-top: 2em; } + +.header + .header h3, +.header + .header h4, +.header + .header h5 { + margin-top: 1em; +} + +h1 a.header:target::before, +h2 a.header:target::before, +h3 a.header:target::before, +h4 a.header:target::before { + display: inline-block; + content: "»"; + margin-left: -30px; + width: 30px; +} + +.page { + outline: 0; + padding: 0 var(--page-padding); +} +.page-wrapper { + box-sizing: border-box; +} +.js:not(.sidebar-resizing) .page-wrapper { + transition: margin-left 0.3s ease, transform 0.3s ease; /* Animation: slide away */ +} + +.content { + overflow-y: auto; + padding: 0 15px; + padding-bottom: 50px; +} +.content main { + margin-left: auto; + margin-right: auto; + max-width: var(--content-max-width); +} +.content a { text-decoration: none; } +.content a:hover { text-decoration: underline; } +.content img { max-width: 100%; } +.content .header:link, +.content .header:visited { + color: var(--fg); +} +.content .header:link, +.content .header:visited:hover { + text-decoration: none; +} + +table { + margin: 0 auto; + border-collapse: collapse; +} +table td { + padding: 3px 20px; + border: 1px var(--table-border-color) solid; +} +table thead { + background: var(--table-header-bg); +} +table thead td { + font-weight: 700; + border: none; +} +table thead tr { + border: 1px var(--table-header-bg) solid; +} +/* Alternate background colors for rows */ +table tbody tr:nth-child(2n) { + background: var(--table-alternate-bg); +} + + +blockquote { + margin: 20px 0; + padding: 0 20px; + color: var(--fg); + background-color: var(--quote-bg); + border-top: .1em solid var(--quote-border); + border-bottom: .1em solid var(--quote-border); +} + + +:not(.footnote-definition) + .footnote-definition, +.footnote-definition + :not(.footnote-definition) { + margin-top: 2em; +} +.footnote-definition { + font-size: 0.9em; + margin: 0.5em 0; +} +.footnote-definition p { + display: inline; +} + +.tooltiptext { + position: absolute; + visibility: hidden; + color: #fff; + background-color: #333; + transform: translateX(-50%); /* Center by moving tooltip 50% of its width left */ + left: -8px; /* Half of the width of the icon */ + top: -35px; + font-size: 0.8em; + text-align: center; + border-radius: 6px; + padding: 5px 8px; + margin: 5px; + z-index: 1000; +} +.tooltipped .tooltiptext { + visibility: visible; +} diff --git a/css/print.css b/css/print.css new file mode 100644 index 000000000000..5e690f755994 --- /dev/null +++ b/css/print.css @@ -0,0 +1,54 @@ + +#sidebar, +#menu-bar, +.nav-chapters, +.mobile-nav-chapters { + display: none; +} + +#page-wrapper.page-wrapper { + transform: none; + margin-left: 0px; + overflow-y: initial; +} + +#content { + max-width: none; + margin: 0; + padding: 0; +} + +.page { + overflow-y: initial; +} + +code { + background-color: #666666; + border-radius: 5px; + + /* Force background to be printed in Chrome */ + -webkit-print-color-adjust: exact; +} + +pre > .buttons { + z-index: 2; +} + +a, a:visited, a:active, a:hover { + color: #4183c4; + text-decoration: none; +} + +h1, h2, h3, h4, h5, h6 { + page-break-inside: avoid; + page-break-after: avoid; +} + +pre, code { + page-break-inside: avoid; + white-space: pre-wrap; +} + +.fa { + display: none !important; +} diff --git a/css/variables.css b/css/variables.css new file mode 100644 index 000000000000..29daa0729379 --- /dev/null +++ b/css/variables.css @@ -0,0 +1,210 @@ + +/* Globals */ + +:root { + --sidebar-width: 300px; + --page-padding: 15px; + --content-max-width: 750px; +} + +/* Themes */ + +.ayu { + --bg: hsl(210, 25%, 8%); + --fg: #c5c5c5; + + --sidebar-bg: #14191f; + --sidebar-fg: #c8c9db; + --sidebar-non-existant: #5c6773; + --sidebar-active: #ffb454; + --sidebar-spacer: #2d334f; + + --scrollbar: var(--sidebar-fg); + + --icons: #737480; + --icons-hover: #b7b9cc; + + --links: #0096cf; + + --inline-code-color: #ffb454; + + --theme-popup-bg: #14191f; + --theme-popup-border: #5c6773; + --theme-hover: #191f26; + + --quote-bg: hsl(226, 15%, 17%); + --quote-border: hsl(226, 15%, 22%); + + --table-border-color: hsl(210, 25%, 13%); + --table-header-bg: hsl(210, 25%, 28%); + --table-alternate-bg: hsl(210, 25%, 11%); + + --searchbar-border-color: #848484; + --searchbar-bg: #424242; + --searchbar-fg: #fff; + --searchbar-shadow-color: #d4c89f; + --searchresults-header-fg: #666; + --searchresults-border-color: #888; + --searchresults-li-bg: #252932; + --search-mark-bg: #e3b171; +} + +.coal { + --bg: hsl(200, 7%, 8%); + --fg: #98a3ad; + + --sidebar-bg: #292c2f; + --sidebar-fg: #a1adb8; + --sidebar-non-existant: #505254; + --sidebar-active: #3473ad; + --sidebar-spacer: #393939; + + --scrollbar: var(--sidebar-fg); + + --icons: #43484d; + --icons-hover: #b3c0cc; + + --links: #2b79a2; + + --inline-code-color: #c5c8c6;; + + --theme-popup-bg: #141617; + --theme-popup-border: #43484d; + --theme-hover: #1f2124; + + --quote-bg: hsl(234, 21%, 18%); + --quote-border: hsl(234, 21%, 23%); + + --table-border-color: hsl(200, 7%, 13%); + --table-header-bg: hsl(200, 7%, 28%); + --table-alternate-bg: hsl(200, 7%, 11%); + + --searchbar-border-color: #aaa; + --searchbar-bg: #b7b7b7; + --searchbar-fg: #000; + --searchbar-shadow-color: #aaa; + --searchresults-header-fg: #666; + --searchresults-border-color: #98a3ad; + --searchresults-li-bg: #2b2b2f; + --search-mark-bg: #355c7d; +} + +.light { + --bg: hsl(0, 0%, 100%); + --fg: #333333; + + --sidebar-bg: #fafafa; + --sidebar-fg: #364149; + --sidebar-non-existant: #aaaaaa; + --sidebar-active: #008cff; + --sidebar-spacer: #f4f4f4; + + --scrollbar: #cccccc; + + --icons: #cccccc; + --icons-hover: #333333; + + --links: #4183c4; + + --inline-code-color: #6e6b5e; + + --theme-popup-bg: #fafafa; + --theme-popup-border: #cccccc; + --theme-hover: #e6e6e6; + + --quote-bg: hsl(197, 37%, 96%); + --quote-border: hsl(197, 37%, 91%); + + --table-border-color: hsl(0, 0%, 95%); + --table-header-bg: hsl(0, 0%, 80%); + --table-alternate-bg: hsl(0, 0%, 97%); + + --searchbar-border-color: #aaa; + --searchbar-bg: #fafafa; + --searchbar-fg: #000; + --searchbar-shadow-color: #aaa; + --searchresults-header-fg: #666; + --searchresults-border-color: #888; + --searchresults-li-bg: #e4f2fe; + --search-mark-bg: #a2cff5; +} + +.navy { + --bg: hsl(226, 23%, 11%); + --fg: #bcbdd0; + + --sidebar-bg: #282d3f; + --sidebar-fg: #c8c9db; + --sidebar-non-existant: #505274; + --sidebar-active: #2b79a2; + --sidebar-spacer: #2d334f; + + --scrollbar: var(--sidebar-fg); + + --icons: #737480; + --icons-hover: #b7b9cc; + + --links: #2b79a2; + + --inline-code-color: #c5c8c6;; + + --theme-popup-bg: #161923; + --theme-popup-border: #737480; + --theme-hover: #282e40; + + --quote-bg: hsl(226, 15%, 17%); + --quote-border: hsl(226, 15%, 22%); + + --table-border-color: hsl(226, 23%, 16%); + --table-header-bg: hsl(226, 23%, 31%); + --table-alternate-bg: hsl(226, 23%, 14%); + + --searchbar-border-color: #aaa; + --searchbar-bg: #aeaec6; + --searchbar-fg: #000; + --searchbar-shadow-color: #aaa; + --searchresults-header-fg: #5f5f71; + --searchresults-border-color: #5c5c68; + --searchresults-li-bg: #242430; + --search-mark-bg: #a2cff5; +} + +.rust { + --bg: hsl(60, 9%, 87%); + --fg: #262625; + + --sidebar-bg: #3b2e2a; + --sidebar-fg: #c8c9db; + --sidebar-non-existant: #505254; + --sidebar-active: #e69f67; + --sidebar-spacer: #45373a; + + --scrollbar: var(--sidebar-fg); + + --icons: #737480; + --icons-hover: #262625; + + --links: #2b79a2; + + --inline-code-color: #6e6b5e; + + --theme-popup-bg: #e1e1db; + --theme-popup-border: #b38f6b; + --theme-hover: #99908a; + + --quote-bg: hsl(60, 5%, 75%); + --quote-border: hsl(60, 5%, 70%); + + --table-border-color: hsl(60, 9%, 82%); + --table-header-bg: #b3a497; + --table-alternate-bg: hsl(60, 9%, 84%); + + --searchbar-border-color: #aaa; + --searchbar-bg: #fafafa; + --searchbar-fg: #000; + --searchbar-shadow-color: #aaa; + --searchresults-header-fg: #666; + --searchresults-border-color: #888; + --searchresults-li-bg: #dec2a2; + --search-mark-bg: #e69f67; +} diff --git a/elasticlunr.min.js b/elasticlunr.min.js new file mode 100644 index 000000000000..94b20dd2ef46 --- /dev/null +++ b/elasticlunr.min.js @@ -0,0 +1,10 @@ +/** + * elasticlunr - http://weixsong.github.io + * Lightweight full-text search engine in Javascript for browser search and offline search. - 0.9.5 + * + * Copyright (C) 2017 Oliver Nightingale + * Copyright (C) 2017 Wei Song + * MIT Licensed + * @license + */ +!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=function(e){var n=new t.Index;return n.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),e&&e.call(n,n),n};t.version="0.9.5",lunr=t,t.utils={},t.utils.warn=function(e){return function(t){e.console&&console.warn&&console.warn(t)}}(this),t.utils.toString=function(e){return void 0===e||null===e?"":e.toString()},t.EventEmitter=function(){this.events={}},t.EventEmitter.prototype.addListener=function(){var e=Array.prototype.slice.call(arguments),t=e.pop(),n=e;if("function"!=typeof t)throw new TypeError("last argument must be a function");n.forEach(function(e){this.hasHandler(e)||(this.events[e]=[]),this.events[e].push(t)},this)},t.EventEmitter.prototype.removeListener=function(e,t){if(this.hasHandler(e)){var n=this.events[e].indexOf(t);-1!==n&&(this.events[e].splice(n,1),0==this.events[e].length&&delete this.events[e])}},t.EventEmitter.prototype.emit=function(e){if(this.hasHandler(e)){var t=Array.prototype.slice.call(arguments,1);this.events[e].forEach(function(e){e.apply(void 0,t)},this)}},t.EventEmitter.prototype.hasHandler=function(e){return e in this.events},t.tokenizer=function(e){if(!arguments.length||null===e||void 0===e)return[];if(Array.isArray(e)){var n=e.filter(function(e){return null===e||void 0===e?!1:!0});n=n.map(function(e){return t.utils.toString(e).toLowerCase()});var i=[];return n.forEach(function(e){var n=e.split(t.tokenizer.seperator);i=i.concat(n)},this),i}return e.toString().trim().toLowerCase().split(t.tokenizer.seperator)},t.tokenizer.defaultSeperator=/[\s\-]+/,t.tokenizer.seperator=t.tokenizer.defaultSeperator,t.tokenizer.setSeperator=function(e){null!==e&&void 0!==e&&"object"==typeof e&&(t.tokenizer.seperator=e)},t.tokenizer.resetSeperator=function(){t.tokenizer.seperator=t.tokenizer.defaultSeperator},t.tokenizer.getSeperator=function(){return t.tokenizer.seperator},t.Pipeline=function(){this._queue=[]},t.Pipeline.registeredFunctions={},t.Pipeline.registerFunction=function(e,n){n in t.Pipeline.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+n),e.label=n,t.Pipeline.registeredFunctions[n]=e},t.Pipeline.getRegisteredFunction=function(e){return e in t.Pipeline.registeredFunctions!=!0?null:t.Pipeline.registeredFunctions[e]},t.Pipeline.warnIfFunctionNotRegistered=function(e){var n=e.label&&e.label in this.registeredFunctions;n||t.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},t.Pipeline.load=function(e){var n=new t.Pipeline;return e.forEach(function(e){var i=t.Pipeline.getRegisteredFunction(e);if(!i)throw new Error("Cannot load un-registered function: "+e);n.add(i)}),n},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(e){t.Pipeline.warnIfFunctionNotRegistered(e),this._queue.push(e)},this)},t.Pipeline.prototype.after=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i+1,0,n)},t.Pipeline.prototype.before=function(e,n){t.Pipeline.warnIfFunctionNotRegistered(n);var i=this._queue.indexOf(e);if(-1===i)throw new Error("Cannot find existingFn");this._queue.splice(i,0,n)},t.Pipeline.prototype.remove=function(e){var t=this._queue.indexOf(e);-1!==t&&this._queue.splice(t,1)},t.Pipeline.prototype.run=function(e){for(var t=[],n=e.length,i=this._queue.length,o=0;n>o;o++){for(var r=e[o],s=0;i>s&&(r=this._queue[s](r,o,e),void 0!==r&&null!==r);s++);void 0!==r&&null!==r&&t.push(r)}return t},t.Pipeline.prototype.reset=function(){this._queue=[]},t.Pipeline.prototype.get=function(){return this._queue},t.Pipeline.prototype.toJSON=function(){return this._queue.map(function(e){return t.Pipeline.warnIfFunctionNotRegistered(e),e.label})},t.Index=function(){this._fields=[],this._ref="id",this.pipeline=new t.Pipeline,this.documentStore=new t.DocumentStore,this.index={},this.eventEmitter=new t.EventEmitter,this._idfCache={},this.on("add","remove","update",function(){this._idfCache={}}.bind(this))},t.Index.prototype.on=function(){var e=Array.prototype.slice.call(arguments);return this.eventEmitter.addListener.apply(this.eventEmitter,e)},t.Index.prototype.off=function(e,t){return this.eventEmitter.removeListener(e,t)},t.Index.load=function(e){e.version!==t.version&&t.utils.warn("version mismatch: current "+t.version+" importing "+e.version);var n=new this;n._fields=e.fields,n._ref=e.ref,n.documentStore=t.DocumentStore.load(e.documentStore),n.pipeline=t.Pipeline.load(e.pipeline),n.index={};for(var i in e.index)n.index[i]=t.InvertedIndex.load(e.index[i]);return n},t.Index.prototype.addField=function(e){return this._fields.push(e),this.index[e]=new t.InvertedIndex,this},t.Index.prototype.setRef=function(e){return this._ref=e,this},t.Index.prototype.saveDocument=function(e){return this.documentStore=new t.DocumentStore(e),this},t.Index.prototype.addDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.addDoc(i,e),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));this.documentStore.addFieldLength(i,n,o.length);var r={};o.forEach(function(e){e in r?r[e]+=1:r[e]=1},this);for(var s in r){var u=r[s];u=Math.sqrt(u),this.index[n].addToken(s,{ref:i,tf:u})}},this),n&&this.eventEmitter.emit("add",e,this)}},t.Index.prototype.removeDocByRef=function(e){if(e&&this.documentStore.isDocStored()!==!1&&this.documentStore.hasDoc(e)){var t=this.documentStore.getDoc(e);this.removeDoc(t,!1)}},t.Index.prototype.removeDoc=function(e,n){if(e){var n=void 0===n?!0:n,i=e[this._ref];this.documentStore.hasDoc(i)&&(this.documentStore.removeDoc(i),this._fields.forEach(function(n){var o=this.pipeline.run(t.tokenizer(e[n]));o.forEach(function(e){this.index[n].removeToken(e,i)},this)},this),n&&this.eventEmitter.emit("remove",e,this))}},t.Index.prototype.updateDoc=function(e,t){var t=void 0===t?!0:t;this.removeDocByRef(e[this._ref],!1),this.addDoc(e,!1),t&&this.eventEmitter.emit("update",e,this)},t.Index.prototype.idf=function(e,t){var n="@"+t+"/"+e;if(Object.prototype.hasOwnProperty.call(this._idfCache,n))return this._idfCache[n];var i=this.index[t].getDocFreq(e),o=1+Math.log(this.documentStore.length/(i+1));return this._idfCache[n]=o,o},t.Index.prototype.getFields=function(){return this._fields.slice()},t.Index.prototype.search=function(e,n){if(!e)return[];e="string"==typeof e?{any:e}:JSON.parse(JSON.stringify(e));var i=null;null!=n&&(i=JSON.stringify(n));for(var o=new t.Configuration(i,this.getFields()).get(),r={},s=Object.keys(e),u=0;u0&&t.push(e);for(var i in n)"docs"!==i&&"df"!==i&&this.expandToken(e+i,t,n[i]);return t},t.InvertedIndex.prototype.toJSON=function(){return{root:this.root}},t.Configuration=function(e,n){var e=e||"";if(void 0==n||null==n)throw new Error("fields should not be null");this.config={};var i;try{i=JSON.parse(e),this.buildUserConfig(i,n)}catch(o){t.utils.warn("user configuration parse failed, will use default configuration"),this.buildDefaultConfig(n)}},t.Configuration.prototype.buildDefaultConfig=function(e){this.reset(),e.forEach(function(e){this.config[e]={boost:1,bool:"OR",expand:!1}},this)},t.Configuration.prototype.buildUserConfig=function(e,n){var i="OR",o=!1;if(this.reset(),"bool"in e&&(i=e.bool||i),"expand"in e&&(o=e.expand||o),"fields"in e)for(var r in e.fields)if(n.indexOf(r)>-1){var s=e.fields[r],u=o;void 0!=s.expand&&(u=s.expand),this.config[r]={boost:s.boost||0===s.boost?s.boost:1,bool:s.bool||i,expand:u}}else t.utils.warn("field name in user configuration not found in index instance fields");else this.addAllFields2UserConfig(i,o,n)},t.Configuration.prototype.addAllFields2UserConfig=function(e,t,n){n.forEach(function(n){this.config[n]={boost:1,bool:e,expand:t}},this)},t.Configuration.prototype.get=function(){return this.config},t.Configuration.prototype.reset=function(){this.config={}},lunr.SortedSet=function(){this.length=0,this.elements=[]},lunr.SortedSet.load=function(e){var t=new this;return t.elements=e,t.length=e.length,t},lunr.SortedSet.prototype.add=function(){var e,t;for(e=0;e1;){if(r===e)return o;e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o]}return r===e?o:-1},lunr.SortedSet.prototype.locationFor=function(e){for(var t=0,n=this.elements.length,i=n-t,o=t+Math.floor(i/2),r=this.elements[o];i>1;)e>r&&(t=o),r>e&&(n=o),i=n-t,o=t+Math.floor(i/2),r=this.elements[o];return r>e?o:e>r?o+1:void 0},lunr.SortedSet.prototype.intersect=function(e){for(var t=new lunr.SortedSet,n=0,i=0,o=this.length,r=e.length,s=this.elements,u=e.elements;;){if(n>o-1||i>r-1)break;s[n]!==u[i]?s[n]u[i]&&i++:(t.add(s[n]),n++,i++)}return t},lunr.SortedSet.prototype.clone=function(){var e=new lunr.SortedSet;return e.elements=this.toArray(),e.length=e.elements.length,e},lunr.SortedSet.prototype.union=function(e){var t,n,i;this.length>=e.length?(t=this,n=e):(t=e,n=this),i=t.clone();for(var o=0,r=n.toArray();o + + + + + C/C++ API - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Embedding Wasmtime in C

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/embed-rust.html b/embed-rust.html new file mode 100644 index 000000000000..b10272aec255 --- /dev/null +++ b/embed-rust.html @@ -0,0 +1,291 @@ + + + + + + Rust API - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Embedding Wasmtime in Rust

+

This document shows how to embed Wasmtime using the Rust API, and run a simple +wasm program.

+

Create some wasm

+

Let's create a simple WebAssembly file with a single exported function that returns an integer:

+
(;; wat2wasm hello.wat -o $WASM_FILES/hello.wasm ;;)
+(module
+  (func (export "answer") (result i32)
+     i32.const 42
+  )
+)
+
+

Create rust project

+
$ cargo new --bin wasmtime_hello
+$ cd wasmtime_hello
+$ cp $WASM_FILES/hello.wasm .
+
+

We will be using the wasmtime engine/API to run the wasm file, so we will add the dependency to Cargo.toml:

+
[dependencies]
+wasmtime = "<current version>"
+
+

where "" is the current version number of the wasmtime crate.

+

It is time to add code to the src/main.rs. First, storage needs to be activated:

+

+# #![allow(unused_variables)]
+#fn main() {
+use wasmtime::*;
+
+let store = Store::default();
+#}
+

The HostRef will be used a lot -- it is a "convenience" object to store and refer an object between the host and +the embedded environments.

+

The hello.wasm can be read from the file system and provided to the Module object constructor as &[u8]:

+

+# #![allow(unused_variables)]
+#fn main() {
+use std::fs::read;
+
+let hello_wasm = read("hello.wasm").expect("wasm file");
+
+let module = HostRef::new(Module::new(&store, &hello_wasm).expect("wasm module"));
+#}
+

The module instance can now be created. Normally, you would provide exports, but in this case, there are none required:

+

+# #![allow(unused_variables)]
+#fn main() {
+let instance = Instance::new(&store, &module, &[]).expect("wasm instance");
+#}
+

Everything is set. If a WebAssembly module has a start function -- it was run. +The instance's exports can be used at this point. wasmtime provides functions +to look up an export by name, and ensure that it's a function:

+

+# #![allow(unused_variables)]
+#fn main() {
+let answer = instance.find_export_by_name("answer").expect("answer").func().expect("function");
+#}
+

The exported function can be called using the call method. Remember that in most of the cases, +a HostRef<_> object will be returned, so borrow() or borrow_mut() method has to be used to refer the +specific object. The exported "answer" function accepts no parameters and returns a single i32 value.

+

+# #![allow(unused_variables)]
+#fn main() {
+let result = answer.borrow().call(&[]).expect("success");
+println!("Answer: {}", result[0].i32());
+#}
+

The names of the WebAssembly module's imports and exports can be discovered by means of module's corresponding methods.

+

src/main.rs

+
use std::fs::read;
+use wasmtime::*;
+
+fn main() {
+    let store = Store::default();
+
+    let wasm = read("hello.wasm").expect("wasm file");
+
+    let module = HostRef::new(Module::new(&store, &wasm).expect("wasm module"));
+    let instance = Instance::new(&store, &module, &[]).expect("wasm instance");
+
+    let answer = instance.find_export_by_name("answer").expect("answer").func().expect("function");
+    let result = answer.borrow().call(&[]).expect("success");
+    println!("Answer: {}", result[0].i32());
+}
+
+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/embed.html b/embed.html new file mode 100644 index 000000000000..51d084e83b0d --- /dev/null +++ b/embed.html @@ -0,0 +1,210 @@ + + + + + + Embedding Wasmtime - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Embedding Wasmtime

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples-markdown.html b/examples-markdown.html new file mode 100644 index 000000000000..648144478ecd --- /dev/null +++ b/examples-markdown.html @@ -0,0 +1,210 @@ + + + + + + Markdown parser - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Markdown Parser

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples.html b/examples.html new file mode 100644 index 000000000000..b5f0d1fc8fd6 --- /dev/null +++ b/examples.html @@ -0,0 +1,211 @@ + + + + + + Examples - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Examples

+

This is an explanation of all examples to come

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/favicon.png b/favicon.png new file mode 100644 index 000000000000..a5b1aa16c4dc Binary files /dev/null and b/favicon.png differ diff --git a/highlight.css b/highlight.css new file mode 100644 index 000000000000..ab8c49c689c4 --- /dev/null +++ b/highlight.css @@ -0,0 +1,79 @@ +/* Base16 Atelier Dune Light - Theme */ +/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ +/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ + +/* Atelier-Dune Comment */ +.hljs-comment, +.hljs-quote { + color: #AAA; +} + +/* Atelier-Dune Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-attribute, +.hljs-tag, +.hljs-name, +.hljs-regexp, +.hljs-link, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class { + color: #d73737; +} + +/* Atelier-Dune Orange */ +.hljs-number, +.hljs-meta, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params { + color: #b65611; +} + +/* Atelier-Dune Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet { + color: #60ac39; +} + +/* Atelier-Dune Blue */ +.hljs-title, +.hljs-section { + color: #6684e1; +} + +/* Atelier-Dune Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b854d4; +} + +.hljs { + display: block; + overflow-x: auto; + background: #f1f1f1; + color: #6e6b5e; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} + +.hljs-addition { + color: #22863a; + background-color: #f0fff4; +} + +.hljs-deletion { + color: #b31d28; + background-color: #ffeef0; +} diff --git a/highlight.js b/highlight.js new file mode 100644 index 000000000000..a3c761178ffb --- /dev/null +++ b/highlight.js @@ -0,0 +1,2 @@ +/*! highlight.js v9.15.8 | BSD3 License | git.io/hljslicense */ +!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(n){var m=[],o=Object.keys,g={},u={},t=/^(no-?highlight|plain|text)$/i,v=/\blang(?:uage)?-([\w-]+)\b/i,s=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,r={case_insensitive:"cI",lexemes:"l",contains:"c",keywords:"k",subLanguage:"sL",className:"cN",begin:"b",beginKeywords:"bK",end:"e",endsWithParent:"eW",illegal:"i",excludeBegin:"eB",excludeEnd:"eE",returnBegin:"rB",returnEnd:"rE",relevance:"r",variants:"v",IDENT_RE:"IR",UNDERSCORE_IDENT_RE:"UIR",NUMBER_RE:"NR",C_NUMBER_RE:"CNR",BINARY_NUMBER_RE:"BNR",RE_STARTERS_RE:"RSR",BACKSLASH_ESCAPE:"BE",APOS_STRING_MODE:"ASM",QUOTE_STRING_MODE:"QSM",PHRASAL_WORDS_MODE:"PWM",C_LINE_COMMENT_MODE:"CLCM",C_BLOCK_COMMENT_MODE:"CBCM",HASH_COMMENT_MODE:"HCM",NUMBER_MODE:"NM",C_NUMBER_MODE:"CNM",BINARY_NUMBER_MODE:"BNM",CSS_NUMBER_MODE:"CSSNM",REGEXP_MODE:"RM",TITLE_MODE:"TM",UNDERSCORE_TITLE_MODE:"UTM",COMMENT:"C",beginRe:"bR",endRe:"eR",illegalRe:"iR",lexemesRe:"lR",terminators:"t",terminator_end:"tE"},h="",w={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function x(e){return e.replace(/&/g,"&").replace(//g,">")}function b(e){return e.nodeName.toLowerCase()}function N(e,t){var s=e&&e.exec(t);return s&&0===s.index}function f(e){return t.test(e)}function p(e){var t,s={},r=Array.prototype.slice.call(arguments,1);for(t in e)s[t]=e[t];return r.forEach(function(e){for(t in e)s[t]=e[t]}),s}function _(e){var n=[];return function e(t,s){for(var r=t.firstChild;r;r=r.nextSibling)3===r.nodeType?s+=r.nodeValue.length:1===r.nodeType&&(n.push({event:"start",offset:s,node:r}),s=e(r,s),b(r).match(/br|hr|img|input/)||n.push({event:"stop",offset:s,node:r}));return s}(e,0),n}function a(e){if(r&&!e.langApiRestored){for(var t in e.langApiRestored=!0,r)e[t]&&(e[r[t]]=e[t]);(e.c||[]).concat(e.v||[]).forEach(a)}}function q(i){function d(e){return e&&e.source||e}function c(e,t){return new RegExp(d(e),"m"+(i.cI?"i":"")+(t?"g":""))}!function t(s,e){if(!s.compiled){if(s.compiled=!0,s.k=s.k||s.bK,s.k){var r={},n=function(s,e){i.cI&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var t=e.split("|");r[t[0]]=[s,t[1]?Number(t[1]):1]})};"string"==typeof s.k?n("keyword",s.k):o(s.k).forEach(function(e){n(e,s.k[e])}),s.k=r}s.lR=c(s.l||/\w+/,!0),e&&(s.bK&&(s.b="\\b("+s.bK.split(" ").join("|")+")\\b"),s.b||(s.b=/\B|\b/),s.bR=c(s.b),s.endSameAsBegin&&(s.e=s.b),s.e||s.eW||(s.e=/\B|\b/),s.e&&(s.eR=c(s.e)),s.tE=d(s.e)||"",s.eW&&e.tE&&(s.tE+=(s.e?"|":"")+e.tE)),s.i&&(s.iR=c(s.i)),null==s.r&&(s.r=1),s.c||(s.c=[]),s.c=Array.prototype.concat.apply([],s.c.map(function(e){return(t="self"===e?s:e).v&&!t.cached_variants&&(t.cached_variants=t.v.map(function(e){return p(t,{v:null},e)})),t.cached_variants||t.eW&&[p(t)]||[t];var t})),s.c.forEach(function(e){t(e,s)}),s.starts&&t(s.starts,e);var a=s.c.map(function(e){return e.bK?"\\.?(?:"+e.b+")\\.?":e.b}).concat([s.tE,s.i]).map(d).filter(Boolean);s.t=a.length?c(function(e,t){for(var s=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,n="",a=0;a')+t+(s?"":h):t}function d(){u+=null!=m.sL?function(){var e="string"==typeof m.sL;if(e&&!g[m.sL])return x(v);var t=e?y(m.sL,v,!0,a[m.sL]):E(v,m.sL.length?m.sL:void 0);return 0")+'"');return v+=t,t.length||1}var l=C(e);if(!l)throw new Error('Unknown language: "'+e+'"');q(l);var n,m=s||l,a={},u="";for(n=m;n!==l;n=n.parent)n.cN&&(u=o(n.cN,"",!0)+u);var v="",b=0;try{for(var i,f,_=0;m.t.lastIndex=_,i=m.t.exec(t);)f=r(t.substring(_,i.index),i[0]),_=i.index+f;for(r(t.substr(_)),n=m;n.parent;n=n.parent)n.cN&&(u+=h);return{r:b,value:u,language:e,top:m}}catch(e){if(e.message&&-1!==e.message.indexOf("Illegal"))return{r:0,value:x(t)};throw e}}function E(s,e){e=e||w.languages||o(g);var r={r:0,value:x(s)},n=r;return e.filter(C).filter(d).forEach(function(e){var t=y(e,s,!1);t.language=e,t.r>n.r&&(n=t),t.r>r.r&&(n=r,r=t)}),n.language&&(r.second_best=n),r}function k(e){return w.tabReplace||w.useBR?e.replace(s,function(e,t){return w.useBR&&"\n"===e?"
":w.tabReplace?t.replace(/\t/g,w.tabReplace):""}):e}function i(e){var t,s,r,n,a,i,c,o,d,p,l=function(e){var t,s,r,n,a=e.className+" ";if(a+=e.parentNode?e.parentNode.className:"",s=v.exec(a))return C(s[1])?s[1]:"no-highlight";for(t=0,r=(a=a.split(/\s+/)).length;t/g,"\n"):t=e,a=t.textContent,r=l?y(l,a,!0):E(a),(s=_(t)).length&&((n=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=r.value,r.value=function(e,t,s){var r=0,n="",a=[];function i(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset"}function o(e){n+=""}function d(e){("start"===e.event?c:o)(e.node)}for(;e.length||t.length;){var p=i();if(n+=x(s.substring(r,p[0].offset)),r=p[0].offset,p===e){for(a.reverse().forEach(o);d(p.splice(0,1)[0]),(p=i())===e&&p.length&&p[0].offset===r;);a.reverse().forEach(c)}else"start"===p[0].event?a.push(p[0].node):a.pop(),d(p.splice(0,1)[0])}return n+x(s.substr(r))}(s,_(n),a)),r.value=k(r.value),e.innerHTML=r.value,e.className=(i=e.className,c=l,o=r.language,d=c?u[c]:o,p=[i.trim()],i.match(/\bhljs\b/)||p.push("hljs"),-1===i.indexOf(d)&&p.push(d),p.join(" ").trim()),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function c(){if(!c.called){c.called=!0;var e=document.querySelectorAll("pre code");m.forEach.call(e,i)}}function C(e){return e=(e||"").toLowerCase(),g[e]||g[u[e]]}function d(e){var t=C(e);return t&&!t.disableAutodetect}return n.highlight=y,n.highlightAuto=E,n.fixMarkup=k,n.highlightBlock=i,n.configure=function(e){w=p(w,e)},n.initHighlighting=c,n.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",c,!1),addEventListener("load",c,!1)},n.registerLanguage=function(t,e){var s=g[t]=e(n);a(s),s.aliases&&s.aliases.forEach(function(e){u[e]=t})},n.listLanguages=function(){return o(g)},n.getLanguage=C,n.autoDetection=d,n.inherit=p,n.IR=n.IDENT_RE="[a-zA-Z]\\w*",n.UIR=n.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",n.NR=n.NUMBER_RE="\\b\\d+(\\.\\d+)?",n.CNR=n.C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",n.BNR=n.BINARY_NUMBER_RE="\\b(0b[01]+)",n.RSR=n.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",n.BE=n.BACKSLASH_ESCAPE={b:"\\\\[\\s\\S]",r:0},n.ASM=n.APOS_STRING_MODE={cN:"string",b:"'",e:"'",i:"\\n",c:[n.BE]},n.QSM=n.QUOTE_STRING_MODE={cN:"string",b:'"',e:'"',i:"\\n",c:[n.BE]},n.PWM=n.PHRASAL_WORDS_MODE={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},n.C=n.COMMENT=function(e,t,s){var r=n.inherit({cN:"comment",b:e,e:t,c:[]},s||{});return r.c.push(n.PWM),r.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),r},n.CLCM=n.C_LINE_COMMENT_MODE=n.C("//","$"),n.CBCM=n.C_BLOCK_COMMENT_MODE=n.C("/\\*","\\*/"),n.HCM=n.HASH_COMMENT_MODE=n.C("#","$"),n.NM=n.NUMBER_MODE={cN:"number",b:n.NR,r:0},n.CNM=n.C_NUMBER_MODE={cN:"number",b:n.CNR,r:0},n.BNM=n.BINARY_NUMBER_MODE={cN:"number",b:n.BNR,r:0},n.CSSNM=n.CSS_NUMBER_MODE={cN:"number",b:n.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},n.RM=n.REGEXP_MODE={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[n.BE,{b:/\[/,e:/\]/,r:0,c:[n.BE]}]},n.TM=n.TITLE_MODE={cN:"title",b:n.IR,r:0},n.UTM=n.UNDERSCORE_TITLE_MODE={cN:"title",b:n.UIR,r:0},n.METHOD_GUARD={b:"\\.\\s*"+n.UIR,r:0},n.registerLanguage("apache",function(e){var t={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:""},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",t]},t,e.QSM]}}],i:/\S/}}),n.registerLanguage("armasm",function(e){return{cI:!0,aliases:["arm"],l:"\\.?"+e.IR,k:{meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},c:[{cN:"keyword",b:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",e:"\\s"},e.C("[;@]","$",{r:0}),e.CBCM,e.QSM,{cN:"string",b:"'",e:"[^\\\\]'",r:0},{cN:"title",b:"\\|",e:"\\|",i:"\\n",r:0},{cN:"number",v:[{b:"[#$=]?0x[0-9a-f]+"},{b:"[#$=]?0b[01]+"},{b:"[#$=]\\d+"},{b:"\\b\\d+"}],r:0},{cN:"symbol",v:[{b:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{b:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{b:"[=#]\\w+"}],r:0}]}}),n.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]};return{aliases:["sh","zsh"],l:/\b-?[a-z\._]+\b/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,{cN:"string",b:/'/,e:/'/},t]}}),n.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super yield import export from as default await then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},s="[A-Za-z$_][0-9A-Za-z$_]*",r={cN:"subst",b:/#\{/,e:/}/,k:t},n=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,r]},{b:/"/,e:/"/,c:[e.BE,r]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[r,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+s},{sL:"javascript",eB:!0,eE:!0,v:[{b:"```",e:"```"},{b:"`",e:"`"}]}];r.c=n;var a=e.inherit(e.TM,{b:s}),i="(\\(.*\\))?\\s*\\B[-=]>",c={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(n)}]};return{aliases:["coffee","cson","iced"],k:t,i:/\/\*/,c:n.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+s+"\\s*=\\s*"+i,e:"[-=]>",rB:!0,c:[a,c]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:i,e:"[-=]>",rB:!0,c:[c]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[a]},a]},{b:s+":",e:":",rB:!0,rE:!0,r:0}])}}),n.registerLanguage("cpp",function(e){var t={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},s={cN:"string",v:[{b:'(u8?|U|L)?"',e:'"',i:"\\n",c:[e.BE]},{b:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\((?:.|\n)*?\)\1"/},{b:"'\\\\?.",e:"'",i:"."}]},r={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},n={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},e.inherit(s,{cN:"meta-string"}),{cN:"meta-string",b:/<[^\n>]*>/,e:/$/,i:"\\n"},e.CLCM,e.CBCM]},a=e.IR+"\\s*\\(",i={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},c=[t,e.CLCM,e.CBCM,r,s];return{aliases:["c","cc","h","c++","h++","hpp","hh","hxx","cxx"],k:i,i:"",k:i,c:["self",t]},{b:e.IR+"::",k:i},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:i,c:c.concat([{b:/\(/,e:/\)/,k:i,c:c.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+e.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:i,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:i,r:0,c:[e.CLCM,e.CBCM,s,r,t,{b:/\(/,e:/\)/,k:i,r:0,c:["self",e.CLCM,e.CBCM,s,r,t]}]},e.CLCM,e.CBCM,n]},{cN:"class",bK:"class struct",e:/[{;:]/,c:[{b://,c:["self"]},e.TM]}]),exports:{preprocessor:n,strings:s,k:i}}}),n.registerLanguage("cs",function(e){var t={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long nameof object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},s={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},r={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},n=e.inherit(r,{i:/\n/}),a={cN:"subst",b:"{",e:"}",k:t},i=e.inherit(a,{i:/\n/}),c={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,i]},o={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},a]},d=e.inherit(o,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},i]});a.c=[o,c,r,e.ASM,e.QSM,s,e.CBCM],i.c=[d,c,n,e.ASM,e.QSM,s,e.inherit(e.CBCM,{i:/\n/})];var p={v:[o,c,r,e.ASM,e.QSM]},l=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp","c#"],k:t,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:"\x3c!--|--\x3e"},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},p,s,{bK:"class interface",e:/[{;=]/,i:/[^\s:,]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{cN:"meta",b:"^\\s*\\[",eB:!0,e:"\\]",eE:!0,c:[{cN:"meta-string",b:/"/,e:/"/}]},{bK:"new return throw await else",r:0},{cN:"function",b:"("+l+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/\s*[{;=]/,eE:!0,k:t,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,r:0,c:[p,s,e.CBCM]},e.CLCM,e.CBCM]}]}}),n.registerLanguage("css",function(e){var t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:"[a-zA-Z-][a-zA-Z0-9_-]*",r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}}),n.registerLanguage("d",function(e){var t="(0|[1-9][\\d_]*)",s="("+t+"|0[bB][01_]+|0[xX]([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))",r="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",n={cN:"number",b:"\\b"+s+"(L|u|U|Lu|LU|uL|UL)?",r:0},a={cN:"number",b:"\\b(((0[xX](([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)\\.([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)|\\.?([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))[pP][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))|((0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(\\.\\d*|([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)))|\\d+\\.(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)|\\.(0|[1-9][\\d_]*)([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))?))([fF]|L|i|[fF]i|Li)?|"+s+"(i|[fF]i|Li))",r:0},i={cN:"string",b:"'("+r+"|.)",e:"'",i:"."},c={cN:"string",b:'"',c:[{b:r,r:0}],e:'"[cwd]?'},o=e.C("\\/\\+","\\+\\/",{c:["self"],r:10});return{l:e.UIR,k:{keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},c:[e.CLCM,e.CBCM,o,{cN:"string",b:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',r:10},c,{cN:"string",b:'[rq]"',e:'"[cwd]?',r:5},{cN:"string",b:"`",e:"`[cwd]?"},{cN:"string",b:'q"\\{',e:'\\}"'},a,n,i,{cN:"meta",b:"^#!",e:"$",r:5},{cN:"meta",b:"#(line)",e:"$",r:5},{cN:"keyword",b:"@[a-zA-Z_][a-zA-Z_\\d]*"}]}}),n.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}}),n.registerLanguage("go",function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:t,i:"`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},e.C("\x3c!--","--\x3e",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{cN:"meta",b:/<\?xml/,e:/\?>/,r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0},{b:'b"',e:'"',skip:!0},{b:"b'",e:"'",skip:!0},e.inherit(e.ASM,{i:null,cN:null,c:null,skip:!0}),e.inherit(e.QSM,{i:null,cN:null,c:null,skip:!0})]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[t],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[t],starts:{e:"<\/script>",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}}),n.registerLanguage("handlebars",function(e){var t={"builtin-name":"each in with if else unless bindattr action collection debugger log outlet template unbound view yield"};return{aliases:["hbs","html.hbs","html.handlebars"],cI:!0,sL:"xml",c:[e.C("{{!(--)?","(--)?}}"),{cN:"template-tag",b:/\{\{[#\/]/,e:/\}\}/,c:[{cN:"name",b:/[a-zA-Z\.-]+/,k:t,starts:{eW:!0,r:0,c:[e.QSM]}}]},{cN:"template-variable",b:/\{\{/,e:/\}\}/,k:t}]}}),n.registerLanguage("haskell",function(e){var t={v:[e.C("--","$"),e.C("{-","-}",{c:["self"]})]},s={cN:"meta",b:"{-#",e:"#-}"},r={cN:"meta",b:"^#",e:"$"},n={cN:"type",b:"\\b[A-Z][\\w']*",r:0},a={b:"\\(",e:"\\)",i:'"',c:[s,r,{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TM,{b:"[_a-z][\\w']*"}),t]};return{aliases:["hs"],k:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",c:[{bK:"module",e:"where",k:"module where",c:[a,t],i:"\\W\\.|;"},{b:"\\bimport\\b",e:"$",k:"import qualified as hiding",c:[a,t],i:"\\W\\.|;"},{cN:"class",b:"^(\\s*)?(class|instance)\\b",e:"where",k:"class family instance where",c:[n,a,t]},{cN:"class",b:"\\b(data|(new)?type)\\b",e:"$",k:"data family type newtype deriving",c:[s,n,a,{b:"{",e:"}",c:a.c},t]},{bK:"default",e:"$",c:[n,a,t]},{bK:"infix infixl infixr",e:"$",c:[e.CNM,t]},{b:"\\bforeign\\b",e:"$",k:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",c:[n,e.QSM,t]},{cN:"meta",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},s,r,e.QSM,e.CNM,n,e.inherit(e.TM,{b:"^[_a-z][\\w']*"}),t,{b:"->|<-"}]}}),n.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}}),n.registerLanguage("ini",function(e){var t={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_\.-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_\.-]+/},{b:/=/,eW:!0,r:0,c:[e.C(";","$"),e.HCM,{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},t,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}}),n.registerLanguage("java",function(e){var t="false synchronized int abstract float private char boolean var static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s={cN:"number",b:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",r:0};return{aliases:["jsp"],k:t,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"([À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(<[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*(\\s*,\\s*[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*)*>)?\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:t,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:t,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},s,{cN:"meta",b:"@[A-Za-z]+"}]}}),n.registerLanguage("javascript",function(e){var t="[A-Za-z$_][0-9A-Za-z$_]*",s={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},r={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:s,c:[]},a={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,a,r,e.RM];var i=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:s,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,a,e.CLCM,e.CBCM,r,{b:/[{,]\s*/,r:0,c:[{b:t+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:t,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+t+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:t},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:s,c:i}]}]},{cN:"",b:/\s/,e:/\s*/,skip:!0},{b://,sL:"xml",c:[{b:/<[A-Za-z0-9\\._:-]+\s*\/>/,skip:!0},{b:/<[A-Za-z0-9\\._:-]+/,e:/(\/[A-Za-z0-9\\._:-]+|[A-Za-z0-9\\._:-]+\/)>/,skip:!0,c:[{b:/<[A-Za-z0-9\\._:-]+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:t}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:i}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor get set",e:/\{/,eE:!0}],i:/#(?!!)/}}),n.registerLanguage("json",function(e){var t={literal:"true false null"},s=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:s,k:t},n={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},a={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return s.splice(s.length,0,n,a),{c:s,k:t,i:"\\S"}}),n.registerLanguage("julia",function(e){var t={keyword:"in isa where baremodule begin break catch ccall const continue do else elseif end export false finally for function global if import importall let local macro module quote return true try using while type immutable abstract bitstype typealias ",literal:"true false ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im nothing pi γ π φ ",built_in:"ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool "},s="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",r={l:s,k:t,i:/<\//},n={cN:"subst",b:/\$\(/,e:/\)/,k:t},a={cN:"variable",b:"\\$"+s},i={cN:"string",c:[e.BE,n,a],v:[{b:/\w*"""/,e:/"""\w*/,r:10},{b:/\w*"/,e:/"\w*/}]},c={cN:"string",c:[e.BE,n,a],b:"`",e:"`"},o={cN:"meta",b:"@"+s};return r.c=[{cN:"number",b:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,r:0},{cN:"string",b:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},i,c,o,{cN:"comment",v:[{b:"#=",e:"=#",r:10},{b:"#",e:"$"}]},e.HCM,{cN:"keyword",b:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{b:/<:/}],n.c=r.c,r}),n.registerLanguage("makefile",function(e){var t={cN:"variable",v:[{b:"\\$\\("+e.UIR+"\\)",c:[e.BE]},{b:/\$[@%",sL:"xml",r:0},{cN:"bullet",b:"^\\s*([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}|\t)",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}}),n.registerLanguage("nginx",function(e){var t={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},s={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,t],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[t]},{cN:"regexp",c:[e.BE,t],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},t]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:s}],r:0}],i:"[^\\s\\}]"}}),n.registerLanguage("objectivec",function(e){var t=/[a-zA-Z@][a-zA-Z0-9_]*/,s="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:{keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},l:t,i:""}]}]},{cN:"class",b:"("+s.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:s,l:t,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}}),n.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",s={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},r={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},a=[e.BE,s,n],i=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),r,{cN:"string",c:a,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return s.c=i,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:r.c=i}}),n.registerLanguage("php",function(e){var t={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},s={cN:"meta",b:/<\?(php)?|\?>/},r={cN:"string",c:[e.BE,s],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},n={v:[e.BNM,e.CNM]};return{aliases:["php","php3","php4","php5","php6","php7"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[s]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},s,{cN:"keyword",b:/\$this\b/},t,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",t,e.CBCM,r,n]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},r,n]}}),n.registerLanguage("properties",function(e){var t="[ \\t\\f]*",s="("+t+"[:=]"+t+"|[ \\t\\f]+)",r="([^\\\\\\W:= \\t\\f\\n]|\\\\.)+",n="([^\\\\:= \\t\\f\\n]|\\\\.)+",a={e:s,r:0,starts:{cN:"string",e:/$/,r:0,c:[{b:"\\\\\\n"}]}};return{cI:!0,i:/\S/,c:[e.C("^\\s*[!#]","$"),{b:r+s,rB:!0,c:[{cN:"attr",b:r,endsParent:!0,r:0}],starts:a},{b:n+s,rB:!0,r:0,c:[{cN:"meta",b:n,endsParent:!0,r:0}],starts:a},{cN:"attr",r:0,b:n+t+"$"}]}}),n.registerLanguage("python",function(e){var t={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10",built_in:"Ellipsis NotImplemented",literal:"False None True"},s={cN:"meta",b:/^(>>>|\.\.\.) /},r={cN:"subst",b:/\{/,e:/\}/,k:t,i:/#/},n={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[e.BE,s],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[e.BE,s],r:10},{b:/(fr|rf|f)'''/,e:/'''/,c:[e.BE,s,r]},{b:/(fr|rf|f)"""/,e:/"""/,c:[e.BE,s,r]},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},{b:/(fr|rf|f)'/,e:/'/,c:[e.BE,r]},{b:/(fr|rf|f)"/,e:/"/,c:[e.BE,r]},e.ASM,e.QSM]},a={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},i={cN:"params",b:/\(/,e:/\)/,c:["self",s,a,n]};return r.c=[n,a,s],{aliases:["py","gyp","ipython"],k:t,i:/(<\/|->|\?)|=>/,c:[s,a,n,e.HCM,{v:[{cN:"function",bK:"def"},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,i,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}}),n.registerLanguage("ruby",function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",s={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},r={cN:"doctag",b:"@[A-Za-z]+"},n={b:"#<",e:">"},a=[e.C("#","$",{c:[r]}),e.C("^\\=begin","^\\=end",{c:[r],r:10}),e.C("^__END__","\\n$")],i={cN:"subst",b:"#\\{",e:"}",k:s},c={cN:"string",c:[e.BE,i],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},o={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:s},d=[c,n,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(a)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:t}),o].concat(a)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[c,{b:t}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:s},{b:"("+e.RSR+"|unless)\\s*",k:"unless",c:[n,{cN:"regexp",c:[e.BE,i],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(a),r:0}].concat(a);i.c=d;var p=[{b:/^\s*=>/,starts:{e:"$",c:o.c=d}},{cN:"meta",b:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:s,i:/\/\*/,c:a.concat(p).concat(d)}}),n.registerLanguage("rust",function(e){var t="([ui](8|16|32|64|128|size)|f(32|64))?",s="drop i8 i16 i32 i64 i128 isize u8 u16 u32 u64 u128 usize f32 f64 str char bool Box Option Result String Vec Copy Send Sized Sync Drop Fn FnMut FnOnce ToOwned Clone Debug PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator SliceConcatExt ToString assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln! macro_rules! assert_ne! debug_assert_ne!";return{aliases:["rs"],k:{keyword:"alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self Self sizeof static struct super trait true type typeof unsafe unsized use virtual while where yield move default",literal:"true false Some None Ok Err",built_in:s},l:e.IR+"!?",i:""}]}}),n.registerLanguage("scala",function(e){var t={cN:"subst",v:[{b:"\\$[A-Za-z0-9_]+"},{b:"\\${",e:"}"}]},s={cN:"string",v:[{b:'"',e:'"',i:"\\n",c:[e.BE]},{b:'"""',e:'"""',r:10},{b:'[a-z]+"',e:'"',i:"\\n",c:[e.BE,t]},{cN:"string",b:'[a-z]+"""',e:'"""',c:[t],r:10}]},r={cN:"type",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},n={cN:"title",b:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,r:0},a={cN:"class",bK:"class object trait type",e:/[:={\[\n;]/,eE:!0,c:[{bK:"extends with",r:10},{b:/\[/,e:/\]/,eB:!0,eE:!0,r:0,c:[r]},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,r:0,c:[r]},n]},i={cN:"function",bK:"def",e:/[:={\[(\n;]/,eE:!0,c:[n]};return{k:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},c:[e.CLCM,e.CBCM,s,{cN:"symbol",b:"'\\w[\\w\\d_]*(?!')"},r,i,a,e.CNM,{cN:"meta",b:"@[A-Za-z]+"}]}}),n.registerLanguage("shell",function(e){return{aliases:["console"],c:[{cN:"meta",b:"^\\s{0,3}[\\w\\d\\[\\]()@-]*[>%$#]",starts:{e:"$",sL:"bash"}}]}}),n.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment values with",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"as abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias all allocate allow alter always analyze ancillary and anti any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound bucket buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain explode export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force foreign form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour hours http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lateral lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minutes minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notnull notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second seconds section securefile security seed segment select self semi sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tablesample tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unnest unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace window with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null unknown",built_in:"array bigint binary bit blob bool boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text time timestamp tinyint varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t,e.HCM]},e.CBCM,t,e.HCM]}}),n.registerLanguage("swift",function(e){var t={keyword:"#available #colorLiteral #column #else #elseif #endif #file #fileLiteral #function #if #imageLiteral #line #selector #sourceLocation _ __COLUMN__ __FILE__ __FUNCTION__ __LINE__ Any as as! as? associatedtype associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},s=e.C("/\\*","\\*/",{c:["self"]}),r={cN:"subst",b:/\\\(/,e:"\\)",k:t,c:[]},n={cN:"string",c:[e.BE,r],v:[{b:/"""/,e:/"""/},{b:/"/,e:/"/}]},a={cN:"number",b:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",r:0};return r.c=[a],{k:t,c:[n,e.CLCM,s,{cN:"type",b:"\\b[A-Z][\\wÀ-ʸ']*[!?]"},{cN:"type",b:"\\b[A-Z][\\wÀ-ʸ']*",r:0},a,{cN:"function",bK:"func",e:"{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{b://},{cN:"params",b:/\(/,e:/\)/,endsParent:!0,k:t,c:["self",a,n,e.CBCM,{b:":"}],i:/["']/}],i:/\[|%/},{cN:"class",bK:"struct protocol class extension enum",k:t,e:"\\{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{cN:"meta",b:"(@discardableResult|@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@objcMembers|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{bK:"import",e:/$/,c:[e.CLCM,s]}]}}),n.registerLanguage("x86asm",function(e){return{cI:!0,l:"[.%]?"+e.IR,k:{keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0 xmm1 xmm2 xmm3 xmm4 xmm5 xmm6 xmm7 xmm8 xmm9 xmm10 xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0 ymm1 ymm2 ymm3 ymm4 ymm5 ymm6 ymm7 ymm8 ymm9 ymm10 ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0 zmm1 zmm2 zmm3 zmm4 zmm5 zmm6 zmm7 zmm8 zmm9 zmm10 zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__ __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__ __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},c:[e.C(";","$",{r:0}),{cN:"number",v:[{b:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",r:0},{b:"\\$[0-9][0-9A-Fa-f]*",r:0},{b:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{b:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},e.QSM,{cN:"string",v:[{b:"'",e:"[^\\\\]'"},{b:"`",e:"[^\\\\]`"}],r:0},{cN:"symbol",v:[{b:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{b:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],r:0},{cN:"subst",b:"%[0-9]+",r:0},{cN:"subst",b:"%!S+",r:0},{cN:"meta",b:/^\s*\.[\w_-]+/}]}}),n.registerLanguage("yaml",function(e){var t="true false yes no null",s="^[ \\-]*",r="[a-zA-Z_][\\w\\-]*",n={cN:"attr",v:[{b:s+r+":"},{b:s+'"'+r+'":'},{b:s+"'"+r+"':"}]},a={cN:"string",r:0,v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/\S+/}],c:[e.BE,{cN:"template-variable",v:[{b:"{{",e:"}}"},{b:"%{",e:"}"}]}]};return{cI:!0,aliases:["yml","YAML","yaml"],c:[n,{cN:"meta",b:"^---s*$",r:10},{cN:"string",b:"[\\|>] *$",rE:!0,c:a.c,e:n.v[0].b},{b:"<%[%=-]?",e:"[%-]?%>",sL:"ruby",eB:!0,eE:!0,r:0},{cN:"type",b:"!"+e.UIR},{cN:"type",b:"!!"+e.UIR},{cN:"meta",b:"&"+e.UIR+"$"},{cN:"meta",b:"\\*"+e.UIR+"$"},{cN:"bullet",b:"^ *-",r:0},e.HCM,{bK:t,k:{literal:t}},e.CNM,a]}}),n}); \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 000000000000..1ba7ff1b535f --- /dev/null +++ b/index.html @@ -0,0 +1,194 @@ + + + + + + Introduction - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Introduction

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/introduction.html b/introduction.html new file mode 100644 index 000000000000..f7480470b4f8 --- /dev/null +++ b/introduction.html @@ -0,0 +1,202 @@ + + + + + + Introduction - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Introduction

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lang-bash.html b/lang-bash.html new file mode 100644 index 000000000000..ae4a73827185 --- /dev/null +++ b/lang-bash.html @@ -0,0 +1,210 @@ + + + + + + Bash - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Using WebAssembly from Bash

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lang-dotnet.html b/lang-dotnet.html new file mode 100644 index 000000000000..d5073ca18c92 --- /dev/null +++ b/lang-dotnet.html @@ -0,0 +1,210 @@ + + + + + + .NET - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Using WebAssembly from .NET

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lang-python.html b/lang-python.html new file mode 100644 index 000000000000..dbce554f9a4f --- /dev/null +++ b/lang-python.html @@ -0,0 +1,210 @@ + + + + + + Python - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Using WebAssembly from Python

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lang-rust.html b/lang-rust.html new file mode 100644 index 000000000000..fc249a4a6bd1 --- /dev/null +++ b/lang-rust.html @@ -0,0 +1,210 @@ + + + + + + Rust - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Using WebAssembly from Rust

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/lang.html b/lang.html new file mode 100644 index 000000000000..937d9df655e9 --- /dev/null +++ b/lang.html @@ -0,0 +1,210 @@ + + + + + + Using WebAssembly from your lanugage - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Using WebAssembly from your Language

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mark.min.js b/mark.min.js new file mode 100644 index 000000000000..163623188347 --- /dev/null +++ b/mark.min.js @@ -0,0 +1,7 @@ +/*!*************************************************** +* mark.js v8.11.1 +* https://markjs.io/ +* Copyright (c) 2014–2018, Julian Kühnel +* Released under the MIT license https://git.io/vwTVl +*****************************************************/ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.Mark=t()}(this,function(){"use strict";var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:5e3;t(this,e),this.ctx=n,this.iframes=r,this.exclude=i,this.iframesTimeout=o}return n(e,[{key:"getContexts",value:function(){var e=[];return(void 0!==this.ctx&&this.ctx?NodeList.prototype.isPrototypeOf(this.ctx)?Array.prototype.slice.call(this.ctx):Array.isArray(this.ctx)?this.ctx:"string"==typeof this.ctx?Array.prototype.slice.call(document.querySelectorAll(this.ctx)):[this.ctx]:[]).forEach(function(t){var n=e.filter(function(e){return e.contains(t)}).length>0;-1!==e.indexOf(t)||n||e.push(t)}),e}},{key:"getIframeContents",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},r=void 0;try{var i=e.contentWindow;if(r=i.document,!i||!r)throw new Error("iframe inaccessible")}catch(e){n()}r&&t(r)}},{key:"isIframeBlank",value:function(e){var t="about:blank",n=e.getAttribute("src").trim();return e.contentWindow.location.href===t&&n!==t&&n}},{key:"observeIframeLoad",value:function(e,t,n){var r=this,i=!1,o=null,a=function a(){if(!i){i=!0,clearTimeout(o);try{r.isIframeBlank(e)||(e.removeEventListener("load",a),r.getIframeContents(e,t,n))}catch(e){n()}}};e.addEventListener("load",a),o=setTimeout(a,this.iframesTimeout)}},{key:"onIframeReady",value:function(e,t,n){try{"complete"===e.contentWindow.document.readyState?this.isIframeBlank(e)?this.observeIframeLoad(e,t,n):this.getIframeContents(e,t,n):this.observeIframeLoad(e,t,n)}catch(e){n()}}},{key:"waitForIframes",value:function(e,t){var n=this,r=0;this.forEachIframe(e,function(){return!0},function(e){r++,n.waitForIframes(e.querySelector("html"),function(){--r||t()})},function(e){e||t()})}},{key:"forEachIframe",value:function(t,n,r){var i=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},a=t.querySelectorAll("iframe"),s=a.length,c=0;a=Array.prototype.slice.call(a);var u=function(){--s<=0&&o(c)};s||u(),a.forEach(function(t){e.matches(t,i.exclude)?u():i.onIframeReady(t,function(e){n(t)&&(c++,r(e)),u()},u)})}},{key:"createIterator",value:function(e,t,n){return document.createNodeIterator(e,t,n,!1)}},{key:"createInstanceOnIframe",value:function(t){return new e(t.querySelector("html"),this.iframes)}},{key:"compareNodeIframe",value:function(e,t,n){if(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING){if(null===t)return!0;if(t.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_FOLLOWING)return!0}return!1}},{key:"getIteratorNode",value:function(e){var t=e.previousNode();return{prevNode:t,node:null===t?e.nextNode():e.nextNode()&&e.nextNode()}}},{key:"checkIframeFilter",value:function(e,t,n,r){var i=!1,o=!1;return r.forEach(function(e,t){e.val===n&&(i=t,o=e.handled)}),this.compareNodeIframe(e,t,n)?(!1!==i||o?!1===i||o||(r[i].handled=!0):r.push({val:n,handled:!0}),!0):(!1===i&&r.push({val:n,handled:!1}),!1)}},{key:"handleOpenIframes",value:function(e,t,n,r){var i=this;e.forEach(function(e){e.handled||i.getIframeContents(e.val,function(e){i.createInstanceOnIframe(e).forEachNode(t,n,r)})})}},{key:"iterateThroughNodes",value:function(e,t,n,r,i){for(var o,a=this,s=this.createIterator(t,e,r),c=[],u=[],l=void 0,h=void 0;void 0,o=a.getIteratorNode(s),h=o.prevNode,l=o.node;)this.iframes&&this.forEachIframe(t,function(e){return a.checkIframeFilter(l,h,e,c)},function(t){a.createInstanceOnIframe(t).forEachNode(e,function(e){return u.push(e)},r)}),u.push(l);u.forEach(function(e){n(e)}),this.iframes&&this.handleOpenIframes(c,e,n,r),i()}},{key:"forEachNode",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:function(){},o=this.getContexts(),a=o.length;a||i(),o.forEach(function(o){var s=function(){r.iterateThroughNodes(e,o,t,n,function(){--a<=0&&i()})};r.iframes?r.waitForIframes(o,s):s()})}}],[{key:"matches",value:function(e,t){var n="string"==typeof t?[t]:t,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector;if(r){var i=!1;return n.every(function(t){return!r.call(e,t)||(i=!0,!1)}),i}return!1}}]),e}(),o=function(){function e(n){t(this,e),this.opt=r({},{diacritics:!0,synonyms:{},accuracy:"partially",caseSensitive:!1,ignoreJoiners:!1,ignorePunctuation:[],wildcards:"disabled"},n)}return n(e,[{key:"create",value:function(e){return"disabled"!==this.opt.wildcards&&(e=this.setupWildcardsRegExp(e)),e=this.escapeStr(e),Object.keys(this.opt.synonyms).length&&(e=this.createSynonymsRegExp(e)),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),this.opt.diacritics&&(e=this.createDiacriticsRegExp(e)),e=this.createMergedBlanksRegExp(e),(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.createJoinersRegExp(e)),"disabled"!==this.opt.wildcards&&(e=this.createWildcardsRegExp(e)),e=this.createAccuracyRegExp(e),new RegExp(e,"gm"+(this.opt.caseSensitive?"":"i"))}},{key:"escapeStr",value:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}},{key:"createSynonymsRegExp",value:function(e){var t=this.opt.synonyms,n=this.opt.caseSensitive?"":"i",r=this.opt.ignoreJoiners||this.opt.ignorePunctuation.length?"\0":"";for(var i in t)if(t.hasOwnProperty(i)){var o=t[i],a="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(i):this.escapeStr(i),s="disabled"!==this.opt.wildcards?this.setupWildcardsRegExp(o):this.escapeStr(o);""!==a&&""!==s&&(e=e.replace(new RegExp("("+this.escapeStr(a)+"|"+this.escapeStr(s)+")","gm"+n),r+"("+this.processSynonyms(a)+"|"+this.processSynonyms(s)+")"+r))}return e}},{key:"processSynonyms",value:function(e){return(this.opt.ignoreJoiners||this.opt.ignorePunctuation.length)&&(e=this.setupIgnoreJoinersRegExp(e)),e}},{key:"setupWildcardsRegExp",value:function(e){return(e=e.replace(/(?:\\)*\?/g,function(e){return"\\"===e.charAt(0)?"?":""})).replace(/(?:\\)*\*/g,function(e){return"\\"===e.charAt(0)?"*":""})}},{key:"createWildcardsRegExp",value:function(e){var t="withSpaces"===this.opt.wildcards;return e.replace(/\u0001/g,t?"[\\S\\s]?":"\\S?").replace(/\u0002/g,t?"[\\S\\s]*?":"\\S*")}},{key:"setupIgnoreJoinersRegExp",value:function(e){return e.replace(/[^(|)\\]/g,function(e,t,n){var r=n.charAt(t+1);return/[(|)\\]/.test(r)||""===r?e:e+"\0"})}},{key:"createJoinersRegExp",value:function(e){var t=[],n=this.opt.ignorePunctuation;return Array.isArray(n)&&n.length&&t.push(this.escapeStr(n.join(""))),this.opt.ignoreJoiners&&t.push("\\u00ad\\u200b\\u200c\\u200d"),t.length?e.split(/\u0000+/).join("["+t.join("")+"]*"):e}},{key:"createDiacriticsRegExp",value:function(e){var t=this.opt.caseSensitive?"":"i",n=this.opt.caseSensitive?["aàáảãạăằắẳẵặâầấẩẫậäåāą","AÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćč","CÇĆČ","dđď","DĐĎ","eèéẻẽẹêềếểễệëěēę","EÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïī","IÌÍỈĨỊÎÏĪ","lł","LŁ","nñňń","NÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøō","OÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rř","RŘ","sšśșş","SŠŚȘŞ","tťțţ","TŤȚŢ","uùúủũụưừứửữựûüůū","UÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿ","YÝỲỶỸỴŸ","zžżź","ZŽŻŹ"]:["aàáảãạăằắẳẵặâầấẩẫậäåāąAÀÁẢÃẠĂẰẮẲẴẶÂẦẤẨẪẬÄÅĀĄ","cçćčCÇĆČ","dđďDĐĎ","eèéẻẽẹêềếểễệëěēęEÈÉẺẼẸÊỀẾỂỄỆËĚĒĘ","iìíỉĩịîïīIÌÍỈĨỊÎÏĪ","lłLŁ","nñňńNÑŇŃ","oòóỏõọôồốổỗộơởỡớờợöøōOÒÓỎÕỌÔỒỐỔỖỘƠỞỠỚỜỢÖØŌ","rřRŘ","sšśșşSŠŚȘŞ","tťțţTŤȚŢ","uùúủũụưừứửữựûüůūUÙÚỦŨỤƯỪỨỬỮỰÛÜŮŪ","yýỳỷỹỵÿYÝỲỶỸỴŸ","zžżźZŽŻŹ"],r=[];return e.split("").forEach(function(i){n.every(function(n){if(-1!==n.indexOf(i)){if(r.indexOf(n)>-1)return!1;e=e.replace(new RegExp("["+n+"]","gm"+t),"["+n+"]"),r.push(n)}return!0})}),e}},{key:"createMergedBlanksRegExp",value:function(e){return e.replace(/[\s]+/gim,"[\\s]+")}},{key:"createAccuracyRegExp",value:function(e){var t=this,n=this.opt.accuracy,r="string"==typeof n?n:n.value,i="";switch(("string"==typeof n?[]:n.limiters).forEach(function(e){i+="|"+t.escapeStr(e)}),r){case"partially":default:return"()("+e+")";case"complementary":return"()([^"+(i="\\s"+(i||this.escapeStr("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~¡¿")))+"]*"+e+"[^"+i+"]*)";case"exactly":return"(^|\\s"+i+")("+e+")(?=$|\\s"+i+")"}}}]),e}(),a=function(){function a(e){t(this,a),this.ctx=e,this.ie=!1;var n=window.navigator.userAgent;(n.indexOf("MSIE")>-1||n.indexOf("Trident")>-1)&&(this.ie=!0)}return n(a,[{key:"log",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"debug",r=this.opt.log;this.opt.debug&&"object"===(void 0===r?"undefined":e(r))&&"function"==typeof r[n]&&r[n]("mark.js: "+t)}},{key:"getSeparatedKeywords",value:function(e){var t=this,n=[];return e.forEach(function(e){t.opt.separateWordSearch?e.split(" ").forEach(function(e){e.trim()&&-1===n.indexOf(e)&&n.push(e)}):e.trim()&&-1===n.indexOf(e)&&n.push(e)}),{keywords:n.sort(function(e,t){return t.length-e.length}),length:n.length}}},{key:"isNumeric",value:function(e){return Number(parseFloat(e))==e}},{key:"checkRanges",value:function(e){var t=this;if(!Array.isArray(e)||"[object Object]"!==Object.prototype.toString.call(e[0]))return this.log("markRanges() will only accept an array of objects"),this.opt.noMatch(e),[];var n=[],r=0;return e.sort(function(e,t){return e.start-t.start}).forEach(function(e){var i=t.callNoMatchOnInvalidRanges(e,r),o=i.start,a=i.end;i.valid&&(e.start=o,e.length=a-o,n.push(e),r=a)}),n}},{key:"callNoMatchOnInvalidRanges",value:function(e,t){var n=void 0,r=void 0,i=!1;return e&&void 0!==e.start?(r=(n=parseInt(e.start,10))+parseInt(e.length,10),this.isNumeric(e.start)&&this.isNumeric(e.length)&&r-t>0&&r-n>0?i=!0:(this.log("Ignoring invalid or overlapping range: "+JSON.stringify(e)),this.opt.noMatch(e))):(this.log("Ignoring invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:n,end:r,valid:i}}},{key:"checkWhitespaceRanges",value:function(e,t,n){var r=void 0,i=!0,o=n.length,a=t-o,s=parseInt(e.start,10)-a;return(r=(s=s>o?o:s)+parseInt(e.length,10))>o&&(r=o,this.log("End range automatically set to the max value of "+o)),s<0||r-s<0||s>o||r>o?(i=!1,this.log("Invalid range: "+JSON.stringify(e)),this.opt.noMatch(e)):""===n.substring(s,r).replace(/\s+/g,"")&&(i=!1,this.log("Skipping whitespace only range: "+JSON.stringify(e)),this.opt.noMatch(e)),{start:s,end:r,valid:i}}},{key:"getTextNodes",value:function(e){var t=this,n="",r=[];this.iterator.forEachNode(NodeFilter.SHOW_TEXT,function(e){r.push({start:n.length,end:(n+=e.textContent).length,node:e})},function(e){return t.matchesExclude(e.parentNode)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT},function(){e({value:n,nodes:r})})}},{key:"matchesExclude",value:function(e){return i.matches(e,this.opt.exclude.concat(["script","style","title","head","html"]))}},{key:"wrapRangeInTextNode",value:function(e,t,n){var r=this.opt.element?this.opt.element:"mark",i=e.splitText(t),o=i.splitText(n-t),a=document.createElement(r);return a.setAttribute("data-markjs","true"),this.opt.className&&a.setAttribute("class",this.opt.className),a.textContent=i.textContent,i.parentNode.replaceChild(a,i),o}},{key:"wrapRangeInMappedTextNode",value:function(e,t,n,r,i){var o=this;e.nodes.every(function(a,s){var c=e.nodes[s+1];if(void 0===c||c.start>t){if(!r(a.node))return!1;var u=t-a.start,l=(n>a.end?a.end:n)-a.start,h=e.value.substr(0,a.start),f=e.value.substr(l+a.start);if(a.node=o.wrapRangeInTextNode(a.node,u,l),e.value=h+f,e.nodes.forEach(function(t,n){n>=s&&(e.nodes[n].start>0&&n!==s&&(e.nodes[n].start-=l),e.nodes[n].end-=l)}),n-=l,i(a.node.previousSibling,a.start),!(n>a.end))return!1;t=a.end}return!0})}},{key:"wrapGroups",value:function(e,t,n,r){return r((e=this.wrapRangeInTextNode(e,t,t+n)).previousSibling),e}},{key:"separateGroups",value:function(e,t,n,r,i){for(var o=t.length,a=1;a-1&&r(t[a],e)&&(e=this.wrapGroups(e,s,t[a].length,i))}return e}},{key:"wrapMatches",value:function(e,t,n,r,i){var o=this,a=0===t?0:t+1;this.getTextNodes(function(t){t.nodes.forEach(function(t){t=t.node;for(var i=void 0;null!==(i=e.exec(t.textContent))&&""!==i[a];){if(o.opt.separateGroups)t=o.separateGroups(t,i,a,n,r);else{if(!n(i[a],t))continue;var s=i.index;if(0!==a)for(var c=1;c + + + + + Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Introduction

+

... more coming soon

+

Tutorial

+

... more coming soon

+

Creating hello-world.wasm

+

... more coming soon

+

Running hello-world.wasm with Wasmtime

+

... more coming soon

+

Examples

+

This is an explanation of all examples to come

+

... more coming soon

+

Markdown Parser

+

... more coming soon

+

Using WebAssembly from your Language

+

... more coming soon

+

Using WebAssembly from Python

+

... more coming soon

+

Using WebAssembly from .NET

+

... more coming soon

+

Using WebAssembly from Rust

+

... more coming soon

+

Using WebAssembly from Bash

+

... more coming soon

+

Using the wasmtime CLI

+

... more coming soon

+

Installing wasmtime

+

... more coming soon

+

CLI Options for wasmtime

+

... more coming soon

+

Cache Configuration of wasmtime

+

The configuration file uses the toml format. +You can create a configuration file at the default location with:

+
$ wasmtime config new
+
+

It will print the location regardless of the success. +Please refer to the --help message for using a custom location.

+

All settings, except enabled, are optional. +If the setting is not specified, the default value is used. +Thus, if you don't know what values to use, don't specify them. +The default values might be tuned in the future.

+

Wasmtime assumes all the options are in the cache section.

+

Example config:

+
[cache]
+enabled = true
+directory = "/nfs-share/wasmtime-cache/"
+cleanup-interval = "30m"
+files-total-size-soft-limit = "1Gi"
+
+

Please refer to the cache system section to learn how it works.

+

If you think some default value should be tuned, some new settings +should be introduced or some behavior should be changed, you are +welcome to discuss it and contribute to the Wasmtime repository.

+

Setting enabled

+
    +
  • type: boolean
  • +
  • format: true | false
  • +
  • default: true
  • +
+

Specifies whether the cache system is used or not.

+

This field is mandatory. +The default value is used when configuration file is not specified +and none exists at the default location.

+

Setting directory

+
    +
  • type: string (path)
  • +
  • default: look up cache_dir in directories crate
  • +
+

Specifies where the cache directory is. Must be an absolute path.

+

Setting worker-event-queue-size

+
    +
  • type: string (SI prefix)
  • +
  • format: "{integer}(K | M | G | T | P)?"
  • +
  • default: "16"
  • +
+

Size of cache worker event queue. +If the queue is full, incoming cache usage events will be dropped.

+

Setting baseline-compression-level

+
    +
  • type: integer
  • +
  • default: 3, the default zstd compression level
  • +
+

Compression level used when a new cache file is being written by the cache system. +Wasmtime uses zstd compression.

+

Setting optimized-compression-level

+
    +
  • type: integer
  • +
  • default: 20
  • +
+

Compression level used when the cache worker decides to recompress a cache file. +Wasmtime uses zstd compression.

+

Setting optimized-compression-usage-counter-threshold

+
    +
  • type: string (SI prefix)
  • +
  • format: "{integer}(K | M | G | T | P)?"
  • +
  • default: "256"
  • +
+

One of the conditions for the cache worker to recompress a cache file +is to have usage count of the file exceeding this threshold.

+

Setting cleanup-interval

+
    +
  • type: string (duration)
  • +
  • format: "{integer}(s | m | h | d)"
  • +
  • default: "1h"
  • +
+

When the cache worker is notified about a cache file being updated by the cache system +and this interval has already passed since last cleaning up, +the worker will attempt a new cleanup.

+

Please also refer to allowed-clock-drift-for-files-from-future.

+

Setting optimizing-compression-task-timeout

+
    +
  • type: string (duration)
  • +
  • format: "{integer}(s | m | h | d)"
  • +
  • default: "30m"
  • +
+

When the cache worker decides to recompress a cache file, it makes sure that +no other worker has started the task for this file within the last +optimizing-compression-task-timeout interval. +If some worker has started working on it, other workers are skipping this task.

+

Please also refer to the allowed-clock-drift-for-files-from-future section.

+

Setting allowed-clock-drift-for-files-from-future

+
    +
  • type: string (duration)
  • +
  • format: "{integer}(s | m | h | d)"
  • +
  • default: "1d"
  • +
+

Locks

+

When the cache worker attempts acquiring a lock for some task, +it checks if some other worker has already acquired such a lock. +To be fault tolerant and eventually execute every task, +the locks expire after some interval. +However, because of clock drifts and different timezones, +it would happen that some lock was created in the future. +This setting defines a tolerance limit for these locks. +If the time has been changed in the system (i.e. two years backwards), +the cache system should still work properly. +Thus, these locks will be treated as expired +(assuming the tolerance is not too big).

+

Cache files

+

Similarly to the locks, the cache files or their metadata might +have modification time in distant future. +The cache system tries to keep these files as long as possible. +If the limits are not reached, the cache files will not be deleted. +Otherwise, they will be treated as the oldest files, so they might survive. +If the user actually uses the cache file, the modification time will be updated.

+

Setting file-count-soft-limit

+
    +
  • type: string (SI prefix)
  • +
  • format: "{integer}(K | M | G | T | P)?"
  • +
  • default: "65536"
  • +
+

Soft limit for the file count in the cache directory.

+

This doesn't include files with metadata. +To learn more, please refer to the cache system section.

+

Setting files-total-size-soft-limit

+
    +
  • type: string (disk space)
  • +
  • format: "{integer}(K | Ki | M | Mi | G | Gi | T | Ti | P | Pi)?"
  • +
  • default: "512Mi"
  • +
+

Soft limit for the total size* of files in the cache directory.

+

This doesn't include files with metadata. +To learn more, please refer to the cache system section.

+

*this is the file size, not the space physically occupied on the disk.

+

Setting file-count-limit-percent-if-deleting

+
    +
  • type: string (percent)
  • +
  • format: "{integer}%"
  • +
  • default: "70%"
  • +
+

If file-count-soft-limit is exceeded and the cache worker performs the cleanup task, +then the worker will delete some cache files, so after the task, +the file count should not exceed +file-count-soft-limit * file-count-limit-percent-if-deleting.

+

This doesn't include files with metadata. +To learn more, please refer to the cache system section.

+

Setting files-total-size-limit-percent-if-deleting

+
    +
  • type: string (percent)
  • +
  • format: "{integer}%"
  • +
  • default: "70%"
  • +
+

If files-total-size-soft-limit is exceeded and cache worker performs the cleanup task, +then the worker will delete some cache files, so after the task, +the files total size should not exceed +files-total-size-soft-limit * files-total-size-limit-percent-if-deleting.

+

This doesn't include files with metadata. +To learn more, please refer to the cache system section.

+

How does the cache work?

+

This is an implementation detail and might change in the future. +Information provided here is meant to help understanding the big picture +and configuring the cache.

+

There are two main components - the cache system and the cache worker.

+

Cache system

+

Handles GET and UPDATE cache requests.

+
    +
  • GET request - simply loads the cache from disk if it is there.
  • +
  • UPDATE request - compresses received data with zstd and baseline-compression-level, then writes the data to the disk.
  • +
+

In case of successful handling of a request, it notifies the cache worker about this +event using the queue. +The queue has a limited size of worker-event-queue-size. If it is full, it will drop +new events until the cache worker pops some event from the queue.

+

Cache worker

+

The cache worker runs in a single thread with lower priority and pops events from the queue +in a loop handling them one by one.

+

On GET request

+
    +
  1. +

    Read the statistics file for the cache file, +increase the usage counter and write it back to the disk.

    +
  2. +
  3. +

    Attempt recompressing the cache file if all of the following conditions are met:

    + +

    When recompressing, optimized-compression-level is used as a compression level.

    +
  4. +
+

On UPDATE request

+
    +
  1. Write a fresh statistics file for the cache file.
  2. +
  3. Clean up the cache if no worker has attempted to do this within the last cleanup-interval. +During this task: + +
  4. +
+

Metadata files

+
    +
  • every cached WebAssembly module has its own statistics file
  • +
  • every lock is a file
  • +
+

Writing WebAssembly

+

Rust

+

The Rust Programming Language supports WebAssembly +as a compilation target. If you're not familiar with Rust it's recommended to +start with its introductory documentation. +Compiling to WebAssembly will involve specifying the desired target via the +--target flag, and to do this there are a number of "target triples" for +WebAssembly compilation in Rust:

+
    +
  • wasm32-wasi - when using wasmtime this is likely what you'll be using. The +WASI target is integrated into the standard library and is intended on +producing standalone binaries.
  • +
  • wasm32-unknown-unknown - this target, like the WASI one, is focused on +producing single *.wasm binaries. The standard library, however, is largely +stubbed out since the "unknown" part of the target means libstd can't assume +anything. This means that while binaries will likely work in wasmtime, +common conveniences like println! or panic! won't work.
  • +
  • wasm32-unknown-emscripten - this target is intended to work in a web browser +and produces a *.wasm file coupled with a *.js file, and it is not +compatible with wasmtime.
  • +
+

For the rest of this documentation we'll assume that you're using the +wasm32-wasi target for compiling Rust code and executing inside of wasmtime.

+

Hello, World!

+

Cross-compiling to WebAssembly involves a number of knobs that need +configuration, but you can often gloss over these internal details by using +build tooling intended for the WASI target. For example we can start out writing +a WebAssembly binary with cargo wasi.

+

First up we'll install cargo wasi:

+
$ cargo install cargo-wasi
+
+

Next we'll make a new Cargo project:

+
$ cargo new hello-world
+$ cd hello-world
+
+

Inside of src/main.rs you'll see the canonical Rust "Hello, World!" using +println!. We'll be executing this for the wasm32-wasi target, so you'll want +to make sure you're previously built wasmtime and inserted it into +PATH;

+
$ cargo wasi run
+info: downloading component 'rust-std' for 'wasm32-wasi'
+info: installing component 'rust-std' for 'wasm32-wasi'
+   Compiling hello-world v0.1.0 (/hello-world)
+    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
+     Running `/.cargo/bin/cargo-wasi target/wasm32-wasi/debug/hello-world.wasm`
+     Running `target/wasm32-wasi/debug/hello-world.wasm`
+Hello, world!
+
+

And we're already running our first WebAssembly code inside of wasmtime!

+

While it's automatically happening for you as part of cargo wasi, you can also +run wasmtime yourself:

+
$ wasmtime target/wasm32-wasi/debug/hello-world.wasm
+Hello, world!
+
+

You can check out the introductory documentation of +cargo-wasi as +well for some more information.

+

Writing Libraries

+

Previously for "Hello, World!" we created a binary project which used +src/main.rs. Not all *.wasm binaries are intended to be executed like +commands, though. Some are intended to be loaded into applications and called +through various APIs, acting more like libraries. For this use case you'll want +to add this to Cargo.toml:

+
# in Cargo.toml ...
+
+[lib]
+crate-type = ['cdylib']
+
+

and afterwards you'll want to write your code in src/lib.rs like so:

+

+# #![allow(unused_variables)]
+#fn main() {
+#[no_mangle]
+pub extern "C" fn print_hello() {
+    println!("Hello, world!");
+}
+#}
+

When you execute cargo wasi build that'll generate a *.wasm file which has +one exported function, print_hello. We can then run it via the CLI like so:

+
$ cargo wasi build
+   Compiling hello-world v0.1.0 (/home/alex/code/hello-world)
+    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
+$ wasmtime --invoke print_hello target/wasm32-wasi/debug/hello_world.wasm
+Hello, world!
+
+

As a library crate one of your primary consumers may be other languages as well. +You'll want to consult the section of this book for using wasmtime from +Python` and after running through the basics there you can +execute our file in Python:

+
$ cp target/wasm32-wasi/debug/hello_world.wasm .
+$ python3
+>>> import wasmtime
+>>> import hello_world
+>>> hello_world.print_hello()
+Hello, world!
+()
+>>>
+
+

Note that this form of using #[no_mangle] Rust functions is pretty primitive. +You're only able to work with primitive datatypes like integers and floats. +While this works for some applications if you need to work with richer types +like strings or structs, then you'll want to use the support in wasmtime for +interface types.

+

WebAssembly Interface Types

+

Working with WebAssembly modules at the bare-bones level means that you're only +dealing with integers and floats. Many APIs, however, want to work with things +like byte arrays, strings, structures, etc. To facilitate these interactions the +WebAssembly Interface Types +Proposal comes into play. The +wasmtime runtime has support for interface types, and the Rust toolchain has +library support in a crate called +wasm-bindgen.

+
+

Note: WebAssembly Interface Types is still a WebAssembly proposal and is +under active development. The toolchain may not match the exact specification, +and during development you'll generally need to make sure tool versions are +all kept up to date to ensure everything aligns right. This'll all smooth over +as the proposal stabilizes!

+
+

To get started with WebAssembly interface types let's write a library +module which will generate a greeting for us. The module itself won't do any +printing, we'll simply be working with some strings.

+

To get starts let's add this to our Cargo.toml:

+
[lib]
+crate-type = ['cdylib']
+
+[dependencies]
+wasm-bindgen = "0.2.54"
+
+

Using this crate, we can then update our src/lib.rs with the following:

+

+# #![allow(unused_variables)]
+#fn main() {
+use wasm_bindgen::prelude::*;
+
+#[wasm_bindgen]
+pub fn greet(name: &str) -> String {
+    format!("Hello, {}!", name)
+}
+#}
+

Then we can build this with:

+
$ cargo wasi build --release
+    Updating crates.io index
+...
+    Finished dev [unoptimized + debuginfo] target(s) in 9.57s
+ Downloading precompiled wasm-bindgen v0.2.54
+
+

and we have our new wasm binary!

+
+

Note: for now when using wasm-bindgen you must use --release mode to +build wasi binaries with interface types.

+
+

We can then test out support for this with the CLI:

+
$ wasmtime --invoke greet ./target/wasm32-wasi/release/hello_world.wasm "wasmtime CLI"
+warning: using `--invoke` with a function that takes arguments is experimental and may break in the future
+warning: using `--invoke` with a function that returns values is experimental and may break in the future
+Hello, wasmtime CLI!
+
+

Here we can see some experimental warnings, but we got our error message printed +out! The first CLI parameter, "wasmtime CLI", was passed as the first argument +of the greet function. The resulting string was then printed out to the +console.

+

Like before, we can also execute this with Python:

+
$ cp target/wasm32-wasi/release/hello_world.wasm .
+$ python3
+>>> import wasmtime
+>>> import hello_world
+>>> hello_world.greet('python interpreter')
+'Hello, python interpreter!'
+>>>
+
+

Note that wasm-bindgen was originally developed for JS and usage in a browser, +but a subset of its implementation (such as arguments which are strings) are +supported for WebAssembly interface types. You can also check out the reference +documentation for wasm-bindgen for +more information about how it works. Note that the wasm-bindgen support for +wasm interface type is still in its nascent phase and is likely to be greatly +improved in the future.

+

Exporting Rust functionality

+

Currently only Rust functions can be exported from a wasm module. Rust functions +must be #[no_mangle] to show up in the final binary, but if you're using +#[wasm_bindgen] that will happen automatically for you.

+

Memory is by default exported from Rust modules under the name memory. This +can be tweaked with the -Clink-arg flag to rustc to pass flags to LLD, the +WebAssembly code linker.

+

Tables cannot be imported at this time. When using rustc directly there is no +support for anyref and only one function table is supported. When using +wasm-bindgen it may inject an anyref table if necessary, but this table is +an internal detail and is not exported. The function table can be exported by +passing the --export-table argument to LLD (via -C link-arg) or can be +imported with the --import-table.

+

Rust currently does not have support for exporting or importing custom global +values.

+

Importing host functionality

+

Only functions can be imported in Rust at this time, and they can be imported +via raw interfaces like:

+

+# #![allow(unused_variables)]
+#fn main() {
+#[link(wasm_import_module = "the-wasm-import-module")]
+extern "C" {
+    // imports the name `foo` from `the-wasm-import-module`
+    fn foo();
+
+    // functions can have integer/float arguments/return values
+    fn translate(a: i32) -> f32;
+
+    // Note that the ABI of Rust and wasm is somewhat in flux, so while this
+    // works, it's recommended to rely on raw integer/float values where
+    // possible.
+    fn translate_fancy(my_struct: MyStruct) -> u32;
+
+    // you can also explicitly specify the name to import, this imports `bar`
+    // instead of `baz` from `the-wasm-import-module`.
+    #[link_name = "bar"]
+    fn baz();
+}
+#}
+

When you're using wasm-bindgen you would instead use:

+

+# #![allow(unused_variables)]
+#fn main() {
+use wasm_bindgen::prelude::*;
+
+#[wasm_bindgen(module = "the-wasm-import-module")]
+extern "C" {
+    fn foo();
+    fn baz();
+    // ...
+}
+#}
+

Note that unless you're using interface types you likely don't need +wasm-bindgen.

+

C/C++

+

Example: Markdown Parser

+

Embedding Wasmtime

+

... more coming soon

+

Embedding Wasmtime in Rust

+

This document shows how to embed Wasmtime using the Rust API, and run a simple +wasm program.

+

Create some wasm

+

Let's create a simple WebAssembly file with a single exported function that returns an integer:

+
(;; wat2wasm hello.wat -o $WASM_FILES/hello.wasm ;;)
+(module
+  (func (export "answer") (result i32)
+     i32.const 42
+  )
+)
+
+

Create rust project

+
$ cargo new --bin wasmtime_hello
+$ cd wasmtime_hello
+$ cp $WASM_FILES/hello.wasm .
+
+

We will be using the wasmtime engine/API to run the wasm file, so we will add the dependency to Cargo.toml:

+
[dependencies]
+wasmtime = "<current version>"
+
+

where "" is the current version number of the wasmtime crate.

+

It is time to add code to the src/main.rs. First, storage needs to be activated:

+

+# #![allow(unused_variables)]
+#fn main() {
+use wasmtime::*;
+
+let store = Store::default();
+#}
+

The HostRef will be used a lot -- it is a "convenience" object to store and refer an object between the host and +the embedded environments.

+

The hello.wasm can be read from the file system and provided to the Module object constructor as &[u8]:

+

+# #![allow(unused_variables)]
+#fn main() {
+use std::fs::read;
+
+let hello_wasm = read("hello.wasm").expect("wasm file");
+
+let module = HostRef::new(Module::new(&store, &hello_wasm).expect("wasm module"));
+#}
+

The module instance can now be created. Normally, you would provide exports, but in this case, there are none required:

+

+# #![allow(unused_variables)]
+#fn main() {
+let instance = Instance::new(&store, &module, &[]).expect("wasm instance");
+#}
+

Everything is set. If a WebAssembly module has a start function -- it was run. +The instance's exports can be used at this point. wasmtime provides functions +to look up an export by name, and ensure that it's a function:

+

+# #![allow(unused_variables)]
+#fn main() {
+let answer = instance.find_export_by_name("answer").expect("answer").func().expect("function");
+#}
+

The exported function can be called using the call method. Remember that in most of the cases, +a HostRef<_> object will be returned, so borrow() or borrow_mut() method has to be used to refer the +specific object. The exported "answer" function accepts no parameters and returns a single i32 value.

+

+# #![allow(unused_variables)]
+#fn main() {
+let result = answer.borrow().call(&[]).expect("success");
+println!("Answer: {}", result[0].i32());
+#}
+

The names of the WebAssembly module's imports and exports can be discovered by means of module's corresponding methods.

+

src/main.rs

+
use std::fs::read;
+use wasmtime::*;
+
+fn main() {
+    let store = Store::default();
+
+    let wasm = read("hello.wasm").expect("wasm file");
+
+    let module = HostRef::new(Module::new(&store, &wasm).expect("wasm module"));
+    let instance = Instance::new(&store, &module, &[]).expect("wasm instance");
+
+    let answer = instance.find_export_by_name("answer").expect("answer").func().expect("function");
+    let result = answer.borrow().call(&[]).expect("success");
+    println!("Answer: {}", result[0].i32());
+}
+
+

Embedding Wasmtime in C

+

... more coming soon

+

Stability

+

... more coming soon

+

Release Process

+

... more coming soon

+

Platform Support

+

The wasmtime project is a configurable and lightweight runtime for WebAssembly +which has a number of ways it can be configured. Not all features are supported +on all platforms, but it is intended that wasmtime can run in some capacity on +almost all platforms! The matrix of what's being tested, what works, and what's +supported where is evolving over time, and this document hopes to capture a +snapshot of what the current state of the world looks like.

+

All features of wasmtime should work on the following platforms:

+
    +
  • Linux x86_64
  • +
  • macOS x86_64
  • +
  • Windows x86_64
  • +
+

For more detailed information about supported platforms, please check out the +sections below!

+

JIT compiler support

+

The JIT compiler, backed by either lightbeam or cranelift supports only the +x86_64 architecture at this time. Support for at least ARM, AArch64, and x86 is +planned at this time.

+

Usage of the JIT compiler will require a host operating system which supports +creating executable memory pages on-the-fly. In Rust terms this generally means +that std needs to be supported on this platform.

+

Interpreter support

+

At this time wasmtime does not have a mode in which it simply interprets +WebAssembly code. It is planned to add support for an interpreter, however, and +this will have minimal system dependencies. It is planned that the system will +need to support some form of dynamic memory allocation, but other than that not +much else will be needed.

+

What about #[no_std]?

+

The wasmtime project does not currently use #[no_std] for its crates, but +this is not because it won't support it! At this time we're still gathering use +cases for for what #[no_std] might entail, so if you're interested in this +we'd love to hear about your use case! Feel free to open an issue on the +wasmtime repository to discuss this.

+

Security

+

... more coming soon

+

Disclosure Policy

+

... more coming soon

+

Sandboxing

+

... more coming soon

+

Contributing

+

We're excited to work on Wasmtime together with you! This guide should help you +get up and running with Wasmtime development. But first, make sure you've read +the Code of Conduct!

+

Join Our Chat

+

We chat about Wasmtime development on Gitter — join +us!

+

If you're having trouble building Wasmtime, aren't sure why a test is failing, +or have any other questions, feel free to ask here. You can also open an +issue!

+

Finding Something to Hack On

+

If you're looking for something to do, these are great places to start:

+
    +
  • +

    Issues labeled "good first +issue" +— these issues tend to be simple, what needs to be done is well known, +and are good for new contributors to tackle. The goal is to learn Wasmtime's +development workflow and make sure that you can build and test Wasmtime.

    +
  • +
  • +

    Issues labeled "help +wanted" +— these are issues that we need a little help with!

    +
  • +
+

If you're unsure if an issue is a good fit for you or not, feel free to ask in a +comment on the issue, or in chat.

+

Building

+

This section describes everything required to build and run Wasmtime.

+

Prerequisites

+

Before we can actually build Wasmtime, we'll need to make sure these things are +installed first.

+

The Rust Toolchain

+

Install the Rust toolchain here. This +includes rustup, cargo, rustc, etc...

+

libclang (optional)

+

The wasmtime-fuzzing crate transitively depends on bindgen, which requires +that your system has a libclang installed. Therefore, if you want to hack on +Wasmtime's fuzzing infrastructure, you'll need libclang. Details on how to +get libclang and make it available for bindgen are +here.

+

Building the wasmtime CLI

+

To make an unoptimized, debug build of the wasmtime CLI tool, go to the root +of the repository and run this command:

+
cargo build
+
+

The built executable will be located at target/debug/wasmtime.

+

To make an optimized build, run this command in the root of the repository:

+
cargo build --release
+
+

The built executable will be located at target/release/wasmtime.

+

You can also build and run a local wasmtime CLI by replacing cargo build +with cargo run.

+

Building Other Wasmtime Crates

+

You can build any of the Wasmtime crates by appending -p wasmtime-whatever to +the cargo build invocation. For example, to build the wasmtime-jit crate, +execute this command:

+
cargo build -p wasmtime-jit
+
+

Alternatively, you can cd into the crate's directory, and run cargo build +there, without needing to supply the -p flag:

+
cd crates/jit/
+cargo build
+
+

Testing

+

This section describes how to run Wasmtime's tests and add new tests.

+

Before continuing, make sure you can build +Wasmtime successfully. Can't run the tests if you +can't build it!

+

Running All Tests

+

To run all of Wasmtime's tests (excluding WASI integration tests), execute this command:

+
cargo test --all
+
+

To include WASI integration tests, you'll need wasm32-wasi target installed, which, +assuming you're using rustup.rs to manage your Rust versions, +can be done as follows:

+
rustup target add wasm32-wasi
+
+

Next, to run all tests including the WASI integration tests, execute this command:

+
cargo test --features test_programs --all
+
+

You can also exclude a particular crate from testing with --exclude. For +example, if you want to avoid testing the wastime-fuzzing crate — which +requires that libclang is installed on your system, and for some reason maybe +you don't have it — you can run:

+
cargo test --all --exclude wasmtime-fuzzing
+
+

Testing a Specific Crate

+

You can test a particular Wasmtime crate with cargo test -p wasmtime-whatever. For example, to test the wasmtime-environ crate, execute +this command:

+
cargo test -p wasmtime-environ
+
+

Alternatively, you can cd into the crate's directory, and run cargo test +there, without needing to supply the -p flag:

+
cd crates/environ/
+cargo test
+
+

Running the Wasm Spec Tests

+

The spec testsuite itself is in a git submodule, so make sure you've +checked it out and initialized its submodule:

+
git submodule update --init
+
+

When the submodule is checked out, Wasmtime runs the Wasm spec testsuite as part +of testing the wasmtime-cli crate:

+
cargo test -p wasmtime-cli
+
+

Running WASI Integration Tests Only

+

WASI integration tests can be run separately from all other tests which +can be useful when working on the wasi-common crate. This can be done by +executing this command:

+
cargo test --features test_programs -p test-programs
+
+

Adding New Tests

+

Adding Rust's #[test]-Style Tests

+

For very "unit-y" tests, we add test modules in the same .rs file as the +code that is being tested. These test modules are configured to only get +compiled during testing with #[cfg(test)].

+

+# #![allow(unused_variables)]
+#fn main() {
+// some code...
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+
+    #[test]
+    fn some_test_for_that_code() {
+        // ...
+    }
+}
+#}
+

If you're writing a unit test and a test module doesn't already exist, you can +create one.

+

For more "integration-y" tests, we create a tests directory within the crate, +and put the tests inside there. For example, there are various code +cache-related tests at crates/environ/tests/cache_*.rs. Always feel free to +add a tests directory to a crate, if you want to add a new test and there +aren't any existing tests.

+

Adding Specification-Style Wast Tests

+

We use the spec testsuite as-is and without custom patches or a forked +version. This probably isn't what you want to modify when adding a new Wasmtime +test!

+

When you have a Wasmtime-specific test that you'd like to write in Wast and use +the Wast-style assertions, you can add it to our "misc testsuite". The misc +testsuite uses the same syntax and assertions as the spec testsuite, but lives +in tests/misc_testsuite. Feel free to add new tests to existing +tests/misc_testsuite/*.wast files or create new ones as needed. These tests +are run as part of the wasmtime-cli crate's tests.

+

If you have a new test that you think really belongs in the spec testsuite, make +sure it makes sense for every Wasm implementation to run your test (i.e. it +isn't Wasmtime-specific) and send a pull request +upstream. Once it is accepted in +the upstream repo, we can update our git submodule and we'll start running the +new tests.

+

Adding WASI Integration Tests

+

When you have a WASI-specific test program that you'd like to include as a +test case to run against our WASI implementation, you can add it to our +test-programs crate. In particular, you should drop a main-style Rust source +file into crates/test-programs/wasi-tests/src/bin/some_new_test.rs with a +name of your choice. And that's it! The build script included in the +test-programs crate will automatically generate the necessary boilerplate +code for your test program so that it's run on all supported hosts.

+

If you would like to tweak which host to run the test program against however +(for instance, only on Unix but on Windows), you can tweak that in the build +script located under crates/test-programs/build.rs.

+

Fuzzing

+

Test Case Generators and Oracles

+

Test case generators and oracles live in the wasmtime-fuzzing crate, located +in the crates/fuzzing directory.

+

A test case generator takes raw, unstructured input from a fuzzer and +translates that into a test case. This might involve interpreting the raw input +as "DNA" or pre-determined choices through a decision tree and using it to +generate an in-memory data structure, or it might be a no-op where we interpret +the raw bytes as if they were Wasm.

+

An oracle takes a test case and determines whether we have a bug. For example, +one of the simplest oracles is to take a Wasm binary as an input test case, +validate and instantiate it, and (implicitly) check that no assertions failed or +segfaults happened. A more complicated oracle might compare the result of +executing a Wasm file with and without optimizations enabled, and make sure that +the two executions are observably identical.

+

Our test case generators and oracles strive to be fuzzer-agnostic: they can be +reused with libFuzzer or AFL or any other fuzzing engine or driver.

+

libFuzzer and cargo fuzz Fuzz Targets

+

We combine a test case generator and one more more oracles into a fuzz +target. Because the target needs to pipe the raw input from a fuzzer into the +test case generator, it is specific to a particular fuzzer. This is generally +fine, since they're only a couple of lines of glue code.

+

Currently, all of our fuzz targets are written for +libFuzzer and cargo fuzz. They are defined in +the fuzz subdirectory.

+

See +fuzz/README.md +for details on how to run these fuzz targets and set up a corpus of seed inputs.

+

CI

+

... more coming soon

+

Governance

+

... more coming soon

+

Contributor Covenant Code of Conduct

+

Note: this Code of Conduct pertains to individuals' behavior. Please also see the Organizational Code of Conduct.

+

Our Pledge

+

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

+

Our Standards

+

Examples of behavior that contributes to creating a positive environment include:

+
    +
  • Using welcoming and inclusive language
  • +
  • Being respectful of differing viewpoints and experiences
  • +
  • Gracefully accepting constructive criticism
  • +
  • Focusing on what is best for the community
  • +
  • Showing empathy towards other community members
  • +
+

Examples of unacceptable behavior by participants include:

+
    +
  • The use of sexualized language or imagery and unwelcome sexual attention or advances
  • +
  • Trolling, insulting/derogatory comments, and personal or political attacks
  • +
  • Public or private harassment
  • +
  • Publishing others' private information, such as a physical or electronic address, without explicit permission
  • +
  • Other conduct which could reasonably be considered inappropriate in a professional setting
  • +
+

Our Responsibilities

+

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

+

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

+

Scope

+

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

+

Enforcement

+

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Bytecode Alliance CoC team at report@bytecodealliance.org. The CoC team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The CoC team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

+

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the Bytecode Alliance's leadership.

+

Attribution

+

This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/searcher.js b/searcher.js new file mode 100644 index 000000000000..7fd97d487926 --- /dev/null +++ b/searcher.js @@ -0,0 +1,477 @@ +"use strict"; +window.search = window.search || {}; +(function search(search) { + // Search functionality + // + // You can use !hasFocus() to prevent keyhandling in your key + // event handlers while the user is typing their search. + + if (!Mark || !elasticlunr) { + return; + } + + //IE 11 Compatibility from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith + if (!String.prototype.startsWith) { + String.prototype.startsWith = function(search, pos) { + return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; + }; + } + + var search_wrap = document.getElementById('search-wrapper'), + searchbar = document.getElementById('searchbar'), + searchbar_outer = document.getElementById('searchbar-outer'), + searchresults = document.getElementById('searchresults'), + searchresults_outer = document.getElementById('searchresults-outer'), + searchresults_header = document.getElementById('searchresults-header'), + searchicon = document.getElementById('search-toggle'), + content = document.getElementById('content'), + + searchindex = null, + doc_urls = [], + results_options = { + teaser_word_count: 30, + limit_results: 30, + }, + search_options = { + bool: "AND", + expand: true, + fields: { + title: {boost: 1}, + body: {boost: 1}, + breadcrumbs: {boost: 0} + } + }, + mark_exclude = [], + marker = new Mark(content), + current_searchterm = "", + URL_SEARCH_PARAM = 'search', + URL_MARK_PARAM = 'highlight', + teaser_count = 0, + + SEARCH_HOTKEY_KEYCODE = 83, + ESCAPE_KEYCODE = 27, + DOWN_KEYCODE = 40, + UP_KEYCODE = 38, + SELECT_KEYCODE = 13; + + function hasFocus() { + return searchbar === document.activeElement; + } + + function removeChildren(elem) { + while (elem.firstChild) { + elem.removeChild(elem.firstChild); + } + } + + // Helper to parse a url into its building blocks. + function parseURL(url) { + var a = document.createElement('a'); + a.href = url; + return { + source: url, + protocol: a.protocol.replace(':',''), + host: a.hostname, + port: a.port, + params: (function(){ + var ret = {}; + var seg = a.search.replace(/^\?/,'').split('&'); + var len = seg.length, i = 0, s; + for (;i': '>', + '"': '"', + "'": ''' + }; + var repl = function(c) { return MAP[c]; }; + return function(s) { + return s.replace(/[&<>'"]/g, repl); + }; + })(); + + function formatSearchMetric(count, searchterm) { + if (count == 1) { + return count + " search result for '" + searchterm + "':"; + } else if (count == 0) { + return "No search results for '" + searchterm + "'."; + } else { + return count + " search results for '" + searchterm + "':"; + } + } + + function formatSearchResult(result, searchterms) { + var teaser = makeTeaser(escapeHTML(result.doc.body), searchterms); + teaser_count++; + + // The ?URL_MARK_PARAM= parameter belongs inbetween the page and the #heading-anchor + var url = doc_urls[result.ref].split("#"); + if (url.length == 1) { // no anchor found + url.push(""); + } + + return '' + result.doc.breadcrumbs + '' + + '' + + teaser + ''; + } + + function makeTeaser(body, searchterms) { + // The strategy is as follows: + // First, assign a value to each word in the document: + // Words that correspond to search terms (stemmer aware): 40 + // Normal words: 2 + // First word in a sentence: 8 + // Then use a sliding window with a constant number of words and count the + // sum of the values of the words within the window. Then use the window that got the + // maximum sum. If there are multiple maximas, then get the last one. + // Enclose the terms in . + var stemmed_searchterms = searchterms.map(function(w) { + return elasticlunr.stemmer(w.toLowerCase()); + }); + var searchterm_weight = 40; + var weighted = []; // contains elements of ["word", weight, index_in_document] + // split in sentences, then words + var sentences = body.toLowerCase().split('. '); + var index = 0; + var value = 0; + var searchterm_found = false; + for (var sentenceindex in sentences) { + var words = sentences[sentenceindex].split(' '); + value = 8; + for (var wordindex in words) { + var word = words[wordindex]; + if (word.length > 0) { + for (var searchtermindex in stemmed_searchterms) { + if (elasticlunr.stemmer(word).startsWith(stemmed_searchterms[searchtermindex])) { + value = searchterm_weight; + searchterm_found = true; + } + }; + weighted.push([word, value, index]); + value = 2; + } + index += word.length; + index += 1; // ' ' or '.' if last word in sentence + }; + index += 1; // because we split at a two-char boundary '. ' + }; + + if (weighted.length == 0) { + return body; + } + + var window_weight = []; + var window_size = Math.min(weighted.length, results_options.teaser_word_count); + + var cur_sum = 0; + for (var wordindex = 0; wordindex < window_size; wordindex++) { + cur_sum += weighted[wordindex][1]; + }; + window_weight.push(cur_sum); + for (var wordindex = 0; wordindex < weighted.length - window_size; wordindex++) { + cur_sum -= weighted[wordindex][1]; + cur_sum += weighted[wordindex + window_size][1]; + window_weight.push(cur_sum); + }; + + if (searchterm_found) { + var max_sum = 0; + var max_sum_window_index = 0; + // backwards + for (var i = window_weight.length - 1; i >= 0; i--) { + if (window_weight[i] > max_sum) { + max_sum = window_weight[i]; + max_sum_window_index = i; + } + }; + } else { + max_sum_window_index = 0; + } + + // add around searchterms + var teaser_split = []; + var index = weighted[max_sum_window_index][2]; + for (var i = max_sum_window_index; i < max_sum_window_index+window_size; i++) { + var word = weighted[i]; + if (index < word[2]) { + // missing text from index to start of `word` + teaser_split.push(body.substring(index, word[2])); + index = word[2]; + } + if (word[1] == searchterm_weight) { + teaser_split.push("") + } + index = word[2] + word[0].length; + teaser_split.push(body.substring(word[2], index)); + if (word[1] == searchterm_weight) { + teaser_split.push("") + } + }; + + return teaser_split.join(''); + } + + function init(config) { + results_options = config.results_options; + search_options = config.search_options; + searchbar_outer = config.searchbar_outer; + doc_urls = config.doc_urls; + searchindex = elasticlunr.Index.load(config.index); + + // Set up events + searchicon.addEventListener('click', function(e) { searchIconClickHandler(); }, false); + searchbar.addEventListener('keyup', function(e) { searchbarKeyUpHandler(); }, false); + document.addEventListener('keydown', function(e) { globalKeyHandler(e); }, false); + // If the user uses the browser buttons, do the same as if a reload happened + window.onpopstate = function(e) { doSearchOrMarkFromUrl(); }; + // Suppress "submit" events so the page doesn't reload when the user presses Enter + document.addEventListener('submit', function(e) { e.preventDefault(); }, false); + + // If reloaded, do the search or mark again, depending on the current url parameters + doSearchOrMarkFromUrl(); + } + + function unfocusSearchbar() { + // hacky, but just focusing a div only works once + var tmp = document.createElement('input'); + tmp.setAttribute('style', 'position: absolute; opacity: 0;'); + searchicon.appendChild(tmp); + tmp.focus(); + tmp.remove(); + } + + // On reload or browser history backwards/forwards events, parse the url and do search or mark + function doSearchOrMarkFromUrl() { + // Check current URL for search request + var url = parseURL(window.location.href); + if (url.params.hasOwnProperty(URL_SEARCH_PARAM) + && url.params[URL_SEARCH_PARAM] != "") { + showSearch(true); + searchbar.value = decodeURIComponent( + (url.params[URL_SEARCH_PARAM]+'').replace(/\+/g, '%20')); + searchbarKeyUpHandler(); // -> doSearch() + } else { + showSearch(false); + } + + if (url.params.hasOwnProperty(URL_MARK_PARAM)) { + var words = url.params[URL_MARK_PARAM].split(' '); + marker.mark(words, { + exclude: mark_exclude + }); + + var markers = document.querySelectorAll("mark"); + function hide() { + for (var i = 0; i < markers.length; i++) { + markers[i].classList.add("fade-out"); + window.setTimeout(function(e) { marker.unmark(); }, 300); + } + } + for (var i = 0; i < markers.length; i++) { + markers[i].addEventListener('click', hide); + } + } + } + + // Eventhandler for keyevents on `document` + function globalKeyHandler(e) { + if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.target.type === 'textarea') { return; } + + if (e.keyCode === ESCAPE_KEYCODE) { + e.preventDefault(); + searchbar.classList.remove("active"); + setSearchUrlParameters("", + (searchbar.value.trim() !== "") ? "push" : "replace"); + if (hasFocus()) { + unfocusSearchbar(); + } + showSearch(false); + marker.unmark(); + } else if (!hasFocus() && e.keyCode === SEARCH_HOTKEY_KEYCODE) { + e.preventDefault(); + showSearch(true); + window.scrollTo(0, 0); + searchbar.select(); + } else if (hasFocus() && e.keyCode === DOWN_KEYCODE) { + e.preventDefault(); + unfocusSearchbar(); + searchresults.firstElementChild.classList.add("focus"); + } else if (!hasFocus() && (e.keyCode === DOWN_KEYCODE + || e.keyCode === UP_KEYCODE + || e.keyCode === SELECT_KEYCODE)) { + // not `:focus` because browser does annoying scrolling + var focused = searchresults.querySelector("li.focus"); + if (!focused) return; + e.preventDefault(); + if (e.keyCode === DOWN_KEYCODE) { + var next = focused.nextElementSibling; + if (next) { + focused.classList.remove("focus"); + next.classList.add("focus"); + } + } else if (e.keyCode === UP_KEYCODE) { + focused.classList.remove("focus"); + var prev = focused.previousElementSibling; + if (prev) { + prev.classList.add("focus"); + } else { + searchbar.select(); + } + } else { // SELECT_KEYCODE + window.location.assign(focused.querySelector('a')); + } + } + } + + function showSearch(yes) { + if (yes) { + search_wrap.classList.remove('hidden'); + searchicon.setAttribute('aria-expanded', 'true'); + } else { + search_wrap.classList.add('hidden'); + searchicon.setAttribute('aria-expanded', 'false'); + var results = searchresults.children; + for (var i = 0; i < results.length; i++) { + results[i].classList.remove("focus"); + } + } + } + + function showResults(yes) { + if (yes) { + searchresults_outer.classList.remove('hidden'); + } else { + searchresults_outer.classList.add('hidden'); + } + } + + // Eventhandler for search icon + function searchIconClickHandler() { + if (search_wrap.classList.contains('hidden')) { + showSearch(true); + window.scrollTo(0, 0); + searchbar.select(); + } else { + showSearch(false); + } + } + + // Eventhandler for keyevents while the searchbar is focused + function searchbarKeyUpHandler() { + var searchterm = searchbar.value.trim(); + if (searchterm != "") { + searchbar.classList.add("active"); + doSearch(searchterm); + } else { + searchbar.classList.remove("active"); + showResults(false); + removeChildren(searchresults); + } + + setSearchUrlParameters(searchterm, "push_if_new_search_else_replace"); + + // Remove marks + marker.unmark(); + } + + // Update current url with ?URL_SEARCH_PARAM= parameter, remove ?URL_MARK_PARAM and #heading-anchor . + // `action` can be one of "push", "replace", "push_if_new_search_else_replace" + // and replaces or pushes a new browser history item. + // "push_if_new_search_else_replace" pushes if there is no `?URL_SEARCH_PARAM=abc` yet. + function setSearchUrlParameters(searchterm, action) { + var url = parseURL(window.location.href); + var first_search = ! url.params.hasOwnProperty(URL_SEARCH_PARAM); + if (searchterm != "" || action == "push_if_new_search_else_replace") { + url.params[URL_SEARCH_PARAM] = searchterm; + delete url.params[URL_MARK_PARAM]; + url.hash = ""; + } else { + delete url.params[URL_SEARCH_PARAM]; + } + // A new search will also add a new history item, so the user can go back + // to the page prior to searching. A updated search term will only replace + // the url. + if (action == "push" || (action == "push_if_new_search_else_replace" && first_search) ) { + history.pushState({}, document.title, renderURL(url)); + } else if (action == "replace" || (action == "push_if_new_search_else_replace" && !first_search) ) { + history.replaceState({}, document.title, renderURL(url)); + } + } + + function doSearch(searchterm) { + + // Don't search the same twice + if (current_searchterm == searchterm) { return; } + else { current_searchterm = searchterm; } + + if (searchindex == null) { return; } + + // Do the actual search + var results = searchindex.search(searchterm, search_options); + var resultcount = Math.min(results.length, results_options.limit_results); + + // Display search metrics + searchresults_header.innerText = formatSearchMetric(resultcount, searchterm); + + // Clear and insert results + var searchterms = searchterm.split(' '); + removeChildren(searchresults); + for(var i = 0; i < resultcount ; i++){ + var resultElem = document.createElement('li'); + resultElem.innerHTML = formatSearchResult(results[i], searchterms); + searchresults.appendChild(resultElem); + } + + // Display results + showResults(true); + } + + fetch(path_to_root + 'searchindex.json') + .then(response => response.json()) + .then(json => init(json)) + .catch(error => { // Try to load searchindex.js if fetch failed + var script = document.createElement('script'); + script.src = path_to_root + 'searchindex.js'; + script.onload = () => init(window.search); + document.head.appendChild(script); + }); + + // Exported functions + search.hasFocus = hasFocus; +})(window.search); diff --git a/searchindex.js b/searchindex.js new file mode 100644 index 000000000000..86514451e9ab --- /dev/null +++ b/searchindex.js @@ -0,0 +1 @@ +Object.assign(window.search, {"doc_urls":["introduction.html#introduction","tutorial.html#tutorial","tutorial-create-hello-world.html#creating-hello-worldwasm","tutorial-run-hello-world.html#running-hello-worldwasm-with-wasmtime","examples.html#examples","examples-markdown.html#markdown-parser","lang.html#using-webassembly-from-your-language","lang-python.html#using-webassembly-from-python","lang-dotnet.html#using-webassembly-from-net","lang-rust.html#using-webassembly-from-rust","lang-bash.html#using-webassembly-from-bash","cli.html#using-the-wasmtime-cli","cli-install.html#installing-wasmtime","cli-options.html#cli-options-for-wasmtime","cli-cache.html#cache-configuration-of-wasmtime","cli-cache.html#setting-enabled","cli-cache.html#setting-directory","cli-cache.html#setting-worker-event-queue-size","cli-cache.html#setting-baseline-compression-level","cli-cache.html#setting-optimized-compression-level","cli-cache.html#setting-optimized-compression-usage-counter-threshold","cli-cache.html#setting-cleanup-interval","cli-cache.html#setting-optimizing-compression-task-timeout","cli-cache.html#setting-allowed-clock-drift-for-files-from-future","cli-cache.html#locks","cli-cache.html#cache-files","cli-cache.html#setting-file-count-soft-limit","cli-cache.html#setting-files-total-size-soft-limit","cli-cache.html#setting-file-count-limit-percent-if-deleting","cli-cache.html#setting-files-total-size-limit-percent-if-deleting","cli-cache.html#how-does-the-cache-work","cli-cache.html#cache-system","cli-cache.html#cache-worker","cli-cache.html#on-get-request","cli-cache.html#on-update-request","cli-cache.html#metadata-files","wasm.html#writing-webassembly","wasm-rust.html#rust","wasm-rust.html#hello-world","wasm-rust.html#writing-libraries","wasm-rust.html#webassembly-interface-types","wasm-rust.html#exporting-rust-functionality","wasm-rust.html#importing-host-functionality","wasm-c.html#cc","wasm-markdown.html#example-markdown-parser","embed.html#embedding-wasmtime","embed-rust.html#embedding-wasmtime-in-rust","embed-rust.html#create-some-wasm","embed-rust.html#create-rust-project","embed-rust.html#srcmainrs","embed-c.html#embedding-wasmtime-in-c","stability.html#stability","stability-release.html#release-process","stability-platform-support.html#platform-support","stability-platform-support.html#jit-compiler-support","stability-platform-support.html#interpreter-support","stability-platform-support.html#what-about-no_std","security.html#security","security-disclosure.html#disclosure-policy","security-sandboxing.html#sandboxing","contributing.html#contributing","contributing.html#join-our-chat","contributing.html#finding-something-to-hack-on","contributing-building.html#building","contributing-building.html#prerequisites","contributing-building.html#the-rust-toolchain","contributing-building.html#libclang-optional","contributing-building.html#building-the-wasmtime-cli","contributing-building.html#building-other-wasmtime-crates","contributing-testing.html#testing","contributing-testing.html#running-all-tests","contributing-testing.html#testing-a-specific-crate","contributing-testing.html#running-the-wasm-spec-tests","contributing-testing.html#running-wasi-integration-tests-only","contributing-testing.html#adding-new-tests","contributing-testing.html#adding-rusts-test-style-tests","contributing-testing.html#adding-specification-style-wast-tests","contributing-testing.html#adding-wasi-integration-tests","contributing-fuzzing.html#fuzzing","contributing-fuzzing.html#test-case-generators-and-oracles","contributing-fuzzing.html#libfuzzer-and-cargo-fuzz-fuzz-targets","contributing-ci.html#ci","contributing-governance.html#governance","contributing-coc.html#contributor-covenant-code-of-conduct","contributing-coc.html#our-pledge","contributing-coc.html#our-standards","contributing-coc.html#our-responsibilities","contributing-coc.html#scope","contributing-coc.html#enforcement","contributing-coc.html#attribution"],"index":{"documentStore":{"docInfo":{"0":{"body":3,"breadcrumbs":1,"title":1},"1":{"body":3,"breadcrumbs":1,"title":1},"10":{"body":3,"breadcrumbs":6,"title":3},"11":{"body":3,"breadcrumbs":3,"title":3},"12":{"body":3,"breadcrumbs":5,"title":2},"13":{"body":3,"breadcrumbs":6,"title":3},"14":{"body":88,"breadcrumbs":6,"title":3},"15":{"body":24,"breadcrumbs":5,"title":2},"16":{"body":14,"breadcrumbs":5,"title":2},"17":{"body":24,"breadcrumbs":8,"title":5},"18":{"body":22,"breadcrumbs":7,"title":4},"19":{"body":17,"breadcrumbs":7,"title":4},"2":{"body":3,"breadcrumbs":4,"title":3},"20":{"body":24,"breadcrumbs":9,"title":6},"21":{"body":36,"breadcrumbs":6,"title":3},"22":{"body":43,"breadcrumbs":8,"title":5},"23":{"body":10,"breadcrumbs":9,"title":6},"24":{"body":52,"breadcrumbs":4,"title":1},"25":{"body":34,"breadcrumbs":5,"title":2},"26":{"body":29,"breadcrumbs":8,"title":5},"27":{"body":41,"breadcrumbs":9,"title":6},"28":{"body":45,"breadcrumbs":9,"title":6},"29":{"body":49,"breadcrumbs":10,"title":7},"3":{"body":3,"breadcrumbs":5,"title":4},"30":{"body":21,"breadcrumbs":5,"title":2},"31":{"body":48,"breadcrumbs":5,"title":2},"32":{"body":14,"breadcrumbs":5,"title":2},"33":{"body":53,"breadcrumbs":4,"title":1},"34":{"body":78,"breadcrumbs":5,"title":2},"35":{"body":7,"breadcrumbs":5,"title":2},"36":{"body":0,"breadcrumbs":2,"title":2},"37":{"body":110,"breadcrumbs":3,"title":1},"38":{"body":147,"breadcrumbs":4,"title":2},"39":{"body":147,"breadcrumbs":4,"title":2},"4":{"body":6,"breadcrumbs":1,"title":1},"40":{"body":267,"breadcrumbs":5,"title":3},"41":{"body":83,"breadcrumbs":5,"title":3},"42":{"body":91,"breadcrumbs":5,"title":3},"43":{"body":0,"breadcrumbs":3,"title":1},"44":{"body":0,"breadcrumbs":5,"title":3},"45":{"body":3,"breadcrumbs":2,"title":2},"46":{"body":11,"breadcrumbs":5,"title":3},"47":{"body":22,"breadcrumbs":4,"title":2},"48":{"body":147,"breadcrumbs":5,"title":3},"49":{"body":26,"breadcrumbs":3,"title":1},"5":{"body":3,"breadcrumbs":3,"title":2},"50":{"body":3,"breadcrumbs":5,"title":3},"51":{"body":3,"breadcrumbs":1,"title":1},"52":{"body":3,"breadcrumbs":3,"title":2},"53":{"body":56,"breadcrumbs":3,"title":2},"54":{"body":36,"breadcrumbs":4,"title":3},"55":{"body":24,"breadcrumbs":3,"title":2},"56":{"body":30,"breadcrumbs":2,"title":1},"57":{"body":3,"breadcrumbs":1,"title":1},"58":{"body":3,"breadcrumbs":3,"title":2},"59":{"body":3,"breadcrumbs":2,"title":1},"6":{"body":3,"breadcrumbs":3,"title":3},"60":{"body":18,"breadcrumbs":1,"title":1},"61":{"body":21,"breadcrumbs":2,"title":2},"62":{"body":51,"breadcrumbs":3,"title":3},"63":{"body":7,"breadcrumbs":2,"title":1},"64":{"body":11,"breadcrumbs":2,"title":1},"65":{"body":9,"breadcrumbs":3,"title":2},"66":{"body":25,"breadcrumbs":3,"title":2},"67":{"body":42,"breadcrumbs":4,"title":3},"68":{"body":38,"breadcrumbs":4,"title":3},"69":{"body":20,"breadcrumbs":2,"title":1},"7":{"body":3,"breadcrumbs":6,"title":3},"70":{"body":73,"breadcrumbs":3,"title":2},"71":{"body":37,"breadcrumbs":4,"title":3},"72":{"body":34,"breadcrumbs":5,"title":4},"73":{"body":21,"breadcrumbs":5,"title":4},"74":{"body":0,"breadcrumbs":4,"title":3},"75":{"body":73,"breadcrumbs":6,"title":5},"76":{"body":93,"breadcrumbs":6,"title":5},"77":{"body":62,"breadcrumbs":5,"title":4},"78":{"body":0,"breadcrumbs":2,"title":1},"79":{"body":98,"breadcrumbs":5,"title":4},"8":{"body":3,"breadcrumbs":6,"title":3},"80":{"body":50,"breadcrumbs":6,"title":5},"81":{"body":3,"breadcrumbs":2,"title":1},"82":{"body":3,"breadcrumbs":2,"title":1},"83":{"body":11,"breadcrumbs":5,"title":4},"84":{"body":35,"breadcrumbs":2,"title":1},"85":{"body":67,"breadcrumbs":2,"title":1},"86":{"body":44,"breadcrumbs":2,"title":1},"87":{"body":43,"breadcrumbs":2,"title":1},"88":{"body":55,"breadcrumbs":2,"title":1},"89":{"body":10,"breadcrumbs":2,"title":1},"9":{"body":3,"breadcrumbs":6,"title":3}},"docs":{"0":{"body":"... more coming soon","breadcrumbs":"Introduction","id":"0","title":"Introduction"},"1":{"body":"... more coming soon","breadcrumbs":"Tutorial","id":"1","title":"Tutorial"},"10":{"body":"... more coming soon","breadcrumbs":"Using WebAssembly from your lanugage » Using WebAssembly from Bash","id":"10","title":"Using WebAssembly from Bash"},"11":{"body":"... more coming soon","breadcrumbs":"Using the wasmtime CLI","id":"11","title":"Using the wasmtime CLI"},"12":{"body":"... more coming soon","breadcrumbs":"Using the wasmtime CLI » Installing wasmtime","id":"12","title":"Installing wasmtime"},"13":{"body":"... more coming soon","breadcrumbs":"Using the wasmtime CLI » CLI Options for wasmtime","id":"13","title":"CLI Options for wasmtime"},"14":{"body":"The configuration file uses the toml format. You can create a configuration file at the default location with: $ wasmtime config new It will print the location regardless of the success. Please refer to the --help message for using a custom location. All settings, except enabled, are optional . If the setting is not specified, the default value is used. Thus, if you don't know what values to use, don't specify them. The default values might be tuned in the future. Wasmtime assumes all the options are in the cache section. Example config: [cache]\nenabled = true\ndirectory = \"/nfs-share/wasmtime-cache/\"\ncleanup-interval = \"30m\"\nfiles-total-size-soft-limit = \"1Gi\" Please refer to the cache system section to learn how it works. If you think some default value should be tuned, some new settings should be introduced or some behavior should be changed, you are welcome to discuss it and contribute to the Wasmtime repository .","breadcrumbs":"Using the wasmtime CLI » Cache Configuration of wasmtime","id":"14","title":"Cache Configuration of wasmtime"},"15":{"body":"type : boolean format : true | false default : true Specifies whether the cache system is used or not. This field is mandatory . The default value is used when configuration file is not specified and none exists at the default location.","breadcrumbs":"Using the wasmtime CLI » Setting enabled","id":"15","title":"Setting enabled"},"16":{"body":"type : string (path) default : look up cache_dir in directories crate Specifies where the cache directory is. Must be an absolute path.","breadcrumbs":"Using the wasmtime CLI » Setting directory","id":"16","title":"Setting directory"},"17":{"body":"type : string (SI prefix) format : \"{integer}(K | M | G | T | P)?\" default : \"16\" Size of cache worker event queue. If the queue is full, incoming cache usage events will be dropped.","breadcrumbs":"Using the wasmtime CLI » Setting worker-event-queue-size","id":"17","title":"Setting worker-event-queue-size"},"18":{"body":"type : integer default : 3, the default zstd compression level Compression level used when a new cache file is being written by the cache system . Wasmtime uses zstd compression.","breadcrumbs":"Using the wasmtime CLI » Setting baseline-compression-level","id":"18","title":"Setting baseline-compression-level"},"19":{"body":"type : integer default : 20 Compression level used when the cache worker decides to recompress a cache file. Wasmtime uses zstd compression.","breadcrumbs":"Using the wasmtime CLI » Setting optimized-compression-level","id":"19","title":"Setting optimized-compression-level"},"2":{"body":"... more coming soon","breadcrumbs":"Tutorial » Creating hello-world.wasm","id":"2","title":"Creating hello-world.wasm"},"20":{"body":"type : string (SI prefix) format : \"{integer}(K | M | G | T | P)?\" default : \"256\" One of the conditions for the cache worker to recompress a cache file is to have usage count of the file exceeding this threshold.","breadcrumbs":"Using the wasmtime CLI » Setting optimized-compression-usage-counter-threshold","id":"20","title":"Setting optimized-compression-usage-counter-threshold"},"21":{"body":"type : string (duration) format : \"{integer}(s | m | h | d)\" default : \"1h\" When the cache worker is notified about a cache file being updated by the cache system and this interval has already passed since last cleaning up, the worker will attempt a new cleanup. Please also refer to allowed-clock-drift-for-files-from-future .","breadcrumbs":"Using the wasmtime CLI » Setting cleanup-interval","id":"21","title":"Setting cleanup-interval"},"22":{"body":"type : string (duration) format : \"{integer}(s | m | h | d)\" default : \"30m\" When the cache worker decides to recompress a cache file, it makes sure that no other worker has started the task for this file within the last optimizing-compression-task-timeout interval. If some worker has started working on it, other workers are skipping this task. Please also refer to the allowed-clock-drift-for-files-from-future section.","breadcrumbs":"Using the wasmtime CLI » Setting optimizing-compression-task-timeout","id":"22","title":"Setting optimizing-compression-task-timeout"},"23":{"body":"type : string (duration) format : \"{integer}(s | m | h | d)\" default : \"1d\"","breadcrumbs":"Using the wasmtime CLI » Setting allowed-clock-drift-for-files-from-future","id":"23","title":"Setting allowed-clock-drift-for-files-from-future"},"24":{"body":"When the cache worker attempts acquiring a lock for some task, it checks if some other worker has already acquired such a lock. To be fault tolerant and eventually execute every task, the locks expire after some interval. However, because of clock drifts and different timezones, it would happen that some lock was created in the future. This setting defines a tolerance limit for these locks. If the time has been changed in the system (i.e. two years backwards), the cache system should still work properly. Thus, these locks will be treated as expired (assuming the tolerance is not too big).","breadcrumbs":"Using the wasmtime CLI » Locks","id":"24","title":"Locks"},"25":{"body":"Similarly to the locks, the cache files or their metadata might have modification time in distant future. The cache system tries to keep these files as long as possible. If the limits are not reached, the cache files will not be deleted. Otherwise, they will be treated as the oldest files, so they might survive. If the user actually uses the cache file, the modification time will be updated.","breadcrumbs":"Using the wasmtime CLI » Cache files","id":"25","title":"Cache files"},"26":{"body":"type : string (SI prefix) format : \"{integer}(K | M | G | T | P)?\" default : \"65536\" Soft limit for the file count in the cache directory. This doesn't include files with metadata. To learn more, please refer to the cache system section.","breadcrumbs":"Using the wasmtime CLI » Setting file-count-soft-limit","id":"26","title":"Setting file-count-soft-limit"},"27":{"body":"type : string (disk space) format : \"{integer}(K | Ki | M | Mi | G | Gi | T | Ti | P | Pi)?\" default : \"512Mi\" Soft limit for the total size* of files in the cache directory. This doesn't include files with metadata. To learn more, please refer to the cache system section. *this is the file size, not the space physically occupied on the disk.","breadcrumbs":"Using the wasmtime CLI » Setting files-total-size-soft-limit","id":"27","title":"Setting files-total-size-soft-limit"},"28":{"body":"type : string (percent) format : \"{integer}%\" default : \"70%\" If file-count-soft-limit is exceeded and the cache worker performs the cleanup task, then the worker will delete some cache files, so after the task, the file count should not exceed file-count-soft-limit * file-count-limit-percent-if-deleting . This doesn't include files with metadata. To learn more, please refer to the cache system section.","breadcrumbs":"Using the wasmtime CLI » Setting file-count-limit-percent-if-deleting","id":"28","title":"Setting file-count-limit-percent-if-deleting"},"29":{"body":"type : string (percent) format : \"{integer}%\" default : \"70%\" If files-total-size-soft-limit is exceeded and cache worker performs the cleanup task, then the worker will delete some cache files, so after the task, the files total size should not exceed files-total-size-soft-limit * files-total-size-limit-percent-if-deleting . This doesn't include files with metadata. To learn more, please refer to the cache system section.","breadcrumbs":"Using the wasmtime CLI » Setting files-total-size-limit-percent-if-deleting","id":"29","title":"Setting files-total-size-limit-percent-if-deleting"},"3":{"body":"... more coming soon","breadcrumbs":"Tutorial » Running hello-world.wasm with Wasmtime","id":"3","title":"Running hello-world.wasm with Wasmtime"},"30":{"body":"This is an implementation detail and might change in the future. Information provided here is meant to help understanding the big picture and configuring the cache. There are two main components - the cache system and the cache worker .","breadcrumbs":"Using the wasmtime CLI » How does the cache work?","id":"30","title":"How does the cache work?"},"31":{"body":"Handles GET and UPDATE cache requests. GET request - simply loads the cache from disk if it is there. UPDATE request - compresses received data with zstd and baseline-compression-level , then writes the data to the disk. In case of successful handling of a request, it notifies the cache worker about this event using the queue. The queue has a limited size of worker-event-queue-size . If it is full, it will drop new events until the cache worker pops some event from the queue.","breadcrumbs":"Using the wasmtime CLI » Cache system","id":"31","title":"Cache system"},"32":{"body":"The cache worker runs in a single thread with lower priority and pops events from the queue in a loop handling them one by one.","breadcrumbs":"Using the wasmtime CLI » Cache worker","id":"32","title":"Cache worker"},"33":{"body":"Read the statistics file for the cache file, increase the usage counter and write it back to the disk. Attempt recompressing the cache file if all of the following conditions are met: usage counter exceeds optimized-compression-usage-counter-threshold , the file is compressed with compression level lower than optimized-compression-level , no other worker has started working on this particular task within the last optimizing-compression-task-timeout interval. When recompressing, optimized-compression-level is used as a compression level.","breadcrumbs":"Using the wasmtime CLI » On GET request","id":"33","title":"On GET request"},"34":{"body":"Write a fresh statistics file for the cache file. Clean up the cache if no worker has attempted to do this within the last cleanup-interval . During this task: all unrecognized files and expired task locks in cache directory will be deleted if file-count-soft-limit or files-total-size-soft-limit is exceeded, then recognized files will be deleted according to file-count-limit-percent-if-deleting and files-total-size-limit-percent-if-deleting . Wasmtime uses Least Recently Used (LRU) cache replacement policy and requires that the filesystem maintains proper mtime (modification time) of the files. Files with future mtimes are treated specially - more details in allowed-clock-drift-for-files-from-future .","breadcrumbs":"Using the wasmtime CLI » On UPDATE request","id":"34","title":"On UPDATE request"},"35":{"body":"every cached WebAssembly module has its own statistics file every lock is a file","breadcrumbs":"Using the wasmtime CLI » Metadata files","id":"35","title":"Metadata files"},"36":{"body":"","breadcrumbs":"Writing WebAssembly","id":"36","title":"Writing WebAssembly"},"37":{"body":"The Rust Programming Language supports WebAssembly as a compilation target. If you're not familiar with Rust it's recommended to start with its introductory documentation . Compiling to WebAssembly will involve specifying the desired target via the --target flag, and to do this there are a number of \"target triples\" for WebAssembly compilation in Rust: wasm32-wasi - when using wasmtime this is likely what you'll be using. The WASI target is integrated into the standard library and is intended on producing standalone binaries. wasm32-unknown-unknown - this target, like the WASI one, is focused on producing single *.wasm binaries. The standard library, however, is largely stubbed out since the \"unknown\" part of the target means libstd can't assume anything. This means that while binaries will likely work in wasmtime, common conveniences like println! or panic! won't work. wasm32-unknown-emscripten - this target is intended to work in a web browser and produces a *.wasm file coupled with a *.js file, and it is not compatible with wasmtime. For the rest of this documentation we'll assume that you're using the wasm32-wasi target for compiling Rust code and executing inside of wasmtime.","breadcrumbs":"Writing WebAssembly » Rust","id":"37","title":"Rust"},"38":{"body":"Cross-compiling to WebAssembly involves a number of knobs that need configuration, but you can often gloss over these internal details by using build tooling intended for the WASI target. For example we can start out writing a WebAssembly binary with cargo wasi . First up we'll install cargo wasi : $ cargo install cargo-wasi Next we'll make a new Cargo project: $ cargo new hello-world\n$ cd hello-world Inside of src/main.rs you'll see the canonical Rust \"Hello, World!\" using println!. We'll be executing this for the wasm32-wasi target, so you'll want to make sure you're previously built wasmtime and inserted it into PATH ; $ cargo wasi run\ninfo: downloading component 'rust-std' for 'wasm32-wasi'\ninfo: installing component 'rust-std' for 'wasm32-wasi' Compiling hello-world v0.1.0 (/hello-world) Finished dev [unoptimized + debuginfo] target(s) in 0.16s Running `/.cargo/bin/cargo-wasi target/wasm32-wasi/debug/hello-world.wasm` Running `target/wasm32-wasi/debug/hello-world.wasm`\nHello, world! And we're already running our first WebAssembly code inside of wasmtime! While it's automatically happening for you as part of cargo wasi, you can also run wasmtime yourself: $ wasmtime target/wasm32-wasi/debug/hello-world.wasm\nHello, world! You can check out the introductory documentation of cargo-wasi as well for some more information.","breadcrumbs":"Writing WebAssembly » Hello, World!","id":"38","title":"Hello, World!"},"39":{"body":"Previously for \"Hello, World!\" we created a binary project which used src/main.rs. Not all *.wasm binaries are intended to be executed like commands, though. Some are intended to be loaded into applications and called through various APIs, acting more like libraries. For this use case you'll want to add this to Cargo.toml: # in Cargo.toml ... [lib]\ncrate-type = ['cdylib'] and afterwards you'll want to write your code in src/lib.rs like so: #[no_mangle]\npub extern \"C\" fn print_hello() { println!(\"Hello, world!\");\n} When you execute cargo wasi build that'll generate a *.wasm file which has one exported function, print_hello. We can then run it via the CLI like so: $ cargo wasi build Compiling hello-world v0.1.0 (/home/alex/code/hello-world) Finished dev [unoptimized + debuginfo] target(s) in 0.08s\n$ wasmtime --invoke print_hello target/wasm32-wasi/debug/hello_world.wasm\nHello, world! As a library crate one of your primary consumers may be other languages as well. You'll want to consult the section of this book for using wasmtime from Python` and after running through the basics there you can execute our file in Python: $ cp target/wasm32-wasi/debug/hello_world.wasm .\n$ python3\n>>> import wasmtime\n>>> import hello_world\n>>> hello_world.print_hello()\nHello, world!\n()\n>>> Note that this form of using #[no_mangle] Rust functions is pretty primitive. You're only able to work with primitive datatypes like integers and floats. While this works for some applications if you need to work with richer types like strings or structs, then you'll want to use the support in wasmtime for interface types.","breadcrumbs":"Writing WebAssembly » Writing Libraries","id":"39","title":"Writing Libraries"},"4":{"body":"This is an explanation of all examples to come ... more coming soon","breadcrumbs":"Examples","id":"4","title":"Examples"},"40":{"body":"Working with WebAssembly modules at the bare-bones level means that you're only dealing with integers and floats. Many APIs, however, want to work with things like byte arrays, strings, structures, etc. To facilitate these interactions the WebAssembly Interface Types Proposal comes into play. The wasmtime runtime has support for interface types, and the Rust toolchain has library support in a crate called wasm-bindgen . Note : WebAssembly Interface Types is still a WebAssembly proposal and is under active development. The toolchain may not match the exact specification, and during development you'll generally need to make sure tool versions are all kept up to date to ensure everything aligns right. This'll all smooth over as the proposal stabilizes! To get started with WebAssembly interface types let's write a library module which will generate a greeting for us. The module itself won't do any printing, we'll simply be working with some strings. To get starts let's add this to our Cargo.toml: [lib]\ncrate-type = ['cdylib'] [dependencies]\nwasm-bindgen = \"0.2.54\" Using this crate, we can then update our src/lib.rs with the following: use wasm_bindgen::prelude::*; #[wasm_bindgen]\npub fn greet(name: &str) -> String { format!(\"Hello, {}!\", name)\n} Then we can build this with: $ cargo wasi build --release Updating crates.io index\n... Finished dev [unoptimized + debuginfo] target(s) in 9.57s Downloading precompiled wasm-bindgen v0.2.54 and we have our new wasm binary! Note : for now when using wasm-bindgen you must use --release mode to build wasi binaries with interface types. We can then test out support for this with the CLI: $ wasmtime --invoke greet ./target/wasm32-wasi/release/hello_world.wasm \"wasmtime CLI\"\nwarning: using `--invoke` with a function that takes arguments is experimental and may break in the future\nwarning: using `--invoke` with a function that returns values is experimental and may break in the future\nHello, wasmtime CLI! Here we can see some experimental warnings, but we got our error message printed out! The first CLI parameter, \"wasmtime CLI\", was passed as the first argument of the greet function. The resulting string was then printed out to the console. Like before, we can also execute this with Python: $ cp target/wasm32-wasi/release/hello_world.wasm .\n$ python3\n>>> import wasmtime\n>>> import hello_world\n>>> hello_world.greet('python interpreter')\n'Hello, python interpreter!'\n>>> Note that wasm-bindgen was originally developed for JS and usage in a browser, but a subset of its implementation (such as arguments which are strings) are supported for WebAssembly interface types. You can also check out the reference documentation for wasm-bindgen for more information about how it works. Note that the wasm-bindgen support for wasm interface type is still in its nascent phase and is likely to be greatly improved in the future.","breadcrumbs":"Writing WebAssembly » WebAssembly Interface Types","id":"40","title":"WebAssembly Interface Types"},"41":{"body":"Currently only Rust functions can be exported from a wasm module. Rust functions must be #[no_mangle] to show up in the final binary, but if you're using #[wasm_bindgen] that will happen automatically for you. Memory is by default exported from Rust modules under the name memory. This can be tweaked with the -Clink-arg flag to rustc to pass flags to LLD, the WebAssembly code linker. Tables cannot be imported at this time. When using rustc directly there is no support for anyref and only one function table is supported. When using wasm-bindgen it may inject an anyref table if necessary, but this table is an internal detail and is not exported. The function table can be exported by passing the --export-table argument to LLD (via -C link-arg) or can be imported with the --import-table. Rust currently does not have support for exporting or importing custom global values.","breadcrumbs":"Writing WebAssembly » Exporting Rust functionality","id":"41","title":"Exporting Rust functionality"},"42":{"body":"Only functions can be imported in Rust at this time, and they can be imported via raw interfaces like: #[link(wasm_import_module = \"the-wasm-import-module\")]\nextern \"C\" { // imports the name `foo` from `the-wasm-import-module` fn foo(); // functions can have integer/float arguments/return values fn translate(a: i32) -> f32; // Note that the ABI of Rust and wasm is somewhat in flux, so while this // works, it's recommended to rely on raw integer/float values where // possible. fn translate_fancy(my_struct: MyStruct) -> u32; // you can also explicitly specify the name to import, this imports `bar` // instead of `baz` from `the-wasm-import-module`. #[link_name = \"bar\"] fn baz();\n} When you're using wasm-bindgen you would instead use: use wasm_bindgen::prelude::*; #[wasm_bindgen(module = \"the-wasm-import-module\")]\nextern \"C\" { fn foo(); fn baz(); // ...\n} Note that unless you're using interface types you likely don't need wasm-bindgen.","breadcrumbs":"Writing WebAssembly » Importing host functionality","id":"42","title":"Importing host functionality"},"43":{"body":"","breadcrumbs":"Writing WebAssembly » C/C++","id":"43","title":"C/C++"},"44":{"body":"","breadcrumbs":"Writing WebAssembly » Example: Markdown Parser","id":"44","title":"Example: Markdown Parser"},"45":{"body":"... more coming soon","breadcrumbs":"Embedding Wasmtime","id":"45","title":"Embedding Wasmtime"},"46":{"body":"This document shows how to embed Wasmtime using the Rust API, and run a simple wasm program.","breadcrumbs":"Embedding Wasmtime » Embedding Wasmtime in Rust","id":"46","title":"Embedding Wasmtime in Rust"},"47":{"body":"Let's create a simple WebAssembly file with a single exported function that returns an integer: (;; wat2wasm hello.wat -o $WASM_FILES/hello.wasm ;;)\n(module (func (export \"answer\") (result i32) i32.const 42 )\n)","breadcrumbs":"Embedding Wasmtime » Create some wasm","id":"47","title":"Create some wasm"},"48":{"body":"$ cargo new --bin wasmtime_hello\n$ cd wasmtime_hello\n$ cp $WASM_FILES/hello.wasm . We will be using the wasmtime engine/API to run the wasm file, so we will add the dependency to Cargo.toml: [dependencies]\nwasmtime = \"\" where \"\" is the current version number of the wasmtime crate. It is time to add code to the src/main.rs. First, storage needs to be activated: use wasmtime::*; let store = Store::default(); The HostRef will be used a lot -- it is a \"convenience\" object to store and refer an object between the host and the embedded environments. The hello.wasm can be read from the file system and provided to the Module object constructor as &[u8]: use std::fs::read; let hello_wasm = read(\"hello.wasm\").expect(\"wasm file\"); let module = HostRef::new(Module::new(&store, &hello_wasm).expect(\"wasm module\")); The module instance can now be created. Normally, you would provide exports, but in this case, there are none required: let instance = Instance::new(&store, &module, &[]).expect(\"wasm instance\"); Everything is set. If a WebAssembly module has a start function -- it was run. The instance's exports can be used at this point. wasmtime provides functions to look up an export by name, and ensure that it's a function: let answer = instance.find_export_by_name(\"answer\").expect(\"answer\").func().expect(\"function\"); The exported function can be called using the call method. Remember that in most of the cases, a HostRef<_> object will be returned, so borrow() or borrow_mut() method has to be used to refer the specific object. The exported \"answer\" function accepts no parameters and returns a single i32 value. let result = answer.borrow().call(&[]).expect(\"success\");\nprintln!(\"Answer: {}\", result[0].i32()); The names of the WebAssembly module's imports and exports can be discovered by means of module's corresponding methods.","breadcrumbs":"Embedding Wasmtime » Create rust project","id":"48","title":"Create rust project"},"49":{"body":"use std::fs::read;\nuse wasmtime::*; fn main() { let store = Store::default(); let wasm = read(\"hello.wasm\").expect(\"wasm file\"); let module = HostRef::new(Module::new(&store, &wasm).expect(\"wasm module\")); let instance = Instance::new(&store, &module, &[]).expect(\"wasm instance\"); let answer = instance.find_export_by_name(\"answer\").expect(\"answer\").func().expect(\"function\"); let result = answer.borrow().call(&[]).expect(\"success\"); println!(\"Answer: {}\", result[0].i32());\n}","breadcrumbs":"Embedding Wasmtime » src/main.rs","id":"49","title":"src/main.rs"},"5":{"body":"... more coming soon","breadcrumbs":"Examples » Markdown Parser","id":"5","title":"Markdown Parser"},"50":{"body":"... more coming soon","breadcrumbs":"Embedding Wasmtime » Embedding Wasmtime in C","id":"50","title":"Embedding Wasmtime in C"},"51":{"body":"... more coming soon","breadcrumbs":"Stability","id":"51","title":"Stability"},"52":{"body":"... more coming soon","breadcrumbs":"Stability » Release Process","id":"52","title":"Release Process"},"53":{"body":"The wasmtime project is a configurable and lightweight runtime for WebAssembly which has a number of ways it can be configured. Not all features are supported on all platforms, but it is intended that wasmtime can run in some capacity on almost all platforms! The matrix of what's being tested, what works, and what's supported where is evolving over time, and this document hopes to capture a snapshot of what the current state of the world looks like. All features of wasmtime should work on the following platforms: Linux x86_64 macOS x86_64 Windows x86_64 For more detailed information about supported platforms, please check out the sections below!","breadcrumbs":"Stability » Platform Support","id":"53","title":"Platform Support"},"54":{"body":"The JIT compiler, backed by either lightbeam or cranelift supports only the x86_64 architecture at this time. Support for at least ARM, AArch64, and x86 is planned at this time. Usage of the JIT compiler will require a host operating system which supports creating executable memory pages on-the-fly. In Rust terms this generally means that std needs to be supported on this platform.","breadcrumbs":"Stability » JIT compiler support","id":"54","title":"JIT compiler support"},"55":{"body":"At this time wasmtime does not have a mode in which it simply interprets WebAssembly code. It is planned to add support for an interpreter, however, and this will have minimal system dependencies. It is planned that the system will need to support some form of dynamic memory allocation, but other than that not much else will be needed.","breadcrumbs":"Stability » Interpreter support","id":"55","title":"Interpreter support"},"56":{"body":"The wasmtime project does not currently use #[no_std] for its crates, but this is not because it won't support it! At this time we're still gathering use cases for for what #[no_std] might entail, so if you're interested in this we'd love to hear about your use case! Feel free to open an issue on the wasmtime repository to discuss this.","breadcrumbs":"Stability » What about #[no_std]?","id":"56","title":"What about #[no_std]?"},"57":{"body":"... more coming soon","breadcrumbs":"Security","id":"57","title":"Security"},"58":{"body":"... more coming soon","breadcrumbs":"Security » Disclosure Policy","id":"58","title":"Disclosure Policy"},"59":{"body":"... more coming soon","breadcrumbs":"Security » Sandboxing","id":"59","title":"Sandboxing"},"6":{"body":"... more coming soon","breadcrumbs":"Using WebAssembly from your Language","id":"6","title":"Using WebAssembly from your Language"},"60":{"body":"We're excited to work on Wasmtime together with you! This guide should help you get up and running with Wasmtime development. But first, make sure you've read the Code of Conduct !","breadcrumbs":"Contributing","id":"60","title":"Contributing"},"61":{"body":"We chat about Wasmtime development on Gitter — join us! If you're having trouble building Wasmtime, aren't sure why a test is failing, or have any other questions, feel free to ask here. You can also open an issue !","breadcrumbs":"Join Our Chat","id":"61","title":"Join Our Chat"},"62":{"body":"If you're looking for something to do, these are great places to start: Issues labeled \"good first issue\" — these issues tend to be simple, what needs to be done is well known, and are good for new contributors to tackle. The goal is to learn Wasmtime's development workflow and make sure that you can build and test Wasmtime. Issues labeled \"help wanted\" — these are issues that we need a little help with! If you're unsure if an issue is a good fit for you or not, feel free to ask in a comment on the issue, or in chat.","breadcrumbs":"Finding Something to Hack On","id":"62","title":"Finding Something to Hack On"},"63":{"body":"This section describes everything required to build and run Wasmtime.","breadcrumbs":"Contributing » Building","id":"63","title":"Building"},"64":{"body":"Before we can actually build Wasmtime, we'll need to make sure these things are installed first.","breadcrumbs":"Contributing » Prerequisites","id":"64","title":"Prerequisites"},"65":{"body":"Install the Rust toolchain here. This includes rustup, cargo, rustc, etc...","breadcrumbs":"Contributing » The Rust Toolchain","id":"65","title":"The Rust Toolchain"},"66":{"body":"The wasmtime-fuzzing crate transitively depends on bindgen, which requires that your system has a libclang installed. Therefore, if you want to hack on Wasmtime's fuzzing infrastructure, you'll need libclang. Details on how to get libclang and make it available for bindgen are here.","breadcrumbs":"Contributing » libclang (optional)","id":"66","title":"libclang (optional)"},"67":{"body":"To make an unoptimized, debug build of the wasmtime CLI tool, go to the root of the repository and run this command: cargo build The built executable will be located at target/debug/wasmtime. To make an optimized build, run this command in the root of the repository: cargo build --release The built executable will be located at target/release/wasmtime. You can also build and run a local wasmtime CLI by replacing cargo build with cargo run.","breadcrumbs":"Contributing » Building the wasmtime CLI","id":"67","title":"Building the wasmtime CLI"},"68":{"body":"You can build any of the Wasmtime crates by appending -p wasmtime-whatever to the cargo build invocation. For example, to build the wasmtime-jit crate, execute this command: cargo build -p wasmtime-jit Alternatively, you can cd into the crate's directory, and run cargo build there, without needing to supply the -p flag: cd crates/jit/\ncargo build","breadcrumbs":"Contributing » Building Other Wasmtime Crates","id":"68","title":"Building Other Wasmtime Crates"},"69":{"body":"This section describes how to run Wasmtime's tests and add new tests. Before continuing, make sure you can build Wasmtime successfully. Can't run the tests if you can't build it!","breadcrumbs":"Contributing » Testing","id":"69","title":"Testing"},"7":{"body":"... more coming soon","breadcrumbs":"Using WebAssembly from your lanugage » Using WebAssembly from Python","id":"7","title":"Using WebAssembly from Python"},"70":{"body":"To run all of Wasmtime's tests (excluding WASI integration tests), execute this command: cargo test --all To include WASI integration tests, you'll need wasm32-wasi target installed, which, assuming you're using rustup.rs to manage your Rust versions, can be done as follows: rustup target add wasm32-wasi Next, to run all tests including the WASI integration tests, execute this command: cargo test --features test_programs --all You can also exclude a particular crate from testing with --exclude. For example, if you want to avoid testing the wastime-fuzzing crate — which requires that libclang is installed on your system, and for some reason maybe you don't have it — you can run: cargo test --all --exclude wasmtime-fuzzing","breadcrumbs":"Contributing » Running All Tests","id":"70","title":"Running All Tests"},"71":{"body":"You can test a particular Wasmtime crate with cargo test -p wasmtime-whatever. For example, to test the wasmtime-environ crate, execute this command: cargo test -p wasmtime-environ Alternatively, you can cd into the crate's directory, and run cargo test there, without needing to supply the -p flag: cd crates/environ/\ncargo test","breadcrumbs":"Contributing » Testing a Specific Crate","id":"71","title":"Testing a Specific Crate"},"72":{"body":"The spec testsuite itself is in a git submodule, so make sure you've checked it out and initialized its submodule: git submodule update --init When the submodule is checked out, Wasmtime runs the Wasm spec testsuite as part of testing the wasmtime-cli crate: cargo test -p wasmtime-cli","breadcrumbs":"Contributing » Running the Wasm Spec Tests","id":"72","title":"Running the Wasm Spec Tests"},"73":{"body":"WASI integration tests can be run separately from all other tests which can be useful when working on the wasi-common crate. This can be done by executing this command: cargo test --features test_programs -p test-programs","breadcrumbs":"Contributing » Running WASI Integration Tests Only","id":"73","title":"Running WASI Integration Tests Only"},"74":{"body":"","breadcrumbs":"Contributing » Adding New Tests","id":"74","title":"Adding New Tests"},"75":{"body":"For very \"unit-y\" tests, we add test modules in the same .rs file as the code that is being tested. These test modules are configured to only get compiled during testing with #[cfg(test)]. // some code... #[cfg(test)]\nmod tests { use super::*; #[test] fn some_test_for_that_code() { // ... }\n} If you're writing a unit test and a test module doesn't already exist, you can create one. For more \"integration-y\" tests, we create a tests directory within the crate, and put the tests inside there. For example, there are various code cache-related tests at crates/environ/tests/cache_*.rs. Always feel free to add a tests directory to a crate, if you want to add a new test and there aren't any existing tests.","breadcrumbs":"Contributing » Adding Rust's #[test]-Style Tests","id":"75","title":"Adding Rust's #[test]-Style Tests"},"76":{"body":"We use the spec testsuite as-is and without custom patches or a forked version. This probably isn't what you want to modify when adding a new Wasmtime test! When you have a Wasmtime-specific test that you'd like to write in Wast and use the Wast-style assertions, you can add it to our \"misc testsuite\". The misc testsuite uses the same syntax and assertions as the spec testsuite, but lives in tests/misc_testsuite. Feel free to add new tests to existing tests/misc_testsuite/*.wast files or create new ones as needed. These tests are run as part of the wasmtime-cli crate's tests. If you have a new test that you think really belongs in the spec testsuite, make sure it makes sense for every Wasm implementation to run your test (i.e. it isn't Wasmtime-specific) and send a pull request upstream . Once it is accepted in the upstream repo, we can update our git submodule and we'll start running the new tests.","breadcrumbs":"Contributing » Adding Specification-Style Wast Tests","id":"76","title":"Adding Specification-Style Wast Tests"},"77":{"body":"When you have a WASI-specific test program that you'd like to include as a test case to run against our WASI implementation, you can add it to our test-programs crate. In particular, you should drop a main-style Rust source file into crates/test-programs/wasi-tests/src/bin/some_new_test.rs with a name of your choice. And that's it! The build script included in the test-programs crate will automatically generate the necessary boilerplate code for your test program so that it's run on all supported hosts. If you would like to tweak which host to run the test program against however (for instance, only on Unix but on Windows), you can tweak that in the build script located under crates/test-programs/build.rs.","breadcrumbs":"Contributing » Adding WASI Integration Tests","id":"77","title":"Adding WASI Integration Tests"},"78":{"body":"","breadcrumbs":"Contributing » Fuzzing","id":"78","title":"Fuzzing"},"79":{"body":"Test case generators and oracles live in the wasmtime-fuzzing crate, located in the crates/fuzzing directory. A test case generator takes raw, unstructured input from a fuzzer and translates that into a test case. This might involve interpreting the raw input as \"DNA\" or pre-determined choices through a decision tree and using it to generate an in-memory data structure, or it might be a no-op where we interpret the raw bytes as if they were Wasm. An oracle takes a test case and determines whether we have a bug. For example, one of the simplest oracles is to take a Wasm binary as an input test case, validate and instantiate it, and (implicitly) check that no assertions failed or segfaults happened. A more complicated oracle might compare the result of executing a Wasm file with and without optimizations enabled, and make sure that the two executions are observably identical. Our test case generators and oracles strive to be fuzzer-agnostic: they can be reused with libFuzzer or AFL or any other fuzzing engine or driver.","breadcrumbs":"Contributing » Test Case Generators and Oracles","id":"79","title":"Test Case Generators and Oracles"},"8":{"body":"... more coming soon","breadcrumbs":"Using WebAssembly from your lanugage » Using WebAssembly from .NET","id":"8","title":"Using WebAssembly from .NET"},"80":{"body":"We combine a test case generator and one more more oracles into a fuzz target . Because the target needs to pipe the raw input from a fuzzer into the test case generator, it is specific to a particular fuzzer. This is generally fine, since they're only a couple of lines of glue code. Currently, all of our fuzz targets are written for libFuzzer and cargo fuzz . They are defined in the fuzz subdirectory. See fuzz/README.md for details on how to run these fuzz targets and set up a corpus of seed inputs.","breadcrumbs":"Contributing » libFuzzer and cargo fuzz Fuzz Targets","id":"80","title":"libFuzzer and cargo fuzz Fuzz Targets"},"81":{"body":"... more coming soon","breadcrumbs":"Contributing » CI","id":"81","title":"CI"},"82":{"body":"... more coming soon","breadcrumbs":"Contributing » Governance","id":"82","title":"Governance"},"83":{"body":"Note : this Code of Conduct pertains to individuals' behavior. Please also see the Organizational Code of Conduct .","breadcrumbs":"Contributing » Contributor Covenant Code of Conduct","id":"83","title":"Contributor Covenant Code of Conduct"},"84":{"body":"In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.","breadcrumbs":"Contributing » Our Pledge","id":"84","title":"Our Pledge"},"85":{"body":"Examples of behavior that contributes to creating a positive environment include: Using welcoming and inclusive language Being respectful of differing viewpoints and experiences Gracefully accepting constructive criticism Focusing on what is best for the community Showing empathy towards other community members Examples of unacceptable behavior by participants include: The use of sexualized language or imagery and unwelcome sexual attention or advances Trolling, insulting/derogatory comments, and personal or political attacks Public or private harassment Publishing others' private information, such as a physical or electronic address, without explicit permission Other conduct which could reasonably be considered inappropriate in a professional setting","breadcrumbs":"Contributing » Our Standards","id":"85","title":"Our Standards"},"86":{"body":"Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.","breadcrumbs":"Contributing » Our Responsibilities","id":"86","title":"Our Responsibilities"},"87":{"body":"This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.","breadcrumbs":"Contributing » Scope","id":"87","title":"Scope"},"88":{"body":"Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Bytecode Alliance CoC team at report@bytecodealliance.org . The CoC team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The CoC team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the Bytecode Alliance's leadership.","breadcrumbs":"Contributing » Enforcement","id":"88","title":"Enforcement"},"89":{"body":"This Code of Conduct is adapted from the Contributor Covenant , version 1.4, available at http://contributor-covenant.org/version/1/4","breadcrumbs":"Contributing » Attribution","id":"89","title":"Attribution"},"9":{"body":"... more coming soon","breadcrumbs":"Using WebAssembly from your lanugage » Using WebAssembly from Rust","id":"9","title":"Using WebAssembly from Rust"}},"length":90,"save":true},"fields":["title","body","breadcrumbs"],"index":{"body":{"root":{"0":{".":{"0":{"8":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}},"1":{"6":{"df":1,"docs":{"38":{"tf":1.0}}},"df":0,"docs":{}},"2":{".":{"5":{"4":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"1":{".":{"4":{"df":1,"docs":{"89":{"tf":1.0}}},"df":0,"docs":{}},"6":{"df":1,"docs":{"17":{"tf":1.0}}},"d":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"i":{"df":1,"docs":{"14":{"tf":1.0}}}},"h":{"df":1,"docs":{"21":{"tf":1.0}}}},"2":{"0":{"df":1,"docs":{"19":{"tf":1.0}}},"5":{"6":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"3":{"0":{"df":0,"docs":{},"m":{"df":2,"docs":{"14":{"tf":1.0},"22":{"tf":1.0}}}},"df":1,"docs":{"18":{"tf":1.0}}},"4":{"2":{"df":1,"docs":{"47":{"tf":1.0}}},"df":0,"docs":{}},"5":{"1":{"2":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":1,"docs":{"27":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"6":{"5":{"5":{"3":{"6":{"df":1,"docs":{"26":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"7":{"0":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}},"df":0,"docs":{}},"9":{".":{"5":{"7":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"a":{"a":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"h":{"6":{"4":{"df":1,"docs":{"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"b":{"df":0,"docs":{},"i":{"df":1,"docs":{"42":{"tf":1.0}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"16":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"88":{"tf":1.0}}}}},"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":4,"docs":{"48":{"tf":1.0},"76":{"tf":1.0},"85":{"tf":1.0},"86":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"34":{"tf":1.0}}},"df":0,"docs":{}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}}},"df":0,"docs":{},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.4142135623730951}}}}}},"t":{"df":2,"docs":{"39":{"tf":1.0},"87":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}}},"v":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}},"u":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"25":{"tf":1.0},"64":{"tf":1.0}}}},"df":0,"docs":{}}}},"d":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"89":{"tf":1.0}}}}},"d":{"df":9,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"55":{"tf":1.0},"69":{"tf":1.0},"70":{"tf":1.0},"75":{"tf":1.7320508075688772},"76":{"tf":1.4142135623730951},"77":{"tf":1.0}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"85":{"tf":1.0},"87":{"tf":1.0}}}}}}},"df":4,"docs":{"74":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.4142135623730951},"77":{"tf":1.0}},"v":{"a":{"df":0,"docs":{},"n":{"c":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":1,"docs":{"79":{"tf":1.0}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"g":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":1,"docs":{"84":{"tf":1.0}},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":2,"docs":{"40":{"tf":1.0},"86":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"n":{"c":{"df":1,"docs":{"88":{"tf":1.0}},"e":{"'":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"o":{"c":{"df":1,"docs":{"55":{"tf":1.0}}},"df":0,"docs":{},"w":{"df":4,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"34":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"i":{"df":4,"docs":{"21":{"tf":1.0},"24":{"tf":1.0},"38":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}}}},"w":{"a":{"df":0,"docs":{},"y":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{}}},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{".":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"(":{")":{".":{"c":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"(":{"&":{"[":{"]":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"47":{"tf":1.0},"48":{"tf":1.4142135623730951},"49":{"tf":1.0}}}}}},"y":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":1,"docs":{"41":{"tf":1.4142135623730951}}}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"37":{"tf":1.0}}}}}},"p":{"df":0,"docs":{},"i":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"46":{"tf":1.0}}},"p":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"68":{"tf":1.0}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}},"df":1,"docs":{"87":{"tf":1.0}}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}}}}}}},"r":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"54":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":2,"docs":{"61":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}}},"g":{"df":1,"docs":{"41":{"tf":1.4142135623730951}},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.7320508075688772},"41":{"tf":1.0}},"s":{"/":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"42":{"tf":1.0}}}}}}}}},"df":0,"docs":{}}}}}}}},"m":{"df":1,"docs":{"54":{"tf":1.0}}},"r":{"a":{"df":0,"docs":{},"y":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"k":{"df":2,"docs":{"61":{"tf":1.0},"62":{"tf":1.0}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":2,"docs":{"76":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"m":{"df":4,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"37":{"tf":1.4142135623730951},"70":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"85":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":4,"docs":{"21":{"tf":1.0},"24":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"89":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"38":{"tf":1.0},"41":{"tf":1.0},"77":{"tf":1.0}}}},"df":0,"docs":{}}}}},"v":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":2,"docs":{"66":{"tf":1.0},"89":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"70":{"tf":1.0}}},"df":0,"docs":{}}}}},"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"33":{"tf":1.0},"54":{"tf":1.0}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"24":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}},"r":{"df":1,"docs":{"42":{"tf":1.4142135623730951}},"e":{"df":1,"docs":{"40":{"tf":1.0}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"18":{"tf":1.0},"31":{"tf":1.0}}}}}},"h":{"df":1,"docs":{"10":{"tf":1.0}}},"i":{"c":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}}},"z":{"df":1,"docs":{"42":{"tf":1.7320508075688772}}}},"df":0,"docs":{},"e":{"df":5,"docs":{"18":{"tf":1.0},"21":{"tf":1.0},"53":{"tf":1.0},"75":{"tf":1.0},"85":{"tf":1.0}},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":3,"docs":{"40":{"tf":1.0},"64":{"tf":1.0},"69":{"tf":1.0}}}}},"h":{"a":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":5,"docs":{"14":{"tf":1.0},"83":{"tf":1.0},"85":{"tf":1.4142135623730951},"86":{"tf":1.7320508075688772},"88":{"tf":1.0}}}}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":1,"docs":{"76":{"tf":1.0}}}},"w":{"df":1,"docs":{"53":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"t":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"48":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"g":{"df":2,"docs":{"24":{"tf":1.0},"30":{"tf":1.0}}},"n":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":6,"docs":{"37":{"tf":1.7320508075688772},"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"41":{"tf":1.0},"79":{"tf":1.0}}}}},"d":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":4,"docs":{"40":{"tf":2.6457513110645907},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"66":{"tf":1.4142135623730951}}}}}},"df":1,"docs":{"48":{"tf":1.0}}}},"o":{"d":{"df":0,"docs":{},"i":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":1,"docs":{"77":{"tf":1.0}}}}}}}},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}},"o":{"df":0,"docs":{},"k":{"df":1,"docs":{"39":{"tf":1.0}}},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"n":{"df":1,"docs":{"15":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":1.0}}}}}},"df":1,"docs":{"48":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"87":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"k":{"df":1,"docs":{"40":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"37":{"tf":1.0},"40":{"tf":1.0}}}}}}}},"u":{"df":0,"docs":{},"g":{"df":1,"docs":{"79":{"tf":1.0}}},"i":{"df":0,"docs":{},"l":{"d":{"df":11,"docs":{"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"61":{"tf":1.0},"62":{"tf":1.0},"63":{"tf":1.4142135623730951},"64":{"tf":1.0},"67":{"tf":2.6457513110645907},"68":{"tf":2.6457513110645907},"69":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951}}},"df":0,"docs":{},"t":{"df":2,"docs":{"38":{"tf":1.0},"67":{"tf":1.4142135623730951}}}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"88":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":2,"docs":{"40":{"tf":1.0},"79":{"tf":1.0}}}}}},"c":{"/":{"c":{"df":1,"docs":{"43":{"tf":1.0}}},"df":0,"docs":{}},"a":{"c":{"df":0,"docs":{},"h":{"df":22,"docs":{"14":{"tf":2.23606797749979},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.4142135623730951},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"20":{"tf":1.4142135623730951},"21":{"tf":1.7320508075688772},"22":{"tf":1.4142135623730951},"24":{"tf":1.4142135623730951},"25":{"tf":2.23606797749979},"26":{"tf":1.4142135623730951},"27":{"tf":1.4142135623730951},"28":{"tf":1.7320508075688772},"29":{"tf":1.7320508075688772},"30":{"tf":2.0},"31":{"tf":2.23606797749979},"32":{"tf":1.4142135623730951},"33":{"tf":1.4142135623730951},"34":{"tf":2.0},"35":{"tf":1.0},"75":{"tf":1.0}},"e":{"_":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"16":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951}}}},"n":{"'":{"df":0,"docs":{},"t":{"df":2,"docs":{"37":{"tf":1.0},"69":{"tf":1.4142135623730951}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"38":{"tf":1.0}}}}},"p":{"a":{"c":{"df":1,"docs":{"53":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"l":{"df":3,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0}}}}}}},"/":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"/":{"c":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"o":{"df":1,"docs":{"38":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":12,"docs":{"38":{"tf":3.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"65":{"tf":1.0},"67":{"tf":2.0},"68":{"tf":2.0},"70":{"tf":1.7320508075688772},"71":{"tf":2.0},"72":{"tf":1.0},"73":{"tf":1.0},"80":{"tf":1.4142135623730951}}}}},"s":{"df":0,"docs":{},"e":{"df":7,"docs":{"31":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.4142135623730951},"56":{"tf":1.4142135623730951},"77":{"tf":1.0},"79":{"tf":2.6457513110645907},"80":{"tf":1.4142135623730951}}}}},"d":{"df":4,"docs":{"38":{"tf":1.0},"48":{"tf":1.0},"68":{"tf":1.4142135623730951},"71":{"tf":1.4142135623730951}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"b":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}}}}},"df":4,"docs":{"39":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"50":{"tf":1.0}},"f":{"df":0,"docs":{},"g":{"(":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{}}},"h":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":3,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"30":{"tf":1.0}}}},"t":{"df":2,"docs":{"61":{"tf":1.4142135623730951},"62":{"tf":1.0}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"k":{"df":6,"docs":{"24":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"72":{"tf":1.4142135623730951},"79":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"77":{"tf":1.0},"79":{"tf":1.0}}},"df":0,"docs":{}}}},"i":{"df":1,"docs":{"81":{"tf":1.0}},"r":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"l":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":2,"docs":{"86":{"tf":1.0},"87":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"n":{"df":2,"docs":{"21":{"tf":1.0},"34":{"tf":1.0}},"u":{"df":0,"docs":{},"p":{"df":5,"docs":{"14":{"tf":1.0},"21":{"tf":1.4142135623730951},"28":{"tf":1.0},"29":{"tf":1.0},"34":{"tf":1.0}}}}}},"df":0,"docs":{}},"i":{"df":7,"docs":{"11":{"tf":1.0},"13":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979},"67":{"tf":1.7320508075688772},"72":{"tf":1.4142135623730951},"76":{"tf":1.0}},"n":{"df":0,"docs":{},"k":{"df":1,"docs":{"41":{"tf":1.0}}}}},"o":{"c":{"df":0,"docs":{},"k":{"df":5,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"34":{"tf":1.0}}}},"df":0,"docs":{}}},"o":{"c":{"df":1,"docs":{"88":{"tf":1.7320508075688772}}},"d":{"df":0,"docs":{},"e":{"df":15,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.0},"41":{"tf":1.0},"48":{"tf":1.0},"55":{"tf":1.0},"60":{"tf":1.0},"75":{"tf":1.7320508075688772},"77":{"tf":1.0},"80":{"tf":1.0},"83":{"tf":1.7320508075688772},"86":{"tf":1.4142135623730951},"87":{"tf":1.0},"88":{"tf":1.0},"89":{"tf":1.0}}}},"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"80":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":24,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"3":{"tf":1.0},"4":{"tf":1.4142135623730951},"40":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}},"m":{"a":{"df":0,"docs":{},"n":{"d":{"df":6,"docs":{"39":{"tf":1.0},"67":{"tf":1.4142135623730951},"68":{"tf":1.0},"70":{"tf":1.4142135623730951},"71":{"tf":1.0},"73":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":3,"docs":{"62":{"tf":1.0},"85":{"tf":1.0},"86":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"37":{"tf":1.0},"73":{"tf":1.0}}}},"u":{"df":0,"docs":{},"n":{"df":3,"docs":{"84":{"tf":1.0},"85":{"tf":1.4142135623730951},"87":{"tf":1.4142135623730951}}}}},"p":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}},"t":{"df":1,"docs":{"37":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":5,"docs":{"37":{"tf":2.0},"38":{"tf":1.4142135623730951},"39":{"tf":1.0},"54":{"tf":1.7320508075688772},"75":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"30":{"tf":1.0},"38":{"tf":1.4142135623730951}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":6,"docs":{"18":{"tf":2.0},"19":{"tf":1.7320508075688772},"20":{"tf":1.0},"22":{"tf":1.4142135623730951},"31":{"tf":1.4142135623730951},"33":{"tf":2.6457513110645907}}}}}}}},"n":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"20":{"tf":1.0},"33":{"tf":1.0}}}},"u":{"c":{"df":0,"docs":{},"t":{"df":7,"docs":{"60":{"tf":1.0},"83":{"tf":1.7320508075688772},"85":{"tf":1.0},"86":{"tf":1.0},"87":{"tf":1.0},"88":{"tf":1.0},"89":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"df":0,"docs":{},"g":{"df":1,"docs":{"14":{"tf":1.4142135623730951}},"u":{"df":0,"docs":{},"r":{"df":6,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"30":{"tf":1.0},"38":{"tf":1.0},"53":{"tf":1.4142135623730951},"75":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"48":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.0}}}},"m":{"df":1,"docs":{"39":{"tf":1.0}}}}},"t":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"u":{"df":1,"docs":{"69":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":4,"docs":{"14":{"tf":1.0},"60":{"tf":1.0},"85":{"tf":1.0},"86":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":5,"docs":{"62":{"tf":1.0},"83":{"tf":1.0},"84":{"tf":1.0},"86":{"tf":1.0},"89":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"df":2,"docs":{"37":{"tf":1.0},"48":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"p":{"df":0,"docs":{},"u":{"df":1,"docs":{"80":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}}}}}}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"20":{"tf":1.0},"26":{"tf":1.4142135623730951},"28":{"tf":2.23606797749979},"34":{"tf":1.4142135623730951}},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"20":{"tf":1.0},"33":{"tf":1.7320508075688772}}}}}},"p":{"df":0,"docs":{},"l":{"df":2,"docs":{"37":{"tf":1.0},"80":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{".":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"/":{"1":{"/":{"4":{"df":1,"docs":{"89":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}},"df":2,"docs":{"83":{"tf":1.0},"89":{"tf":1.0}}}}}},"p":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.0}}},"r":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":1,"docs":{"54":{"tf":1.0}}}}}}}},"t":{"df":0,"docs":{},"e":{"'":{"df":3,"docs":{"68":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0}}},"df":14,"docs":{"16":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"48":{"tf":1.0},"56":{"tf":1.0},"66":{"tf":1.0},"68":{"tf":1.7320508075688772},"70":{"tf":1.4142135623730951},"71":{"tf":1.7320508075688772},"72":{"tf":1.0},"73":{"tf":1.0},"75":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951},"79":{"tf":1.0}},"s":{".":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":1,"docs":{"40":{"tf":1.0}}}}},"/":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"s":{"/":{"c":{"a":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"_":{"*":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":1,"docs":{"71":{"tf":1.0}}}}}}}}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"z":{"df":0,"docs":{},"z":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"j":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"68":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":10,"docs":{"14":{"tf":1.0},"2":{"tf":1.0},"24":{"tf":1.0},"39":{"tf":1.0},"47":{"tf":1.4142135623730951},"48":{"tf":1.4142135623730951},"54":{"tf":1.0},"75":{"tf":1.4142135623730951},"76":{"tf":1.0},"85":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}}},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"38":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":5,"docs":{"41":{"tf":1.4142135623730951},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"56":{"tf":1.0},"80":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":3,"docs":{"14":{"tf":1.0},"41":{"tf":1.0},"76":{"tf":1.0}}}}}}}},"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":2,"docs":{"31":{"tf":1.4142135623730951},"79":{"tf":1.0}},"t":{"df":0,"docs":{},"y":{"df":0,"docs":{},"p":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}},"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":1,"docs":{"67":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}}}}}}}},"c":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"19":{"tf":1.0},"22":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"79":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":15,"docs":{"14":{"tf":2.0},"15":{"tf":1.7320508075688772},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.4142135623730951},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"41":{"tf":1.0}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":3,"docs":{"24":{"tf":1.0},"80":{"tf":1.0},"87":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":4,"docs":{"25":{"tf":1.0},"28":{"tf":1.7320508075688772},"29":{"tf":1.7320508075688772},"34":{"tf":2.0}}}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"d":{"df":4,"docs":{"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"55":{"tf":1.0},"66":{"tf":1.0}}},"df":0,"docs":{}}}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":2,"docs":{"63":{"tf":1.0},"69":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"37":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":8,"docs":{"30":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"41":{"tf":1.0},"53":{"tf":1.0},"66":{"tf":1.0},"80":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"79":{"tf":1.4142135623730951},"88":{"tf":1.0}}}}}}}},"v":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":4,"docs":{"40":{"tf":1.7320508075688772},"60":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"24":{"tf":1.0},"85":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"41":{"tf":1.0}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":9,"docs":{"14":{"tf":1.0},"16":{"tf":1.7320508075688772},"26":{"tf":1.0},"27":{"tf":1.0},"34":{"tf":1.0},"68":{"tf":1.0},"71":{"tf":1.0},"75":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"s":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{}},"c":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"58":{"tf":1.0}}}}}}},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"48":{"tf":1.0}}}},"u":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"56":{"tf":1.0}}}}}},"df":0,"docs":{},"k":{"df":3,"docs":{"27":{"tf":1.4142135623730951},"31":{"tf":1.4142135623730951},"33":{"tf":1.0}}},"t":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"25":{"tf":1.0}}}}},"df":0,"docs":{}}}},"n":{"a":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":5,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"40":{"tf":1.0},"46":{"tf":1.0},"53":{"tf":1.0}}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":5,"docs":{"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}}}},"n":{"'":{"df":0,"docs":{},"t":{"df":3,"docs":{"14":{"tf":1.4142135623730951},"42":{"tf":1.0},"70":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":3,"docs":{"62":{"tf":1.0},"70":{"tf":1.0},"73":{"tf":1.0}}}},"w":{"df":0,"docs":{},"n":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"d":{"df":2,"docs":{"38":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":5,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"34":{"tf":1.0}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"p":{"df":3,"docs":{"17":{"tf":1.0},"31":{"tf":1.0},"77":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":3,"docs":{"34":{"tf":1.0},"40":{"tf":1.0},"75":{"tf":1.0}}}}},"y":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"55":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.4142135623730951}}}}},"df":1,"docs":{"87":{"tf":1.0}},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"m":{"b":{"df":1,"docs":{"46":{"tf":1.0}},"e":{"d":{"df":4,"docs":{"45":{"tf":1.0},"46":{"tf":1.0},"48":{"tf":1.0},"50":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}},"df":0,"docs":{}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":1.0}}}}}}}}},"df":0,"docs":{}}},"n":{"a":{"b":{"df":0,"docs":{},"l":{"df":3,"docs":{"14":{"tf":1.4142135623730951},"15":{"tf":1.0},"79":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"c":{"df":1,"docs":{"88":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"/":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"56":{"tf":1.0}}}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":4,"docs":{"48":{"tf":1.0},"71":{"tf":1.4142135623730951},"84":{"tf":1.0},"85":{"tf":1.0}}}}}}}},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"t":{"c":{"df":2,"docs":{"40":{"tf":1.0},"65":{"tf":1.0}}},"df":0,"docs":{},"h":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"84":{"tf":1.0}}},"df":0,"docs":{}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"17":{"tf":1.7320508075688772},"31":{"tf":2.0},"32":{"tf":1.0},"87":{"tf":1.0}},"u":{"df":1,"docs":{"24":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"y":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}},"t":{"df":0,"docs":{},"h":{"df":3,"docs":{"40":{"tf":1.0},"48":{"tf":1.0},"63":{"tf":1.0}}}}}}},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"v":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"x":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":11,"docs":{"14":{"tf":1.0},"38":{"tf":1.0},"4":{"tf":1.4142135623730951},"44":{"tf":1.0},"68":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"75":{"tf":1.0},"79":{"tf":1.0},"85":{"tf":1.4142135623730951},"87":{"tf":1.0}}}}}},"c":{"df":0,"docs":{},"e":{"df":3,"docs":{"28":{"tf":1.0},"29":{"tf":1.0},"33":{"tf":1.0}},"e":{"d":{"df":4,"docs":{"20":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"34":{"tf":1.0}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"14":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"60":{"tf":1.0}}}},"l":{"df":0,"docs":{},"u":{"d":{"df":1,"docs":{"70":{"tf":2.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":12,"docs":{"24":{"tf":1.0},"37":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.7320508075688772},"40":{"tf":1.0},"54":{"tf":1.0},"67":{"tf":1.4142135623730951},"68":{"tf":1.0},"70":{"tf":1.4142135623730951},"71":{"tf":1.0},"73":{"tf":1.0},"79":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":3,"docs":{"15":{"tf":1.0},"75":{"tf":1.4142135623730951},"76":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"84":{"tf":1.4142135623730951},"85":{"tf":1.0}},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}}}}}},"i":{"df":0,"docs":{},"r":{"df":2,"docs":{"24":{"tf":1.4142135623730951},"34":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"n":{"df":1,"docs":{"4":{"tf":1.0}}}},"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"42":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":4,"docs":{"39":{"tf":1.0},"41":{"tf":2.6457513110645907},"47":{"tf":1.4142135623730951},"48":{"tf":2.449489742783178}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":2,"docs":{"39":{"tf":1.0},"42":{"tf":1.4142135623730951}}}}}}}},"f":{"3":{"2":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"88":{"tf":1.0}}},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":2,"docs":{"61":{"tf":1.0},"79":{"tf":1.0}}},"r":{"df":1,"docs":{"86":{"tf":1.0}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"88":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"s":{"df":1,"docs":{"15":{"tf":1.0}}}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"37":{"tf":1.0}}}},"df":0,"docs":{}}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"24":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":3,"docs":{"53":{"tf":1.4142135623730951},"70":{"tf":1.0},"73":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":5,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"d":{"df":1,"docs":{"15":{"tf":1.0}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"e":{"df":25,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.4142135623730951},"22":{"tf":1.7320508075688772},"23":{"tf":1.0},"25":{"tf":2.449489742783178},"26":{"tf":1.7320508075688772},"27":{"tf":2.0},"28":{"tf":2.6457513110645907},"29":{"tf":2.6457513110645907},"33":{"tf":2.0},"34":{"tf":3.3166247903554},"35":{"tf":1.7320508075688772},"37":{"tf":1.4142135623730951},"39":{"tf":1.4142135623730951},"47":{"tf":1.0},"48":{"tf":1.7320508075688772},"49":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0},"79":{"tf":1.0}},"s":{"df":0,"docs":{},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":1,"docs":{"34":{"tf":1.0}}}}}}}}}},"n":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":1.0}}}},"d":{"df":1,"docs":{"62":{"tf":1.0}}},"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":6,"docs":{"38":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"48":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0}}}}},"t":{"df":1,"docs":{"62":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"g":{"df":4,"docs":{"37":{"tf":1.0},"41":{"tf":1.4142135623730951},"68":{"tf":1.0},"71":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":1,"docs":{"54":{"tf":1.0}}},"o":{"a":{"df":0,"docs":{},"t":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"42":{"tf":1.0}}}}},"n":{"df":5,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"42":{"tf":2.449489742783178},"49":{"tf":1.0},"75":{"tf":1.0}}},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"37":{"tf":1.0},"85":{"tf":1.0}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":5,"docs":{"33":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"70":{"tf":1.0},"88":{"tf":1.0}}}}}},"o":{"df":1,"docs":{"42":{"tf":1.7320508075688772}}},"r":{"df":0,"docs":{},"k":{"df":1,"docs":{"76":{"tf":1.0}}},"m":{"a":{"df":0,"docs":{},"t":{"!":{"(":{"\"":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":11,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0}}}},"df":2,"docs":{"39":{"tf":1.0},"55":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":6,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"84":{"tf":1.0}}},"s":{"df":0,"docs":{},"h":{"df":1,"docs":{"34":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":2,"docs":{"17":{"tf":1.0},"31":{"tf":1.0}}}},"n":{"c":{"df":1,"docs":{"47":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":6,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"41":{"tf":2.23606797749979},"42":{"tf":1.7320508075688772},"47":{"tf":1.0},"48":{"tf":2.23606797749979}}}}}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"87":{"tf":1.0},"88":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":9,"docs":{"14":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"30":{"tf":1.0},"34":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772}}}}},"z":{"df":0,"docs":{},"z":{"/":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{".":{"df":0,"docs":{},"m":{"d":{"df":1,"docs":{"80":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":5,"docs":{"66":{"tf":1.4142135623730951},"70":{"tf":1.4142135623730951},"78":{"tf":1.0},"79":{"tf":1.4142135623730951},"80":{"tf":2.6457513110645907}},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"79":{"tf":1.4142135623730951},"80":{"tf":1.4142135623730951}}}}}}}},"g":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"56":{"tf":1.0}}}}}}},"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":6,"docs":{"39":{"tf":1.0},"40":{"tf":1.4142135623730951},"54":{"tf":1.0},"77":{"tf":1.0},"79":{"tf":2.23606797749979},"80":{"tf":1.7320508075688772}}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"t":{"df":2,"docs":{"72":{"tf":1.4142135623730951},"76":{"tf":1.0}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"61":{"tf":1.0}}}}}}},"l":{"df":0,"docs":{},"o":{"b":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"38":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}}}},"o":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}},"df":1,"docs":{"67":{"tf":1.0}},"o":{"d":{"df":2,"docs":{"62":{"tf":1.7320508075688772},"88":{"tf":1.0}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"82":{"tf":1.0}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"62":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}}},"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}}},"u":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"60":{"tf":1.0}}},"df":0,"docs":{}}}},"h":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"62":{"tf":1.0},"66":{"tf":1.0}}}},"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"l":{"df":2,"docs":{"31":{"tf":1.4142135623730951},"32":{"tf":1.0}}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":4,"docs":{"24":{"tf":1.0},"38":{"tf":1.0},"41":{"tf":1.0},"79":{"tf":1.0}}}}}},"r":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":3,"docs":{"84":{"tf":1.0},"85":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"m":{"df":1,"docs":{"86":{"tf":1.0}}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"61":{"tf":1.0}}}}},"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"56":{"tf":1.0}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"48":{"tf":1.0}}}},"t":{"df":1,"docs":{"47":{"tf":1.0}}}},"df":0,"docs":{}}},"_":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"g":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"'":{"df":0,"docs":{},"p":{"df":0,"docs":{},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}}}}}}},"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}}}}}},"df":5,"docs":{"2":{"tf":1.0},"3":{"tf":1.0},"38":{"tf":2.8284271247461903},"39":{"tf":2.0},"40":{"tf":1.4142135623730951}}}},"p":{"df":4,"docs":{"14":{"tf":1.0},"30":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.4142135623730951}}}},"r":{"df":0,"docs":{},"e":{"df":5,"docs":{"30":{"tf":1.0},"40":{"tf":1.0},"61":{"tf":1.0},"65":{"tf":1.0},"66":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"/":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"/":{"c":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"53":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"42":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"77":{"tf":1.4142135623730951}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"&":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"<":{"_":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}},"df":1,"docs":{"48":{"tf":1.0}}}}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"p":{":":{"/":{"/":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"89":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"i":{".":{"df":2,"docs":{"24":{"tf":1.0},"76":{"tf":1.0}}},"3":{"2":{".":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"47":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"42":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0}}},"df":0,"docs":{}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"79":{"tf":1.0},"84":{"tf":1.4142135623730951}}}}}},"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"30":{"tf":1.0},"40":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0}}}}}}},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":5,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"41":{"tf":2.0},"42":{"tf":3.1622776601683795},"48":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"n":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"85":{"tf":1.0},"86":{"tf":1.0}}}}}}}}}},"c":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"u":{"d":{"df":9,"docs":{"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"65":{"tf":1.0},"70":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951},"85":{"tf":1.4142135623730951},"87":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"85":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"m":{"df":1,"docs":{"17":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":1,"docs":{"33":{"tf":1.0}}}},"df":0,"docs":{}}}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":1,"docs":{"40":{"tf":1.0}}}},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"d":{"df":0,"docs":{},"u":{"df":2,"docs":{"83":{"tf":1.0},"87":{"tf":1.0}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":1,"docs":{"38":{"tf":1.4142135623730951}},"r":{"df":0,"docs":{},"m":{"df":5,"docs":{"30":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"85":{"tf":1.0}}}}},"r":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"66":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"72":{"tf":1.0}},"i":{"df":1,"docs":{"72":{"tf":1.0}}}}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"41":{"tf":1.0}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":2,"docs":{"79":{"tf":1.7320508075688772},"80":{"tf":1.4142135623730951}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":1,"docs":{"38":{"tf":1.0}}}}},"i":{"d":{"df":3,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"75":{"tf":1.0}}},"df":0,"docs":{}},"t":{"a":{"df":0,"docs":{},"l":{"df":6,"docs":{"12":{"tf":1.0},"38":{"tf":1.7320508075688772},"64":{"tf":1.0},"65":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.4142135623730951}}},"n":{"c":{"df":5,"docs":{"48":{"tf":1.7320508075688772},"49":{"tf":1.4142135623730951},"77":{"tf":1.0},"86":{"tf":1.0},"88":{"tf":1.0}},"e":{"'":{"df":1,"docs":{"48":{"tf":1.0}}},".":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"_":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"b":{"df":0,"docs":{},"y":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"\"":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"\"":{")":{".":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"c":{"(":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"&":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"a":{"d":{"df":1,"docs":{"42":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"/":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"g":{"df":7,"docs":{"18":{"tf":1.0},"19":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"47":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"/":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"}":{"(":{"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"k":{"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":5,"docs":{"37":{"tf":1.0},"70":{"tf":1.7320508075688772},"73":{"tf":1.4142135623730951},"75":{"tf":1.0},"77":{"tf":1.0}}}},"n":{"d":{"df":4,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"53":{"tf":1.0}}},"df":0,"docs":{}},"r":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":2,"docs":{"56":{"tf":1.0},"84":{"tf":1.0}}}}},"f":{"a":{"c":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":2.8284271247461903},"42":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}},"n":{"df":2,"docs":{"38":{"tf":1.0},"41":{"tf":1.0}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":3,"docs":{"40":{"tf":1.4142135623730951},"55":{"tf":1.7320508075688772},"79":{"tf":1.4142135623730951}}}}}},"v":{"df":6,"docs":{"14":{"tf":1.0},"21":{"tf":1.4142135623730951},"22":{"tf":1.0},"24":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"c":{"df":1,"docs":{"14":{"tf":1.0}},"t":{"df":1,"docs":{"0":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"37":{"tf":1.0},"38":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"o":{"c":{"df":1,"docs":{"68":{"tf":1.0}}},"df":0,"docs":{},"k":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.7320508075688772}}},"l":{"df":0,"docs":{},"v":{"df":3,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"79":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"u":{"df":4,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":2.6457513110645907},"86":{"tf":1.0}}}}},"t":{"'":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"77":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"f":{"df":2,"docs":{"40":{"tf":1.0},"72":{"tf":1.0}}}}}}}},"j":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"54":{"tf":1.7320508075688772},"68":{"tf":1.4142135623730951}}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"61":{"tf":1.4142135623730951}}}}},"s":{"df":2,"docs":{"37":{"tf":1.0},"40":{"tf":1.0}}}},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":1,"docs":{"25":{"tf":1.0}}}},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}}},"n":{"df":0,"docs":{},"o":{"b":{"df":1,"docs":{"38":{"tf":1.0}}},"df":0,"docs":{},"w":{"df":1,"docs":{"14":{"tf":1.0}},"n":{"df":1,"docs":{"62":{"tf":1.0}}}}}}},"l":{"a":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.4142135623730951}}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"u":{"a":{"df":0,"docs":{},"g":{"df":4,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"6":{"tf":1.0},"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"g":{"df":1,"docs":{"37":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":1,"docs":{"88":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":6,"docs":{"14":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"62":{"tf":1.0}}}}},"df":0,"docs":{},"t":{"'":{"df":2,"docs":{"40":{"tf":1.4142135623730951},"47":{"tf":1.0}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":6,"docs":{"18":{"tf":1.7320508075688772},"19":{"tf":1.4142135623730951},"31":{"tf":1.0},"33":{"tf":2.0},"40":{"tf":1.0},"84":{"tf":1.0}}}}}},"i":{"b":{"c":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":2,"docs":{"66":{"tf":2.0},"70":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"z":{"df":0,"docs":{},"z":{"df":2,"docs":{"79":{"tf":1.0},"80":{"tf":1.4142135623730951}}}}}},"r":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":3,"docs":{"37":{"tf":1.4142135623730951},"39":{"tf":1.7320508075688772},"40":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"t":{"d":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"b":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"54":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":1,"docs":{"53":{"tf":1.0}}}}}}}}}}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":9,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.4142135623730951},"27":{"tf":1.4142135623730951},"28":{"tf":2.0},"29":{"tf":2.0},"31":{"tf":1.0},"34":{"tf":2.0}}}}},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}},"k":{"(":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"_":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":1,"docs":{"42":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}},"df":1,"docs":{"41":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"41":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"53":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"e":{"df":2,"docs":{"76":{"tf":1.0},"79":{"tf":1.0}}}}},"l":{"d":{"df":1,"docs":{"41":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"o":{"a":{"d":{"df":2,"docs":{"31":{"tf":1.0},"39":{"tf":1.0}}},"df":0,"docs":{}},"c":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"67":{"tf":1.0}}},"t":{"df":5,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"67":{"tf":1.4142135623730951},"77":{"tf":1.0},"79":{"tf":1.0}}}},"df":0,"docs":{},"k":{"df":4,"docs":{"24":{"tf":2.6457513110645907},"25":{"tf":1.0},"34":{"tf":1.0},"35":{"tf":1.0}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":1,"docs":{"25":{"tf":1.0}}}},"o":{"df":0,"docs":{},"k":{"df":4,"docs":{"16":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0},"62":{"tf":1.0}}},"p":{"df":1,"docs":{"32":{"tf":1.0}}}},"t":{"df":1,"docs":{"48":{"tf":1.0}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"56":{"tf":1.0}}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"32":{"tf":1.0},"33":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"u":{"df":1,"docs":{"34":{"tf":1.0}}}}},"m":{"a":{"c":{"df":0,"docs":{},"o":{"df":1,"docs":{"53":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"87":{"tf":1.0}}},"n":{"df":3,"docs":{"30":{"tf":1.0},"49":{"tf":1.0},"77":{"tf":1.0}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":5,"docs":{"34":{"tf":1.0},"84":{"tf":1.0},"86":{"tf":1.4142135623730951},"87":{"tf":1.0},"88":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}}},"k":{"df":0,"docs":{},"e":{"df":13,"docs":{"22":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0},"66":{"tf":1.0},"67":{"tf":1.4142135623730951},"69":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.4142135623730951},"79":{"tf":1.0},"84":{"tf":1.0}}}},"n":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"70":{"tf":1.0}}}},"d":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"15":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{},"i":{"df":1,"docs":{"40":{"tf":1.0}}}},"r":{"df":0,"docs":{},"k":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"44":{"tf":1.0},"5":{"tf":1.0}}}}}},"df":0,"docs":{}}},"t":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"x":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"y":{"b":{"df":1,"docs":{"70":{"tf":1.0}}},"df":0,"docs":{}}},"df":7,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"n":{"df":4,"docs":{"37":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0}},"t":{"df":1,"docs":{"30":{"tf":1.0}}}}},"d":{"df":0,"docs":{},"i":{"a":{"df":1,"docs":{"87":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"85":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":4,"docs":{"41":{"tf":1.4142135623730951},"54":{"tf":1.0},"55":{"tf":1.0},"79":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"s":{"a":{"df":0,"docs":{},"g":{"df":2,"docs":{"14":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"a":{"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":6,"docs":{"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"35":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"33":{"tf":1.0}},"h":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"48":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"n":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"55":{"tf":1.0}}}}},"s":{"c":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"o":{"d":{"df":1,"docs":{"75":{"tf":1.0}},"e":{"df":2,"docs":{"40":{"tf":1.0},"55":{"tf":1.0}}},"i":{"df":0,"docs":{},"f":{"df":2,"docs":{"25":{"tf":1.4142135623730951},"34":{"tf":1.0}},"i":{"df":1,"docs":{"76":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"l":{"df":8,"docs":{"35":{"tf":1.0},"40":{"tf":1.7320508075688772},"41":{"tf":1.4142135623730951},"42":{"tf":2.0},"47":{"tf":1.0},"48":{"tf":2.449489742783178},"49":{"tf":1.7320508075688772},"75":{"tf":1.7320508075688772}},"e":{"'":{"df":1,"docs":{"48":{"tf":1.4142135623730951}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":35,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"3":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.0},"4":{"tf":1.0},"40":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"53":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"75":{"tf":1.0},"79":{"tf":1.0},"8":{"tf":1.0},"80":{"tf":1.4142135623730951},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":1,"docs":{"34":{"tf":1.4142135623730951}}}}}},"u":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"55":{"tf":1.0}}}},"df":0,"docs":{}},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}}}},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":5,"docs":{"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"48":{"tf":1.4142135623730951},"77":{"tf":1.0}}}},"s":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"41":{"tf":1.0},"77":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"d":{"df":15,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.4142135623730951},"62":{"tf":1.4142135623730951},"64":{"tf":1.0},"66":{"tf":1.0},"68":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0},"80":{"tf":1.0}}},"df":0,"docs":{}},"t":{"df":1,"docs":{"8":{"tf":1.0}}},"w":{"df":12,"docs":{"14":{"tf":1.4142135623730951},"18":{"tf":1.0},"21":{"tf":1.0},"31":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"62":{"tf":1.0},"69":{"tf":1.0},"74":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":2.23606797749979}}},"x":{"df":0,"docs":{},"t":{"df":2,"docs":{"38":{"tf":1.0},"70":{"tf":1.0}}}}},"f":{"df":1,"docs":{"14":{"tf":1.0}}},"o":{"_":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"l":{"df":2,"docs":{"39":{"tf":1.4142135623730951},"41":{"tf":1.0}}}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"t":{"d":{"df":1,"docs":{"56":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":2,"docs":{"15":{"tf":1.0},"48":{"tf":1.0}}}},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"48":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"e":{"df":4,"docs":{"39":{"tf":1.0},"40":{"tf":2.0},"42":{"tf":1.4142135623730951},"83":{"tf":1.0}}},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":2,"docs":{"21":{"tf":1.0},"31":{"tf":1.0}}}}}},"w":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}},"u":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":4,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0}}}}},"df":0,"docs":{}}}},"o":{"b":{"df":0,"docs":{},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":2.23606797749979}}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"v":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"c":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"27":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"47":{"tf":1.0}},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":1,"docs":{"86":{"tf":1.0}}}}},"i":{"c":{"df":0,"docs":{},"i":{"df":1,"docs":{"87":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"87":{"tf":1.0}}}}}}},"l":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"df":0,"docs":{}},"n":{"c":{"df":1,"docs":{"76":{"tf":1.0}}},"df":9,"docs":{"20":{"tf":1.0},"32":{"tf":1.4142135623730951},"37":{"tf":1.0},"39":{"tf":1.4142135623730951},"41":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0},"80":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"87":{"tf":1.0}}}}}},"p":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":3,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"84":{"tf":1.0}}},"r":{"df":1,"docs":{"54":{"tf":1.0}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":6,"docs":{"19":{"tf":1.0},"20":{"tf":1.0},"22":{"tf":1.4142135623730951},"33":{"tf":2.0},"67":{"tf":1.0},"79":{"tf":1.0}}},"o":{"df":0,"docs":{},"n":{"df":3,"docs":{"13":{"tf":1.0},"14":{"tf":1.4142135623730951},"66":{"tf":1.0}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"l":{"df":2,"docs":{"79":{"tf":2.449489742783178},"80":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"df":0,"docs":{},"z":{"df":1,"docs":{"83":{"tf":1.0}}}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"84":{"tf":1.0}}}}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"85":{"tf":1.0}},"w":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":2,"docs":{"25":{"tf":1.0},"88":{"tf":1.0}}}}}}}}},"u":{"df":0,"docs":{},"t":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":2.0},"53":{"tf":1.0},"72":{"tf":1.4142135623730951}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":3,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0}}}}}},"p":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":1,"docs":{"54":{"tf":1.0}}}},"n":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}}},"r":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"44":{"tf":1.0},"5":{"tf":1.0}}}}},"t":{"df":4,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.0}},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.0}}}},"u":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"r":{"df":5,"docs":{"33":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"77":{"tf":1.0},"80":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"s":{"df":0,"docs":{},"s":{"df":3,"docs":{"21":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.4142135623730951}}}},"t":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{},"h":{"df":2,"docs":{"16":{"tf":1.4142135623730951},"38":{"tf":1.0}}}}},"df":8,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"68":{"tf":1.7320508075688772},"71":{"tf":1.7320508075688772},"72":{"tf":1.0},"73":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":3,"docs":{"28":{"tf":1.7320508075688772},"29":{"tf":1.7320508075688772},"34":{"tf":1.4142135623730951}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}}}}},"m":{"a":{"df":0,"docs":{},"n":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"85":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"83":{"tf":1.0}}}}},"df":0,"docs":{}}}},"h":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":0,"docs":{},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"27":{"tf":1.0},"85":{"tf":1.0}}},"df":0,"docs":{}}}}},"i":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"30":{"tf":1.0}}}}}},"df":1,"docs":{"27":{"tf":1.0}},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}}}},"l":{"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"62":{"tf":1.0}}}},"df":0,"docs":{},"n":{"df":2,"docs":{"54":{"tf":1.0},"55":{"tf":1.4142135623730951}}},"t":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":2,"docs":{"53":{"tf":2.23606797749979},"54":{"tf":1.0}}}}}}},"y":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":9,"docs":{"14":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"53":{"tf":1.0},"83":{"tf":1.0}}}},"d":{"df":0,"docs":{},"g":{"df":1,"docs":{"84":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":3,"docs":{"34":{"tf":1.0},"58":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}},"p":{"df":2,"docs":{"31":{"tf":1.0},"32":{"tf":1.0}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"s":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"l":{"df":2,"docs":{"25":{"tf":1.0},"42":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"df":2,"docs":{"87":{"tf":1.0},"88":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}},"df":1,"docs":{"79":{"tf":1.0}},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"x":{"df":3,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"64":{"tf":1.0}}}}}}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"39":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"38":{"tf":1.0},"39":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"39":{"tf":1.0}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}}}},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.7320508075688772}}}}}}}},"df":2,"docs":{"14":{"tf":1.0},"40":{"tf":1.7320508075688772}},"l":{"df":0,"docs":{},"n":{"!":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":2,"docs":{"37":{"tf":1.0},"38":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"32":{"tf":1.0}}}}}}},"v":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"o":{"b":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"52":{"tf":1.0}}}}}},"d":{"df":0,"docs":{},"u":{"c":{"df":1,"docs":{"37":{"tf":1.7320508075688772}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}},"g":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"m":{"df":4,"docs":{"37":{"tf":1.0},"46":{"tf":1.0},"73":{"tf":1.0},"77":{"tf":2.23606797749979}},"s":{"/":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"77":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":1,"docs":{"77":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":9,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0},"56":{"tf":1.0},"84":{"tf":1.0},"86":{"tf":1.4142135623730951},"87":{"tf":2.449489742783178},"88":{"tf":1.0}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"34":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"24":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"s":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}},"v":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"30":{"tf":1.0},"48":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}}},"u":{"b":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"85":{"tf":1.0},"87":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"76":{"tf":1.0}}}},"t":{"df":1,"docs":{"75":{"tf":1.0}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"3":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":3,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"7":{"tf":1.0}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"61":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"e":{"df":3,"docs":{"17":{"tf":1.7320508075688772},"31":{"tf":2.0},"32":{"tf":1.0}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"w":{"df":3,"docs":{"42":{"tf":1.4142135623730951},"79":{"tf":1.7320508075688772},"80":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"25":{"tf":1.0}}}},"d":{"(":{"\"":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"\"":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"33":{"tf":1.0},"48":{"tf":1.0},"60":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"76":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"70":{"tf":1.0},"85":{"tf":1.0}}}}}},"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":1,"docs":{"31":{"tf":1.0}}}},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"34":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":1,"docs":{"34":{"tf":1.0}}}},"m":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"d":{"df":2,"docs":{"37":{"tf":1.0},"42":{"tf":1.0}}},"df":0,"docs":{}}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":4,"docs":{"19":{"tf":1.0},"20":{"tf":1.0},"22":{"tf":1.0},"33":{"tf":1.4142135623730951}}}}}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":9,"docs":{"14":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951}}}}},"g":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"88":{"tf":1.0}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"84":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{}}},"l":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":3,"docs":{"40":{"tf":1.4142135623730951},"52":{"tf":1.0},"67":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":1,"docs":{"42":{"tf":1.0}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}}}}}},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"86":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{}}},"l":{"a":{"c":{"df":2,"docs":{"34":{"tf":1.0},"67":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"o":{"df":1,"docs":{"76":{"tf":1.0}},"r":{"df":0,"docs":{},"t":{"@":{"b":{"df":0,"docs":{},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"e":{".":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":1,"docs":{"88":{"tf":1.4142135623730951}}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":3,"docs":{"14":{"tf":1.0},"56":{"tf":1.0},"67":{"tf":1.4142135623730951}}}}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":1,"docs":{"87":{"tf":1.7320508075688772}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"31":{"tf":2.0},"33":{"tf":1.0},"34":{"tf":1.0},"76":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"r":{"df":6,"docs":{"34":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"63":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"86":{"tf":2.0}}}}}},"t":{"df":1,"docs":{"37":{"tf":1.0}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"[":{"0":{"]":{".":{"df":0,"docs":{},"i":{"3":{"2":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":5,"docs":{"40":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0},"49":{"tf":1.0},"79":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":3,"docs":{"40":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.4142135623730951}}}}}},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"79":{"tf":1.0}}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"i":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.0},"86":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":1,"docs":{"67":{"tf":1.4142135623730951}}}}},"s":{"df":1,"docs":{"75":{"tf":1.0}}},"u":{"df":0,"docs":{},"n":{"df":19,"docs":{"3":{"tf":1.0},"32":{"tf":1.0},"38":{"tf":2.23606797749979},"39":{"tf":1.4142135623730951},"46":{"tf":1.0},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"60":{"tf":1.0},"63":{"tf":1.0},"67":{"tf":2.0},"68":{"tf":1.0},"69":{"tf":1.4142135623730951},"70":{"tf":2.0},"71":{"tf":1.0},"72":{"tf":1.4142135623730951},"73":{"tf":1.4142135623730951},"76":{"tf":1.7320508075688772},"77":{"tf":1.7320508075688772},"80":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":2,"docs":{"40":{"tf":1.0},"53":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"75":{"tf":1.0}}},"c":{"df":2,"docs":{"41":{"tf":1.4142135623730951},"65":{"tf":1.0}}},"df":13,"docs":{"37":{"tf":2.23606797749979},"38":{"tf":1.7320508075688772},"39":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":2.23606797749979},"42":{"tf":1.4142135623730951},"46":{"tf":1.4142135623730951},"48":{"tf":1.0},"54":{"tf":1.0},"65":{"tf":1.4142135623730951},"70":{"tf":1.0},"77":{"tf":1.0},"9":{"tf":1.0}},"u":{"df":0,"docs":{},"p":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"70":{"tf":1.0}}}},"df":2,"docs":{"65":{"tf":1.0},"70":{"tf":1.0}}}}}}}},"s":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":2,"docs":{"75":{"tf":1.0},"76":{"tf":1.0}}}},"n":{"d":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"x":{"df":1,"docs":{"59":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"87":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":10,"docs":{"14":{"tf":1.4142135623730951},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"53":{"tf":1.0},"63":{"tf":1.0},"69":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"57":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"d":{"df":1,"docs":{"80":{"tf":1.0}}},"df":4,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"80":{"tf":1.0},"83":{"tf":1.0}}},"g":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{}}},"n":{"d":{"df":1,"docs":{"76":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"76":{"tf":1.0}}}},"p":{"a":{"df":0,"docs":{},"r":{"df":2,"docs":{"73":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{}},"t":{"df":18,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"48":{"tf":1.0},"80":{"tf":1.0},"85":{"tf":1.0}}},"x":{"df":0,"docs":{},"u":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}},"h":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"14":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":3,"docs":{"41":{"tf":1.0},"46":{"tf":1.0},"85":{"tf":1.0}}}}},"i":{"df":3,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"l":{"df":3,"docs":{"46":{"tf":1.0},"47":{"tf":1.0},"62":{"tf":1.0}},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}},"i":{"df":3,"docs":{"31":{"tf":1.0},"40":{"tf":1.0},"55":{"tf":1.0}}}}}},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"l":{"df":4,"docs":{"32":{"tf":1.0},"37":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"e":{"df":7,"docs":{"14":{"tf":1.0},"17":{"tf":1.4142135623730951},"27":{"tf":1.7320508075688772},"29":{"tf":2.23606797749979},"31":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951},"84":{"tf":1.0}}}}},"k":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":1,"docs":{"22":{"tf":1.0}}}}},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"n":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":1,"docs":{"53":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"o":{"c":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"87":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":6,"docs":{"14":{"tf":1.0},"26":{"tf":1.4142135623730951},"27":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951}}}},"m":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"t":{"_":{"c":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"75":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"62":{"tf":1.4142135623730951}}}},"w":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}},"o":{"df":0,"docs":{},"n":{"df":23,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"3":{"tf":1.0},"4":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}}},"u":{"df":0,"docs":{},"r":{"c":{"df":1,"docs":{"77":{"tf":1.0}}},"df":0,"docs":{}}}},"p":{"a":{"c":{"df":0,"docs":{},"e":{"df":2,"docs":{"27":{"tf":1.4142135623730951},"87":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"c":{"df":2,"docs":{"72":{"tf":1.7320508075688772},"76":{"tf":1.7320508075688772}},"i":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"34":{"tf":1.0}}}},"df":0,"docs":{},"f":{"df":7,"docs":{"40":{"tf":1.0},"48":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.7320508075688772},"77":{"tf":1.0},"80":{"tf":1.0},"88":{"tf":1.0}},"i":{"df":5,"docs":{"14":{"tf":1.4142135623730951},"15":{"tf":1.4142135623730951},"16":{"tf":1.0},"37":{"tf":1.0},"42":{"tf":1.0}}}}}},"df":0,"docs":{}}},"r":{"c":{"/":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"b":{".":{"df":0,"docs":{},"r":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"m":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{".":{"df":0,"docs":{},"r":{"df":4,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.0},"49":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"t":{"a":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":2,"docs":{"40":{"tf":1.0},"51":{"tf":1.0}}}}},"df":0,"docs":{},"n":{"d":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":1.0}}}}},"r":{"d":{"df":3,"docs":{"37":{"tf":1.4142135623730951},"85":{"tf":1.0},"86":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"t":{"df":8,"docs":{"22":{"tf":1.4142135623730951},"33":{"tf":1.0},"37":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.4142135623730951},"48":{"tf":1.0},"62":{"tf":1.0},"76":{"tf":1.0}}}},"t":{"df":0,"docs":{},"e":{"df":1,"docs":{"53":{"tf":1.0}}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":3,"docs":{"33":{"tf":1.0},"34":{"tf":1.0},"35":{"tf":1.0}}}}}}},"d":{":":{":":{"df":0,"docs":{},"f":{"df":0,"docs":{},"s":{":":{":":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":2,"docs":{"38":{"tf":1.4142135623730951},"54":{"tf":1.0}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":3,"docs":{"24":{"tf":1.0},"40":{"tf":1.4142135623730951},"56":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"48":{"tf":1.0}}}},"df":0,"docs":{},"e":{":":{":":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":2,"docs":{"48":{"tf":1.4142135623730951},"49":{"tf":1.0}}}}},"r":{"df":1,"docs":{"40":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":12,"docs":{"16":{"tf":1.0},"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979}}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"79":{"tf":1.0}}}}},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.0}},"u":{"df":0,"docs":{},"r":{"df":2,"docs":{"40":{"tf":1.0},"79":{"tf":1.0}}}}}},"df":0,"docs":{}}},"u":{"b":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":3,"docs":{"75":{"tf":1.0},"76":{"tf":1.4142135623730951},"77":{"tf":1.0}}}}}},"u":{"b":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"80":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":2,"docs":{"72":{"tf":2.0},"76":{"tf":1.0}}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"31":{"tf":1.0}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"69":{"tf":1.0}}}}}}}}}}},"df":0,"docs":{},"h":{"df":3,"docs":{"24":{"tf":1.0},"40":{"tf":1.0},"85":{"tf":1.0}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"75":{"tf":1.0}}}},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":9,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979},"41":{"tf":1.7320508075688772},"53":{"tf":2.0},"54":{"tf":2.23606797749979},"55":{"tf":1.7320508075688772},"56":{"tf":1.0},"77":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"df":11,"docs":{"22":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"60":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0},"69":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":1,"docs":{"25":{"tf":1.0}}}}}}},"y":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"x":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":17,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"18":{"tf":1.0},"21":{"tf":1.0},"24":{"tf":1.4142135623730951},"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"30":{"tf":1.0},"31":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.4142135623730951},"66":{"tf":1.0},"70":{"tf":1.0}}}}}}}},"t":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":2.6457513110645907}}}},"c":{"df":0,"docs":{},"k":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}}},"df":0,"docs":{},"k":{"df":0,"docs":{},"e":{"df":3,"docs":{"40":{"tf":1.0},"79":{"tf":1.7320508075688772},"86":{"tf":1.0}}}},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}},"/":{"d":{"df":0,"docs":{},"e":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"67":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"67":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"3":{"2":{"df":3,"docs":{"38":{"tf":1.7320508075688772},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":4,"docs":{"37":{"tf":3.0},"38":{"tf":1.4142135623730951},"70":{"tf":1.4142135623730951},"80":{"tf":2.23606797749979}}}}}},"s":{"df":0,"docs":{},"k":{"df":6,"docs":{"22":{"tf":2.0},"24":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"33":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951}}}}},"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"88":{"tf":1.7320508075688772}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"88":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"86":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}},"n":{"d":{"df":1,"docs":{"62":{"tf":1.0}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"m":{"df":1,"docs":{"54":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"m":{"df":2,"docs":{"70":{"tf":1.0},"73":{"tf":1.0}}}},"df":0,"docs":{}}}}}}},"df":15,"docs":{"40":{"tf":1.0},"53":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"69":{"tf":2.0},"70":{"tf":3.3166247903554},"71":{"tf":2.6457513110645907},"72":{"tf":1.7320508075688772},"73":{"tf":2.23606797749979},"74":{"tf":1.0},"75":{"tf":4.242640687119285},"76":{"tf":3.0},"77":{"tf":2.6457513110645907},"79":{"tf":2.6457513110645907},"80":{"tf":1.4142135623730951}},"s":{"/":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"c":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.0}},"e":{"/":{"*":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"s":{"df":0,"docs":{},"r":{"c":{"/":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"77":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"72":{"tf":1.4142135623730951},"76":{"tf":2.23606797749979}}}}}}}}},"h":{"a":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"77":{"tf":1.0}},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"39":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"66":{"tf":1.0}}}}}}},"y":{"'":{"df":0,"docs":{},"r":{"df":1,"docs":{"80":{"tf":1.0}}}},"df":0,"docs":{}}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":2,"docs":{"40":{"tf":1.0},"64":{"tf":1.0}}},"k":{"df":2,"docs":{"14":{"tf":1.0},"76":{"tf":1.0}}}},"s":{"'":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":1,"docs":{"32":{"tf":1.0}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"d":{"df":2,"docs":{"20":{"tf":1.4142135623730951},"33":{"tf":1.0}}},"df":0,"docs":{}}}}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":2,"docs":{"39":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}}}},"u":{"df":2,"docs":{"14":{"tf":1.0},"24":{"tf":1.0}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"m":{"df":0,"docs":{},"e":{"df":10,"docs":{"24":{"tf":1.0},"25":{"tf":1.4142135623730951},"34":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0},"54":{"tf":1.4142135623730951},"55":{"tf":1.0},"56":{"tf":1.0}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":2,"docs":{"22":{"tf":1.4142135623730951},"33":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"24":{"tf":1.0}}}}}}}},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"60":{"tf":1.0}}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.7320508075688772}}}}},"m":{"df":0,"docs":{},"l":{"df":1,"docs":{"14":{"tf":1.0}}}},"o":{"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"40":{"tf":1.4142135623730951},"65":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"df":3,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"67":{"tf":1.0}}}},"t":{"a":{"df":0,"docs":{},"l":{"df":4,"docs":{"14":{"tf":1.0},"27":{"tf":1.4142135623730951},"29":{"tf":2.23606797749979},"34":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"r":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"66":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"(":{"a":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"y":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"y":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"24":{"tf":1.0},"25":{"tf":1.0},"34":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":1,"docs":{"79":{"tf":1.0}}}},"i":{"df":1,"docs":{"25":{"tf":1.0}},"p":{"df":0,"docs":{},"l":{"df":1,"docs":{"37":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"85":{"tf":1.0}}}},"u":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"61":{"tf":1.0}}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"e":{"df":2,"docs":{"14":{"tf":1.0},"15":{"tf":1.4142135623730951}}}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"14":{"tf":1.4142135623730951}}}},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"1":{"tf":1.0}}}}}}},"w":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"k":{"df":2,"docs":{"41":{"tf":1.0},"77":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"o":{"df":3,"docs":{"24":{"tf":1.0},"30":{"tf":1.0},"79":{"tf":1.0}}}},"y":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":16,"docs":{"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.7320508075688772},"40":{"tf":3.0},"42":{"tf":1.0}}}}}},"u":{"3":{"2":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"8":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{},"n":{"a":{"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":3,"docs":{"85":{"tf":1.0},"86":{"tf":1.0},"88":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":3,"docs":{"40":{"tf":1.0},"41":{"tf":1.0},"77":{"tf":1.0}},"s":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"30":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.4142135623730951}}},"x":{"df":1,"docs":{"77":{"tf":1.0}}}},"k":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":2.0}}}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"42":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":4,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"67":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":1,"docs":{"34":{"tf":1.0}}}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"62":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"31":{"tf":1.0}}}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":1,"docs":{"85":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"p":{"d":{"a":{"df":0,"docs":{},"t":{"df":7,"docs":{"21":{"tf":1.0},"25":{"tf":1.0},"31":{"tf":1.4142135623730951},"34":{"tf":1.0},"40":{"tf":1.4142135623730951},"72":{"tf":1.0},"76":{"tf":1.0}}}},"df":0,"docs":{}},"df":9,"docs":{"16":{"tf":1.0},"21":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"48":{"tf":1.0},"60":{"tf":1.0},"80":{"tf":1.0}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}}}},"s":{"a":{"df":0,"docs":{},"g":{"df":5,"docs":{"17":{"tf":1.0},"20":{"tf":1.4142135623730951},"33":{"tf":1.7320508075688772},"40":{"tf":1.0},"54":{"tf":1.0}}}},"df":31,"docs":{"10":{"tf":1.0},"11":{"tf":1.0},"14":{"tf":2.0},"15":{"tf":1.4142135623730951},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"25":{"tf":1.0},"31":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.4142135623730951},"37":{"tf":1.7320508075688772},"38":{"tf":1.4142135623730951},"39":{"tf":2.23606797749979},"40":{"tf":2.449489742783178},"41":{"tf":1.7320508075688772},"42":{"tf":2.0},"46":{"tf":1.0},"48":{"tf":2.6457513110645907},"49":{"tf":1.4142135623730951},"56":{"tf":1.7320508075688772},"6":{"tf":1.0},"7":{"tf":1.0},"70":{"tf":1.0},"73":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.7320508075688772},"79":{"tf":1.0},"8":{"tf":1.0},"85":{"tf":1.4142135623730951},"87":{"tf":1.0},"9":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"v":{"0":{".":{"1":{".":{"0":{"df":2,"docs":{"38":{"tf":1.0},"39":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"2":{".":{"5":{"4":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}},"u":{"df":6,"docs":{"14":{"tf":2.0},"15":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"48":{"tf":1.0}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":2,"docs":{"39":{"tf":1.0},"75":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"75":{"tf":1.0}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":5,"docs":{"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"70":{"tf":1.0},"76":{"tf":1.0},"89":{"tf":1.0}}}}}}}},"i":{"a":{"df":5,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.0},"87":{"tf":1.0}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}}}},"w":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":8,"docs":{"38":{"tf":1.0},"39":{"tf":2.0},"40":{"tf":1.0},"62":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}}},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}},"s":{"df":0,"docs":{},"i":{"/":{"d":{"df":0,"docs":{},"e":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":1,"docs":{"38":{"tf":1.7320508075688772}}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"40":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":7,"docs":{"37":{"tf":2.0},"38":{"tf":3.3166247903554},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"70":{"tf":2.23606797749979},"73":{"tf":1.7320508075688772},"77":{"tf":1.7320508075688772}}},"m":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"3":{"2":{"df":3,"docs":{"37":{"tf":2.0},"38":{"tf":1.7320508075688772},"70":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"_":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":1,"docs":{"42":{"tf":1.0}}}}},"df":0,"docs":{}}}},":":{":":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"u":{"d":{"df":2,"docs":{"40":{"tf":1.0},"42":{"tf":1.0}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":2,"docs":{"40":{"tf":1.0},"41":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"47":{"tf":1.0},"48":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}}}}}}},"df":12,"docs":{"37":{"tf":1.4142135623730951},"39":{"tf":1.4142135623730951},"40":{"tf":3.0},"41":{"tf":1.4142135623730951},"42":{"tf":2.6457513110645907},"46":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0},"49":{"tf":1.0},"72":{"tf":1.4142135623730951},"76":{"tf":1.0},"79":{"tf":1.7320508075688772}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":34,"docs":{"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"14":{"tf":2.0},"18":{"tf":1.0},"19":{"tf":1.0},"3":{"tf":1.0},"34":{"tf":1.0},"37":{"tf":2.0},"38":{"tf":2.0},"39":{"tf":2.0},"40":{"tf":2.449489742783178},"45":{"tf":1.0},"46":{"tf":1.4142135623730951},"48":{"tf":2.23606797749979},"49":{"tf":1.0},"50":{"tf":1.0},"53":{"tf":1.7320508075688772},"55":{"tf":1.0},"56":{"tf":1.4142135623730951},"60":{"tf":1.4142135623730951},"61":{"tf":1.4142135623730951},"62":{"tf":1.0},"63":{"tf":1.0},"64":{"tf":1.0},"66":{"tf":1.0},"67":{"tf":1.7320508075688772},"68":{"tf":2.23606797749979},"69":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":2.0},"72":{"tf":1.7320508075688772},"76":{"tf":2.0},"79":{"tf":1.0}},"e":{"'":{"df":4,"docs":{"62":{"tf":1.0},"66":{"tf":1.0},"69":{"tf":1.0},"70":{"tf":1.0}}},"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"48":{"tf":1.4142135623730951}}}}}}}},"df":0,"docs":{}}}}}},"t":{"df":1,"docs":{"76":{"tf":1.7320508075688772}},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"70":{"tf":1.0}}}}}},"t":{"2":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"47":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"y":{"df":2,"docs":{"53":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{},"e":{"'":{"d":{"df":1,"docs":{"56":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.7320508075688772},"40":{"tf":1.0},"64":{"tf":1.0},"76":{"tf":1.0}}}},"r":{"df":3,"docs":{"38":{"tf":1.0},"56":{"tf":1.0},"60":{"tf":1.0}}}},"b":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"l":{"df":15,"docs":{"10":{"tf":1.0},"35":{"tf":1.0},"36":{"tf":1.0},"37":{"tf":1.7320508075688772},"38":{"tf":1.7320508075688772},"40":{"tf":2.6457513110645907},"41":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"55":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":3,"docs":{"14":{"tf":1.0},"84":{"tf":1.0},"85":{"tf":1.0}}}}},"df":0,"docs":{},"l":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"62":{"tf":1.0}}}}},"h":{"a":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"53":{"tf":1.4142135623730951}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"15":{"tf":1.0},"79":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"k":{"df":0,"docs":{},"i":{"df":1,"docs":{"86":{"tf":1.0}}}},"n":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":2,"docs":{"53":{"tf":1.0},"77":{"tf":1.0}}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":5,"docs":{"22":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0},"75":{"tf":1.0},"87":{"tf":1.0}}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":5,"docs":{"68":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0},"85":{"tf":1.0}}}}}}}},"o":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":3,"docs":{"37":{"tf":1.0},"40":{"tf":1.0},"56":{"tf":1.0}}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"k":{"df":12,"docs":{"14":{"tf":1.0},"22":{"tf":1.0},"24":{"tf":1.0},"30":{"tf":1.0},"33":{"tf":1.0},"37":{"tf":1.7320508075688772},"39":{"tf":1.7320508075688772},"40":{"tf":2.0},"42":{"tf":1.0},"53":{"tf":1.4142135623730951},"60":{"tf":1.0},"73":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":13,"docs":{"17":{"tf":1.4142135623730951},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.4142135623730951},"22":{"tf":2.0},"24":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"30":{"tf":1.0},"31":{"tf":1.7320508075688772},"32":{"tf":1.4142135623730951},"33":{"tf":1.0},"34":{"tf":1.0}}}},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":1,"docs":{"62":{"tf":1.0}}}}}}},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":3,"docs":{"2":{"tf":1.0},"3":{"tf":1.0},"38":{"tf":1.7320508075688772}}}}},"df":0,"docs":{}}},"df":3,"docs":{"38":{"tf":2.8284271247461903},"39":{"tf":2.449489742783178},"53":{"tf":1.0}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":9,"docs":{"31":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0},"36":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":2,"docs":{"18":{"tf":1.0},"80":{"tf":1.0}}}}}}}}},"x":{"8":{"6":{"_":{"6":{"4":{"df":2,"docs":{"53":{"tf":1.7320508075688772},"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"y":{"df":1,"docs":{"75":{"tf":1.4142135623730951}},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"u":{"'":{"d":{"df":2,"docs":{"76":{"tf":1.0},"77":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":6,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"39":{"tf":2.0},"40":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0}}}},"r":{"df":11,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.4142135623730951},"70":{"tf":1.0},"75":{"tf":1.0}}},"v":{"df":2,"docs":{"60":{"tf":1.0},"72":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"f":{"df":1,"docs":{"38":{"tf":1.0}}}}}}}}}},"z":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"d":{"df":3,"docs":{"18":{"tf":1.4142135623730951},"19":{"tf":1.0},"31":{"tf":1.0}}},"df":0,"docs":{}}}}}},"breadcrumbs":{"root":{"0":{".":{"0":{"8":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}},"1":{"6":{"df":1,"docs":{"38":{"tf":1.0}}},"df":0,"docs":{}},"2":{".":{"5":{"4":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"1":{".":{"4":{"df":1,"docs":{"89":{"tf":1.0}}},"df":0,"docs":{}},"6":{"df":1,"docs":{"17":{"tf":1.0}}},"d":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"i":{"df":1,"docs":{"14":{"tf":1.0}}}},"h":{"df":1,"docs":{"21":{"tf":1.0}}}},"2":{"0":{"df":1,"docs":{"19":{"tf":1.0}}},"5":{"6":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"3":{"0":{"df":0,"docs":{},"m":{"df":2,"docs":{"14":{"tf":1.0},"22":{"tf":1.0}}}},"df":1,"docs":{"18":{"tf":1.0}}},"4":{"2":{"df":1,"docs":{"47":{"tf":1.0}}},"df":0,"docs":{}},"5":{"1":{"2":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":1,"docs":{"27":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"6":{"5":{"5":{"3":{"6":{"df":1,"docs":{"26":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"7":{"0":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}},"df":0,"docs":{}},"9":{".":{"5":{"7":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"a":{"a":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"h":{"6":{"4":{"df":1,"docs":{"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"b":{"df":0,"docs":{},"i":{"df":1,"docs":{"42":{"tf":1.0}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"16":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"88":{"tf":1.0}}}}},"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":4,"docs":{"48":{"tf":1.0},"76":{"tf":1.0},"85":{"tf":1.0},"86":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"34":{"tf":1.0}}},"df":0,"docs":{}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}}},"df":0,"docs":{},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.4142135623730951}}}}}},"t":{"df":2,"docs":{"39":{"tf":1.0},"87":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}}},"v":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}},"u":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"25":{"tf":1.0},"64":{"tf":1.0}}}},"df":0,"docs":{}}}},"d":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"89":{"tf":1.0}}}}},"d":{"df":9,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"55":{"tf":1.0},"69":{"tf":1.0},"70":{"tf":1.0},"75":{"tf":1.7320508075688772},"76":{"tf":1.4142135623730951},"77":{"tf":1.0}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"85":{"tf":1.0},"87":{"tf":1.0}}}}}}},"df":4,"docs":{"74":{"tf":1.4142135623730951},"75":{"tf":1.4142135623730951},"76":{"tf":1.7320508075688772},"77":{"tf":1.4142135623730951}},"v":{"a":{"df":0,"docs":{},"n":{"c":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":1,"docs":{"79":{"tf":1.0}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"g":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":1,"docs":{"84":{"tf":1.0}},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":2,"docs":{"40":{"tf":1.0},"86":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"n":{"c":{"df":1,"docs":{"88":{"tf":1.0}},"e":{"'":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"o":{"c":{"df":1,"docs":{"55":{"tf":1.0}}},"df":0,"docs":{},"w":{"df":4,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"34":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"i":{"df":4,"docs":{"21":{"tf":1.0},"24":{"tf":1.0},"38":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}}}},"w":{"a":{"df":0,"docs":{},"y":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{}}},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{".":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"(":{")":{".":{"c":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"(":{"&":{"[":{"]":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"47":{"tf":1.0},"48":{"tf":1.4142135623730951},"49":{"tf":1.0}}}}}},"y":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":1,"docs":{"41":{"tf":1.4142135623730951}}}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"37":{"tf":1.0}}}}}},"p":{"df":0,"docs":{},"i":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"46":{"tf":1.0}}},"p":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"68":{"tf":1.0}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}},"df":1,"docs":{"87":{"tf":1.0}}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}}}}}}},"r":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"54":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":2,"docs":{"61":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}}},"g":{"df":1,"docs":{"41":{"tf":1.4142135623730951}},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.7320508075688772},"41":{"tf":1.0}},"s":{"/":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"42":{"tf":1.0}}}}}}}}},"df":0,"docs":{}}}}}}}},"m":{"df":1,"docs":{"54":{"tf":1.0}}},"r":{"a":{"df":0,"docs":{},"y":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"k":{"df":2,"docs":{"61":{"tf":1.0},"62":{"tf":1.0}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":2,"docs":{"76":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"m":{"df":4,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"37":{"tf":1.4142135623730951},"70":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"85":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":4,"docs":{"21":{"tf":1.0},"24":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"89":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}}}},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"38":{"tf":1.0},"41":{"tf":1.0},"77":{"tf":1.0}}}},"df":0,"docs":{}}}}},"v":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":2,"docs":{"66":{"tf":1.0},"89":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"70":{"tf":1.0}}},"df":0,"docs":{}}}}},"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"33":{"tf":1.0},"54":{"tf":1.0}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"24":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}},"r":{"df":1,"docs":{"42":{"tf":1.4142135623730951}},"e":{"df":1,"docs":{"40":{"tf":1.0}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"18":{"tf":1.4142135623730951},"31":{"tf":1.0}}}}}},"h":{"df":1,"docs":{"10":{"tf":1.4142135623730951}}},"i":{"c":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}}},"z":{"df":1,"docs":{"42":{"tf":1.7320508075688772}}}},"df":0,"docs":{},"e":{"df":5,"docs":{"18":{"tf":1.0},"21":{"tf":1.0},"53":{"tf":1.0},"75":{"tf":1.0},"85":{"tf":1.0}},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":3,"docs":{"40":{"tf":1.0},"64":{"tf":1.0},"69":{"tf":1.0}}}}},"h":{"a":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":5,"docs":{"14":{"tf":1.0},"83":{"tf":1.0},"85":{"tf":1.4142135623730951},"86":{"tf":1.7320508075688772},"88":{"tf":1.0}}}}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":1,"docs":{"76":{"tf":1.0}}}},"w":{"df":1,"docs":{"53":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"t":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"48":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"g":{"df":2,"docs":{"24":{"tf":1.0},"30":{"tf":1.0}}},"n":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":6,"docs":{"37":{"tf":1.7320508075688772},"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"41":{"tf":1.0},"79":{"tf":1.0}}}}},"d":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":4,"docs":{"40":{"tf":2.6457513110645907},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"66":{"tf":1.4142135623730951}}}}}},"df":1,"docs":{"48":{"tf":1.0}}}},"o":{"d":{"df":0,"docs":{},"i":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":1,"docs":{"77":{"tf":1.0}}}}}}}},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}},"o":{"df":0,"docs":{},"k":{"df":1,"docs":{"39":{"tf":1.0}}},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"n":{"df":1,"docs":{"15":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":1.0}}}}}},"df":1,"docs":{"48":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"87":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"k":{"df":1,"docs":{"40":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"37":{"tf":1.0},"40":{"tf":1.0}}}}}}}},"u":{"df":0,"docs":{},"g":{"df":1,"docs":{"79":{"tf":1.0}}},"i":{"df":0,"docs":{},"l":{"d":{"df":11,"docs":{"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"61":{"tf":1.0},"62":{"tf":1.0},"63":{"tf":1.7320508075688772},"64":{"tf":1.0},"67":{"tf":2.8284271247461903},"68":{"tf":2.8284271247461903},"69":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951}}},"df":0,"docs":{},"t":{"df":2,"docs":{"38":{"tf":1.0},"67":{"tf":1.4142135623730951}}}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"88":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":2,"docs":{"40":{"tf":1.0},"79":{"tf":1.0}}}}}},"c":{"/":{"c":{"df":1,"docs":{"43":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"a":{"c":{"df":0,"docs":{},"h":{"df":22,"docs":{"14":{"tf":2.449489742783178},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.4142135623730951},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"20":{"tf":1.4142135623730951},"21":{"tf":1.7320508075688772},"22":{"tf":1.4142135623730951},"24":{"tf":1.4142135623730951},"25":{"tf":2.449489742783178},"26":{"tf":1.4142135623730951},"27":{"tf":1.4142135623730951},"28":{"tf":1.7320508075688772},"29":{"tf":1.7320508075688772},"30":{"tf":2.23606797749979},"31":{"tf":2.449489742783178},"32":{"tf":1.7320508075688772},"33":{"tf":1.4142135623730951},"34":{"tf":2.0},"35":{"tf":1.0},"75":{"tf":1.0}},"e":{"_":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"16":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951}}}},"n":{"'":{"df":0,"docs":{},"t":{"df":2,"docs":{"37":{"tf":1.0},"69":{"tf":1.4142135623730951}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"38":{"tf":1.0}}}}},"p":{"a":{"c":{"df":1,"docs":{"53":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"l":{"df":3,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0}}}}}}},"/":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"/":{"c":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"o":{"df":1,"docs":{"38":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":12,"docs":{"38":{"tf":3.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"65":{"tf":1.0},"67":{"tf":2.0},"68":{"tf":2.0},"70":{"tf":1.7320508075688772},"71":{"tf":2.0},"72":{"tf":1.0},"73":{"tf":1.0},"80":{"tf":1.7320508075688772}}}}},"s":{"df":0,"docs":{},"e":{"df":7,"docs":{"31":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.4142135623730951},"56":{"tf":1.4142135623730951},"77":{"tf":1.0},"79":{"tf":2.8284271247461903},"80":{"tf":1.4142135623730951}}}}},"d":{"df":4,"docs":{"38":{"tf":1.0},"48":{"tf":1.0},"68":{"tf":1.4142135623730951},"71":{"tf":1.4142135623730951}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"b":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}}}}},"df":4,"docs":{"39":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"50":{"tf":1.4142135623730951}},"f":{"df":0,"docs":{},"g":{"(":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{}}},"h":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":3,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"30":{"tf":1.0}}}},"t":{"df":2,"docs":{"61":{"tf":1.7320508075688772},"62":{"tf":1.0}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"k":{"df":6,"docs":{"24":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"72":{"tf":1.4142135623730951},"79":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"77":{"tf":1.0},"79":{"tf":1.0}}},"df":0,"docs":{}}}},"i":{"df":1,"docs":{"81":{"tf":1.4142135623730951}},"r":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"l":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":2,"docs":{"86":{"tf":1.0},"87":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"n":{"df":2,"docs":{"21":{"tf":1.0},"34":{"tf":1.0}},"u":{"df":0,"docs":{},"p":{"df":5,"docs":{"14":{"tf":1.0},"21":{"tf":1.7320508075688772},"28":{"tf":1.0},"29":{"tf":1.0},"34":{"tf":1.0}}}}}},"df":0,"docs":{}},"i":{"df":30,"docs":{"11":{"tf":1.4142135623730951},"12":{"tf":1.0},"13":{"tf":1.7320508075688772},"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"30":{"tf":1.0},"31":{"tf":1.0},"32":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0},"35":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979},"67":{"tf":2.0},"72":{"tf":1.4142135623730951},"76":{"tf":1.0}},"n":{"df":0,"docs":{},"k":{"df":1,"docs":{"41":{"tf":1.0}}}}},"o":{"c":{"df":0,"docs":{},"k":{"df":5,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"24":{"tf":1.0},"34":{"tf":1.0}}}},"df":0,"docs":{}}},"o":{"c":{"df":1,"docs":{"88":{"tf":1.7320508075688772}}},"d":{"df":0,"docs":{},"e":{"df":15,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.0},"41":{"tf":1.0},"48":{"tf":1.0},"55":{"tf":1.0},"60":{"tf":1.0},"75":{"tf":1.7320508075688772},"77":{"tf":1.0},"80":{"tf":1.0},"83":{"tf":2.0},"86":{"tf":1.4142135623730951},"87":{"tf":1.0},"88":{"tf":1.0},"89":{"tf":1.0}}}},"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"80":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":24,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"3":{"tf":1.0},"4":{"tf":1.4142135623730951},"40":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}},"m":{"a":{"df":0,"docs":{},"n":{"d":{"df":6,"docs":{"39":{"tf":1.0},"67":{"tf":1.4142135623730951},"68":{"tf":1.0},"70":{"tf":1.4142135623730951},"71":{"tf":1.0},"73":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":3,"docs":{"62":{"tf":1.0},"85":{"tf":1.0},"86":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"37":{"tf":1.0},"73":{"tf":1.0}}}},"u":{"df":0,"docs":{},"n":{"df":3,"docs":{"84":{"tf":1.0},"85":{"tf":1.4142135623730951},"87":{"tf":1.4142135623730951}}}}},"p":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}},"t":{"df":1,"docs":{"37":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":5,"docs":{"37":{"tf":2.0},"38":{"tf":1.4142135623730951},"39":{"tf":1.0},"54":{"tf":2.0},"75":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"30":{"tf":1.0},"38":{"tf":1.4142135623730951}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":6,"docs":{"18":{"tf":2.23606797749979},"19":{"tf":2.0},"20":{"tf":1.4142135623730951},"22":{"tf":1.7320508075688772},"31":{"tf":1.4142135623730951},"33":{"tf":2.6457513110645907}}}}}}}},"n":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"20":{"tf":1.0},"33":{"tf":1.0}}}},"u":{"c":{"df":0,"docs":{},"t":{"df":7,"docs":{"60":{"tf":1.0},"83":{"tf":2.0},"85":{"tf":1.0},"86":{"tf":1.0},"87":{"tf":1.0},"88":{"tf":1.0},"89":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"df":0,"docs":{},"g":{"df":1,"docs":{"14":{"tf":1.4142135623730951}},"u":{"df":0,"docs":{},"r":{"df":6,"docs":{"14":{"tf":2.0},"15":{"tf":1.0},"30":{"tf":1.0},"38":{"tf":1.0},"53":{"tf":1.4142135623730951},"75":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"48":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.0}}}},"m":{"df":1,"docs":{"39":{"tf":1.0}}}}},"t":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"u":{"df":1,"docs":{"69":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":29,"docs":{"14":{"tf":1.0},"60":{"tf":1.4142135623730951},"63":{"tf":1.0},"64":{"tf":1.0},"65":{"tf":1.0},"66":{"tf":1.0},"67":{"tf":1.0},"68":{"tf":1.0},"69":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"72":{"tf":1.0},"73":{"tf":1.0},"74":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0},"78":{"tf":1.0},"79":{"tf":1.0},"80":{"tf":1.0},"81":{"tf":1.0},"82":{"tf":1.0},"83":{"tf":1.0},"84":{"tf":1.0},"85":{"tf":1.4142135623730951},"86":{"tf":1.4142135623730951},"87":{"tf":1.0},"88":{"tf":1.0},"89":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":5,"docs":{"62":{"tf":1.0},"83":{"tf":1.4142135623730951},"84":{"tf":1.0},"86":{"tf":1.0},"89":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"df":2,"docs":{"37":{"tf":1.0},"48":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"p":{"df":0,"docs":{},"u":{"df":1,"docs":{"80":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}}}}}}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"20":{"tf":1.0},"26":{"tf":1.7320508075688772},"28":{"tf":2.449489742783178},"34":{"tf":1.4142135623730951}},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"20":{"tf":1.4142135623730951},"33":{"tf":1.7320508075688772}}}}}},"p":{"df":0,"docs":{},"l":{"df":2,"docs":{"37":{"tf":1.0},"80":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{".":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"/":{"1":{"/":{"4":{"df":1,"docs":{"89":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}},"df":2,"docs":{"83":{"tf":1.4142135623730951},"89":{"tf":1.0}}}}}},"p":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.0}}},"r":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":1,"docs":{"54":{"tf":1.0}}}}}}}},"t":{"df":0,"docs":{},"e":{"'":{"df":3,"docs":{"68":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0}}},"df":14,"docs":{"16":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"48":{"tf":1.0},"56":{"tf":1.0},"66":{"tf":1.0},"68":{"tf":2.0},"70":{"tf":1.4142135623730951},"71":{"tf":2.0},"72":{"tf":1.0},"73":{"tf":1.0},"75":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951},"79":{"tf":1.0}},"s":{".":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":1,"docs":{"40":{"tf":1.0}}}}},"/":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"s":{"/":{"c":{"a":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"_":{"*":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":1,"docs":{"71":{"tf":1.0}}}}}}}}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"z":{"df":0,"docs":{},"z":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"j":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"68":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":10,"docs":{"14":{"tf":1.0},"2":{"tf":1.4142135623730951},"24":{"tf":1.0},"39":{"tf":1.0},"47":{"tf":1.7320508075688772},"48":{"tf":1.7320508075688772},"54":{"tf":1.0},"75":{"tf":1.4142135623730951},"76":{"tf":1.0},"85":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}}},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"38":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":5,"docs":{"41":{"tf":1.4142135623730951},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"56":{"tf":1.0},"80":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":3,"docs":{"14":{"tf":1.0},"41":{"tf":1.0},"76":{"tf":1.0}}}}}}}},"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":2,"docs":{"31":{"tf":1.4142135623730951},"79":{"tf":1.0}},"t":{"df":0,"docs":{},"y":{"df":0,"docs":{},"p":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}},"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":1,"docs":{"67":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}}}}}}}},"c":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"19":{"tf":1.0},"22":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"79":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":15,"docs":{"14":{"tf":2.0},"15":{"tf":1.7320508075688772},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.4142135623730951},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"41":{"tf":1.0}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":3,"docs":{"24":{"tf":1.0},"80":{"tf":1.0},"87":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":4,"docs":{"25":{"tf":1.0},"28":{"tf":2.0},"29":{"tf":2.0},"34":{"tf":2.0}}}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"d":{"df":4,"docs":{"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"55":{"tf":1.0},"66":{"tf":1.0}}},"df":0,"docs":{}}}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":2,"docs":{"63":{"tf":1.0},"69":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"37":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":8,"docs":{"30":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"41":{"tf":1.0},"53":{"tf":1.0},"66":{"tf":1.0},"80":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"79":{"tf":1.4142135623730951},"88":{"tf":1.0}}}}}}}},"v":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":4,"docs":{"40":{"tf":1.7320508075688772},"60":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"24":{"tf":1.0},"85":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"41":{"tf":1.0}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":9,"docs":{"14":{"tf":1.0},"16":{"tf":2.0},"26":{"tf":1.0},"27":{"tf":1.0},"34":{"tf":1.0},"68":{"tf":1.0},"71":{"tf":1.0},"75":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"s":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{}},"c":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"58":{"tf":1.4142135623730951}}}}}}},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"48":{"tf":1.0}}}},"u":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"56":{"tf":1.0}}}}}},"df":0,"docs":{},"k":{"df":3,"docs":{"27":{"tf":1.4142135623730951},"31":{"tf":1.4142135623730951},"33":{"tf":1.0}}},"t":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"25":{"tf":1.0}}}}},"df":0,"docs":{}}}},"n":{"a":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":5,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"40":{"tf":1.0},"46":{"tf":1.0},"53":{"tf":1.0}}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":5,"docs":{"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}}}},"n":{"'":{"df":0,"docs":{},"t":{"df":3,"docs":{"14":{"tf":1.4142135623730951},"42":{"tf":1.0},"70":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":3,"docs":{"62":{"tf":1.0},"70":{"tf":1.0},"73":{"tf":1.0}}}},"w":{"df":0,"docs":{},"n":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"d":{"df":2,"docs":{"38":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":5,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"24":{"tf":1.0},"34":{"tf":1.0}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"p":{"df":3,"docs":{"17":{"tf":1.0},"31":{"tf":1.0},"77":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":3,"docs":{"34":{"tf":1.0},"40":{"tf":1.0},"75":{"tf":1.0}}}}},"y":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"55":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.4142135623730951}}}}},"df":1,"docs":{"87":{"tf":1.0}},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"m":{"b":{"df":1,"docs":{"46":{"tf":1.0}},"e":{"d":{"df":6,"docs":{"45":{"tf":1.4142135623730951},"46":{"tf":1.7320508075688772},"47":{"tf":1.0},"48":{"tf":1.4142135623730951},"49":{"tf":1.0},"50":{"tf":1.7320508075688772}}},"df":0,"docs":{}}},"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}},"df":0,"docs":{}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":1.0}}}}}}}}},"df":0,"docs":{}}},"n":{"a":{"b":{"df":0,"docs":{},"l":{"df":3,"docs":{"14":{"tf":1.4142135623730951},"15":{"tf":1.4142135623730951},"79":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"c":{"df":1,"docs":{"88":{"tf":2.0}}},"df":0,"docs":{}}}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"/":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"56":{"tf":1.0}}}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":4,"docs":{"48":{"tf":1.0},"71":{"tf":1.4142135623730951},"84":{"tf":1.0},"85":{"tf":1.0}}}}}}}},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"t":{"c":{"df":2,"docs":{"40":{"tf":1.0},"65":{"tf":1.0}}},"df":0,"docs":{},"h":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"84":{"tf":1.0}}},"df":0,"docs":{}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"17":{"tf":2.0},"31":{"tf":2.0},"32":{"tf":1.0},"87":{"tf":1.0}},"u":{"df":1,"docs":{"24":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"y":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}},"t":{"df":0,"docs":{},"h":{"df":3,"docs":{"40":{"tf":1.0},"48":{"tf":1.0},"63":{"tf":1.0}}}}}}},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"v":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"x":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":12,"docs":{"14":{"tf":1.0},"38":{"tf":1.0},"4":{"tf":1.7320508075688772},"44":{"tf":1.4142135623730951},"5":{"tf":1.0},"68":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"75":{"tf":1.0},"79":{"tf":1.0},"85":{"tf":1.4142135623730951},"87":{"tf":1.0}}}}}},"c":{"df":0,"docs":{},"e":{"df":3,"docs":{"28":{"tf":1.0},"29":{"tf":1.0},"33":{"tf":1.0}},"e":{"d":{"df":4,"docs":{"20":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"34":{"tf":1.0}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"14":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"60":{"tf":1.0}}}},"l":{"df":0,"docs":{},"u":{"d":{"df":1,"docs":{"70":{"tf":2.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":12,"docs":{"24":{"tf":1.0},"37":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.7320508075688772},"40":{"tf":1.0},"54":{"tf":1.0},"67":{"tf":1.4142135623730951},"68":{"tf":1.0},"70":{"tf":1.4142135623730951},"71":{"tf":1.0},"73":{"tf":1.0},"79":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":3,"docs":{"15":{"tf":1.0},"75":{"tf":1.4142135623730951},"76":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"84":{"tf":1.4142135623730951},"85":{"tf":1.0}},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}}}}}},"i":{"df":0,"docs":{},"r":{"df":2,"docs":{"24":{"tf":1.4142135623730951},"34":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"n":{"df":1,"docs":{"4":{"tf":1.0}}}},"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"42":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":4,"docs":{"39":{"tf":1.0},"41":{"tf":2.8284271247461903},"47":{"tf":1.4142135623730951},"48":{"tf":2.449489742783178}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":2,"docs":{"39":{"tf":1.0},"42":{"tf":1.4142135623730951}}}}}}}},"f":{"3":{"2":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"88":{"tf":1.0}}},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":2,"docs":{"61":{"tf":1.0},"79":{"tf":1.0}}},"r":{"df":1,"docs":{"86":{"tf":1.0}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"88":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"s":{"df":1,"docs":{"15":{"tf":1.0}}}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"37":{"tf":1.0}}}},"df":0,"docs":{}}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"24":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":3,"docs":{"53":{"tf":1.4142135623730951},"70":{"tf":1.0},"73":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":5,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"d":{"df":1,"docs":{"15":{"tf":1.0}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"e":{"df":25,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.4142135623730951},"22":{"tf":1.7320508075688772},"23":{"tf":1.4142135623730951},"25":{"tf":2.6457513110645907},"26":{"tf":2.0},"27":{"tf":2.23606797749979},"28":{"tf":2.8284271247461903},"29":{"tf":2.8284271247461903},"33":{"tf":2.0},"34":{"tf":3.3166247903554},"35":{"tf":2.0},"37":{"tf":1.4142135623730951},"39":{"tf":1.4142135623730951},"47":{"tf":1.0},"48":{"tf":1.7320508075688772},"49":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0},"79":{"tf":1.0}},"s":{"df":0,"docs":{},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":1,"docs":{"34":{"tf":1.0}}}}}}}}}},"n":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":1.0}}}},"d":{"df":1,"docs":{"62":{"tf":1.4142135623730951}}},"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":6,"docs":{"38":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"48":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0}}}}},"t":{"df":1,"docs":{"62":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"g":{"df":4,"docs":{"37":{"tf":1.0},"41":{"tf":1.4142135623730951},"68":{"tf":1.0},"71":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":1,"docs":{"54":{"tf":1.0}}},"o":{"a":{"df":0,"docs":{},"t":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"42":{"tf":1.0}}}}},"n":{"df":5,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"42":{"tf":2.449489742783178},"49":{"tf":1.0},"75":{"tf":1.0}}},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"37":{"tf":1.0},"85":{"tf":1.0}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":5,"docs":{"33":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"70":{"tf":1.0},"88":{"tf":1.0}}}}}},"o":{"df":1,"docs":{"42":{"tf":1.7320508075688772}}},"r":{"df":0,"docs":{},"k":{"df":1,"docs":{"76":{"tf":1.0}}},"m":{"a":{"df":0,"docs":{},"t":{"!":{"(":{"\"":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":11,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0}}}},"df":2,"docs":{"39":{"tf":1.0},"55":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":6,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"84":{"tf":1.0}}},"s":{"df":0,"docs":{},"h":{"df":1,"docs":{"34":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":2,"docs":{"17":{"tf":1.0},"31":{"tf":1.0}}}},"n":{"c":{"df":1,"docs":{"47":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":6,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"41":{"tf":2.449489742783178},"42":{"tf":2.0},"47":{"tf":1.0},"48":{"tf":2.23606797749979}}}}}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"87":{"tf":1.0},"88":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":9,"docs":{"14":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"24":{"tf":1.0},"25":{"tf":1.0},"30":{"tf":1.0},"34":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772}}}}},"z":{"df":0,"docs":{},"z":{"/":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{".":{"df":0,"docs":{},"m":{"d":{"df":1,"docs":{"80":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":5,"docs":{"66":{"tf":1.4142135623730951},"70":{"tf":1.4142135623730951},"78":{"tf":1.4142135623730951},"79":{"tf":1.4142135623730951},"80":{"tf":3.0}},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"79":{"tf":1.4142135623730951},"80":{"tf":1.4142135623730951}}}}}}}},"g":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"56":{"tf":1.0}}}}}}},"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":6,"docs":{"39":{"tf":1.0},"40":{"tf":1.4142135623730951},"54":{"tf":1.0},"77":{"tf":1.0},"79":{"tf":2.449489742783178},"80":{"tf":1.7320508075688772}}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"t":{"df":2,"docs":{"72":{"tf":1.4142135623730951},"76":{"tf":1.0}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"61":{"tf":1.0}}}}}}},"l":{"df":0,"docs":{},"o":{"b":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"38":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}}}},"o":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}},"df":1,"docs":{"67":{"tf":1.0}},"o":{"d":{"df":2,"docs":{"62":{"tf":1.7320508075688772},"88":{"tf":1.0}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"82":{"tf":1.4142135623730951}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"62":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}}},"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}}},"u":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"60":{"tf":1.0}}},"df":0,"docs":{}}}},"h":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"62":{"tf":1.4142135623730951},"66":{"tf":1.0}}}},"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"l":{"df":2,"docs":{"31":{"tf":1.4142135623730951},"32":{"tf":1.0}}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":4,"docs":{"24":{"tf":1.0},"38":{"tf":1.0},"41":{"tf":1.0},"79":{"tf":1.0}}}}}},"r":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":3,"docs":{"84":{"tf":1.0},"85":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"m":{"df":1,"docs":{"86":{"tf":1.0}}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"61":{"tf":1.0}}}}},"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"56":{"tf":1.0}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"48":{"tf":1.0}}}},"t":{"df":1,"docs":{"47":{"tf":1.0}}}},"df":0,"docs":{}}},"_":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"g":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"'":{"df":0,"docs":{},"p":{"df":0,"docs":{},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}}}}}}},"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}}}}}},"df":5,"docs":{"2":{"tf":1.4142135623730951},"3":{"tf":1.4142135623730951},"38":{"tf":3.0},"39":{"tf":2.0},"40":{"tf":1.4142135623730951}}}},"p":{"df":4,"docs":{"14":{"tf":1.0},"30":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.4142135623730951}}}},"r":{"df":0,"docs":{},"e":{"df":5,"docs":{"30":{"tf":1.0},"40":{"tf":1.0},"61":{"tf":1.0},"65":{"tf":1.0},"66":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"/":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"/":{"c":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"53":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"42":{"tf":1.4142135623730951},"48":{"tf":1.0},"54":{"tf":1.0},"77":{"tf":1.4142135623730951}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"&":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"<":{"_":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}},"df":1,"docs":{"48":{"tf":1.0}}}}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"p":{":":{"/":{"/":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"89":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"i":{".":{"df":2,"docs":{"24":{"tf":1.0},"76":{"tf":1.0}}},"3":{"2":{".":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"47":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"42":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0}}},"df":0,"docs":{}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"79":{"tf":1.0},"84":{"tf":1.4142135623730951}}}}}},"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"30":{"tf":1.0},"40":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0}}}}}}},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":5,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"41":{"tf":2.0},"42":{"tf":3.3166247903554},"48":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"n":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"85":{"tf":1.0},"86":{"tf":1.0}}}}}}}}}},"c":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"u":{"d":{"df":9,"docs":{"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"65":{"tf":1.0},"70":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951},"85":{"tf":1.4142135623730951},"87":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"85":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"m":{"df":1,"docs":{"17":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":1,"docs":{"33":{"tf":1.0}}}},"df":0,"docs":{}}}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":1,"docs":{"40":{"tf":1.0}}}},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"d":{"df":0,"docs":{},"u":{"df":2,"docs":{"83":{"tf":1.0},"87":{"tf":1.0}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":1,"docs":{"38":{"tf":1.4142135623730951}},"r":{"df":0,"docs":{},"m":{"df":5,"docs":{"30":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"85":{"tf":1.0}}}}},"r":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"66":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"72":{"tf":1.0}},"i":{"df":1,"docs":{"72":{"tf":1.0}}}}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"41":{"tf":1.0}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":2,"docs":{"79":{"tf":1.7320508075688772},"80":{"tf":1.4142135623730951}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":1,"docs":{"38":{"tf":1.0}}}}},"i":{"d":{"df":3,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"75":{"tf":1.0}}},"df":0,"docs":{}},"t":{"a":{"df":0,"docs":{},"l":{"df":6,"docs":{"12":{"tf":1.4142135623730951},"38":{"tf":1.7320508075688772},"64":{"tf":1.0},"65":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.4142135623730951}}},"n":{"c":{"df":5,"docs":{"48":{"tf":1.7320508075688772},"49":{"tf":1.4142135623730951},"77":{"tf":1.0},"86":{"tf":1.0},"88":{"tf":1.0}},"e":{"'":{"df":1,"docs":{"48":{"tf":1.0}}},".":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"_":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"b":{"df":0,"docs":{},"y":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"\"":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"\"":{")":{".":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"c":{"(":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"&":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"a":{"d":{"df":1,"docs":{"42":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"/":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"g":{"df":7,"docs":{"18":{"tf":1.0},"19":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"47":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"/":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"}":{"(":{"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"k":{"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":5,"docs":{"37":{"tf":1.0},"70":{"tf":1.7320508075688772},"73":{"tf":1.7320508075688772},"75":{"tf":1.0},"77":{"tf":1.4142135623730951}}}},"n":{"d":{"df":4,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"53":{"tf":1.0}}},"df":0,"docs":{}},"r":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":2,"docs":{"56":{"tf":1.0},"84":{"tf":1.0}}}}},"f":{"a":{"c":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":3.0},"42":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}},"n":{"df":2,"docs":{"38":{"tf":1.0},"41":{"tf":1.0}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":3,"docs":{"40":{"tf":1.4142135623730951},"55":{"tf":2.0},"79":{"tf":1.4142135623730951}}}}}},"v":{"df":6,"docs":{"14":{"tf":1.0},"21":{"tf":1.7320508075688772},"22":{"tf":1.0},"24":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"c":{"df":1,"docs":{"14":{"tf":1.0}},"t":{"df":1,"docs":{"0":{"tf":1.4142135623730951}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"37":{"tf":1.0},"38":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"o":{"c":{"df":1,"docs":{"68":{"tf":1.0}}},"df":0,"docs":{},"k":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.7320508075688772}}},"l":{"df":0,"docs":{},"v":{"df":3,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"79":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"u":{"df":4,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":2.6457513110645907},"86":{"tf":1.0}}}}},"t":{"'":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"77":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"f":{"df":2,"docs":{"40":{"tf":1.0},"72":{"tf":1.0}}}}}}}},"j":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"54":{"tf":2.0},"68":{"tf":1.4142135623730951}}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"61":{"tf":1.7320508075688772}}}}},"s":{"df":2,"docs":{"37":{"tf":1.0},"40":{"tf":1.0}}}},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":1,"docs":{"25":{"tf":1.0}}}},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}}},"n":{"df":0,"docs":{},"o":{"b":{"df":1,"docs":{"38":{"tf":1.0}}},"df":0,"docs":{},"w":{"df":1,"docs":{"14":{"tf":1.0}},"n":{"df":1,"docs":{"62":{"tf":1.0}}}}}}},"l":{"a":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.4142135623730951}}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"u":{"a":{"df":0,"docs":{},"g":{"df":4,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"6":{"tf":1.4142135623730951},"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"g":{"df":4,"docs":{"10":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"g":{"df":1,"docs":{"37":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":1,"docs":{"88":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":6,"docs":{"14":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"62":{"tf":1.0}}}}},"df":0,"docs":{},"t":{"'":{"df":2,"docs":{"40":{"tf":1.4142135623730951},"47":{"tf":1.0}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":6,"docs":{"18":{"tf":2.0},"19":{"tf":1.7320508075688772},"31":{"tf":1.0},"33":{"tf":2.0},"40":{"tf":1.0},"84":{"tf":1.0}}}}}},"i":{"b":{"c":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":2,"docs":{"66":{"tf":2.23606797749979},"70":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"z":{"df":0,"docs":{},"z":{"df":2,"docs":{"79":{"tf":1.0},"80":{"tf":1.7320508075688772}}}}}},"r":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":3,"docs":{"37":{"tf":1.4142135623730951},"39":{"tf":2.0},"40":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"t":{"d":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"b":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"54":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":1,"docs":{"53":{"tf":1.0}}}}}}}}}}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":9,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.7320508075688772},"27":{"tf":1.7320508075688772},"28":{"tf":2.23606797749979},"29":{"tf":2.23606797749979},"31":{"tf":1.0},"34":{"tf":2.0}}}}},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}},"k":{"(":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"_":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":1,"docs":{"42":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}},"df":1,"docs":{"41":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"41":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"53":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"e":{"df":2,"docs":{"76":{"tf":1.0},"79":{"tf":1.0}}}}},"l":{"d":{"df":1,"docs":{"41":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"o":{"a":{"d":{"df":2,"docs":{"31":{"tf":1.0},"39":{"tf":1.0}}},"df":0,"docs":{}},"c":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"67":{"tf":1.0}}},"t":{"df":5,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"67":{"tf":1.4142135623730951},"77":{"tf":1.0},"79":{"tf":1.0}}}},"df":0,"docs":{},"k":{"df":4,"docs":{"24":{"tf":2.8284271247461903},"25":{"tf":1.0},"34":{"tf":1.0},"35":{"tf":1.0}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":1,"docs":{"25":{"tf":1.0}}}},"o":{"df":0,"docs":{},"k":{"df":4,"docs":{"16":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0},"62":{"tf":1.0}}},"p":{"df":1,"docs":{"32":{"tf":1.0}}}},"t":{"df":1,"docs":{"48":{"tf":1.0}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"56":{"tf":1.0}}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"32":{"tf":1.0},"33":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"u":{"df":1,"docs":{"34":{"tf":1.0}}}}},"m":{"a":{"c":{"df":0,"docs":{},"o":{"df":1,"docs":{"53":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"87":{"tf":1.0}}},"n":{"df":3,"docs":{"30":{"tf":1.0},"49":{"tf":1.0},"77":{"tf":1.0}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":5,"docs":{"34":{"tf":1.0},"84":{"tf":1.0},"86":{"tf":1.4142135623730951},"87":{"tf":1.0},"88":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}}},"k":{"df":0,"docs":{},"e":{"df":13,"docs":{"22":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0},"66":{"tf":1.0},"67":{"tf":1.4142135623730951},"69":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.4142135623730951},"79":{"tf":1.0},"84":{"tf":1.0}}}},"n":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"70":{"tf":1.0}}}},"d":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"15":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{},"i":{"df":1,"docs":{"40":{"tf":1.0}}}},"r":{"df":0,"docs":{},"k":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"44":{"tf":1.4142135623730951},"5":{"tf":1.4142135623730951}}}}}},"df":0,"docs":{}}},"t":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"x":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"y":{"b":{"df":1,"docs":{"70":{"tf":1.0}}},"df":0,"docs":{}}},"df":7,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"n":{"df":4,"docs":{"37":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0}},"t":{"df":1,"docs":{"30":{"tf":1.0}}}}},"d":{"df":0,"docs":{},"i":{"a":{"df":1,"docs":{"87":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"85":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":4,"docs":{"41":{"tf":1.4142135623730951},"54":{"tf":1.0},"55":{"tf":1.0},"79":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"s":{"a":{"df":0,"docs":{},"g":{"df":2,"docs":{"14":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"a":{"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":6,"docs":{"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"35":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"33":{"tf":1.0}},"h":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"48":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"n":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"55":{"tf":1.0}}}}},"s":{"c":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"o":{"d":{"df":1,"docs":{"75":{"tf":1.0}},"e":{"df":2,"docs":{"40":{"tf":1.0},"55":{"tf":1.0}}},"i":{"df":0,"docs":{},"f":{"df":2,"docs":{"25":{"tf":1.4142135623730951},"34":{"tf":1.0}},"i":{"df":1,"docs":{"76":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"l":{"df":8,"docs":{"35":{"tf":1.0},"40":{"tf":1.7320508075688772},"41":{"tf":1.4142135623730951},"42":{"tf":2.0},"47":{"tf":1.0},"48":{"tf":2.449489742783178},"49":{"tf":1.7320508075688772},"75":{"tf":1.7320508075688772}},"e":{"'":{"df":1,"docs":{"48":{"tf":1.4142135623730951}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":35,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"3":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.0},"4":{"tf":1.0},"40":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"53":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"75":{"tf":1.0},"79":{"tf":1.0},"8":{"tf":1.0},"80":{"tf":1.4142135623730951},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":1,"docs":{"34":{"tf":1.4142135623730951}}}}}},"u":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"55":{"tf":1.0}}}},"df":0,"docs":{}},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}}}},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":5,"docs":{"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"48":{"tf":1.4142135623730951},"77":{"tf":1.0}}}},"s":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"41":{"tf":1.0},"77":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"d":{"df":15,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.4142135623730951},"62":{"tf":1.4142135623730951},"64":{"tf":1.0},"66":{"tf":1.0},"68":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0},"80":{"tf":1.0}}},"df":0,"docs":{}},"t":{"df":1,"docs":{"8":{"tf":1.4142135623730951}}},"w":{"df":12,"docs":{"14":{"tf":1.4142135623730951},"18":{"tf":1.0},"21":{"tf":1.0},"31":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"62":{"tf":1.0},"69":{"tf":1.0},"74":{"tf":1.4142135623730951},"75":{"tf":1.0},"76":{"tf":2.23606797749979}}},"x":{"df":0,"docs":{},"t":{"df":2,"docs":{"38":{"tf":1.0},"70":{"tf":1.0}}}}},"f":{"df":1,"docs":{"14":{"tf":1.0}}},"o":{"_":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"l":{"df":2,"docs":{"39":{"tf":1.4142135623730951},"41":{"tf":1.0}}}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"t":{"d":{"df":1,"docs":{"56":{"tf":2.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":2,"docs":{"15":{"tf":1.0},"48":{"tf":1.0}}}},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"48":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"e":{"df":4,"docs":{"39":{"tf":1.0},"40":{"tf":2.0},"42":{"tf":1.4142135623730951},"83":{"tf":1.0}}},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":2,"docs":{"21":{"tf":1.0},"31":{"tf":1.0}}}}}},"w":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}},"u":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":4,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0}}}}},"df":0,"docs":{}}}},"o":{"b":{"df":0,"docs":{},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":2.23606797749979}}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"v":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"c":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"27":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"47":{"tf":1.0}},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":1,"docs":{"86":{"tf":1.0}}}}},"i":{"c":{"df":0,"docs":{},"i":{"df":1,"docs":{"87":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"87":{"tf":1.0}}}}}}},"l":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"df":0,"docs":{}},"n":{"c":{"df":1,"docs":{"76":{"tf":1.0}}},"df":9,"docs":{"20":{"tf":1.0},"32":{"tf":1.4142135623730951},"37":{"tf":1.0},"39":{"tf":1.4142135623730951},"41":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0},"80":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"87":{"tf":1.0}}}}}},"p":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":3,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"84":{"tf":1.0}}},"r":{"df":1,"docs":{"54":{"tf":1.0}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":6,"docs":{"19":{"tf":1.4142135623730951},"20":{"tf":1.4142135623730951},"22":{"tf":1.7320508075688772},"33":{"tf":2.0},"67":{"tf":1.0},"79":{"tf":1.0}}},"o":{"df":0,"docs":{},"n":{"df":3,"docs":{"13":{"tf":1.4142135623730951},"14":{"tf":1.4142135623730951},"66":{"tf":1.4142135623730951}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"l":{"df":2,"docs":{"79":{"tf":2.6457513110645907},"80":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"df":0,"docs":{},"z":{"df":1,"docs":{"83":{"tf":1.0}}}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"84":{"tf":1.0}}}}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"85":{"tf":1.0}},"w":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":2,"docs":{"25":{"tf":1.0},"88":{"tf":1.0}}}}}}}}},"u":{"df":0,"docs":{},"t":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":2.0},"53":{"tf":1.0},"72":{"tf":1.4142135623730951}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":3,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0}}}}}},"p":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":1,"docs":{"54":{"tf":1.0}}}},"n":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}}},"r":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"44":{"tf":1.4142135623730951},"5":{"tf":1.4142135623730951}}}}},"t":{"df":4,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.0}},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.0}}}},"u":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"r":{"df":5,"docs":{"33":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"77":{"tf":1.0},"80":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"s":{"df":0,"docs":{},"s":{"df":3,"docs":{"21":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.4142135623730951}}}},"t":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{},"h":{"df":2,"docs":{"16":{"tf":1.4142135623730951},"38":{"tf":1.0}}}}},"df":8,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"68":{"tf":1.7320508075688772},"71":{"tf":1.7320508075688772},"72":{"tf":1.0},"73":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":3,"docs":{"28":{"tf":2.0},"29":{"tf":2.0},"34":{"tf":1.4142135623730951}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}}}}},"m":{"a":{"df":0,"docs":{},"n":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"85":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"83":{"tf":1.0}}}}},"df":0,"docs":{}}}},"h":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":0,"docs":{},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"27":{"tf":1.0},"85":{"tf":1.0}}},"df":0,"docs":{}}}}},"i":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"30":{"tf":1.0}}}}}},"df":1,"docs":{"27":{"tf":1.0}},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}}}},"l":{"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"62":{"tf":1.0}}}},"df":0,"docs":{},"n":{"df":2,"docs":{"54":{"tf":1.0},"55":{"tf":1.4142135623730951}}},"t":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":2,"docs":{"53":{"tf":2.449489742783178},"54":{"tf":1.0}}}}}}},"y":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":9,"docs":{"14":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"53":{"tf":1.0},"83":{"tf":1.0}}}},"d":{"df":0,"docs":{},"g":{"df":1,"docs":{"84":{"tf":1.7320508075688772}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":3,"docs":{"34":{"tf":1.0},"58":{"tf":1.4142135623730951},"88":{"tf":1.0}}}},"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}},"p":{"df":2,"docs":{"31":{"tf":1.0},"32":{"tf":1.0}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"s":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"l":{"df":2,"docs":{"25":{"tf":1.0},"42":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"df":2,"docs":{"87":{"tf":1.0},"88":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}},"df":1,"docs":{"79":{"tf":1.0}},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"x":{"df":3,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"64":{"tf":1.4142135623730951}}}}}}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"39":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"38":{"tf":1.0},"39":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"39":{"tf":1.0}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}}}},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.7320508075688772}}}}}}}},"df":2,"docs":{"14":{"tf":1.0},"40":{"tf":1.7320508075688772}},"l":{"df":0,"docs":{},"n":{"!":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":2,"docs":{"37":{"tf":1.0},"38":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"32":{"tf":1.0}}}}}}},"v":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"o":{"b":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"52":{"tf":1.4142135623730951}}}}}},"d":{"df":0,"docs":{},"u":{"c":{"df":1,"docs":{"37":{"tf":1.7320508075688772}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}},"g":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"m":{"df":4,"docs":{"37":{"tf":1.0},"46":{"tf":1.0},"73":{"tf":1.0},"77":{"tf":2.23606797749979}},"s":{"/":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"77":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":1,"docs":{"77":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":9,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"56":{"tf":1.0},"84":{"tf":1.0},"86":{"tf":1.4142135623730951},"87":{"tf":2.449489742783178},"88":{"tf":1.0}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"34":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"24":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"s":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}},"v":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"30":{"tf":1.0},"48":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}}},"u":{"b":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"85":{"tf":1.0},"87":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"76":{"tf":1.0}}}},"t":{"df":1,"docs":{"75":{"tf":1.0}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"3":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":3,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"7":{"tf":1.4142135623730951}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"61":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"e":{"df":3,"docs":{"17":{"tf":2.0},"31":{"tf":2.0},"32":{"tf":1.0}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"w":{"df":3,"docs":{"42":{"tf":1.4142135623730951},"79":{"tf":1.7320508075688772},"80":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"25":{"tf":1.0}}}},"d":{"(":{"\"":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"\"":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"33":{"tf":1.0},"48":{"tf":1.0},"60":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"76":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"70":{"tf":1.0},"85":{"tf":1.0}}}}}},"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":1,"docs":{"31":{"tf":1.0}}}},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"34":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":1,"docs":{"34":{"tf":1.0}}}},"m":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"d":{"df":2,"docs":{"37":{"tf":1.0},"42":{"tf":1.0}}},"df":0,"docs":{}}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":4,"docs":{"19":{"tf":1.0},"20":{"tf":1.0},"22":{"tf":1.0},"33":{"tf":1.4142135623730951}}}}}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":9,"docs":{"14":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951}}}}},"g":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"88":{"tf":1.0}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"84":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{}}},"l":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":3,"docs":{"40":{"tf":1.4142135623730951},"52":{"tf":1.4142135623730951},"67":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":1,"docs":{"42":{"tf":1.0}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}}}}}},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"86":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{}}},"l":{"a":{"c":{"df":2,"docs":{"34":{"tf":1.0},"67":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"o":{"df":1,"docs":{"76":{"tf":1.0}},"r":{"df":0,"docs":{},"t":{"@":{"b":{"df":0,"docs":{},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"e":{".":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":1,"docs":{"88":{"tf":1.4142135623730951}}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":3,"docs":{"14":{"tf":1.0},"56":{"tf":1.0},"67":{"tf":1.4142135623730951}}}}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":1,"docs":{"87":{"tf":1.7320508075688772}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"31":{"tf":2.0},"33":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951},"76":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"r":{"df":6,"docs":{"34":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"63":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"86":{"tf":2.23606797749979}}}}}},"t":{"df":1,"docs":{"37":{"tf":1.0}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"[":{"0":{"]":{".":{"df":0,"docs":{},"i":{"3":{"2":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":5,"docs":{"40":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0},"49":{"tf":1.0},"79":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":3,"docs":{"40":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.4142135623730951}}}}}},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"79":{"tf":1.0}}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"i":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.0},"86":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":1,"docs":{"67":{"tf":1.4142135623730951}}}}},"s":{"df":1,"docs":{"75":{"tf":1.0}}},"u":{"df":0,"docs":{},"n":{"df":19,"docs":{"3":{"tf":1.4142135623730951},"32":{"tf":1.0},"38":{"tf":2.23606797749979},"39":{"tf":1.4142135623730951},"46":{"tf":1.0},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"60":{"tf":1.0},"63":{"tf":1.0},"67":{"tf":2.0},"68":{"tf":1.0},"69":{"tf":1.4142135623730951},"70":{"tf":2.23606797749979},"71":{"tf":1.0},"72":{"tf":1.7320508075688772},"73":{"tf":1.7320508075688772},"76":{"tf":1.7320508075688772},"77":{"tf":1.7320508075688772},"80":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":2,"docs":{"40":{"tf":1.0},"53":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"75":{"tf":1.4142135623730951}}},"c":{"df":2,"docs":{"41":{"tf":1.4142135623730951},"65":{"tf":1.0}}},"df":13,"docs":{"37":{"tf":2.449489742783178},"38":{"tf":1.7320508075688772},"39":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":2.449489742783178},"42":{"tf":1.4142135623730951},"46":{"tf":1.7320508075688772},"48":{"tf":1.4142135623730951},"54":{"tf":1.0},"65":{"tf":1.7320508075688772},"70":{"tf":1.0},"77":{"tf":1.0},"9":{"tf":1.4142135623730951}},"u":{"df":0,"docs":{},"p":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"70":{"tf":1.0}}}},"df":2,"docs":{"65":{"tf":1.0},"70":{"tf":1.0}}}}}}}},"s":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":2,"docs":{"75":{"tf":1.0},"76":{"tf":1.0}}}},"n":{"d":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"x":{"df":1,"docs":{"59":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"87":{"tf":1.4142135623730951}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":10,"docs":{"14":{"tf":1.4142135623730951},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"53":{"tf":1.0},"63":{"tf":1.0},"69":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"r":{"df":3,"docs":{"57":{"tf":1.4142135623730951},"58":{"tf":1.0},"59":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"d":{"df":1,"docs":{"80":{"tf":1.0}}},"df":4,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"80":{"tf":1.0},"83":{"tf":1.0}}},"g":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{}}},"n":{"d":{"df":1,"docs":{"76":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"76":{"tf":1.0}}}},"p":{"a":{"df":0,"docs":{},"r":{"df":2,"docs":{"73":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{}},"t":{"df":18,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"17":{"tf":1.4142135623730951},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"20":{"tf":1.4142135623730951},"21":{"tf":1.4142135623730951},"22":{"tf":1.4142135623730951},"23":{"tf":1.4142135623730951},"24":{"tf":1.0},"26":{"tf":1.4142135623730951},"27":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"48":{"tf":1.0},"80":{"tf":1.0},"85":{"tf":1.0}}},"x":{"df":0,"docs":{},"u":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}},"h":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"14":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":3,"docs":{"41":{"tf":1.0},"46":{"tf":1.0},"85":{"tf":1.0}}}}},"i":{"df":3,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"l":{"df":3,"docs":{"46":{"tf":1.0},"47":{"tf":1.0},"62":{"tf":1.0}},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}},"i":{"df":3,"docs":{"31":{"tf":1.0},"40":{"tf":1.0},"55":{"tf":1.0}}}}}},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"l":{"df":4,"docs":{"32":{"tf":1.0},"37":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"e":{"df":7,"docs":{"14":{"tf":1.0},"17":{"tf":1.7320508075688772},"27":{"tf":2.0},"29":{"tf":2.449489742783178},"31":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951},"84":{"tf":1.0}}}}},"k":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":1,"docs":{"22":{"tf":1.0}}}}},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"n":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":1,"docs":{"53":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"o":{"c":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"87":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":6,"docs":{"14":{"tf":1.0},"26":{"tf":1.7320508075688772},"27":{"tf":1.7320508075688772},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951}}}},"m":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"t":{"_":{"c":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"75":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"62":{"tf":1.7320508075688772}}}},"w":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}},"o":{"df":0,"docs":{},"n":{"df":23,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"3":{"tf":1.0},"4":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}}},"u":{"df":0,"docs":{},"r":{"c":{"df":1,"docs":{"77":{"tf":1.0}}},"df":0,"docs":{}}}},"p":{"a":{"c":{"df":0,"docs":{},"e":{"df":2,"docs":{"27":{"tf":1.4142135623730951},"87":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"c":{"df":2,"docs":{"72":{"tf":2.0},"76":{"tf":1.7320508075688772}},"i":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"34":{"tf":1.0}}}},"df":0,"docs":{},"f":{"df":7,"docs":{"40":{"tf":1.0},"48":{"tf":1.0},"71":{"tf":1.4142135623730951},"76":{"tf":2.0},"77":{"tf":1.0},"80":{"tf":1.0},"88":{"tf":1.0}},"i":{"df":5,"docs":{"14":{"tf":1.4142135623730951},"15":{"tf":1.4142135623730951},"16":{"tf":1.0},"37":{"tf":1.0},"42":{"tf":1.0}}}}}},"df":0,"docs":{}}},"r":{"c":{"/":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"b":{".":{"df":0,"docs":{},"r":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"m":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{".":{"df":0,"docs":{},"r":{"df":4,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.0},"49":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"t":{"a":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":7,"docs":{"40":{"tf":1.0},"51":{"tf":1.4142135623730951},"52":{"tf":1.0},"53":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.0},"56":{"tf":1.0}}}}},"df":0,"docs":{},"n":{"d":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":1.0}}}}},"r":{"d":{"df":3,"docs":{"37":{"tf":1.4142135623730951},"85":{"tf":1.4142135623730951},"86":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"t":{"df":8,"docs":{"22":{"tf":1.4142135623730951},"33":{"tf":1.0},"37":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.4142135623730951},"48":{"tf":1.0},"62":{"tf":1.0},"76":{"tf":1.0}}}},"t":{"df":0,"docs":{},"e":{"df":1,"docs":{"53":{"tf":1.0}}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":3,"docs":{"33":{"tf":1.0},"34":{"tf":1.0},"35":{"tf":1.0}}}}}}},"d":{":":{":":{"df":0,"docs":{},"f":{"df":0,"docs":{},"s":{":":{":":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":2,"docs":{"38":{"tf":1.4142135623730951},"54":{"tf":1.0}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":3,"docs":{"24":{"tf":1.0},"40":{"tf":1.4142135623730951},"56":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"48":{"tf":1.0}}}},"df":0,"docs":{},"e":{":":{":":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":2,"docs":{"48":{"tf":1.4142135623730951},"49":{"tf":1.0}}}}},"r":{"df":1,"docs":{"40":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":12,"docs":{"16":{"tf":1.0},"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979}}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"79":{"tf":1.0}}}}},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.0}},"u":{"df":0,"docs":{},"r":{"df":2,"docs":{"40":{"tf":1.0},"79":{"tf":1.0}}}}}},"df":0,"docs":{}}},"u":{"b":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":3,"docs":{"75":{"tf":1.4142135623730951},"76":{"tf":1.7320508075688772},"77":{"tf":1.0}}}}}},"u":{"b":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"80":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":2,"docs":{"72":{"tf":2.0},"76":{"tf":1.0}}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"31":{"tf":1.0}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"69":{"tf":1.0}}}}}}}}}}},"df":0,"docs":{},"h":{"df":3,"docs":{"24":{"tf":1.0},"40":{"tf":1.0},"85":{"tf":1.0}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"75":{"tf":1.0}}}},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":9,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979},"41":{"tf":1.7320508075688772},"53":{"tf":2.23606797749979},"54":{"tf":2.449489742783178},"55":{"tf":2.0},"56":{"tf":1.0},"77":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"df":11,"docs":{"22":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"60":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0},"69":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":1,"docs":{"25":{"tf":1.0}}}}}}},"y":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"x":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":17,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"18":{"tf":1.0},"21":{"tf":1.0},"24":{"tf":1.4142135623730951},"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"30":{"tf":1.0},"31":{"tf":1.4142135623730951},"48":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.4142135623730951},"66":{"tf":1.0},"70":{"tf":1.0}}}}}}}},"t":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":2.6457513110645907}}}},"c":{"df":0,"docs":{},"k":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}}},"df":0,"docs":{},"k":{"df":0,"docs":{},"e":{"df":3,"docs":{"40":{"tf":1.0},"79":{"tf":1.7320508075688772},"86":{"tf":1.0}}}},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}},"/":{"d":{"df":0,"docs":{},"e":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"67":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"67":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"3":{"2":{"df":3,"docs":{"38":{"tf":1.7320508075688772},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":4,"docs":{"37":{"tf":3.0},"38":{"tf":1.4142135623730951},"70":{"tf":1.4142135623730951},"80":{"tf":2.449489742783178}}}}}},"s":{"df":0,"docs":{},"k":{"df":6,"docs":{"22":{"tf":2.23606797749979},"24":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"33":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951}}}}},"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"88":{"tf":1.7320508075688772}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"88":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"86":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}},"n":{"d":{"df":1,"docs":{"62":{"tf":1.0}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"m":{"df":1,"docs":{"54":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"m":{"df":2,"docs":{"70":{"tf":1.0},"73":{"tf":1.0}}}},"df":0,"docs":{}}}}}}},"df":15,"docs":{"40":{"tf":1.0},"53":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"69":{"tf":2.23606797749979},"70":{"tf":3.4641016151377544},"71":{"tf":2.8284271247461903},"72":{"tf":2.0},"73":{"tf":2.449489742783178},"74":{"tf":1.4142135623730951},"75":{"tf":4.47213595499958},"76":{"tf":3.1622776601683795},"77":{"tf":2.8284271247461903},"79":{"tf":2.8284271247461903},"80":{"tf":1.4142135623730951}},"s":{"/":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"c":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.0}},"e":{"/":{"*":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"s":{"df":0,"docs":{},"r":{"c":{"/":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"77":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"72":{"tf":1.4142135623730951},"76":{"tf":2.23606797749979}}}}}}}}},"h":{"a":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"77":{"tf":1.0}},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"39":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"66":{"tf":1.0}}}}}}},"y":{"'":{"df":0,"docs":{},"r":{"df":1,"docs":{"80":{"tf":1.0}}}},"df":0,"docs":{}}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":2,"docs":{"40":{"tf":1.0},"64":{"tf":1.0}}},"k":{"df":2,"docs":{"14":{"tf":1.0},"76":{"tf":1.0}}}},"s":{"'":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":1,"docs":{"32":{"tf":1.0}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"d":{"df":2,"docs":{"20":{"tf":1.7320508075688772},"33":{"tf":1.0}}},"df":0,"docs":{}}}}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":2,"docs":{"39":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}}}},"u":{"df":2,"docs":{"14":{"tf":1.0},"24":{"tf":1.0}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"m":{"df":0,"docs":{},"e":{"df":10,"docs":{"24":{"tf":1.0},"25":{"tf":1.4142135623730951},"34":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0},"54":{"tf":1.4142135623730951},"55":{"tf":1.0},"56":{"tf":1.0}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":2,"docs":{"22":{"tf":1.7320508075688772},"33":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"24":{"tf":1.0}}}}}}}},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"60":{"tf":1.0}}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.7320508075688772}}}}},"m":{"df":0,"docs":{},"l":{"df":1,"docs":{"14":{"tf":1.0}}}},"o":{"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"40":{"tf":1.4142135623730951},"65":{"tf":1.7320508075688772}}}}},"df":0,"docs":{}}},"df":3,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"67":{"tf":1.0}}}},"t":{"a":{"df":0,"docs":{},"l":{"df":4,"docs":{"14":{"tf":1.0},"27":{"tf":1.7320508075688772},"29":{"tf":2.449489742783178},"34":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"r":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"66":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"(":{"a":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"y":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"y":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"24":{"tf":1.0},"25":{"tf":1.0},"34":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":1,"docs":{"79":{"tf":1.0}}}},"i":{"df":1,"docs":{"25":{"tf":1.0}},"p":{"df":0,"docs":{},"l":{"df":1,"docs":{"37":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"85":{"tf":1.0}}}},"u":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"61":{"tf":1.0}}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"e":{"df":2,"docs":{"14":{"tf":1.0},"15":{"tf":1.4142135623730951}}}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"14":{"tf":1.4142135623730951}}}},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":3,"docs":{"1":{"tf":1.4142135623730951},"2":{"tf":1.0},"3":{"tf":1.0}}}}}}},"w":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"k":{"df":2,"docs":{"41":{"tf":1.0},"77":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"o":{"df":3,"docs":{"24":{"tf":1.0},"30":{"tf":1.0},"79":{"tf":1.0}}}},"y":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":16,"docs":{"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.7320508075688772},"40":{"tf":3.1622776601683795},"42":{"tf":1.0}}}}}},"u":{"3":{"2":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"8":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{},"n":{"a":{"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":3,"docs":{"85":{"tf":1.0},"86":{"tf":1.0},"88":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":3,"docs":{"40":{"tf":1.0},"41":{"tf":1.0},"77":{"tf":1.0}},"s":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"30":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.4142135623730951}}},"x":{"df":1,"docs":{"77":{"tf":1.0}}}},"k":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":2.0}}}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"42":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":4,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"67":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":1,"docs":{"34":{"tf":1.0}}}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"62":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"31":{"tf":1.0}}}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":1,"docs":{"85":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"p":{"d":{"a":{"df":0,"docs":{},"t":{"df":7,"docs":{"21":{"tf":1.0},"25":{"tf":1.0},"31":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"72":{"tf":1.0},"76":{"tf":1.0}}}},"df":0,"docs":{}},"df":9,"docs":{"16":{"tf":1.0},"21":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"48":{"tf":1.0},"60":{"tf":1.0},"80":{"tf":1.0}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}}}},"s":{"a":{"df":0,"docs":{},"g":{"df":5,"docs":{"17":{"tf":1.0},"20":{"tf":1.7320508075688772},"33":{"tf":1.7320508075688772},"40":{"tf":1.0},"54":{"tf":1.0}}}},"df":47,"docs":{"10":{"tf":1.7320508075688772},"11":{"tf":1.4142135623730951},"12":{"tf":1.0},"13":{"tf":1.0},"14":{"tf":2.23606797749979},"15":{"tf":1.7320508075688772},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.7320508075688772},"19":{"tf":1.7320508075688772},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.4142135623730951},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"30":{"tf":1.0},"31":{"tf":1.4142135623730951},"32":{"tf":1.0},"33":{"tf":1.4142135623730951},"34":{"tf":1.7320508075688772},"35":{"tf":1.0},"37":{"tf":1.7320508075688772},"38":{"tf":1.4142135623730951},"39":{"tf":2.23606797749979},"40":{"tf":2.449489742783178},"41":{"tf":1.7320508075688772},"42":{"tf":2.0},"46":{"tf":1.0},"48":{"tf":2.6457513110645907},"49":{"tf":1.4142135623730951},"56":{"tf":1.7320508075688772},"6":{"tf":1.4142135623730951},"7":{"tf":1.7320508075688772},"70":{"tf":1.0},"73":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.7320508075688772},"79":{"tf":1.0},"8":{"tf":1.7320508075688772},"85":{"tf":1.4142135623730951},"87":{"tf":1.0},"9":{"tf":1.7320508075688772}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"v":{"0":{".":{"1":{".":{"0":{"df":2,"docs":{"38":{"tf":1.0},"39":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"2":{".":{"5":{"4":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}},"u":{"df":6,"docs":{"14":{"tf":2.0},"15":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"48":{"tf":1.0}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":2,"docs":{"39":{"tf":1.0},"75":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"75":{"tf":1.0}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":5,"docs":{"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"70":{"tf":1.0},"76":{"tf":1.0},"89":{"tf":1.0}}}}}}}},"i":{"a":{"df":5,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.0},"87":{"tf":1.0}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}}}},"w":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":8,"docs":{"38":{"tf":1.0},"39":{"tf":2.0},"40":{"tf":1.0},"62":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}}},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}},"s":{"df":0,"docs":{},"i":{"/":{"d":{"df":0,"docs":{},"e":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":1,"docs":{"38":{"tf":1.7320508075688772}}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"40":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":7,"docs":{"37":{"tf":2.0},"38":{"tf":3.3166247903554},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"70":{"tf":2.23606797749979},"73":{"tf":2.0},"77":{"tf":2.0}}},"m":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"3":{"2":{"df":3,"docs":{"37":{"tf":2.0},"38":{"tf":1.7320508075688772},"70":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"_":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":1,"docs":{"42":{"tf":1.0}}}}},"df":0,"docs":{}}}},":":{":":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"u":{"d":{"df":2,"docs":{"40":{"tf":1.0},"42":{"tf":1.0}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":2,"docs":{"40":{"tf":1.0},"41":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"47":{"tf":1.0},"48":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}}}}}}},"df":12,"docs":{"37":{"tf":1.4142135623730951},"39":{"tf":1.4142135623730951},"40":{"tf":3.0},"41":{"tf":1.4142135623730951},"42":{"tf":2.6457513110645907},"46":{"tf":1.0},"47":{"tf":1.4142135623730951},"48":{"tf":1.0},"49":{"tf":1.0},"72":{"tf":1.7320508075688772},"76":{"tf":1.0},"79":{"tf":1.7320508075688772}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":53,"docs":{"11":{"tf":1.4142135623730951},"12":{"tf":1.7320508075688772},"13":{"tf":1.7320508075688772},"14":{"tf":2.449489742783178},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"3":{"tf":1.4142135623730951},"30":{"tf":1.0},"31":{"tf":1.0},"32":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.4142135623730951},"35":{"tf":1.0},"37":{"tf":2.0},"38":{"tf":2.0},"39":{"tf":2.0},"40":{"tf":2.449489742783178},"45":{"tf":1.4142135623730951},"46":{"tf":2.0},"47":{"tf":1.0},"48":{"tf":2.449489742783178},"49":{"tf":1.4142135623730951},"50":{"tf":1.7320508075688772},"53":{"tf":1.7320508075688772},"55":{"tf":1.0},"56":{"tf":1.4142135623730951},"60":{"tf":1.4142135623730951},"61":{"tf":1.4142135623730951},"62":{"tf":1.0},"63":{"tf":1.0},"64":{"tf":1.0},"66":{"tf":1.0},"67":{"tf":2.0},"68":{"tf":2.449489742783178},"69":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":2.0},"72":{"tf":1.7320508075688772},"76":{"tf":2.0},"79":{"tf":1.0}},"e":{"'":{"df":4,"docs":{"62":{"tf":1.0},"66":{"tf":1.0},"69":{"tf":1.0},"70":{"tf":1.0}}},"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"48":{"tf":1.4142135623730951}}}}}}}},"df":0,"docs":{}}}}}},"t":{"df":1,"docs":{"76":{"tf":2.0}},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"70":{"tf":1.0}}}}}},"t":{"2":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"47":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"y":{"df":2,"docs":{"53":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{},"e":{"'":{"d":{"df":1,"docs":{"56":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.7320508075688772},"40":{"tf":1.0},"64":{"tf":1.0},"76":{"tf":1.0}}}},"r":{"df":3,"docs":{"38":{"tf":1.0},"56":{"tf":1.0},"60":{"tf":1.0}}}},"b":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"l":{"df":19,"docs":{"10":{"tf":1.7320508075688772},"35":{"tf":1.0},"36":{"tf":1.4142135623730951},"37":{"tf":2.0},"38":{"tf":2.0},"39":{"tf":1.0},"40":{"tf":3.0},"41":{"tf":1.4142135623730951},"42":{"tf":1.0},"43":{"tf":1.0},"44":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"55":{"tf":1.0},"6":{"tf":1.4142135623730951},"7":{"tf":1.7320508075688772},"8":{"tf":1.7320508075688772},"9":{"tf":1.7320508075688772}}}},"df":0,"docs":{}}}}}},"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":3,"docs":{"14":{"tf":1.0},"84":{"tf":1.0},"85":{"tf":1.0}}}}},"df":0,"docs":{},"l":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"62":{"tf":1.0}}}}},"h":{"a":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"53":{"tf":1.4142135623730951}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"15":{"tf":1.0},"79":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"k":{"df":0,"docs":{},"i":{"df":1,"docs":{"86":{"tf":1.0}}}},"n":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":2,"docs":{"53":{"tf":1.0},"77":{"tf":1.0}}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":5,"docs":{"22":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0},"75":{"tf":1.0},"87":{"tf":1.0}}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":5,"docs":{"68":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0},"85":{"tf":1.0}}}}}}}},"o":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":3,"docs":{"37":{"tf":1.0},"40":{"tf":1.0},"56":{"tf":1.0}}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"k":{"df":12,"docs":{"14":{"tf":1.0},"22":{"tf":1.0},"24":{"tf":1.0},"30":{"tf":1.4142135623730951},"33":{"tf":1.0},"37":{"tf":1.7320508075688772},"39":{"tf":1.7320508075688772},"40":{"tf":2.0},"42":{"tf":1.0},"53":{"tf":1.4142135623730951},"60":{"tf":1.0},"73":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":13,"docs":{"17":{"tf":1.7320508075688772},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.4142135623730951},"22":{"tf":2.0},"24":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"30":{"tf":1.0},"31":{"tf":1.7320508075688772},"32":{"tf":1.7320508075688772},"33":{"tf":1.0},"34":{"tf":1.0}}}},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":1,"docs":{"62":{"tf":1.0}}}}}}},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":3,"docs":{"2":{"tf":1.4142135623730951},"3":{"tf":1.4142135623730951},"38":{"tf":1.7320508075688772}}}}},"df":0,"docs":{}}},"df":3,"docs":{"38":{"tf":3.0},"39":{"tf":2.449489742783178},"53":{"tf":1.0}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":14,"docs":{"31":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0},"36":{"tf":1.4142135623730951},"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"39":{"tf":2.0},"40":{"tf":1.4142135623730951},"41":{"tf":1.0},"42":{"tf":1.0},"43":{"tf":1.0},"44":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":2,"docs":{"18":{"tf":1.0},"80":{"tf":1.0}}}}}}}}},"x":{"8":{"6":{"_":{"6":{"4":{"df":2,"docs":{"53":{"tf":1.7320508075688772},"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"y":{"df":1,"docs":{"75":{"tf":1.4142135623730951}},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"u":{"'":{"d":{"df":2,"docs":{"76":{"tf":1.0},"77":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":6,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"39":{"tf":2.0},"40":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0}}}},"r":{"df":11,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.4142135623730951},"70":{"tf":1.0},"75":{"tf":1.0}}},"v":{"df":2,"docs":{"60":{"tf":1.0},"72":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"f":{"df":1,"docs":{"38":{"tf":1.0}}}}}}}}}},"z":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"d":{"df":3,"docs":{"18":{"tf":1.4142135623730951},"19":{"tf":1.0},"31":{"tf":1.0}}},"df":0,"docs":{}}}}}},"title":{"root":{"a":{"d":{"df":4,"docs":{"74":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":1,"docs":{"23":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"89":{"tf":1.0}}}}},"df":0,"docs":{}}}}}},"b":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"18":{"tf":1.0}}}}}},"h":{"df":1,"docs":{"10":{"tf":1.0}}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"d":{"df":3,"docs":{"63":{"tf":1.0},"67":{"tf":1.0},"68":{"tf":1.0}}},"df":0,"docs":{}}}}},"c":{"/":{"c":{"df":1,"docs":{"43":{"tf":1.0}}},"df":0,"docs":{}},"a":{"c":{"df":0,"docs":{},"h":{"df":5,"docs":{"14":{"tf":1.0},"25":{"tf":1.0},"30":{"tf":1.0},"31":{"tf":1.0},"32":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"o":{"df":1,"docs":{"80":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"e":{"df":1,"docs":{"79":{"tf":1.0}}}}},"df":1,"docs":{"50":{"tf":1.0}},"h":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"61":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":1,"docs":{"81":{"tf":1.0}}},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"u":{"df":0,"docs":{},"p":{"df":1,"docs":{"21":{"tf":1.0}}}}}},"df":0,"docs":{}},"i":{"df":3,"docs":{"11":{"tf":1.0},"13":{"tf":1.0},"67":{"tf":1.0}}},"o":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"23":{"tf":1.0}}}},"df":0,"docs":{}}},"o":{"d":{"df":0,"docs":{},"e":{"df":1,"docs":{"83":{"tf":1.0}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"54":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":4,"docs":{"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"22":{"tf":1.0}}}}}}}},"n":{"d":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"83":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"14":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"60":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"83":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"26":{"tf":1.0},"28":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"20":{"tf":1.0}}}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"83":{"tf":1.0}}}}}},"r":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"2":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0}}}},"df":0,"docs":{}}}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}}}}},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"16":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"s":{"c":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"58":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":1,"docs":{"23":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"d":{"df":3,"docs":{"45":{"tf":1.0},"46":{"tf":1.0},"50":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"n":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"15":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"c":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"17":{"tf":1.0}}}}}},"x":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":2,"docs":{"4":{"tf":1.0},"44":{"tf":1.0}}}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":1,"docs":{"41":{"tf":1.0}}}}}}}},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":7,"docs":{"23":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"35":{"tf":1.0}}}},"n":{"d":{"df":1,"docs":{"62":{"tf":1.0}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"41":{"tf":1.0},"42":{"tf":1.0}}}}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"23":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"z":{"df":2,"docs":{"78":{"tf":1.0},"80":{"tf":1.4142135623730951}}}}}},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"82":{"tf":1.0}}}}}}}},"h":{"a":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"62":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":3,"docs":{"2":{"tf":1.0},"3":{"tf":1.0},"38":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}}}},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}}}}},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"12":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"g":{"df":0,"docs":{},"r":{"df":2,"docs":{"73":{"tf":1.0},"77":{"tf":1.0}}}},"r":{"df":0,"docs":{},"f":{"a":{"c":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":1,"docs":{"55":{"tf":1.0}}}}}},"v":{"df":1,"docs":{"21":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"0":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"j":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"54":{"tf":1.0}}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"61":{"tf":1.0}}}}}},"l":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"u":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"6":{"tf":1.0}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":2,"docs":{"18":{"tf":1.0},"19":{"tf":1.0}}}}}},"i":{"b":{"c":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":1,"docs":{"66":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"z":{"df":0,"docs":{},"z":{"df":1,"docs":{"80":{"tf":1.0}}}}}},"r":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"39":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":4,"docs":{"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0}}}}}},"o":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"24":{"tf":1.0}}}},"df":0,"docs":{}}},"m":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"k":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"44":{"tf":1.0},"5":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"a":{"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":1,"docs":{"35":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":1,"docs":{"8":{"tf":1.0}}},"w":{"df":1,"docs":{"74":{"tf":1.0}}}},"o":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"d":{"df":1,"docs":{"56":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":3,"docs":{"19":{"tf":1.0},"20":{"tf":1.0},"22":{"tf":1.0}}},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"13":{"tf":1.0},"66":{"tf":1.0}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"l":{"df":1,"docs":{"79":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"p":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"44":{"tf":1.0},"5":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}}}}},"df":0,"docs":{}}},"l":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":1,"docs":{"53":{"tf":1.0}}}}}}}},"df":0,"docs":{},"e":{"d":{"df":0,"docs":{},"g":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":1,"docs":{"58":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"64":{"tf":1.0}}}}}}}}}}},"o":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"52":{"tf":1.0}}}}}},"df":0,"docs":{},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":1.0}}}},"df":0,"docs":{}}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"7":{"tf":1.0}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":1,"docs":{"17":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":1,"docs":{"52":{"tf":1.0}}}},"df":0,"docs":{}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":2,"docs":{"33":{"tf":1.0},"34":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":1,"docs":{"86":{"tf":1.0}}}}}}}},"u":{"df":0,"docs":{},"n":{"df":4,"docs":{"3":{"tf":1.0},"70":{"tf":1.0},"72":{"tf":1.0},"73":{"tf":1.0}}},"s":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"75":{"tf":1.0}}},"df":6,"docs":{"37":{"tf":1.0},"41":{"tf":1.0},"46":{"tf":1.0},"48":{"tf":1.0},"65":{"tf":1.0},"9":{"tf":1.0}}}}}},"s":{"a":{"df":0,"docs":{},"n":{"d":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"x":{"df":1,"docs":{"59":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"87":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"57":{"tf":1.0}}}}},"df":0,"docs":{},"t":{"df":13,"docs":{"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0}}}},"i":{"df":0,"docs":{},"z":{"df":0,"docs":{},"e":{"df":3,"docs":{"17":{"tf":1.0},"27":{"tf":1.0},"29":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":2,"docs":{"26":{"tf":1.0},"27":{"tf":1.0}}}},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"62":{"tf":1.0}}}}}}},"p":{"df":0,"docs":{},"e":{"c":{"df":1,"docs":{"72":{"tf":1.0}},"i":{"df":0,"docs":{},"f":{"df":2,"docs":{"71":{"tf":1.0},"76":{"tf":1.0}}}}},"df":0,"docs":{}}},"r":{"c":{"/":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"49":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"t":{"a":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"51":{"tf":1.0}}}}},"df":0,"docs":{},"n":{"d":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":2,"docs":{"75":{"tf":1.0},"76":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":3,"docs":{"53":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.0}}}}}}}},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":1,"docs":{"31":{"tf":1.0}}}}}}}},"t":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":1,"docs":{"80":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"k":{"df":1,"docs":{"22":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":10,"docs":{"69":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"72":{"tf":1.0},"73":{"tf":1.0},"74":{"tf":1.0},"75":{"tf":1.4142135623730951},"76":{"tf":1.0},"77":{"tf":1.0},"79":{"tf":1.0}}}}},"h":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}}}}}},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"22":{"tf":1.0}}}}}}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"65":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"t":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"27":{"tf":1.0},"29":{"tf":1.0}}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"1":{"tf":1.0}}}}}}},"y":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"p":{"d":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"34":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"s":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"20":{"tf":1.0}}}},"df":6,"docs":{"10":{"tf":1.0},"11":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":2,"docs":{"73":{"tf":1.0},"77":{"tf":1.0}}},"m":{"df":2,"docs":{"47":{"tf":1.0},"72":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":10,"docs":{"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"14":{"tf":1.0},"3":{"tf":1.0},"45":{"tf":1.0},"46":{"tf":1.0},"50":{"tf":1.0},"67":{"tf":1.0},"68":{"tf":1.0}}}}}},"t":{"df":1,"docs":{"76":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"b":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"l":{"df":7,"docs":{"10":{"tf":1.0},"36":{"tf":1.0},"40":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"k":{"df":1,"docs":{"30":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"17":{"tf":1.0},"32":{"tf":1.0}}}}},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"2":{"tf":1.0},"3":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":1,"docs":{"38":{"tf":1.0}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":2,"docs":{"36":{"tf":1.0},"39":{"tf":1.0}}}}}}}}}},"pipeline":["trimmer","stopWordFilter","stemmer"],"ref":"id","version":"0.9.5"},"results_options":{"limit_results":30,"teaser_word_count":30},"search_options":{"bool":"OR","expand":true,"fields":{"body":{"boost":1},"breadcrumbs":{"boost":1},"title":{"boost":2}}}}); \ No newline at end of file diff --git a/searchindex.json b/searchindex.json new file mode 100644 index 000000000000..7d923c25d152 --- /dev/null +++ b/searchindex.json @@ -0,0 +1 @@ +{"doc_urls":["introduction.html#introduction","tutorial.html#tutorial","tutorial-create-hello-world.html#creating-hello-worldwasm","tutorial-run-hello-world.html#running-hello-worldwasm-with-wasmtime","examples.html#examples","examples-markdown.html#markdown-parser","lang.html#using-webassembly-from-your-language","lang-python.html#using-webassembly-from-python","lang-dotnet.html#using-webassembly-from-net","lang-rust.html#using-webassembly-from-rust","lang-bash.html#using-webassembly-from-bash","cli.html#using-the-wasmtime-cli","cli-install.html#installing-wasmtime","cli-options.html#cli-options-for-wasmtime","cli-cache.html#cache-configuration-of-wasmtime","cli-cache.html#setting-enabled","cli-cache.html#setting-directory","cli-cache.html#setting-worker-event-queue-size","cli-cache.html#setting-baseline-compression-level","cli-cache.html#setting-optimized-compression-level","cli-cache.html#setting-optimized-compression-usage-counter-threshold","cli-cache.html#setting-cleanup-interval","cli-cache.html#setting-optimizing-compression-task-timeout","cli-cache.html#setting-allowed-clock-drift-for-files-from-future","cli-cache.html#locks","cli-cache.html#cache-files","cli-cache.html#setting-file-count-soft-limit","cli-cache.html#setting-files-total-size-soft-limit","cli-cache.html#setting-file-count-limit-percent-if-deleting","cli-cache.html#setting-files-total-size-limit-percent-if-deleting","cli-cache.html#how-does-the-cache-work","cli-cache.html#cache-system","cli-cache.html#cache-worker","cli-cache.html#on-get-request","cli-cache.html#on-update-request","cli-cache.html#metadata-files","wasm.html#writing-webassembly","wasm-rust.html#rust","wasm-rust.html#hello-world","wasm-rust.html#writing-libraries","wasm-rust.html#webassembly-interface-types","wasm-rust.html#exporting-rust-functionality","wasm-rust.html#importing-host-functionality","wasm-c.html#cc","wasm-markdown.html#example-markdown-parser","embed.html#embedding-wasmtime","embed-rust.html#embedding-wasmtime-in-rust","embed-rust.html#create-some-wasm","embed-rust.html#create-rust-project","embed-rust.html#srcmainrs","embed-c.html#embedding-wasmtime-in-c","stability.html#stability","stability-release.html#release-process","stability-platform-support.html#platform-support","stability-platform-support.html#jit-compiler-support","stability-platform-support.html#interpreter-support","stability-platform-support.html#what-about-no_std","security.html#security","security-disclosure.html#disclosure-policy","security-sandboxing.html#sandboxing","contributing.html#contributing","contributing.html#join-our-chat","contributing.html#finding-something-to-hack-on","contributing-building.html#building","contributing-building.html#prerequisites","contributing-building.html#the-rust-toolchain","contributing-building.html#libclang-optional","contributing-building.html#building-the-wasmtime-cli","contributing-building.html#building-other-wasmtime-crates","contributing-testing.html#testing","contributing-testing.html#running-all-tests","contributing-testing.html#testing-a-specific-crate","contributing-testing.html#running-the-wasm-spec-tests","contributing-testing.html#running-wasi-integration-tests-only","contributing-testing.html#adding-new-tests","contributing-testing.html#adding-rusts-test-style-tests","contributing-testing.html#adding-specification-style-wast-tests","contributing-testing.html#adding-wasi-integration-tests","contributing-fuzzing.html#fuzzing","contributing-fuzzing.html#test-case-generators-and-oracles","contributing-fuzzing.html#libfuzzer-and-cargo-fuzz-fuzz-targets","contributing-ci.html#ci","contributing-governance.html#governance","contributing-coc.html#contributor-covenant-code-of-conduct","contributing-coc.html#our-pledge","contributing-coc.html#our-standards","contributing-coc.html#our-responsibilities","contributing-coc.html#scope","contributing-coc.html#enforcement","contributing-coc.html#attribution"],"index":{"documentStore":{"docInfo":{"0":{"body":3,"breadcrumbs":1,"title":1},"1":{"body":3,"breadcrumbs":1,"title":1},"10":{"body":3,"breadcrumbs":6,"title":3},"11":{"body":3,"breadcrumbs":3,"title":3},"12":{"body":3,"breadcrumbs":5,"title":2},"13":{"body":3,"breadcrumbs":6,"title":3},"14":{"body":88,"breadcrumbs":6,"title":3},"15":{"body":24,"breadcrumbs":5,"title":2},"16":{"body":14,"breadcrumbs":5,"title":2},"17":{"body":24,"breadcrumbs":8,"title":5},"18":{"body":22,"breadcrumbs":7,"title":4},"19":{"body":17,"breadcrumbs":7,"title":4},"2":{"body":3,"breadcrumbs":4,"title":3},"20":{"body":24,"breadcrumbs":9,"title":6},"21":{"body":36,"breadcrumbs":6,"title":3},"22":{"body":43,"breadcrumbs":8,"title":5},"23":{"body":10,"breadcrumbs":9,"title":6},"24":{"body":52,"breadcrumbs":4,"title":1},"25":{"body":34,"breadcrumbs":5,"title":2},"26":{"body":29,"breadcrumbs":8,"title":5},"27":{"body":41,"breadcrumbs":9,"title":6},"28":{"body":45,"breadcrumbs":9,"title":6},"29":{"body":49,"breadcrumbs":10,"title":7},"3":{"body":3,"breadcrumbs":5,"title":4},"30":{"body":21,"breadcrumbs":5,"title":2},"31":{"body":48,"breadcrumbs":5,"title":2},"32":{"body":14,"breadcrumbs":5,"title":2},"33":{"body":53,"breadcrumbs":4,"title":1},"34":{"body":78,"breadcrumbs":5,"title":2},"35":{"body":7,"breadcrumbs":5,"title":2},"36":{"body":0,"breadcrumbs":2,"title":2},"37":{"body":110,"breadcrumbs":3,"title":1},"38":{"body":147,"breadcrumbs":4,"title":2},"39":{"body":147,"breadcrumbs":4,"title":2},"4":{"body":6,"breadcrumbs":1,"title":1},"40":{"body":267,"breadcrumbs":5,"title":3},"41":{"body":83,"breadcrumbs":5,"title":3},"42":{"body":91,"breadcrumbs":5,"title":3},"43":{"body":0,"breadcrumbs":3,"title":1},"44":{"body":0,"breadcrumbs":5,"title":3},"45":{"body":3,"breadcrumbs":2,"title":2},"46":{"body":11,"breadcrumbs":5,"title":3},"47":{"body":22,"breadcrumbs":4,"title":2},"48":{"body":147,"breadcrumbs":5,"title":3},"49":{"body":26,"breadcrumbs":3,"title":1},"5":{"body":3,"breadcrumbs":3,"title":2},"50":{"body":3,"breadcrumbs":5,"title":3},"51":{"body":3,"breadcrumbs":1,"title":1},"52":{"body":3,"breadcrumbs":3,"title":2},"53":{"body":56,"breadcrumbs":3,"title":2},"54":{"body":36,"breadcrumbs":4,"title":3},"55":{"body":24,"breadcrumbs":3,"title":2},"56":{"body":30,"breadcrumbs":2,"title":1},"57":{"body":3,"breadcrumbs":1,"title":1},"58":{"body":3,"breadcrumbs":3,"title":2},"59":{"body":3,"breadcrumbs":2,"title":1},"6":{"body":3,"breadcrumbs":3,"title":3},"60":{"body":18,"breadcrumbs":1,"title":1},"61":{"body":21,"breadcrumbs":2,"title":2},"62":{"body":51,"breadcrumbs":3,"title":3},"63":{"body":7,"breadcrumbs":2,"title":1},"64":{"body":11,"breadcrumbs":2,"title":1},"65":{"body":9,"breadcrumbs":3,"title":2},"66":{"body":25,"breadcrumbs":3,"title":2},"67":{"body":42,"breadcrumbs":4,"title":3},"68":{"body":38,"breadcrumbs":4,"title":3},"69":{"body":20,"breadcrumbs":2,"title":1},"7":{"body":3,"breadcrumbs":6,"title":3},"70":{"body":73,"breadcrumbs":3,"title":2},"71":{"body":37,"breadcrumbs":4,"title":3},"72":{"body":34,"breadcrumbs":5,"title":4},"73":{"body":21,"breadcrumbs":5,"title":4},"74":{"body":0,"breadcrumbs":4,"title":3},"75":{"body":73,"breadcrumbs":6,"title":5},"76":{"body":93,"breadcrumbs":6,"title":5},"77":{"body":62,"breadcrumbs":5,"title":4},"78":{"body":0,"breadcrumbs":2,"title":1},"79":{"body":98,"breadcrumbs":5,"title":4},"8":{"body":3,"breadcrumbs":6,"title":3},"80":{"body":50,"breadcrumbs":6,"title":5},"81":{"body":3,"breadcrumbs":2,"title":1},"82":{"body":3,"breadcrumbs":2,"title":1},"83":{"body":11,"breadcrumbs":5,"title":4},"84":{"body":35,"breadcrumbs":2,"title":1},"85":{"body":67,"breadcrumbs":2,"title":1},"86":{"body":44,"breadcrumbs":2,"title":1},"87":{"body":43,"breadcrumbs":2,"title":1},"88":{"body":55,"breadcrumbs":2,"title":1},"89":{"body":10,"breadcrumbs":2,"title":1},"9":{"body":3,"breadcrumbs":6,"title":3}},"docs":{"0":{"body":"... more coming soon","breadcrumbs":"Introduction","id":"0","title":"Introduction"},"1":{"body":"... more coming soon","breadcrumbs":"Tutorial","id":"1","title":"Tutorial"},"10":{"body":"... more coming soon","breadcrumbs":"Using WebAssembly from your lanugage » Using WebAssembly from Bash","id":"10","title":"Using WebAssembly from Bash"},"11":{"body":"... more coming soon","breadcrumbs":"Using the wasmtime CLI","id":"11","title":"Using the wasmtime CLI"},"12":{"body":"... more coming soon","breadcrumbs":"Using the wasmtime CLI » Installing wasmtime","id":"12","title":"Installing wasmtime"},"13":{"body":"... more coming soon","breadcrumbs":"Using the wasmtime CLI » CLI Options for wasmtime","id":"13","title":"CLI Options for wasmtime"},"14":{"body":"The configuration file uses the toml format. You can create a configuration file at the default location with: $ wasmtime config new It will print the location regardless of the success. Please refer to the --help message for using a custom location. All settings, except enabled, are optional . If the setting is not specified, the default value is used. Thus, if you don't know what values to use, don't specify them. The default values might be tuned in the future. Wasmtime assumes all the options are in the cache section. Example config: [cache]\nenabled = true\ndirectory = \"/nfs-share/wasmtime-cache/\"\ncleanup-interval = \"30m\"\nfiles-total-size-soft-limit = \"1Gi\" Please refer to the cache system section to learn how it works. If you think some default value should be tuned, some new settings should be introduced or some behavior should be changed, you are welcome to discuss it and contribute to the Wasmtime repository .","breadcrumbs":"Using the wasmtime CLI » Cache Configuration of wasmtime","id":"14","title":"Cache Configuration of wasmtime"},"15":{"body":"type : boolean format : true | false default : true Specifies whether the cache system is used or not. This field is mandatory . The default value is used when configuration file is not specified and none exists at the default location.","breadcrumbs":"Using the wasmtime CLI » Setting enabled","id":"15","title":"Setting enabled"},"16":{"body":"type : string (path) default : look up cache_dir in directories crate Specifies where the cache directory is. Must be an absolute path.","breadcrumbs":"Using the wasmtime CLI » Setting directory","id":"16","title":"Setting directory"},"17":{"body":"type : string (SI prefix) format : \"{integer}(K | M | G | T | P)?\" default : \"16\" Size of cache worker event queue. If the queue is full, incoming cache usage events will be dropped.","breadcrumbs":"Using the wasmtime CLI » Setting worker-event-queue-size","id":"17","title":"Setting worker-event-queue-size"},"18":{"body":"type : integer default : 3, the default zstd compression level Compression level used when a new cache file is being written by the cache system . Wasmtime uses zstd compression.","breadcrumbs":"Using the wasmtime CLI » Setting baseline-compression-level","id":"18","title":"Setting baseline-compression-level"},"19":{"body":"type : integer default : 20 Compression level used when the cache worker decides to recompress a cache file. Wasmtime uses zstd compression.","breadcrumbs":"Using the wasmtime CLI » Setting optimized-compression-level","id":"19","title":"Setting optimized-compression-level"},"2":{"body":"... more coming soon","breadcrumbs":"Tutorial » Creating hello-world.wasm","id":"2","title":"Creating hello-world.wasm"},"20":{"body":"type : string (SI prefix) format : \"{integer}(K | M | G | T | P)?\" default : \"256\" One of the conditions for the cache worker to recompress a cache file is to have usage count of the file exceeding this threshold.","breadcrumbs":"Using the wasmtime CLI » Setting optimized-compression-usage-counter-threshold","id":"20","title":"Setting optimized-compression-usage-counter-threshold"},"21":{"body":"type : string (duration) format : \"{integer}(s | m | h | d)\" default : \"1h\" When the cache worker is notified about a cache file being updated by the cache system and this interval has already passed since last cleaning up, the worker will attempt a new cleanup. Please also refer to allowed-clock-drift-for-files-from-future .","breadcrumbs":"Using the wasmtime CLI » Setting cleanup-interval","id":"21","title":"Setting cleanup-interval"},"22":{"body":"type : string (duration) format : \"{integer}(s | m | h | d)\" default : \"30m\" When the cache worker decides to recompress a cache file, it makes sure that no other worker has started the task for this file within the last optimizing-compression-task-timeout interval. If some worker has started working on it, other workers are skipping this task. Please also refer to the allowed-clock-drift-for-files-from-future section.","breadcrumbs":"Using the wasmtime CLI » Setting optimizing-compression-task-timeout","id":"22","title":"Setting optimizing-compression-task-timeout"},"23":{"body":"type : string (duration) format : \"{integer}(s | m | h | d)\" default : \"1d\"","breadcrumbs":"Using the wasmtime CLI » Setting allowed-clock-drift-for-files-from-future","id":"23","title":"Setting allowed-clock-drift-for-files-from-future"},"24":{"body":"When the cache worker attempts acquiring a lock for some task, it checks if some other worker has already acquired such a lock. To be fault tolerant and eventually execute every task, the locks expire after some interval. However, because of clock drifts and different timezones, it would happen that some lock was created in the future. This setting defines a tolerance limit for these locks. If the time has been changed in the system (i.e. two years backwards), the cache system should still work properly. Thus, these locks will be treated as expired (assuming the tolerance is not too big).","breadcrumbs":"Using the wasmtime CLI » Locks","id":"24","title":"Locks"},"25":{"body":"Similarly to the locks, the cache files or their metadata might have modification time in distant future. The cache system tries to keep these files as long as possible. If the limits are not reached, the cache files will not be deleted. Otherwise, they will be treated as the oldest files, so they might survive. If the user actually uses the cache file, the modification time will be updated.","breadcrumbs":"Using the wasmtime CLI » Cache files","id":"25","title":"Cache files"},"26":{"body":"type : string (SI prefix) format : \"{integer}(K | M | G | T | P)?\" default : \"65536\" Soft limit for the file count in the cache directory. This doesn't include files with metadata. To learn more, please refer to the cache system section.","breadcrumbs":"Using the wasmtime CLI » Setting file-count-soft-limit","id":"26","title":"Setting file-count-soft-limit"},"27":{"body":"type : string (disk space) format : \"{integer}(K | Ki | M | Mi | G | Gi | T | Ti | P | Pi)?\" default : \"512Mi\" Soft limit for the total size* of files in the cache directory. This doesn't include files with metadata. To learn more, please refer to the cache system section. *this is the file size, not the space physically occupied on the disk.","breadcrumbs":"Using the wasmtime CLI » Setting files-total-size-soft-limit","id":"27","title":"Setting files-total-size-soft-limit"},"28":{"body":"type : string (percent) format : \"{integer}%\" default : \"70%\" If file-count-soft-limit is exceeded and the cache worker performs the cleanup task, then the worker will delete some cache files, so after the task, the file count should not exceed file-count-soft-limit * file-count-limit-percent-if-deleting . This doesn't include files with metadata. To learn more, please refer to the cache system section.","breadcrumbs":"Using the wasmtime CLI » Setting file-count-limit-percent-if-deleting","id":"28","title":"Setting file-count-limit-percent-if-deleting"},"29":{"body":"type : string (percent) format : \"{integer}%\" default : \"70%\" If files-total-size-soft-limit is exceeded and cache worker performs the cleanup task, then the worker will delete some cache files, so after the task, the files total size should not exceed files-total-size-soft-limit * files-total-size-limit-percent-if-deleting . This doesn't include files with metadata. To learn more, please refer to the cache system section.","breadcrumbs":"Using the wasmtime CLI » Setting files-total-size-limit-percent-if-deleting","id":"29","title":"Setting files-total-size-limit-percent-if-deleting"},"3":{"body":"... more coming soon","breadcrumbs":"Tutorial » Running hello-world.wasm with Wasmtime","id":"3","title":"Running hello-world.wasm with Wasmtime"},"30":{"body":"This is an implementation detail and might change in the future. Information provided here is meant to help understanding the big picture and configuring the cache. There are two main components - the cache system and the cache worker .","breadcrumbs":"Using the wasmtime CLI » How does the cache work?","id":"30","title":"How does the cache work?"},"31":{"body":"Handles GET and UPDATE cache requests. GET request - simply loads the cache from disk if it is there. UPDATE request - compresses received data with zstd and baseline-compression-level , then writes the data to the disk. In case of successful handling of a request, it notifies the cache worker about this event using the queue. The queue has a limited size of worker-event-queue-size . If it is full, it will drop new events until the cache worker pops some event from the queue.","breadcrumbs":"Using the wasmtime CLI » Cache system","id":"31","title":"Cache system"},"32":{"body":"The cache worker runs in a single thread with lower priority and pops events from the queue in a loop handling them one by one.","breadcrumbs":"Using the wasmtime CLI » Cache worker","id":"32","title":"Cache worker"},"33":{"body":"Read the statistics file for the cache file, increase the usage counter and write it back to the disk. Attempt recompressing the cache file if all of the following conditions are met: usage counter exceeds optimized-compression-usage-counter-threshold , the file is compressed with compression level lower than optimized-compression-level , no other worker has started working on this particular task within the last optimizing-compression-task-timeout interval. When recompressing, optimized-compression-level is used as a compression level.","breadcrumbs":"Using the wasmtime CLI » On GET request","id":"33","title":"On GET request"},"34":{"body":"Write a fresh statistics file for the cache file. Clean up the cache if no worker has attempted to do this within the last cleanup-interval . During this task: all unrecognized files and expired task locks in cache directory will be deleted if file-count-soft-limit or files-total-size-soft-limit is exceeded, then recognized files will be deleted according to file-count-limit-percent-if-deleting and files-total-size-limit-percent-if-deleting . Wasmtime uses Least Recently Used (LRU) cache replacement policy and requires that the filesystem maintains proper mtime (modification time) of the files. Files with future mtimes are treated specially - more details in allowed-clock-drift-for-files-from-future .","breadcrumbs":"Using the wasmtime CLI » On UPDATE request","id":"34","title":"On UPDATE request"},"35":{"body":"every cached WebAssembly module has its own statistics file every lock is a file","breadcrumbs":"Using the wasmtime CLI » Metadata files","id":"35","title":"Metadata files"},"36":{"body":"","breadcrumbs":"Writing WebAssembly","id":"36","title":"Writing WebAssembly"},"37":{"body":"The Rust Programming Language supports WebAssembly as a compilation target. If you're not familiar with Rust it's recommended to start with its introductory documentation . Compiling to WebAssembly will involve specifying the desired target via the --target flag, and to do this there are a number of \"target triples\" for WebAssembly compilation in Rust: wasm32-wasi - when using wasmtime this is likely what you'll be using. The WASI target is integrated into the standard library and is intended on producing standalone binaries. wasm32-unknown-unknown - this target, like the WASI one, is focused on producing single *.wasm binaries. The standard library, however, is largely stubbed out since the \"unknown\" part of the target means libstd can't assume anything. This means that while binaries will likely work in wasmtime, common conveniences like println! or panic! won't work. wasm32-unknown-emscripten - this target is intended to work in a web browser and produces a *.wasm file coupled with a *.js file, and it is not compatible with wasmtime. For the rest of this documentation we'll assume that you're using the wasm32-wasi target for compiling Rust code and executing inside of wasmtime.","breadcrumbs":"Writing WebAssembly » Rust","id":"37","title":"Rust"},"38":{"body":"Cross-compiling to WebAssembly involves a number of knobs that need configuration, but you can often gloss over these internal details by using build tooling intended for the WASI target. For example we can start out writing a WebAssembly binary with cargo wasi . First up we'll install cargo wasi : $ cargo install cargo-wasi Next we'll make a new Cargo project: $ cargo new hello-world\n$ cd hello-world Inside of src/main.rs you'll see the canonical Rust \"Hello, World!\" using println!. We'll be executing this for the wasm32-wasi target, so you'll want to make sure you're previously built wasmtime and inserted it into PATH ; $ cargo wasi run\ninfo: downloading component 'rust-std' for 'wasm32-wasi'\ninfo: installing component 'rust-std' for 'wasm32-wasi' Compiling hello-world v0.1.0 (/hello-world) Finished dev [unoptimized + debuginfo] target(s) in 0.16s Running `/.cargo/bin/cargo-wasi target/wasm32-wasi/debug/hello-world.wasm` Running `target/wasm32-wasi/debug/hello-world.wasm`\nHello, world! And we're already running our first WebAssembly code inside of wasmtime! While it's automatically happening for you as part of cargo wasi, you can also run wasmtime yourself: $ wasmtime target/wasm32-wasi/debug/hello-world.wasm\nHello, world! You can check out the introductory documentation of cargo-wasi as well for some more information.","breadcrumbs":"Writing WebAssembly » Hello, World!","id":"38","title":"Hello, World!"},"39":{"body":"Previously for \"Hello, World!\" we created a binary project which used src/main.rs. Not all *.wasm binaries are intended to be executed like commands, though. Some are intended to be loaded into applications and called through various APIs, acting more like libraries. For this use case you'll want to add this to Cargo.toml: # in Cargo.toml ... [lib]\ncrate-type = ['cdylib'] and afterwards you'll want to write your code in src/lib.rs like so: #[no_mangle]\npub extern \"C\" fn print_hello() { println!(\"Hello, world!\");\n} When you execute cargo wasi build that'll generate a *.wasm file which has one exported function, print_hello. We can then run it via the CLI like so: $ cargo wasi build Compiling hello-world v0.1.0 (/home/alex/code/hello-world) Finished dev [unoptimized + debuginfo] target(s) in 0.08s\n$ wasmtime --invoke print_hello target/wasm32-wasi/debug/hello_world.wasm\nHello, world! As a library crate one of your primary consumers may be other languages as well. You'll want to consult the section of this book for using wasmtime from Python` and after running through the basics there you can execute our file in Python: $ cp target/wasm32-wasi/debug/hello_world.wasm .\n$ python3\n>>> import wasmtime\n>>> import hello_world\n>>> hello_world.print_hello()\nHello, world!\n()\n>>> Note that this form of using #[no_mangle] Rust functions is pretty primitive. You're only able to work with primitive datatypes like integers and floats. While this works for some applications if you need to work with richer types like strings or structs, then you'll want to use the support in wasmtime for interface types.","breadcrumbs":"Writing WebAssembly » Writing Libraries","id":"39","title":"Writing Libraries"},"4":{"body":"This is an explanation of all examples to come ... more coming soon","breadcrumbs":"Examples","id":"4","title":"Examples"},"40":{"body":"Working with WebAssembly modules at the bare-bones level means that you're only dealing with integers and floats. Many APIs, however, want to work with things like byte arrays, strings, structures, etc. To facilitate these interactions the WebAssembly Interface Types Proposal comes into play. The wasmtime runtime has support for interface types, and the Rust toolchain has library support in a crate called wasm-bindgen . Note : WebAssembly Interface Types is still a WebAssembly proposal and is under active development. The toolchain may not match the exact specification, and during development you'll generally need to make sure tool versions are all kept up to date to ensure everything aligns right. This'll all smooth over as the proposal stabilizes! To get started with WebAssembly interface types let's write a library module which will generate a greeting for us. The module itself won't do any printing, we'll simply be working with some strings. To get starts let's add this to our Cargo.toml: [lib]\ncrate-type = ['cdylib'] [dependencies]\nwasm-bindgen = \"0.2.54\" Using this crate, we can then update our src/lib.rs with the following: use wasm_bindgen::prelude::*; #[wasm_bindgen]\npub fn greet(name: &str) -> String { format!(\"Hello, {}!\", name)\n} Then we can build this with: $ cargo wasi build --release Updating crates.io index\n... Finished dev [unoptimized + debuginfo] target(s) in 9.57s Downloading precompiled wasm-bindgen v0.2.54 and we have our new wasm binary! Note : for now when using wasm-bindgen you must use --release mode to build wasi binaries with interface types. We can then test out support for this with the CLI: $ wasmtime --invoke greet ./target/wasm32-wasi/release/hello_world.wasm \"wasmtime CLI\"\nwarning: using `--invoke` with a function that takes arguments is experimental and may break in the future\nwarning: using `--invoke` with a function that returns values is experimental and may break in the future\nHello, wasmtime CLI! Here we can see some experimental warnings, but we got our error message printed out! The first CLI parameter, \"wasmtime CLI\", was passed as the first argument of the greet function. The resulting string was then printed out to the console. Like before, we can also execute this with Python: $ cp target/wasm32-wasi/release/hello_world.wasm .\n$ python3\n>>> import wasmtime\n>>> import hello_world\n>>> hello_world.greet('python interpreter')\n'Hello, python interpreter!'\n>>> Note that wasm-bindgen was originally developed for JS and usage in a browser, but a subset of its implementation (such as arguments which are strings) are supported for WebAssembly interface types. You can also check out the reference documentation for wasm-bindgen for more information about how it works. Note that the wasm-bindgen support for wasm interface type is still in its nascent phase and is likely to be greatly improved in the future.","breadcrumbs":"Writing WebAssembly » WebAssembly Interface Types","id":"40","title":"WebAssembly Interface Types"},"41":{"body":"Currently only Rust functions can be exported from a wasm module. Rust functions must be #[no_mangle] to show up in the final binary, but if you're using #[wasm_bindgen] that will happen automatically for you. Memory is by default exported from Rust modules under the name memory. This can be tweaked with the -Clink-arg flag to rustc to pass flags to LLD, the WebAssembly code linker. Tables cannot be imported at this time. When using rustc directly there is no support for anyref and only one function table is supported. When using wasm-bindgen it may inject an anyref table if necessary, but this table is an internal detail and is not exported. The function table can be exported by passing the --export-table argument to LLD (via -C link-arg) or can be imported with the --import-table. Rust currently does not have support for exporting or importing custom global values.","breadcrumbs":"Writing WebAssembly » Exporting Rust functionality","id":"41","title":"Exporting Rust functionality"},"42":{"body":"Only functions can be imported in Rust at this time, and they can be imported via raw interfaces like: #[link(wasm_import_module = \"the-wasm-import-module\")]\nextern \"C\" { // imports the name `foo` from `the-wasm-import-module` fn foo(); // functions can have integer/float arguments/return values fn translate(a: i32) -> f32; // Note that the ABI of Rust and wasm is somewhat in flux, so while this // works, it's recommended to rely on raw integer/float values where // possible. fn translate_fancy(my_struct: MyStruct) -> u32; // you can also explicitly specify the name to import, this imports `bar` // instead of `baz` from `the-wasm-import-module`. #[link_name = \"bar\"] fn baz();\n} When you're using wasm-bindgen you would instead use: use wasm_bindgen::prelude::*; #[wasm_bindgen(module = \"the-wasm-import-module\")]\nextern \"C\" { fn foo(); fn baz(); // ...\n} Note that unless you're using interface types you likely don't need wasm-bindgen.","breadcrumbs":"Writing WebAssembly » Importing host functionality","id":"42","title":"Importing host functionality"},"43":{"body":"","breadcrumbs":"Writing WebAssembly » C/C++","id":"43","title":"C/C++"},"44":{"body":"","breadcrumbs":"Writing WebAssembly » Example: Markdown Parser","id":"44","title":"Example: Markdown Parser"},"45":{"body":"... more coming soon","breadcrumbs":"Embedding Wasmtime","id":"45","title":"Embedding Wasmtime"},"46":{"body":"This document shows how to embed Wasmtime using the Rust API, and run a simple wasm program.","breadcrumbs":"Embedding Wasmtime » Embedding Wasmtime in Rust","id":"46","title":"Embedding Wasmtime in Rust"},"47":{"body":"Let's create a simple WebAssembly file with a single exported function that returns an integer: (;; wat2wasm hello.wat -o $WASM_FILES/hello.wasm ;;)\n(module (func (export \"answer\") (result i32) i32.const 42 )\n)","breadcrumbs":"Embedding Wasmtime » Create some wasm","id":"47","title":"Create some wasm"},"48":{"body":"$ cargo new --bin wasmtime_hello\n$ cd wasmtime_hello\n$ cp $WASM_FILES/hello.wasm . We will be using the wasmtime engine/API to run the wasm file, so we will add the dependency to Cargo.toml: [dependencies]\nwasmtime = \"\" where \"\" is the current version number of the wasmtime crate. It is time to add code to the src/main.rs. First, storage needs to be activated: use wasmtime::*; let store = Store::default(); The HostRef will be used a lot -- it is a \"convenience\" object to store and refer an object between the host and the embedded environments. The hello.wasm can be read from the file system and provided to the Module object constructor as &[u8]: use std::fs::read; let hello_wasm = read(\"hello.wasm\").expect(\"wasm file\"); let module = HostRef::new(Module::new(&store, &hello_wasm).expect(\"wasm module\")); The module instance can now be created. Normally, you would provide exports, but in this case, there are none required: let instance = Instance::new(&store, &module, &[]).expect(\"wasm instance\"); Everything is set. If a WebAssembly module has a start function -- it was run. The instance's exports can be used at this point. wasmtime provides functions to look up an export by name, and ensure that it's a function: let answer = instance.find_export_by_name(\"answer\").expect(\"answer\").func().expect(\"function\"); The exported function can be called using the call method. Remember that in most of the cases, a HostRef<_> object will be returned, so borrow() or borrow_mut() method has to be used to refer the specific object. The exported \"answer\" function accepts no parameters and returns a single i32 value. let result = answer.borrow().call(&[]).expect(\"success\");\nprintln!(\"Answer: {}\", result[0].i32()); The names of the WebAssembly module's imports and exports can be discovered by means of module's corresponding methods.","breadcrumbs":"Embedding Wasmtime » Create rust project","id":"48","title":"Create rust project"},"49":{"body":"use std::fs::read;\nuse wasmtime::*; fn main() { let store = Store::default(); let wasm = read(\"hello.wasm\").expect(\"wasm file\"); let module = HostRef::new(Module::new(&store, &wasm).expect(\"wasm module\")); let instance = Instance::new(&store, &module, &[]).expect(\"wasm instance\"); let answer = instance.find_export_by_name(\"answer\").expect(\"answer\").func().expect(\"function\"); let result = answer.borrow().call(&[]).expect(\"success\"); println!(\"Answer: {}\", result[0].i32());\n}","breadcrumbs":"Embedding Wasmtime » src/main.rs","id":"49","title":"src/main.rs"},"5":{"body":"... more coming soon","breadcrumbs":"Examples » Markdown Parser","id":"5","title":"Markdown Parser"},"50":{"body":"... more coming soon","breadcrumbs":"Embedding Wasmtime » Embedding Wasmtime in C","id":"50","title":"Embedding Wasmtime in C"},"51":{"body":"... more coming soon","breadcrumbs":"Stability","id":"51","title":"Stability"},"52":{"body":"... more coming soon","breadcrumbs":"Stability » Release Process","id":"52","title":"Release Process"},"53":{"body":"The wasmtime project is a configurable and lightweight runtime for WebAssembly which has a number of ways it can be configured. Not all features are supported on all platforms, but it is intended that wasmtime can run in some capacity on almost all platforms! The matrix of what's being tested, what works, and what's supported where is evolving over time, and this document hopes to capture a snapshot of what the current state of the world looks like. All features of wasmtime should work on the following platforms: Linux x86_64 macOS x86_64 Windows x86_64 For more detailed information about supported platforms, please check out the sections below!","breadcrumbs":"Stability » Platform Support","id":"53","title":"Platform Support"},"54":{"body":"The JIT compiler, backed by either lightbeam or cranelift supports only the x86_64 architecture at this time. Support for at least ARM, AArch64, and x86 is planned at this time. Usage of the JIT compiler will require a host operating system which supports creating executable memory pages on-the-fly. In Rust terms this generally means that std needs to be supported on this platform.","breadcrumbs":"Stability » JIT compiler support","id":"54","title":"JIT compiler support"},"55":{"body":"At this time wasmtime does not have a mode in which it simply interprets WebAssembly code. It is planned to add support for an interpreter, however, and this will have minimal system dependencies. It is planned that the system will need to support some form of dynamic memory allocation, but other than that not much else will be needed.","breadcrumbs":"Stability » Interpreter support","id":"55","title":"Interpreter support"},"56":{"body":"The wasmtime project does not currently use #[no_std] for its crates, but this is not because it won't support it! At this time we're still gathering use cases for for what #[no_std] might entail, so if you're interested in this we'd love to hear about your use case! Feel free to open an issue on the wasmtime repository to discuss this.","breadcrumbs":"Stability » What about #[no_std]?","id":"56","title":"What about #[no_std]?"},"57":{"body":"... more coming soon","breadcrumbs":"Security","id":"57","title":"Security"},"58":{"body":"... more coming soon","breadcrumbs":"Security » Disclosure Policy","id":"58","title":"Disclosure Policy"},"59":{"body":"... more coming soon","breadcrumbs":"Security » Sandboxing","id":"59","title":"Sandboxing"},"6":{"body":"... more coming soon","breadcrumbs":"Using WebAssembly from your Language","id":"6","title":"Using WebAssembly from your Language"},"60":{"body":"We're excited to work on Wasmtime together with you! This guide should help you get up and running with Wasmtime development. But first, make sure you've read the Code of Conduct !","breadcrumbs":"Contributing","id":"60","title":"Contributing"},"61":{"body":"We chat about Wasmtime development on Gitter — join us! If you're having trouble building Wasmtime, aren't sure why a test is failing, or have any other questions, feel free to ask here. You can also open an issue !","breadcrumbs":"Join Our Chat","id":"61","title":"Join Our Chat"},"62":{"body":"If you're looking for something to do, these are great places to start: Issues labeled \"good first issue\" — these issues tend to be simple, what needs to be done is well known, and are good for new contributors to tackle. The goal is to learn Wasmtime's development workflow and make sure that you can build and test Wasmtime. Issues labeled \"help wanted\" — these are issues that we need a little help with! If you're unsure if an issue is a good fit for you or not, feel free to ask in a comment on the issue, or in chat.","breadcrumbs":"Finding Something to Hack On","id":"62","title":"Finding Something to Hack On"},"63":{"body":"This section describes everything required to build and run Wasmtime.","breadcrumbs":"Contributing » Building","id":"63","title":"Building"},"64":{"body":"Before we can actually build Wasmtime, we'll need to make sure these things are installed first.","breadcrumbs":"Contributing » Prerequisites","id":"64","title":"Prerequisites"},"65":{"body":"Install the Rust toolchain here. This includes rustup, cargo, rustc, etc...","breadcrumbs":"Contributing » The Rust Toolchain","id":"65","title":"The Rust Toolchain"},"66":{"body":"The wasmtime-fuzzing crate transitively depends on bindgen, which requires that your system has a libclang installed. Therefore, if you want to hack on Wasmtime's fuzzing infrastructure, you'll need libclang. Details on how to get libclang and make it available for bindgen are here.","breadcrumbs":"Contributing » libclang (optional)","id":"66","title":"libclang (optional)"},"67":{"body":"To make an unoptimized, debug build of the wasmtime CLI tool, go to the root of the repository and run this command: cargo build The built executable will be located at target/debug/wasmtime. To make an optimized build, run this command in the root of the repository: cargo build --release The built executable will be located at target/release/wasmtime. You can also build and run a local wasmtime CLI by replacing cargo build with cargo run.","breadcrumbs":"Contributing » Building the wasmtime CLI","id":"67","title":"Building the wasmtime CLI"},"68":{"body":"You can build any of the Wasmtime crates by appending -p wasmtime-whatever to the cargo build invocation. For example, to build the wasmtime-jit crate, execute this command: cargo build -p wasmtime-jit Alternatively, you can cd into the crate's directory, and run cargo build there, without needing to supply the -p flag: cd crates/jit/\ncargo build","breadcrumbs":"Contributing » Building Other Wasmtime Crates","id":"68","title":"Building Other Wasmtime Crates"},"69":{"body":"This section describes how to run Wasmtime's tests and add new tests. Before continuing, make sure you can build Wasmtime successfully. Can't run the tests if you can't build it!","breadcrumbs":"Contributing » Testing","id":"69","title":"Testing"},"7":{"body":"... more coming soon","breadcrumbs":"Using WebAssembly from your lanugage » Using WebAssembly from Python","id":"7","title":"Using WebAssembly from Python"},"70":{"body":"To run all of Wasmtime's tests (excluding WASI integration tests), execute this command: cargo test --all To include WASI integration tests, you'll need wasm32-wasi target installed, which, assuming you're using rustup.rs to manage your Rust versions, can be done as follows: rustup target add wasm32-wasi Next, to run all tests including the WASI integration tests, execute this command: cargo test --features test_programs --all You can also exclude a particular crate from testing with --exclude. For example, if you want to avoid testing the wastime-fuzzing crate — which requires that libclang is installed on your system, and for some reason maybe you don't have it — you can run: cargo test --all --exclude wasmtime-fuzzing","breadcrumbs":"Contributing » Running All Tests","id":"70","title":"Running All Tests"},"71":{"body":"You can test a particular Wasmtime crate with cargo test -p wasmtime-whatever. For example, to test the wasmtime-environ crate, execute this command: cargo test -p wasmtime-environ Alternatively, you can cd into the crate's directory, and run cargo test there, without needing to supply the -p flag: cd crates/environ/\ncargo test","breadcrumbs":"Contributing » Testing a Specific Crate","id":"71","title":"Testing a Specific Crate"},"72":{"body":"The spec testsuite itself is in a git submodule, so make sure you've checked it out and initialized its submodule: git submodule update --init When the submodule is checked out, Wasmtime runs the Wasm spec testsuite as part of testing the wasmtime-cli crate: cargo test -p wasmtime-cli","breadcrumbs":"Contributing » Running the Wasm Spec Tests","id":"72","title":"Running the Wasm Spec Tests"},"73":{"body":"WASI integration tests can be run separately from all other tests which can be useful when working on the wasi-common crate. This can be done by executing this command: cargo test --features test_programs -p test-programs","breadcrumbs":"Contributing » Running WASI Integration Tests Only","id":"73","title":"Running WASI Integration Tests Only"},"74":{"body":"","breadcrumbs":"Contributing » Adding New Tests","id":"74","title":"Adding New Tests"},"75":{"body":"For very \"unit-y\" tests, we add test modules in the same .rs file as the code that is being tested. These test modules are configured to only get compiled during testing with #[cfg(test)]. // some code... #[cfg(test)]\nmod tests { use super::*; #[test] fn some_test_for_that_code() { // ... }\n} If you're writing a unit test and a test module doesn't already exist, you can create one. For more \"integration-y\" tests, we create a tests directory within the crate, and put the tests inside there. For example, there are various code cache-related tests at crates/environ/tests/cache_*.rs. Always feel free to add a tests directory to a crate, if you want to add a new test and there aren't any existing tests.","breadcrumbs":"Contributing » Adding Rust's #[test]-Style Tests","id":"75","title":"Adding Rust's #[test]-Style Tests"},"76":{"body":"We use the spec testsuite as-is and without custom patches or a forked version. This probably isn't what you want to modify when adding a new Wasmtime test! When you have a Wasmtime-specific test that you'd like to write in Wast and use the Wast-style assertions, you can add it to our \"misc testsuite\". The misc testsuite uses the same syntax and assertions as the spec testsuite, but lives in tests/misc_testsuite. Feel free to add new tests to existing tests/misc_testsuite/*.wast files or create new ones as needed. These tests are run as part of the wasmtime-cli crate's tests. If you have a new test that you think really belongs in the spec testsuite, make sure it makes sense for every Wasm implementation to run your test (i.e. it isn't Wasmtime-specific) and send a pull request upstream . Once it is accepted in the upstream repo, we can update our git submodule and we'll start running the new tests.","breadcrumbs":"Contributing » Adding Specification-Style Wast Tests","id":"76","title":"Adding Specification-Style Wast Tests"},"77":{"body":"When you have a WASI-specific test program that you'd like to include as a test case to run against our WASI implementation, you can add it to our test-programs crate. In particular, you should drop a main-style Rust source file into crates/test-programs/wasi-tests/src/bin/some_new_test.rs with a name of your choice. And that's it! The build script included in the test-programs crate will automatically generate the necessary boilerplate code for your test program so that it's run on all supported hosts. If you would like to tweak which host to run the test program against however (for instance, only on Unix but on Windows), you can tweak that in the build script located under crates/test-programs/build.rs.","breadcrumbs":"Contributing » Adding WASI Integration Tests","id":"77","title":"Adding WASI Integration Tests"},"78":{"body":"","breadcrumbs":"Contributing » Fuzzing","id":"78","title":"Fuzzing"},"79":{"body":"Test case generators and oracles live in the wasmtime-fuzzing crate, located in the crates/fuzzing directory. A test case generator takes raw, unstructured input from a fuzzer and translates that into a test case. This might involve interpreting the raw input as \"DNA\" or pre-determined choices through a decision tree and using it to generate an in-memory data structure, or it might be a no-op where we interpret the raw bytes as if they were Wasm. An oracle takes a test case and determines whether we have a bug. For example, one of the simplest oracles is to take a Wasm binary as an input test case, validate and instantiate it, and (implicitly) check that no assertions failed or segfaults happened. A more complicated oracle might compare the result of executing a Wasm file with and without optimizations enabled, and make sure that the two executions are observably identical. Our test case generators and oracles strive to be fuzzer-agnostic: they can be reused with libFuzzer or AFL or any other fuzzing engine or driver.","breadcrumbs":"Contributing » Test Case Generators and Oracles","id":"79","title":"Test Case Generators and Oracles"},"8":{"body":"... more coming soon","breadcrumbs":"Using WebAssembly from your lanugage » Using WebAssembly from .NET","id":"8","title":"Using WebAssembly from .NET"},"80":{"body":"We combine a test case generator and one more more oracles into a fuzz target . Because the target needs to pipe the raw input from a fuzzer into the test case generator, it is specific to a particular fuzzer. This is generally fine, since they're only a couple of lines of glue code. Currently, all of our fuzz targets are written for libFuzzer and cargo fuzz . They are defined in the fuzz subdirectory. See fuzz/README.md for details on how to run these fuzz targets and set up a corpus of seed inputs.","breadcrumbs":"Contributing » libFuzzer and cargo fuzz Fuzz Targets","id":"80","title":"libFuzzer and cargo fuzz Fuzz Targets"},"81":{"body":"... more coming soon","breadcrumbs":"Contributing » CI","id":"81","title":"CI"},"82":{"body":"... more coming soon","breadcrumbs":"Contributing » Governance","id":"82","title":"Governance"},"83":{"body":"Note : this Code of Conduct pertains to individuals' behavior. Please also see the Organizational Code of Conduct .","breadcrumbs":"Contributing » Contributor Covenant Code of Conduct","id":"83","title":"Contributor Covenant Code of Conduct"},"84":{"body":"In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.","breadcrumbs":"Contributing » Our Pledge","id":"84","title":"Our Pledge"},"85":{"body":"Examples of behavior that contributes to creating a positive environment include: Using welcoming and inclusive language Being respectful of differing viewpoints and experiences Gracefully accepting constructive criticism Focusing on what is best for the community Showing empathy towards other community members Examples of unacceptable behavior by participants include: The use of sexualized language or imagery and unwelcome sexual attention or advances Trolling, insulting/derogatory comments, and personal or political attacks Public or private harassment Publishing others' private information, such as a physical or electronic address, without explicit permission Other conduct which could reasonably be considered inappropriate in a professional setting","breadcrumbs":"Contributing » Our Standards","id":"85","title":"Our Standards"},"86":{"body":"Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.","breadcrumbs":"Contributing » Our Responsibilities","id":"86","title":"Our Responsibilities"},"87":{"body":"This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.","breadcrumbs":"Contributing » Scope","id":"87","title":"Scope"},"88":{"body":"Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the Bytecode Alliance CoC team at report@bytecodealliance.org . The CoC team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The CoC team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the Bytecode Alliance's leadership.","breadcrumbs":"Contributing » Enforcement","id":"88","title":"Enforcement"},"89":{"body":"This Code of Conduct is adapted from the Contributor Covenant , version 1.4, available at http://contributor-covenant.org/version/1/4","breadcrumbs":"Contributing » Attribution","id":"89","title":"Attribution"},"9":{"body":"... more coming soon","breadcrumbs":"Using WebAssembly from your lanugage » Using WebAssembly from Rust","id":"9","title":"Using WebAssembly from Rust"}},"length":90,"save":true},"fields":["title","body","breadcrumbs"],"index":{"body":{"root":{"0":{".":{"0":{"8":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}},"1":{"6":{"df":1,"docs":{"38":{"tf":1.0}}},"df":0,"docs":{}},"2":{".":{"5":{"4":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"1":{".":{"4":{"df":1,"docs":{"89":{"tf":1.0}}},"df":0,"docs":{}},"6":{"df":1,"docs":{"17":{"tf":1.0}}},"d":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"i":{"df":1,"docs":{"14":{"tf":1.0}}}},"h":{"df":1,"docs":{"21":{"tf":1.0}}}},"2":{"0":{"df":1,"docs":{"19":{"tf":1.0}}},"5":{"6":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"3":{"0":{"df":0,"docs":{},"m":{"df":2,"docs":{"14":{"tf":1.0},"22":{"tf":1.0}}}},"df":1,"docs":{"18":{"tf":1.0}}},"4":{"2":{"df":1,"docs":{"47":{"tf":1.0}}},"df":0,"docs":{}},"5":{"1":{"2":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":1,"docs":{"27":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"6":{"5":{"5":{"3":{"6":{"df":1,"docs":{"26":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"7":{"0":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}},"df":0,"docs":{}},"9":{".":{"5":{"7":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"a":{"a":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"h":{"6":{"4":{"df":1,"docs":{"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"b":{"df":0,"docs":{},"i":{"df":1,"docs":{"42":{"tf":1.0}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"16":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"88":{"tf":1.0}}}}},"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":4,"docs":{"48":{"tf":1.0},"76":{"tf":1.0},"85":{"tf":1.0},"86":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"34":{"tf":1.0}}},"df":0,"docs":{}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}}},"df":0,"docs":{},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.4142135623730951}}}}}},"t":{"df":2,"docs":{"39":{"tf":1.0},"87":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}}},"v":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}},"u":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"25":{"tf":1.0},"64":{"tf":1.0}}}},"df":0,"docs":{}}}},"d":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"89":{"tf":1.0}}}}},"d":{"df":9,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"55":{"tf":1.0},"69":{"tf":1.0},"70":{"tf":1.0},"75":{"tf":1.7320508075688772},"76":{"tf":1.4142135623730951},"77":{"tf":1.0}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"85":{"tf":1.0},"87":{"tf":1.0}}}}}}},"df":4,"docs":{"74":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.4142135623730951},"77":{"tf":1.0}},"v":{"a":{"df":0,"docs":{},"n":{"c":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":1,"docs":{"79":{"tf":1.0}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"g":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":1,"docs":{"84":{"tf":1.0}},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":2,"docs":{"40":{"tf":1.0},"86":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"n":{"c":{"df":1,"docs":{"88":{"tf":1.0}},"e":{"'":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"o":{"c":{"df":1,"docs":{"55":{"tf":1.0}}},"df":0,"docs":{},"w":{"df":4,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"34":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"i":{"df":4,"docs":{"21":{"tf":1.0},"24":{"tf":1.0},"38":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}}}},"w":{"a":{"df":0,"docs":{},"y":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{}}},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{".":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"(":{")":{".":{"c":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"(":{"&":{"[":{"]":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"47":{"tf":1.0},"48":{"tf":1.4142135623730951},"49":{"tf":1.0}}}}}},"y":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":1,"docs":{"41":{"tf":1.4142135623730951}}}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"37":{"tf":1.0}}}}}},"p":{"df":0,"docs":{},"i":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"46":{"tf":1.0}}},"p":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"68":{"tf":1.0}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}},"df":1,"docs":{"87":{"tf":1.0}}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}}}}}}},"r":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"54":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":2,"docs":{"61":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}}},"g":{"df":1,"docs":{"41":{"tf":1.4142135623730951}},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.7320508075688772},"41":{"tf":1.0}},"s":{"/":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"42":{"tf":1.0}}}}}}}}},"df":0,"docs":{}}}}}}}},"m":{"df":1,"docs":{"54":{"tf":1.0}}},"r":{"a":{"df":0,"docs":{},"y":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"k":{"df":2,"docs":{"61":{"tf":1.0},"62":{"tf":1.0}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":2,"docs":{"76":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"m":{"df":4,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"37":{"tf":1.4142135623730951},"70":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"85":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":4,"docs":{"21":{"tf":1.0},"24":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"89":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"38":{"tf":1.0},"41":{"tf":1.0},"77":{"tf":1.0}}}},"df":0,"docs":{}}}}},"v":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":2,"docs":{"66":{"tf":1.0},"89":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"70":{"tf":1.0}}},"df":0,"docs":{}}}}},"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"33":{"tf":1.0},"54":{"tf":1.0}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"24":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}},"r":{"df":1,"docs":{"42":{"tf":1.4142135623730951}},"e":{"df":1,"docs":{"40":{"tf":1.0}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"18":{"tf":1.0},"31":{"tf":1.0}}}}}},"h":{"df":1,"docs":{"10":{"tf":1.0}}},"i":{"c":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}}},"z":{"df":1,"docs":{"42":{"tf":1.7320508075688772}}}},"df":0,"docs":{},"e":{"df":5,"docs":{"18":{"tf":1.0},"21":{"tf":1.0},"53":{"tf":1.0},"75":{"tf":1.0},"85":{"tf":1.0}},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":3,"docs":{"40":{"tf":1.0},"64":{"tf":1.0},"69":{"tf":1.0}}}}},"h":{"a":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":5,"docs":{"14":{"tf":1.0},"83":{"tf":1.0},"85":{"tf":1.4142135623730951},"86":{"tf":1.7320508075688772},"88":{"tf":1.0}}}}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":1,"docs":{"76":{"tf":1.0}}}},"w":{"df":1,"docs":{"53":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"t":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"48":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"g":{"df":2,"docs":{"24":{"tf":1.0},"30":{"tf":1.0}}},"n":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":6,"docs":{"37":{"tf":1.7320508075688772},"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"41":{"tf":1.0},"79":{"tf":1.0}}}}},"d":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":4,"docs":{"40":{"tf":2.6457513110645907},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"66":{"tf":1.4142135623730951}}}}}},"df":1,"docs":{"48":{"tf":1.0}}}},"o":{"d":{"df":0,"docs":{},"i":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":1,"docs":{"77":{"tf":1.0}}}}}}}},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}},"o":{"df":0,"docs":{},"k":{"df":1,"docs":{"39":{"tf":1.0}}},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"n":{"df":1,"docs":{"15":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":1.0}}}}}},"df":1,"docs":{"48":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"87":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"k":{"df":1,"docs":{"40":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"37":{"tf":1.0},"40":{"tf":1.0}}}}}}}},"u":{"df":0,"docs":{},"g":{"df":1,"docs":{"79":{"tf":1.0}}},"i":{"df":0,"docs":{},"l":{"d":{"df":11,"docs":{"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"61":{"tf":1.0},"62":{"tf":1.0},"63":{"tf":1.4142135623730951},"64":{"tf":1.0},"67":{"tf":2.6457513110645907},"68":{"tf":2.6457513110645907},"69":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951}}},"df":0,"docs":{},"t":{"df":2,"docs":{"38":{"tf":1.0},"67":{"tf":1.4142135623730951}}}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"88":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":2,"docs":{"40":{"tf":1.0},"79":{"tf":1.0}}}}}},"c":{"/":{"c":{"df":1,"docs":{"43":{"tf":1.0}}},"df":0,"docs":{}},"a":{"c":{"df":0,"docs":{},"h":{"df":22,"docs":{"14":{"tf":2.23606797749979},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.4142135623730951},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"20":{"tf":1.4142135623730951},"21":{"tf":1.7320508075688772},"22":{"tf":1.4142135623730951},"24":{"tf":1.4142135623730951},"25":{"tf":2.23606797749979},"26":{"tf":1.4142135623730951},"27":{"tf":1.4142135623730951},"28":{"tf":1.7320508075688772},"29":{"tf":1.7320508075688772},"30":{"tf":2.0},"31":{"tf":2.23606797749979},"32":{"tf":1.4142135623730951},"33":{"tf":1.4142135623730951},"34":{"tf":2.0},"35":{"tf":1.0},"75":{"tf":1.0}},"e":{"_":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"16":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951}}}},"n":{"'":{"df":0,"docs":{},"t":{"df":2,"docs":{"37":{"tf":1.0},"69":{"tf":1.4142135623730951}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"38":{"tf":1.0}}}}},"p":{"a":{"c":{"df":1,"docs":{"53":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"l":{"df":3,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0}}}}}}},"/":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"/":{"c":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"o":{"df":1,"docs":{"38":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":12,"docs":{"38":{"tf":3.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"65":{"tf":1.0},"67":{"tf":2.0},"68":{"tf":2.0},"70":{"tf":1.7320508075688772},"71":{"tf":2.0},"72":{"tf":1.0},"73":{"tf":1.0},"80":{"tf":1.4142135623730951}}}}},"s":{"df":0,"docs":{},"e":{"df":7,"docs":{"31":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.4142135623730951},"56":{"tf":1.4142135623730951},"77":{"tf":1.0},"79":{"tf":2.6457513110645907},"80":{"tf":1.4142135623730951}}}}},"d":{"df":4,"docs":{"38":{"tf":1.0},"48":{"tf":1.0},"68":{"tf":1.4142135623730951},"71":{"tf":1.4142135623730951}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"b":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}}}}},"df":4,"docs":{"39":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"50":{"tf":1.0}},"f":{"df":0,"docs":{},"g":{"(":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{}}},"h":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":3,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"30":{"tf":1.0}}}},"t":{"df":2,"docs":{"61":{"tf":1.4142135623730951},"62":{"tf":1.0}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"k":{"df":6,"docs":{"24":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"72":{"tf":1.4142135623730951},"79":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"77":{"tf":1.0},"79":{"tf":1.0}}},"df":0,"docs":{}}}},"i":{"df":1,"docs":{"81":{"tf":1.0}},"r":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"l":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":2,"docs":{"86":{"tf":1.0},"87":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"n":{"df":2,"docs":{"21":{"tf":1.0},"34":{"tf":1.0}},"u":{"df":0,"docs":{},"p":{"df":5,"docs":{"14":{"tf":1.0},"21":{"tf":1.4142135623730951},"28":{"tf":1.0},"29":{"tf":1.0},"34":{"tf":1.0}}}}}},"df":0,"docs":{}},"i":{"df":7,"docs":{"11":{"tf":1.0},"13":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979},"67":{"tf":1.7320508075688772},"72":{"tf":1.4142135623730951},"76":{"tf":1.0}},"n":{"df":0,"docs":{},"k":{"df":1,"docs":{"41":{"tf":1.0}}}}},"o":{"c":{"df":0,"docs":{},"k":{"df":5,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"34":{"tf":1.0}}}},"df":0,"docs":{}}},"o":{"c":{"df":1,"docs":{"88":{"tf":1.7320508075688772}}},"d":{"df":0,"docs":{},"e":{"df":15,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.0},"41":{"tf":1.0},"48":{"tf":1.0},"55":{"tf":1.0},"60":{"tf":1.0},"75":{"tf":1.7320508075688772},"77":{"tf":1.0},"80":{"tf":1.0},"83":{"tf":1.7320508075688772},"86":{"tf":1.4142135623730951},"87":{"tf":1.0},"88":{"tf":1.0},"89":{"tf":1.0}}}},"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"80":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":24,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"3":{"tf":1.0},"4":{"tf":1.4142135623730951},"40":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}},"m":{"a":{"df":0,"docs":{},"n":{"d":{"df":6,"docs":{"39":{"tf":1.0},"67":{"tf":1.4142135623730951},"68":{"tf":1.0},"70":{"tf":1.4142135623730951},"71":{"tf":1.0},"73":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":3,"docs":{"62":{"tf":1.0},"85":{"tf":1.0},"86":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"37":{"tf":1.0},"73":{"tf":1.0}}}},"u":{"df":0,"docs":{},"n":{"df":3,"docs":{"84":{"tf":1.0},"85":{"tf":1.4142135623730951},"87":{"tf":1.4142135623730951}}}}},"p":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}},"t":{"df":1,"docs":{"37":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":5,"docs":{"37":{"tf":2.0},"38":{"tf":1.4142135623730951},"39":{"tf":1.0},"54":{"tf":1.7320508075688772},"75":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"30":{"tf":1.0},"38":{"tf":1.4142135623730951}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":6,"docs":{"18":{"tf":2.0},"19":{"tf":1.7320508075688772},"20":{"tf":1.0},"22":{"tf":1.4142135623730951},"31":{"tf":1.4142135623730951},"33":{"tf":2.6457513110645907}}}}}}}},"n":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"20":{"tf":1.0},"33":{"tf":1.0}}}},"u":{"c":{"df":0,"docs":{},"t":{"df":7,"docs":{"60":{"tf":1.0},"83":{"tf":1.7320508075688772},"85":{"tf":1.0},"86":{"tf":1.0},"87":{"tf":1.0},"88":{"tf":1.0},"89":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"df":0,"docs":{},"g":{"df":1,"docs":{"14":{"tf":1.4142135623730951}},"u":{"df":0,"docs":{},"r":{"df":6,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"30":{"tf":1.0},"38":{"tf":1.0},"53":{"tf":1.4142135623730951},"75":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"48":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.0}}}},"m":{"df":1,"docs":{"39":{"tf":1.0}}}}},"t":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"u":{"df":1,"docs":{"69":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":4,"docs":{"14":{"tf":1.0},"60":{"tf":1.0},"85":{"tf":1.0},"86":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":5,"docs":{"62":{"tf":1.0},"83":{"tf":1.0},"84":{"tf":1.0},"86":{"tf":1.0},"89":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"df":2,"docs":{"37":{"tf":1.0},"48":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"p":{"df":0,"docs":{},"u":{"df":1,"docs":{"80":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}}}}}}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"20":{"tf":1.0},"26":{"tf":1.4142135623730951},"28":{"tf":2.23606797749979},"34":{"tf":1.4142135623730951}},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"20":{"tf":1.0},"33":{"tf":1.7320508075688772}}}}}},"p":{"df":0,"docs":{},"l":{"df":2,"docs":{"37":{"tf":1.0},"80":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{".":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"/":{"1":{"/":{"4":{"df":1,"docs":{"89":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}},"df":2,"docs":{"83":{"tf":1.0},"89":{"tf":1.0}}}}}},"p":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.0}}},"r":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":1,"docs":{"54":{"tf":1.0}}}}}}}},"t":{"df":0,"docs":{},"e":{"'":{"df":3,"docs":{"68":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0}}},"df":14,"docs":{"16":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"48":{"tf":1.0},"56":{"tf":1.0},"66":{"tf":1.0},"68":{"tf":1.7320508075688772},"70":{"tf":1.4142135623730951},"71":{"tf":1.7320508075688772},"72":{"tf":1.0},"73":{"tf":1.0},"75":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951},"79":{"tf":1.0}},"s":{".":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":1,"docs":{"40":{"tf":1.0}}}}},"/":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"s":{"/":{"c":{"a":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"_":{"*":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":1,"docs":{"71":{"tf":1.0}}}}}}}}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"z":{"df":0,"docs":{},"z":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"j":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"68":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":10,"docs":{"14":{"tf":1.0},"2":{"tf":1.0},"24":{"tf":1.0},"39":{"tf":1.0},"47":{"tf":1.4142135623730951},"48":{"tf":1.4142135623730951},"54":{"tf":1.0},"75":{"tf":1.4142135623730951},"76":{"tf":1.0},"85":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}}},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"38":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":5,"docs":{"41":{"tf":1.4142135623730951},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"56":{"tf":1.0},"80":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":3,"docs":{"14":{"tf":1.0},"41":{"tf":1.0},"76":{"tf":1.0}}}}}}}},"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":2,"docs":{"31":{"tf":1.4142135623730951},"79":{"tf":1.0}},"t":{"df":0,"docs":{},"y":{"df":0,"docs":{},"p":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}},"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":1,"docs":{"67":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}}}}}}}},"c":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"19":{"tf":1.0},"22":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"79":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":15,"docs":{"14":{"tf":2.0},"15":{"tf":1.7320508075688772},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.4142135623730951},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"41":{"tf":1.0}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":3,"docs":{"24":{"tf":1.0},"80":{"tf":1.0},"87":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":4,"docs":{"25":{"tf":1.0},"28":{"tf":1.7320508075688772},"29":{"tf":1.7320508075688772},"34":{"tf":2.0}}}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"d":{"df":4,"docs":{"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"55":{"tf":1.0},"66":{"tf":1.0}}},"df":0,"docs":{}}}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":2,"docs":{"63":{"tf":1.0},"69":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"37":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":8,"docs":{"30":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"41":{"tf":1.0},"53":{"tf":1.0},"66":{"tf":1.0},"80":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"79":{"tf":1.4142135623730951},"88":{"tf":1.0}}}}}}}},"v":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":4,"docs":{"40":{"tf":1.7320508075688772},"60":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"24":{"tf":1.0},"85":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"41":{"tf":1.0}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":9,"docs":{"14":{"tf":1.0},"16":{"tf":1.7320508075688772},"26":{"tf":1.0},"27":{"tf":1.0},"34":{"tf":1.0},"68":{"tf":1.0},"71":{"tf":1.0},"75":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"s":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{}},"c":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"58":{"tf":1.0}}}}}}},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"48":{"tf":1.0}}}},"u":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"56":{"tf":1.0}}}}}},"df":0,"docs":{},"k":{"df":3,"docs":{"27":{"tf":1.4142135623730951},"31":{"tf":1.4142135623730951},"33":{"tf":1.0}}},"t":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"25":{"tf":1.0}}}}},"df":0,"docs":{}}}},"n":{"a":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":5,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"40":{"tf":1.0},"46":{"tf":1.0},"53":{"tf":1.0}}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":5,"docs":{"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}}}},"n":{"'":{"df":0,"docs":{},"t":{"df":3,"docs":{"14":{"tf":1.4142135623730951},"42":{"tf":1.0},"70":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":3,"docs":{"62":{"tf":1.0},"70":{"tf":1.0},"73":{"tf":1.0}}}},"w":{"df":0,"docs":{},"n":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"d":{"df":2,"docs":{"38":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":5,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"34":{"tf":1.0}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"p":{"df":3,"docs":{"17":{"tf":1.0},"31":{"tf":1.0},"77":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":3,"docs":{"34":{"tf":1.0},"40":{"tf":1.0},"75":{"tf":1.0}}}}},"y":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"55":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.4142135623730951}}}}},"df":1,"docs":{"87":{"tf":1.0}},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"m":{"b":{"df":1,"docs":{"46":{"tf":1.0}},"e":{"d":{"df":4,"docs":{"45":{"tf":1.0},"46":{"tf":1.0},"48":{"tf":1.0},"50":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}},"df":0,"docs":{}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":1.0}}}}}}}}},"df":0,"docs":{}}},"n":{"a":{"b":{"df":0,"docs":{},"l":{"df":3,"docs":{"14":{"tf":1.4142135623730951},"15":{"tf":1.0},"79":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"c":{"df":1,"docs":{"88":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"/":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"56":{"tf":1.0}}}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":4,"docs":{"48":{"tf":1.0},"71":{"tf":1.4142135623730951},"84":{"tf":1.0},"85":{"tf":1.0}}}}}}}},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"t":{"c":{"df":2,"docs":{"40":{"tf":1.0},"65":{"tf":1.0}}},"df":0,"docs":{},"h":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"84":{"tf":1.0}}},"df":0,"docs":{}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"17":{"tf":1.7320508075688772},"31":{"tf":2.0},"32":{"tf":1.0},"87":{"tf":1.0}},"u":{"df":1,"docs":{"24":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"y":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}},"t":{"df":0,"docs":{},"h":{"df":3,"docs":{"40":{"tf":1.0},"48":{"tf":1.0},"63":{"tf":1.0}}}}}}},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"v":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"x":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":11,"docs":{"14":{"tf":1.0},"38":{"tf":1.0},"4":{"tf":1.4142135623730951},"44":{"tf":1.0},"68":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"75":{"tf":1.0},"79":{"tf":1.0},"85":{"tf":1.4142135623730951},"87":{"tf":1.0}}}}}},"c":{"df":0,"docs":{},"e":{"df":3,"docs":{"28":{"tf":1.0},"29":{"tf":1.0},"33":{"tf":1.0}},"e":{"d":{"df":4,"docs":{"20":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"34":{"tf":1.0}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"14":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"60":{"tf":1.0}}}},"l":{"df":0,"docs":{},"u":{"d":{"df":1,"docs":{"70":{"tf":2.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":12,"docs":{"24":{"tf":1.0},"37":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.7320508075688772},"40":{"tf":1.0},"54":{"tf":1.0},"67":{"tf":1.4142135623730951},"68":{"tf":1.0},"70":{"tf":1.4142135623730951},"71":{"tf":1.0},"73":{"tf":1.0},"79":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":3,"docs":{"15":{"tf":1.0},"75":{"tf":1.4142135623730951},"76":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"84":{"tf":1.4142135623730951},"85":{"tf":1.0}},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}}}}}},"i":{"df":0,"docs":{},"r":{"df":2,"docs":{"24":{"tf":1.4142135623730951},"34":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"n":{"df":1,"docs":{"4":{"tf":1.0}}}},"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"42":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":4,"docs":{"39":{"tf":1.0},"41":{"tf":2.6457513110645907},"47":{"tf":1.4142135623730951},"48":{"tf":2.449489742783178}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":2,"docs":{"39":{"tf":1.0},"42":{"tf":1.4142135623730951}}}}}}}},"f":{"3":{"2":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"88":{"tf":1.0}}},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":2,"docs":{"61":{"tf":1.0},"79":{"tf":1.0}}},"r":{"df":1,"docs":{"86":{"tf":1.0}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"88":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"s":{"df":1,"docs":{"15":{"tf":1.0}}}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"37":{"tf":1.0}}}},"df":0,"docs":{}}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"24":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":3,"docs":{"53":{"tf":1.4142135623730951},"70":{"tf":1.0},"73":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":5,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"d":{"df":1,"docs":{"15":{"tf":1.0}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"e":{"df":25,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.4142135623730951},"22":{"tf":1.7320508075688772},"23":{"tf":1.0},"25":{"tf":2.449489742783178},"26":{"tf":1.7320508075688772},"27":{"tf":2.0},"28":{"tf":2.6457513110645907},"29":{"tf":2.6457513110645907},"33":{"tf":2.0},"34":{"tf":3.3166247903554},"35":{"tf":1.7320508075688772},"37":{"tf":1.4142135623730951},"39":{"tf":1.4142135623730951},"47":{"tf":1.0},"48":{"tf":1.7320508075688772},"49":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0},"79":{"tf":1.0}},"s":{"df":0,"docs":{},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":1,"docs":{"34":{"tf":1.0}}}}}}}}}},"n":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":1.0}}}},"d":{"df":1,"docs":{"62":{"tf":1.0}}},"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":6,"docs":{"38":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"48":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0}}}}},"t":{"df":1,"docs":{"62":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"g":{"df":4,"docs":{"37":{"tf":1.0},"41":{"tf":1.4142135623730951},"68":{"tf":1.0},"71":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":1,"docs":{"54":{"tf":1.0}}},"o":{"a":{"df":0,"docs":{},"t":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"42":{"tf":1.0}}}}},"n":{"df":5,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"42":{"tf":2.449489742783178},"49":{"tf":1.0},"75":{"tf":1.0}}},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"37":{"tf":1.0},"85":{"tf":1.0}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":5,"docs":{"33":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"70":{"tf":1.0},"88":{"tf":1.0}}}}}},"o":{"df":1,"docs":{"42":{"tf":1.7320508075688772}}},"r":{"df":0,"docs":{},"k":{"df":1,"docs":{"76":{"tf":1.0}}},"m":{"a":{"df":0,"docs":{},"t":{"!":{"(":{"\"":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":11,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0}}}},"df":2,"docs":{"39":{"tf":1.0},"55":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":6,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"84":{"tf":1.0}}},"s":{"df":0,"docs":{},"h":{"df":1,"docs":{"34":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":2,"docs":{"17":{"tf":1.0},"31":{"tf":1.0}}}},"n":{"c":{"df":1,"docs":{"47":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":6,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"41":{"tf":2.23606797749979},"42":{"tf":1.7320508075688772},"47":{"tf":1.0},"48":{"tf":2.23606797749979}}}}}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"87":{"tf":1.0},"88":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":9,"docs":{"14":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"30":{"tf":1.0},"34":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772}}}}},"z":{"df":0,"docs":{},"z":{"/":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{".":{"df":0,"docs":{},"m":{"d":{"df":1,"docs":{"80":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":5,"docs":{"66":{"tf":1.4142135623730951},"70":{"tf":1.4142135623730951},"78":{"tf":1.0},"79":{"tf":1.4142135623730951},"80":{"tf":2.6457513110645907}},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"79":{"tf":1.4142135623730951},"80":{"tf":1.4142135623730951}}}}}}}},"g":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"56":{"tf":1.0}}}}}}},"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":6,"docs":{"39":{"tf":1.0},"40":{"tf":1.4142135623730951},"54":{"tf":1.0},"77":{"tf":1.0},"79":{"tf":2.23606797749979},"80":{"tf":1.7320508075688772}}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"t":{"df":2,"docs":{"72":{"tf":1.4142135623730951},"76":{"tf":1.0}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"61":{"tf":1.0}}}}}}},"l":{"df":0,"docs":{},"o":{"b":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"38":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}}}},"o":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}},"df":1,"docs":{"67":{"tf":1.0}},"o":{"d":{"df":2,"docs":{"62":{"tf":1.7320508075688772},"88":{"tf":1.0}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"82":{"tf":1.0}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"62":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}}},"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}}},"u":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"60":{"tf":1.0}}},"df":0,"docs":{}}}},"h":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"62":{"tf":1.0},"66":{"tf":1.0}}}},"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"l":{"df":2,"docs":{"31":{"tf":1.4142135623730951},"32":{"tf":1.0}}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":4,"docs":{"24":{"tf":1.0},"38":{"tf":1.0},"41":{"tf":1.0},"79":{"tf":1.0}}}}}},"r":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":3,"docs":{"84":{"tf":1.0},"85":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"m":{"df":1,"docs":{"86":{"tf":1.0}}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"61":{"tf":1.0}}}}},"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"56":{"tf":1.0}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"48":{"tf":1.0}}}},"t":{"df":1,"docs":{"47":{"tf":1.0}}}},"df":0,"docs":{}}},"_":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"g":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"'":{"df":0,"docs":{},"p":{"df":0,"docs":{},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}}}}}}},"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}}}}}},"df":5,"docs":{"2":{"tf":1.0},"3":{"tf":1.0},"38":{"tf":2.8284271247461903},"39":{"tf":2.0},"40":{"tf":1.4142135623730951}}}},"p":{"df":4,"docs":{"14":{"tf":1.0},"30":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.4142135623730951}}}},"r":{"df":0,"docs":{},"e":{"df":5,"docs":{"30":{"tf":1.0},"40":{"tf":1.0},"61":{"tf":1.0},"65":{"tf":1.0},"66":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"/":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"/":{"c":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"53":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"42":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"77":{"tf":1.4142135623730951}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"&":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"<":{"_":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}},"df":1,"docs":{"48":{"tf":1.0}}}}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"p":{":":{"/":{"/":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"89":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"i":{".":{"df":2,"docs":{"24":{"tf":1.0},"76":{"tf":1.0}}},"3":{"2":{".":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"47":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"42":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0}}},"df":0,"docs":{}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"79":{"tf":1.0},"84":{"tf":1.4142135623730951}}}}}},"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"30":{"tf":1.0},"40":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0}}}}}}},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":5,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"41":{"tf":2.0},"42":{"tf":3.1622776601683795},"48":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"n":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"85":{"tf":1.0},"86":{"tf":1.0}}}}}}}}}},"c":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"u":{"d":{"df":9,"docs":{"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"65":{"tf":1.0},"70":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951},"85":{"tf":1.4142135623730951},"87":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"85":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"m":{"df":1,"docs":{"17":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":1,"docs":{"33":{"tf":1.0}}}},"df":0,"docs":{}}}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":1,"docs":{"40":{"tf":1.0}}}},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"d":{"df":0,"docs":{},"u":{"df":2,"docs":{"83":{"tf":1.0},"87":{"tf":1.0}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":1,"docs":{"38":{"tf":1.4142135623730951}},"r":{"df":0,"docs":{},"m":{"df":5,"docs":{"30":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"85":{"tf":1.0}}}}},"r":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"66":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"72":{"tf":1.0}},"i":{"df":1,"docs":{"72":{"tf":1.0}}}}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"41":{"tf":1.0}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":2,"docs":{"79":{"tf":1.7320508075688772},"80":{"tf":1.4142135623730951}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":1,"docs":{"38":{"tf":1.0}}}}},"i":{"d":{"df":3,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"75":{"tf":1.0}}},"df":0,"docs":{}},"t":{"a":{"df":0,"docs":{},"l":{"df":6,"docs":{"12":{"tf":1.0},"38":{"tf":1.7320508075688772},"64":{"tf":1.0},"65":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.4142135623730951}}},"n":{"c":{"df":5,"docs":{"48":{"tf":1.7320508075688772},"49":{"tf":1.4142135623730951},"77":{"tf":1.0},"86":{"tf":1.0},"88":{"tf":1.0}},"e":{"'":{"df":1,"docs":{"48":{"tf":1.0}}},".":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"_":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"b":{"df":0,"docs":{},"y":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"\"":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"\"":{")":{".":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"c":{"(":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"&":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"a":{"d":{"df":1,"docs":{"42":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"/":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"g":{"df":7,"docs":{"18":{"tf":1.0},"19":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"47":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"/":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"}":{"(":{"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"k":{"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":5,"docs":{"37":{"tf":1.0},"70":{"tf":1.7320508075688772},"73":{"tf":1.4142135623730951},"75":{"tf":1.0},"77":{"tf":1.0}}}},"n":{"d":{"df":4,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"53":{"tf":1.0}}},"df":0,"docs":{}},"r":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":2,"docs":{"56":{"tf":1.0},"84":{"tf":1.0}}}}},"f":{"a":{"c":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":2.8284271247461903},"42":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}},"n":{"df":2,"docs":{"38":{"tf":1.0},"41":{"tf":1.0}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":3,"docs":{"40":{"tf":1.4142135623730951},"55":{"tf":1.7320508075688772},"79":{"tf":1.4142135623730951}}}}}},"v":{"df":6,"docs":{"14":{"tf":1.0},"21":{"tf":1.4142135623730951},"22":{"tf":1.0},"24":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"c":{"df":1,"docs":{"14":{"tf":1.0}},"t":{"df":1,"docs":{"0":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"37":{"tf":1.0},"38":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"o":{"c":{"df":1,"docs":{"68":{"tf":1.0}}},"df":0,"docs":{},"k":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.7320508075688772}}},"l":{"df":0,"docs":{},"v":{"df":3,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"79":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"u":{"df":4,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":2.6457513110645907},"86":{"tf":1.0}}}}},"t":{"'":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"77":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"f":{"df":2,"docs":{"40":{"tf":1.0},"72":{"tf":1.0}}}}}}}},"j":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"54":{"tf":1.7320508075688772},"68":{"tf":1.4142135623730951}}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"61":{"tf":1.4142135623730951}}}}},"s":{"df":2,"docs":{"37":{"tf":1.0},"40":{"tf":1.0}}}},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":1,"docs":{"25":{"tf":1.0}}}},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}}},"n":{"df":0,"docs":{},"o":{"b":{"df":1,"docs":{"38":{"tf":1.0}}},"df":0,"docs":{},"w":{"df":1,"docs":{"14":{"tf":1.0}},"n":{"df":1,"docs":{"62":{"tf":1.0}}}}}}},"l":{"a":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.4142135623730951}}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"u":{"a":{"df":0,"docs":{},"g":{"df":4,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"6":{"tf":1.0},"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"g":{"df":1,"docs":{"37":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":1,"docs":{"88":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":6,"docs":{"14":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"62":{"tf":1.0}}}}},"df":0,"docs":{},"t":{"'":{"df":2,"docs":{"40":{"tf":1.4142135623730951},"47":{"tf":1.0}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":6,"docs":{"18":{"tf":1.7320508075688772},"19":{"tf":1.4142135623730951},"31":{"tf":1.0},"33":{"tf":2.0},"40":{"tf":1.0},"84":{"tf":1.0}}}}}},"i":{"b":{"c":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":2,"docs":{"66":{"tf":2.0},"70":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"z":{"df":0,"docs":{},"z":{"df":2,"docs":{"79":{"tf":1.0},"80":{"tf":1.4142135623730951}}}}}},"r":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":3,"docs":{"37":{"tf":1.4142135623730951},"39":{"tf":1.7320508075688772},"40":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"t":{"d":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"b":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"54":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":1,"docs":{"53":{"tf":1.0}}}}}}}}}}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":9,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.4142135623730951},"27":{"tf":1.4142135623730951},"28":{"tf":2.0},"29":{"tf":2.0},"31":{"tf":1.0},"34":{"tf":2.0}}}}},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}},"k":{"(":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"_":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":1,"docs":{"42":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}},"df":1,"docs":{"41":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"41":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"53":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"e":{"df":2,"docs":{"76":{"tf":1.0},"79":{"tf":1.0}}}}},"l":{"d":{"df":1,"docs":{"41":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"o":{"a":{"d":{"df":2,"docs":{"31":{"tf":1.0},"39":{"tf":1.0}}},"df":0,"docs":{}},"c":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"67":{"tf":1.0}}},"t":{"df":5,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"67":{"tf":1.4142135623730951},"77":{"tf":1.0},"79":{"tf":1.0}}}},"df":0,"docs":{},"k":{"df":4,"docs":{"24":{"tf":2.6457513110645907},"25":{"tf":1.0},"34":{"tf":1.0},"35":{"tf":1.0}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":1,"docs":{"25":{"tf":1.0}}}},"o":{"df":0,"docs":{},"k":{"df":4,"docs":{"16":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0},"62":{"tf":1.0}}},"p":{"df":1,"docs":{"32":{"tf":1.0}}}},"t":{"df":1,"docs":{"48":{"tf":1.0}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"56":{"tf":1.0}}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"32":{"tf":1.0},"33":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"u":{"df":1,"docs":{"34":{"tf":1.0}}}}},"m":{"a":{"c":{"df":0,"docs":{},"o":{"df":1,"docs":{"53":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"87":{"tf":1.0}}},"n":{"df":3,"docs":{"30":{"tf":1.0},"49":{"tf":1.0},"77":{"tf":1.0}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":5,"docs":{"34":{"tf":1.0},"84":{"tf":1.0},"86":{"tf":1.4142135623730951},"87":{"tf":1.0},"88":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}}},"k":{"df":0,"docs":{},"e":{"df":13,"docs":{"22":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0},"66":{"tf":1.0},"67":{"tf":1.4142135623730951},"69":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.4142135623730951},"79":{"tf":1.0},"84":{"tf":1.0}}}},"n":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"70":{"tf":1.0}}}},"d":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"15":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{},"i":{"df":1,"docs":{"40":{"tf":1.0}}}},"r":{"df":0,"docs":{},"k":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"44":{"tf":1.0},"5":{"tf":1.0}}}}}},"df":0,"docs":{}}},"t":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"x":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"y":{"b":{"df":1,"docs":{"70":{"tf":1.0}}},"df":0,"docs":{}}},"df":7,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"n":{"df":4,"docs":{"37":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0}},"t":{"df":1,"docs":{"30":{"tf":1.0}}}}},"d":{"df":0,"docs":{},"i":{"a":{"df":1,"docs":{"87":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"85":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":4,"docs":{"41":{"tf":1.4142135623730951},"54":{"tf":1.0},"55":{"tf":1.0},"79":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"s":{"a":{"df":0,"docs":{},"g":{"df":2,"docs":{"14":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"a":{"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":6,"docs":{"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"35":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"33":{"tf":1.0}},"h":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"48":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"n":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"55":{"tf":1.0}}}}},"s":{"c":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"o":{"d":{"df":1,"docs":{"75":{"tf":1.0}},"e":{"df":2,"docs":{"40":{"tf":1.0},"55":{"tf":1.0}}},"i":{"df":0,"docs":{},"f":{"df":2,"docs":{"25":{"tf":1.4142135623730951},"34":{"tf":1.0}},"i":{"df":1,"docs":{"76":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"l":{"df":8,"docs":{"35":{"tf":1.0},"40":{"tf":1.7320508075688772},"41":{"tf":1.4142135623730951},"42":{"tf":2.0},"47":{"tf":1.0},"48":{"tf":2.449489742783178},"49":{"tf":1.7320508075688772},"75":{"tf":1.7320508075688772}},"e":{"'":{"df":1,"docs":{"48":{"tf":1.4142135623730951}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":35,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"3":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.0},"4":{"tf":1.0},"40":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"53":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"75":{"tf":1.0},"79":{"tf":1.0},"8":{"tf":1.0},"80":{"tf":1.4142135623730951},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":1,"docs":{"34":{"tf":1.4142135623730951}}}}}},"u":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"55":{"tf":1.0}}}},"df":0,"docs":{}},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}}}},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":5,"docs":{"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"48":{"tf":1.4142135623730951},"77":{"tf":1.0}}}},"s":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"41":{"tf":1.0},"77":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"d":{"df":15,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.4142135623730951},"62":{"tf":1.4142135623730951},"64":{"tf":1.0},"66":{"tf":1.0},"68":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0},"80":{"tf":1.0}}},"df":0,"docs":{}},"t":{"df":1,"docs":{"8":{"tf":1.0}}},"w":{"df":12,"docs":{"14":{"tf":1.4142135623730951},"18":{"tf":1.0},"21":{"tf":1.0},"31":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"62":{"tf":1.0},"69":{"tf":1.0},"74":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":2.23606797749979}}},"x":{"df":0,"docs":{},"t":{"df":2,"docs":{"38":{"tf":1.0},"70":{"tf":1.0}}}}},"f":{"df":1,"docs":{"14":{"tf":1.0}}},"o":{"_":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"l":{"df":2,"docs":{"39":{"tf":1.4142135623730951},"41":{"tf":1.0}}}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"t":{"d":{"df":1,"docs":{"56":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":2,"docs":{"15":{"tf":1.0},"48":{"tf":1.0}}}},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"48":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"e":{"df":4,"docs":{"39":{"tf":1.0},"40":{"tf":2.0},"42":{"tf":1.4142135623730951},"83":{"tf":1.0}}},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":2,"docs":{"21":{"tf":1.0},"31":{"tf":1.0}}}}}},"w":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}},"u":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":4,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0}}}}},"df":0,"docs":{}}}},"o":{"b":{"df":0,"docs":{},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":2.23606797749979}}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"v":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"c":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"27":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"47":{"tf":1.0}},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":1,"docs":{"86":{"tf":1.0}}}}},"i":{"c":{"df":0,"docs":{},"i":{"df":1,"docs":{"87":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"87":{"tf":1.0}}}}}}},"l":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"df":0,"docs":{}},"n":{"c":{"df":1,"docs":{"76":{"tf":1.0}}},"df":9,"docs":{"20":{"tf":1.0},"32":{"tf":1.4142135623730951},"37":{"tf":1.0},"39":{"tf":1.4142135623730951},"41":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0},"80":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"87":{"tf":1.0}}}}}},"p":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":3,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"84":{"tf":1.0}}},"r":{"df":1,"docs":{"54":{"tf":1.0}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":6,"docs":{"19":{"tf":1.0},"20":{"tf":1.0},"22":{"tf":1.4142135623730951},"33":{"tf":2.0},"67":{"tf":1.0},"79":{"tf":1.0}}},"o":{"df":0,"docs":{},"n":{"df":3,"docs":{"13":{"tf":1.0},"14":{"tf":1.4142135623730951},"66":{"tf":1.0}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"l":{"df":2,"docs":{"79":{"tf":2.449489742783178},"80":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"df":0,"docs":{},"z":{"df":1,"docs":{"83":{"tf":1.0}}}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"84":{"tf":1.0}}}}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"85":{"tf":1.0}},"w":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":2,"docs":{"25":{"tf":1.0},"88":{"tf":1.0}}}}}}}}},"u":{"df":0,"docs":{},"t":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":2.0},"53":{"tf":1.0},"72":{"tf":1.4142135623730951}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":3,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0}}}}}},"p":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":1,"docs":{"54":{"tf":1.0}}}},"n":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}}},"r":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"44":{"tf":1.0},"5":{"tf":1.0}}}}},"t":{"df":4,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.0}},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.0}}}},"u":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"r":{"df":5,"docs":{"33":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"77":{"tf":1.0},"80":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"s":{"df":0,"docs":{},"s":{"df":3,"docs":{"21":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.4142135623730951}}}},"t":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{},"h":{"df":2,"docs":{"16":{"tf":1.4142135623730951},"38":{"tf":1.0}}}}},"df":8,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"68":{"tf":1.7320508075688772},"71":{"tf":1.7320508075688772},"72":{"tf":1.0},"73":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":3,"docs":{"28":{"tf":1.7320508075688772},"29":{"tf":1.7320508075688772},"34":{"tf":1.4142135623730951}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}}}}},"m":{"a":{"df":0,"docs":{},"n":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"85":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"83":{"tf":1.0}}}}},"df":0,"docs":{}}}},"h":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":0,"docs":{},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"27":{"tf":1.0},"85":{"tf":1.0}}},"df":0,"docs":{}}}}},"i":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"30":{"tf":1.0}}}}}},"df":1,"docs":{"27":{"tf":1.0}},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}}}},"l":{"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"62":{"tf":1.0}}}},"df":0,"docs":{},"n":{"df":2,"docs":{"54":{"tf":1.0},"55":{"tf":1.4142135623730951}}},"t":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":2,"docs":{"53":{"tf":2.23606797749979},"54":{"tf":1.0}}}}}}},"y":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":9,"docs":{"14":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"53":{"tf":1.0},"83":{"tf":1.0}}}},"d":{"df":0,"docs":{},"g":{"df":1,"docs":{"84":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":3,"docs":{"34":{"tf":1.0},"58":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}},"p":{"df":2,"docs":{"31":{"tf":1.0},"32":{"tf":1.0}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"s":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"l":{"df":2,"docs":{"25":{"tf":1.0},"42":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"df":2,"docs":{"87":{"tf":1.0},"88":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}},"df":1,"docs":{"79":{"tf":1.0}},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"x":{"df":3,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"64":{"tf":1.0}}}}}}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"39":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"38":{"tf":1.0},"39":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"39":{"tf":1.0}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}}}},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.7320508075688772}}}}}}}},"df":2,"docs":{"14":{"tf":1.0},"40":{"tf":1.7320508075688772}},"l":{"df":0,"docs":{},"n":{"!":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":2,"docs":{"37":{"tf":1.0},"38":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"32":{"tf":1.0}}}}}}},"v":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"o":{"b":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"52":{"tf":1.0}}}}}},"d":{"df":0,"docs":{},"u":{"c":{"df":1,"docs":{"37":{"tf":1.7320508075688772}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}},"g":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"m":{"df":4,"docs":{"37":{"tf":1.0},"46":{"tf":1.0},"73":{"tf":1.0},"77":{"tf":2.23606797749979}},"s":{"/":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"77":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":1,"docs":{"77":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":9,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0},"56":{"tf":1.0},"84":{"tf":1.0},"86":{"tf":1.4142135623730951},"87":{"tf":2.449489742783178},"88":{"tf":1.0}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"34":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"24":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"s":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}},"v":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"30":{"tf":1.0},"48":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}}},"u":{"b":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"85":{"tf":1.0},"87":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"76":{"tf":1.0}}}},"t":{"df":1,"docs":{"75":{"tf":1.0}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"3":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":3,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"7":{"tf":1.0}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"61":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"e":{"df":3,"docs":{"17":{"tf":1.7320508075688772},"31":{"tf":2.0},"32":{"tf":1.0}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"w":{"df":3,"docs":{"42":{"tf":1.4142135623730951},"79":{"tf":1.7320508075688772},"80":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"25":{"tf":1.0}}}},"d":{"(":{"\"":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"\"":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"33":{"tf":1.0},"48":{"tf":1.0},"60":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"76":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"70":{"tf":1.0},"85":{"tf":1.0}}}}}},"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":1,"docs":{"31":{"tf":1.0}}}},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"34":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":1,"docs":{"34":{"tf":1.0}}}},"m":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"d":{"df":2,"docs":{"37":{"tf":1.0},"42":{"tf":1.0}}},"df":0,"docs":{}}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":4,"docs":{"19":{"tf":1.0},"20":{"tf":1.0},"22":{"tf":1.0},"33":{"tf":1.4142135623730951}}}}}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":9,"docs":{"14":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951}}}}},"g":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"88":{"tf":1.0}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"84":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{}}},"l":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":3,"docs":{"40":{"tf":1.4142135623730951},"52":{"tf":1.0},"67":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":1,"docs":{"42":{"tf":1.0}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}}}}}},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"86":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{}}},"l":{"a":{"c":{"df":2,"docs":{"34":{"tf":1.0},"67":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"o":{"df":1,"docs":{"76":{"tf":1.0}},"r":{"df":0,"docs":{},"t":{"@":{"b":{"df":0,"docs":{},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"e":{".":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":1,"docs":{"88":{"tf":1.4142135623730951}}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":3,"docs":{"14":{"tf":1.0},"56":{"tf":1.0},"67":{"tf":1.4142135623730951}}}}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":1,"docs":{"87":{"tf":1.7320508075688772}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"31":{"tf":2.0},"33":{"tf":1.0},"34":{"tf":1.0},"76":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"r":{"df":6,"docs":{"34":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"63":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"86":{"tf":2.0}}}}}},"t":{"df":1,"docs":{"37":{"tf":1.0}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"[":{"0":{"]":{".":{"df":0,"docs":{},"i":{"3":{"2":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":5,"docs":{"40":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0},"49":{"tf":1.0},"79":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":3,"docs":{"40":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.4142135623730951}}}}}},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"79":{"tf":1.0}}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"i":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.0},"86":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":1,"docs":{"67":{"tf":1.4142135623730951}}}}},"s":{"df":1,"docs":{"75":{"tf":1.0}}},"u":{"df":0,"docs":{},"n":{"df":19,"docs":{"3":{"tf":1.0},"32":{"tf":1.0},"38":{"tf":2.23606797749979},"39":{"tf":1.4142135623730951},"46":{"tf":1.0},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"60":{"tf":1.0},"63":{"tf":1.0},"67":{"tf":2.0},"68":{"tf":1.0},"69":{"tf":1.4142135623730951},"70":{"tf":2.0},"71":{"tf":1.0},"72":{"tf":1.4142135623730951},"73":{"tf":1.4142135623730951},"76":{"tf":1.7320508075688772},"77":{"tf":1.7320508075688772},"80":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":2,"docs":{"40":{"tf":1.0},"53":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"75":{"tf":1.0}}},"c":{"df":2,"docs":{"41":{"tf":1.4142135623730951},"65":{"tf":1.0}}},"df":13,"docs":{"37":{"tf":2.23606797749979},"38":{"tf":1.7320508075688772},"39":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":2.23606797749979},"42":{"tf":1.4142135623730951},"46":{"tf":1.4142135623730951},"48":{"tf":1.0},"54":{"tf":1.0},"65":{"tf":1.4142135623730951},"70":{"tf":1.0},"77":{"tf":1.0},"9":{"tf":1.0}},"u":{"df":0,"docs":{},"p":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"70":{"tf":1.0}}}},"df":2,"docs":{"65":{"tf":1.0},"70":{"tf":1.0}}}}}}}},"s":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":2,"docs":{"75":{"tf":1.0},"76":{"tf":1.0}}}},"n":{"d":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"x":{"df":1,"docs":{"59":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"87":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":10,"docs":{"14":{"tf":1.4142135623730951},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"53":{"tf":1.0},"63":{"tf":1.0},"69":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"57":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"d":{"df":1,"docs":{"80":{"tf":1.0}}},"df":4,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"80":{"tf":1.0},"83":{"tf":1.0}}},"g":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{}}},"n":{"d":{"df":1,"docs":{"76":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"76":{"tf":1.0}}}},"p":{"a":{"df":0,"docs":{},"r":{"df":2,"docs":{"73":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{}},"t":{"df":18,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"48":{"tf":1.0},"80":{"tf":1.0},"85":{"tf":1.0}}},"x":{"df":0,"docs":{},"u":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}},"h":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"14":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":3,"docs":{"41":{"tf":1.0},"46":{"tf":1.0},"85":{"tf":1.0}}}}},"i":{"df":3,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"l":{"df":3,"docs":{"46":{"tf":1.0},"47":{"tf":1.0},"62":{"tf":1.0}},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}},"i":{"df":3,"docs":{"31":{"tf":1.0},"40":{"tf":1.0},"55":{"tf":1.0}}}}}},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"l":{"df":4,"docs":{"32":{"tf":1.0},"37":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"e":{"df":7,"docs":{"14":{"tf":1.0},"17":{"tf":1.4142135623730951},"27":{"tf":1.7320508075688772},"29":{"tf":2.23606797749979},"31":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951},"84":{"tf":1.0}}}}},"k":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":1,"docs":{"22":{"tf":1.0}}}}},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"n":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":1,"docs":{"53":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"o":{"c":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"87":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":6,"docs":{"14":{"tf":1.0},"26":{"tf":1.4142135623730951},"27":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951}}}},"m":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"t":{"_":{"c":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"75":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"62":{"tf":1.4142135623730951}}}},"w":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}},"o":{"df":0,"docs":{},"n":{"df":23,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"3":{"tf":1.0},"4":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}}},"u":{"df":0,"docs":{},"r":{"c":{"df":1,"docs":{"77":{"tf":1.0}}},"df":0,"docs":{}}}},"p":{"a":{"c":{"df":0,"docs":{},"e":{"df":2,"docs":{"27":{"tf":1.4142135623730951},"87":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"c":{"df":2,"docs":{"72":{"tf":1.7320508075688772},"76":{"tf":1.7320508075688772}},"i":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"34":{"tf":1.0}}}},"df":0,"docs":{},"f":{"df":7,"docs":{"40":{"tf":1.0},"48":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.7320508075688772},"77":{"tf":1.0},"80":{"tf":1.0},"88":{"tf":1.0}},"i":{"df":5,"docs":{"14":{"tf":1.4142135623730951},"15":{"tf":1.4142135623730951},"16":{"tf":1.0},"37":{"tf":1.0},"42":{"tf":1.0}}}}}},"df":0,"docs":{}}},"r":{"c":{"/":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"b":{".":{"df":0,"docs":{},"r":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"m":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{".":{"df":0,"docs":{},"r":{"df":4,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.0},"49":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"t":{"a":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":2,"docs":{"40":{"tf":1.0},"51":{"tf":1.0}}}}},"df":0,"docs":{},"n":{"d":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":1.0}}}}},"r":{"d":{"df":3,"docs":{"37":{"tf":1.4142135623730951},"85":{"tf":1.0},"86":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"t":{"df":8,"docs":{"22":{"tf":1.4142135623730951},"33":{"tf":1.0},"37":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.4142135623730951},"48":{"tf":1.0},"62":{"tf":1.0},"76":{"tf":1.0}}}},"t":{"df":0,"docs":{},"e":{"df":1,"docs":{"53":{"tf":1.0}}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":3,"docs":{"33":{"tf":1.0},"34":{"tf":1.0},"35":{"tf":1.0}}}}}}},"d":{":":{":":{"df":0,"docs":{},"f":{"df":0,"docs":{},"s":{":":{":":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":2,"docs":{"38":{"tf":1.4142135623730951},"54":{"tf":1.0}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":3,"docs":{"24":{"tf":1.0},"40":{"tf":1.4142135623730951},"56":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"48":{"tf":1.0}}}},"df":0,"docs":{},"e":{":":{":":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":2,"docs":{"48":{"tf":1.4142135623730951},"49":{"tf":1.0}}}}},"r":{"df":1,"docs":{"40":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":12,"docs":{"16":{"tf":1.0},"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979}}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"79":{"tf":1.0}}}}},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.0}},"u":{"df":0,"docs":{},"r":{"df":2,"docs":{"40":{"tf":1.0},"79":{"tf":1.0}}}}}},"df":0,"docs":{}}},"u":{"b":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":3,"docs":{"75":{"tf":1.0},"76":{"tf":1.4142135623730951},"77":{"tf":1.0}}}}}},"u":{"b":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"80":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":2,"docs":{"72":{"tf":2.0},"76":{"tf":1.0}}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"31":{"tf":1.0}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"69":{"tf":1.0}}}}}}}}}}},"df":0,"docs":{},"h":{"df":3,"docs":{"24":{"tf":1.0},"40":{"tf":1.0},"85":{"tf":1.0}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"75":{"tf":1.0}}}},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":9,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979},"41":{"tf":1.7320508075688772},"53":{"tf":2.0},"54":{"tf":2.23606797749979},"55":{"tf":1.7320508075688772},"56":{"tf":1.0},"77":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"df":11,"docs":{"22":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"60":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0},"69":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":1,"docs":{"25":{"tf":1.0}}}}}}},"y":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"x":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":17,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"18":{"tf":1.0},"21":{"tf":1.0},"24":{"tf":1.4142135623730951},"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"30":{"tf":1.0},"31":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.4142135623730951},"66":{"tf":1.0},"70":{"tf":1.0}}}}}}}},"t":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":2.6457513110645907}}}},"c":{"df":0,"docs":{},"k":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}}},"df":0,"docs":{},"k":{"df":0,"docs":{},"e":{"df":3,"docs":{"40":{"tf":1.0},"79":{"tf":1.7320508075688772},"86":{"tf":1.0}}}},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}},"/":{"d":{"df":0,"docs":{},"e":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"67":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"67":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"3":{"2":{"df":3,"docs":{"38":{"tf":1.7320508075688772},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":4,"docs":{"37":{"tf":3.0},"38":{"tf":1.4142135623730951},"70":{"tf":1.4142135623730951},"80":{"tf":2.23606797749979}}}}}},"s":{"df":0,"docs":{},"k":{"df":6,"docs":{"22":{"tf":2.0},"24":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"33":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951}}}}},"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"88":{"tf":1.7320508075688772}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"88":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"86":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}},"n":{"d":{"df":1,"docs":{"62":{"tf":1.0}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"m":{"df":1,"docs":{"54":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"m":{"df":2,"docs":{"70":{"tf":1.0},"73":{"tf":1.0}}}},"df":0,"docs":{}}}}}}},"df":15,"docs":{"40":{"tf":1.0},"53":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"69":{"tf":2.0},"70":{"tf":3.3166247903554},"71":{"tf":2.6457513110645907},"72":{"tf":1.7320508075688772},"73":{"tf":2.23606797749979},"74":{"tf":1.0},"75":{"tf":4.242640687119285},"76":{"tf":3.0},"77":{"tf":2.6457513110645907},"79":{"tf":2.6457513110645907},"80":{"tf":1.4142135623730951}},"s":{"/":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"c":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.0}},"e":{"/":{"*":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"s":{"df":0,"docs":{},"r":{"c":{"/":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"77":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"72":{"tf":1.4142135623730951},"76":{"tf":2.23606797749979}}}}}}}}},"h":{"a":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"77":{"tf":1.0}},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"39":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"66":{"tf":1.0}}}}}}},"y":{"'":{"df":0,"docs":{},"r":{"df":1,"docs":{"80":{"tf":1.0}}}},"df":0,"docs":{}}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":2,"docs":{"40":{"tf":1.0},"64":{"tf":1.0}}},"k":{"df":2,"docs":{"14":{"tf":1.0},"76":{"tf":1.0}}}},"s":{"'":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":1,"docs":{"32":{"tf":1.0}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"d":{"df":2,"docs":{"20":{"tf":1.4142135623730951},"33":{"tf":1.0}}},"df":0,"docs":{}}}}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":2,"docs":{"39":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}}}},"u":{"df":2,"docs":{"14":{"tf":1.0},"24":{"tf":1.0}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"m":{"df":0,"docs":{},"e":{"df":10,"docs":{"24":{"tf":1.0},"25":{"tf":1.4142135623730951},"34":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0},"54":{"tf":1.4142135623730951},"55":{"tf":1.0},"56":{"tf":1.0}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":2,"docs":{"22":{"tf":1.4142135623730951},"33":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"24":{"tf":1.0}}}}}}}},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"60":{"tf":1.0}}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.7320508075688772}}}}},"m":{"df":0,"docs":{},"l":{"df":1,"docs":{"14":{"tf":1.0}}}},"o":{"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"40":{"tf":1.4142135623730951},"65":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"df":3,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"67":{"tf":1.0}}}},"t":{"a":{"df":0,"docs":{},"l":{"df":4,"docs":{"14":{"tf":1.0},"27":{"tf":1.4142135623730951},"29":{"tf":2.23606797749979},"34":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"r":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"66":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"(":{"a":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"y":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"y":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"24":{"tf":1.0},"25":{"tf":1.0},"34":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":1,"docs":{"79":{"tf":1.0}}}},"i":{"df":1,"docs":{"25":{"tf":1.0}},"p":{"df":0,"docs":{},"l":{"df":1,"docs":{"37":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"85":{"tf":1.0}}}},"u":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"61":{"tf":1.0}}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"e":{"df":2,"docs":{"14":{"tf":1.0},"15":{"tf":1.4142135623730951}}}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"14":{"tf":1.4142135623730951}}}},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"1":{"tf":1.0}}}}}}},"w":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"k":{"df":2,"docs":{"41":{"tf":1.0},"77":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"o":{"df":3,"docs":{"24":{"tf":1.0},"30":{"tf":1.0},"79":{"tf":1.0}}}},"y":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":16,"docs":{"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.7320508075688772},"40":{"tf":3.0},"42":{"tf":1.0}}}}}},"u":{"3":{"2":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"8":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{},"n":{"a":{"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":3,"docs":{"85":{"tf":1.0},"86":{"tf":1.0},"88":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":3,"docs":{"40":{"tf":1.0},"41":{"tf":1.0},"77":{"tf":1.0}},"s":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"30":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.4142135623730951}}},"x":{"df":1,"docs":{"77":{"tf":1.0}}}},"k":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":2.0}}}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"42":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":4,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"67":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":1,"docs":{"34":{"tf":1.0}}}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"62":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"31":{"tf":1.0}}}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":1,"docs":{"85":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"p":{"d":{"a":{"df":0,"docs":{},"t":{"df":7,"docs":{"21":{"tf":1.0},"25":{"tf":1.0},"31":{"tf":1.4142135623730951},"34":{"tf":1.0},"40":{"tf":1.4142135623730951},"72":{"tf":1.0},"76":{"tf":1.0}}}},"df":0,"docs":{}},"df":9,"docs":{"16":{"tf":1.0},"21":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"48":{"tf":1.0},"60":{"tf":1.0},"80":{"tf":1.0}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}}}},"s":{"a":{"df":0,"docs":{},"g":{"df":5,"docs":{"17":{"tf":1.0},"20":{"tf":1.4142135623730951},"33":{"tf":1.7320508075688772},"40":{"tf":1.0},"54":{"tf":1.0}}}},"df":31,"docs":{"10":{"tf":1.0},"11":{"tf":1.0},"14":{"tf":2.0},"15":{"tf":1.4142135623730951},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"25":{"tf":1.0},"31":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.4142135623730951},"37":{"tf":1.7320508075688772},"38":{"tf":1.4142135623730951},"39":{"tf":2.23606797749979},"40":{"tf":2.449489742783178},"41":{"tf":1.7320508075688772},"42":{"tf":2.0},"46":{"tf":1.0},"48":{"tf":2.6457513110645907},"49":{"tf":1.4142135623730951},"56":{"tf":1.7320508075688772},"6":{"tf":1.0},"7":{"tf":1.0},"70":{"tf":1.0},"73":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.7320508075688772},"79":{"tf":1.0},"8":{"tf":1.0},"85":{"tf":1.4142135623730951},"87":{"tf":1.0},"9":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"v":{"0":{".":{"1":{".":{"0":{"df":2,"docs":{"38":{"tf":1.0},"39":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"2":{".":{"5":{"4":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}},"u":{"df":6,"docs":{"14":{"tf":2.0},"15":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"48":{"tf":1.0}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":2,"docs":{"39":{"tf":1.0},"75":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"75":{"tf":1.0}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":5,"docs":{"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"70":{"tf":1.0},"76":{"tf":1.0},"89":{"tf":1.0}}}}}}}},"i":{"a":{"df":5,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.0},"87":{"tf":1.0}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}}}},"w":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":8,"docs":{"38":{"tf":1.0},"39":{"tf":2.0},"40":{"tf":1.0},"62":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}}},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}},"s":{"df":0,"docs":{},"i":{"/":{"d":{"df":0,"docs":{},"e":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":1,"docs":{"38":{"tf":1.7320508075688772}}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"40":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":7,"docs":{"37":{"tf":2.0},"38":{"tf":3.3166247903554},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"70":{"tf":2.23606797749979},"73":{"tf":1.7320508075688772},"77":{"tf":1.7320508075688772}}},"m":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"3":{"2":{"df":3,"docs":{"37":{"tf":2.0},"38":{"tf":1.7320508075688772},"70":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"_":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":1,"docs":{"42":{"tf":1.0}}}}},"df":0,"docs":{}}}},":":{":":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"u":{"d":{"df":2,"docs":{"40":{"tf":1.0},"42":{"tf":1.0}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":2,"docs":{"40":{"tf":1.0},"41":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"47":{"tf":1.0},"48":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}}}}}}},"df":12,"docs":{"37":{"tf":1.4142135623730951},"39":{"tf":1.4142135623730951},"40":{"tf":3.0},"41":{"tf":1.4142135623730951},"42":{"tf":2.6457513110645907},"46":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0},"49":{"tf":1.0},"72":{"tf":1.4142135623730951},"76":{"tf":1.0},"79":{"tf":1.7320508075688772}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":34,"docs":{"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"14":{"tf":2.0},"18":{"tf":1.0},"19":{"tf":1.0},"3":{"tf":1.0},"34":{"tf":1.0},"37":{"tf":2.0},"38":{"tf":2.0},"39":{"tf":2.0},"40":{"tf":2.449489742783178},"45":{"tf":1.0},"46":{"tf":1.4142135623730951},"48":{"tf":2.23606797749979},"49":{"tf":1.0},"50":{"tf":1.0},"53":{"tf":1.7320508075688772},"55":{"tf":1.0},"56":{"tf":1.4142135623730951},"60":{"tf":1.4142135623730951},"61":{"tf":1.4142135623730951},"62":{"tf":1.0},"63":{"tf":1.0},"64":{"tf":1.0},"66":{"tf":1.0},"67":{"tf":1.7320508075688772},"68":{"tf":2.23606797749979},"69":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":2.0},"72":{"tf":1.7320508075688772},"76":{"tf":2.0},"79":{"tf":1.0}},"e":{"'":{"df":4,"docs":{"62":{"tf":1.0},"66":{"tf":1.0},"69":{"tf":1.0},"70":{"tf":1.0}}},"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"48":{"tf":1.4142135623730951}}}}}}}},"df":0,"docs":{}}}}}},"t":{"df":1,"docs":{"76":{"tf":1.7320508075688772}},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"70":{"tf":1.0}}}}}},"t":{"2":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"47":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"y":{"df":2,"docs":{"53":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{},"e":{"'":{"d":{"df":1,"docs":{"56":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.7320508075688772},"40":{"tf":1.0},"64":{"tf":1.0},"76":{"tf":1.0}}}},"r":{"df":3,"docs":{"38":{"tf":1.0},"56":{"tf":1.0},"60":{"tf":1.0}}}},"b":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"l":{"df":15,"docs":{"10":{"tf":1.0},"35":{"tf":1.0},"36":{"tf":1.0},"37":{"tf":1.7320508075688772},"38":{"tf":1.7320508075688772},"40":{"tf":2.6457513110645907},"41":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"55":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":3,"docs":{"14":{"tf":1.0},"84":{"tf":1.0},"85":{"tf":1.0}}}}},"df":0,"docs":{},"l":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"62":{"tf":1.0}}}}},"h":{"a":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"53":{"tf":1.4142135623730951}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"15":{"tf":1.0},"79":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"k":{"df":0,"docs":{},"i":{"df":1,"docs":{"86":{"tf":1.0}}}},"n":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":2,"docs":{"53":{"tf":1.0},"77":{"tf":1.0}}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":5,"docs":{"22":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0},"75":{"tf":1.0},"87":{"tf":1.0}}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":5,"docs":{"68":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0},"85":{"tf":1.0}}}}}}}},"o":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":3,"docs":{"37":{"tf":1.0},"40":{"tf":1.0},"56":{"tf":1.0}}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"k":{"df":12,"docs":{"14":{"tf":1.0},"22":{"tf":1.0},"24":{"tf":1.0},"30":{"tf":1.0},"33":{"tf":1.0},"37":{"tf":1.7320508075688772},"39":{"tf":1.7320508075688772},"40":{"tf":2.0},"42":{"tf":1.0},"53":{"tf":1.4142135623730951},"60":{"tf":1.0},"73":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":13,"docs":{"17":{"tf":1.4142135623730951},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.4142135623730951},"22":{"tf":2.0},"24":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"30":{"tf":1.0},"31":{"tf":1.7320508075688772},"32":{"tf":1.4142135623730951},"33":{"tf":1.0},"34":{"tf":1.0}}}},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":1,"docs":{"62":{"tf":1.0}}}}}}},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":3,"docs":{"2":{"tf":1.0},"3":{"tf":1.0},"38":{"tf":1.7320508075688772}}}}},"df":0,"docs":{}}},"df":3,"docs":{"38":{"tf":2.8284271247461903},"39":{"tf":2.449489742783178},"53":{"tf":1.0}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":9,"docs":{"31":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0},"36":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":2,"docs":{"18":{"tf":1.0},"80":{"tf":1.0}}}}}}}}},"x":{"8":{"6":{"_":{"6":{"4":{"df":2,"docs":{"53":{"tf":1.7320508075688772},"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"y":{"df":1,"docs":{"75":{"tf":1.4142135623730951}},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"u":{"'":{"d":{"df":2,"docs":{"76":{"tf":1.0},"77":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":6,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"39":{"tf":2.0},"40":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0}}}},"r":{"df":11,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.4142135623730951},"70":{"tf":1.0},"75":{"tf":1.0}}},"v":{"df":2,"docs":{"60":{"tf":1.0},"72":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"f":{"df":1,"docs":{"38":{"tf":1.0}}}}}}}}}},"z":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"d":{"df":3,"docs":{"18":{"tf":1.4142135623730951},"19":{"tf":1.0},"31":{"tf":1.0}}},"df":0,"docs":{}}}}}},"breadcrumbs":{"root":{"0":{".":{"0":{"8":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}},"1":{"6":{"df":1,"docs":{"38":{"tf":1.0}}},"df":0,"docs":{}},"2":{".":{"5":{"4":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"1":{".":{"4":{"df":1,"docs":{"89":{"tf":1.0}}},"df":0,"docs":{}},"6":{"df":1,"docs":{"17":{"tf":1.0}}},"d":{"df":1,"docs":{"23":{"tf":1.0}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"i":{"df":1,"docs":{"14":{"tf":1.0}}}},"h":{"df":1,"docs":{"21":{"tf":1.0}}}},"2":{"0":{"df":1,"docs":{"19":{"tf":1.0}}},"5":{"6":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"3":{"0":{"df":0,"docs":{},"m":{"df":2,"docs":{"14":{"tf":1.0},"22":{"tf":1.0}}}},"df":1,"docs":{"18":{"tf":1.0}}},"4":{"2":{"df":1,"docs":{"47":{"tf":1.0}}},"df":0,"docs":{}},"5":{"1":{"2":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":1,"docs":{"27":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"6":{"5":{"5":{"3":{"6":{"df":1,"docs":{"26":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"7":{"0":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}},"df":0,"docs":{}},"9":{".":{"5":{"7":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"a":{"a":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"h":{"6":{"4":{"df":1,"docs":{"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}},"b":{"df":0,"docs":{},"i":{"df":1,"docs":{"42":{"tf":1.0}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"16":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"88":{"tf":1.0}}}}},"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":4,"docs":{"48":{"tf":1.0},"76":{"tf":1.0},"85":{"tf":1.0},"86":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"34":{"tf":1.0}}},"df":0,"docs":{}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}}},"df":0,"docs":{},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.4142135623730951}}}}}},"t":{"df":2,"docs":{"39":{"tf":1.0},"87":{"tf":1.0}},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}}},"v":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}},"u":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"25":{"tf":1.0},"64":{"tf":1.0}}}},"df":0,"docs":{}}}},"d":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"89":{"tf":1.0}}}}},"d":{"df":9,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"55":{"tf":1.0},"69":{"tf":1.0},"70":{"tf":1.0},"75":{"tf":1.7320508075688772},"76":{"tf":1.4142135623730951},"77":{"tf":1.0}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"85":{"tf":1.0},"87":{"tf":1.0}}}}}}},"df":4,"docs":{"74":{"tf":1.4142135623730951},"75":{"tf":1.4142135623730951},"76":{"tf":1.7320508075688772},"77":{"tf":1.4142135623730951}},"v":{"a":{"df":0,"docs":{},"n":{"c":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":1,"docs":{"79":{"tf":1.0}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"g":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":1,"docs":{"84":{"tf":1.0}},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":2,"docs":{"40":{"tf":1.0},"86":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"n":{"c":{"df":1,"docs":{"88":{"tf":1.0}},"e":{"'":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"o":{"c":{"df":1,"docs":{"55":{"tf":1.0}}},"df":0,"docs":{},"w":{"df":4,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"34":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"i":{"df":4,"docs":{"21":{"tf":1.0},"24":{"tf":1.0},"38":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}}}},"w":{"a":{"df":0,"docs":{},"y":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{}}},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{".":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"(":{")":{".":{"c":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"(":{"&":{"[":{"]":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"47":{"tf":1.0},"48":{"tf":1.4142135623730951},"49":{"tf":1.0}}}}}},"y":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":1,"docs":{"41":{"tf":1.4142135623730951}}}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"37":{"tf":1.0}}}}}},"p":{"df":0,"docs":{},"i":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"46":{"tf":1.0}}},"p":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"68":{"tf":1.0}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}},"df":1,"docs":{"87":{"tf":1.0}}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}}}}}}},"r":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"54":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":2,"docs":{"61":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}}},"g":{"df":1,"docs":{"41":{"tf":1.4142135623730951}},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.7320508075688772},"41":{"tf":1.0}},"s":{"/":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"42":{"tf":1.0}}}}}}}}},"df":0,"docs":{}}}}}}}},"m":{"df":1,"docs":{"54":{"tf":1.0}}},"r":{"a":{"df":0,"docs":{},"y":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"k":{"df":2,"docs":{"61":{"tf":1.0},"62":{"tf":1.0}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":2,"docs":{"76":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"m":{"df":4,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"37":{"tf":1.4142135623730951},"70":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"t":{"a":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"85":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":4,"docs":{"21":{"tf":1.0},"24":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"89":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}}}},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"38":{"tf":1.0},"41":{"tf":1.0},"77":{"tf":1.0}}}},"df":0,"docs":{}}}}},"v":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":2,"docs":{"66":{"tf":1.0},"89":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"70":{"tf":1.0}}},"df":0,"docs":{}}}}},"b":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"33":{"tf":1.0},"54":{"tf":1.0}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"24":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}},"r":{"df":1,"docs":{"42":{"tf":1.4142135623730951}},"e":{"df":1,"docs":{"40":{"tf":1.0}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"18":{"tf":1.4142135623730951},"31":{"tf":1.0}}}}}},"h":{"df":1,"docs":{"10":{"tf":1.4142135623730951}}},"i":{"c":{"df":1,"docs":{"39":{"tf":1.0}}},"df":0,"docs":{}}},"z":{"df":1,"docs":{"42":{"tf":1.7320508075688772}}}},"df":0,"docs":{},"e":{"df":5,"docs":{"18":{"tf":1.0},"21":{"tf":1.0},"53":{"tf":1.0},"75":{"tf":1.0},"85":{"tf":1.0}},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":3,"docs":{"40":{"tf":1.0},"64":{"tf":1.0},"69":{"tf":1.0}}}}},"h":{"a":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":5,"docs":{"14":{"tf":1.0},"83":{"tf":1.0},"85":{"tf":1.4142135623730951},"86":{"tf":1.7320508075688772},"88":{"tf":1.0}}}}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":1,"docs":{"76":{"tf":1.0}}}},"w":{"df":1,"docs":{"53":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"t":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"48":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"g":{"df":2,"docs":{"24":{"tf":1.0},"30":{"tf":1.0}}},"n":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":6,"docs":{"37":{"tf":1.7320508075688772},"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"41":{"tf":1.0},"79":{"tf":1.0}}}}},"d":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":4,"docs":{"40":{"tf":2.6457513110645907},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"66":{"tf":1.4142135623730951}}}}}},"df":1,"docs":{"48":{"tf":1.0}}}},"o":{"d":{"df":0,"docs":{},"i":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":1,"docs":{"77":{"tf":1.0}}}}}}}},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}},"o":{"df":0,"docs":{},"k":{"df":1,"docs":{"39":{"tf":1.0}}},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"n":{"df":1,"docs":{"15":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":1.0}}}}}},"df":1,"docs":{"48":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"87":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"k":{"df":1,"docs":{"40":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"37":{"tf":1.0},"40":{"tf":1.0}}}}}}}},"u":{"df":0,"docs":{},"g":{"df":1,"docs":{"79":{"tf":1.0}}},"i":{"df":0,"docs":{},"l":{"d":{"df":11,"docs":{"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"61":{"tf":1.0},"62":{"tf":1.0},"63":{"tf":1.7320508075688772},"64":{"tf":1.0},"67":{"tf":2.8284271247461903},"68":{"tf":2.8284271247461903},"69":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951}}},"df":0,"docs":{},"t":{"df":2,"docs":{"38":{"tf":1.0},"67":{"tf":1.4142135623730951}}}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"88":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":2,"docs":{"40":{"tf":1.0},"79":{"tf":1.0}}}}}},"c":{"/":{"c":{"df":1,"docs":{"43":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"a":{"c":{"df":0,"docs":{},"h":{"df":22,"docs":{"14":{"tf":2.449489742783178},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.4142135623730951},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"20":{"tf":1.4142135623730951},"21":{"tf":1.7320508075688772},"22":{"tf":1.4142135623730951},"24":{"tf":1.4142135623730951},"25":{"tf":2.449489742783178},"26":{"tf":1.4142135623730951},"27":{"tf":1.4142135623730951},"28":{"tf":1.7320508075688772},"29":{"tf":1.7320508075688772},"30":{"tf":2.23606797749979},"31":{"tf":2.449489742783178},"32":{"tf":1.7320508075688772},"33":{"tf":1.4142135623730951},"34":{"tf":2.0},"35":{"tf":1.0},"75":{"tf":1.0}},"e":{"_":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"16":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951}}}},"n":{"'":{"df":0,"docs":{},"t":{"df":2,"docs":{"37":{"tf":1.0},"69":{"tf":1.4142135623730951}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"38":{"tf":1.0}}}}},"p":{"a":{"c":{"df":1,"docs":{"53":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"l":{"df":3,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0}}}}}}},"/":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"/":{"c":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"o":{"df":1,"docs":{"38":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":12,"docs":{"38":{"tf":3.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"65":{"tf":1.0},"67":{"tf":2.0},"68":{"tf":2.0},"70":{"tf":1.7320508075688772},"71":{"tf":2.0},"72":{"tf":1.0},"73":{"tf":1.0},"80":{"tf":1.7320508075688772}}}}},"s":{"df":0,"docs":{},"e":{"df":7,"docs":{"31":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.4142135623730951},"56":{"tf":1.4142135623730951},"77":{"tf":1.0},"79":{"tf":2.8284271247461903},"80":{"tf":1.4142135623730951}}}}},"d":{"df":4,"docs":{"38":{"tf":1.0},"48":{"tf":1.0},"68":{"tf":1.4142135623730951},"71":{"tf":1.4142135623730951}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"b":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}}}}},"df":4,"docs":{"39":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"50":{"tf":1.4142135623730951}},"f":{"df":0,"docs":{},"g":{"(":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{}}},"h":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":3,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"30":{"tf":1.0}}}},"t":{"df":2,"docs":{"61":{"tf":1.7320508075688772},"62":{"tf":1.0}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"k":{"df":6,"docs":{"24":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"72":{"tf":1.4142135623730951},"79":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"77":{"tf":1.0},"79":{"tf":1.0}}},"df":0,"docs":{}}}},"i":{"df":1,"docs":{"81":{"tf":1.4142135623730951}},"r":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"l":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":2,"docs":{"86":{"tf":1.0},"87":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"n":{"df":2,"docs":{"21":{"tf":1.0},"34":{"tf":1.0}},"u":{"df":0,"docs":{},"p":{"df":5,"docs":{"14":{"tf":1.0},"21":{"tf":1.7320508075688772},"28":{"tf":1.0},"29":{"tf":1.0},"34":{"tf":1.0}}}}}},"df":0,"docs":{}},"i":{"df":30,"docs":{"11":{"tf":1.4142135623730951},"12":{"tf":1.0},"13":{"tf":1.7320508075688772},"14":{"tf":1.0},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"30":{"tf":1.0},"31":{"tf":1.0},"32":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0},"35":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979},"67":{"tf":2.0},"72":{"tf":1.4142135623730951},"76":{"tf":1.0}},"n":{"df":0,"docs":{},"k":{"df":1,"docs":{"41":{"tf":1.0}}}}},"o":{"c":{"df":0,"docs":{},"k":{"df":5,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"24":{"tf":1.0},"34":{"tf":1.0}}}},"df":0,"docs":{}}},"o":{"c":{"df":1,"docs":{"88":{"tf":1.7320508075688772}}},"d":{"df":0,"docs":{},"e":{"df":15,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.0},"41":{"tf":1.0},"48":{"tf":1.0},"55":{"tf":1.0},"60":{"tf":1.0},"75":{"tf":1.7320508075688772},"77":{"tf":1.0},"80":{"tf":1.0},"83":{"tf":2.0},"86":{"tf":1.4142135623730951},"87":{"tf":1.0},"88":{"tf":1.0},"89":{"tf":1.0}}}},"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"80":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":24,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"3":{"tf":1.0},"4":{"tf":1.4142135623730951},"40":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}},"m":{"a":{"df":0,"docs":{},"n":{"d":{"df":6,"docs":{"39":{"tf":1.0},"67":{"tf":1.4142135623730951},"68":{"tf":1.0},"70":{"tf":1.4142135623730951},"71":{"tf":1.0},"73":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":3,"docs":{"62":{"tf":1.0},"85":{"tf":1.0},"86":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"37":{"tf":1.0},"73":{"tf":1.0}}}},"u":{"df":0,"docs":{},"n":{"df":3,"docs":{"84":{"tf":1.0},"85":{"tf":1.4142135623730951},"87":{"tf":1.4142135623730951}}}}},"p":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}},"t":{"df":1,"docs":{"37":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":5,"docs":{"37":{"tf":2.0},"38":{"tf":1.4142135623730951},"39":{"tf":1.0},"54":{"tf":2.0},"75":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"30":{"tf":1.0},"38":{"tf":1.4142135623730951}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":6,"docs":{"18":{"tf":2.23606797749979},"19":{"tf":2.0},"20":{"tf":1.4142135623730951},"22":{"tf":1.7320508075688772},"31":{"tf":1.4142135623730951},"33":{"tf":2.6457513110645907}}}}}}}},"n":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"20":{"tf":1.0},"33":{"tf":1.0}}}},"u":{"c":{"df":0,"docs":{},"t":{"df":7,"docs":{"60":{"tf":1.0},"83":{"tf":2.0},"85":{"tf":1.0},"86":{"tf":1.0},"87":{"tf":1.0},"88":{"tf":1.0},"89":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"df":0,"docs":{},"g":{"df":1,"docs":{"14":{"tf":1.4142135623730951}},"u":{"df":0,"docs":{},"r":{"df":6,"docs":{"14":{"tf":2.0},"15":{"tf":1.0},"30":{"tf":1.0},"38":{"tf":1.0},"53":{"tf":1.4142135623730951},"75":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"48":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.0}}}},"m":{"df":1,"docs":{"39":{"tf":1.0}}}}},"t":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"88":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"u":{"df":1,"docs":{"69":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":29,"docs":{"14":{"tf":1.0},"60":{"tf":1.4142135623730951},"63":{"tf":1.0},"64":{"tf":1.0},"65":{"tf":1.0},"66":{"tf":1.0},"67":{"tf":1.0},"68":{"tf":1.0},"69":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"72":{"tf":1.0},"73":{"tf":1.0},"74":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0},"78":{"tf":1.0},"79":{"tf":1.0},"80":{"tf":1.0},"81":{"tf":1.0},"82":{"tf":1.0},"83":{"tf":1.0},"84":{"tf":1.0},"85":{"tf":1.4142135623730951},"86":{"tf":1.4142135623730951},"87":{"tf":1.0},"88":{"tf":1.0},"89":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":5,"docs":{"62":{"tf":1.0},"83":{"tf":1.4142135623730951},"84":{"tf":1.0},"86":{"tf":1.0},"89":{"tf":1.0}}}}}}},"df":0,"docs":{}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"df":2,"docs":{"37":{"tf":1.0},"48":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"p":{"df":0,"docs":{},"u":{"df":1,"docs":{"80":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}}}}}}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"20":{"tf":1.0},"26":{"tf":1.7320508075688772},"28":{"tf":2.449489742783178},"34":{"tf":1.4142135623730951}},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"20":{"tf":1.4142135623730951},"33":{"tf":1.7320508075688772}}}}}},"p":{"df":0,"docs":{},"l":{"df":2,"docs":{"37":{"tf":1.0},"80":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{".":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"/":{"1":{"/":{"4":{"df":1,"docs":{"89":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}},"df":2,"docs":{"83":{"tf":1.4142135623730951},"89":{"tf":1.0}}}}}},"p":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.0}}},"r":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":1,"docs":{"54":{"tf":1.0}}}}}}}},"t":{"df":0,"docs":{},"e":{"'":{"df":3,"docs":{"68":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0}}},"df":14,"docs":{"16":{"tf":1.0},"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"48":{"tf":1.0},"56":{"tf":1.0},"66":{"tf":1.0},"68":{"tf":2.0},"70":{"tf":1.4142135623730951},"71":{"tf":2.0},"72":{"tf":1.0},"73":{"tf":1.0},"75":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951},"79":{"tf":1.0}},"s":{".":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":1,"docs":{"40":{"tf":1.0}}}}},"/":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"s":{"/":{"c":{"a":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"_":{"*":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":1,"docs":{"71":{"tf":1.0}}}}}}}}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"z":{"df":0,"docs":{},"z":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"j":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"68":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":10,"docs":{"14":{"tf":1.0},"2":{"tf":1.4142135623730951},"24":{"tf":1.0},"39":{"tf":1.0},"47":{"tf":1.7320508075688772},"48":{"tf":1.7320508075688772},"54":{"tf":1.0},"75":{"tf":1.4142135623730951},"76":{"tf":1.0},"85":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}}},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"38":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":5,"docs":{"41":{"tf":1.4142135623730951},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"56":{"tf":1.0},"80":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":3,"docs":{"14":{"tf":1.0},"41":{"tf":1.0},"76":{"tf":1.0}}}}}}}},"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":2,"docs":{"31":{"tf":1.4142135623730951},"79":{"tf":1.0}},"t":{"df":0,"docs":{},"y":{"df":0,"docs":{},"p":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}},"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":1,"docs":{"67":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}}}}}}}},"c":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"19":{"tf":1.0},"22":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"79":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":15,"docs":{"14":{"tf":2.0},"15":{"tf":1.7320508075688772},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.4142135623730951},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"41":{"tf":1.0}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":3,"docs":{"24":{"tf":1.0},"80":{"tf":1.0},"87":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":4,"docs":{"25":{"tf":1.0},"28":{"tf":2.0},"29":{"tf":2.0},"34":{"tf":2.0}}}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"d":{"df":4,"docs":{"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"55":{"tf":1.0},"66":{"tf":1.0}}},"df":0,"docs":{}}}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":2,"docs":{"63":{"tf":1.0},"69":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":1,"docs":{"37":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":8,"docs":{"30":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"41":{"tf":1.0},"53":{"tf":1.0},"66":{"tf":1.0},"80":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"79":{"tf":1.4142135623730951},"88":{"tf":1.0}}}}}}}},"v":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":4,"docs":{"40":{"tf":1.7320508075688772},"60":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"24":{"tf":1.0},"85":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"41":{"tf":1.0}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":9,"docs":{"14":{"tf":1.0},"16":{"tf":2.0},"26":{"tf":1.0},"27":{"tf":1.0},"34":{"tf":1.0},"68":{"tf":1.0},"71":{"tf":1.0},"75":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"s":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{}},"c":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"58":{"tf":1.4142135623730951}}}}}}},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"48":{"tf":1.0}}}},"u":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"56":{"tf":1.0}}}}}},"df":0,"docs":{},"k":{"df":3,"docs":{"27":{"tf":1.4142135623730951},"31":{"tf":1.4142135623730951},"33":{"tf":1.0}}},"t":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"25":{"tf":1.0}}}}},"df":0,"docs":{}}}},"n":{"a":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":5,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"40":{"tf":1.0},"46":{"tf":1.0},"53":{"tf":1.0}}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":5,"docs":{"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"75":{"tf":1.0}}}},"df":0,"docs":{}}}},"n":{"'":{"df":0,"docs":{},"t":{"df":3,"docs":{"14":{"tf":1.4142135623730951},"42":{"tf":1.0},"70":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":3,"docs":{"62":{"tf":1.0},"70":{"tf":1.0},"73":{"tf":1.0}}}},"w":{"df":0,"docs":{},"n":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"d":{"df":2,"docs":{"38":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":5,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"24":{"tf":1.0},"34":{"tf":1.0}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"p":{"df":3,"docs":{"17":{"tf":1.0},"31":{"tf":1.0},"77":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":3,"docs":{"34":{"tf":1.0},"40":{"tf":1.0},"75":{"tf":1.0}}}}},"y":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"55":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.4142135623730951}}}}},"df":1,"docs":{"87":{"tf":1.0}},"l":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"m":{"b":{"df":1,"docs":{"46":{"tf":1.0}},"e":{"d":{"df":6,"docs":{"45":{"tf":1.4142135623730951},"46":{"tf":1.7320508075688772},"47":{"tf":1.0},"48":{"tf":1.4142135623730951},"49":{"tf":1.0},"50":{"tf":1.7320508075688772}}},"df":0,"docs":{}}},"df":0,"docs":{},"p":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}},"df":0,"docs":{}},"s":{"c":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":1.0}}}}}}}}},"df":0,"docs":{}}},"n":{"a":{"b":{"df":0,"docs":{},"l":{"df":3,"docs":{"14":{"tf":1.4142135623730951},"15":{"tf":1.4142135623730951},"79":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"c":{"df":1,"docs":{"88":{"tf":2.0}}},"df":0,"docs":{}}}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"/":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"56":{"tf":1.0}}}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":4,"docs":{"48":{"tf":1.0},"71":{"tf":1.4142135623730951},"84":{"tf":1.0},"85":{"tf":1.0}}}}}}}},"r":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"t":{"c":{"df":2,"docs":{"40":{"tf":1.0},"65":{"tf":1.0}}},"df":0,"docs":{},"h":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"84":{"tf":1.0}}},"df":0,"docs":{}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"17":{"tf":2.0},"31":{"tf":2.0},"32":{"tf":1.0},"87":{"tf":1.0}},"u":{"df":1,"docs":{"24":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"y":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}},"t":{"df":0,"docs":{},"h":{"df":3,"docs":{"40":{"tf":1.0},"48":{"tf":1.0},"63":{"tf":1.0}}}}}}},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"v":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"x":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":12,"docs":{"14":{"tf":1.0},"38":{"tf":1.0},"4":{"tf":1.7320508075688772},"44":{"tf":1.4142135623730951},"5":{"tf":1.0},"68":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"75":{"tf":1.0},"79":{"tf":1.0},"85":{"tf":1.4142135623730951},"87":{"tf":1.0}}}}}},"c":{"df":0,"docs":{},"e":{"df":3,"docs":{"28":{"tf":1.0},"29":{"tf":1.0},"33":{"tf":1.0}},"e":{"d":{"df":4,"docs":{"20":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"34":{"tf":1.0}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"14":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"60":{"tf":1.0}}}},"l":{"df":0,"docs":{},"u":{"d":{"df":1,"docs":{"70":{"tf":2.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":12,"docs":{"24":{"tf":1.0},"37":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.7320508075688772},"40":{"tf":1.0},"54":{"tf":1.0},"67":{"tf":1.4142135623730951},"68":{"tf":1.0},"70":{"tf":1.4142135623730951},"71":{"tf":1.0},"73":{"tf":1.0},"79":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":3,"docs":{"15":{"tf":1.0},"75":{"tf":1.4142135623730951},"76":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"84":{"tf":1.4142135623730951},"85":{"tf":1.0}},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}}}}}},"i":{"df":0,"docs":{},"r":{"df":2,"docs":{"24":{"tf":1.4142135623730951},"34":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"n":{"df":1,"docs":{"4":{"tf":1.0}}}},"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"42":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":4,"docs":{"39":{"tf":1.0},"41":{"tf":2.8284271247461903},"47":{"tf":1.4142135623730951},"48":{"tf":2.449489742783178}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":2,"docs":{"39":{"tf":1.0},"42":{"tf":1.4142135623730951}}}}}}}},"f":{"3":{"2":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"88":{"tf":1.0}}},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":2,"docs":{"61":{"tf":1.0},"79":{"tf":1.0}}},"r":{"df":1,"docs":{"86":{"tf":1.0}}},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"88":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"s":{"df":1,"docs":{"15":{"tf":1.0}}}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"37":{"tf":1.0}}}},"df":0,"docs":{}}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"24":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":3,"docs":{"53":{"tf":1.4142135623730951},"70":{"tf":1.0},"73":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":5,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"d":{"df":1,"docs":{"15":{"tf":1.0}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"e":{"df":25,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.4142135623730951},"21":{"tf":1.4142135623730951},"22":{"tf":1.7320508075688772},"23":{"tf":1.4142135623730951},"25":{"tf":2.6457513110645907},"26":{"tf":2.0},"27":{"tf":2.23606797749979},"28":{"tf":2.8284271247461903},"29":{"tf":2.8284271247461903},"33":{"tf":2.0},"34":{"tf":3.3166247903554},"35":{"tf":2.0},"37":{"tf":1.4142135623730951},"39":{"tf":1.4142135623730951},"47":{"tf":1.0},"48":{"tf":1.7320508075688772},"49":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0},"79":{"tf":1.0}},"s":{"df":0,"docs":{},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":1,"docs":{"34":{"tf":1.0}}}}}}}}}},"n":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":1.0}}}},"d":{"df":1,"docs":{"62":{"tf":1.4142135623730951}}},"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":6,"docs":{"38":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"48":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0}}}}},"t":{"df":1,"docs":{"62":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"g":{"df":4,"docs":{"37":{"tf":1.0},"41":{"tf":1.4142135623730951},"68":{"tf":1.0},"71":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":1,"docs":{"54":{"tf":1.0}}},"o":{"a":{"df":0,"docs":{},"t":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"42":{"tf":1.0}}}}},"n":{"df":5,"docs":{"39":{"tf":1.0},"40":{"tf":1.0},"42":{"tf":2.449489742783178},"49":{"tf":1.0},"75":{"tf":1.0}}},"o":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"37":{"tf":1.0},"85":{"tf":1.0}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":5,"docs":{"33":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"70":{"tf":1.0},"88":{"tf":1.0}}}}}},"o":{"df":1,"docs":{"42":{"tf":1.7320508075688772}}},"r":{"df":0,"docs":{},"k":{"df":1,"docs":{"76":{"tf":1.0}}},"m":{"a":{"df":0,"docs":{},"t":{"!":{"(":{"\"":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":11,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0}}}},"df":2,"docs":{"39":{"tf":1.0},"55":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":6,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"84":{"tf":1.0}}},"s":{"df":0,"docs":{},"h":{"df":1,"docs":{"34":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":2,"docs":{"17":{"tf":1.0},"31":{"tf":1.0}}}},"n":{"c":{"df":1,"docs":{"47":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":6,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772},"41":{"tf":2.449489742783178},"42":{"tf":2.0},"47":{"tf":1.0},"48":{"tf":2.23606797749979}}}}}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"87":{"tf":1.0},"88":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":9,"docs":{"14":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.4142135623730951},"24":{"tf":1.0},"25":{"tf":1.0},"30":{"tf":1.0},"34":{"tf":1.4142135623730951},"40":{"tf":1.7320508075688772}}}}},"z":{"df":0,"docs":{},"z":{"/":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{".":{"df":0,"docs":{},"m":{"d":{"df":1,"docs":{"80":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":5,"docs":{"66":{"tf":1.4142135623730951},"70":{"tf":1.4142135623730951},"78":{"tf":1.4142135623730951},"79":{"tf":1.4142135623730951},"80":{"tf":3.0}},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"79":{"tf":1.4142135623730951},"80":{"tf":1.4142135623730951}}}}}}}},"g":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"56":{"tf":1.0}}}}}}},"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"84":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":6,"docs":{"39":{"tf":1.0},"40":{"tf":1.4142135623730951},"54":{"tf":1.0},"77":{"tf":1.0},"79":{"tf":2.449489742783178},"80":{"tf":1.7320508075688772}}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"t":{"df":2,"docs":{"72":{"tf":1.4142135623730951},"76":{"tf":1.0}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"61":{"tf":1.0}}}}}}},"l":{"df":0,"docs":{},"o":{"b":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"38":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}}}},"o":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}},"df":1,"docs":{"67":{"tf":1.0}},"o":{"d":{"df":2,"docs":{"62":{"tf":1.7320508075688772},"88":{"tf":1.0}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"82":{"tf":1.4142135623730951}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"62":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}}},"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}}},"u":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"60":{"tf":1.0}}},"df":0,"docs":{}}}},"h":{"a":{"c":{"df":0,"docs":{},"k":{"df":2,"docs":{"62":{"tf":1.4142135623730951},"66":{"tf":1.0}}}},"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"l":{"df":2,"docs":{"31":{"tf":1.4142135623730951},"32":{"tf":1.0}}}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":4,"docs":{"24":{"tf":1.0},"38":{"tf":1.0},"41":{"tf":1.0},"79":{"tf":1.0}}}}}},"r":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":3,"docs":{"84":{"tf":1.0},"85":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"m":{"df":1,"docs":{"86":{"tf":1.0}}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"61":{"tf":1.0}}}}},"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"56":{"tf":1.0}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"48":{"tf":1.0}}}},"t":{"df":1,"docs":{"47":{"tf":1.0}}}},"df":0,"docs":{}}},"_":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":1,"docs":{"48":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"g":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"'":{"df":0,"docs":{},"p":{"df":0,"docs":{},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}}}}}}},"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":0,"docs":{}}}}}},"df":5,"docs":{"2":{"tf":1.4142135623730951},"3":{"tf":1.4142135623730951},"38":{"tf":3.0},"39":{"tf":2.0},"40":{"tf":1.4142135623730951}}}},"p":{"df":4,"docs":{"14":{"tf":1.0},"30":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.4142135623730951}}}},"r":{"df":0,"docs":{},"e":{"df":5,"docs":{"30":{"tf":1.0},"40":{"tf":1.0},"61":{"tf":1.0},"65":{"tf":1.0},"66":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"/":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"/":{"c":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"53":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"42":{"tf":1.4142135623730951},"48":{"tf":1.0},"54":{"tf":1.0},"77":{"tf":1.4142135623730951}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"&":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"<":{"_":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}},"df":1,"docs":{"48":{"tf":1.0}}}}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"p":{":":{"/":{"/":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"89":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"i":{".":{"df":2,"docs":{"24":{"tf":1.0},"76":{"tf":1.0}}},"3":{"2":{".":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"47":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"42":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0}}},"df":0,"docs":{}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"79":{"tf":1.0},"84":{"tf":1.4142135623730951}}}}}},"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":4,"docs":{"30":{"tf":1.0},"40":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0}}}}}}},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":5,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"41":{"tf":2.0},"42":{"tf":3.3166247903554},"48":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"n":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"85":{"tf":1.0},"86":{"tf":1.0}}}}}}}}}},"c":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"u":{"d":{"df":9,"docs":{"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"65":{"tf":1.0},"70":{"tf":1.4142135623730951},"77":{"tf":1.4142135623730951},"85":{"tf":1.4142135623730951},"87":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"85":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"m":{"df":1,"docs":{"17":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":1,"docs":{"33":{"tf":1.0}}}},"df":0,"docs":{}}}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":1,"docs":{"40":{"tf":1.0}}}},"i":{"df":0,"docs":{},"v":{"df":0,"docs":{},"i":{"d":{"df":0,"docs":{},"u":{"df":2,"docs":{"83":{"tf":1.0},"87":{"tf":1.0}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":1,"docs":{"38":{"tf":1.4142135623730951}},"r":{"df":0,"docs":{},"m":{"df":5,"docs":{"30":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0},"85":{"tf":1.0}}}}},"r":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"66":{"tf":1.0}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"72":{"tf":1.0}},"i":{"df":1,"docs":{"72":{"tf":1.0}}}}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"41":{"tf":1.0}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":2,"docs":{"79":{"tf":1.7320508075688772},"80":{"tf":1.4142135623730951}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":1,"docs":{"38":{"tf":1.0}}}}},"i":{"d":{"df":3,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"75":{"tf":1.0}}},"df":0,"docs":{}},"t":{"a":{"df":0,"docs":{},"l":{"df":6,"docs":{"12":{"tf":1.4142135623730951},"38":{"tf":1.7320508075688772},"64":{"tf":1.0},"65":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.4142135623730951}}},"n":{"c":{"df":5,"docs":{"48":{"tf":1.7320508075688772},"49":{"tf":1.4142135623730951},"77":{"tf":1.0},"86":{"tf":1.0},"88":{"tf":1.0}},"e":{"'":{"df":1,"docs":{"48":{"tf":1.0}}},".":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"_":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"b":{"df":0,"docs":{},"y":{"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"\"":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"\"":{")":{".":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"c":{"(":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"t":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},":":{":":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"(":{"&":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"a":{"d":{"df":1,"docs":{"42":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"/":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"g":{"df":7,"docs":{"18":{"tf":1.0},"19":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"47":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"/":{"df":0,"docs":{},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"}":{"(":{"df":3,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0}},"k":{"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":5,"docs":{"37":{"tf":1.0},"70":{"tf":1.7320508075688772},"73":{"tf":1.7320508075688772},"75":{"tf":1.0},"77":{"tf":1.4142135623730951}}}},"n":{"d":{"df":4,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"39":{"tf":1.4142135623730951},"53":{"tf":1.0}}},"df":0,"docs":{}},"r":{"a":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":2,"docs":{"56":{"tf":1.0},"84":{"tf":1.0}}}}},"f":{"a":{"c":{"df":3,"docs":{"39":{"tf":1.0},"40":{"tf":3.0},"42":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}},"n":{"df":2,"docs":{"38":{"tf":1.0},"41":{"tf":1.0}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":3,"docs":{"40":{"tf":1.4142135623730951},"55":{"tf":2.0},"79":{"tf":1.4142135623730951}}}}}},"v":{"df":6,"docs":{"14":{"tf":1.0},"21":{"tf":1.7320508075688772},"22":{"tf":1.0},"24":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"c":{"df":1,"docs":{"14":{"tf":1.0}},"t":{"df":1,"docs":{"0":{"tf":1.4142135623730951}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"37":{"tf":1.0},"38":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"o":{"c":{"df":1,"docs":{"68":{"tf":1.0}}},"df":0,"docs":{},"k":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.7320508075688772}}},"l":{"df":0,"docs":{},"v":{"df":3,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"79":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"u":{"df":4,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":2.6457513110645907},"86":{"tf":1.0}}}}},"t":{"'":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"77":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"f":{"df":2,"docs":{"40":{"tf":1.0},"72":{"tf":1.0}}}}}}}},"j":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"54":{"tf":2.0},"68":{"tf":1.4142135623730951}}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"61":{"tf":1.7320508075688772}}}}},"s":{"df":2,"docs":{"37":{"tf":1.0},"40":{"tf":1.0}}}},"k":{"df":0,"docs":{},"e":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":1,"docs":{"25":{"tf":1.0}}}},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}}},"n":{"df":0,"docs":{},"o":{"b":{"df":1,"docs":{"38":{"tf":1.0}}},"df":0,"docs":{},"w":{"df":1,"docs":{"14":{"tf":1.0}},"n":{"df":1,"docs":{"62":{"tf":1.0}}}}}}},"l":{"a":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.4142135623730951}}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"u":{"a":{"df":0,"docs":{},"g":{"df":4,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"6":{"tf":1.4142135623730951},"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"g":{"df":4,"docs":{"10":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"g":{"df":1,"docs":{"37":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"21":{"tf":1.0},"22":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"a":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":1,"docs":{"88":{"tf":1.0}}}}}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":6,"docs":{"14":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"62":{"tf":1.0}}}}},"df":0,"docs":{},"t":{"'":{"df":2,"docs":{"40":{"tf":1.4142135623730951},"47":{"tf":1.0}}},"df":0,"docs":{}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":6,"docs":{"18":{"tf":2.0},"19":{"tf":1.7320508075688772},"31":{"tf":1.0},"33":{"tf":2.0},"40":{"tf":1.0},"84":{"tf":1.0}}}}}},"i":{"b":{"c":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":2,"docs":{"66":{"tf":2.23606797749979},"70":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"z":{"df":0,"docs":{},"z":{"df":2,"docs":{"79":{"tf":1.0},"80":{"tf":1.7320508075688772}}}}}},"r":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":3,"docs":{"37":{"tf":1.4142135623730951},"39":{"tf":2.0},"40":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"t":{"d":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"b":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"54":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":1,"docs":{"53":{"tf":1.0}}}}}}}}}}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":9,"docs":{"14":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.7320508075688772},"27":{"tf":1.7320508075688772},"28":{"tf":2.23606797749979},"29":{"tf":2.23606797749979},"31":{"tf":1.0},"34":{"tf":2.0}}}}},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}},"k":{"(":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"_":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":1,"docs":{"42":{"tf":1.0}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"_":{"df":0,"docs":{},"n":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}},"df":1,"docs":{"41":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"41":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"x":{"df":1,"docs":{"53":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"e":{"df":2,"docs":{"76":{"tf":1.0},"79":{"tf":1.0}}}}},"l":{"d":{"df":1,"docs":{"41":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"o":{"a":{"d":{"df":2,"docs":{"31":{"tf":1.0},"39":{"tf":1.0}}},"df":0,"docs":{}},"c":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"67":{"tf":1.0}}},"t":{"df":5,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.0},"67":{"tf":1.4142135623730951},"77":{"tf":1.0},"79":{"tf":1.0}}}},"df":0,"docs":{},"k":{"df":4,"docs":{"24":{"tf":2.8284271247461903},"25":{"tf":1.0},"34":{"tf":1.0},"35":{"tf":1.0}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":1,"docs":{"25":{"tf":1.0}}}},"o":{"df":0,"docs":{},"k":{"df":4,"docs":{"16":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0},"62":{"tf":1.0}}},"p":{"df":1,"docs":{"32":{"tf":1.0}}}},"t":{"df":1,"docs":{"48":{"tf":1.0}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"56":{"tf":1.0}}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"32":{"tf":1.0},"33":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"u":{"df":1,"docs":{"34":{"tf":1.0}}}}},"m":{"a":{"c":{"df":0,"docs":{},"o":{"df":1,"docs":{"53":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"87":{"tf":1.0}}},"n":{"df":3,"docs":{"30":{"tf":1.0},"49":{"tf":1.0},"77":{"tf":1.0}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":5,"docs":{"34":{"tf":1.0},"84":{"tf":1.0},"86":{"tf":1.4142135623730951},"87":{"tf":1.0},"88":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}}},"k":{"df":0,"docs":{},"e":{"df":13,"docs":{"22":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":1.0},"60":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0},"66":{"tf":1.0},"67":{"tf":1.4142135623730951},"69":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.4142135623730951},"79":{"tf":1.0},"84":{"tf":1.0}}}},"n":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"70":{"tf":1.0}}}},"d":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"15":{"tf":1.0}}}}}}},"df":0,"docs":{}},"df":0,"docs":{},"i":{"df":1,"docs":{"40":{"tf":1.0}}}},"r":{"df":0,"docs":{},"k":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"44":{"tf":1.4142135623730951},"5":{"tf":1.4142135623730951}}}}}},"df":0,"docs":{}}},"t":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"x":{"df":1,"docs":{"53":{"tf":1.0}}}}}},"y":{"b":{"df":1,"docs":{"70":{"tf":1.0}}},"df":0,"docs":{}}},"df":7,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"n":{"df":4,"docs":{"37":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0}},"t":{"df":1,"docs":{"30":{"tf":1.0}}}}},"d":{"df":0,"docs":{},"i":{"a":{"df":1,"docs":{"87":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"85":{"tf":1.0},"88":{"tf":1.0}}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":4,"docs":{"41":{"tf":1.4142135623730951},"54":{"tf":1.0},"55":{"tf":1.0},"79":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"s":{"a":{"df":0,"docs":{},"g":{"df":2,"docs":{"14":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"a":{"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":6,"docs":{"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"35":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"33":{"tf":1.0}},"h":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"48":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"n":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"55":{"tf":1.0}}}}},"s":{"c":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}},"df":0,"docs":{}}},"o":{"d":{"df":1,"docs":{"75":{"tf":1.0}},"e":{"df":2,"docs":{"40":{"tf":1.0},"55":{"tf":1.0}}},"i":{"df":0,"docs":{},"f":{"df":2,"docs":{"25":{"tf":1.4142135623730951},"34":{"tf":1.0}},"i":{"df":1,"docs":{"76":{"tf":1.0}}}}},"u":{"df":0,"docs":{},"l":{"df":8,"docs":{"35":{"tf":1.0},"40":{"tf":1.7320508075688772},"41":{"tf":1.4142135623730951},"42":{"tf":2.0},"47":{"tf":1.0},"48":{"tf":2.449489742783178},"49":{"tf":1.7320508075688772},"75":{"tf":1.7320508075688772}},"e":{"'":{"df":1,"docs":{"48":{"tf":1.4142135623730951}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":35,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"3":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"39":{"tf":1.0},"4":{"tf":1.0},"40":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"53":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"75":{"tf":1.0},"79":{"tf":1.0},"8":{"tf":1.0},"80":{"tf":1.4142135623730951},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":1,"docs":{"34":{"tf":1.4142135623730951}}}}}},"u":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"55":{"tf":1.0}}}},"df":0,"docs":{}},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}}}},"n":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":5,"docs":{"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"48":{"tf":1.4142135623730951},"77":{"tf":1.0}}}},"s":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":2,"docs":{"41":{"tf":1.0},"77":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"d":{"df":15,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.4142135623730951},"62":{"tf":1.4142135623730951},"64":{"tf":1.0},"66":{"tf":1.0},"68":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0},"80":{"tf":1.0}}},"df":0,"docs":{}},"t":{"df":1,"docs":{"8":{"tf":1.4142135623730951}}},"w":{"df":12,"docs":{"14":{"tf":1.4142135623730951},"18":{"tf":1.0},"21":{"tf":1.0},"31":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":1.0},"48":{"tf":1.0},"62":{"tf":1.0},"69":{"tf":1.0},"74":{"tf":1.4142135623730951},"75":{"tf":1.0},"76":{"tf":2.23606797749979}}},"x":{"df":0,"docs":{},"t":{"df":2,"docs":{"38":{"tf":1.0},"70":{"tf":1.0}}}}},"f":{"df":1,"docs":{"14":{"tf":1.0}}},"o":{"_":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"l":{"df":2,"docs":{"39":{"tf":1.4142135623730951},"41":{"tf":1.0}}}}}},"df":0,"docs":{}},"s":{"df":0,"docs":{},"t":{"d":{"df":1,"docs":{"56":{"tf":2.0}}},"df":0,"docs":{}}}},"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":2,"docs":{"15":{"tf":1.0},"48":{"tf":1.0}}}},"r":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"48":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"e":{"df":4,"docs":{"39":{"tf":1.0},"40":{"tf":2.0},"42":{"tf":1.4142135623730951},"83":{"tf":1.0}}},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":2,"docs":{"21":{"tf":1.0},"31":{"tf":1.0}}}}}},"w":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}},"u":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":4,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0}}}}},"df":0,"docs":{}}}},"o":{"b":{"df":0,"docs":{},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":2.23606797749979}}}},"df":0,"docs":{}}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"v":{"df":1,"docs":{"79":{"tf":1.0}}}}}}},"c":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":1,"docs":{"27":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":1,"docs":{"47":{"tf":1.0}},"f":{"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":1,"docs":{"86":{"tf":1.0}}}}},"i":{"c":{"df":0,"docs":{},"i":{"df":1,"docs":{"87":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"87":{"tf":1.0}}}}}}},"l":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"df":0,"docs":{}},"n":{"c":{"df":1,"docs":{"76":{"tf":1.0}}},"df":9,"docs":{"20":{"tf":1.0},"32":{"tf":1.4142135623730951},"37":{"tf":1.0},"39":{"tf":1.4142135623730951},"41":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0},"80":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"87":{"tf":1.0}}}}}},"p":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"df":0,"docs":{},"n":{"df":3,"docs":{"56":{"tf":1.0},"61":{"tf":1.0},"84":{"tf":1.0}}},"r":{"df":1,"docs":{"54":{"tf":1.0}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":6,"docs":{"19":{"tf":1.4142135623730951},"20":{"tf":1.4142135623730951},"22":{"tf":1.7320508075688772},"33":{"tf":2.0},"67":{"tf":1.0},"79":{"tf":1.0}}},"o":{"df":0,"docs":{},"n":{"df":3,"docs":{"13":{"tf":1.4142135623730951},"14":{"tf":1.4142135623730951},"66":{"tf":1.4142135623730951}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"l":{"df":2,"docs":{"79":{"tf":2.6457513110645907},"80":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"g":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"i":{"df":0,"docs":{},"z":{"df":1,"docs":{"83":{"tf":1.0}}}}}},"df":0,"docs":{}},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"84":{"tf":1.0}}}}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"85":{"tf":1.0}},"w":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":2,"docs":{"25":{"tf":1.0},"88":{"tf":1.0}}}}}}}}},"u":{"df":0,"docs":{},"t":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"40":{"tf":2.0},"53":{"tf":1.0},"72":{"tf":1.4142135623730951}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":3,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"53":{"tf":1.0}}}}}},"p":{"a":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":1,"docs":{"54":{"tf":1.0}}}},"n":{"df":0,"docs":{},"i":{"c":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}}},"r":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.0},"48":{"tf":1.0}}}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"44":{"tf":1.4142135623730951},"5":{"tf":1.4142135623730951}}}}},"t":{"df":4,"docs":{"37":{"tf":1.0},"38":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.0}},"i":{"c":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.0}}}},"u":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"r":{"df":5,"docs":{"33":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"77":{"tf":1.0},"80":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}},"s":{"df":0,"docs":{},"s":{"df":3,"docs":{"21":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.4142135623730951}}}},"t":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{},"h":{"df":2,"docs":{"16":{"tf":1.4142135623730951},"38":{"tf":1.0}}}}},"df":8,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"68":{"tf":1.7320508075688772},"71":{"tf":1.7320508075688772},"72":{"tf":1.0},"73":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":3,"docs":{"28":{"tf":2.0},"29":{"tf":2.0},"34":{"tf":1.4142135623730951}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}}}}},"m":{"a":{"df":0,"docs":{},"n":{"df":2,"docs":{"86":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"85":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.0}}}}},"t":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"83":{"tf":1.0}}}}},"df":0,"docs":{}}}},"h":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":0,"docs":{},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"27":{"tf":1.0},"85":{"tf":1.0}}},"df":0,"docs":{}}}}},"i":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"30":{"tf":1.0}}}}}},"df":1,"docs":{"27":{"tf":1.0}},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"80":{"tf":1.0}}}}},"l":{"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"62":{"tf":1.0}}}},"df":0,"docs":{},"n":{"df":2,"docs":{"54":{"tf":1.0},"55":{"tf":1.4142135623730951}}},"t":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":2,"docs":{"53":{"tf":2.449489742783178},"54":{"tf":1.0}}}}}}},"y":{"df":1,"docs":{"40":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":9,"docs":{"14":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"53":{"tf":1.0},"83":{"tf":1.0}}}},"d":{"df":0,"docs":{},"g":{"df":1,"docs":{"84":{"tf":1.7320508075688772}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":1.0}}}}},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":3,"docs":{"34":{"tf":1.0},"58":{"tf":1.4142135623730951},"88":{"tf":1.0}}}},"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}},"p":{"df":2,"docs":{"31":{"tf":1.0},"32":{"tf":1.0}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"s":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"l":{"df":2,"docs":{"25":{"tf":1.0},"42":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"df":2,"docs":{"87":{"tf":1.0},"88":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}}}}}},"df":1,"docs":{"79":{"tf":1.0}},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"x":{"df":3,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"64":{"tf":1.4142135623730951}}}}}}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"39":{"tf":1.0}}}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":2,"docs":{"38":{"tf":1.0},"39":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"39":{"tf":1.0}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}}}},"n":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.7320508075688772}}}}}}}},"df":2,"docs":{"14":{"tf":1.0},"40":{"tf":1.7320508075688772}},"l":{"df":0,"docs":{},"n":{"!":{"(":{"\"":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"w":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"39":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":2,"docs":{"37":{"tf":1.0},"38":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":1,"docs":{"32":{"tf":1.0}}}}}}},"v":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}},"o":{"b":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"52":{"tf":1.4142135623730951}}}}}},"d":{"df":0,"docs":{},"u":{"c":{"df":1,"docs":{"37":{"tf":1.7320508075688772}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}},"g":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"m":{"df":4,"docs":{"37":{"tf":1.0},"46":{"tf":1.0},"73":{"tf":1.0},"77":{"tf":2.23606797749979}},"s":{"/":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"77":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}}}},"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":1,"docs":{"77":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":9,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"56":{"tf":1.0},"84":{"tf":1.0},"86":{"tf":1.4142135623730951},"87":{"tf":2.449489742783178},"88":{"tf":1.0}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"34":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"24":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"s":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}}},"v":{"df":0,"docs":{},"i":{"d":{"df":2,"docs":{"30":{"tf":1.0},"48":{"tf":1.7320508075688772}}},"df":0,"docs":{}}}}},"u":{"b":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"c":{"df":2,"docs":{"85":{"tf":1.0},"87":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":1,"docs":{"85":{"tf":1.0}}}}}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"76":{"tf":1.0}}}},"t":{"df":1,"docs":{"75":{"tf":1.0}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"3":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}},"df":3,"docs":{"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"7":{"tf":1.4142135623730951}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"61":{"tf":1.0}}}}}}},"u":{"df":0,"docs":{},"e":{"df":3,"docs":{"17":{"tf":2.0},"31":{"tf":2.0},"32":{"tf":1.0}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"e":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{},"w":{"df":3,"docs":{"42":{"tf":1.4142135623730951},"79":{"tf":1.7320508075688772},"80":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"c":{"df":0,"docs":{},"h":{"df":1,"docs":{"25":{"tf":1.0}}}},"d":{"(":{"\"":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"\"":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":3,"docs":{"33":{"tf":1.0},"48":{"tf":1.0},"60":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"76":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"70":{"tf":1.0},"85":{"tf":1.0}}}}}},"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":1,"docs":{"31":{"tf":1.0}}}},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"34":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":1,"docs":{"34":{"tf":1.0}}}},"m":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"d":{"df":2,"docs":{"37":{"tf":1.0},"42":{"tf":1.0}}},"df":0,"docs":{}}}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":4,"docs":{"19":{"tf":1.0},"20":{"tf":1.0},"22":{"tf":1.0},"33":{"tf":1.4142135623730951}}}}}}}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":9,"docs":{"14":{"tf":1.4142135623730951},"21":{"tf":1.0},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"40":{"tf":1.0},"48":{"tf":1.4142135623730951}}}}},"g":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"88":{"tf":1.0}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"84":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"86":{"tf":1.0}}}},"df":0,"docs":{}}},"l":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.0}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":3,"docs":{"40":{"tf":1.4142135623730951},"52":{"tf":1.4142135623730951},"67":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":1,"docs":{"42":{"tf":1.0}},"g":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"84":{"tf":1.0}}}}}}}},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"v":{"df":1,"docs":{"86":{"tf":1.0}}}}},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{}}},"l":{"a":{"c":{"df":2,"docs":{"34":{"tf":1.0},"67":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"o":{"df":1,"docs":{"76":{"tf":1.0}},"r":{"df":0,"docs":{},"t":{"@":{"b":{"df":0,"docs":{},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"e":{".":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":1,"docs":{"88":{"tf":1.0}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}},"df":0,"docs":{}},"df":1,"docs":{"88":{"tf":1.4142135623730951}}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":3,"docs":{"14":{"tf":1.0},"56":{"tf":1.0},"67":{"tf":1.4142135623730951}}}}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":1,"docs":{"87":{"tf":1.7320508075688772}},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"87":{"tf":1.0}}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":4,"docs":{"31":{"tf":2.0},"33":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951},"76":{"tf":1.0}}}}},"i":{"df":0,"docs":{},"r":{"df":6,"docs":{"34":{"tf":1.0},"48":{"tf":1.0},"54":{"tf":1.0},"63":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"86":{"tf":2.23606797749979}}}}}},"t":{"df":1,"docs":{"37":{"tf":1.0}}},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"[":{"0":{"]":{".":{"df":0,"docs":{},"i":{"3":{"2":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":5,"docs":{"40":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0},"49":{"tf":1.0},"79":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":3,"docs":{"40":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.4142135623730951}}}}}},"u":{"df":0,"docs":{},"s":{"df":1,"docs":{"79":{"tf":1.0}}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":1,"docs":{"88":{"tf":1.0}}}}}}},"i":{"c":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":0,"docs":{},"t":{"df":2,"docs":{"40":{"tf":1.0},"86":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":1,"docs":{"67":{"tf":1.4142135623730951}}}}},"s":{"df":1,"docs":{"75":{"tf":1.0}}},"u":{"df":0,"docs":{},"n":{"df":19,"docs":{"3":{"tf":1.4142135623730951},"32":{"tf":1.0},"38":{"tf":2.23606797749979},"39":{"tf":1.4142135623730951},"46":{"tf":1.0},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"60":{"tf":1.0},"63":{"tf":1.0},"67":{"tf":2.0},"68":{"tf":1.0},"69":{"tf":1.4142135623730951},"70":{"tf":2.23606797749979},"71":{"tf":1.0},"72":{"tf":1.7320508075688772},"73":{"tf":1.7320508075688772},"76":{"tf":1.7320508075688772},"77":{"tf":1.7320508075688772},"80":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":2,"docs":{"40":{"tf":1.0},"53":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"75":{"tf":1.4142135623730951}}},"c":{"df":2,"docs":{"41":{"tf":1.4142135623730951},"65":{"tf":1.0}}},"df":13,"docs":{"37":{"tf":2.449489742783178},"38":{"tf":1.7320508075688772},"39":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":2.449489742783178},"42":{"tf":1.4142135623730951},"46":{"tf":1.7320508075688772},"48":{"tf":1.4142135623730951},"54":{"tf":1.0},"65":{"tf":1.7320508075688772},"70":{"tf":1.0},"77":{"tf":1.0},"9":{"tf":1.4142135623730951}},"u":{"df":0,"docs":{},"p":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"70":{"tf":1.0}}}},"df":2,"docs":{"65":{"tf":1.0},"70":{"tf":1.0}}}}}}}},"s":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":2,"docs":{"75":{"tf":1.0},"76":{"tf":1.0}}}},"n":{"d":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"x":{"df":1,"docs":{"59":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"87":{"tf":1.4142135623730951}}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":1,"docs":{"77":{"tf":1.4142135623730951}}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":10,"docs":{"14":{"tf":1.4142135623730951},"22":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"53":{"tf":1.0},"63":{"tf":1.0},"69":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"r":{"df":3,"docs":{"57":{"tf":1.4142135623730951},"58":{"tf":1.0},"59":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"d":{"df":1,"docs":{"80":{"tf":1.0}}},"df":4,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"80":{"tf":1.0},"83":{"tf":1.0}}},"g":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{}}},"n":{"d":{"df":1,"docs":{"76":{"tf":1.0}}},"df":0,"docs":{},"s":{"df":1,"docs":{"76":{"tf":1.0}}}},"p":{"a":{"df":0,"docs":{},"r":{"df":2,"docs":{"73":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{}},"t":{"df":18,"docs":{"14":{"tf":1.7320508075688772},"15":{"tf":1.4142135623730951},"16":{"tf":1.4142135623730951},"17":{"tf":1.4142135623730951},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"20":{"tf":1.4142135623730951},"21":{"tf":1.4142135623730951},"22":{"tf":1.4142135623730951},"23":{"tf":1.4142135623730951},"24":{"tf":1.0},"26":{"tf":1.4142135623730951},"27":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"48":{"tf":1.0},"80":{"tf":1.0},"85":{"tf":1.0}}},"x":{"df":0,"docs":{},"u":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"84":{"tf":1.0},"85":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}},"h":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"14":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":3,"docs":{"41":{"tf":1.0},"46":{"tf":1.0},"85":{"tf":1.0}}}}},"i":{"df":3,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0}},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"df":0,"docs":{}}},"p":{"df":0,"docs":{},"l":{"df":3,"docs":{"46":{"tf":1.0},"47":{"tf":1.0},"62":{"tf":1.0}},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}}}}},"i":{"df":3,"docs":{"31":{"tf":1.0},"40":{"tf":1.0},"55":{"tf":1.0}}}}}},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"l":{"df":4,"docs":{"32":{"tf":1.0},"37":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"e":{"df":7,"docs":{"14":{"tf":1.0},"17":{"tf":1.7320508075688772},"27":{"tf":2.0},"29":{"tf":2.449489742783178},"31":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951},"84":{"tf":1.0}}}}},"k":{"df":0,"docs":{},"i":{"df":0,"docs":{},"p":{"df":1,"docs":{"22":{"tf":1.0}}}}},"m":{"df":0,"docs":{},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"40":{"tf":1.0}}}}}}},"n":{"a":{"df":0,"docs":{},"p":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"t":{"df":1,"docs":{"53":{"tf":1.0}}}}}}}},"df":0,"docs":{}},"o":{"c":{"df":0,"docs":{},"i":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"87":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":6,"docs":{"14":{"tf":1.0},"26":{"tf":1.7320508075688772},"27":{"tf":1.7320508075688772},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951}}}},"m":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"t":{"_":{"c":{"df":0,"docs":{},"o":{"d":{"df":1,"docs":{"75":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"62":{"tf":1.7320508075688772}}}},"w":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}},"o":{"df":0,"docs":{},"n":{"df":23,"docs":{"0":{"tf":1.0},"1":{"tf":1.0},"10":{"tf":1.0},"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"2":{"tf":1.0},"3":{"tf":1.0},"4":{"tf":1.0},"45":{"tf":1.0},"5":{"tf":1.0},"50":{"tf":1.0},"51":{"tf":1.0},"52":{"tf":1.0},"57":{"tf":1.0},"58":{"tf":1.0},"59":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"81":{"tf":1.0},"82":{"tf":1.0},"9":{"tf":1.0}}}},"u":{"df":0,"docs":{},"r":{"c":{"df":1,"docs":{"77":{"tf":1.0}}},"df":0,"docs":{}}}},"p":{"a":{"c":{"df":0,"docs":{},"e":{"df":2,"docs":{"27":{"tf":1.4142135623730951},"87":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"c":{"df":2,"docs":{"72":{"tf":2.0},"76":{"tf":1.7320508075688772}},"i":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"34":{"tf":1.0}}}},"df":0,"docs":{},"f":{"df":7,"docs":{"40":{"tf":1.0},"48":{"tf":1.0},"71":{"tf":1.4142135623730951},"76":{"tf":2.0},"77":{"tf":1.0},"80":{"tf":1.0},"88":{"tf":1.0}},"i":{"df":5,"docs":{"14":{"tf":1.4142135623730951},"15":{"tf":1.4142135623730951},"16":{"tf":1.0},"37":{"tf":1.0},"42":{"tf":1.0}}}}}},"df":0,"docs":{}}},"r":{"c":{"/":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"b":{".":{"df":0,"docs":{},"r":{"df":2,"docs":{"39":{"tf":1.0},"40":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"m":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{".":{"df":0,"docs":{},"r":{"df":4,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"48":{"tf":1.0},"49":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"t":{"a":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":7,"docs":{"40":{"tf":1.0},"51":{"tf":1.4142135623730951},"52":{"tf":1.0},"53":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.0},"56":{"tf":1.0}}}}},"df":0,"docs":{},"n":{"d":{"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":1.0}}}}},"r":{"d":{"df":3,"docs":{"37":{"tf":1.4142135623730951},"85":{"tf":1.4142135623730951},"86":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"t":{"df":8,"docs":{"22":{"tf":1.4142135623730951},"33":{"tf":1.0},"37":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.4142135623730951},"48":{"tf":1.0},"62":{"tf":1.0},"76":{"tf":1.0}}}},"t":{"df":0,"docs":{},"e":{"df":1,"docs":{"53":{"tf":1.0}}},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":3,"docs":{"33":{"tf":1.0},"34":{"tf":1.0},"35":{"tf":1.0}}}}}}},"d":{":":{":":{"df":0,"docs":{},"f":{"df":0,"docs":{},"s":{":":{":":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":2,"docs":{"38":{"tf":1.4142135623730951},"54":{"tf":1.0}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":3,"docs":{"24":{"tf":1.0},"40":{"tf":1.4142135623730951},"56":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"48":{"tf":1.0}}}},"df":0,"docs":{},"e":{":":{":":{"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"t":{"df":2,"docs":{"48":{"tf":1.0},"49":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":2,"docs":{"48":{"tf":1.4142135623730951},"49":{"tf":1.0}}}}},"r":{"df":1,"docs":{"40":{"tf":1.0}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":12,"docs":{"16":{"tf":1.0},"17":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979}}}},"v":{"df":0,"docs":{},"e":{"df":1,"docs":{"79":{"tf":1.0}}}}},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"39":{"tf":1.0}},"u":{"df":0,"docs":{},"r":{"df":2,"docs":{"40":{"tf":1.0},"79":{"tf":1.0}}}}}},"df":0,"docs":{}}},"u":{"b":{"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{}},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":3,"docs":{"75":{"tf":1.4142135623730951},"76":{"tf":1.7320508075688772},"77":{"tf":1.0}}}}}},"u":{"b":{"d":{"df":0,"docs":{},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"80":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":2,"docs":{"72":{"tf":2.0},"76":{"tf":1.0}}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":2,"docs":{"14":{"tf":1.0},"31":{"tf":1.0}},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"69":{"tf":1.0}}}}}}}}}}},"df":0,"docs":{},"h":{"df":3,"docs":{"24":{"tf":1.0},"40":{"tf":1.0},"85":{"tf":1.0}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"75":{"tf":1.0}}}},"p":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":9,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":2.23606797749979},"41":{"tf":1.7320508075688772},"53":{"tf":2.23606797749979},"54":{"tf":2.449489742783178},"55":{"tf":2.0},"56":{"tf":1.0},"77":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"df":11,"docs":{"22":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"60":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"64":{"tf":1.0},"69":{"tf":1.0},"72":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0}}},"v":{"df":0,"docs":{},"i":{"df":0,"docs":{},"v":{"df":1,"docs":{"25":{"tf":1.0}}}}}}},"y":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"x":{"df":1,"docs":{"76":{"tf":1.0}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":17,"docs":{"14":{"tf":1.0},"15":{"tf":1.0},"18":{"tf":1.0},"21":{"tf":1.0},"24":{"tf":1.4142135623730951},"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"30":{"tf":1.0},"31":{"tf":1.4142135623730951},"48":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.4142135623730951},"66":{"tf":1.0},"70":{"tf":1.0}}}}}}}},"t":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"41":{"tf":2.6457513110645907}}}},"c":{"df":0,"docs":{},"k":{"df":0,"docs":{},"l":{"df":1,"docs":{"62":{"tf":1.0}}}}},"df":0,"docs":{},"k":{"df":0,"docs":{},"e":{"df":3,"docs":{"40":{"tf":1.0},"79":{"tf":1.7320508075688772},"86":{"tf":1.0}}}},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"(":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0}}},"/":{"d":{"df":0,"docs":{},"e":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"67":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"67":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"3":{"2":{"df":3,"docs":{"38":{"tf":1.7320508075688772},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":4,"docs":{"37":{"tf":3.0},"38":{"tf":1.4142135623730951},"70":{"tf":1.4142135623730951},"80":{"tf":2.449489742783178}}}}}},"s":{"df":0,"docs":{},"k":{"df":6,"docs":{"22":{"tf":2.23606797749979},"24":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"33":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951}}}}},"df":4,"docs":{"17":{"tf":1.0},"20":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0}},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"88":{"tf":1.7320508075688772}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"88":{"tf":1.0}},"l":{"df":0,"docs":{},"i":{"df":1,"docs":{"86":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}},"n":{"d":{"df":1,"docs":{"62":{"tf":1.0}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"m":{"df":1,"docs":{"54":{"tf":1.0}}}},"s":{"df":0,"docs":{},"t":{"_":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"r":{"a":{"df":0,"docs":{},"m":{"df":2,"docs":{"70":{"tf":1.0},"73":{"tf":1.0}}}},"df":0,"docs":{}}}}}}},"df":15,"docs":{"40":{"tf":1.0},"53":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.0},"69":{"tf":2.23606797749979},"70":{"tf":3.4641016151377544},"71":{"tf":2.8284271247461903},"72":{"tf":2.0},"73":{"tf":2.449489742783178},"74":{"tf":1.4142135623730951},"75":{"tf":4.47213595499958},"76":{"tf":3.1622776601683795},"77":{"tf":2.8284271247461903},"79":{"tf":2.8284271247461903},"80":{"tf":1.4142135623730951}},"s":{"/":{"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"c":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.0}},"e":{"/":{"*":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"76":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}}}}}}}}},"df":0,"docs":{}},"df":0,"docs":{}}}},"s":{"df":0,"docs":{},"r":{"c":{"/":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"/":{"df":0,"docs":{},"s":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"_":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"_":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"77":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":2,"docs":{"72":{"tf":1.4142135623730951},"76":{"tf":2.23606797749979}}}}}}}}},"h":{"a":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"77":{"tf":1.0}},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"39":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"66":{"tf":1.0}}}}}}},"y":{"'":{"df":0,"docs":{},"r":{"df":1,"docs":{"80":{"tf":1.0}}}},"df":0,"docs":{}}},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":2,"docs":{"40":{"tf":1.0},"64":{"tf":1.0}}},"k":{"df":2,"docs":{"14":{"tf":1.0},"76":{"tf":1.0}}}},"s":{"'":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"40":{"tf":1.0}}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":1,"docs":{"39":{"tf":1.0}}}}}},"r":{"df":0,"docs":{},"e":{"a":{"d":{"df":1,"docs":{"32":{"tf":1.0}}},"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"86":{"tf":1.0}}}}}},"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"d":{"df":2,"docs":{"20":{"tf":1.7320508075688772},"33":{"tf":1.0}}},"df":0,"docs":{}}}}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"df":0,"docs":{},"h":{"df":2,"docs":{"39":{"tf":1.4142135623730951},"79":{"tf":1.0}}}}}}},"u":{"df":2,"docs":{"14":{"tf":1.0},"24":{"tf":1.0}}}},"i":{"df":1,"docs":{"27":{"tf":1.0}},"m":{"df":0,"docs":{},"e":{"df":10,"docs":{"24":{"tf":1.0},"25":{"tf":1.4142135623730951},"34":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.0},"48":{"tf":1.0},"53":{"tf":1.0},"54":{"tf":1.4142135623730951},"55":{"tf":1.0},"56":{"tf":1.0}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":2,"docs":{"22":{"tf":1.7320508075688772},"33":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"24":{"tf":1.0}}}}}}}},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"60":{"tf":1.0}}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.7320508075688772}}}}},"m":{"df":0,"docs":{},"l":{"df":1,"docs":{"14":{"tf":1.0}}}},"o":{"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":2,"docs":{"40":{"tf":1.4142135623730951},"65":{"tf":1.7320508075688772}}}}},"df":0,"docs":{}}},"df":3,"docs":{"38":{"tf":1.0},"40":{"tf":1.0},"67":{"tf":1.0}}}},"t":{"a":{"df":0,"docs":{},"l":{"df":4,"docs":{"14":{"tf":1.0},"27":{"tf":1.7320508075688772},"29":{"tf":2.449489742783178},"34":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"w":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"r":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"66":{"tf":1.0}}}},"l":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"79":{"tf":1.0}},"e":{"(":{"a":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"_":{"df":0,"docs":{},"f":{"a":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"y":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"y":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"24":{"tf":1.0},"25":{"tf":1.0},"34":{"tf":1.0}}}},"df":0,"docs":{},"e":{"df":1,"docs":{"79":{"tf":1.0}}}},"i":{"df":1,"docs":{"25":{"tf":1.0}},"p":{"df":0,"docs":{},"l":{"df":1,"docs":{"37":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":1,"docs":{"85":{"tf":1.0}}}},"u":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"61":{"tf":1.0}}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"e":{"df":2,"docs":{"14":{"tf":1.0},"15":{"tf":1.4142135623730951}}}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":1,"docs":{"14":{"tf":1.4142135623730951}}}},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":3,"docs":{"1":{"tf":1.4142135623730951},"2":{"tf":1.0},"3":{"tf":1.0}}}}}}},"w":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"k":{"df":2,"docs":{"41":{"tf":1.0},"77":{"tf":1.4142135623730951}}}},"df":0,"docs":{}},"o":{"df":3,"docs":{"24":{"tf":1.0},"30":{"tf":1.0},"79":{"tf":1.0}}}},"y":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":16,"docs":{"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"39":{"tf":1.7320508075688772},"40":{"tf":3.1622776601683795},"42":{"tf":1.0}}}}}},"u":{"3":{"2":{"df":1,"docs":{"42":{"tf":1.0}}},"df":0,"docs":{}},"8":{"df":1,"docs":{"48":{"tf":1.0}}},"df":0,"docs":{},"n":{"a":{"c":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":3,"docs":{"85":{"tf":1.0},"86":{"tf":1.0},"88":{"tf":1.0}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":3,"docs":{"40":{"tf":1.0},"41":{"tf":1.0},"77":{"tf":1.0}},"s":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"n":{"d":{"df":1,"docs":{"30":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"75":{"tf":1.4142135623730951}}},"x":{"df":1,"docs":{"77":{"tf":1.0}}}},"k":{"df":0,"docs":{},"n":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":1,"docs":{"37":{"tf":2.0}}}}}}},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"42":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":4,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"67":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"g":{"df":0,"docs":{},"n":{"df":1,"docs":{"34":{"tf":1.0}}}}}},"df":0,"docs":{}}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"62":{"tf":1.0}}}}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"31":{"tf":1.0}}}}},"w":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":1,"docs":{"85":{"tf":1.0}}}}},"df":0,"docs":{}}}}},"p":{"d":{"a":{"df":0,"docs":{},"t":{"df":7,"docs":{"21":{"tf":1.0},"25":{"tf":1.0},"31":{"tf":1.4142135623730951},"34":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"72":{"tf":1.0},"76":{"tf":1.0}}}},"df":0,"docs":{}},"df":9,"docs":{"16":{"tf":1.0},"21":{"tf":1.0},"34":{"tf":1.0},"38":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"48":{"tf":1.0},"60":{"tf":1.0},"80":{"tf":1.0}},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"m":{"df":1,"docs":{"76":{"tf":1.4142135623730951}}}},"df":0,"docs":{}}}}}},"s":{"a":{"df":0,"docs":{},"g":{"df":5,"docs":{"17":{"tf":1.0},"20":{"tf":1.7320508075688772},"33":{"tf":1.7320508075688772},"40":{"tf":1.0},"54":{"tf":1.0}}}},"df":47,"docs":{"10":{"tf":1.7320508075688772},"11":{"tf":1.4142135623730951},"12":{"tf":1.0},"13":{"tf":1.0},"14":{"tf":2.23606797749979},"15":{"tf":1.7320508075688772},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.7320508075688772},"19":{"tf":1.7320508075688772},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.4142135623730951},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"30":{"tf":1.0},"31":{"tf":1.4142135623730951},"32":{"tf":1.0},"33":{"tf":1.4142135623730951},"34":{"tf":1.7320508075688772},"35":{"tf":1.0},"37":{"tf":1.7320508075688772},"38":{"tf":1.4142135623730951},"39":{"tf":2.23606797749979},"40":{"tf":2.449489742783178},"41":{"tf":1.7320508075688772},"42":{"tf":2.0},"46":{"tf":1.0},"48":{"tf":2.6457513110645907},"49":{"tf":1.4142135623730951},"56":{"tf":1.7320508075688772},"6":{"tf":1.4142135623730951},"7":{"tf":1.7320508075688772},"70":{"tf":1.0},"73":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.7320508075688772},"79":{"tf":1.0},"8":{"tf":1.7320508075688772},"85":{"tf":1.4142135623730951},"87":{"tf":1.0},"9":{"tf":1.7320508075688772}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"25":{"tf":1.0}}}}}},"v":{"0":{".":{"1":{".":{"0":{"df":2,"docs":{"38":{"tf":1.0},"39":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"2":{".":{"5":{"4":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}},"a":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"d":{"df":1,"docs":{"79":{"tf":1.0}}},"df":0,"docs":{}},"u":{"df":6,"docs":{"14":{"tf":2.0},"15":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"48":{"tf":1.0}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":2,"docs":{"39":{"tf":1.0},"75":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"75":{"tf":1.0}}},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":5,"docs":{"40":{"tf":1.0},"48":{"tf":1.4142135623730951},"70":{"tf":1.0},"76":{"tf":1.0},"89":{"tf":1.0}}}}}}}},"i":{"a":{"df":5,"docs":{"37":{"tf":1.0},"39":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.0},"87":{"tf":1.0}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"w":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"85":{"tf":1.0}}}}}}}}}}},"w":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":8,"docs":{"38":{"tf":1.0},"39":{"tf":2.0},"40":{"tf":1.0},"62":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}}},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"40":{"tf":1.7320508075688772}}}},"s":{"df":0,"docs":{},"i":{"/":{"d":{"df":0,"docs":{},"e":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"g":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"39":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":1,"docs":{"38":{"tf":1.7320508075688772}}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"_":{"df":0,"docs":{},"w":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"40":{"tf":1.4142135623730951}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}}}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}}}}},"df":7,"docs":{"37":{"tf":2.0},"38":{"tf":3.3166247903554},"39":{"tf":1.4142135623730951},"40":{"tf":1.4142135623730951},"70":{"tf":2.23606797749979},"73":{"tf":2.0},"77":{"tf":2.0}}},"m":{")":{".":{"df":0,"docs":{},"e":{"df":0,"docs":{},"x":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"(":{"\"":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"49":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"3":{"2":{"df":3,"docs":{"37":{"tf":2.0},"38":{"tf":1.7320508075688772},"70":{"tf":1.4142135623730951}}},"df":0,"docs":{}},"_":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"d":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"(":{"df":0,"docs":{},"m":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"df":0,"docs":{},"l":{"df":1,"docs":{"42":{"tf":1.0}}}}},"df":0,"docs":{}}}},":":{":":{"df":0,"docs":{},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"u":{"d":{"df":2,"docs":{"40":{"tf":1.0},"42":{"tf":1.0}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}},"df":2,"docs":{"40":{"tf":1.0},"41":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"/":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"47":{"tf":1.0},"48":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}}},"df":0,"docs":{}}}}}}},"df":12,"docs":{"37":{"tf":1.4142135623730951},"39":{"tf":1.4142135623730951},"40":{"tf":3.0},"41":{"tf":1.4142135623730951},"42":{"tf":2.6457513110645907},"46":{"tf":1.0},"47":{"tf":1.4142135623730951},"48":{"tf":1.0},"49":{"tf":1.0},"72":{"tf":1.7320508075688772},"76":{"tf":1.0},"79":{"tf":1.7320508075688772}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":53,"docs":{"11":{"tf":1.4142135623730951},"12":{"tf":1.7320508075688772},"13":{"tf":1.7320508075688772},"14":{"tf":2.449489742783178},"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.4142135623730951},"19":{"tf":1.4142135623730951},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"24":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"3":{"tf":1.4142135623730951},"30":{"tf":1.0},"31":{"tf":1.0},"32":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.4142135623730951},"35":{"tf":1.0},"37":{"tf":2.0},"38":{"tf":2.0},"39":{"tf":2.0},"40":{"tf":2.449489742783178},"45":{"tf":1.4142135623730951},"46":{"tf":2.0},"47":{"tf":1.0},"48":{"tf":2.449489742783178},"49":{"tf":1.4142135623730951},"50":{"tf":1.7320508075688772},"53":{"tf":1.7320508075688772},"55":{"tf":1.0},"56":{"tf":1.4142135623730951},"60":{"tf":1.4142135623730951},"61":{"tf":1.4142135623730951},"62":{"tf":1.0},"63":{"tf":1.0},"64":{"tf":1.0},"66":{"tf":1.0},"67":{"tf":2.0},"68":{"tf":2.449489742783178},"69":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":2.0},"72":{"tf":1.7320508075688772},"76":{"tf":2.0},"79":{"tf":1.0}},"e":{"'":{"df":4,"docs":{"62":{"tf":1.0},"66":{"tf":1.0},"69":{"tf":1.0},"70":{"tf":1.0}}},"_":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":1,"docs":{"48":{"tf":1.4142135623730951}}}}}}}},"df":0,"docs":{}}}}}},"t":{"df":1,"docs":{"76":{"tf":2.0}},"i":{"df":0,"docs":{},"m":{"df":1,"docs":{"70":{"tf":1.0}}}}}},"t":{"2":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":1,"docs":{"47":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"y":{"df":2,"docs":{"53":{"tf":1.0},"88":{"tf":1.0}}}},"df":0,"docs":{},"e":{"'":{"d":{"df":1,"docs":{"56":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":5,"docs":{"37":{"tf":1.0},"38":{"tf":1.7320508075688772},"40":{"tf":1.0},"64":{"tf":1.0},"76":{"tf":1.0}}}},"r":{"df":3,"docs":{"38":{"tf":1.0},"56":{"tf":1.0},"60":{"tf":1.0}}}},"b":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"l":{"df":19,"docs":{"10":{"tf":1.7320508075688772},"35":{"tf":1.0},"36":{"tf":1.4142135623730951},"37":{"tf":2.0},"38":{"tf":2.0},"39":{"tf":1.0},"40":{"tf":3.0},"41":{"tf":1.4142135623730951},"42":{"tf":1.0},"43":{"tf":1.0},"44":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.4142135623730951},"53":{"tf":1.0},"55":{"tf":1.0},"6":{"tf":1.4142135623730951},"7":{"tf":1.7320508075688772},"8":{"tf":1.7320508075688772},"9":{"tf":1.7320508075688772}}}},"df":0,"docs":{}}}}}},"df":1,"docs":{"37":{"tf":1.0}}},"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"m":{"df":3,"docs":{"14":{"tf":1.0},"84":{"tf":1.0},"85":{"tf":1.0}}}}},"df":0,"docs":{},"l":{"df":3,"docs":{"38":{"tf":1.0},"39":{"tf":1.0},"62":{"tf":1.0}}}}},"h":{"a":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"53":{"tf":1.4142135623730951}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"15":{"tf":1.0},"79":{"tf":1.0}}}}}}}},"i":{"df":0,"docs":{},"k":{"df":0,"docs":{},"i":{"df":1,"docs":{"86":{"tf":1.0}}}},"n":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":2,"docs":{"53":{"tf":1.0},"77":{"tf":1.0}}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":5,"docs":{"22":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0},"75":{"tf":1.0},"87":{"tf":1.0}}}},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":5,"docs":{"68":{"tf":1.0},"71":{"tf":1.0},"76":{"tf":1.0},"79":{"tf":1.0},"85":{"tf":1.0}}}}}}}},"o":{"df":0,"docs":{},"n":{"'":{"df":0,"docs":{},"t":{"df":3,"docs":{"37":{"tf":1.0},"40":{"tf":1.0},"56":{"tf":1.0}}}},"df":0,"docs":{}},"r":{"df":0,"docs":{},"k":{"df":12,"docs":{"14":{"tf":1.0},"22":{"tf":1.0},"24":{"tf":1.0},"30":{"tf":1.4142135623730951},"33":{"tf":1.0},"37":{"tf":1.7320508075688772},"39":{"tf":1.7320508075688772},"40":{"tf":2.0},"42":{"tf":1.0},"53":{"tf":1.4142135623730951},"60":{"tf":1.0},"73":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":13,"docs":{"17":{"tf":1.7320508075688772},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.4142135623730951},"22":{"tf":2.0},"24":{"tf":1.4142135623730951},"28":{"tf":1.4142135623730951},"29":{"tf":1.4142135623730951},"30":{"tf":1.0},"31":{"tf":1.7320508075688772},"32":{"tf":1.7320508075688772},"33":{"tf":1.0},"34":{"tf":1.0}}}},"f":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":1,"docs":{"62":{"tf":1.0}}}}}}},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":3,"docs":{"2":{"tf":1.4142135623730951},"3":{"tf":1.4142135623730951},"38":{"tf":1.7320508075688772}}}}},"df":0,"docs":{}}},"df":3,"docs":{"38":{"tf":3.0},"39":{"tf":2.449489742783178},"53":{"tf":1.0}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":14,"docs":{"31":{"tf":1.0},"33":{"tf":1.0},"34":{"tf":1.0},"36":{"tf":1.4142135623730951},"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"39":{"tf":2.0},"40":{"tf":1.4142135623730951},"41":{"tf":1.0},"42":{"tf":1.0},"43":{"tf":1.0},"44":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":2,"docs":{"18":{"tf":1.0},"80":{"tf":1.0}}}}}}}}},"x":{"8":{"6":{"_":{"6":{"4":{"df":2,"docs":{"53":{"tf":1.7320508075688772},"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":1,"docs":{"54":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"y":{"df":1,"docs":{"75":{"tf":1.4142135623730951}},"e":{"a":{"df":0,"docs":{},"r":{"df":1,"docs":{"24":{"tf":1.0}}}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"u":{"'":{"d":{"df":2,"docs":{"76":{"tf":1.0},"77":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":6,"docs":{"37":{"tf":1.0},"38":{"tf":1.4142135623730951},"39":{"tf":2.0},"40":{"tf":1.0},"66":{"tf":1.0},"70":{"tf":1.0}}}},"r":{"df":11,"docs":{"37":{"tf":1.4142135623730951},"38":{"tf":1.0},"39":{"tf":1.0},"40":{"tf":1.0},"41":{"tf":1.0},"42":{"tf":1.4142135623730951},"56":{"tf":1.0},"61":{"tf":1.0},"62":{"tf":1.4142135623730951},"70":{"tf":1.0},"75":{"tf":1.0}}},"v":{"df":2,"docs":{"60":{"tf":1.0},"72":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"f":{"df":1,"docs":{"38":{"tf":1.0}}}}}}}}}},"z":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"d":{"df":3,"docs":{"18":{"tf":1.4142135623730951},"19":{"tf":1.0},"31":{"tf":1.0}}},"df":0,"docs":{}}}}}},"title":{"root":{"a":{"d":{"df":4,"docs":{"74":{"tf":1.0},"75":{"tf":1.0},"76":{"tf":1.0},"77":{"tf":1.0}}},"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":1,"docs":{"23":{"tf":1.0}}}}}},"t":{"df":0,"docs":{},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"89":{"tf":1.0}}}}},"df":0,"docs":{}}}}}},"b":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"18":{"tf":1.0}}}}}},"h":{"df":1,"docs":{"10":{"tf":1.0}}}}},"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"d":{"df":3,"docs":{"63":{"tf":1.0},"67":{"tf":1.0},"68":{"tf":1.0}}},"df":0,"docs":{}}}}},"c":{"/":{"c":{"df":1,"docs":{"43":{"tf":1.0}}},"df":0,"docs":{}},"a":{"c":{"df":0,"docs":{},"h":{"df":5,"docs":{"14":{"tf":1.0},"25":{"tf":1.0},"30":{"tf":1.0},"31":{"tf":1.0},"32":{"tf":1.0}}}},"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"o":{"df":1,"docs":{"80":{"tf":1.0}}}}},"s":{"df":0,"docs":{},"e":{"df":1,"docs":{"79":{"tf":1.0}}}}},"df":1,"docs":{"50":{"tf":1.0}},"h":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"61":{"tf":1.0}}}},"df":0,"docs":{}},"i":{"df":1,"docs":{"81":{"tf":1.0}}},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"u":{"df":0,"docs":{},"p":{"df":1,"docs":{"21":{"tf":1.0}}}}}},"df":0,"docs":{}},"i":{"df":3,"docs":{"11":{"tf":1.0},"13":{"tf":1.0},"67":{"tf":1.0}}},"o":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"23":{"tf":1.0}}}},"df":0,"docs":{}}},"o":{"d":{"df":0,"docs":{},"e":{"df":1,"docs":{"83":{"tf":1.0}}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"54":{"tf":1.0}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":4,"docs":{"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"22":{"tf":1.0}}}}}}}},"n":{"d":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"83":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"g":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"14":{"tf":1.0}}}}}}},"t":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"b":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"60":{"tf":1.0}},"o":{"df":0,"docs":{},"r":{"df":1,"docs":{"83":{"tf":1.0}}}}}}},"df":0,"docs":{}}}}},"u":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"26":{"tf":1.0},"28":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"20":{"tf":1.0}}}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":1,"docs":{"83":{"tf":1.0}}}}}},"r":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":2,"docs":{"68":{"tf":1.0},"71":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"t":{"df":3,"docs":{"2":{"tf":1.0},"47":{"tf":1.0},"48":{"tf":1.0}}}},"df":0,"docs":{}}}},"d":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}}}}},"i":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"16":{"tf":1.0}}}}}}},"df":0,"docs":{}}},"s":{"c":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"58":{"tf":1.0}}}}}}}},"df":0,"docs":{}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":1,"docs":{"23":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"e":{"d":{"df":3,"docs":{"45":{"tf":1.0},"46":{"tf":1.0},"50":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"n":{"a":{"b":{"df":0,"docs":{},"l":{"df":1,"docs":{"15":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"c":{"df":1,"docs":{"88":{"tf":1.0}}},"df":0,"docs":{}}}}},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":1,"docs":{"17":{"tf":1.0}}}}}},"x":{"a":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"l":{"df":2,"docs":{"4":{"tf":1.0},"44":{"tf":1.0}}}}}},"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":1,"docs":{"41":{"tf":1.0}}}}}}}},"f":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":7,"docs":{"23":{"tf":1.0},"25":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0},"35":{"tf":1.0}}}},"n":{"d":{"df":1,"docs":{"62":{"tf":1.0}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"n":{"c":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"41":{"tf":1.0},"42":{"tf":1.0}}}}}}},"df":0,"docs":{}},"t":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"23":{"tf":1.0}}}}},"z":{"df":0,"docs":{},"z":{"df":2,"docs":{"78":{"tf":1.0},"80":{"tf":1.4142135623730951}}}}}},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":1,"docs":{"79":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"n":{"df":1,"docs":{"82":{"tf":1.0}}}}}}}},"h":{"a":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"62":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"l":{"df":0,"docs":{},"o":{"df":3,"docs":{"2":{"tf":1.0},"3":{"tf":1.0},"38":{"tf":1.0}}}}}},"o":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}}}},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":1,"docs":{"42":{"tf":1.0}}}}}}},"n":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"a":{"df":0,"docs":{},"l":{"df":1,"docs":{"12":{"tf":1.0}}}},"df":0,"docs":{}}},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"g":{"df":0,"docs":{},"r":{"df":2,"docs":{"73":{"tf":1.0},"77":{"tf":1.0}}}},"r":{"df":0,"docs":{},"f":{"a":{"c":{"df":1,"docs":{"40":{"tf":1.0}}},"df":0,"docs":{}},"df":0,"docs":{}},"p":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":1,"docs":{"55":{"tf":1.0}}}}}},"v":{"df":1,"docs":{"21":{"tf":1.0}}}}},"r":{"df":0,"docs":{},"o":{"d":{"df":0,"docs":{},"u":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"0":{"tf":1.0}}}},"df":0,"docs":{}}},"df":0,"docs":{}}}}}},"j":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"54":{"tf":1.0}}}},"o":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"61":{"tf":1.0}}}}}},"l":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":0,"docs":{},"u":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"6":{"tf":1.0}}}},"df":0,"docs":{}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"v":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":2,"docs":{"18":{"tf":1.0},"19":{"tf":1.0}}}}}},"i":{"b":{"c":{"df":0,"docs":{},"l":{"a":{"df":0,"docs":{},"n":{"df":0,"docs":{},"g":{"df":1,"docs":{"66":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{},"f":{"df":0,"docs":{},"u":{"df":0,"docs":{},"z":{"df":0,"docs":{},"z":{"df":1,"docs":{"80":{"tf":1.0}}}}}},"r":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"39":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{},"m":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":4,"docs":{"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0}}}}}},"o":{"c":{"df":0,"docs":{},"k":{"df":1,"docs":{"24":{"tf":1.0}}}},"df":0,"docs":{}}},"m":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"k":{"d":{"df":0,"docs":{},"o":{"df":0,"docs":{},"w":{"df":0,"docs":{},"n":{"df":2,"docs":{"44":{"tf":1.0},"5":{"tf":1.0}}}}}},"df":0,"docs":{}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"a":{"d":{"a":{"df":0,"docs":{},"t":{"a":{"df":1,"docs":{"35":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"df":0,"docs":{}}}},"n":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":1,"docs":{"8":{"tf":1.0}}},"w":{"df":1,"docs":{"74":{"tf":1.0}}}},"o":{"_":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"d":{"df":1,"docs":{"56":{"tf":1.0}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":3,"docs":{"19":{"tf":1.0},"20":{"tf":1.0},"22":{"tf":1.0}}},"o":{"df":0,"docs":{},"n":{"df":2,"docs":{"13":{"tf":1.0},"66":{"tf":1.0}}}}}}},"r":{"a":{"c":{"df":0,"docs":{},"l":{"df":1,"docs":{"79":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"p":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"44":{"tf":1.0},"5":{"tf":1.0}}}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"n":{"df":0,"docs":{},"t":{"df":2,"docs":{"28":{"tf":1.0},"29":{"tf":1.0}}}}}},"df":0,"docs":{}}},"l":{"a":{"df":0,"docs":{},"t":{"df":0,"docs":{},"f":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"m":{"df":1,"docs":{"53":{"tf":1.0}}}}}}}},"df":0,"docs":{},"e":{"d":{"df":0,"docs":{},"g":{"df":1,"docs":{"84":{"tf":1.0}}}},"df":0,"docs":{}}},"o":{"df":0,"docs":{},"l":{"df":0,"docs":{},"i":{"c":{"df":0,"docs":{},"i":{"df":1,"docs":{"58":{"tf":1.0}}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"i":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":1,"docs":{"64":{"tf":1.0}}}}}}}}}}},"o":{"c":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":1,"docs":{"52":{"tf":1.0}}}}}},"df":0,"docs":{},"j":{"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"t":{"df":1,"docs":{"48":{"tf":1.0}}}},"df":0,"docs":{}}}}},"y":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":1,"docs":{"7":{"tf":1.0}}}}}}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":1,"docs":{"17":{"tf":1.0}}}}}}},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"a":{"df":0,"docs":{},"s":{"df":1,"docs":{"52":{"tf":1.0}}}},"df":0,"docs":{}}},"q":{"df":0,"docs":{},"u":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":2,"docs":{"33":{"tf":1.0},"34":{"tf":1.0}}}}}}},"s":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"n":{"df":0,"docs":{},"s":{"df":1,"docs":{"86":{"tf":1.0}}}}}}}},"u":{"df":0,"docs":{},"n":{"df":4,"docs":{"3":{"tf":1.0},"70":{"tf":1.0},"72":{"tf":1.0},"73":{"tf":1.0}}},"s":{"df":0,"docs":{},"t":{"'":{"df":1,"docs":{"75":{"tf":1.0}}},"df":6,"docs":{"37":{"tf":1.0},"41":{"tf":1.0},"46":{"tf":1.0},"48":{"tf":1.0},"65":{"tf":1.0},"9":{"tf":1.0}}}}}},"s":{"a":{"df":0,"docs":{},"n":{"d":{"b":{"df":0,"docs":{},"o":{"df":0,"docs":{},"x":{"df":1,"docs":{"59":{"tf":1.0}}}}},"df":0,"docs":{}},"df":0,"docs":{}}},"c":{"df":0,"docs":{},"o":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"87":{"tf":1.0}}}}}},"df":0,"docs":{},"e":{"c":{"df":0,"docs":{},"u":{"df":0,"docs":{},"r":{"df":1,"docs":{"57":{"tf":1.0}}}}},"df":0,"docs":{},"t":{"df":13,"docs":{"15":{"tf":1.0},"16":{"tf":1.0},"17":{"tf":1.0},"18":{"tf":1.0},"19":{"tf":1.0},"20":{"tf":1.0},"21":{"tf":1.0},"22":{"tf":1.0},"23":{"tf":1.0},"26":{"tf":1.0},"27":{"tf":1.0},"28":{"tf":1.0},"29":{"tf":1.0}}}},"i":{"df":0,"docs":{},"z":{"df":0,"docs":{},"e":{"df":3,"docs":{"17":{"tf":1.0},"27":{"tf":1.0},"29":{"tf":1.0}}}}},"o":{"df":0,"docs":{},"f":{"df":0,"docs":{},"t":{"df":2,"docs":{"26":{"tf":1.0},"27":{"tf":1.0}}}},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":0,"docs":{},"h":{"df":1,"docs":{"62":{"tf":1.0}}}}}}},"p":{"df":0,"docs":{},"e":{"c":{"df":1,"docs":{"72":{"tf":1.0}},"i":{"df":0,"docs":{},"f":{"df":2,"docs":{"71":{"tf":1.0},"76":{"tf":1.0}}}}},"df":0,"docs":{}}},"r":{"c":{"/":{"df":0,"docs":{},"m":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{".":{"df":0,"docs":{},"r":{"df":1,"docs":{"49":{"tf":1.0}}}},"df":0,"docs":{}}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}},"t":{"a":{"b":{"df":0,"docs":{},"i":{"df":0,"docs":{},"l":{"df":1,"docs":{"51":{"tf":1.0}}}}},"df":0,"docs":{},"n":{"d":{"a":{"df":0,"docs":{},"r":{"d":{"df":1,"docs":{"85":{"tf":1.0}}},"df":0,"docs":{}}},"df":0,"docs":{}},"df":0,"docs":{}}},"df":0,"docs":{},"y":{"df":0,"docs":{},"l":{"df":0,"docs":{},"e":{"df":2,"docs":{"75":{"tf":1.0},"76":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"p":{"df":0,"docs":{},"p":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"t":{"df":3,"docs":{"53":{"tf":1.0},"54":{"tf":1.0},"55":{"tf":1.0}}}}}}}},"y":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"df":1,"docs":{"31":{"tf":1.0}}}}}}}},"t":{"a":{"df":0,"docs":{},"r":{"df":0,"docs":{},"g":{"df":0,"docs":{},"e":{"df":0,"docs":{},"t":{"df":1,"docs":{"80":{"tf":1.0}}}}}},"s":{"df":0,"docs":{},"k":{"df":1,"docs":{"22":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"t":{"df":10,"docs":{"69":{"tf":1.0},"70":{"tf":1.0},"71":{"tf":1.0},"72":{"tf":1.0},"73":{"tf":1.0},"74":{"tf":1.0},"75":{"tf":1.4142135623730951},"76":{"tf":1.0},"77":{"tf":1.0},"79":{"tf":1.0}}}}},"h":{"df":0,"docs":{},"r":{"df":0,"docs":{},"e":{"df":0,"docs":{},"s":{"df":0,"docs":{},"h":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"d":{"df":1,"docs":{"20":{"tf":1.0}}},"df":0,"docs":{}}}}}}}},"i":{"df":0,"docs":{},"m":{"df":0,"docs":{},"e":{"df":0,"docs":{},"o":{"df":0,"docs":{},"u":{"df":0,"docs":{},"t":{"df":1,"docs":{"22":{"tf":1.0}}}}}}}},"o":{"df":0,"docs":{},"o":{"df":0,"docs":{},"l":{"c":{"df":0,"docs":{},"h":{"a":{"df":0,"docs":{},"i":{"df":0,"docs":{},"n":{"df":1,"docs":{"65":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":0,"docs":{}}},"t":{"a":{"df":0,"docs":{},"l":{"df":2,"docs":{"27":{"tf":1.0},"29":{"tf":1.0}}}},"df":0,"docs":{}}},"u":{"df":0,"docs":{},"t":{"df":0,"docs":{},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"i":{"df":1,"docs":{"1":{"tf":1.0}}}}}}},"y":{"df":0,"docs":{},"p":{"df":0,"docs":{},"e":{"df":1,"docs":{"40":{"tf":1.0}}}}}},"u":{"df":0,"docs":{},"p":{"d":{"a":{"df":0,"docs":{},"t":{"df":1,"docs":{"34":{"tf":1.0}}}},"df":0,"docs":{}},"df":0,"docs":{}},"s":{"a":{"df":0,"docs":{},"g":{"df":1,"docs":{"20":{"tf":1.0}}}},"df":6,"docs":{"10":{"tf":1.0},"11":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"i":{"df":2,"docs":{"73":{"tf":1.0},"77":{"tf":1.0}}},"m":{"df":2,"docs":{"47":{"tf":1.0},"72":{"tf":1.0}},"t":{"df":0,"docs":{},"i":{"df":0,"docs":{},"m":{"df":10,"docs":{"11":{"tf":1.0},"12":{"tf":1.0},"13":{"tf":1.0},"14":{"tf":1.0},"3":{"tf":1.0},"45":{"tf":1.0},"46":{"tf":1.0},"50":{"tf":1.0},"67":{"tf":1.0},"68":{"tf":1.0}}}}}},"t":{"df":1,"docs":{"76":{"tf":1.0}}}}},"df":0,"docs":{},"e":{"b":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"s":{"df":0,"docs":{},"e":{"df":0,"docs":{},"m":{"b":{"df":0,"docs":{},"l":{"df":7,"docs":{"10":{"tf":1.0},"36":{"tf":1.0},"40":{"tf":1.0},"6":{"tf":1.0},"7":{"tf":1.0},"8":{"tf":1.0},"9":{"tf":1.0}}}},"df":0,"docs":{}}}}}},"df":0,"docs":{}},"df":0,"docs":{}},"o":{"df":0,"docs":{},"r":{"df":0,"docs":{},"k":{"df":1,"docs":{"30":{"tf":1.0}},"e":{"df":0,"docs":{},"r":{"df":2,"docs":{"17":{"tf":1.0},"32":{"tf":1.0}}}}},"l":{"d":{".":{"df":0,"docs":{},"w":{"a":{"df":0,"docs":{},"s":{"df":0,"docs":{},"m":{"df":2,"docs":{"2":{"tf":1.0},"3":{"tf":1.0}}}}},"df":0,"docs":{}}},"df":1,"docs":{"38":{"tf":1.0}}},"df":0,"docs":{}}}},"r":{"df":0,"docs":{},"i":{"df":0,"docs":{},"t":{"df":0,"docs":{},"e":{"df":2,"docs":{"36":{"tf":1.0},"39":{"tf":1.0}}}}}}}}}},"pipeline":["trimmer","stopWordFilter","stemmer"],"ref":"id","version":"0.9.5"},"results_options":{"limit_results":30,"teaser_word_count":30},"search_options":{"bool":"OR","expand":true,"fields":{"body":{"boost":1},"breadcrumbs":{"boost":1},"title":{"boost":2}}}} \ No newline at end of file diff --git a/security-disclosure.html b/security-disclosure.html new file mode 100644 index 000000000000..971e75914f19 --- /dev/null +++ b/security-disclosure.html @@ -0,0 +1,210 @@ + + + + + + Disclosure Policy - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Disclosure Policy

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/security-sandboxing.html b/security-sandboxing.html new file mode 100644 index 000000000000..df1a2bcf3624 --- /dev/null +++ b/security-sandboxing.html @@ -0,0 +1,210 @@ + + + + + + Sandboxing - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Sandboxing

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/security.html b/security.html new file mode 100644 index 000000000000..c57e5837aeae --- /dev/null +++ b/security.html @@ -0,0 +1,210 @@ + + + + + + Security - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Security

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/stability-platform-support.html b/stability-platform-support.html new file mode 100644 index 000000000000..ee600644ffba --- /dev/null +++ b/stability-platform-support.html @@ -0,0 +1,242 @@ + + + + + + Platform Support - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Platform Support

+

The wasmtime project is a configurable and lightweight runtime for WebAssembly +which has a number of ways it can be configured. Not all features are supported +on all platforms, but it is intended that wasmtime can run in some capacity on +almost all platforms! The matrix of what's being tested, what works, and what's +supported where is evolving over time, and this document hopes to capture a +snapshot of what the current state of the world looks like.

+

All features of wasmtime should work on the following platforms:

+
    +
  • Linux x86_64
  • +
  • macOS x86_64
  • +
  • Windows x86_64
  • +
+

For more detailed information about supported platforms, please check out the +sections below!

+

JIT compiler support

+

The JIT compiler, backed by either lightbeam or cranelift supports only the +x86_64 architecture at this time. Support for at least ARM, AArch64, and x86 is +planned at this time.

+

Usage of the JIT compiler will require a host operating system which supports +creating executable memory pages on-the-fly. In Rust terms this generally means +that std needs to be supported on this platform.

+

Interpreter support

+

At this time wasmtime does not have a mode in which it simply interprets +WebAssembly code. It is planned to add support for an interpreter, however, and +this will have minimal system dependencies. It is planned that the system will +need to support some form of dynamic memory allocation, but other than that not +much else will be needed.

+

What about #[no_std]?

+

The wasmtime project does not currently use #[no_std] for its crates, but +this is not because it won't support it! At this time we're still gathering use +cases for for what #[no_std] might entail, so if you're interested in this +we'd love to hear about your use case! Feel free to open an issue on the +wasmtime repository to discuss this.

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/stability-release.html b/stability-release.html new file mode 100644 index 000000000000..fc63c62ba425 --- /dev/null +++ b/stability-release.html @@ -0,0 +1,210 @@ + + + + + + Release Process - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Release Process

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/stability.html b/stability.html new file mode 100644 index 000000000000..f25fa0f9e6f1 --- /dev/null +++ b/stability.html @@ -0,0 +1,210 @@ + + + + + + Stability - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Stability

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tomorrow-night.css b/tomorrow-night.css new file mode 100644 index 000000000000..f71979258db2 --- /dev/null +++ b/tomorrow-night.css @@ -0,0 +1,104 @@ +/* Tomorrow Night Theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ +/* Original theme - https://github.com/chriskempson/tomorrow-theme */ +/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */ + +/* Tomorrow Comment */ +.hljs-comment { + color: #969896; +} + +/* Tomorrow Red */ +.hljs-variable, +.hljs-attribute, +.hljs-tag, +.hljs-regexp, +.ruby .hljs-constant, +.xml .hljs-tag .hljs-title, +.xml .hljs-pi, +.xml .hljs-doctype, +.html .hljs-doctype, +.css .hljs-id, +.css .hljs-class, +.css .hljs-pseudo { + color: #cc6666; +} + +/* Tomorrow Orange */ +.hljs-number, +.hljs-preprocessor, +.hljs-pragma, +.hljs-built_in, +.hljs-literal, +.hljs-params, +.hljs-constant { + color: #de935f; +} + +/* Tomorrow Yellow */ +.ruby .hljs-class .hljs-title, +.css .hljs-rule .hljs-attribute { + color: #f0c674; +} + +/* Tomorrow Green */ +.hljs-string, +.hljs-value, +.hljs-inheritance, +.hljs-header, +.hljs-name, +.ruby .hljs-symbol, +.xml .hljs-cdata { + color: #b5bd68; +} + +/* Tomorrow Aqua */ +.hljs-title, +.css .hljs-hexcolor { + color: #8abeb7; +} + +/* Tomorrow Blue */ +.hljs-function, +.python .hljs-decorator, +.python .hljs-title, +.ruby .hljs-function .hljs-title, +.ruby .hljs-title .hljs-keyword, +.perl .hljs-sub, +.javascript .hljs-title, +.coffeescript .hljs-title { + color: #81a2be; +} + +/* Tomorrow Purple */ +.hljs-keyword, +.javascript .hljs-function { + color: #b294bb; +} + +.hljs { + display: block; + overflow-x: auto; + background: #1d1f21; + color: #c5c8c6; + padding: 0.5em; + -webkit-text-size-adjust: none; +} + +.coffeescript .javascript, +.javascript .xml, +.tex .hljs-formula, +.xml .javascript, +.xml .vbscript, +.xml .css, +.xml .hljs-cdata { + opacity: 0.5; +} + +.hljs-addition { + color: #718c00; +} + +.hljs-deletion { + color: #c82829; +} diff --git a/tutorial-create-hello-world.html b/tutorial-create-hello-world.html new file mode 100644 index 000000000000..a30a16b68e31 --- /dev/null +++ b/tutorial-create-hello-world.html @@ -0,0 +1,210 @@ + + + + + + Creating hello-world.wasm - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Creating hello-world.wasm

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tutorial-run-hello-world.html b/tutorial-run-hello-world.html new file mode 100644 index 000000000000..840e3ea4386f --- /dev/null +++ b/tutorial-run-hello-world.html @@ -0,0 +1,210 @@ + + + + + + Running hello-world.wasm - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Running hello-world.wasm with Wasmtime

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tutorial.html b/tutorial.html new file mode 100644 index 000000000000..77a8eb29c048 --- /dev/null +++ b/tutorial.html @@ -0,0 +1,210 @@ + + + + + + Tutorial - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Tutorial

+

... more coming soon

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wasi-software-architecture.png b/wasi-software-architecture.png new file mode 100644 index 000000000000..6cb8345cc43c Binary files /dev/null and b/wasi-software-architecture.png differ diff --git a/wasm-c.html b/wasm-c.html new file mode 100644 index 000000000000..ae7a9e302c48 --- /dev/null +++ b/wasm-c.html @@ -0,0 +1,209 @@ + + + + + + C/C++ - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

C/C++

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wasm-markdown.html b/wasm-markdown.html new file mode 100644 index 000000000000..9a7eca788cc4 --- /dev/null +++ b/wasm-markdown.html @@ -0,0 +1,209 @@ + + + + + + Example: Markdown Parser - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Example: Markdown Parser

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wasm-rust.html b/wasm-rust.html new file mode 100644 index 000000000000..f028ee185e61 --- /dev/null +++ b/wasm-rust.html @@ -0,0 +1,440 @@ + + + + + + Rust - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Rust

+

The Rust Programming Language supports WebAssembly +as a compilation target. If you're not familiar with Rust it's recommended to +start with its introductory documentation. +Compiling to WebAssembly will involve specifying the desired target via the +--target flag, and to do this there are a number of "target triples" for +WebAssembly compilation in Rust:

+
    +
  • wasm32-wasi - when using wasmtime this is likely what you'll be using. The +WASI target is integrated into the standard library and is intended on +producing standalone binaries.
  • +
  • wasm32-unknown-unknown - this target, like the WASI one, is focused on +producing single *.wasm binaries. The standard library, however, is largely +stubbed out since the "unknown" part of the target means libstd can't assume +anything. This means that while binaries will likely work in wasmtime, +common conveniences like println! or panic! won't work.
  • +
  • wasm32-unknown-emscripten - this target is intended to work in a web browser +and produces a *.wasm file coupled with a *.js file, and it is not +compatible with wasmtime.
  • +
+

For the rest of this documentation we'll assume that you're using the +wasm32-wasi target for compiling Rust code and executing inside of wasmtime.

+

Hello, World!

+

Cross-compiling to WebAssembly involves a number of knobs that need +configuration, but you can often gloss over these internal details by using +build tooling intended for the WASI target. For example we can start out writing +a WebAssembly binary with cargo wasi.

+

First up we'll install cargo wasi:

+
$ cargo install cargo-wasi
+
+

Next we'll make a new Cargo project:

+
$ cargo new hello-world
+$ cd hello-world
+
+

Inside of src/main.rs you'll see the canonical Rust "Hello, World!" using +println!. We'll be executing this for the wasm32-wasi target, so you'll want +to make sure you're previously built wasmtime and inserted it into +PATH;

+
$ cargo wasi run
+info: downloading component 'rust-std' for 'wasm32-wasi'
+info: installing component 'rust-std' for 'wasm32-wasi'
+   Compiling hello-world v0.1.0 (/hello-world)
+    Finished dev [unoptimized + debuginfo] target(s) in 0.16s
+     Running `/.cargo/bin/cargo-wasi target/wasm32-wasi/debug/hello-world.wasm`
+     Running `target/wasm32-wasi/debug/hello-world.wasm`
+Hello, world!
+
+

And we're already running our first WebAssembly code inside of wasmtime!

+

While it's automatically happening for you as part of cargo wasi, you can also +run wasmtime yourself:

+
$ wasmtime target/wasm32-wasi/debug/hello-world.wasm
+Hello, world!
+
+

You can check out the introductory documentation of +cargo-wasi as +well for some more information.

+

Writing Libraries

+

Previously for "Hello, World!" we created a binary project which used +src/main.rs. Not all *.wasm binaries are intended to be executed like +commands, though. Some are intended to be loaded into applications and called +through various APIs, acting more like libraries. For this use case you'll want +to add this to Cargo.toml:

+
# in Cargo.toml ...
+
+[lib]
+crate-type = ['cdylib']
+
+

and afterwards you'll want to write your code in src/lib.rs like so:

+

+# #![allow(unused_variables)]
+#fn main() {
+#[no_mangle]
+pub extern "C" fn print_hello() {
+    println!("Hello, world!");
+}
+#}
+

When you execute cargo wasi build that'll generate a *.wasm file which has +one exported function, print_hello. We can then run it via the CLI like so:

+
$ cargo wasi build
+   Compiling hello-world v0.1.0 (/home/alex/code/hello-world)
+    Finished dev [unoptimized + debuginfo] target(s) in 0.08s
+$ wasmtime --invoke print_hello target/wasm32-wasi/debug/hello_world.wasm
+Hello, world!
+
+

As a library crate one of your primary consumers may be other languages as well. +You'll want to consult the section of this book for using wasmtime from +Python` and after running through the basics there you can +execute our file in Python:

+
$ cp target/wasm32-wasi/debug/hello_world.wasm .
+$ python3
+>>> import wasmtime
+>>> import hello_world
+>>> hello_world.print_hello()
+Hello, world!
+()
+>>>
+
+

Note that this form of using #[no_mangle] Rust functions is pretty primitive. +You're only able to work with primitive datatypes like integers and floats. +While this works for some applications if you need to work with richer types +like strings or structs, then you'll want to use the support in wasmtime for +interface types.

+

WebAssembly Interface Types

+

Working with WebAssembly modules at the bare-bones level means that you're only +dealing with integers and floats. Many APIs, however, want to work with things +like byte arrays, strings, structures, etc. To facilitate these interactions the +WebAssembly Interface Types +Proposal comes into play. The +wasmtime runtime has support for interface types, and the Rust toolchain has +library support in a crate called +wasm-bindgen.

+
+

Note: WebAssembly Interface Types is still a WebAssembly proposal and is +under active development. The toolchain may not match the exact specification, +and during development you'll generally need to make sure tool versions are +all kept up to date to ensure everything aligns right. This'll all smooth over +as the proposal stabilizes!

+
+

To get started with WebAssembly interface types let's write a library +module which will generate a greeting for us. The module itself won't do any +printing, we'll simply be working with some strings.

+

To get starts let's add this to our Cargo.toml:

+
[lib]
+crate-type = ['cdylib']
+
+[dependencies]
+wasm-bindgen = "0.2.54"
+
+

Using this crate, we can then update our src/lib.rs with the following:

+

+# #![allow(unused_variables)]
+#fn main() {
+use wasm_bindgen::prelude::*;
+
+#[wasm_bindgen]
+pub fn greet(name: &str) -> String {
+    format!("Hello, {}!", name)
+}
+#}
+

Then we can build this with:

+
$ cargo wasi build --release
+    Updating crates.io index
+...
+    Finished dev [unoptimized + debuginfo] target(s) in 9.57s
+ Downloading precompiled wasm-bindgen v0.2.54
+
+

and we have our new wasm binary!

+
+

Note: for now when using wasm-bindgen you must use --release mode to +build wasi binaries with interface types.

+
+

We can then test out support for this with the CLI:

+
$ wasmtime --invoke greet ./target/wasm32-wasi/release/hello_world.wasm "wasmtime CLI"
+warning: using `--invoke` with a function that takes arguments is experimental and may break in the future
+warning: using `--invoke` with a function that returns values is experimental and may break in the future
+Hello, wasmtime CLI!
+
+

Here we can see some experimental warnings, but we got our error message printed +out! The first CLI parameter, "wasmtime CLI", was passed as the first argument +of the greet function. The resulting string was then printed out to the +console.

+

Like before, we can also execute this with Python:

+
$ cp target/wasm32-wasi/release/hello_world.wasm .
+$ python3
+>>> import wasmtime
+>>> import hello_world
+>>> hello_world.greet('python interpreter')
+'Hello, python interpreter!'
+>>>
+
+

Note that wasm-bindgen was originally developed for JS and usage in a browser, +but a subset of its implementation (such as arguments which are strings) are +supported for WebAssembly interface types. You can also check out the reference +documentation for wasm-bindgen for +more information about how it works. Note that the wasm-bindgen support for +wasm interface type is still in its nascent phase and is likely to be greatly +improved in the future.

+

Exporting Rust functionality

+

Currently only Rust functions can be exported from a wasm module. Rust functions +must be #[no_mangle] to show up in the final binary, but if you're using +#[wasm_bindgen] that will happen automatically for you.

+

Memory is by default exported from Rust modules under the name memory. This +can be tweaked with the -Clink-arg flag to rustc to pass flags to LLD, the +WebAssembly code linker.

+

Tables cannot be imported at this time. When using rustc directly there is no +support for anyref and only one function table is supported. When using +wasm-bindgen it may inject an anyref table if necessary, but this table is +an internal detail and is not exported. The function table can be exported by +passing the --export-table argument to LLD (via -C link-arg) or can be +imported with the --import-table.

+

Rust currently does not have support for exporting or importing custom global +values.

+

Importing host functionality

+

Only functions can be imported in Rust at this time, and they can be imported +via raw interfaces like:

+

+# #![allow(unused_variables)]
+#fn main() {
+#[link(wasm_import_module = "the-wasm-import-module")]
+extern "C" {
+    // imports the name `foo` from `the-wasm-import-module`
+    fn foo();
+
+    // functions can have integer/float arguments/return values
+    fn translate(a: i32) -> f32;
+
+    // Note that the ABI of Rust and wasm is somewhat in flux, so while this
+    // works, it's recommended to rely on raw integer/float values where
+    // possible.
+    fn translate_fancy(my_struct: MyStruct) -> u32;
+
+    // you can also explicitly specify the name to import, this imports `bar`
+    // instead of `baz` from `the-wasm-import-module`.
+    #[link_name = "bar"]
+    fn baz();
+}
+#}
+

When you're using wasm-bindgen you would instead use:

+

+# #![allow(unused_variables)]
+#fn main() {
+use wasm_bindgen::prelude::*;
+
+#[wasm_bindgen(module = "the-wasm-import-module")]
+extern "C" {
+    fn foo();
+    fn baz();
+    // ...
+}
+#}
+

Note that unless you're using interface types you likely don't need +wasm-bindgen.

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wasm.html b/wasm.html new file mode 100644 index 000000000000..ba53cdd707ac --- /dev/null +++ b/wasm.html @@ -0,0 +1,209 @@ + + + + + + Writing WebAssembly - Wasmtime + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + +
+
+

Writing WebAssembly

+ +
+ + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + +