Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 30 additions & 3 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,12 @@
default=None,
help='Enable the built-in snapshot compression in V8.')

parser.add_argument('--v8-enable-temporal-support',
action='store_true',
dest='v8_enable_temporal_support',
default=None,
help='Enable Temporal support in V8.')

parser.add_argument('--node-builtin-modules-path',
action='store',
dest='node_builtin_modules_path',
Expand Down Expand Up @@ -1440,8 +1446,8 @@ def host_arch_win():
return matchup.get(arch, 'x64')

def set_configuration_variable(configs, name, release=None, debug=None):
configs['Release'][name] = release
configs['Debug'][name] = debug
configs['Release']['variables'][name] = release
configs['Debug']['variables'][name] = debug

def configure_arm(o):
if options.arm_float_abi:
Expand Down Expand Up @@ -1522,6 +1528,7 @@ def configure_node(o):
o['variables']['control_flow_guard'] = b(options.enable_cfg)
o['variables']['node_use_amaro'] = b(not options.without_amaro)
o['variables']['debug_node'] = b(options.debug_node)
o['variables']['build_type%'] = 'Debug' if options.debug else 'Release'
o['default_configuration'] = 'Debug' if options.debug else 'Release'
if options.error_on_warn and options.suppress_all_error_on_warn:
raise Exception('--error_on_warn is incompatible with --suppress_all_error_on_warn.')
Expand Down Expand Up @@ -1772,6 +1779,11 @@ def configure_library(lib, output, pkgname=None):
output['libraries'] += pkg_libs.split()


def configure_rust(o, configs):
set_configuration_variable(configs, 'cargo_build_mode', release='release', debug='debug')
set_configuration_variable(configs, 'cargo_build_flags', release=['--release'], debug=[])


def configure_v8(o, configs):
set_configuration_variable(configs, 'v8_enable_v8_checks', release=1, debug=0)

Expand Down Expand Up @@ -1802,6 +1814,7 @@ def configure_v8(o, configs):
o['variables']['v8_enable_external_code_space'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
o['variables']['v8_enable_extensible_ro_snapshot'] = 0
o['variables']['v8_enable_temporal_support'] = 1 if options.v8_enable_temporal_support else 0
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)
Expand Down Expand Up @@ -2325,6 +2338,7 @@ def make_bin_override():
'libraries': [],
'defines': [],
'cflags': [],
'conditions': [],
}
configurations = {
'Release': { 'variables': {} },
Expand Down Expand Up @@ -2365,6 +2379,7 @@ def make_bin_override():
configure_static(output)
configure_inspector(output)
configure_section_file(output)
configure_rust(output, configurations)

# remove builtins that have been disabled
if options.without_amaro:
Expand All @@ -2387,6 +2402,17 @@ def make_bin_override():
variables = output['variables']
del output['variables']

# move configurations[*]['variables'] to conditions variables
config_release_vars = configurations['Release']['variables']
del configurations['Release']['variables']
config_debug_vars = configurations['Debug']['variables']
del configurations['Debug']['variables']
output['conditions'].append(['build_type=="Release"', {
'variables': config_release_vars,
}, {
'variables': config_debug_vars,
}])

# make_global_settings should be a root level element too
if 'make_global_settings' in output:
make_global_settings = output['make_global_settings']
Expand All @@ -2406,8 +2432,9 @@ def make_bin_override():

print_verbose(output)

# Dump as JSON to allow js2c.cc read it as a simple json file.
write('config.gypi', do_not_edit +
pprint.pformat(output, indent=2, width=128) + '\n')
json.dumps(output, indent=2) + '\n')

write('config.status', '#!/bin/sh\nset -x\nexec ./configure ' +
' '.join([shlex.quote(arg) for arg in original_argv]) + '\n')
Expand Down
3 changes: 3 additions & 0 deletions deps/temporal/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# TODO: track https://github.com/rust-lang/rust/issues/141626 for a resolution
[target.x86_64-pc-windows-msvc]
rustflags = ['-Csymbol-mangling-version=v0']
23 changes: 23 additions & 0 deletions deps/temporal/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/
tzdata/

# Include the data debug view
!/provider/src/data/debug

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

.vscode/

# Ignore log files
*.log

# Ignore clangd files
.cache
compile_commands.json
484 changes: 484 additions & 0 deletions deps/temporal/CHANGELOG.md

Large diffs are not rendered by default.

51 changes: 51 additions & 0 deletions deps/temporal/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Contributing to Temporal in Rust

We welcome contributions, feel free to checkout our open issues. If you
find an issue you're interested in, please feel free to ask to be assigned.

If you're interested in helping out but don't see an issue that's for
you, please feel free to contact us on `Boa`'s Matrix server.

## Contributor Information

The Temporal proposal is a new date/time API that is being developed and proposed
for the ECMAScript specification. This library aims to be a Rust
implementation of that specification.

Due to the nature of the material and this library, we would advise anyone
interested in contributing to familiarize themselves with the Temporal
specification.

Also, always feel free to reach out for any advice or feedback as needed.

## Testing and debugging

For more information on testing and debugging `temporal_rs`. Please see
the [testing overview](./docs/testing.md).

## Diplomat and `temporal_capi`

If changes are made to `temporal_capi` that affect the public API, the
FFI bindings will need to be regenerated / updated.

To update the bindings, run:

```bash
cargo run -p diplomat-gen
```

## Baked data

To regenerate baked data, run:

```bash
cargo run -p bakeddata
```

## Dependency check

To check the dependencies, run:

```bash
cargo run -p depcheck
```
Loading
Loading