Skip to content

Commit 598d564

Browse files
committed
Initial commit
Set up a simple skeleton to start working with gn.
0 parents  commit 598d564

File tree

7 files changed

+77
-0
lines changed

7 files changed

+77
-0
lines changed

.clang-format

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Defines the Chromium style for automatic reformatting.
2+
# http://clang.llvm.org/docs/ClangFormatStyleOptions.html
3+
BasedOnStyle: Chromium
4+
5+
# clang-format doesn't seem to do a good job of this for longer comments.
6+
ReflowComments: 'false'
7+
8+
# We have lots of these. Though we need to put them all in curly braces,
9+
# clang-format can't do that.
10+
AllowShortIfStatementsOnASingleLine: 'true'
11+
12+
# Put escaped newlines into the rightmost column.
13+
AlignEscapedNewlinesLeft: false

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
out/*

BUILD.gn

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
group("examples") {
3+
deps = [
4+
"//examples/simple_example",
5+
]
6+
}

LICENSE

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Released under MIT License
2+
3+
Copyright (c) 2022 Jeff Ward
4+
5+
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:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
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.

README.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Dart Dynamic Import Library
2+
3+
This is an attempt / POC to build the Dart VM into a dynamic library, importable in any platform Dart supports.
4+
5+
This uses the same build system any style as the Dart SDK, partially so that it can be built from a parallel checkout of the Dart SDK source, and (potentially, maybe one day) be brought into the Dart SDK directly.
6+
7+
## Eventual support
8+
9+
The hope is that the the dynamic library will eventually support the following targets:
10+
* A "Fully Featured" .dll / .so that supports booting Dart in different configurations:
11+
* Boot (or not) the service and kernel isolates
12+
* Support Dart Source Compilation and / or Kernel Isolates
13+
* Support "AOT only" mode? (aka, just the runtime)
14+
* A JIT Only .dll / .so
15+
* A AOT Only .dll / .so (aka, just the runtime)
16+
17+
Additionally we may have a static target that uses the same interface as the dynamic library, so the VM can be embedded on platforms that don't support dynamic linking.
18+
19+
I also hope to support all platforms that Dart currently supports, plus a few extra.
20+
21+
## Current Progress
22+
23+
None. I literally just started.
24+
25+
## Using
26+
27+
`TODO:`
28+
29+
## Building
30+
31+
`TODO:`
32+
33+
## Contributing
34+
35+
`TODO:`

examples/simple_example/BUILD.gn

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
executable("tutorial") {
2+
sources = [
3+
"main.cpp",
4+
]
5+
}

examples/simple_example/main.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include <stdio.h>
2+
3+
int main() {
4+
5+
printf("Hello world");
6+
7+
return 0;
8+
}

0 commit comments

Comments
 (0)