facebook / facebook/hermes

[RFC] The application/hermes media type

Open
#686 0 comments 2 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
11.3k
Forks
859
Avg merge
1h 30m
Merged PRs (30d)
3

Description

## Problem

Media types are a long established way to specify the type of data, such as in the `Content-Type` header of HTTP responses. Hermes bytecode has no such media type. The intent of this discussion is to find consensus on a media type for Hermes bytecode and potentially submit it to the [IANA media type directory](https://www.iana.org/assignments/media-types/media-types.xhtml).

## Solution

As a starting point, the proposal for the media type is `application/hermes` with the required parameter, `v`, which specifies the bytecode version. For example, the media type for a Hermes bytecode file for version 83 would be `application/hermes; v=83`.

From what I can see, the media type is pretty simple. The bytecode version is important for compatibility, which is why it is a required parameter.

Below is a draft of an entry for the IANA media type directory.

```
Type name: application

Subtype name: hermes

Required parameters:
There is one required parameter, "v", which specifies the Hermes
bytecode version as a positive integer.

Optional parameters: N/A

Encoding considerations: binary

Security considerations:
See Section 5 of [RFC4329].

Interoperability considerations:
User agents MUST ensure they can execute the version of Hermes
bytecode specified by the "v" parameter.

Published specification: Hermes software

Applications which use this media type:
For example: Mobile applications

Fragment identifier considerations: N/A

Additional information:

Magic number(s): 0xC61FBC03C103191F
File extension(s): .hbc

Person & email address to contact for further information:
TBD

Intended usage:
COMMON

Restrictions on usage:
N/A.

Author:
TBD

Change controller:
TBD
```

Two discussion topics come to mind:

1. What objections are there?
2. Assuming (1) gets worked out, would someone who works on Hermes be interested in submitting the form to the IANA?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.