Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass long strings as [ubyte] on code_fetch #1113

Closed
kitsonk opened this issue Oct 28, 2018 · 0 comments
Closed

Pass long strings as [ubyte] on code_fetch #1113

kitsonk opened this issue Oct 28, 2018 · 0 comments

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Oct 28, 2018

Long strings (e.g. source_code, output_code) should be passed as binary [ubyte] instead of as a string. Since JS will decode the flatbuffer into a string anyway, having these be a string means Rust must also decode utf8.

CodeFetchRes contains some of these:

deno/src/msg.fbs

Lines 142 to 151 in a68403d

table CodeFetchRes {
// If it's a non-http module, moduleName and filename will be the same.
// For http modules, moduleName is its resolved http URL, and filename
// is the location of the locally downloaded source code.
module_name: string;
filename: string;
media_type: MediaType;
source_code: string;
output_code: string; // Non-empty only if cached.
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant