GithubHelp home page GithubHelp logo

classicvalues / website-3 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from assemblyscript/website

1.0 1.0 0.0 2.57 MB

AssemblyScript's website and documentation.

Home Page: https://assemblyscript.org

JavaScript 49.03% Vue 13.18% HTML 35.46% Stylus 2.33%

website-3's Introduction

AssemblyScript's Website

Deploy

The site is built with VuePress and reuses its default theme to ease upgrading to newer versions.

The more important files are:

Editor component

Markdown files can make use of a custom editor component using the editor language tag, like so:

```editor
#!optimize=size&runtime=none&noAssert&explicitStart&enable=simd,reference-types
export function add(a: i32, b: i32): i32 {
  return a + b
}

#!html
<script>
loader.instantiate(module_wasm, { /* imports */ })
  .then(({ exports }) => {
    console.log(exports.add(1, 2))
  })
</script>
```

The first line is an optional shebang indicating selected compiler options. Available options are:

  • optimize = string
    Optimization preset to use. Valid presets are speed, size and none
  • noAssert
    Replaces assertions with just their value without trapping.
  • debug
    Enables debug information in emitted binaries.
  • runtime = string
    Specifies the runtime variant to include in the program. Valid variants are full, half, stub and none.
  • noExportMemory
    Does not export the memory to the host.
  • importMemory
    Imports the memory from the host.
  • exportTable
    Exports the function table to the host.
  • importTable
    Imports the function table from the host.
  • explicitStart
    Exports an explicit start function to call.
  • memoryBase = integer
    Sets the start offset of emitted memory segments.
  • tableBase = integer
    Sets the start offset of emitted table elements.
  • use = string
    Comma separated list of global aliases, e.g. to switch the default 'Math' implementation used: Math=JSMath
  • enable = string
    Comma-separated list of future WebAssembly features to enable. Valid features are sign-extension, bulk-memory, simd, threads and reference-types.

The current source and associated compiler options can be serialized into a base64 blob this way. For example, when the ๐Ÿ”— button is clicked, document.location.hash is updated with that blob and the then-sharable link is copied to clipboard.

Building

To work on the site locally, install the dependencies and start a development server serving at localhost:8080:

npm install
npm start

To build the site to dist, i.e. to verify that it works as expected:

npm run build

Distribution files can also be served instead of using the development server with:

npm run serve

The page is automatically deployed on pushes to the repository, plus at least once a day to sync contributors and sponsors.

website-3's People

Contributors

aduros avatar atcwells avatar colineberhardt avatar dcodeio avatar dependabot[bot] avatar ernestoborio avatar fatjonny avatar fgasper avatar ghalimi avatar jensschaefer avatar lancemccluskey avatar maxgraey avatar maxlk avatar nischayv avatar phamann avatar piotr-oles avatar pretentious7 avatar rehkitzdev avatar sebastienros avatar sidx1024 avatar sunfishcode avatar synote avatar syrusakbary avatar tkomde avatar torch2424 avatar ttulka avatar wscats avatar yjhmelody avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.